From db4356485bb62026bdf0ada289ff3fa27fc81a22 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 27 Jun 2024 16:04:29 +0700 Subject: [PATCH 001/272] init tunnel module --- go.mod | 2 +- proto/tunnel/v1beta1/genesis.proto | 13 + proto/tunnel/v1beta1/params.proto | 27 + proto/tunnel/v1beta1/query.proto | 25 + proto/tunnel/v1beta1/tx.proto | 53 + proto/tunnel/v1beta1/types.proto | 58 + x/tunnel/README.md | 19 + x/tunnel/abci.go | 13 + x/tunnel/client/cli/query.go | 53 + x/tunnel/client/cli/tx.go | 26 + x/tunnel/genesis.go | 10 + x/tunnel/keeper/genesis.go | 16 + x/tunnel/keeper/grpc_query.go | 30 + x/tunnel/keeper/keeper.go | 41 + x/tunnel/keeper/keeper_params.go | 28 + x/tunnel/keeper/msg_server.go | 56 + x/tunnel/module.go | 156 +++ x/tunnel/types/codec.go | 37 + x/tunnel/types/errors.go | 10 + x/tunnel/types/events.go | 8 + x/tunnel/types/expected_keepers.go | 18 + x/tunnel/types/genesis.go | 11 + x/tunnel/types/genesis.pb.go | 322 +++++ x/tunnel/types/keys.go | 27 + x/tunnel/types/msgs.go | 48 + x/tunnel/types/params.go | 26 + x/tunnel/types/params.pb.go | 679 ++++++++++ x/tunnel/types/query.pb.go | 535 ++++++++ x/tunnel/types/query.pb.gw.go | 153 +++ x/tunnel/types/tx.pb.go | 1160 +++++++++++++++++ x/tunnel/types/types.pb.go | 1927 ++++++++++++++++++++++++++++ 31 files changed, 5586 insertions(+), 1 deletion(-) create mode 100644 proto/tunnel/v1beta1/genesis.proto create mode 100644 proto/tunnel/v1beta1/params.proto create mode 100644 proto/tunnel/v1beta1/query.proto create mode 100644 proto/tunnel/v1beta1/tx.proto create mode 100644 proto/tunnel/v1beta1/types.proto create mode 100644 x/tunnel/README.md create mode 100644 x/tunnel/abci.go create mode 100644 x/tunnel/client/cli/query.go create mode 100644 x/tunnel/client/cli/tx.go create mode 100644 x/tunnel/genesis.go create mode 100644 x/tunnel/keeper/genesis.go create mode 100644 x/tunnel/keeper/grpc_query.go create mode 100644 x/tunnel/keeper/keeper.go create mode 100644 x/tunnel/keeper/keeper_params.go create mode 100644 x/tunnel/keeper/msg_server.go create mode 100644 x/tunnel/module.go create mode 100644 x/tunnel/types/codec.go create mode 100644 x/tunnel/types/errors.go create mode 100644 x/tunnel/types/events.go create mode 100644 x/tunnel/types/expected_keepers.go create mode 100644 x/tunnel/types/genesis.go create mode 100644 x/tunnel/types/genesis.pb.go create mode 100644 x/tunnel/types/keys.go create mode 100644 x/tunnel/types/msgs.go create mode 100644 x/tunnel/types/params.go create mode 100644 x/tunnel/types/params.pb.go create mode 100644 x/tunnel/types/query.pb.go create mode 100644 x/tunnel/types/query.pb.gw.go create mode 100644 x/tunnel/types/tx.pb.go create mode 100644 x/tunnel/types/types.pb.go diff --git a/go.mod b/go.mod index f1a82dd8d..827a1d5f2 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.22.3 require ( cosmossdk.io/api v0.3.1 + cosmossdk.io/core v0.5.1 cosmossdk.io/errors v1.0.1 cosmossdk.io/math v1.3.0 github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.1 @@ -50,7 +51,6 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.36.0 // indirect - cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto new file mode 100644 index 000000000..822c749a2 --- /dev/null +++ b/proto/tunnel/v1beta1/genesis.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package tunnel.v1beta1; + +option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; + +import "gogoproto/gogo.proto"; +import "tunnel/v1beta1/params.proto"; + +// GenesisState represents the initial state of the blockchain. +message GenesisState { + // Params is all parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto new file mode 100644 index 000000000..9ace7d2ae --- /dev/null +++ b/proto/tunnel/v1beta1/params.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package tunnel.v1beta1; + +option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; + +// Params is the data structure that keeps the parameters of the module. +message Params { + option (gogoproto.equal) = true; // Use gogoproto.equal for proto3 message equality checks + option (gogoproto.goproto_stringer) = false; // Disable stringer generation for better control + + repeated cosmos.base.v1beta1.Coin min_deposit = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + uint64 min_diviation_bps = 2 [(gogoproto.customname) = "MinDeviationBPS"]; + repeated cosmos.base.v1beta1.Coin tss_route_fee = 3 [ + (gogoproto.nullable) = false, + (gogoproto.customname) = "TSSRouteFee", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin axelar_route_fee = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated string tss_supported_chains = 5; + repeated string axelar_supported_chains = 6; +} diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto new file mode 100644 index 000000000..fa855df3a --- /dev/null +++ b/proto/tunnel/v1beta1/query.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package tunnel.v1beta1; + +option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "tunnel/v1beta1/params.proto"; + +// Query service defines the gRPC querier service. +service Query { + // Params is a RPC method that returns all parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/tunnel/v1beta1/params"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // Params is the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto new file mode 100644 index 000000000..5d7ba179f --- /dev/null +++ b/proto/tunnel/v1beta1/tx.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package tunnel.v1beta1; + +option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; + +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "tunnel/v1beta1/params.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; +import "amino/amino.proto"; + +import "tunnel/v1beta1/types.proto"; +import "feeds/v1beta1/feeds.proto"; + +// Service definition for Msg. +service Msg { + // CreateTunnel is a RPC method to create a new tunnel. + rpc CreateTunnel(MsgCreateTunnel) returns (MsgCreateTunnelResponse); + + // UpdateParams is a RPC method to update parameters + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgCreateTunnel is the transaction message to create a new tunnel. +message MsgCreateTunnel { + repeated SignalInfo SignalInfos = 1 [(gogoproto.nullable) = false]; + google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "TunnelRoute"]; + feeds.v1beta1.FeedType feed_type = 3; + repeated cosmos.base.v1beta1.Coin deposit = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. +message MsgCreateTunnelResponse { + string tunnel_id = 1; +} + +// MsgUpdateParams is the transaction message to update parameters. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "tunnel/MsgUpdateParams"; + + // Authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Params is the x/tunnel parameters to update. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse is the response type for the Msg/UpdateParams RPC method. +message MsgUpdateParamsResponse {} diff --git a/proto/tunnel/v1beta1/types.proto b/proto/tunnel/v1beta1/types.proto new file mode 100644 index 000000000..1e26ca570 --- /dev/null +++ b/proto/tunnel/v1beta1/types.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; +package tunnel.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +import "feeds/v1beta1/feeds.proto"; + +option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; +option (gogoproto.equal_all) = true; + +message TSSRoute { + option (cosmos_proto.implements_interface) = "TunnelRoute"; + + string destination_chain_id = 1; + string destination_contract_address = 2; +} + +message AxelarRoute { + option (cosmos_proto.implements_interface) = "TunnelRoute"; + + string destination_chain_id = 1; + string destination_contract_address = 2; +} + +message SignalInfo { + option (gogoproto.equal) = true; + + string signal_id = 1; + uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; + uint64 interval = 3; +} + +message SignalPriceInfo { + option (gogoproto.equal) = true; + + string signal_id = 1; + uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; + uint64 interval = 3; + uint64 price = 4; + google.protobuf.Timestamp LastTimestamp = 5 [(gogoproto.stdtime) = true]; +} + +message Tunnel { + option (gogoproto.equal) = true; + + uint64 id = 1; + google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "TunnelRoute"]; + feeds.v1beta1.FeedType feed_type = 3; + string fee_payer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated SignalPriceInfo signal_price_infos = 5; + uint64 last_triggered_block_height = 6; + bool is_active = 7; + google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true]; + string creator = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} diff --git a/x/tunnel/README.md b/x/tunnel/README.md new file mode 100644 index 000000000..9f42845d7 --- /dev/null +++ b/x/tunnel/README.md @@ -0,0 +1,19 @@ +--- +sidebar_position: 1 +--- + +# `x/tunnel` + +## Abstract + +## Contents + +## State + +## Begin-Block + +## End-Block + +## Events + +## Msg diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go new file mode 100644 index 000000000..06ae43858 --- /dev/null +++ b/x/tunnel/abci.go @@ -0,0 +1,13 @@ +package tunnel + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" +) + +func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { +} + +func EndBlocker(ctx sdk.Context, k keeper.Keeper) { +} diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go new file mode 100644 index 000000000..1a9734936 --- /dev/null +++ b/x/tunnel/client/cli/query.go @@ -0,0 +1,53 @@ +package cli + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// GetQueryCmd returns the cli query commands for this module +func GetQueryCmd() *cobra.Command { + queryCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Querying commands for the tunnel module", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + queryCmd.AddCommand( + GetQueryCmdParams(), + ) + + return queryCmd +} + +// GetQueryCmdParams implements the query params command. +func GetQueryCmdParams() *cobra.Command { + cmd := &cobra.Command{ + Use: "params", + Short: "Shows the parameters of the module", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go new file mode 100644 index 000000000..b064ecdd7 --- /dev/null +++ b/x/tunnel/client/cli/tx.go @@ -0,0 +1,26 @@ +package cli + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/spf13/cobra" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// default values +var () + +// GetTxCmd returns a root CLI command handler for all x/tunnel transaction commands. +func GetTxCmd() *cobra.Command { + txCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "tunnel transaction subcommands", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + txCmd.AddCommand() + + return txCmd +} diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go new file mode 100644 index 000000000..d161870a9 --- /dev/null +++ b/x/tunnel/genesis.go @@ -0,0 +1,10 @@ +package tunnel + +import ( + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// ValidateGenesis validates the provided genesis state. +func ValidateGenesis(data *types.GenesisState) error { + return nil +} diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go new file mode 100644 index 000000000..d4b9e526f --- /dev/null +++ b/x/tunnel/keeper/genesis.go @@ -0,0 +1,16 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// InitGenesis initializes the module's state from a provided genesis state. +func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) { +} + +// ExportGenesis returns the module's exported genesis +func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + return &types.GenesisState{} +} diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go new file mode 100644 index 000000000..919f4ad1e --- /dev/null +++ b/x/tunnel/keeper/grpc_query.go @@ -0,0 +1,30 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +var _ types.QueryServer = queryServer{} + +type queryServer struct { + keeper Keeper +} + +func NewQueryServer(k Keeper) types.QueryServer { + return queryServer{ + keeper: k, + } +} + +// Params queries all params of the module. +func (q queryServer) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + return &types.QueryParamsResponse{ + Params: q.keeper.GetParams(ctx), + }, nil +} diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go new file mode 100644 index 000000000..9e6297117 --- /dev/null +++ b/x/tunnel/keeper/keeper.go @@ -0,0 +1,41 @@ +package keeper + +import ( + "github.com/cometbft/cometbft/libs/log" + + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// Keeper of the x/tunnel store +type Keeper struct { + storeKey storetypes.StoreKey + cdc codec.BinaryCodec + authority string +} + +// NewKeeper creates a new tunnel Keeper instance +func NewKeeper( + cdc codec.BinaryCodec, + key storetypes.StoreKey, + authority string, +) *Keeper { + // ensure that authority is a valid AccAddress + if _, err := sdk.AccAddressFromBech32(authority); err != nil { + panic("authority is not a valid acc address") + } + + return &Keeper{ + storeKey: key, + cdc: cdc, + authority: authority, + } +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", "x/"+types.ModuleName) +} diff --git a/x/tunnel/keeper/keeper_params.go b/x/tunnel/keeper/keeper_params.go new file mode 100644 index 000000000..b57156f20 --- /dev/null +++ b/x/tunnel/keeper/keeper_params.go @@ -0,0 +1,28 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// SetParams sets the x/tunnel module parameters. +func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error { + if err := p.Validate(); err != nil { + return err + } + + ctx.KVStore(k.storeKey).Set(types.ParamsKey, k.cdc.MustMarshal(&p)) + return nil +} + +// GetParams returns the current x/tunnel module parameters. +func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) { + bz := ctx.KVStore(k.storeKey).Get(types.ParamsKey) + if bz == nil { + return p + } + + k.cdc.MustUnmarshal(bz, &p) + return p +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go new file mode 100644 index 000000000..8c5eedc2f --- /dev/null +++ b/x/tunnel/keeper/msg_server.go @@ -0,0 +1,56 @@ +package keeper + +import ( + "context" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" + sdk "github.com/cosmos/cosmos-sdk/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" +) + +var _ types.MsgServer = msgServer{} + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the x/tunnel MsgServer interface. +func NewMsgServerImpl(k Keeper) types.MsgServer { + return &msgServer{ + Keeper: k, + } +} + +func (ms msgServer) CreateTunnel( + _ context.Context, + req *types.MsgCreateTunnel, +) (*types.MsgCreateTunnelResponse, error) { + return nil, nil +} + +// UpdateParams updates the module params. +func (ms msgServer) UpdateParams( + goCtx context.Context, + req *types.MsgUpdateParams, +) (*types.MsgUpdateParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if ms.authority != req.Authority { + return nil, govtypes.ErrInvalidSigner.Wrapf( + "invalid authority; expected %s, got %s", + ms.authority, + req.Authority, + ) + } + + if err := ms.SetParams(ctx, req.Params); err != nil { + return nil, err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeUpdateParams, + sdk.NewAttribute(types.AttributeKeyParams, req.Params.String()), + )) + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/tunnel/module.go b/x/tunnel/module.go new file mode 100644 index 000000000..5f0c78fc2 --- /dev/null +++ b/x/tunnel/module.go @@ -0,0 +1,156 @@ +package tunnel + +import ( + "context" + "encoding/json" + "fmt" + + "cosmossdk.io/core/appmodule" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + + "github.com/bandprotocol/chain/v2/x/tunnel/client/cli" + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +const ( + consensusVersion uint64 = 1 +) + +var ( + _ module.BeginBlockAppModule = AppModule{} + _ module.EndBlockAppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} +) + +// AppModuleBasic defines the basic application module used by the tunnel module. +type AppModuleBasic struct { + cdc codec.Codec +} + +var _ module.AppModuleBasic = AppModuleBasic{} + +// Name returns the tunnel module's name. +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +// RegisterLegacyAminoCodec registers the tunnel module's types on the given LegacyAmino codec. +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +// RegisterInterfaces registers the module's interface types +func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + +// DefaultGenesis returns default genesis state as raw bytes for the tunnel module. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesisState()) +} + +// ValidateGenesis performs genesis state validation for the tunnel module. +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { + var data types.GenesisState + if err := cdc.UnmarshalJSON(bz, &data); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + + return ValidateGenesis(&data) +} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the tunnel module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwruntime.ServeMux) { + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } +} + +// GetTxCmd returns the root tx command for the tunnel module. +func (AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.GetTxCmd() +} + +// GetQueryCmd returns no root query command for the tunnel module. +func (AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.GetQueryCmd() +} + +// AppModule implements an application module for the tunnel module. +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper +} + +// NewAppModule creates a new AppModule object +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, +) AppModule { + return AppModule{ + AppModuleBasic: AppModuleBasic{cdc: cdc}, + keeper: keeper, + } +} + +var _ appmodule.AppModule = AppModule{} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// Name returns the tunnel module's name. +func (AppModule) Name() string { + return types.ModuleName +} + +// RegisterInvariants registers the tunnel module invariants. +func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { +} + +// RegisterServices registers module services. +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) +} + +// InitGenesis performs genesis initialization for the tunnel module. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { + var genesisState types.GenesisState + cdc.MustUnmarshalJSON(data, &genesisState) + am.keeper.InitGenesis(ctx, &genesisState) + + return []abci.ValidatorUpdate{} +} + +// ExportGenesis returns the exported genesis state as raw bytes for the tunnel +// module. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(am.keeper.ExportGenesis(ctx)) +} + +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return consensusVersion } + +// BeginBlock returns the begin blocker for the tunnel module. +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { + BeginBlocker(ctx, am.keeper) +} + +// EndBlock returns the end blocker for the tunnel module. It returns no validator +// updates. +func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { + EndBlocker(ctx, am.keeper) + return []abci.ValidatorUpdate{} +} diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go new file mode 100644 index 000000000..5d731408a --- /dev/null +++ b/x/tunnel/types/codec.go @@ -0,0 +1,37 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +// RegisterLegacyAminoCodec registers the necessary x/tunnel interfaces and concrete types +// on the provided LegacyAmino codec. These types are used for Amino JSON serialization. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "tunnel/MsgUpdateParams") +} + +// RegisterInterfaces registers the x/tunnel interfaces types with the interface registry +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgUpdateParams{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} + +var ( + amino = codec.NewLegacyAmino() + ModuleCdc = codec.NewAminoCodec(amino) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + sdk.RegisterLegacyAminoCodec(amino) +} diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go new file mode 100644 index 000000000..e525420a5 --- /dev/null +++ b/x/tunnel/types/errors.go @@ -0,0 +1,10 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" +) + +// x/tunnel module sentinel errors +var ( + ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 2, "max tunnel channels") +) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go new file mode 100644 index 000000000..f7205baf3 --- /dev/null +++ b/x/tunnel/types/events.go @@ -0,0 +1,8 @@ +package types + +// events +const ( + EventTypeUpdateParams = "update_params" + + AttributeKeyParams = "params" +) diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go new file mode 100644 index 000000000..54406b922 --- /dev/null +++ b/x/tunnel/types/expected_keepers.go @@ -0,0 +1,18 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// AccountKeeper defines the expected account keeper (noalias) +type AccountKeeper interface { + IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool)) + GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation + + GetModuleAddress(name string) sdk.AccAddress + GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI + + // TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 + SetModuleAccount(sdk.Context, authtypes.ModuleAccountI) +} diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go new file mode 100644 index 000000000..5fab334ec --- /dev/null +++ b/x/tunnel/types/genesis.go @@ -0,0 +1,11 @@ +package types + +// NewGenesisState creates a new GenesisState instanc e +func NewGenesisState() *GenesisState { + return &GenesisState{} +} + +// DefaultGenesisState gets the raw genesis raw message for testing +func DefaultGenesisState() *GenesisState { + return &GenesisState{} +} diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go new file mode 100644 index 000000000..9d73a2d61 --- /dev/null +++ b/x/tunnel/types/genesis.pb.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tunnel/v1beta1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "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 + +// GenesisState represents the initial state of the blockchain. +type GenesisState struct { + // Params is all parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_cb87d9373a74da2e, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "tunnel.v1beta1.GenesisState") +} + +func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } + +var fileDescriptor_cb87d9373a74da2e = []byte{ + // 201 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x29, 0xcd, 0xcb, + 0x4b, 0xcd, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xea, 0x41, 0x65, 0xa5, + 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x94, 0x34, 0x9a, 0x19, + 0x05, 0x89, 0x45, 0x89, 0xb9, 0x50, 0x23, 0x94, 0x5c, 0xb8, 0x78, 0xdc, 0x21, 0x66, 0x06, 0x97, + 0x24, 0x96, 0xa4, 0x0a, 0x99, 0x70, 0xb1, 0x41, 0xe4, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, + 0xc4, 0xf4, 0x50, 0xed, 0xd0, 0x0b, 0x00, 0xcb, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, + 0x55, 0xeb, 0xe4, 0x79, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, + 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xfa, 0xe9, + 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x49, 0x89, 0x79, 0x29, 0x60, 0x5b, + 0x93, 0xf3, 0x73, 0xf4, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0xcb, 0x8c, 0xf4, 0x2b, 0xf4, 0xa1, + 0xee, 0x2b, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xab, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, + 0xff, 0x95, 0xee, 0xcc, 0x14, 0xfa, 0x00, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go new file mode 100644 index 000000000..2d065540e --- /dev/null +++ b/x/tunnel/types/keys.go @@ -0,0 +1,27 @@ +package types + +const ( + // ModuleName defines the module name + ModuleName = "tunnel" + + // Version defines the current version the IBC module supports + Version = "bandchain-1" + + // StoreKey defines the primary module store key + StoreKey = ModuleName + + // RouterKey defines the module's message routing key + RouterKey = ModuleName + + // QuerierRoute is the querier route for the tunnel module + QuerierRoute = ModuleName + + // PortID is the default port id that oracle module binds to. + PortID = ModuleName +) + +var ( + GlobalStoreKeyPrefix = []byte{0x00} + + ParamsKey = []byte{0x10} +) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go new file mode 100644 index 000000000..e0c6e54e0 --- /dev/null +++ b/x/tunnel/types/msgs.go @@ -0,0 +1,48 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var _ sdk.Msg = &MsgUpdateParams{} + +// NewMsgUpdateParams creates a new MsgUpdateParams instance. +func NewMsgUpdateParams( + authority string, + params Params, +) *MsgUpdateParams { + return &MsgUpdateParams{ + Authority: authority, + Params: params, + } +} + +// Route Implements Msg. +func (m MsgUpdateParams) Route() string { return sdk.MsgTypeURL(&m) } + +// Type Implements Msg. +func (m MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Authority)} +} + +// ValidateBasic does a check on the provided data. +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return errorsmod.Wrap(err, "invalid authority address") + } + + if err := m.Params.Validate(); err != nil { + return err + } + + return nil +} diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go new file mode 100644 index 000000000..f4b9ae24d --- /dev/null +++ b/x/tunnel/types/params.go @@ -0,0 +1,26 @@ +package types + +import ( + "gopkg.in/yaml.v2" +) + +// NewParams creates a new Params instance +func NewParams() Params { + return Params{} +} + +// DefaultParams returns a default set of parameters +func DefaultParams() Params { + return NewParams() +} + +// Validate validates the set of params +func (p Params) Validate() error { + return nil +} + +// String implements the Stringer interface. +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go new file mode 100644 index 000000000..2e69fa814 --- /dev/null +++ b/x/tunnel/types/params.pb.go @@ -0,0 +1,679 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tunnel/v1beta1/params.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "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 + +// Params is the data structure that keeps the parameters of the module. +type Params struct { + MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` + MinDeviationBPS uint64 `protobuf:"varint,2,opt,name=min_diviation_bps,json=minDiviationBps,proto3" json:"min_diviation_bps,omitempty"` + TSSRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tss_route_fee,json=tssRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tss_route_fee"` + AxelarRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=axelar_route_fee,json=axelarRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"axelar_route_fee"` + TssSupportedChains []string `protobuf:"bytes,5,rep,name=tss_supported_chains,json=tssSupportedChains,proto3" json:"tss_supported_chains,omitempty"` + AxelarSupportedChains []string `protobuf:"bytes,6,rep,name=axelar_supported_chains,json=axelarSupportedChains,proto3" json:"axelar_supported_chains,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_a7b5eedd244355eb, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetMinDeposit() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.MinDeposit + } + return nil +} + +func (m *Params) GetMinDeviationBPS() uint64 { + if m != nil { + return m.MinDeviationBPS + } + return 0 +} + +func (m *Params) GetTSSRouteFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TSSRouteFee + } + return nil +} + +func (m *Params) GetAxelarRouteFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.AxelarRouteFee + } + return nil +} + +func (m *Params) GetTssSupportedChains() []string { + if m != nil { + return m.TssSupportedChains + } + return nil +} + +func (m *Params) GetAxelarSupportedChains() []string { + if m != nil { + return m.AxelarSupportedChains + } + return nil +} + +func init() { + proto.RegisterType((*Params)(nil), "tunnel.v1beta1.Params") +} + +func init() { proto.RegisterFile("tunnel/v1beta1/params.proto", fileDescriptor_a7b5eedd244355eb) } + +var fileDescriptor_a7b5eedd244355eb = []byte{ + // 423 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xc1, 0x6b, 0xd4, 0x40, + 0x14, 0xc6, 0x13, 0x77, 0x5d, 0x74, 0x16, 0x5b, 0x8d, 0x15, 0xd3, 0x0a, 0xc9, 0xe2, 0x29, 0x17, + 0x33, 0x6d, 0x05, 0x0f, 0x5e, 0x0a, 0xa9,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, 0x6f, 0xbd, 0x54, 0x31, 0xd3, 0x8a, 0xa7, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x31, + 0xf8, 0x99, 0x45, 0xf6, 0x02, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.MinDeposit) != len(that1.MinDeposit) { + return false + } + for i := range this.MinDeposit { + if !this.MinDeposit[i].Equal(&that1.MinDeposit[i]) { + return false + } + } + if this.MinDeviationBPS != that1.MinDeviationBPS { + return false + } + if len(this.TSSRouteFee) != len(that1.TSSRouteFee) { + return false + } + for i := range this.TSSRouteFee { + if !this.TSSRouteFee[i].Equal(&that1.TSSRouteFee[i]) { + return false + } + } + if len(this.AxelarRouteFee) != len(that1.AxelarRouteFee) { + return false + } + for i := range this.AxelarRouteFee { + if !this.AxelarRouteFee[i].Equal(&that1.AxelarRouteFee[i]) { + return false + } + } + if len(this.TssSupportedChains) != len(that1.TssSupportedChains) { + return false + } + for i := range this.TssSupportedChains { + if this.TssSupportedChains[i] != that1.TssSupportedChains[i] { + return false + } + } + if len(this.AxelarSupportedChains) != len(that1.AxelarSupportedChains) { + return false + } + for i := range this.AxelarSupportedChains { + if this.AxelarSupportedChains[i] != that1.AxelarSupportedChains[i] { + return false + } + } + return true +} +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AxelarSupportedChains) > 0 { + for iNdEx := len(m.AxelarSupportedChains) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AxelarSupportedChains[iNdEx]) + copy(dAtA[i:], m.AxelarSupportedChains[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.AxelarSupportedChains[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.TssSupportedChains) > 0 { + for iNdEx := len(m.TssSupportedChains) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TssSupportedChains[iNdEx]) + copy(dAtA[i:], m.TssSupportedChains[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.TssSupportedChains[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.AxelarRouteFee) > 0 { + for iNdEx := len(m.AxelarRouteFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AxelarRouteFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.TSSRouteFee) > 0 { + for iNdEx := len(m.TSSRouteFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TSSRouteFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.MinDeviationBPS != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MinDeviationBPS)) + i-- + dAtA[i] = 0x10 + } + if len(m.MinDeposit) > 0 { + for iNdEx := len(m.MinDeposit) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MinDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MinDeposit) > 0 { + for _, e := range m.MinDeposit { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } + if m.MinDeviationBPS != 0 { + n += 1 + sovParams(uint64(m.MinDeviationBPS)) + } + if len(m.TSSRouteFee) > 0 { + for _, e := range m.TSSRouteFee { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } + if len(m.AxelarRouteFee) > 0 { + for _, e := range m.AxelarRouteFee { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } + if len(m.TssSupportedChains) > 0 { + for _, s := range m.TssSupportedChains { + l = len(s) + n += 1 + l + sovParams(uint64(l)) + } + } + if len(m.AxelarSupportedChains) > 0 { + for _, s := range m.AxelarSupportedChains { + l = len(s) + n += 1 + l + sovParams(uint64(l)) + } + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MinDeposit = append(m.MinDeposit, types.Coin{}) + if err := m.MinDeposit[len(m.MinDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDeviationBPS", wireType) + } + m.MinDeviationBPS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinDeviationBPS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TSSRouteFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TSSRouteFee = append(m.TSSRouteFee, types.Coin{}) + if err := m.TSSRouteFee[len(m.TSSRouteFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AxelarRouteFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AxelarRouteFee = append(m.AxelarRouteFee, types.Coin{}) + if err := m.AxelarRouteFee[len(m.AxelarRouteFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TssSupportedChains", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TssSupportedChains = append(m.TssSupportedChains, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AxelarSupportedChains", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AxelarSupportedChains = append(m.AxelarSupportedChains, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go new file mode 100644 index 000000000..98483679f --- /dev/null +++ b/x/tunnel/types/query.pb.go @@ -0,0 +1,535 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tunnel/v1beta1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // Params is the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "tunnel.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "tunnel.v1beta1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } + +var fileDescriptor_220124e1821d297e = []byte{ + // 278 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x29, 0xcd, 0xc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, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, + 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xfd, 0xf4, 0xcc, 0x92, + 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xa4, 0xc4, 0xbc, 0x14, 0x70, 0x70, 0x24, 0xe7, + 0xe7, 0xe8, 0x27, 0x67, 0x24, 0x66, 0xe6, 0xe9, 0x97, 0x19, 0xe9, 0x57, 0xc0, 0xcc, 0x2c, 0xa9, + 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xab, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x13, 0x1d, + 0xb4, 0x7b, 0xaf, 0x01, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Params is a RPC method that returns all parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params is a RPC method that returns all parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tunnel.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tunnel/v1beta1/query.proto", +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + } + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) 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 ErrIntOverflowQuery + } + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tunnel/types/query.pb.gw.go b/x/tunnel/types/query.pb.gw.go new file mode 100644 index 000000000..ef8972096 --- /dev/null +++ b/x/tunnel/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: tunnel/v1beta1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go new file mode 100644 index 000000000..176eeb2cf --- /dev/null +++ b/x/tunnel/types/tx.pb.go @@ -0,0 +1,1160 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tunnel/v1beta1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + types1 "github.com/bandprotocol/chain/v2/x/feeds/types" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types2 "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" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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 + +// MsgCreateTunnel is the transaction message to create a new tunnel. +type MsgCreateTunnel struct { + SignalInfos []SignalInfo `protobuf:"bytes,1,rep,name=SignalInfos,proto3" json:"SignalInfos"` + Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` + FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` +} + +func (m *MsgCreateTunnel) Reset() { *m = MsgCreateTunnel{} } +func (m *MsgCreateTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgCreateTunnel) ProtoMessage() {} +func (*MsgCreateTunnel) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{0} +} +func (m *MsgCreateTunnel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateTunnel.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 *MsgCreateTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateTunnel.Merge(m, src) +} +func (m *MsgCreateTunnel) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateTunnel.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateTunnel proto.InternalMessageInfo + +func (m *MsgCreateTunnel) GetSignalInfos() []SignalInfo { + if m != nil { + return m.SignalInfos + } + return nil +} + +func (m *MsgCreateTunnel) GetRoute() *types.Any { + if m != nil { + return m.Route + } + return nil +} + +func (m *MsgCreateTunnel) GetFeedType() types1.FeedType { + if m != nil { + return m.FeedType + } + return types1.FEED_TYPE_UNSPECIFIED +} + +func (m *MsgCreateTunnel) GetDeposit() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Deposit + } + return nil +} + +// MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. +type MsgCreateTunnelResponse struct { + TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` +} + +func (m *MsgCreateTunnelResponse) Reset() { *m = MsgCreateTunnelResponse{} } +func (m *MsgCreateTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateTunnelResponse) ProtoMessage() {} +func (*MsgCreateTunnelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{1} +} +func (m *MsgCreateTunnelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateTunnelResponse.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 *MsgCreateTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateTunnelResponse.Merge(m, src) +} +func (m *MsgCreateTunnelResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateTunnelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateTunnelResponse proto.InternalMessageInfo + +func (m *MsgCreateTunnelResponse) GetTunnelId() string { + if m != nil { + return m.TunnelId + } + return "" +} + +// MsgUpdateParams is the transaction message to update parameters. +type MsgUpdateParams struct { + // Authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Params is the x/tunnel parameters to update. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{2} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.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 *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse is the response type for the Msg/UpdateParams RPC method. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{3} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.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 *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgCreateTunnel)(nil), "tunnel.v1beta1.MsgCreateTunnel") + proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } + +var fileDescriptor_747f2bf21e50fad9 = []byte{ + // 583 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x3f, 0x6b, 0x1b, 0x3f, + 0x18, 0xf6, 0xc5, 0xf9, 0xe5, 0x17, 0xcb, 0x21, 0xa1, 0x87, 0x89, 0xcf, 0x0e, 0x9c, 0x8d, 0x97, + 0xba, 0x01, 0x9f, 0x6a, 0x37, 0x64, 0x68, 0xa7, 0x5c, 0xa0, 0xe0, 0x21, 0x50, 0x2e, 0x29, 0x84, + 0x2e, 0x46, 0xe7, 0x93, 0xcf, 0xa2, 0xb6, 0x74, 0x9c, 0x64, 0x13, 0xaf, 0x1d, 0x3b, 0xf5, 0x73, + 0x64, 0x69, 0x86, 0x2c, 0xfd, 0x06, 0xa1, 0x53, 0xe8, 0xd4, 0xa9, 0x2d, 0xf6, 0x90, 0xaf, 0x51, + 0x4e, 0x92, 0xff, 0x1d, 0x86, 0x2e, 0x77, 0x92, 0x9e, 0xe7, 0x7d, 0xf5, 0xbc, 0x8f, 0x1e, 0x50, + 0x14, 0x23, 0x4a, 0xf1, 0x00, 0x8e, 0x9b, 0x3e, 0x16, 0xa8, 0x09, 0xc5, 0x8d, 0x13, 0xc5, 0x4c, + 0x30, 0x73, 0x5f, 0x01, 0x8e, 0x06, 0xca, 0xa5, 0x90, 0xb1, 0x70, 0x80, 0xa1, 0x44, 0xfd, 0x51, + 0x0f, 0x22, 0x3a, 0x51, 0xd4, 0x72, 0x21, 0x64, 0x21, 0x93, 0x4b, 0x98, 0xac, 0xf4, 0xe9, 0x51, + 0xaa, 0x73, 0x84, 0x62, 0x34, 0xe4, 0x1a, 0x2c, 0x75, 0x19, 0x1f, 0x32, 0xde, 0x51, 0x55, 0x6a, + 0xa3, 0x21, 0x5b, 0xed, 0xa0, 0x8f, 0x38, 0x5e, 0x14, 0x77, 0x19, 0xa1, 0x1a, 0x2f, 0x6a, 0x7c, + 0xc8, 0x43, 0x38, 0x6e, 0x26, 0x3f, 0x0d, 0x3c, 0x43, 0x43, 0x42, 0x19, 0x94, 0x5f, 0x7d, 0x54, + 0x4e, 0x4f, 0x37, 0x89, 0xf0, 0x42, 0x42, 0x0f, 0xe3, 0x80, 0x2f, 0x20, 0xb9, 0x53, 0x50, 0xed, + 0xeb, 0x16, 0x38, 0xb8, 0xe0, 0xe1, 0x79, 0x8c, 0x91, 0xc0, 0x57, 0xb2, 0x85, 0xe9, 0x82, 0xfc, + 0x25, 0x09, 0x29, 0x1a, 0xb4, 0x69, 0x8f, 0x71, 0xcb, 0xa8, 0x66, 0xeb, 0xf9, 0x56, 0xd9, 0x59, + 0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0xbe, 0x51, 0xd0, 0xba, 0xcf, 0x82, 0x20, 0xc6, 0x9c, + 0x5f, 0x8a, 0x98, 0xd0, 0xd0, 0x5b, 0x52, 0xcd, 0x13, 0xb0, 0xa3, 0x32, 0xa6, 0xed, 0x3d, 0x4c, + 0x3f, 0x8e, 0xea, 0xaf, 0x1f, 0x46, 0x73, 0x5f, 0xbf, 0xf8, 0xf4, 0x74, 0x77, 0xbc, 0xec, 0xf2, + 0xf9, 0xe9, 0xee, 0xf8, 0x50, 0xa7, 0x26, 0x25, 0xac, 0x56, 0x92, 0x43, 0xae, 0x1e, 0xcd, 0x87, + 0x6c, 0x7d, 0x33, 0x40, 0xf6, 0x82, 0x87, 0xe6, 0x35, 0xd8, 0x5b, 0x4b, 0x4d, 0x25, 0xad, 0x21, + 0xe5, 0x52, 0xf9, 0xf9, 0x3f, 0x08, 0x0b, 0x1b, 0xaf, 0xc1, 0xde, 0x9a, 0x4b, 0x9b, 0x3a, 0xaf, + 0x12, 0x36, 0x76, 0xde, 0xa4, 0xdd, 0x6d, 0x3f, 0x4c, 0x6d, 0xe3, 0x71, 0x6a, 0x1b, 0x7f, 0xa6, + 0xb6, 0xf1, 0x65, 0x66, 0x67, 0x1e, 0x67, 0x76, 0xe6, 0xe7, 0xcc, 0xce, 0x7c, 0x80, 0x2b, 0x41, + 0xf0, 0x11, 0x0d, 0x64, 0x4e, 0xbb, 0x6c, 0x00, 0xbb, 0x7d, 0x44, 0x28, 0x1c, 0xb7, 0xe0, 0x0d, + 0xd4, 0x5e, 0xc9, 0x54, 0xf8, 0x3b, 0x92, 0xf1, 0xea, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb2, + 0x3c, 0xf9, 0x20, 0x56, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // CreateTunnel is a RPC method to create a new tunnel. + CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) + // UpdateParams is a RPC method to update parameters + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) { + out := new(MsgCreateTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/CreateTunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // CreateTunnel is a RPC method to create a new tunnel. + CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) + // UpdateParams is a RPC method to update parameters + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateTunnel(ctx context.Context, req *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTunnel not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Msg/CreateTunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateTunnel(ctx, req.(*MsgCreateTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "tunnel.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateTunnel", + Handler: _Msg_CreateTunnel_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tunnel/v1beta1/tx.proto", +} + +func (m *MsgCreateTunnel) 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 *MsgCreateTunnel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Deposit) > 0 { + for iNdEx := len(m.Deposit) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.FeedType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.FeedType)) + i-- + dAtA[i] = 0x18 + } + if m.Route != nil { + { + size, err := m.Route.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.SignalInfos) > 0 { + for iNdEx := len(m.SignalInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignalInfos[iNdEx].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 *MsgCreateTunnelResponse) 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 *MsgCreateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TunnelId) > 0 { + i -= len(m.TunnelId) + copy(dAtA[i:], m.TunnelId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TunnelId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 *MsgCreateTunnel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SignalInfos) > 0 { + for _, e := range m.SignalInfos { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if m.Route != nil { + l = m.Route.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.FeedType != 0 { + n += 1 + sovTx(uint64(m.FeedType)) + } + if len(m.Deposit) > 0 { + for _, e := range m.Deposit { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgCreateTunnelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TunnelId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = 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 *MsgCreateTunnel) 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: MsgCreateTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalInfos", 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 + } + m.SignalInfos = append(m.SignalInfos, SignalInfo{}) + if err := m.SignalInfos[len(m.SignalInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Route", 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.Route == nil { + m.Route = &types.Any{} + } + if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + } + m.FeedType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeedType |= types1.FeedType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", 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 + } + m.Deposit = append(m.Deposit, types2.Coin{}) + if err := m.Deposit[len(m.Deposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *MsgCreateTunnelResponse) 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: MsgCreateTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", 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.TunnelId = 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 *MsgUpdateParams) 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *MsgUpdateParamsResponse) 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func 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") +) diff --git a/x/tunnel/types/types.pb.go b/x/tunnel/types/types.pb.go new file mode 100644 index 000000000..ea8402db9 --- /dev/null +++ b/x/tunnel/types/types.pb.go @@ -0,0 +1,1927 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tunnel/v1beta1/types.proto + +package types + +import ( + fmt "fmt" + types1 "github.com/bandprotocol/chain/v2/x/feeds/types" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 TSSRoute struct { + DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (m *TSSRoute) Reset() { *m = TSSRoute{} } +func (m *TSSRoute) String() string { return proto.CompactTextString(m) } +func (*TSSRoute) ProtoMessage() {} +func (*TSSRoute) Descriptor() ([]byte, []int) { + return fileDescriptor_874964ec163fad19, []int{0} +} +func (m *TSSRoute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TSSRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TSSRoute.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 *TSSRoute) XXX_Merge(src proto.Message) { + xxx_messageInfo_TSSRoute.Merge(m, src) +} +func (m *TSSRoute) XXX_Size() int { + return m.Size() +} +func (m *TSSRoute) XXX_DiscardUnknown() { + xxx_messageInfo_TSSRoute.DiscardUnknown(m) +} + +var xxx_messageInfo_TSSRoute proto.InternalMessageInfo + +func (m *TSSRoute) GetDestinationChainId() string { + if m != nil { + return m.DestinationChainId + } + return "" +} + +func (m *TSSRoute) GetDestinationContractAddress() string { + if m != nil { + return m.DestinationContractAddress + } + return "" +} + +type AxelarRoute struct { + DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (m *AxelarRoute) Reset() { *m = AxelarRoute{} } +func (m *AxelarRoute) String() string { return proto.CompactTextString(m) } +func (*AxelarRoute) ProtoMessage() {} +func (*AxelarRoute) Descriptor() ([]byte, []int) { + return fileDescriptor_874964ec163fad19, []int{1} +} +func (m *AxelarRoute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AxelarRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AxelarRoute.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 *AxelarRoute) XXX_Merge(src proto.Message) { + xxx_messageInfo_AxelarRoute.Merge(m, src) +} +func (m *AxelarRoute) XXX_Size() int { + return m.Size() +} +func (m *AxelarRoute) XXX_DiscardUnknown() { + xxx_messageInfo_AxelarRoute.DiscardUnknown(m) +} + +var xxx_messageInfo_AxelarRoute proto.InternalMessageInfo + +func (m *AxelarRoute) GetDestinationChainId() string { + if m != nil { + return m.DestinationChainId + } + return "" +} + +func (m *AxelarRoute) GetDestinationContractAddress() string { + if m != nil { + return m.DestinationContractAddress + } + return "" +} + +type SignalInfo struct { + SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` + Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` +} + +func (m *SignalInfo) Reset() { *m = SignalInfo{} } +func (m *SignalInfo) String() string { return proto.CompactTextString(m) } +func (*SignalInfo) ProtoMessage() {} +func (*SignalInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_874964ec163fad19, []int{2} +} +func (m *SignalInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignalInfo.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 *SignalInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalInfo.Merge(m, src) +} +func (m *SignalInfo) XXX_Size() int { + return m.Size() +} +func (m *SignalInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SignalInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalInfo proto.InternalMessageInfo + +func (m *SignalInfo) GetSignalId() string { + if m != nil { + return m.SignalId + } + return "" +} + +func (m *SignalInfo) GetDeviationBPS() uint64 { + if m != nil { + return m.DeviationBPS + } + return 0 +} + +func (m *SignalInfo) GetInterval() uint64 { + if m != nil { + return m.Interval + } + return 0 +} + +type SignalPriceInfo struct { + SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` + Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` + Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` + LastTimestamp *time.Time `protobuf:"bytes,5,opt,name=LastTimestamp,proto3,stdtime" json:"LastTimestamp,omitempty"` +} + +func (m *SignalPriceInfo) Reset() { *m = SignalPriceInfo{} } +func (m *SignalPriceInfo) String() string { return proto.CompactTextString(m) } +func (*SignalPriceInfo) ProtoMessage() {} +func (*SignalPriceInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_874964ec163fad19, []int{3} +} +func (m *SignalPriceInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignalPriceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignalPriceInfo.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 *SignalPriceInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalPriceInfo.Merge(m, src) +} +func (m *SignalPriceInfo) XXX_Size() int { + return m.Size() +} +func (m *SignalPriceInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SignalPriceInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalPriceInfo proto.InternalMessageInfo + +func (m *SignalPriceInfo) GetSignalId() string { + if m != nil { + return m.SignalId + } + return "" +} + +func (m *SignalPriceInfo) GetDeviationBPS() uint64 { + if m != nil { + return m.DeviationBPS + } + return 0 +} + +func (m *SignalPriceInfo) GetInterval() uint64 { + if m != nil { + return m.Interval + } + return 0 +} + +func (m *SignalPriceInfo) GetPrice() uint64 { + if m != nil { + return m.Price + } + return 0 +} + +func (m *SignalPriceInfo) GetLastTimestamp() *time.Time { + if m != nil { + return m.LastTimestamp + } + return nil +} + +type Tunnel struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` + FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + FeePayer string `protobuf:"bytes,4,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + SignalPriceInfos []*SignalPriceInfo `protobuf:"bytes,5,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos,omitempty"` + LastTriggeredBlockHeight uint64 `protobuf:"varint,6,opt,name=last_triggered_block_height,json=lastTriggeredBlockHeight,proto3" json:"last_triggered_block_height,omitempty"` + IsActive bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + CreatedAt *time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` + Creator string `protobuf:"bytes,9,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *Tunnel) Reset() { *m = Tunnel{} } +func (m *Tunnel) String() string { return proto.CompactTextString(m) } +func (*Tunnel) ProtoMessage() {} +func (*Tunnel) Descriptor() ([]byte, []int) { + return fileDescriptor_874964ec163fad19, []int{4} +} +func (m *Tunnel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tunnel.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 *Tunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tunnel.Merge(m, src) +} +func (m *Tunnel) XXX_Size() int { + return m.Size() +} +func (m *Tunnel) XXX_DiscardUnknown() { + xxx_messageInfo_Tunnel.DiscardUnknown(m) +} + +var xxx_messageInfo_Tunnel proto.InternalMessageInfo + +func (m *Tunnel) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Tunnel) GetRoute() *types.Any { + if m != nil { + return m.Route + } + return nil +} + +func (m *Tunnel) GetFeedType() types1.FeedType { + if m != nil { + return m.FeedType + } + return types1.FEED_TYPE_UNSPECIFIED +} + +func (m *Tunnel) GetFeePayer() string { + if m != nil { + return m.FeePayer + } + return "" +} + +func (m *Tunnel) GetSignalPriceInfos() []*SignalPriceInfo { + if m != nil { + return m.SignalPriceInfos + } + return nil +} + +func (m *Tunnel) GetLastTriggeredBlockHeight() uint64 { + if m != nil { + return m.LastTriggeredBlockHeight + } + return 0 +} + +func (m *Tunnel) GetIsActive() bool { + if m != nil { + return m.IsActive + } + return false +} + +func (m *Tunnel) GetCreatedAt() *time.Time { + if m != nil { + return m.CreatedAt + } + return nil +} + +func (m *Tunnel) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func init() { + proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") + proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") + proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") + proto.RegisterType((*SignalPriceInfo)(nil), "tunnel.v1beta1.SignalPriceInfo") + proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") +} + +func init() { proto.RegisterFile("tunnel/v1beta1/types.proto", fileDescriptor_874964ec163fad19) } + +var fileDescriptor_874964ec163fad19 = []byte{ + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcf, 0x6e, 0xd3, 0x30, + 0x1c, 0x9e, 0xb7, 0x76, 0x6b, 0xdd, 0xfd, 0x93, 0x55, 0x89, 0xd0, 0xa1, 0xb4, 0xda, 0xa9, 0x97, + 0x25, 0xac, 0xb0, 0xcb, 0x10, 0x82, 0x06, 0x34, 0x31, 0x89, 0x49, 0x53, 0xda, 0x13, 0x97, 0xc8, + 0x49, 0xdc, 0xd4, 0x22, 0xb5, 0xa3, 0xd8, 0xad, 0xd6, 0x2b, 0x2f, 0xc0, 0xc4, 0x13, 0x70, 0xe4, + 0x01, 0xf6, 0x10, 0x88, 0xd3, 0xc4, 0x89, 0x13, 0xa0, 0x4e, 0x48, 0x7b, 0x0c, 0x14, 0x3b, 0x29, + 0xeb, 0x38, 0xc0, 0x0d, 0x6e, 0xf9, 0xfc, 0x7d, 0x5f, 0xfc, 0xfb, 0xe7, 0x1f, 0x6c, 0xc8, 0x31, + 0x63, 0x24, 0xb6, 0x27, 0xfb, 0x3e, 0x91, 0x78, 0xdf, 0x96, 0xd3, 0x84, 0x08, 0x2b, 0x49, 0xb9, + 0xe4, 0x68, 0x53, 0x73, 0x56, 0xce, 0x35, 0xea, 0x11, 0x8f, 0xb8, 0xa2, 0xec, 0xec, 0x4b, 0xab, + 0x1a, 0xcd, 0x88, 0xf3, 0x28, 0x26, 0xb6, 0x42, 0xfe, 0x78, 0x60, 0x4b, 0x3a, 0x22, 0x42, 0xe2, + 0x51, 0x92, 0x0b, 0xee, 0xde, 0x16, 0x60, 0x36, 0x2d, 0xa8, 0x80, 0x8b, 0x11, 0x17, 0x9e, 0xfe, + 0xa9, 0x06, 0x05, 0x35, 0x20, 0x24, 0x14, 0xf3, 0xb8, 0x14, 0xd2, 0xd4, 0xee, 0x5b, 0x00, 0x2b, + 0xfd, 0x5e, 0xcf, 0xe5, 0x63, 0x49, 0xd0, 0x7d, 0x58, 0x0f, 0x89, 0x90, 0x94, 0x61, 0x49, 0x39, + 0xf3, 0x82, 0x21, 0xa6, 0xcc, 0xa3, 0xa1, 0x01, 0x5a, 0xa0, 0x5d, 0x75, 0xd1, 0x0d, 0xee, 0x59, + 0x46, 0x1d, 0x87, 0xe8, 0x29, 0xbc, 0xb7, 0xe0, 0xe0, 0x4c, 0xa6, 0x38, 0x90, 0x1e, 0x0e, 0xc3, + 0x94, 0x08, 0x61, 0x2c, 0x2b, 0x67, 0xe3, 0xa6, 0x33, 0x97, 0x74, 0xb5, 0xe2, 0x70, 0xeb, 0xd3, + 0xc5, 0x5e, 0xad, 0xaf, 0x8a, 0xa3, 0x82, 0xd8, 0x7d, 0x07, 0x60, 0xad, 0x7b, 0x46, 0x62, 0x9c, + 0xfe, 0x47, 0x41, 0xbd, 0x01, 0x10, 0xf6, 0x68, 0xc4, 0x70, 0x7c, 0xcc, 0x06, 0x1c, 0xed, 0xc0, + 0xaa, 0x50, 0xe8, 0x57, 0x20, 0x15, 0x7d, 0x70, 0x1c, 0xa2, 0x03, 0xb8, 0x11, 0x92, 0x09, 0xd5, + 0x97, 0xfb, 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32, 0x3d, 0x99, 0x52, 0x16, 0x29, 0xdb, 0x69, + 0xa6, 0x44, 0x27, 0x10, 0xe5, 0x8d, 0x51, 0x25, 0xf2, 0x28, 0x1b, 0x70, 0x61, 0x94, 0x5b, 0x2b, + 0xed, 0x5a, 0xa7, 0x69, 0x2d, 0x6e, 0x03, 0xeb, 0x56, 0x57, 0xdd, 0x6d, 0xb1, 0x78, 0x20, 0xd0, + 0x63, 0xb8, 0x13, 0x63, 0x21, 0x3d, 0x99, 0xd2, 0x28, 0x22, 0x29, 0x09, 0x3d, 0x3f, 0xe6, 0xc1, + 0x6b, 0x6f, 0x48, 0x68, 0x34, 0x94, 0xc6, 0xaa, 0xaa, 0x90, 0x91, 0x49, 0xfa, 0x85, 0xc2, 0xc9, + 0x04, 0x2f, 0x14, 0x9f, 0x8d, 0x09, 0x15, 0x1e, 0x0e, 0x24, 0x9d, 0x10, 0x63, 0xad, 0x05, 0xda, + 0x15, 0xb7, 0x42, 0x45, 0x57, 0x61, 0xf4, 0x04, 0xc2, 0x20, 0x25, 0x58, 0x92, 0xd0, 0xc3, 0xd2, + 0xa8, 0xfc, 0x65, 0xeb, 0xaa, 0xb9, 0xa7, 0x2b, 0x51, 0x07, 0xae, 0x29, 0xc0, 0x53, 0xa3, 0xfa, + 0x87, 0x02, 0x15, 0x42, 0xdd, 0x6a, 0xe7, 0xe4, 0xc3, 0xcc, 0x04, 0x1f, 0x67, 0x26, 0xb8, 0x9c, + 0x99, 0xe0, 0xfb, 0xcc, 0x04, 0xe7, 0x57, 0xe6, 0xd2, 0xe5, 0x95, 0xb9, 0xf4, 0xe5, 0xca, 0x5c, + 0x7a, 0x65, 0x47, 0x54, 0x0e, 0xc7, 0xbe, 0x15, 0xf0, 0x91, 0xed, 0x63, 0x16, 0xaa, 0x58, 0x02, + 0x1e, 0xdb, 0x6a, 0x09, 0xd8, 0x93, 0x8e, 0x7d, 0x66, 0xe7, 0x3b, 0x57, 0xed, 0x5a, 0x7f, 0x55, + 0x29, 0x1e, 0xfc, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x80, 0xa3, 0x2e, 0x66, 0x8a, 0x05, 0x00, 0x00, +} + +func (this *TSSRoute) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TSSRoute) + if !ok { + that2, ok := that.(TSSRoute) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DestinationChainId != that1.DestinationChainId { + return false + } + if this.DestinationContractAddress != that1.DestinationContractAddress { + return false + } + return true +} +func (this *AxelarRoute) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AxelarRoute) + if !ok { + that2, ok := that.(AxelarRoute) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DestinationChainId != that1.DestinationChainId { + return false + } + if this.DestinationContractAddress != that1.DestinationContractAddress { + return false + } + return true +} +func (this *SignalInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SignalInfo) + if !ok { + that2, ok := that.(SignalInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SignalId != that1.SignalId { + return false + } + if this.DeviationBPS != that1.DeviationBPS { + return false + } + if this.Interval != that1.Interval { + return false + } + return true +} +func (this *SignalPriceInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SignalPriceInfo) + if !ok { + that2, ok := that.(SignalPriceInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SignalId != that1.SignalId { + return false + } + if this.DeviationBPS != that1.DeviationBPS { + return false + } + if this.Interval != that1.Interval { + return false + } + if this.Price != that1.Price { + return false + } + if that1.LastTimestamp == nil { + if this.LastTimestamp != nil { + return false + } + } else if !this.LastTimestamp.Equal(*that1.LastTimestamp) { + return false + } + return true +} +func (this *Tunnel) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tunnel) + if !ok { + that2, ok := that.(Tunnel) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if !this.Route.Equal(that1.Route) { + return false + } + if this.FeedType != that1.FeedType { + return false + } + if this.FeePayer != that1.FeePayer { + return false + } + if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { + return false + } + for i := range this.SignalPriceInfos { + if !this.SignalPriceInfos[i].Equal(that1.SignalPriceInfos[i]) { + return false + } + } + if this.LastTriggeredBlockHeight != that1.LastTriggeredBlockHeight { + return false + } + if this.IsActive != that1.IsActive { + return false + } + if that1.CreatedAt == nil { + if this.CreatedAt != nil { + return false + } + } else if !this.CreatedAt.Equal(*that1.CreatedAt) { + return false + } + if this.Creator != that1.Creator { + return false + } + return true +} +func (m *TSSRoute) 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 *TSSRoute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TSSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DestinationContractAddress) > 0 { + i -= len(m.DestinationContractAddress) + copy(dAtA[i:], m.DestinationContractAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DestinationChainId) > 0 { + i -= len(m.DestinationChainId) + copy(dAtA[i:], m.DestinationChainId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AxelarRoute) 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 *AxelarRoute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AxelarRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DestinationContractAddress) > 0 { + i -= len(m.DestinationContractAddress) + copy(dAtA[i:], m.DestinationContractAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DestinationChainId) > 0 { + i -= len(m.DestinationChainId) + copy(dAtA[i:], m.DestinationChainId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignalInfo) 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 *SignalInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Interval != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Interval)) + i-- + dAtA[i] = 0x18 + } + if m.DeviationBPS != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.DeviationBPS)) + i-- + dAtA[i] = 0x10 + } + if len(m.SignalId) > 0 { + i -= len(m.SignalId) + copy(dAtA[i:], m.SignalId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SignalId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignalPriceInfo) 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 *SignalPriceInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignalPriceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastTimestamp != nil { + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.LastTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.LastTimestamp):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintTypes(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x2a + } + if m.Price != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Price)) + i-- + dAtA[i] = 0x20 + } + if m.Interval != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Interval)) + i-- + dAtA[i] = 0x18 + } + if m.DeviationBPS != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.DeviationBPS)) + i-- + dAtA[i] = 0x10 + } + if len(m.SignalId) > 0 { + i -= len(m.SignalId) + copy(dAtA[i:], m.SignalId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SignalId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Tunnel) 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 *Tunnel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x4a + } + if m.CreatedAt != nil { + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintTypes(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x42 + } + if m.IsActive { + i-- + if m.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.LastTriggeredBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.LastTriggeredBlockHeight)) + i-- + dAtA[i] = 0x30 + } + if len(m.SignalPriceInfos) > 0 { + for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignalPriceInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.FeePayer) > 0 { + i -= len(m.FeePayer) + copy(dAtA[i:], m.FeePayer) + i = encodeVarintTypes(dAtA, i, uint64(len(m.FeePayer))) + i-- + dAtA[i] = 0x22 + } + if m.FeedType != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.FeedType)) + i-- + dAtA[i] = 0x18 + } + if m.Route != nil { + { + size, err := m.Route.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TSSRoute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationChainId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *AxelarRoute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationChainId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *SignalInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SignalId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.DeviationBPS != 0 { + n += 1 + sovTypes(uint64(m.DeviationBPS)) + } + if m.Interval != 0 { + n += 1 + sovTypes(uint64(m.Interval)) + } + return n +} + +func (m *SignalPriceInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SignalId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.DeviationBPS != 0 { + n += 1 + sovTypes(uint64(m.DeviationBPS)) + } + if m.Interval != 0 { + n += 1 + sovTypes(uint64(m.Interval)) + } + if m.Price != 0 { + n += 1 + sovTypes(uint64(m.Price)) + } + if m.LastTimestamp != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.LastTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Tunnel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovTypes(uint64(m.Id)) + } + if m.Route != nil { + l = m.Route.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.FeedType != 0 { + n += 1 + sovTypes(uint64(m.FeedType)) + } + l = len(m.FeePayer) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.SignalPriceInfos) > 0 { + for _, e := range m.SignalPriceInfos { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.LastTriggeredBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.LastTriggeredBlockHeight)) + } + if m.IsActive { + n += 2 + } + if m.CreatedAt != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt) + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TSSRoute) 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 ErrIntOverflowTypes + } + 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: TSSRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TSSRoute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AxelarRoute) 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 ErrIntOverflowTypes + } + 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: AxelarRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AxelarRoute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignalInfo) 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 ErrIntOverflowTypes + } + 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: SignalInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignalInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignalId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviationBPS", wireType) + } + m.DeviationBPS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeviationBPS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + m.Interval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignalPriceInfo) 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 ErrIntOverflowTypes + } + 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: SignalPriceInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignalPriceInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignalId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviationBPS", wireType) + } + m.DeviationBPS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeviationBPS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + m.Interval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + m.Price = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Price |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastTimestamp == nil { + m.LastTimestamp = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.LastTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tunnel) 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 ErrIntOverflowTypes + } + 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: Tunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Route == nil { + m.Route = &types.Any{} + } + if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + } + m.FeedType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeedType |= types1.FeedType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeePayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignalPriceInfos = append(m.SignalPriceInfos, &SignalPriceInfo{}) + if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTriggeredBlockHeight", wireType) + } + m.LastTriggeredBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastTriggeredBlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsActive = bool(v != 0) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CreatedAt == nil { + m.CreatedAt = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) From d4750bdcfad5a6f1f9e3b005d8e4a64548528c1b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 27 Jun 2024 16:35:28 +0700 Subject: [PATCH 002/272] reorder --- x/tunnel/keeper/msg_server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 8c5eedc2f..dd5a478e7 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -3,9 +3,10 @@ package keeper import ( "context" - "github.com/bandprotocol/chain/v2/x/tunnel/types" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" ) var _ types.MsgServer = msgServer{} From 9ae49978ba4f0268a70240acb5f70ccdc88ac20b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 27 Jun 2024 16:36:18 +0700 Subject: [PATCH 003/272] reorder --- x/tunnel/keeper/keeper.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index 9e6297117..098ada23e 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -2,7 +2,6 @@ package keeper import ( "github.com/cometbft/cometbft/libs/log" - "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" From 3cda844cb08c31fe528220f29106bd7ce5e8af61 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 28 Jun 2024 16:35:26 +0700 Subject: [PATCH 004/272] add keeper --- app/app.go | 14 +++ app/keepers/keepers.go | 2 + proto/tunnel/v1beta1/tx.proto | 1 + x/tunnel/keeper/axelar_route.go | 21 +++++ x/tunnel/keeper/axelar_route_test.go | 15 ++++ x/tunnel/keeper/grpc_query.go | 10 +-- x/tunnel/keeper/keeper.go | 45 ++++++++-- x/tunnel/keeper/keeper_test.go | 43 +++++++++ x/tunnel/keeper/msg_server.go | 8 +- x/tunnel/keeper/tss_route.go | 21 +++++ x/tunnel/keeper/tss_route_test.go | 15 ++++ x/tunnel/keeper/tunnel.go | 1 + x/tunnel/module.go | 7 +- x/tunnel/types/codec.go | 2 + x/tunnel/types/expected_keepers.go | 18 ++++ x/tunnel/types/keys.go | 26 ++++++ x/tunnel/types/msgs.go | 39 ++++++++ x/tunnel/types/tx.pb.go | 128 +++++++++++++++++++-------- 18 files changed, 355 insertions(+), 61 deletions(-) create mode 100644 x/tunnel/keeper/axelar_route.go create mode 100644 x/tunnel/keeper/axelar_route_test.go create mode 100644 x/tunnel/keeper/keeper_test.go create mode 100644 x/tunnel/keeper/tss_route.go create mode 100644 x/tunnel/keeper/tss_route_test.go create mode 100644 x/tunnel/keeper/tunnel.go diff --git a/app/app.go b/app/app.go index 9e942eb79..8fa4f71a8 100644 --- a/app/app.go +++ b/app/app.go @@ -140,6 +140,9 @@ import ( "github.com/bandprotocol/chain/v2/x/tss" tsskeeper "github.com/bandprotocol/chain/v2/x/tss/keeper" tsstypes "github.com/bandprotocol/chain/v2/x/tss/types" + tunnel "github.com/bandprotocol/chain/v2/x/tunnel" + tunnelkeeper "github.com/bandprotocol/chain/v2/x/tunnel/keeper" + tunneltypes "github.com/bandprotocol/chain/v2/x/tunnel/types" ) const ( @@ -195,6 +198,7 @@ var ( ), feeds.AppModuleBasic{}, globalfee.AppModule{}, + tunnel.AppModuleBasic{}, ) // module account permissions maccPerms = map[string][]string{ @@ -207,6 +211,7 @@ var ( govtypes.ModuleName: {authtypes.Burner}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, bandtsstypes.ModuleName: nil, + tunneltypes.ModuleName: nil, } Upgrades = []upgrades.Upgrade{v2_6.Upgrade} @@ -312,6 +317,7 @@ func NewBandApp( bandtsstypes.StoreKey, feedstypes.StoreKey, globalfeetypes.StoreKey, + tunneltypes.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) @@ -633,6 +639,14 @@ func NewBandApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + app.TunnelKeeper = tunnelkeeper.NewKeeper( + appCodec, + keys[tunneltypes.StoreKey], + app.AccountKeeper, + app.BankKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment // we prefer to be more strict in what arguments the modules expect. diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 6553118c0..49e7aebd1 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -27,6 +27,7 @@ import ( oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" rollingseedKeeper "github.com/bandprotocol/chain/v2/x/rollingseed/keeper" tsskeeper "github.com/bandprotocol/chain/v2/x/tss/keeper" + tunnelkeeper "github.com/bandprotocol/chain/v2/x/tunnel/keeper" ) type AppKeepers struct { @@ -57,6 +58,7 @@ type AppKeepers struct { FeedsKeeper feedskeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper GlobalfeeKeeper globalfeekeeper.Keeper + TunnelKeeper tunnelkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 5d7ba179f..929a34c8a 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -30,6 +30,7 @@ message MsgCreateTunnel { feeds.v1beta1.FeedType feed_type = 3; repeated cosmos.base.v1beta1.Coin deposit = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string creator = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. diff --git a/x/tunnel/keeper/axelar_route.go b/x/tunnel/keeper/axelar_route.go new file mode 100644 index 000000000..439aa6879 --- /dev/null +++ b/x/tunnel/keeper/axelar_route.go @@ -0,0 +1,21 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func (k Keeper) SetAxelarRouteCount(ctx sdk.Context, count uint64) { + ctx.KVStore(k.storeKey).Set(types.AxelarRouteCountStoreKey, sdk.Uint64ToBigEndian(count)) +} + +func (k Keeper) GetAxelarRouteCount(ctx sdk.Context) uint64 { + return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.AxelarRouteCountStoreKey)) +} + +func (k Keeper) GetNextAxelarRouteID(ctx sdk.Context) uint64 { + routeNumber := k.GetAxelarRouteCount(ctx) + 1 + k.SetAxelarRouteCount(ctx, routeNumber) + return routeNumber +} diff --git a/x/tunnel/keeper/axelar_route_test.go b/x/tunnel/keeper/axelar_route_test.go new file mode 100644 index 000000000..751cefce4 --- /dev/null +++ b/x/tunnel/keeper/axelar_route_test.go @@ -0,0 +1,15 @@ +package keeper_test + +func (s *KeeperTestSuite) TestGetSetAxelarRouteCount() { + ctx, k := s.ctx, s.feedsKeeper + + // Set axelar route count + count := uint64(1) + k.SetAxelarRouteCount(ctx, count) + + // Get axelar route count + got := k.GetAxelarRouteCount(ctx) + + // Assert equality + s.Require().Equal(count, got) +} diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 919f4ad1e..f2f3d1265 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -10,14 +10,10 @@ import ( var _ types.QueryServer = queryServer{} -type queryServer struct { - keeper Keeper -} +type queryServer struct{ k Keeper } func NewQueryServer(k Keeper) types.QueryServer { - return queryServer{ - keeper: k, - } + return queryServer{k: k} } // Params queries all params of the module. @@ -25,6 +21,6 @@ func (q queryServer) Params(c context.Context, _ *types.QueryParamsRequest) (*ty ctx := sdk.UnwrapSDKContext(c) return &types.QueryParamsResponse{ - Params: q.keeper.GetParams(ctx), + Params: q.k.GetParams(ctx), }, nil } diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index 098ada23e..dc60dd752 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -1,18 +1,25 @@ package keeper import ( + "fmt" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) // Keeper of the x/tunnel store type Keeper struct { - storeKey storetypes.StoreKey - cdc codec.BinaryCodec + cdc codec.BinaryCodec + storeKey storetypes.StoreKey + + authKeeper types.AccountKeeper + bankKeeper types.BankKeeper + authority string } @@ -20,20 +27,44 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, + authKeeper types.AccountKeeper, + bankKeeper types.BankKeeper, authority string, -) *Keeper { +) Keeper { + // ensure tunnel module account is set + if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { + panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + } + // ensure that authority is a valid AccAddress if _, err := sdk.AccAddressFromBech32(authority); err != nil { panic("authority is not a valid acc address") } - return &Keeper{ - storeKey: key, - cdc: cdc, - authority: authority, + return Keeper{ + cdc: cdc, + storeKey: key, + authKeeper: authKeeper, + bankKeeper: bankKeeper, + authority: authority, } } +// GetTunnelAccount returns the tunnel ModuleAccount +func (k Keeper) GetTunnelAccount(ctx sdk.Context) authtypes.ModuleAccountI { + return k.authKeeper.GetModuleAccount(ctx, types.ModuleName) +} + +// GetModuleBalance returns the balance of the tunnel ModuleAccount +func (k Keeper) GetModuleBalance(ctx sdk.Context) sdk.Coins { + return k.bankKeeper.GetAllBalances(ctx, k.GetTunnelAccount(ctx).GetAddress()) +} + +// SetModuleAccount sets a module account in the account keeper. +func (k Keeper) SetModuleAccount(ctx sdk.Context, acc authtypes.ModuleAccountI) { + k.authKeeper.SetModuleAccount(ctx, acc) +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go new file mode 100644 index 000000000..d1a8de9ee --- /dev/null +++ b/x/tunnel/keeper/keeper_test.go @@ -0,0 +1,43 @@ +package keeper_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/stretchr/testify/suite" + + bandtesting "github.com/bandprotocol/chain/v2/testing" + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" + "github.com/bandprotocol/chain/v2/x/tunnel/types" + "github.com/cosmos/cosmos-sdk/baseapp" +) + +// Keeper of the x/tunnel store +type KeeperTestSuite struct { + suite.Suite + + ctx sdk.Context + feedsKeeper keeper.Keeper + queryClient types.QueryClient + msgSrvr types.MsgServer + authority sdk.AccAddress +} + +func (s *KeeperTestSuite) SetupTest() { + app, ctx := bandtesting.CreateTestApp(s.T(), true) + s.ctx = ctx + s.feedsKeeper = app.TunnelKeeper + + queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) + types.RegisterQueryServer(queryHelper, keeper.NewQueryServer(app.TunnelKeeper)) + queryClient := types.NewQueryClient(queryHelper) + s.queryClient = queryClient + s.msgSrvr = keeper.NewMsgServerImpl(app.TunnelKeeper) + s.authority = authtypes.NewModuleAddress(govtypes.ModuleName) +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index dd5a478e7..45ea21c42 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -16,17 +16,15 @@ type msgServer struct { } // NewMsgServerImpl returns an implementation of the x/tunnel MsgServer interface. -func NewMsgServerImpl(k Keeper) types.MsgServer { - return &msgServer{ - Keeper: k, - } +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} } func (ms msgServer) CreateTunnel( _ context.Context, req *types.MsgCreateTunnel, ) (*types.MsgCreateTunnelResponse, error) { - return nil, nil + return &types.MsgCreateTunnelResponse{}, nil } // UpdateParams updates the module params. diff --git a/x/tunnel/keeper/tss_route.go b/x/tunnel/keeper/tss_route.go new file mode 100644 index 000000000..ce4cb53aa --- /dev/null +++ b/x/tunnel/keeper/tss_route.go @@ -0,0 +1,21 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func (k Keeper) SetTSSRouteCount(ctx sdk.Context, count uint64) { + ctx.KVStore(k.storeKey).Set(types.TSSRouteCountStoreKey, sdk.Uint64ToBigEndian(count)) +} + +func (k Keeper) GetTSSRouteCount(ctx sdk.Context) uint64 { + return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.TSSRouteCountStoreKey)) +} + +func (k Keeper) GetNextTSSRouteID(ctx sdk.Context) uint64 { + routeNumber := k.GetTSSRouteCount(ctx) + 1 + k.SetTSSRouteCount(ctx, routeNumber) + return routeNumber +} diff --git a/x/tunnel/keeper/tss_route_test.go b/x/tunnel/keeper/tss_route_test.go new file mode 100644 index 000000000..0c1efd5e7 --- /dev/null +++ b/x/tunnel/keeper/tss_route_test.go @@ -0,0 +1,15 @@ +package keeper_test + +func (s *KeeperTestSuite) TestGetSetTSSRouteCount() { + ctx, k := s.ctx, s.feedsKeeper + + // Set tss route count + count := uint64(1) + k.SetTSSRouteCount(ctx, count) + + // Get tss route count + got := k.GetTSSRouteCount(ctx) + + // Assert equality + s.Require().Equal(count, got) +} diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go new file mode 100644 index 000000000..b55569d4a --- /dev/null +++ b/x/tunnel/keeper/tunnel.go @@ -0,0 +1 @@ +package keeper diff --git a/x/tunnel/module.go b/x/tunnel/module.go index 5f0c78fc2..4b400af93 100644 --- a/x/tunnel/module.go +++ b/x/tunnel/module.go @@ -121,7 +121,8 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + msgServer := keeper.NewMsgServerImpl(am.keeper) + types.RegisterMsgServer(cfg.MsgServer(), msgServer) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) } @@ -144,9 +145,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return consensusVersion } // BeginBlock returns the begin blocker for the tunnel module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { - BeginBlocker(ctx, am.keeper) -} +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {} // EndBlock returns the end blocker for the tunnel module. It returns no validator // updates. diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 5d731408a..0a3215b3c 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -13,6 +13,7 @@ import ( // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "tunnel/MsgUpdateParams") + legacy.RegisterAminoMsg(cdc, &MsgCreateTunnel{}, "tunnel/MsgCreateTunnel") } // RegisterInterfaces registers the x/tunnel interfaces types with the interface registry @@ -20,6 +21,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, + &MsgCreateTunnel{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 54406b922..816918af2 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -16,3 +16,21 @@ type AccountKeeper interface { // TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 SetModuleAccount(sdk.Context, authtypes.ModuleAccountI) } + +type BankKeeper interface { + GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + + SendCoinsFromModuleToAccount( + ctx sdk.Context, + senderModule string, + recipientAddr sdk.AccAddress, + amt sdk.Coins, + ) error + SendCoinsFromAccountToModule( + ctx sdk.Context, + senderAddr sdk.AccAddress, + recipientModule string, + amt sdk.Coins, + ) error + SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error +} diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 2d065540e..da4900bcd 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -1,5 +1,7 @@ package types +import sdk "github.com/cosmos/cosmos-sdk/types" + const ( // ModuleName defines the module name ModuleName = "tunnel" @@ -23,5 +25,29 @@ const ( var ( GlobalStoreKeyPrefix = []byte{0x00} + TunnelCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TunnelCount")...) + + TSSRouteCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TSSRouteCount")...) + + AxelarRouteCountStoreKey = append(GlobalStoreKeyPrefix, []byte("AxelarRouteCount")...) + + TunnelStoreKeyPrefix = []byte{0x01} + + TSSPacketStoreKeyPrefix = []byte{0x02} + + AxelarStoreKeyPrefix = []byte{0x03} + ParamsKey = []byte{0x10} ) + +func TunnelStoreKey(id uint64) []byte { + return append(TunnelStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) +} + +func TSSPacketStoreKey(id uint64) []byte { + return append(TSSPacketStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) +} + +func AxelarStoreKey(id uint64) []byte { + return append(AxelarStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) +} diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index e0c6e54e0..b514b72bb 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -2,7 +2,10 @@ package types import ( errorsmod "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) var _ sdk.Msg = &MsgUpdateParams{} @@ -46,3 +49,39 @@ func (m *MsgUpdateParams) ValidateBasic() error { return nil } + +func NewMsgCreateTunnel( + signalInfos []SignalInfo, + route *types.Any, + feedType feedstypes.FeedType, + deposit sdk.Coins, +) *MsgCreateTunnel { + return &MsgCreateTunnel{ + SignalInfos: signalInfos, + Route: route, + FeedType: feedType, + Deposit: deposit, + } +} + +// Type Implements Msg. +func (m MsgCreateTunnel) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgCreateTunnel) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgCreateTunnel) ValidateBasic() error { + // Validate signal infos + + // Validate deposit + + return nil +} diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 176eeb2cf..ad0588e12 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -41,6 +41,7 @@ type MsgCreateTunnel struct { Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` + Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *MsgCreateTunnel) Reset() { *m = MsgCreateTunnel{} } @@ -104,6 +105,13 @@ func (m *MsgCreateTunnel) GetDeposit() github_com_cosmos_cosmos_sdk_types.Coins return nil } +func (m *MsgCreateTunnel) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + // MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. type MsgCreateTunnelResponse struct { TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` @@ -251,44 +259,45 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 583 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x3f, 0x6b, 0x1b, 0x3f, - 0x18, 0xf6, 0xc5, 0xf9, 0xe5, 0x17, 0xcb, 0x21, 0xa1, 0x87, 0x89, 0xcf, 0x0e, 0x9c, 0x8d, 0x97, - 0xba, 0x01, 0x9f, 0x6a, 0x37, 0x64, 0x68, 0xa7, 0x5c, 0xa0, 0xe0, 0x21, 0x50, 0x2e, 0x29, 0x84, - 0x2e, 0x46, 0xe7, 0x93, 0xcf, 0xa2, 0xb6, 0x74, 0x9c, 0x64, 0x13, 0xaf, 0x1d, 0x3b, 0xf5, 0x73, - 0x64, 0x69, 0x86, 0x2c, 0xfd, 0x06, 0xa1, 0x53, 0xe8, 0xd4, 0xa9, 0x2d, 0xf6, 0x90, 0xaf, 0x51, - 0x4e, 0x92, 0xff, 0x1d, 0x86, 0x2e, 0x77, 0x92, 0x9e, 0xe7, 0x7d, 0xf5, 0xbc, 0x8f, 0x1e, 0x50, - 0x14, 0x23, 0x4a, 0xf1, 0x00, 0x8e, 0x9b, 0x3e, 0x16, 0xa8, 0x09, 0xc5, 0x8d, 0x13, 0xc5, 0x4c, - 0x30, 0x73, 0x5f, 0x01, 0x8e, 0x06, 0xca, 0xa5, 0x90, 0xb1, 0x70, 0x80, 0xa1, 0x44, 0xfd, 0x51, - 0x0f, 0x22, 0x3a, 0x51, 0xd4, 0x72, 0x21, 0x64, 0x21, 0x93, 0x4b, 0x98, 0xac, 0xf4, 0xe9, 0x51, - 0xaa, 0x73, 0x84, 0x62, 0x34, 0xe4, 0x1a, 0x2c, 0x75, 0x19, 0x1f, 0x32, 0xde, 0x51, 0x55, 0x6a, - 0xa3, 0x21, 0x5b, 0xed, 0xa0, 0x8f, 0x38, 0x5e, 0x14, 0x77, 0x19, 0xa1, 0x1a, 0x2f, 0x6a, 0x7c, - 0xc8, 0x43, 0x38, 0x6e, 0x26, 0x3f, 0x0d, 0x3c, 0x43, 0x43, 0x42, 0x19, 0x94, 0x5f, 0x7d, 0x54, - 0x4e, 0x4f, 0x37, 0x89, 0xf0, 0x42, 0x42, 0x0f, 0xe3, 0x80, 0x2f, 0x20, 0xb9, 0x53, 0x50, 0xed, - 0xeb, 0x16, 0x38, 0xb8, 0xe0, 0xe1, 0x79, 0x8c, 0x91, 0xc0, 0x57, 0xb2, 0x85, 0xe9, 0x82, 0xfc, - 0x25, 0x09, 0x29, 0x1a, 0xb4, 0x69, 0x8f, 0x71, 0xcb, 0xa8, 0x66, 0xeb, 0xf9, 0x56, 0xd9, 0x59, - 0x77, 0xc9, 0x59, 0x52, 0xdc, 0xed, 0x87, 0x5f, 0x95, 0x8c, 0xb7, 0x5a, 0x64, 0xbe, 0x01, 0xff, - 0xc5, 0x6c, 0x24, 0xb0, 0xb5, 0x55, 0x35, 0xea, 0xf9, 0x56, 0xc1, 0x51, 0x9e, 0x3a, 0x73, 0x4f, - 0x9d, 0x33, 0x3a, 0x71, 0x0f, 0xbe, 0xdf, 0x37, 0xf2, 0xea, 0x52, 0x2f, 0x21, 0x7b, 0xaa, 0xc6, - 0x3c, 0x01, 0xb9, 0x44, 0x63, 0x27, 0x99, 0xc1, 0xca, 0x56, 0x8d, 0xfa, 0x7e, 0xab, 0xe8, 0x28, - 0xd5, 0xf3, 0xdb, 0xdf, 0x62, 0x1c, 0x5c,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25, 0xad, 0x21, - 0xe5, 0x52, 0xf9, 0xf9, 0x3f, 0x08, 0x0b, 0x1b, 0xaf, 0xc1, 0xde, 0x9a, 0x4b, 0x9b, 0x3a, 0xaf, - 0x12, 0x36, 0x76, 0xde, 0xa4, 0xdd, 0x6d, 0x3f, 0x4c, 0x6d, 0xe3, 0x71, 0x6a, 0x1b, 0x7f, 0xa6, - 0xb6, 0xf1, 0x65, 0x66, 0x67, 0x1e, 0x67, 0x76, 0xe6, 0xe7, 0xcc, 0xce, 0x7c, 0x80, 0x2b, 0x41, - 0xf0, 0x11, 0x0d, 0x64, 0x4e, 0xbb, 0x6c, 0x00, 0xbb, 0x7d, 0x44, 0x28, 0x1c, 0xb7, 0xe0, 0x0d, - 0xd4, 0x5e, 0xc9, 0x54, 0xf8, 0x3b, 0x92, 0xf1, 0xea, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb2, - 0x3c, 0xf9, 0x20, 0x56, 0x04, 0x00, 0x00, + // 596 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xbd, 0x6e, 0xdb, 0x3c, + 0x14, 0xb5, 0xf2, 0x6f, 0x3a, 0x48, 0xf0, 0x09, 0x46, 0x2c, 0x3b, 0x80, 0x6c, 0x78, 0xf9, 0xdc, + 0x00, 0x16, 0x6b, 0x35, 0xc8, 0xd0, 0x4e, 0x51, 0x80, 0x02, 0x1e, 0x02, 0x14, 0x4a, 0x0a, 0x04, + 0x5d, 0x0c, 0x4a, 0xa2, 0x65, 0xa1, 0x36, 0x29, 0x88, 0xb4, 0x11, 0xaf, 0x1d, 0x3b, 0xf5, 0x39, + 0x32, 0x65, 0xc8, 0xd2, 0x37, 0x08, 0x3a, 0x05, 0x9d, 0x3a, 0xb5, 0x85, 0x3d, 0xe4, 0x35, 0x0a, + 0x91, 0xf4, 0x9f, 0x60, 0xb4, 0x8b, 0x44, 0xf2, 0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x7e, 0x0a, 0x76, 0xe4, 0x5c, 0xaa, 0x96, 0x1c, 0x65, 0x1b, 0x2a, + 0xf5, 0x55, 0x33, 0x15, 0xf7, 0xf5, 0x8b, 0x4f, 0xcf, 0xf7, 0x27, 0x0b, 0x95, 0xcf, 0xcf, 0xf7, + 0x27, 0x47, 0x6a, 0xd2, 0x32, 0xc6, 0xea, 0x65, 0xf1, 0xc8, 0xe5, 0xa3, 0xd9, 0x23, 0xed, 0xaf, + 0x1a, 0xd8, 0xbc, 0x64, 0xa1, 0x7e, 0x03, 0xf6, 0x57, 0x26, 0xad, 0x9a, 0xf5, 0x90, 0x49, 0xa9, + 0xf2, 0xff, 0x3f, 0x08, 0xf3, 0x18, 0x6f, 0xc0, 0xfe, 0x4a, 0x4a, 0xeb, 0x94, 0x97, 0x09, 0x6b, + 0x95, 0xd7, 0x79, 0x77, 0xda, 0x8f, 0x13, 0x53, 0x7b, 0x9a, 0x98, 0xda, 0xef, 0x89, 0xa9, 0x7d, + 0x99, 0x9a, 0xb9, 0xa7, 0xa9, 0x99, 0xfb, 0x31, 0x35, 0x73, 0x1f, 0xe0, 0xd2, 0xf0, 0x78, 0x88, + 0x04, 0x62, 0xb6, 0x7d, 0xda, 0x87, 0x7e, 0x0f, 0x45, 0x04, 0x8e, 0x6c, 0x78, 0x0b, 0x55, 0x56, + 0x62, 0x92, 0xbc, 0x1d, 0xc1, 0x78, 0xf5, 0x27, 0x00, 0x00, 0xff, 0xff, 0x84, 0x89, 0xbe, 0x66, + 0x8a, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -431,6 +440,13 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x2a + } if len(m.Deposit) > 0 { for iNdEx := len(m.Deposit) - 1; iNdEx >= 0; iNdEx-- { { @@ -608,6 +624,10 @@ func (m *MsgCreateTunnel) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -806,6 +826,38 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From c6ba1043343e38b808e256def7507c24d6f7a238 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 28 Jun 2024 16:42:25 +0700 Subject: [PATCH 005/272] reorder --- x/tunnel/keeper/keeper_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go index d1a8de9ee..068fb81fd 100644 --- a/x/tunnel/keeper/keeper_test.go +++ b/x/tunnel/keeper/keeper_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "testing" + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -11,7 +12,6 @@ import ( bandtesting "github.com/bandprotocol/chain/v2/testing" "github.com/bandprotocol/chain/v2/x/tunnel/keeper" "github.com/bandprotocol/chain/v2/x/tunnel/types" - "github.com/cosmos/cosmos-sdk/baseapp" ) // Keeper of the x/tunnel store From fbee6127c6c79b4aff11e8cece4a3c0c08a1095c Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 1 Jul 2024 16:56:02 +0700 Subject: [PATCH 006/272] init handler --- proto/tunnel/v1beta1/tx.proto | 2 +- proto/tunnel/v1beta1/types.proto | 43 +- x/tunnel/keeper/axelar_packet.go | 50 + x/tunnel/keeper/axelar_packet_test.go | 29 + x/tunnel/keeper/axelar_route.go | 21 - x/tunnel/keeper/axelar_route_test.go | 15 - x/tunnel/keeper/keeper_test.go | 4 +- x/tunnel/keeper/tss_packet.go | 50 + x/tunnel/keeper/tss_packet_test.go | 29 + x/tunnel/keeper/tss_route.go | 21 - x/tunnel/keeper/tss_route_test.go | 15 - x/tunnel/keeper/tunnel.go | 65 ++ x/tunnel/keeper/tunnel_test.go | 36 + x/tunnel/types/axelar_route.go | 3 + x/tunnel/types/errors.go | 5 +- x/tunnel/types/keys.go | 10 +- x/tunnel/types/route.go | 3 + x/tunnel/types/tss_route.go | 3 + x/tunnel/types/tx.pb.go | 78 +- x/tunnel/types/types.pb.go | 1274 ++++++++++++++++++++++--- 20 files changed, 1494 insertions(+), 262 deletions(-) create mode 100644 x/tunnel/keeper/axelar_packet.go create mode 100644 x/tunnel/keeper/axelar_packet_test.go delete mode 100644 x/tunnel/keeper/axelar_route.go delete mode 100644 x/tunnel/keeper/axelar_route_test.go create mode 100644 x/tunnel/keeper/tss_packet.go create mode 100644 x/tunnel/keeper/tss_packet_test.go delete mode 100644 x/tunnel/keeper/tss_route.go delete mode 100644 x/tunnel/keeper/tss_route_test.go create mode 100644 x/tunnel/keeper/tunnel_test.go create mode 100644 x/tunnel/types/axelar_route.go create mode 100644 x/tunnel/types/route.go create mode 100644 x/tunnel/types/tss_route.go diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 929a34c8a..44b949431 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -26,7 +26,7 @@ service Msg { // MsgCreateTunnel is the transaction message to create a new tunnel. message MsgCreateTunnel { repeated SignalInfo SignalInfos = 1 [(gogoproto.nullable) = false]; - google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "TunnelRoute"]; + google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "Route"]; feeds.v1beta1.FeedType feed_type = 3; repeated cosmos.base.v1beta1.Coin deposit = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/proto/tunnel/v1beta1/types.proto b/proto/tunnel/v1beta1/types.proto index 1e26ca570..57c6a72be 100644 --- a/proto/tunnel/v1beta1/types.proto +++ b/proto/tunnel/v1beta1/types.proto @@ -12,23 +12,23 @@ option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types" option (gogoproto.equal_all) = true; message TSSRoute { - option (cosmos_proto.implements_interface) = "TunnelRoute"; + option (cosmos_proto.implements_interface) = "Route"; - string destination_chain_id = 1; + string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; string destination_contract_address = 2; } message AxelarRoute { - option (cosmos_proto.implements_interface) = "TunnelRoute"; + option (cosmos_proto.implements_interface) = "Route"; - string destination_chain_id = 1; + string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; string destination_contract_address = 2; } message SignalInfo { option (gogoproto.equal) = true; - string signal_id = 1; + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; uint64 interval = 3; } @@ -36,7 +36,7 @@ message SignalInfo { message SignalPriceInfo { option (gogoproto.equal) = true; - string signal_id = 1; + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; uint64 interval = 3; uint64 price = 4; @@ -46,8 +46,8 @@ message SignalPriceInfo { message Tunnel { option (gogoproto.equal) = true; - uint64 id = 1; - google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "TunnelRoute"]; + uint64 id = 1 [(gogoproto.customname) = "ID"]; + google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "Route"]; feeds.v1beta1.FeedType feed_type = 3; string fee_payer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated SignalPriceInfo signal_price_infos = 5; @@ -56,3 +56,30 @@ message Tunnel { google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true]; string creator = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } + +message TSSPacket { + option (gogoproto.equal) = true; + + uint64 id = 1 [(gogoproto.customname) = "ID"]; + uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; + repeated SignalPriceInfo signal_price_infos = 3; + uint64 signing_id = 4 [ + (gogoproto.customname) = "SigningID", + (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/pkg/tss.SigningID" + ]; + string destination_chain_id = 5 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 6; + google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true]; +} + +message AxelarPacket { + option (gogoproto.equal) = true; + + uint64 id = 1 [(gogoproto.customname) = "ID"]; + uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; + repeated SignalPriceInfo signal_price_infos = 3; + uint64 ibc_queue_id = 4 [(gogoproto.customname) = "IBCQueueID"]; + string destination_chain_id = 5 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 6; + google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true]; +} diff --git a/x/tunnel/keeper/axelar_packet.go b/x/tunnel/keeper/axelar_packet.go new file mode 100644 index 000000000..0efc9007a --- /dev/null +++ b/x/tunnel/keeper/axelar_packet.go @@ -0,0 +1,50 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// SetAxelarPacketCount sets the total number of Axelar packets that have been sent +func (k Keeper) SetAxelarPacketCount(ctx sdk.Context, count uint64) { + ctx.KVStore(k.storeKey).Set(types.AxelarPacketCountStoreKey, sdk.Uint64ToBigEndian(count)) +} + +// GetAxelarPacketCount returns the current number of all Axelar packets ever sent +func (k Keeper) GetAxelarPacketCount(ctx sdk.Context) uint64 { + return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.AxelarPacketCountStoreKey)) +} + +// GetNextAxelarPacketID increments the Axelar packet count and returns the current number of Axelar packets +func (k Keeper) GetNextAxelarPacketID(ctx sdk.Context) uint64 { + packetNumber := k.GetAxelarPacketCount(ctx) + 1 + k.SetAxelarPacketCount(ctx, packetNumber) + return packetNumber +} + +// SetAxelarPacket sets a Axelar packet in the store +func (k Keeper) SetAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { + ctx.KVStore(k.storeKey).Set(types.AxelarPacketStoreKey(packet.ID), k.cdc.MustMarshal(&packet)) +} + +// AddAxelarPacket adds a Axelar packet to the store and returns the new packet ID +func (k Keeper) AddAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) uint64 { + packet.ID = k.GetNextAxelarPacketID(ctx) + k.SetAxelarPacket(ctx, packet) + return packet.ID +} + +// GetAxelarPacket retrieves a Axelar packet by its ID +func (k Keeper) GetAxelarPacket(ctx sdk.Context, id uint64) (types.AxelarPacket, error) { + bz := ctx.KVStore(k.storeKey).Get(types.AxelarPacketStoreKey(id)) + if bz == nil { + return types.AxelarPacket{}, types.ErrAxelarPacketNotFound.Wrapf("packetID: %d", id) + } + + var packet types.AxelarPacket + k.cdc.MustUnmarshal(bz, &packet) + return packet, nil +} + +func (k Keeper) AxelarPacketHandler(ctx sdk.Context, packet types.AxelarPacket) {} diff --git a/x/tunnel/keeper/axelar_packet_test.go b/x/tunnel/keeper/axelar_packet_test.go new file mode 100644 index 000000000..61d0ccc82 --- /dev/null +++ b/x/tunnel/keeper/axelar_packet_test.go @@ -0,0 +1,29 @@ +package keeper_test + +import ( + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func (s *KeeperTestSuite) TestGetSetAxelarPacket() { + ctx, k := s.ctx, s.keeper + + packet := types.AxelarPacket{ + ID: 1, + } + k.SetAxelarPacket(ctx, packet) + + storedPacket, err := k.GetAxelarPacket(ctx, 1) + require.NoError(s.T(), err) + require.Equal(s.T(), packet, storedPacket) +} + +func (s *KeeperTestSuite) TestGetNextAxelarPacketID() { + ctx, k := s.ctx, s.keeper + + firstID := k.GetNextAxelarPacketID(ctx) + require.Equal(s.T(), uint64(1), firstID, "expected first axelar packet ID to be 1") + secondID := k.GetNextAxelarPacketID(ctx) + require.Equal(s.T(), uint64(2), secondID, "expected next axelar packet ID to be 2") +} diff --git a/x/tunnel/keeper/axelar_route.go b/x/tunnel/keeper/axelar_route.go deleted file mode 100644 index 439aa6879..000000000 --- a/x/tunnel/keeper/axelar_route.go +++ /dev/null @@ -1,21 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -func (k Keeper) SetAxelarRouteCount(ctx sdk.Context, count uint64) { - ctx.KVStore(k.storeKey).Set(types.AxelarRouteCountStoreKey, sdk.Uint64ToBigEndian(count)) -} - -func (k Keeper) GetAxelarRouteCount(ctx sdk.Context) uint64 { - return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.AxelarRouteCountStoreKey)) -} - -func (k Keeper) GetNextAxelarRouteID(ctx sdk.Context) uint64 { - routeNumber := k.GetAxelarRouteCount(ctx) + 1 - k.SetAxelarRouteCount(ctx, routeNumber) - return routeNumber -} diff --git a/x/tunnel/keeper/axelar_route_test.go b/x/tunnel/keeper/axelar_route_test.go deleted file mode 100644 index 751cefce4..000000000 --- a/x/tunnel/keeper/axelar_route_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package keeper_test - -func (s *KeeperTestSuite) TestGetSetAxelarRouteCount() { - ctx, k := s.ctx, s.feedsKeeper - - // Set axelar route count - count := uint64(1) - k.SetAxelarRouteCount(ctx, count) - - // Get axelar route count - got := k.GetAxelarRouteCount(ctx) - - // Assert equality - s.Require().Equal(count, got) -} diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go index 068fb81fd..dda42ba81 100644 --- a/x/tunnel/keeper/keeper_test.go +++ b/x/tunnel/keeper/keeper_test.go @@ -19,7 +19,7 @@ type KeeperTestSuite struct { suite.Suite ctx sdk.Context - feedsKeeper keeper.Keeper + keeper keeper.Keeper queryClient types.QueryClient msgSrvr types.MsgServer authority sdk.AccAddress @@ -28,7 +28,7 @@ type KeeperTestSuite struct { func (s *KeeperTestSuite) SetupTest() { app, ctx := bandtesting.CreateTestApp(s.T(), true) s.ctx = ctx - s.feedsKeeper = app.TunnelKeeper + s.keeper = app.TunnelKeeper queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) types.RegisterQueryServer(queryHelper, keeper.NewQueryServer(app.TunnelKeeper)) diff --git a/x/tunnel/keeper/tss_packet.go b/x/tunnel/keeper/tss_packet.go new file mode 100644 index 000000000..5deb95e4b --- /dev/null +++ b/x/tunnel/keeper/tss_packet.go @@ -0,0 +1,50 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// SetTSSPacketCount sets the total number of TSS packets that have been sent +func (k Keeper) SetTSSPacketCount(ctx sdk.Context, count uint64) { + ctx.KVStore(k.storeKey).Set(types.TSSPacketCountStoreKey, sdk.Uint64ToBigEndian(count)) +} + +// GetTSSPacketCount returns the current number of all TSS packets ever sent +func (k Keeper) GetTSSPacketCount(ctx sdk.Context) uint64 { + return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.TSSPacketCountStoreKey)) +} + +// GetNextTSSPacketID increments the TSS packet count and returns the current number of TSS packets +func (k Keeper) GetNextTSSPacketID(ctx sdk.Context) uint64 { + packetNumber := k.GetTSSPacketCount(ctx) + 1 + k.SetTSSPacketCount(ctx, packetNumber) + return packetNumber +} + +// SetTSSPacket sets a TSS packet in the store +func (k Keeper) SetTSSPacket(ctx sdk.Context, packet types.TSSPacket) { + ctx.KVStore(k.storeKey).Set(types.TSSPacketStoreKey(packet.ID), k.cdc.MustMarshal(&packet)) +} + +// AddTSSPacket adds a TSS packet to the store and returns the new packet ID +func (k Keeper) AddTSSPacket(ctx sdk.Context, packet types.TSSPacket) uint64 { + packet.ID = k.GetNextTSSPacketID(ctx) + k.SetTSSPacket(ctx, packet) + return packet.ID +} + +// GetTSSPacket retrieves a TSS packet by its ID +func (k Keeper) GetTSSPacket(ctx sdk.Context, id uint64) (types.TSSPacket, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TSSPacketStoreKey(id)) + if bz == nil { + return types.TSSPacket{}, types.ErrTSSPacketNotFound.Wrapf("packetID: %d", id) + } + + var packet types.TSSPacket + k.cdc.MustUnmarshal(bz, &packet) + return packet, nil +} + +func (k Keeper) TSSPacketHandler(ctx sdk.Context, packet types.TSSPacket) {} diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go new file mode 100644 index 000000000..cfb1c3f2e --- /dev/null +++ b/x/tunnel/keeper/tss_packet_test.go @@ -0,0 +1,29 @@ +package keeper_test + +import ( + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func (s *KeeperTestSuite) TestGetSetTSSPacket() { + ctx, k := s.ctx, s.keeper + + packet := types.TSSPacket{ + ID: 1, + } + k.SetTSSPacket(ctx, packet) + + storedPacket, err := k.GetTSSPacket(ctx, 1) + require.NoError(s.T(), err) + require.Equal(s.T(), packet, storedPacket) +} + +func (s *KeeperTestSuite) TestGetNextTSSPacketID() { + ctx, k := s.ctx, s.keeper + + firstID := k.GetNextTSSPacketID(ctx) + require.Equal(s.T(), uint64(1), firstID, "expected first tss packet ID to be 1") + secondID := k.GetNextTSSPacketID(ctx) + require.Equal(s.T(), uint64(2), secondID, "expected next tss packet ID to be 2") +} diff --git a/x/tunnel/keeper/tss_route.go b/x/tunnel/keeper/tss_route.go deleted file mode 100644 index ce4cb53aa..000000000 --- a/x/tunnel/keeper/tss_route.go +++ /dev/null @@ -1,21 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -func (k Keeper) SetTSSRouteCount(ctx sdk.Context, count uint64) { - ctx.KVStore(k.storeKey).Set(types.TSSRouteCountStoreKey, sdk.Uint64ToBigEndian(count)) -} - -func (k Keeper) GetTSSRouteCount(ctx sdk.Context) uint64 { - return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.TSSRouteCountStoreKey)) -} - -func (k Keeper) GetNextTSSRouteID(ctx sdk.Context) uint64 { - routeNumber := k.GetTSSRouteCount(ctx) + 1 - k.SetTSSRouteCount(ctx, routeNumber) - return routeNumber -} diff --git a/x/tunnel/keeper/tss_route_test.go b/x/tunnel/keeper/tss_route_test.go deleted file mode 100644 index 0c1efd5e7..000000000 --- a/x/tunnel/keeper/tss_route_test.go +++ /dev/null @@ -1,15 +0,0 @@ -package keeper_test - -func (s *KeeperTestSuite) TestGetSetTSSRouteCount() { - ctx, k := s.ctx, s.feedsKeeper - - // Set tss route count - count := uint64(1) - k.SetTSSRouteCount(ctx, count) - - // Get tss route count - got := k.GetTSSRouteCount(ctx) - - // Assert equality - s.Require().Equal(count, got) -} diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index b55569d4a..155bc4ad0 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -1 +1,66 @@ package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// SetTunnelCount sets the tunnel count in the store +func (k Keeper) SetTunnelCount(ctx sdk.Context, count uint64) { + ctx.KVStore(k.storeKey).Set(types.TunnelCountStoreKey, sdk.Uint64ToBigEndian(count)) +} + +// GetTunnelCount returns the current number of all tunnels ever existed +func (k Keeper) GetTunnelCount(ctx sdk.Context) uint64 { + return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.TunnelCountStoreKey)) +} + +// GetNextTunnelID increments the tunnel count and returns the current number of tunnels +func (k Keeper) GetNextTunnelID(ctx sdk.Context) uint64 { + tunnelNumber := k.GetTunnelCount(ctx) + 1 + k.SetTunnelCount(ctx, tunnelNumber) + return tunnelNumber +} + +// SetTunnel sets a tunnel in the store +func (k Keeper) SetTunnel(ctx sdk.Context, tunnel types.Tunnel) { + ctx.KVStore(k.storeKey).Set(types.TunnelStoreKey(tunnel.ID), k.cdc.MustMarshal(&tunnel)) +} + +// AddTunnel adds a tunnel to the store and returns the new tunnel ID +func (k Keeper) AddTunnel(ctx sdk.Context, tunnel types.Tunnel) uint64 { + tunnel.ID = k.GetNextTunnelID(ctx) + k.SetTunnel(ctx, tunnel) + return tunnel.ID +} + +// GetTunnel retrieves a tunnel by its ID +func (k Keeper) GetTunnel(ctx sdk.Context, id uint64) (types.Tunnel, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelStoreKey(id)) + if bz == nil { + return types.Tunnel{}, types.ErrTunnelNotFound.Wrapf("tunnelID: %d", id) + } + + var tunnel types.Tunnel + k.cdc.MustUnmarshal(bz, &tunnel) + return tunnel, nil +} + +func (k Keeper) GeneratePackets(ctx sdk.Context, tunnel types.Tunnel) error { + switch tunnel.Route.GetCachedValue().(type) { + case *types.TSSRoute: + // TODO: Implement TSS packet generation + k.TSSPacketHandler(ctx, types.TSSPacket{}) + case *types.AxelarRoute: + // TODO: Implement Axelar packet generation + k.AxelarPacketHandler(ctx, types.AxelarPacket{}) + + default: + return fmt.Errorf("unknown route type: %s", tunnel.Route.String()) + } + + return nil +} diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go new file mode 100644 index 000000000..6d99ce09a --- /dev/null +++ b/x/tunnel/keeper/tunnel_test.go @@ -0,0 +1,36 @@ +package keeper_test + +import ( + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func (s *KeeperTestSuite) TestGetSetTunnel() { + ctx, k := s.ctx, s.keeper + + // Create a new tunnel instance + tunnel := types.Tunnel{ID: 1} + + // Set the tunnel in the keeper + k.SetTunnel(s.ctx, tunnel) + + // Attempt to retrieve the tunnel by its ID + retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) + + // Assert no error occurred during retrieval + require.NoError(s.T(), err, "retrieving tunnel should not produce an error") + + // Assert the retrieved tunnel matches the one we set + require.Equal(s.T(), tunnel, retrievedTunnel, "the retrieved tunnel should match the original") +} + +func (s *KeeperTestSuite) TestGetNextTunnelID() { + ctx, k := s.ctx, s.keeper + + firstID := k.GetNextTunnelID(ctx) + require.Equal(s.T(), uint64(1), firstID, "expected first tunnel ID to be 1") + + secondID := k.GetNextTunnelID(ctx) + require.Equal(s.T(), uint64(2), secondID, "expected next tunnel ID to be 2") +} diff --git a/x/tunnel/types/axelar_route.go b/x/tunnel/types/axelar_route.go new file mode 100644 index 000000000..ddad87888 --- /dev/null +++ b/x/tunnel/types/axelar_route.go @@ -0,0 +1,3 @@ +package types + +var _ Route = &AxelarRoute{} diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index e525420a5..729c9e4f2 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -6,5 +6,8 @@ import ( // x/tunnel module sentinel errors var ( - ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 2, "max tunnel channels") + ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 2, "max tunnel channels") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 3, "tunnel not found") + ErrTSSPacketNotFound = errorsmod.Register(ModuleName, 4, "tss packet not found") + ErrAxelarPacketNotFound = errorsmod.Register(ModuleName, 5, "axelar packet not found") ) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index da4900bcd..69032fbff 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -27,15 +27,15 @@ var ( TunnelCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TunnelCount")...) - TSSRouteCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TSSRouteCount")...) + TSSPacketCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TSSPacketCount")...) - AxelarRouteCountStoreKey = append(GlobalStoreKeyPrefix, []byte("AxelarRouteCount")...) + AxelarPacketCountStoreKey = append(GlobalStoreKeyPrefix, []byte("AxelarPacketCount")...) TunnelStoreKeyPrefix = []byte{0x01} TSSPacketStoreKeyPrefix = []byte{0x02} - AxelarStoreKeyPrefix = []byte{0x03} + AxelarPacketStoreKeyPrefix = []byte{0x03} ParamsKey = []byte{0x10} ) @@ -48,6 +48,6 @@ func TSSPacketStoreKey(id uint64) []byte { return append(TSSPacketStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) } -func AxelarStoreKey(id uint64) []byte { - return append(AxelarStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) +func AxelarPacketStoreKey(id uint64) []byte { + return append(AxelarPacketStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) } diff --git a/x/tunnel/types/route.go b/x/tunnel/types/route.go new file mode 100644 index 000000000..c5febf489 --- /dev/null +++ b/x/tunnel/types/route.go @@ -0,0 +1,3 @@ +package types + +type Route interface{} diff --git a/x/tunnel/types/tss_route.go b/x/tunnel/types/tss_route.go new file mode 100644 index 000000000..59a5133d1 --- /dev/null +++ b/x/tunnel/types/tss_route.go @@ -0,0 +1,3 @@ +package types + +var _ Route = &TSSRoute{} diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index ad0588e12..1e6d1c88e 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -259,45 +259,45 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 596 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xbd, 0x6e, 0xdb, 0x3c, - 0x14, 0xb5, 0xf2, 0x6f, 0x3a, 0x48, 0xf0, 0x09, 0x46, 0x2c, 0x3b, 0x80, 0x6c, 0x78, 0xf9, 0xdc, - 0x00, 0x16, 0x6b, 0x35, 0xc8, 0xd0, 0x4e, 0x51, 0x80, 0x02, 0x1e, 0x02, 0x14, 0x4a, 0x0a, 0x04, - 0x5d, 0x0c, 0x4a, 0xa2, 0x65, 0xa1, 0x36, 0x29, 0x88, 0xb4, 0x11, 0xaf, 0x1d, 0x3b, 0xf5, 0x39, - 0x32, 0x65, 0xc8, 0xd2, 0x37, 0x08, 0x3a, 0x05, 0x9d, 0x3a, 0xb5, 0x85, 0x3d, 0xe4, 0x35, 0x0a, - 0x91, 0xf4, 0x9f, 0x60, 0xb4, 0x8b, 0x44, 0xf2, 0x9c, 0x7b, 0x78, 0x78, 0xee, 0x05, 0x25, 0x3e, - 0x24, 0x04, 0xf7, 0xe1, 0xa8, 0xe5, 0x61, 0x8e, 0x5a, 0x90, 0xdf, 0x5a, 0x71, 0x42, 0x39, 0xd5, - 0x0f, 0x24, 0x60, 0x29, 0xa0, 0x52, 0x0e, 0x29, 0x0d, 0xfb, 0x18, 0x0a, 0xd4, 0x1b, 0x76, 0x21, - 0x22, 0x63, 0x49, 0xad, 0x14, 0x43, 0x1a, 0x52, 0xb1, 0x84, 0xe9, 0x4a, 0x9d, 0x1e, 0x67, 0x94, - 0x63, 0x94, 0xa0, 0x01, 0x53, 0x60, 0xd9, 0xa7, 0x6c, 0x40, 0x59, 0x47, 0x56, 0xc9, 0x8d, 0x82, - 0x4c, 0xb9, 0x83, 0x1e, 0x62, 0x78, 0x5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xd7, 0x79, 0x77, 0xda, 0x8f, 0x13, 0x53, 0x7b, 0x9a, 0x98, 0xda, 0xef, 0x89, 0xa9, 0x7d, - 0x99, 0x9a, 0xb9, 0xa7, 0xa9, 0x99, 0xfb, 0x31, 0x35, 0x73, 0x1f, 0xe0, 0xd2, 0xf0, 0x78, 0x88, - 0x04, 0x62, 0xb6, 0x7d, 0xda, 0x87, 0x7e, 0x0f, 0x45, 0x04, 0x8e, 0x6c, 0x78, 0x0b, 0x55, 0x56, - 0x62, 0x92, 0xbc, 0x1d, 0xc1, 0x78, 0xf5, 0x27, 0x00, 0x00, 0xff, 0xff, 0x84, 0x89, 0xbe, 0x66, - 0x8a, 0x04, 0x00, 0x00, + // 594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xbb, 0x6e, 0xdb, 0x3c, + 0x18, 0xb5, 0x72, 0x37, 0x1d, 0xe4, 0xc7, 0x2f, 0x18, 0xb1, 0xec, 0x00, 0xb2, 0xe1, 0xa5, 0x6e, + 0x00, 0x8b, 0xb5, 0x9a, 0x66, 0xe8, 0x16, 0x05, 0x28, 0xe0, 0x21, 0x40, 0xa1, 0xa4, 0x40, 0xd0, + 0xc5, 0xa0, 0x24, 0x5a, 0x16, 0x6a, 0x93, 0x82, 0x48, 0x1b, 0xf1, 0xda, 0xb1, 0x53, 0x9f, 0x23, + 0x53, 0x86, 0x2c, 0x7d, 0x83, 0xa0, 0x53, 0xd0, 0xa9, 0x4b, 0x2f, 0xb0, 0x87, 0xbc, 0x46, 0x21, + 0x92, 0xbe, 0x09, 0x46, 0xbb, 0x48, 0x24, 0xcf, 0xf9, 0x0e, 0x0f, 0xcf, 0xf7, 0x81, 0x12, 0x1f, + 0x12, 0x82, 0xfb, 0x70, 0xd4, 0xf2, 0x30, 0x47, 0x2d, 0xc8, 0x6f, 0xac, 0x38, 0xa1, 0x9c, 0xea, + 0x07, 0x12,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f, + 0xd5, 0x8c, 0x65, 0x8c, 0xd5, 0xcb, 0xe2, 0x91, 0xcb, 0x47, 0xb3, 0x47, 0xda, 0x5f, 0x34, 0xb0, + 0x79, 0xc1, 0x42, 0xfd, 0x1a, 0xec, 0xaf, 0xcc, 0x58, 0x35, 0xeb, 0x21, 0x93, 0x52, 0xe5, 0xd9, + 0x3f, 0x08, 0xf3, 0x18, 0xaf, 0xc1, 0xfe, 0x4a, 0x4a, 0xeb, 0x94, 0x97, 0x09, 0x6b, 0x95, 0xd7, + 0x79, 0x77, 0xda, 0x0f, 0x13, 0x53, 0x7b, 0x9c, 0x98, 0xda, 0xef, 0x89, 0xa9, 0x7d, 0x9e, 0x9a, + 0xb9, 0xc7, 0xa9, 0x99, 0xfb, 0x3e, 0x35, 0x73, 0xef, 0xe1, 0xd2, 0xf0, 0x78, 0x88, 0x04, 0x62, + 0xaa, 0x7d, 0xda, 0x87, 0x7e, 0x0f, 0x45, 0x04, 0x8e, 0x6c, 0x78, 0x03, 0x55, 0x56, 0x62, 0x92, + 0xbc, 0x1d, 0xc1, 0x78, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x39, 0x05, 0x7d, 0x84, 0x04, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tunnel/types/types.pb.go b/x/tunnel/types/types.pb.go index ea8402db9..33f0f01c0 100644 --- a/x/tunnel/types/types.pb.go +++ b/x/tunnel/types/types.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + github_com_bandprotocol_chain_v2_pkg_tss "github.com/bandprotocol/chain/v2/pkg/tss" types1 "github.com/bandprotocol/chain/v2/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" @@ -31,7 +32,7 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TSSRoute struct { - DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } @@ -68,9 +69,9 @@ func (m *TSSRoute) XXX_DiscardUnknown() { var xxx_messageInfo_TSSRoute proto.InternalMessageInfo -func (m *TSSRoute) GetDestinationChainId() string { +func (m *TSSRoute) GetDestinationChainID() string { if m != nil { - return m.DestinationChainId + return m.DestinationChainID } return "" } @@ -83,7 +84,7 @@ func (m *TSSRoute) GetDestinationContractAddress() string { } type AxelarRoute struct { - DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } @@ -120,9 +121,9 @@ func (m *AxelarRoute) XXX_DiscardUnknown() { var xxx_messageInfo_AxelarRoute proto.InternalMessageInfo -func (m *AxelarRoute) GetDestinationChainId() string { +func (m *AxelarRoute) GetDestinationChainID() string { if m != nil { - return m.DestinationChainId + return m.DestinationChainID } return "" } @@ -135,7 +136,7 @@ func (m *AxelarRoute) GetDestinationContractAddress() string { } type SignalInfo struct { - SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` } @@ -173,9 +174,9 @@ func (m *SignalInfo) XXX_DiscardUnknown() { var xxx_messageInfo_SignalInfo proto.InternalMessageInfo -func (m *SignalInfo) GetSignalId() string { +func (m *SignalInfo) GetSignalID() string { if m != nil { - return m.SignalId + return m.SignalID } return "" } @@ -195,7 +196,7 @@ func (m *SignalInfo) GetInterval() uint64 { } type SignalPriceInfo struct { - SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` @@ -235,9 +236,9 @@ func (m *SignalPriceInfo) XXX_DiscardUnknown() { var xxx_messageInfo_SignalPriceInfo proto.InternalMessageInfo -func (m *SignalPriceInfo) GetSignalId() string { +func (m *SignalPriceInfo) GetSignalID() string { if m != nil { - return m.SignalId + return m.SignalID } return "" } @@ -271,7 +272,7 @@ func (m *SignalPriceInfo) GetLastTimestamp() *time.Time { } type Tunnel struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` FeePayer string `protobuf:"bytes,4,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` @@ -315,9 +316,9 @@ func (m *Tunnel) XXX_DiscardUnknown() { var xxx_messageInfo_Tunnel proto.InternalMessageInfo -func (m *Tunnel) GetId() uint64 { +func (m *Tunnel) GetID() uint64 { if m != nil { - return m.Id + return m.ID } return 0 } @@ -378,60 +379,257 @@ func (m *Tunnel) GetCreator() string { return "" } +type TSSPacket struct { + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + SignalPriceInfos []*SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos,omitempty"` + SigningID github_com_bandprotocol_chain_v2_pkg_tss.SigningID `protobuf:"varint,4,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/pkg/tss.SigningID" json:"signing_id,omitempty"` + DestinationChainID string `protobuf:"bytes,5,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,6,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + CreatedAt *time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` +} + +func (m *TSSPacket) Reset() { *m = TSSPacket{} } +func (m *TSSPacket) String() string { return proto.CompactTextString(m) } +func (*TSSPacket) ProtoMessage() {} +func (*TSSPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_874964ec163fad19, []int{5} +} +func (m *TSSPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TSSPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TSSPacket.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 *TSSPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_TSSPacket.Merge(m, src) +} +func (m *TSSPacket) XXX_Size() int { + return m.Size() +} +func (m *TSSPacket) XXX_DiscardUnknown() { + xxx_messageInfo_TSSPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_TSSPacket proto.InternalMessageInfo + +func (m *TSSPacket) GetID() uint64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *TSSPacket) GetTunnelID() uint64 { + if m != nil { + return m.TunnelID + } + return 0 +} + +func (m *TSSPacket) GetSignalPriceInfos() []*SignalPriceInfo { + if m != nil { + return m.SignalPriceInfos + } + return nil +} + +func (m *TSSPacket) GetSigningID() github_com_bandprotocol_chain_v2_pkg_tss.SigningID { + if m != nil { + return m.SigningID + } + return 0 +} + +func (m *TSSPacket) GetDestinationChainID() string { + if m != nil { + return m.DestinationChainID + } + return "" +} + +func (m *TSSPacket) GetDestinationContractAddress() string { + if m != nil { + return m.DestinationContractAddress + } + return "" +} + +func (m *TSSPacket) GetCreatedAt() *time.Time { + if m != nil { + return m.CreatedAt + } + return nil +} + +type AxelarPacket struct { + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + SignalPriceInfos []*SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos,omitempty"` + IBCQueueID uint64 `protobuf:"varint,4,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` + DestinationChainID string `protobuf:"bytes,5,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,6,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + CreatedAt *time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` +} + +func (m *AxelarPacket) Reset() { *m = AxelarPacket{} } +func (m *AxelarPacket) String() string { return proto.CompactTextString(m) } +func (*AxelarPacket) ProtoMessage() {} +func (*AxelarPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_874964ec163fad19, []int{6} +} +func (m *AxelarPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AxelarPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AxelarPacket.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 *AxelarPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_AxelarPacket.Merge(m, src) +} +func (m *AxelarPacket) XXX_Size() int { + return m.Size() +} +func (m *AxelarPacket) XXX_DiscardUnknown() { + xxx_messageInfo_AxelarPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_AxelarPacket proto.InternalMessageInfo + +func (m *AxelarPacket) GetID() uint64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *AxelarPacket) GetTunnelID() uint64 { + if m != nil { + return m.TunnelID + } + return 0 +} + +func (m *AxelarPacket) GetSignalPriceInfos() []*SignalPriceInfo { + if m != nil { + return m.SignalPriceInfos + } + return nil +} + +func (m *AxelarPacket) GetIBCQueueID() uint64 { + if m != nil { + return m.IBCQueueID + } + return 0 +} + +func (m *AxelarPacket) GetDestinationChainID() string { + if m != nil { + return m.DestinationChainID + } + return "" +} + +func (m *AxelarPacket) GetDestinationContractAddress() string { + if m != nil { + return m.DestinationContractAddress + } + return "" +} + +func (m *AxelarPacket) GetCreatedAt() *time.Time { + if m != nil { + return m.CreatedAt + } + return nil +} + func init() { proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") proto.RegisterType((*SignalPriceInfo)(nil), "tunnel.v1beta1.SignalPriceInfo") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") + proto.RegisterType((*TSSPacket)(nil), "tunnel.v1beta1.TSSPacket") + proto.RegisterType((*AxelarPacket)(nil), "tunnel.v1beta1.AxelarPacket") } func init() { proto.RegisterFile("tunnel/v1beta1/types.proto", fileDescriptor_874964ec163fad19) } var fileDescriptor_874964ec163fad19 = []byte{ - // 672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcf, 0x6e, 0xd3, 0x30, - 0x1c, 0x9e, 0xb7, 0x76, 0x6b, 0xdd, 0xfd, 0x93, 0x55, 0x89, 0xd0, 0xa1, 0xb4, 0xda, 0xa9, 0x97, - 0x25, 0xac, 0xb0, 0xcb, 0x10, 0x82, 0x06, 0x34, 0x31, 0x89, 0x49, 0x53, 0xda, 0x13, 0x97, 0xc8, - 0x49, 0xdc, 0xd4, 0x22, 0xb5, 0xa3, 0xd8, 0xad, 0xd6, 0x2b, 0x2f, 0xc0, 0xc4, 0x13, 0x70, 0xe4, - 0x01, 0xf6, 0x10, 0x88, 0xd3, 0xc4, 0x89, 0x13, 0xa0, 0x4e, 0x48, 0x7b, 0x0c, 0x14, 0x3b, 0x29, - 0xeb, 0x38, 0xc0, 0x0d, 0x6e, 0xf9, 0xfc, 0x7d, 0x5f, 0xfc, 0xfb, 0xe7, 0x1f, 0x6c, 0xc8, 0x31, - 0x63, 0x24, 0xb6, 0x27, 0xfb, 0x3e, 0x91, 0x78, 0xdf, 0x96, 0xd3, 0x84, 0x08, 0x2b, 0x49, 0xb9, - 0xe4, 0x68, 0x53, 0x73, 0x56, 0xce, 0x35, 0xea, 0x11, 0x8f, 0xb8, 0xa2, 0xec, 0xec, 0x4b, 0xab, - 0x1a, 0xcd, 0x88, 0xf3, 0x28, 0x26, 0xb6, 0x42, 0xfe, 0x78, 0x60, 0x4b, 0x3a, 0x22, 0x42, 0xe2, - 0x51, 0x92, 0x0b, 0xee, 0xde, 0x16, 0x60, 0x36, 0x2d, 0xa8, 0x80, 0x8b, 0x11, 0x17, 0x9e, 0xfe, - 0xa9, 0x06, 0x05, 0x35, 0x20, 0x24, 0x14, 0xf3, 0xb8, 0x14, 0x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aa, 0x90, 0x91, 0x49, 0xfa, 0x85, 0xc2, 0xc9, - 0x04, 0x2f, 0x14, 0x9f, 0x8d, 0x09, 0x15, 0x1e, 0x0e, 0x24, 0x9d, 0x10, 0x63, 0xad, 0x05, 0xda, - 0x15, 0xb7, 0x42, 0x45, 0x57, 0x61, 0xf4, 0x04, 0xc2, 0x20, 0x25, 0x58, 0x92, 0xd0, 0xc3, 0xd2, - 0xa8, 0xfc, 0x65, 0xeb, 0xaa, 0xb9, 0xa7, 0x2b, 0x51, 0x07, 0xae, 0x29, 0xc0, 0x53, 0xa3, 0xfa, - 0x87, 0x02, 0x15, 0x42, 0xdd, 0x6a, 0xe7, 0xe4, 0xc3, 0xcc, 0x04, 0x1f, 0x67, 0x26, 0xb8, 0x9c, - 0x99, 0xe0, 0xfb, 0xcc, 0x04, 0xe7, 0x57, 0xe6, 0xd2, 0xe5, 0x95, 0xb9, 0xf4, 0xe5, 0xca, 0x5c, - 0x7a, 0x65, 0x47, 0x54, 0x0e, 0xc7, 0xbe, 0x15, 0xf0, 0x91, 0xed, 0x63, 0x16, 0xaa, 0x58, 0x02, - 0x1e, 0xdb, 0x6a, 0x09, 0xd8, 0x93, 0x8e, 0x7d, 0x66, 0xe7, 0x3b, 0x57, 0xed, 0x5a, 0x7f, 0x55, - 0x29, 0x1e, 0xfc, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x80, 0xa3, 0x2e, 0x66, 0x8a, 0x05, 0x00, 0x00, + // 847 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4d, 0x6f, 0xdc, 0x44, + 0x18, 0x8e, 0xb3, 0x1f, 0xb1, 0x27, 0xdb, 0x50, 0x8d, 0x56, 0xc5, 0x6c, 0xd1, 0x3a, 0xca, 0x29, + 0x3d, 0xd4, 0xa6, 0x0b, 0xbd, 0x54, 0x42, 0xb0, 0xce, 0xaa, 0xaa, 0x25, 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0x76, 0xaf, 0x59, 0x39, 0x20, 0xf0, 0x8f, 0x3e, 0x15, 0xcb, 0xc1, 0x24, 0x04, 0x24, 0x49, + 0xd5, 0xf7, 0x9b, 0xa8, 0x93, 0xff, 0xfc, 0x9b, 0x66, 0x68, 0x7c, 0xdb, 0x0c, 0x8d, 0x57, 0xcd, + 0xd0, 0xf8, 0xb9, 0x19, 0x1a, 0xe7, 0x17, 0xc3, 0xad, 0x57, 0x17, 0xc3, 0xad, 0x1f, 0x2f, 0x86, + 0x5b, 0x9f, 0x79, 0xb7, 0xfa, 0xfa, 0x85, 0xa7, 0x7f, 0x9a, 0xe4, 0xcf, 0x52, 0xd2, 0x95, 0x8c, + 0xf7, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xda, 0x55, 0x8a, 0xb2, 0x4b, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -453,7 +651,7 @@ func (this *TSSRoute) Equal(that interface{}) bool { } else if this == nil { return false } - if this.DestinationChainId != that1.DestinationChainId { + if this.DestinationChainID != that1.DestinationChainID { return false } if this.DestinationContractAddress != that1.DestinationContractAddress { @@ -480,7 +678,7 @@ func (this *AxelarRoute) Equal(that interface{}) bool { } else if this == nil { return false } - if this.DestinationChainId != that1.DestinationChainId { + if this.DestinationChainID != that1.DestinationChainID { return false } if this.DestinationContractAddress != that1.DestinationContractAddress { @@ -507,7 +705,7 @@ func (this *SignalInfo) Equal(that interface{}) bool { } else if this == nil { return false } - if this.SignalId != that1.SignalId { + if this.SignalID != that1.SignalID { return false } if this.DeviationBPS != that1.DeviationBPS { @@ -537,7 +735,7 @@ func (this *SignalPriceInfo) Equal(that interface{}) bool { } else if this == nil { return false } - if this.SignalId != that1.SignalId { + if this.SignalID != that1.SignalID { return false } if this.DeviationBPS != that1.DeviationBPS { @@ -577,7 +775,7 @@ func (this *Tunnel) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Id != that1.Id { + if this.ID != that1.ID { return false } if !this.Route.Equal(that1.Route) { @@ -615,6 +813,108 @@ func (this *Tunnel) Equal(that interface{}) bool { } return true } +func (this *TSSPacket) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TSSPacket) + if !ok { + that2, ok := that.(TSSPacket) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ID != that1.ID { + return false + } + if this.TunnelID != that1.TunnelID { + return false + } + if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { + return false + } + for i := range this.SignalPriceInfos { + if !this.SignalPriceInfos[i].Equal(that1.SignalPriceInfos[i]) { + return false + } + } + if this.SigningID != that1.SigningID { + return false + } + if this.DestinationChainID != that1.DestinationChainID { + return false + } + if this.DestinationContractAddress != that1.DestinationContractAddress { + return false + } + if that1.CreatedAt == nil { + if this.CreatedAt != nil { + return false + } + } else if !this.CreatedAt.Equal(*that1.CreatedAt) { + return false + } + return true +} +func (this *AxelarPacket) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AxelarPacket) + if !ok { + that2, ok := that.(AxelarPacket) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ID != that1.ID { + return false + } + if this.TunnelID != that1.TunnelID { + return false + } + if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { + return false + } + for i := range this.SignalPriceInfos { + if !this.SignalPriceInfos[i].Equal(that1.SignalPriceInfos[i]) { + return false + } + } + if this.IBCQueueID != that1.IBCQueueID { + return false + } + if this.DestinationChainID != that1.DestinationChainID { + return false + } + if this.DestinationContractAddress != that1.DestinationContractAddress { + return false + } + if that1.CreatedAt == nil { + if this.CreatedAt != nil { + return false + } + } else if !this.CreatedAt.Equal(*that1.CreatedAt) { + return false + } + return true +} func (m *TSSRoute) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -642,10 +942,10 @@ func (m *TSSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.DestinationChainId) > 0 { - i -= len(m.DestinationChainId) - copy(dAtA[i:], m.DestinationChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainId))) + if len(m.DestinationChainID) > 0 { + i -= len(m.DestinationChainID) + copy(dAtA[i:], m.DestinationChainID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainID))) i-- dAtA[i] = 0xa } @@ -679,10 +979,10 @@ func (m *AxelarRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.DestinationChainId) > 0 { - i -= len(m.DestinationChainId) - copy(dAtA[i:], m.DestinationChainId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainId))) + if len(m.DestinationChainID) > 0 { + i -= len(m.DestinationChainID) + copy(dAtA[i:], m.DestinationChainID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainID))) i-- dAtA[i] = 0xa } @@ -719,10 +1019,10 @@ func (m *SignalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if len(m.SignalId) > 0 { - i -= len(m.SignalId) - copy(dAtA[i:], m.SignalId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.SignalId))) + if len(m.SignalID) > 0 { + i -= len(m.SignalID) + copy(dAtA[i:], m.SignalID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SignalID))) i-- dAtA[i] = 0xa } @@ -774,10 +1074,10 @@ func (m *SignalPriceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if len(m.SignalId) > 0 { - i -= len(m.SignalId) - copy(dAtA[i:], m.SignalId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.SignalId))) + if len(m.SignalID) > 0 { + i -= len(m.SignalID) + copy(dAtA[i:], m.SignalID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SignalID))) i-- dAtA[i] = 0xa } @@ -874,66 +1174,218 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.Id != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Id)) + if m.ID != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ID)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *TSSPacket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *TSSRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DestinationChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DestinationContractAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n + +func (m *TSSPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AxelarRoute) Size() (n int) { - if m == nil { - return 0 - } +func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DestinationChainId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DestinationContractAddress) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + if m.CreatedAt != nil { + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintTypes(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x3a } - return n -} - + if len(m.DestinationContractAddress) > 0 { + i -= len(m.DestinationContractAddress) + copy(dAtA[i:], m.DestinationContractAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationContractAddress))) + i-- + dAtA[i] = 0x32 + } + if len(m.DestinationChainID) > 0 { + i -= len(m.DestinationChainID) + copy(dAtA[i:], m.DestinationChainID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainID))) + i-- + dAtA[i] = 0x2a + } + if m.SigningID != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SigningID)) + i-- + dAtA[i] = 0x20 + } + if len(m.SignalPriceInfos) > 0 { + for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignalPriceInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.TunnelID != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x10 + } + if m.ID != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AxelarPacket) 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 *AxelarPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CreatedAt != nil { + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintTypes(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x3a + } + if len(m.DestinationContractAddress) > 0 { + i -= len(m.DestinationContractAddress) + copy(dAtA[i:], m.DestinationContractAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationContractAddress))) + i-- + dAtA[i] = 0x32 + } + if len(m.DestinationChainID) > 0 { + i -= len(m.DestinationChainID) + copy(dAtA[i:], m.DestinationChainID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainID))) + i-- + dAtA[i] = 0x2a + } + if m.IBCQueueID != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.IBCQueueID)) + i-- + dAtA[i] = 0x20 + } + if len(m.SignalPriceInfos) > 0 { + for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignalPriceInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.TunnelID != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x10 + } + if m.ID != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TSSRoute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationChainID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *AxelarRoute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationChainID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + func (m *SignalInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.SignalId) + l = len(m.SignalID) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } @@ -952,7 +1404,7 @@ func (m *SignalPriceInfo) Size() (n int) { } var l int _ = l - l = len(m.SignalId) + l = len(m.SignalID) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } @@ -978,8 +1430,8 @@ func (m *Tunnel) Size() (n int) { } var l int _ = l - if m.Id != 0 { - n += 1 + sovTypes(uint64(m.Id)) + if m.ID != 0 { + n += 1 + sovTypes(uint64(m.ID)) } if m.Route != nil { l = m.Route.Size() @@ -1015,6 +1467,78 @@ func (m *Tunnel) Size() (n int) { return n } +func (m *TSSPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ID != 0 { + n += 1 + sovTypes(uint64(m.ID)) + } + if m.TunnelID != 0 { + n += 1 + sovTypes(uint64(m.TunnelID)) + } + if len(m.SignalPriceInfos) > 0 { + for _, e := range m.SignalPriceInfos { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.SigningID != 0 { + n += 1 + sovTypes(uint64(m.SigningID)) + } + l = len(m.DestinationChainID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.CreatedAt != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *AxelarPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ID != 0 { + n += 1 + sovTypes(uint64(m.ID)) + } + if m.TunnelID != 0 { + n += 1 + sovTypes(uint64(m.TunnelID)) + } + if len(m.SignalPriceInfos) > 0 { + for _, e := range m.SignalPriceInfos { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.IBCQueueID != 0 { + n += 1 + sovTypes(uint64(m.IBCQueueID)) + } + l = len(m.DestinationChainID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.CreatedAt != nil { + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1052,7 +1576,7 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1080,7 +1604,7 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DestinationChainId = string(dAtA[iNdEx:postIndex]) + m.DestinationChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1166,7 +1690,7 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1194,7 +1718,7 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DestinationChainId = string(dAtA[iNdEx:postIndex]) + m.DestinationChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1280,7 +1804,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignalID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1308,7 +1832,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalId = string(dAtA[iNdEx:postIndex]) + m.SignalID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -1400,7 +1924,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignalID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1428,7 +1952,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalId = string(dAtA[iNdEx:postIndex]) + m.SignalID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -1575,9 +2099,9 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } - m.Id = 0 + m.ID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -1587,7 +2111,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= uint64(b&0x7F) << shift + m.ID |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -1841,6 +2365,488 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } return nil } +func (m *TSSPacket) 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 ErrIntOverflowTypes + } + 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: TSSPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TSSPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + m.ID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignalPriceInfos = append(m.SignalPriceInfos, &SignalPriceInfo{}) + if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SigningID", wireType) + } + m.SigningID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SigningID |= github_com_bandprotocol_chain_v2_pkg_tss.SigningID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CreatedAt == nil { + m.CreatedAt = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AxelarPacket) 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 ErrIntOverflowTypes + } + 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: AxelarPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AxelarPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + m.ID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignalPriceInfos = append(m.SignalPriceInfos, &SignalPriceInfo{}) + if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IBCQueueID", wireType) + } + m.IBCQueueID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IBCQueueID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CreatedAt == nil { + m.CreatedAt = new(time.Time) + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 918d838c7767056b477c46c4fb855163aafb371b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 4 Jul 2024 18:08:51 +0700 Subject: [PATCH 007/272] add tss tunnel --- app/app.go | 4 + app/genesis.go | 3 + go.mod | 2 + proto/tunnel/v1beta1/genesis.proto | 6 + proto/tunnel/v1beta1/query.proto | 40 + .../v1beta1/{types.proto => tunnel.proto} | 4 +- proto/tunnel/v1beta1/tx.proto | 7 +- scripts/tunnel/create_tunnel.sh | 1 + scripts/tunnel/signal_infos.json | 14 + testing/test_helpers.go | 5 + x/bandtss/types/msgs.go | 4 +- x/tunnel/client/cli/query.go | 69 ++ x/tunnel/client/cli/tx.go | 64 +- x/tunnel/client/cli/util.go | 30 + x/tunnel/client/cli/util_test.go | 66 ++ x/tunnel/genesis.go | 16 + x/tunnel/keeper/genesis.go | 16 +- x/tunnel/keeper/grpc_query.go | 40 + x/tunnel/keeper/msg_server.go | 24 +- x/tunnel/keeper/tunnel.go | 40 +- x/tunnel/keeper/tunnel_test.go | 48 + x/tunnel/module.go | 8 +- x/tunnel/types/axelar_route.go | 4 + x/tunnel/types/codec.go | 11 + x/tunnel/types/expected_keepers.go | 3 + x/tunnel/types/genesis.go | 16 +- x/tunnel/types/genesis.pb.go | 140 ++- x/tunnel/types/msgs.go | 107 +- x/tunnel/types/params.go | 37 +- x/tunnel/types/query.pb.go | 976 +++++++++++++++++- x/tunnel/types/query.pb.gw.go | 184 ++++ x/tunnel/types/route.go | 11 +- x/tunnel/types/tss_route.go | 4 + x/tunnel/types/{types.pb.go => tunnel.pb.go} | 546 +++++----- x/tunnel/types/tx.pb.go | 81 +- 35 files changed, 2214 insertions(+), 417 deletions(-) rename proto/tunnel/v1beta1/{types.proto => tunnel.proto} (95%) create mode 100644 scripts/tunnel/create_tunnel.sh create mode 100644 scripts/tunnel/signal_infos.json create mode 100644 x/tunnel/client/cli/util.go create mode 100644 x/tunnel/client/cli/util_test.go rename x/tunnel/types/{types.pb.go => tunnel.pb.go} (79%) diff --git a/app/app.go b/app/app.go index 8fa4f71a8..d38ec219c 100644 --- a/app/app.go +++ b/app/app.go @@ -719,6 +719,7 @@ func NewBandApp( bandtssModule, feeds.NewAppModule(appCodec, app.FeedsKeeper), globalfee.NewAppModule(app.GlobalfeeKeeper), + tunnel.NewAppModule(appCodec, app.TunnelKeeper), ) // NOTE: Oracle module must occur before distr as it takes some fee to distribute to active oracle validators. @@ -734,6 +735,7 @@ func NewBandApp( tsstypes.ModuleName, bandtsstypes.ModuleName, feedstypes.ModuleName, + tunneltypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, evidencetypes.ModuleName, @@ -764,6 +766,7 @@ func NewBandApp( tsstypes.ModuleName, bandtsstypes.ModuleName, feedstypes.ModuleName, + tunneltypes.ModuleName, ibctransfertypes.ModuleName, ibcexported.ModuleName, icatypes.ModuleName, @@ -818,6 +821,7 @@ func NewBandApp( tsstypes.ModuleName, bandtsstypes.ModuleName, feedstypes.ModuleName, + tunneltypes.ModuleName, globalfeetypes.ModuleName, ) diff --git a/app/genesis.go b/app/genesis.go index 8a52b927a..75ccede11 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -49,6 +49,8 @@ import ( rollingseedtypes "github.com/bandprotocol/chain/v2/x/rollingseed/types" "github.com/bandprotocol/chain/v2/x/tss" tsstypes "github.com/bandprotocol/chain/v2/x/tss/types" + tunnel "github.com/bandprotocol/chain/v2/x/tunnel" + tunneltypes "github.com/bandprotocol/chain/v2/x/tunnel/types" ) // GenesisState defines a type alias for the Band genesis application state. @@ -118,6 +120,7 @@ func NewDefaultGenesisState() GenesisState { tsstypes.ModuleName: tss.AppModuleBasic{}.DefaultGenesis(cdc), bandtsstypes.ModuleName: bandtss.AppModuleBasic{}.DefaultGenesis(cdc), feedstypes.ModuleName: feeds.AppModuleBasic{}.DefaultGenesis(cdc), + tunneltypes.ModuleName: tunnel.AppModuleBasic{}.DefaultGenesis(cdc), globalfeetypes.ModuleName: cdc.MustMarshalJSON(globalfeeGenesis), } } diff --git a/go.mod b/go.mod index 827a1d5f2..06d11a5a1 100644 --- a/go.mod +++ b/go.mod @@ -214,4 +214,6 @@ replace ( golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // stick with compatible version of rapid in v0.47.x line pgregory.net/rapid => pgregory.net/rapid v0.5.5 + + github.com/cosmos/cosmos-sdk => ../cosmos-sdk ) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index 822c749a2..9aa8d55bf 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -10,4 +10,10 @@ import "tunnel/v1beta1/params.proto"; message GenesisState { // Params is all parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; + // tunnel_count is the number of tunnels. + uint64 tunnel_count = 2; + // tss_packet_count is the number of tss packets. + uint64 tss_packet_count = 3; + // axelar_packet_count is the number of axelar packets. + uint64 axelar_packet_count = 4; } diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index fa855df3a..fe380356d 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -4,8 +4,10 @@ package tunnel.v1beta1; option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; import "tunnel/v1beta1/params.proto"; +import "tunnel/v1beta1/tunnel.proto"; // Query service defines the gRPC querier service. service Query { @@ -13,6 +15,44 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/tunnel/v1beta1/params"; } + + // Tunnels is a RPC method that returns all tunnels. + rpc Tunnels(QueryTunnelsRequest) returns (QueryTunnelsResponse) { + option (google.api.http).get = "/tunnel/v1beta1/tunnels"; + } + + // Tunnel is a RPC method that returns a tunnel by its ID. + rpc Tunnel(QueryTunnelRequest) returns (QueryTunnelResponse) { + option (google.api.http).get = "/tunnel/v1beta1/tunnel/{tunnel_id}"; + } +} + +// QueryTunnelRequest is the request type for the Query/Tunnel RPC method. +message QueryTunnelsRequest { + // is_active is a flag to filter active tunnels. + bool is_active = 1; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryTunnelResponse is the response type for the Query/Tunnel RPC method. +message QueryTunnelsResponse { + // Tunnels is a list of tunnels. + repeated Tunnel tunnels = 1; + // pagination defines an optional pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTunnelRequest is the request type for the Query/Tunnel RPC method. +message QueryTunnelRequest { + // TunnelID is the ID of the tunnel to query. + uint64 tunnel_id = 1; +} + +// QueryTunnelResponse is the response type for the Query/Tunnel RPC method. +message QueryTunnelResponse { + // Tunnel is the tunnel with the given ID. + Tunnel tunnel = 1 [(gogoproto.nullable) = false]; } // QueryParamsRequest is the request type for the Query/Params RPC method. diff --git a/proto/tunnel/v1beta1/types.proto b/proto/tunnel/v1beta1/tunnel.proto similarity index 95% rename from proto/tunnel/v1beta1/types.proto rename to proto/tunnel/v1beta1/tunnel.proto index 57c6a72be..7f49d5fa0 100644 --- a/proto/tunnel/v1beta1/types.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -50,10 +50,10 @@ message Tunnel { google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "Route"]; feeds.v1beta1.FeedType feed_type = 3; string fee_payer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated SignalPriceInfo signal_price_infos = 5; + repeated SignalPriceInfo signal_price_infos = 5 [(gogoproto.nullable) = false]; uint64 last_triggered_block_height = 6; bool is_active = 7; - google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; string creator = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 44b949431..6e05b563b 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -11,7 +11,7 @@ import "cosmos/base/v1beta1/coin.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; -import "tunnel/v1beta1/types.proto"; +import "tunnel/v1beta1/tunnel.proto"; import "feeds/v1beta1/feeds.proto"; // Service definition for Msg. @@ -25,7 +25,10 @@ service Msg { // MsgCreateTunnel is the transaction message to create a new tunnel. message MsgCreateTunnel { - repeated SignalInfo SignalInfos = 1 [(gogoproto.nullable) = false]; + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgCreateTunnel"; + + repeated SignalInfo signal_infos = 1 [(gogoproto.nullable) = false]; google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "Route"]; feeds.v1beta1.FeedType feed_type = 3; repeated cosmos.base.v1beta1.Coin deposit = 4 diff --git a/scripts/tunnel/create_tunnel.sh b/scripts/tunnel/create_tunnel.sh new file mode 100644 index 000000000..175d16531 --- /dev/null +++ b/scripts/tunnel/create_tunnel.sh @@ -0,0 +1 @@ +bandd tx tunnel create-tss-tunnel 1 evm-1 0x0001 1band ./scripts/tunnel/signal_infos.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/signal_infos.json b/scripts/tunnel/signal_infos.json new file mode 100644 index 000000000..462dcb662 --- /dev/null +++ b/scripts/tunnel/signal_infos.json @@ -0,0 +1,14 @@ +{ + "signal_infos": [ + { + "signal_id": "BTC", + "deviation_bps": 10, + "interval": 5 + }, + { + "signal_id": "ETH", + "deviation_bps": 10, + "interval": 5 + } + ] +} diff --git a/testing/test_helpers.go b/testing/test_helpers.go index 0c511e7fc..f79a661d2 100644 --- a/testing/test_helpers.go +++ b/testing/test_helpers.go @@ -48,6 +48,7 @@ import ( bandtsstypes "github.com/bandprotocol/chain/v2/x/bandtss/types" "github.com/bandprotocol/chain/v2/x/oracle/types" tsstypes "github.com/bandprotocol/chain/v2/x/tss/types" + tunneltypes "github.com/bandprotocol/chain/v2/x/tunnel/types" ) // Account is a data structure to store key of test account. @@ -410,6 +411,10 @@ func SetupWithGenesisValSet( bandtssGenesis := bandtsstypes.DefaultGenesisState() genesisState[bandtsstypes.ModuleName] = app.AppCodec().MustMarshalJSON(bandtssGenesis) + // Add tunnel genesis + tunnelGenesis := tunneltypes.DefaultGenesisState() + genesisState[tunneltypes.ModuleName] = app.AppCodec().MustMarshalJSON(tunnelGenesis) + stateBytes, err := json.MarshalIndent(genesisState, "", " ") require.NoError(t, err) diff --git a/x/bandtss/types/msgs.go b/x/bandtss/types/msgs.go index 0c044f27b..aad657d20 100644 --- a/x/bandtss/types/msgs.go +++ b/x/bandtss/types/msgs.go @@ -67,7 +67,9 @@ func (m MsgCreateGroup) ValidateBasic() error { // Validate threshold must be less than or equal to members but more than zero if m.Threshold > uint64(len(m.Members)) || m.Threshold <= 0 { - return ErrInvalidSigningThreshold.Wrapf("threshold must be less than or equal to the members but more than zero") + return ErrInvalidSigningThreshold.Wrapf( + "threshold must be less than or equal to the members but more than zero", + ) } return nil diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index 1a9734936..b5f1e6f5e 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -2,6 +2,7 @@ package cli import ( "context" + "strconv" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -10,6 +11,8 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +const flagTunnelIsActiveFilter = "is-active" + // GetQueryCmd returns the cli query commands for this module func GetQueryCmd() *cobra.Command { queryCmd := &cobra.Command{ @@ -21,12 +24,78 @@ func GetQueryCmd() *cobra.Command { } queryCmd.AddCommand( + GetQueryTunnel(), + GetQueryTunnels(), GetQueryCmdParams(), ) return queryCmd } +func GetQueryTunnel() *cobra.Command { + cmd := &cobra.Command{ + Use: "tunnel [tunnel-id]", + Short: "Query the tunnel by tunnel id", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + tunnelID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + res, err := queryClient.Tunnel(context.Background(), &types.QueryTunnelRequest{ + TunnelId: tunnelID, + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetQueryTunnels implements the query tunnels command. +func GetQueryTunnels() *cobra.Command { + cmd := &cobra.Command{ + Use: "tunnels", + Short: "Query all tunnels", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + isActiveFilterFlag, err := cmd.Flags().GetBool(flagTunnelIsActiveFilter) + if err != nil { + return err + } + + res, err := queryClient.Tunnels(context.Background(), &types.QueryTunnelsRequest{ + IsActive: isActiveFilterFlag, + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + cmd.Flags().Bool(flagTunnelIsActiveFilter, false, "Filter tunnels by active status") + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // GetQueryCmdParams implements the query params command. func GetQueryCmdParams() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index b064ecdd7..15d59927b 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -1,9 +1,16 @@ package cli import ( + "fmt" + "strconv" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -20,7 +27,62 @@ func GetTxCmd() *cobra.Command { RunE: client.ValidateCmd, } - txCmd.AddCommand() + txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) return txCmd } + +func GetTxCmdCreateTSSTunnel() *cobra.Command { + cmd := &cobra.Command{ + Use: "create-tss-tunnel [feed-type] [destination-chain-id] [destination-contract-address] [deposit] [signalInfos-json-file]", + Short: "Create a new TSS tunnel", + Args: cobra.ExactArgs(5), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + feedType, err := strconv.ParseInt(args[0], 10, 32) + if err != nil { + return err + } + + deposit, err := sdk.ParseCoinsNormalized(args[3]) + if err != nil { + return err + } + + signalInfos, err := parseSignalInfos(args[4]) + if err != nil { + return err + } + + var route types.Route + tssRoute := types.TSSRoute{ + DestinationChainID: args[1], + DestinationContractAddress: args[2], + } + route = &tssRoute + + msg, err := types.NewMsgCreateTunnel( + signalInfos, + feedstypes.FeedType(feedType), + route, + deposit, + clientCtx.GetFromAddress(), + ) + if err != nil { + return err + } + + fmt.Printf("msg: %+v\n", msg.GetTunnelRoute()) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go new file mode 100644 index 000000000..268cb7ff5 --- /dev/null +++ b/x/tunnel/client/cli/util.go @@ -0,0 +1,30 @@ +package cli + +import ( + "encoding/json" + "os" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// parseSignalInfos parses the signal infos from the given file +func parseSignalInfos(signalInfosFile string) ([]types.SignalInfo, error) { + signalInfos := struct { + SignalInfos []types.SignalInfo `json:"signal_infos"` + }{} + + if signalInfosFile == "" { + return signalInfos.SignalInfos, nil + } + + contents, err := os.ReadFile(signalInfosFile) + if err != nil { + return nil, err + } + + if err := json.Unmarshal(contents, &signalInfos); err != nil { + return nil, err + } + + return signalInfos.SignalInfos, nil +} diff --git a/x/tunnel/client/cli/util_test.go b/x/tunnel/client/cli/util_test.go new file mode 100644 index 000000000..3f2b0ee66 --- /dev/null +++ b/x/tunnel/client/cli/util_test.go @@ -0,0 +1,66 @@ +package cli + +import ( + "encoding/json" + "os" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func TestParseSignalInfos(t *testing.T) { + // Test case for valid signal info + t.Run("valid signal info", func(t *testing.T) { + // Setup + signalInfos := []types.SignalInfo{ + {SignalID: "BTC", DeviationBPS: 10, Interval: 10}, + {SignalID: "ETH", DeviationBPS: 10, Interval: 10}, + } + file, cleanup := createTempSignalInfoFile(signalInfos) + defer cleanup() + + // Execute + result, err := parseSignalInfos(file) + + // Verify + require.NoError(t, err) + require.Equal(t, signalInfos, result) + }) + + // Test case for empty file path + t.Run("empty file path", func(t *testing.T) { + result, err := parseSignalInfos("") + + require.NoError(t, err) + require.Nil(t, result) + }) +} + +// Helper function to create a temporary file with signal info JSON content +func createTempSignalInfoFile(signalInfos []types.SignalInfo) (string, func()) { + file, err := os.CreateTemp("", "signalInfos*.json") + if err != nil { + panic(err) + } + filePath := file.Name() + + data := struct { + SignalInfos []types.SignalInfo `json:"signal_infos"` + }{SignalInfos: signalInfos} + + content, err := json.Marshal(data) + if err != nil { + panic(err) + } + + if _, err := file.Write(content); err != nil { + panic(err) + } + if err := file.Close(); err != nil { + panic(err) + } + + return filePath, func() { os.Remove(filePath) } +} diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index d161870a9..291f9a339 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -1,6 +1,9 @@ package tunnel import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -8,3 +11,16 @@ import ( func ValidateGenesis(data *types.GenesisState) error { return nil } + +func InitGenesis(ctx sdk.Context, k keeper.Keeper, data types.GenesisState) { + err := k.SetParams(ctx, data.Params) + if err != nil { + panic(err) + } +} + +func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState { + return types.GenesisState{ + Params: k.GetParams(ctx), + } +} diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index d4b9e526f..a77e11796 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -8,9 +8,23 @@ import ( // InitGenesis initializes the module's state from a provided genesis state. func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) { + if err := k.SetParams(ctx, data.Params); err != nil { + panic(err) + } + + k.SetTunnelCount(ctx, data.TunnelCount) + // TODO: Set tunnels, axelarPacket and tssPacket + + k.SetTSSPacketCount(ctx, data.TssPacketCount) + k.SetAxelarPacketCount(ctx, data.AxelarPacketCount) } // ExportGenesis returns the module's exported genesis func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { - return &types.GenesisState{} + return &types.GenesisState{ + Params: k.GetParams(ctx), + TunnelCount: k.GetTunnelCount(ctx), + TssPacketCount: k.GetTSSPacketCount(ctx), + AxelarPacketCount: k.GetAxelarPacketCount(ctx), + } } diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index f2f3d1265..ab90e3097 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -3,7 +3,9 @@ package keeper import ( "context" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -16,6 +18,44 @@ func NewQueryServer(k Keeper) types.QueryServer { return queryServer{k: k} } +// Tunnels queries all tunnels. +func (q queryServer) Tunnels(c context.Context, req *types.QueryTunnelsRequest) (*types.QueryTunnelsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + store := prefix.NewStore(ctx.KVStore(q.k.storeKey), types.TunnelStoreKeyPrefix) + filteredTunnels, pageRes, err := query.GenericFilteredPaginate( + q.k.cdc, + store, + req.Pagination, + func(key []byte, t *types.Tunnel) (*types.Tunnel, error) { + if req.IsActive == t.IsActive { + return t, nil + } + + return nil, nil + }, func() *types.Tunnel { + return &types.Tunnel{} + }, + ) + if err != nil { + return nil, err + } + + return &types.QueryTunnelsResponse{Tunnels: filteredTunnels, Pagination: pageRes}, nil +} + +// Tunnel queries a tunnel by its ID. +func (q queryServer) Tunnel(c context.Context, req *types.QueryTunnelRequest) (*types.QueryTunnelResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + tunnel, err := q.k.GetTunnel(ctx, req.TunnelId) + if err != nil { + return nil, err + } + + return &types.QueryTunnelResponse{Tunnel: tunnel}, nil +} + // Params queries all params of the module. func (q queryServer) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 45ea21c42..aba88f1c0 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -21,9 +22,30 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { } func (ms msgServer) CreateTunnel( - _ context.Context, + goCtx context.Context, req *types.MsgCreateTunnel, ) (*types.MsgCreateTunnelResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + + // ms.Keeper.AddTunnel(ctx, types.Tunnel{ + // Route: req.Route, + // FeedType: req.FeedType, + // }) + + fmt.Printf("Msg Create Tunnel: %+v\n", req.Route.TypeUrl) + fmt.Printf("Msg ROute: %+v\n", req.GetTunnelRoute()) + fmt.Printf("Msg ROute: %+v\n", req.Route.GetCachedValue().(types.Route)) + // switch req.Route.GetCachedValue().(type) { + // case *types.TSSRoute: + // // Validate TSSRoute + // fmt.Printf("TSSRoute\n") + // case *types.AxelarRoute: + // // Validate AxelarRoute + // fmt.Printf("AxelarRoute\n") + // default: + // return &types.MsgCreateTunnelResponse{}, sdkerrors.ErrUnknownRequest.Wrapf("unknown route type") + // } + return &types.MsgCreateTunnelResponse{}, nil } diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 155bc4ad0..024db5045 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -4,10 +4,19 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +// GenerateTunnelAccount generates a new tunnel account +func (k Keeper) GenerateTunnelAccount(ctx sdk.Context, tunnelID uint64) sdk.AccAddress { + tacc := authtypes.NewEmptyModuleAccount(fmt.Sprintf("%s-%d", types.ModuleName, tunnelID)) + taccI := k.authKeeper.NewAccount(ctx, tacc) + k.authKeeper.SetAccount(ctx, taccI) + return taccI.GetAddress() +} + // SetTunnelCount sets the tunnel count in the store func (k Keeper) SetTunnelCount(ctx sdk.Context, count uint64) { ctx.KVStore(k.storeKey).Set(types.TunnelCountStoreKey, sdk.Uint64ToBigEndian(count)) @@ -33,6 +42,14 @@ func (k Keeper) SetTunnel(ctx sdk.Context, tunnel types.Tunnel) { // AddTunnel adds a tunnel to the store and returns the new tunnel ID func (k Keeper) AddTunnel(ctx sdk.Context, tunnel types.Tunnel) uint64 { tunnel.ID = k.GetNextTunnelID(ctx) + + // Generate a new tunnel account + acc := k.GenerateTunnelAccount(ctx, tunnel.ID) + tunnel.FeePayer = acc.String() + + // Set the creation time + tunnel.CreatedAt = ctx.BlockTime() + k.SetTunnel(ctx, tunnel) return tunnel.ID } @@ -50,17 +67,16 @@ func (k Keeper) GetTunnel(ctx sdk.Context, id uint64) (types.Tunnel, error) { } func (k Keeper) GeneratePackets(ctx sdk.Context, tunnel types.Tunnel) error { - switch tunnel.Route.GetCachedValue().(type) { - case *types.TSSRoute: - // TODO: Implement TSS packet generation - k.TSSPacketHandler(ctx, types.TSSPacket{}) - case *types.AxelarRoute: - // TODO: Implement Axelar packet generation - k.AxelarPacketHandler(ctx, types.AxelarPacket{}) - - default: - return fmt.Errorf("unknown route type: %s", tunnel.Route.String()) + var route types.Route + route, ok := tunnel.Route.GetCachedValue().(*types.TSSRoute) + if ok { + fmt.Printf("TSSRoute: %v\n", route) + return nil } - - return nil + route, ok = tunnel.Route.GetCachedValue().(*types.AxelarRoute) + if ok { + fmt.Printf("AxelarRoute: %v\n", route) + return nil + } + return fmt.Errorf("unknown route type: %s", tunnel.Route.String()) } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 6d99ce09a..edc274510 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -1,11 +1,59 @@ package keeper_test import ( + "time" + "github.com/stretchr/testify/require" + feedtypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +func (s *KeeperTestSuite) TestGenerateTunnelAccount() { + ctx, k := s.ctx, s.keeper + + tunnelID := uint64(1) + addr := k.GenerateTunnelAccount(ctx, tunnelID) + + // Assert + require.NotNil(s.T(), addr, "expected generated address to be non-nil") + require.Equal( + s.T(), + "band1mfkys3fdex2pvylxdutwk3ng26ys8pxtmjstgp", + addr.String(), + "expected generated address to match", + ) +} + +func (s *KeeperTestSuite) TestAddTunnel() { + ctx, k := s.ctx, s.keeper + + // Create a new tunnel instance + tunnel := types.Tunnel{ID: 1} + + // Add the tunnel to the keeper + k.AddTunnel(s.ctx, tunnel) + + // Attempt to retrieve the tunnel by its ID + retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) + require.NoError(s.T(), err, "retrieving tunnel should not produce an error") + + expected := types.Tunnel{ + ID: 1, + Route: nil, + FeedType: feedtypes.FEED_TYPE_UNSPECIFIED, + FeePayer: "band1mfkys3fdex2pvylxdutwk3ng26ys8pxtmjstgp", + SignalPriceInfos: nil, + LastTriggeredBlockHeight: 0, + IsActive: false, + CreatedAt: time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), + Creator: "", + } + + // Assert the retrieved tunnel matches the one we set + require.Equal(s.T(), expected, retrievedTunnel, "the retrieved tunnel should match the original") +} + func (s *KeeperTestSuite) TestGetSetTunnel() { ctx, k := s.ctx, s.keeper diff --git a/x/tunnel/module.go b/x/tunnel/module.go index 4b400af93..f43015834 100644 --- a/x/tunnel/module.go +++ b/x/tunnel/module.go @@ -3,7 +3,6 @@ package tunnel import ( "context" "encoding/json" - "fmt" "cosmossdk.io/core/appmodule" abci "github.com/cometbft/cometbft/abci/types" @@ -59,12 +58,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // ValidateGenesis performs genesis state validation for the tunnel module. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { - return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) - } - - return ValidateGenesis(&data) + return nil } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the tunnel module. diff --git a/x/tunnel/types/axelar_route.go b/x/tunnel/types/axelar_route.go index ddad87888..6ae7a7de8 100644 --- a/x/tunnel/types/axelar_route.go +++ b/x/tunnel/types/axelar_route.go @@ -1,3 +1,7 @@ package types var _ Route = &AxelarRoute{} + +func (r *AxelarRoute) ValidateBasic() error { + return nil +} diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 0a3215b3c..e6220ee19 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -14,6 +14,10 @@ import ( func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "tunnel/MsgUpdateParams") legacy.RegisterAminoMsg(cdc, &MsgCreateTunnel{}, "tunnel/MsgCreateTunnel") + + cdc.RegisterInterface((*Route)(nil), nil) + cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) + cdc.RegisterConcrete(&AxelarRoute{}, "tunnel/AxelarRoute", nil) } // RegisterInterfaces registers the x/tunnel interfaces types with the interface registry @@ -24,6 +28,13 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgCreateTunnel{}, ) + registry.RegisterInterface( + "tunnel.v1beta1.Route", + (*Route)(nil), + &TSSRoute{}, + &AxelarRoute{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 816918af2..141cc774a 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -10,6 +10,9 @@ type AccountKeeper interface { IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool)) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation + NewAccount(ctx sdk.Context, account authtypes.AccountI) authtypes.AccountI + SetAccount(ctx sdk.Context, account authtypes.AccountI) + GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 5fab334ec..b9d4d507f 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -1,11 +1,21 @@ package types // NewGenesisState creates a new GenesisState instanc e -func NewGenesisState() *GenesisState { - return &GenesisState{} +func NewGenesisState( + params Params, + tunnelCount uint64, + tssPacketCount uint64, + AxelarPacketCount uint64, +) *GenesisState { + return &GenesisState{ + Params: params, + TunnelCount: tunnelCount, + TssPacketCount: tssPacketCount, + AxelarPacketCount: AxelarPacketCount, + } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return &GenesisState{} + return NewGenesisState(DefaultParams(), 0, 0, 0) } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 9d73a2d61..7fbc18e1f 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -27,6 +27,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { // Params is all parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // tunnel_count is the number of tunnels. + TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` + // tss_packet_count is the number of tss packets. + TssPacketCount uint64 `protobuf:"varint,3,opt,name=tss_packet_count,json=tssPacketCount,proto3" json:"tss_packet_count,omitempty"` + // axelar_packet_count is the number of axelar packets. + AxelarPacketCount uint64 `protobuf:"varint,4,opt,name=axelar_packet_count,json=axelarPacketCount,proto3" json:"axelar_packet_count,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -69,6 +75,27 @@ func (m *GenesisState) GetParams() Params { return Params{} } +func (m *GenesisState) GetTunnelCount() uint64 { + if m != nil { + return m.TunnelCount + } + return 0 +} + +func (m *GenesisState) GetTssPacketCount() uint64 { + if m != nil { + return m.TssPacketCount + } + return 0 +} + +func (m *GenesisState) GetAxelarPacketCount() uint64 { + if m != nil { + return m.AxelarPacketCount + } + return 0 +} + func init() { proto.RegisterType((*GenesisState)(nil), "tunnel.v1beta1.GenesisState") } @@ -76,20 +103,24 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 201 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x29, 0xcd, 0xcb, - 0x4b, 0xcd, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, - 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xea, 0x41, 0x65, 0xa5, - 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x94, 0x34, 0x9a, 0x19, - 0x05, 0x89, 0x45, 0x89, 0xb9, 0x50, 0x23, 0x94, 0x5c, 0xb8, 0x78, 0xdc, 0x21, 0x66, 0x06, 0x97, - 0x24, 0x96, 0xa4, 0x0a, 0x99, 0x70, 0xb1, 0x41, 0xe4, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, - 0xc4, 0xf4, 0x50, 0xed, 0xd0, 0x0b, 0x00, 0xcb, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, - 0x55, 0xeb, 0xe4, 0x79, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, - 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xfa, 0xe9, - 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x49, 0x89, 0x79, 0x29, 0x60, 0x5b, - 0x93, 0xf3, 0x73, 0xf4, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0xcb, 0x8c, 0xf4, 0x2b, 0xf4, 0xa1, - 0xee, 0x2b, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xab, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, - 0xff, 0x95, 0xee, 0xcc, 0x14, 0xfa, 0x00, 0x00, 0x00, + // 272 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd0, 0x31, 0x4e, 0xc3, 0x30, + 0x18, 0x05, 0xe0, 0x18, 0xa2, 0x0e, 0x6e, 0x55, 0x41, 0x40, 0xa8, 0x2a, 0xc8, 0x14, 0xa6, 0x4c, + 0xb6, 0x5a, 0x38, 0x41, 0x19, 0x10, 0x5b, 0x55, 0x36, 0x96, 0xea, 0x4f, 0xb0, 0xd2, 0x88, 0xd4, + 0x8e, 0xe2, 0x3f, 0x55, 0xb9, 0x05, 0x57, 0x62, 0xeb, 0xd8, 0x91, 0x09, 0xa1, 0xe4, 0x22, 0xa8, + 0xb6, 0x07, 0xca, 0x66, 0xbd, 0xf7, 0xe9, 0x59, 0x36, 0xbd, 0xc2, 0x5a, 0x29, 0x59, 0x88, 0xf5, + 0x38, 0x91, 0x08, 0x63, 0x91, 0x49, 0x25, 0x4d, 0x6e, 0x78, 0x59, 0x69, 0xd4, 0x51, 0xdf, 0xb5, + 0xdc, 0xb7, 0xc3, 0xf3, 0x4c, 0x67, 0xda, 0x56, 0x62, 0x7f, 0x72, 0x6a, 0x78, 0xf9, 0x6f, 0xa3, + 0x84, 0x0a, 0x56, 0x7e, 0xe2, 0xf6, 0x93, 0xd0, 0xde, 0xa3, 0x1b, 0x7d, 0x46, 0x40, 0x19, 0xdd, + 0xd3, 0x8e, 0x03, 0x03, 0x32, 0x22, 0x71, 0x77, 0x72, 0xc1, 0x0f, 0x2f, 0xe1, 0x33, 0xdb, 0x4e, + 0xc3, 0xed, 0xf7, 0x75, 0x30, 0xf7, 0x36, 0xba, 0xa1, 0x3d, 0xc7, 0x16, 0xa9, 0xae, 0x15, 0x0e, + 0x8e, 0x46, 0x24, 0x0e, 0xe7, 0x5d, 0x97, 0x3d, 0xec, 0xa3, 0x28, 0xa6, 0x27, 0x68, 0xcc, 0xa2, + 0x84, 0xf4, 0x4d, 0xa2, 0x67, 0xc7, 0x96, 0xf5, 0xd1, 0x98, 0x99, 0x8d, 0x9d, 0xe4, 0xf4, 0x0c, + 0x36, 0xb2, 0x80, 0xea, 0x10, 0x87, 0x16, 0x9f, 0xba, 0xea, 0x8f, 0x9f, 0x3e, 0x6d, 0x1b, 0x46, + 0x76, 0x0d, 0x23, 0x3f, 0x0d, 0x23, 0x1f, 0x2d, 0x0b, 0x76, 0x2d, 0x0b, 0xbe, 0x5a, 0x16, 0xbc, + 0x88, 0x2c, 0xc7, 0x65, 0x9d, 0xf0, 0x54, 0xaf, 0x44, 0x02, 0xea, 0xd5, 0xbe, 0x39, 0xd5, 0x85, + 0x48, 0x97, 0x90, 0x2b, 0xb1, 0x9e, 0x88, 0x8d, 0xf0, 0xbf, 0x83, 0xef, 0xa5, 0x34, 0x49, 0xc7, + 0x8a, 0xbb, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x8a, 0x49, 0x15, 0x78, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -112,6 +143,21 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AxelarPacketCount != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.AxelarPacketCount)) + i-- + dAtA[i] = 0x20 + } + if m.TssPacketCount != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.TssPacketCount)) + i-- + dAtA[i] = 0x18 + } + if m.TunnelCount != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.TunnelCount)) + i-- + dAtA[i] = 0x10 + } { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -144,6 +190,15 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) + if m.TunnelCount != 0 { + n += 1 + sovGenesis(uint64(m.TunnelCount)) + } + if m.TssPacketCount != 0 { + n += 1 + sovGenesis(uint64(m.TssPacketCount)) + } + if m.AxelarPacketCount != 0 { + n += 1 + sovGenesis(uint64(m.AxelarPacketCount)) + } return n } @@ -215,6 +270,63 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelCount", wireType) + } + m.TunnelCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TssPacketCount", wireType) + } + m.TssPacketCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TssPacketCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AxelarPacketCount", wireType) + } + m.AxelarPacketCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AxelarPacketCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index b514b72bb..92efb36f3 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -1,9 +1,12 @@ package types import ( - errorsmod "cosmossdk.io/errors" + fmt "fmt" + "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + proto "github.com/cosmos/gogoproto/proto" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) @@ -40,7 +43,7 @@ func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { // ValidateBasic does a check on the provided data. func (m *MsgUpdateParams) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return errorsmod.Wrap(err, "invalid authority address") + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) } if err := m.Params.Validate(); err != nil { @@ -52,16 +55,84 @@ func (m *MsgUpdateParams) ValidateBasic() error { func NewMsgCreateTunnel( signalInfos []SignalInfo, - route *types.Any, feedType feedstypes.FeedType, + route Route, deposit sdk.Coins, -) *MsgCreateTunnel { + creator sdk.AccAddress, +) (*MsgCreateTunnel, error) { + msg, ok := route.(proto.Message) + if !ok { + return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return nil, err + } + return &MsgCreateTunnel{ SignalInfos: signalInfos, - Route: route, + Route: any, + FeedType: feedType, + Deposit: deposit, + Creator: creator.String(), + }, nil +} + +// NewMsgCreateTunnel creates a new MsgCreateTunnel instance. +func NewMsgCreateTSSTunnel( + signalInfos []SignalInfo, + feedType feedstypes.FeedType, + destinationChainID string, + destinationContractAddress string, + deposit sdk.Coins, + creator sdk.AccAddress, +) (*MsgCreateTunnel, error) { + m := &MsgCreateTunnel{ + SignalInfos: signalInfos, + FeedType: feedType, + Deposit: deposit, + Creator: creator.String(), + } + + r := &TSSRoute{ + DestinationChainID: destinationChainID, + DestinationContractAddress: destinationContractAddress, + } + + fmt.Printf("tssroute: %+v\n", r) + + err := m.SetTunnelRoute(r) + if err != nil { + return nil, err + } + + return m, nil +} + +// NewMsgCreateTunnel creates a new MsgCreateTunnel instance. +func NewMsgCreateAxelarTunnel( + signalInfos []SignalInfo, + feedType feedstypes.FeedType, + destinationChainID string, + destinationContractAddress string, + deposit sdk.Coins, + creator sdk.AccAddress, +) (*MsgCreateTunnel, error) { + m := &MsgCreateTunnel{ + SignalInfos: signalInfos, FeedType: feedType, Deposit: deposit, + Creator: creator.String(), + } + + err := m.SetTunnelRoute(&AxelarRoute{ + DestinationChainID: destinationChainID, + DestinationContractAddress: destinationContractAddress, + }) + if err != nil { + return nil, err } + return m, nil } // Type Implements Msg. @@ -79,9 +150,31 @@ func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { - // Validate signal infos + return nil +} - // Validate deposit +// SetRoute sets the route for the message. +func (m *MsgCreateTunnel) SetTunnelRoute(route Route) error { + msg, ok := route.(proto.Message) + if !ok { + return fmt.Errorf("can't proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return err + } + m.Route = any + + fmt.Printf("set route: %+v\n", m.Route.GetCachedValue()) return nil } + +// GetRoute returns the route of the message. +func (m MsgCreateTunnel) GetTunnelRoute() Route { + route, ok := m.Route.GetCachedValue().(Route) + if !ok { + return nil + } + return route +} diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index f4b9ae24d..1d04d90f8 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -1,17 +1,48 @@ package types import ( + sdk "github.com/cosmos/cosmos-sdk/types" "gopkg.in/yaml.v2" ) +var ( + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) + DefaultMinDeviationBPS = uint64(100) + DefaultTSSRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) + DefaultAxelarRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) + DefaultTssSupportedChains = []string{"ethereum", "cosmos", "terra", "band"} + DefaultAxelarSupportedChains = []string{"ethereum", "cosmos", "terra", "band"} +) + // NewParams creates a new Params instance -func NewParams() Params { - return Params{} +func NewParams( + minDeposit sdk.Coins, + minDeviationBPS uint64, + tssRouteFee sdk.Coins, + axelarRouteFee sdk.Coins, + tssSupportedChains []string, + axelarSupportedChains []string, +) Params { + return Params{ + MinDeposit: minDeposit, + MinDeviationBPS: minDeviationBPS, + TSSRouteFee: tssRouteFee, + AxelarRouteFee: axelarRouteFee, + TssSupportedChains: tssSupportedChains, + AxelarSupportedChains: axelarSupportedChains, + } } // DefaultParams returns a default set of parameters func DefaultParams() Params { - return NewParams() + return NewParams( + DefaultMinDeposit, + DefaultMinDeviationBPS, + DefaultTSSRouteFee, + DefaultAxelarRouteFee, + DefaultTssSupportedChains, + DefaultAxelarSupportedChains, + ) } // Validate validates the set of params diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 98483679f..1ced75620 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -29,6 +30,208 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryTunnelRequest is the request type for the Query/Tunnel RPC method. +type QueryTunnelsRequest struct { + // is_active is a flag to filter active tunnels. + IsActive bool `protobuf:"varint,1,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTunnelsRequest) Reset() { *m = QueryTunnelsRequest{} } +func (m *QueryTunnelsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTunnelsRequest) ProtoMessage() {} +func (*QueryTunnelsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{0} +} +func (m *QueryTunnelsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTunnelsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTunnelsRequest.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 *QueryTunnelsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTunnelsRequest.Merge(m, src) +} +func (m *QueryTunnelsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTunnelsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTunnelsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTunnelsRequest proto.InternalMessageInfo + +func (m *QueryTunnelsRequest) GetIsActive() bool { + if m != nil { + return m.IsActive + } + return false +} + +func (m *QueryTunnelsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryTunnelResponse is the response type for the Query/Tunnel RPC method. +type QueryTunnelsResponse struct { + // Tunnels is a list of tunnels. + Tunnels []*Tunnel `protobuf:"bytes,1,rep,name=tunnels,proto3" json:"tunnels,omitempty"` + // pagination defines an optional pagination for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryTunnelsResponse) Reset() { *m = QueryTunnelsResponse{} } +func (m *QueryTunnelsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTunnelsResponse) ProtoMessage() {} +func (*QueryTunnelsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{1} +} +func (m *QueryTunnelsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTunnelsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTunnelsResponse.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 *QueryTunnelsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTunnelsResponse.Merge(m, src) +} +func (m *QueryTunnelsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTunnelsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTunnelsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTunnelsResponse proto.InternalMessageInfo + +func (m *QueryTunnelsResponse) GetTunnels() []*Tunnel { + if m != nil { + return m.Tunnels + } + return nil +} + +func (m *QueryTunnelsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryTunnelRequest is the request type for the Query/Tunnel RPC method. +type QueryTunnelRequest struct { + // TunnelID is the ID of the tunnel to query. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` +} + +func (m *QueryTunnelRequest) Reset() { *m = QueryTunnelRequest{} } +func (m *QueryTunnelRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTunnelRequest) ProtoMessage() {} +func (*QueryTunnelRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{2} +} +func (m *QueryTunnelRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTunnelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTunnelRequest.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 *QueryTunnelRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTunnelRequest.Merge(m, src) +} +func (m *QueryTunnelRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTunnelRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTunnelRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTunnelRequest proto.InternalMessageInfo + +func (m *QueryTunnelRequest) GetTunnelId() uint64 { + if m != nil { + return m.TunnelId + } + return 0 +} + +// QueryTunnelResponse is the response type for the Query/Tunnel RPC method. +type QueryTunnelResponse struct { + // Tunnel is the tunnel with the given ID. + Tunnel Tunnel `protobuf:"bytes,1,opt,name=tunnel,proto3" json:"tunnel"` +} + +func (m *QueryTunnelResponse) Reset() { *m = QueryTunnelResponse{} } +func (m *QueryTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTunnelResponse) ProtoMessage() {} +func (*QueryTunnelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{3} +} +func (m *QueryTunnelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTunnelResponse.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 *QueryTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTunnelResponse.Merge(m, src) +} +func (m *QueryTunnelResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTunnelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTunnelResponse proto.InternalMessageInfo + +func (m *QueryTunnelResponse) GetTunnel() Tunnel { + if m != nil { + return m.Tunnel + } + return Tunnel{} +} + // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -37,7 +240,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{0} + return fileDescriptor_220124e1821d297e, []int{4} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +279,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{1} + return fileDescriptor_220124e1821d297e, []int{5} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -113,6 +316,10 @@ func (m *QueryParamsResponse) GetParams() Params { } func init() { + proto.RegisterType((*QueryTunnelsRequest)(nil), "tunnel.v1beta1.QueryTunnelsRequest") + proto.RegisterType((*QueryTunnelsResponse)(nil), "tunnel.v1beta1.QueryTunnelsResponse") + proto.RegisterType((*QueryTunnelRequest)(nil), "tunnel.v1beta1.QueryTunnelRequest") + proto.RegisterType((*QueryTunnelResponse)(nil), "tunnel.v1beta1.QueryTunnelResponse") proto.RegisterType((*QueryParamsRequest)(nil), "tunnel.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "tunnel.v1beta1.QueryParamsResponse") } @@ -120,25 +327,39 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 278 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x29, 0xcd, 0xcb, - 0x4b, 0xcd, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, - 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xe9, 0x41, 0xe5, 0xa4, 0x44, 0xd2, - 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x94, 0x4c, 0x7a, 0x7e, 0x7e, 0x7a, - 0x4e, 0xaa, 0x7e, 0x62, 0x41, 0xa6, 0x7e, 0x62, 0x5e, 0x5e, 0x7e, 0x49, 0x62, 0x49, 0x66, 0x7e, - 0x5e, 0x31, 0x54, 0x56, 0x1a, 0xcd, 0xfc, 0x82, 0xc4, 0xa2, 0xc4, 0x5c, 0xa8, 0xa4, 0x92, 0x08, - 0x97, 0x50, 0x20, 0xc8, 0xbe, 0x00, 0xb0, 0x60, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, - 0x37, 0x97, 0x30, 0x8a, 0x68, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x90, 0x09, 0x17, 0x1b, 0x44, - 0xb3, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x98, 0x1e, 0xaa, 0xf3, 0xf4, 0x20, 0xea, 0x9d, - 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x82, 0xaa, 0x35, 0xaa, 0xe2, 0x62, 0x05, 0x1b, 0x26, 0x54, - 0xc8, 0xc5, 0x06, 0x51, 0x20, 0xa4, 0x84, 0xae, 0x11, 0xd3, 0x0d, 0x52, 0xca, 0x78, 0xd5, 0x40, - 0x5c, 0xa4, 0x24, 0xd7, 0x74, 0xf9, 0xc9, 0x64, 0x26, 0x09, 0x21, 0x31, 0x7d, 0xac, 0x9e, 0x74, - 0xf2, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, - 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xfd, 0xf4, 0xcc, 0x92, - 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xa4, 0xc4, 0xbc, 0x14, 0x70, 0x70, 0x24, 0xe7, - 0xe7, 0xe8, 0x27, 0x67, 0x24, 0x66, 0xe6, 0xe9, 0x97, 0x19, 0xe9, 0x57, 0xc0, 0xcc, 0x2c, 0xa9, - 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xab, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x13, 0x1d, - 0xb4, 0x7b, 0xaf, 0x01, 0x00, 0x00, + // 497 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x4f, 0x6e, 0xd3, 0x40, + 0x14, 0xc6, 0xe3, 0x50, 0xd2, 0x30, 0x95, 0x58, 0x0c, 0x51, 0x09, 0x2e, 0x72, 0x23, 0xb7, 0x82, + 0xa8, 0x8b, 0x19, 0x12, 0xb8, 0x00, 0x5d, 0x80, 0x2a, 0x36, 0xc5, 0x62, 0xc5, 0xa6, 0x1a, 0x3b, + 0x23, 0x77, 0xa4, 0x64, 0xc6, 0xc9, 0x8c, 0x23, 0x0a, 0xea, 0x86, 0x13, 0x80, 0xb8, 0x54, 0x97, + 0x95, 0xd8, 0xb0, 0x42, 0x28, 0xe1, 0x00, 0x1c, 0x01, 0x65, 0xde, 0x24, 0x8d, 0x8b, 0x1d, 0x76, + 0xc9, 0xbc, 0xef, 0xbd, 0xdf, 0xf7, 0xfe, 0x18, 0xf9, 0x26, 0x97, 0x92, 0x0f, 0xe9, 0xb4, 0x17, + 0x73, 0xc3, 0x7a, 0x74, 0x9c, 0xf3, 0xc9, 0x05, 0xc9, 0x26, 0xca, 0x28, 0x7c, 0x1f, 0x62, 0xc4, + 0xc5, 0xfc, 0x56, 0xaa, 0x52, 0x65, 0x43, 0x74, 0xf1, 0x0b, 0x54, 0xfe, 0x51, 0xa2, 0xf4, 0x48, + 0x69, 0x1a, 0x33, 0xcd, 0x21, 0x7d, 0x55, 0x2c, 0x63, 0xa9, 0x90, 0xcc, 0x08, 0x25, 0x9d, 0xf6, + 0x71, 0xaa, 0x54, 0x3a, 0xe4, 0x94, 0x65, 0x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, 0x55, 0x08, 0xd0, + 0x2f, 0x11, 0xa0, 0xed, 0xff, 0xa9, 0xa3, 0xbb, 0xb6, 0x1a, 0x1e, 0xa3, 0x06, 0x28, 0x70, 0x78, + 0x3b, 0xf3, 0x5f, 0x13, 0xfe, 0xc1, 0x46, 0x0d, 0x58, 0x0a, 0x83, 0xcf, 0xdf, 0x7f, 0x7f, 0xab, + 0xb7, 0xf1, 0x2e, 0x2d, 0x3d, 0x49, 0x9c, 0xa3, 0x6d, 0xb7, 0x6d, 0x5c, 0x5e, 0xaf, 0x78, 0x88, + 0xfe, 0xe1, 0x66, 0x91, 0xa3, 0xee, 0x5b, 0xea, 0x23, 0xfc, 0x90, 0x96, 0xde, 0xba, 0xc6, 0x97, + 0xa8, 0x01, 0x39, 0x15, 0x9d, 0x16, 0xd6, 0xed, 0x1f, 0x6c, 0xd4, 0x38, 0xe6, 0x91, 0x65, 0x1e, + 0xe2, 0xb0, 0x9c, 0x49, 0x3f, 0xad, 0x2e, 0xe6, 0xf2, 0xf8, 0xe4, 0x6a, 0x16, 0x78, 0xd7, 0xb3, + 0xc0, 0xfb, 0x35, 0x0b, 0xbc, 0x2f, 0xf3, 0xa0, 0x76, 0x3d, 0x0f, 0x6a, 0x3f, 0xe6, 0x41, 0xed, + 0x3d, 0x4d, 0x85, 0x39, 0xcf, 0x63, 0x92, 0xa8, 0x11, 0x8d, 0x99, 0x1c, 0xd8, 0xaf, 0x32, 0x51, + 0x43, 0x9a, 0x9c, 0x33, 0x21, 0xe9, 0xb4, 0x4f, 0x3f, 0x2c, 0x0b, 0x9a, 0x8b, 0x8c, 0xeb, 0xb8, + 0x61, 0x15, 0xcf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x99, 0x1f, 0x0e, 0x7f, 0x04, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -155,6 +376,10 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params is a RPC method that returns all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Tunnels is a RPC method that returns all tunnels. + Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) + // Tunnel is a RPC method that returns a tunnel by its ID. + Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) } type queryClient struct { @@ -174,10 +399,32 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) { + out := new(QueryTunnelsResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Tunnels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) { + out := new(QueryTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Tunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params is a RPC method that returns all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Tunnels is a RPC method that returns all tunnels. + Tunnels(context.Context, *QueryTunnelsRequest) (*QueryTunnelsResponse, error) + // Tunnel is a RPC method that returns a tunnel by its ID. + Tunnel(context.Context, *QueryTunnelRequest) (*QueryTunnelResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -187,6 +434,12 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) Tunnels(ctx context.Context, req *QueryTunnelsRequest) (*QueryTunnelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tunnels not implemented") +} +func (*UnimplementedQueryServer) Tunnel(ctx context.Context, req *QueryTunnelRequest) (*QueryTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tunnel not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -210,6 +463,42 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_Tunnels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTunnelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Tunnels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Query/Tunnels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Tunnels(ctx, req.(*QueryTunnelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Tunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTunnelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Tunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Query/Tunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Tunnel(ctx, req.(*QueryTunnelRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "tunnel.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -218,12 +507,20 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "Tunnels", + Handler: _Query_Tunnels_Handler, + }, + { + MethodName: "Tunnel", + Handler: _Query_Tunnel_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "tunnel/v1beta1/query.proto", } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryTunnelsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -233,20 +530,42 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryTunnelsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryTunnelsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.IsActive { + i-- + if m.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryTunnelsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -256,18 +575,95 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryTunnelsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryTunnelsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Tunnels) > 0 { + for iNdEx := len(m.Tunnels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tunnels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryTunnelRequest) 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 *QueryTunnelRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTunnelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TunnelId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TunnelId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryTunnelResponse) 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 *QueryTunnelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Tunnel.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -279,28 +675,142 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryTunnelsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsActive { + n += 2 + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTunnelsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Tunnels) > 0 { + for _, e := range m.Tunnels { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTunnelRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelId != 0 { + n += 1 + sovQuery(uint64(m.TunnelId)) + } + return n +} + +func (m *QueryTunnelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Tunnel.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { return 0 } var l int @@ -316,6 +826,384 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryTunnelsRequest) 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 ErrIntOverflowQuery + } + 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: QueryTunnelsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTunnelsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsActive = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTunnelsResponse) 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 ErrIntOverflowQuery + } + 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: QueryTunnelsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTunnelsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tunnels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tunnels = append(m.Tunnels, &Tunnel{}) + if err := m.Tunnels[len(m.Tunnels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTunnelRequest) 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 ErrIntOverflowQuery + } + 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: QueryTunnelRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTunnelRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + m.TunnelId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTunnelResponse) 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 ErrIntOverflowQuery + } + 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: QueryTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tunnel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tunnel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/tunnel/types/query.pb.gw.go b/x/tunnel/types/query.pb.gw.go index ef8972096..475cf790b 100644 --- a/x/tunnel/types/query.pb.gw.go +++ b/x/tunnel/types/query.pb.gw.go @@ -51,6 +51,96 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +var ( + filter_Query_Tunnels_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Tunnels_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTunnelsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Tunnels_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Tunnels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Tunnels_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTunnelsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Tunnels_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Tunnels(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Tunnel_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTunnelRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + msg, err := client.Tunnel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Tunnel_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTunnelRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + msg, err := server.Tunnel(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -80,6 +170,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Tunnels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Tunnels_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Tunnels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Tunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Tunnel_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Tunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -141,13 +277,61 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Tunnels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Tunnels_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Tunnels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Tunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Tunnel_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Tunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Tunnels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "tunnels"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Tunnel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 0, 1, 0, 4, 1, 5, 2}, []string{"tunnel", "v1beta1", "tunnel_id"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_Tunnels_0 = runtime.ForwardResponseMessage + + forward_Query_Tunnel_0 = runtime.ForwardResponseMessage ) diff --git a/x/tunnel/types/route.go b/x/tunnel/types/route.go index c5febf489..7e3d7fdf8 100644 --- a/x/tunnel/types/route.go +++ b/x/tunnel/types/route.go @@ -1,3 +1,12 @@ package types -type Route interface{} +import "github.com/cosmos/gogoproto/proto" + +// Route represents the interface of various Route types implemented +// by other modules. +type Route interface { + proto.Message + + ValidateBasic() error + String() string +} diff --git a/x/tunnel/types/tss_route.go b/x/tunnel/types/tss_route.go index 59a5133d1..95e6e22e8 100644 --- a/x/tunnel/types/tss_route.go +++ b/x/tunnel/types/tss_route.go @@ -1,3 +1,7 @@ package types var _ Route = &TSSRoute{} + +func (r *TSSRoute) ValidateBasic() error { + return nil +} diff --git a/x/tunnel/types/types.pb.go b/x/tunnel/types/tunnel.pb.go similarity index 79% rename from x/tunnel/types/types.pb.go rename to x/tunnel/types/tunnel.pb.go index 33f0f01c0..eb531d6f3 100644 --- a/x/tunnel/types/types.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: tunnel/v1beta1/types.proto +// source: tunnel/v1beta1/tunnel.proto package types @@ -40,7 +40,7 @@ func (m *TSSRoute) Reset() { *m = TSSRoute{} } func (m *TSSRoute) String() string { return proto.CompactTextString(m) } func (*TSSRoute) ProtoMessage() {} func (*TSSRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_874964ec163fad19, []int{0} + return fileDescriptor_b5270a56045f1d8a, []int{0} } func (m *TSSRoute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -92,7 +92,7 @@ func (m *AxelarRoute) Reset() { *m = AxelarRoute{} } func (m *AxelarRoute) String() string { return proto.CompactTextString(m) } func (*AxelarRoute) ProtoMessage() {} func (*AxelarRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_874964ec163fad19, []int{1} + return fileDescriptor_b5270a56045f1d8a, []int{1} } func (m *AxelarRoute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -145,7 +145,7 @@ func (m *SignalInfo) Reset() { *m = SignalInfo{} } func (m *SignalInfo) String() string { return proto.CompactTextString(m) } func (*SignalInfo) ProtoMessage() {} func (*SignalInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_874964ec163fad19, []int{2} + return fileDescriptor_b5270a56045f1d8a, []int{2} } func (m *SignalInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -207,7 +207,7 @@ func (m *SignalPriceInfo) Reset() { *m = SignalPriceInfo{} } func (m *SignalPriceInfo) String() string { return proto.CompactTextString(m) } func (*SignalPriceInfo) ProtoMessage() {} func (*SignalPriceInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_874964ec163fad19, []int{3} + return fileDescriptor_b5270a56045f1d8a, []int{3} } func (m *SignalPriceInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,22 +272,22 @@ func (m *SignalPriceInfo) GetLastTimestamp() *time.Time { } type Tunnel struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` - FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - FeePayer string `protobuf:"bytes,4,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` - SignalPriceInfos []*SignalPriceInfo `protobuf:"bytes,5,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos,omitempty"` - LastTriggeredBlockHeight uint64 `protobuf:"varint,6,opt,name=last_triggered_block_height,json=lastTriggeredBlockHeight,proto3" json:"last_triggered_block_height,omitempty"` - IsActive bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - CreatedAt *time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` - Creator string `protobuf:"bytes,9,opt,name=creator,proto3" json:"creator,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` + FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + FeePayer string `protobuf:"bytes,4,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,5,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + LastTriggeredBlockHeight uint64 `protobuf:"varint,6,opt,name=last_triggered_block_height,json=lastTriggeredBlockHeight,proto3" json:"last_triggered_block_height,omitempty"` + IsActive bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + Creator string `protobuf:"bytes,9,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *Tunnel) Reset() { *m = Tunnel{} } func (m *Tunnel) String() string { return proto.CompactTextString(m) } func (*Tunnel) ProtoMessage() {} func (*Tunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_874964ec163fad19, []int{4} + return fileDescriptor_b5270a56045f1d8a, []int{4} } func (m *Tunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -344,7 +344,7 @@ func (m *Tunnel) GetFeePayer() string { return "" } -func (m *Tunnel) GetSignalPriceInfos() []*SignalPriceInfo { +func (m *Tunnel) GetSignalPriceInfos() []SignalPriceInfo { if m != nil { return m.SignalPriceInfos } @@ -365,11 +365,11 @@ func (m *Tunnel) GetIsActive() bool { return false } -func (m *Tunnel) GetCreatedAt() *time.Time { +func (m *Tunnel) GetCreatedAt() time.Time { if m != nil { return m.CreatedAt } - return nil + return time.Time{} } func (m *Tunnel) GetCreator() string { @@ -393,7 +393,7 @@ func (m *TSSPacket) Reset() { *m = TSSPacket{} } func (m *TSSPacket) String() string { return proto.CompactTextString(m) } func (*TSSPacket) ProtoMessage() {} func (*TSSPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_874964ec163fad19, []int{5} + return fileDescriptor_b5270a56045f1d8a, []int{5} } func (m *TSSPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -485,7 +485,7 @@ func (m *AxelarPacket) Reset() { *m = AxelarPacket{} } func (m *AxelarPacket) String() string { return proto.CompactTextString(m) } func (*AxelarPacket) ProtoMessage() {} func (*AxelarPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_874964ec163fad19, []int{6} + return fileDescriptor_b5270a56045f1d8a, []int{6} } func (m *AxelarPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -573,63 +573,64 @@ func init() { proto.RegisterType((*AxelarPacket)(nil), "tunnel.v1beta1.AxelarPacket") } -func init() { proto.RegisterFile("tunnel/v1beta1/types.proto", fileDescriptor_874964ec163fad19) } - -var fileDescriptor_874964ec163fad19 = []byte{ - // 847 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x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 0xf3, 0x81, - 0xd8, 0xbd, 0x6d, 0x20, 0x5e, 0xb3, 0xc2, 0xce, 0x3f, 0xb6, 0x82, 0x96, 0xf5, 0xeb, 0x16, 0xe8, - 0xa9, 0x99, 0xff, 0xda, 0x2a, 0xfb, 0x1e, 0xe8, 0x91, 0x24, 0x8d, 0x3f, 0x9f, 0xe3, 0x39, 0xbe, - 0xd4, 0x76, 0xaf, 0x59, 0x39, 0x20, 0xf0, 0x8f, 0x3e, 0x15, 0xcb, 0xc1, 0x24, 0x04, 0x24, 0x49, - 0xd5, 0xf7, 0x9b, 0xa8, 0x93, 0xff, 0xfc, 0x9b, 0x66, 0x68, 0x7c, 0xdb, 0x0c, 0x8d, 0x57, 0xcd, - 0xd0, 0xf8, 0xb9, 0x19, 0x1a, 0xe7, 0x17, 0xc3, 0xad, 0x57, 0x17, 0xc3, 0xad, 0x1f, 0x2f, 0x86, - 0x5b, 0x9f, 0x79, 0xb7, 0xfa, 0xfa, 0x85, 0xa7, 0x7f, 0x9a, 0xe4, 0xcf, 0x52, 0xd2, 0x95, 0x8c, - 0xf7, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xda, 0x55, 0x8a, 0xb2, 0x4b, 0x09, 0x00, 0x00, +func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } + +var fileDescriptor_b5270a56045f1d8a = []byte{ + // 864 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x17, 0x35, 0xad, 0x1f, 0x93, 0x63, 0xc5, 0x5f, 0x30, 0x10, 0xf2, 0xb1, 0x72, 0x21, 0x1a, 0x5e, + 0x39, 0x8b, 0x90, 0x8d, 0xda, 0x6c, 0x02, 0x14, 0xad, 0x68, 0x21, 0x08, 0x81, 0x06, 0x70, 0x49, + 0xad, 0xba, 0x21, 0x86, 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 0x33, 0x3c, 0xc3, + 0x1b, 0x6d, 0x0f, 0xea, 0xa5, 0x03, 0x02, 0xff, 0xf4, 0x73, 0xb1, 0x1c, 0x8c, 0x42, 0x40, 0x92, + 0x54, 0x7d, 0xff, 0x17, 0x75, 0xf2, 0x9f, 0x7d, 0x57, 0xf7, 0x8d, 0x97, 0x75, 0xdf, 0x78, 0x55, + 0xf7, 0x8d, 0x5f, 0xea, 0xbe, 0x71, 0x75, 0xdd, 0xdf, 0x79, 0x75, 0xdd, 0xdf, 0xf9, 0xe9, 0xba, + 0xbf, 0xf3, 0x85, 0x77, 0xab, 0xaf, 0x9f, 0xeb, 0x1f, 0x26, 0x4f, 0x0c, 0x57, 0x96, 0xb4, 0x25, + 0xe3, 0xc3, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xaf, 0x24, 0x7b, 0x56, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -791,7 +792,7 @@ func (this *Tunnel) Equal(that interface{}) bool { return false } for i := range this.SignalPriceInfos { - if !this.SignalPriceInfos[i].Equal(that1.SignalPriceInfos[i]) { + if !this.SignalPriceInfos[i].Equal(&that1.SignalPriceInfos[i]) { return false } } @@ -801,11 +802,7 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.IsActive != that1.IsActive { return false } - if that1.CreatedAt == nil { - if this.CreatedAt != nil { - return false - } - } else if !this.CreatedAt.Equal(*that1.CreatedAt) { + if !this.CreatedAt.Equal(that1.CreatedAt) { return false } if this.Creator != that1.Creator { @@ -938,14 +935,14 @@ func (m *TSSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationContractAddress))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- dAtA[i] = 0x12 } if len(m.DestinationChainID) > 0 { i -= len(m.DestinationChainID) copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainID))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- dAtA[i] = 0xa } @@ -975,14 +972,14 @@ func (m *AxelarRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationContractAddress))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- dAtA[i] = 0x12 } if len(m.DestinationChainID) > 0 { i -= len(m.DestinationChainID) copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainID))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- dAtA[i] = 0xa } @@ -1010,19 +1007,19 @@ func (m *SignalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.Interval != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Interval)) + i = encodeVarintTunnel(dAtA, i, uint64(m.Interval)) i-- dAtA[i] = 0x18 } if m.DeviationBPS != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.DeviationBPS)) + i = encodeVarintTunnel(dAtA, i, uint64(m.DeviationBPS)) i-- dAtA[i] = 0x10 } if len(m.SignalID) > 0 { i -= len(m.SignalID) copy(dAtA[i:], m.SignalID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.SignalID))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.SignalID))) i-- dAtA[i] = 0xa } @@ -1055,29 +1052,29 @@ func (m *SignalPriceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err1 } i -= n1 - i = encodeVarintTypes(dAtA, i, uint64(n1)) + i = encodeVarintTunnel(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x2a } if m.Price != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Price)) + i = encodeVarintTunnel(dAtA, i, uint64(m.Price)) i-- dAtA[i] = 0x20 } if m.Interval != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Interval)) + i = encodeVarintTunnel(dAtA, i, uint64(m.Interval)) i-- dAtA[i] = 0x18 } if m.DeviationBPS != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.DeviationBPS)) + i = encodeVarintTunnel(dAtA, i, uint64(m.DeviationBPS)) i-- dAtA[i] = 0x10 } if len(m.SignalID) > 0 { i -= len(m.SignalID) copy(dAtA[i:], m.SignalID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.SignalID))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.SignalID))) i-- dAtA[i] = 0xa } @@ -1107,20 +1104,18 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Creator) > 0 { i -= len(m.Creator) copy(dAtA[i:], m.Creator) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Creator))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.Creator))) i-- dAtA[i] = 0x4a } - if m.CreatedAt != nil { - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintTypes(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x42 + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) + if err2 != nil { + return 0, err2 } + i -= n2 + i = encodeVarintTunnel(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x42 if m.IsActive { i-- if m.IsActive { @@ -1132,7 +1127,7 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x38 } if m.LastTriggeredBlockHeight != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.LastTriggeredBlockHeight)) + i = encodeVarintTunnel(dAtA, i, uint64(m.LastTriggeredBlockHeight)) i-- dAtA[i] = 0x30 } @@ -1144,7 +1139,7 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a @@ -1153,12 +1148,12 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.FeePayer) > 0 { i -= len(m.FeePayer) copy(dAtA[i:], m.FeePayer) - i = encodeVarintTypes(dAtA, i, uint64(len(m.FeePayer))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.FeePayer))) i-- dAtA[i] = 0x22 } if m.FeedType != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.FeedType)) + i = encodeVarintTunnel(dAtA, i, uint64(m.FeedType)) i-- dAtA[i] = 0x18 } @@ -1169,13 +1164,13 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.ID != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ID)) + i = encodeVarintTunnel(dAtA, i, uint64(m.ID)) i-- dAtA[i] = 0x8 } @@ -1208,26 +1203,26 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err4 } i -= n4 - i = encodeVarintTypes(dAtA, i, uint64(n4)) + i = encodeVarintTunnel(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x3a } if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationContractAddress))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- dAtA[i] = 0x32 } if len(m.DestinationChainID) > 0 { i -= len(m.DestinationChainID) copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainID))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- dAtA[i] = 0x2a } if m.SigningID != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.SigningID)) + i = encodeVarintTunnel(dAtA, i, uint64(m.SigningID)) i-- dAtA[i] = 0x20 } @@ -1239,19 +1234,19 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if m.TunnelID != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.TunnelID)) + i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) i-- dAtA[i] = 0x10 } if m.ID != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ID)) + i = encodeVarintTunnel(dAtA, i, uint64(m.ID)) i-- dAtA[i] = 0x8 } @@ -1284,26 +1279,26 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err5 } i -= n5 - i = encodeVarintTypes(dAtA, i, uint64(n5)) + i = encodeVarintTunnel(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x3a } if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationContractAddress))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- dAtA[i] = 0x32 } if len(m.DestinationChainID) > 0 { i -= len(m.DestinationChainID) copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChainID))) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- dAtA[i] = 0x2a } if m.IBCQueueID != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.IBCQueueID)) + i = encodeVarintTunnel(dAtA, i, uint64(m.IBCQueueID)) i-- dAtA[i] = 0x20 } @@ -1315,27 +1310,27 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if m.TunnelID != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.TunnelID)) + i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) i-- dAtA[i] = 0x10 } if m.ID != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ID)) + i = encodeVarintTunnel(dAtA, i, uint64(m.ID)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) +func encodeVarintTunnel(dAtA []byte, offset int, v uint64) int { + offset -= sovTunnel(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -1353,11 +1348,11 @@ func (m *TSSRoute) Size() (n int) { _ = l l = len(m.DestinationChainID) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } l = len(m.DestinationContractAddress) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } return n } @@ -1370,11 +1365,11 @@ func (m *AxelarRoute) Size() (n int) { _ = l l = len(m.DestinationChainID) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } l = len(m.DestinationContractAddress) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } return n } @@ -1387,13 +1382,13 @@ func (m *SignalInfo) Size() (n int) { _ = l l = len(m.SignalID) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } if m.DeviationBPS != 0 { - n += 1 + sovTypes(uint64(m.DeviationBPS)) + n += 1 + sovTunnel(uint64(m.DeviationBPS)) } if m.Interval != 0 { - n += 1 + sovTypes(uint64(m.Interval)) + n += 1 + sovTunnel(uint64(m.Interval)) } return n } @@ -1406,20 +1401,20 @@ func (m *SignalPriceInfo) Size() (n int) { _ = l l = len(m.SignalID) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } if m.DeviationBPS != 0 { - n += 1 + sovTypes(uint64(m.DeviationBPS)) + n += 1 + sovTunnel(uint64(m.DeviationBPS)) } if m.Interval != 0 { - n += 1 + sovTypes(uint64(m.Interval)) + n += 1 + sovTunnel(uint64(m.Interval)) } if m.Price != 0 { - n += 1 + sovTypes(uint64(m.Price)) + n += 1 + sovTunnel(uint64(m.Price)) } if m.LastTimestamp != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.LastTimestamp) - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } return n } @@ -1431,38 +1426,36 @@ func (m *Tunnel) Size() (n int) { var l int _ = l if m.ID != 0 { - n += 1 + sovTypes(uint64(m.ID)) + n += 1 + sovTunnel(uint64(m.ID)) } if m.Route != nil { l = m.Route.Size() - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } if m.FeedType != 0 { - n += 1 + sovTypes(uint64(m.FeedType)) + n += 1 + sovTunnel(uint64(m.FeedType)) } l = len(m.FeePayer) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } if len(m.SignalPriceInfos) > 0 { for _, e := range m.SignalPriceInfos { l = e.Size() - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } } if m.LastTriggeredBlockHeight != 0 { - n += 1 + sovTypes(uint64(m.LastTriggeredBlockHeight)) + n += 1 + sovTunnel(uint64(m.LastTriggeredBlockHeight)) } if m.IsActive { n += 2 } - if m.CreatedAt != nil { - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt) - n += 1 + l + sovTypes(uint64(l)) - } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) + n += 1 + l + sovTunnel(uint64(l)) l = len(m.Creator) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } return n } @@ -1474,31 +1467,31 @@ func (m *TSSPacket) Size() (n int) { var l int _ = l if m.ID != 0 { - n += 1 + sovTypes(uint64(m.ID)) + n += 1 + sovTunnel(uint64(m.ID)) } if m.TunnelID != 0 { - n += 1 + sovTypes(uint64(m.TunnelID)) + n += 1 + sovTunnel(uint64(m.TunnelID)) } if len(m.SignalPriceInfos) > 0 { for _, e := range m.SignalPriceInfos { l = e.Size() - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } } if m.SigningID != 0 { - n += 1 + sovTypes(uint64(m.SigningID)) + n += 1 + sovTunnel(uint64(m.SigningID)) } l = len(m.DestinationChainID) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } l = len(m.DestinationContractAddress) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } if m.CreatedAt != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt) - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } return n } @@ -1510,40 +1503,40 @@ func (m *AxelarPacket) Size() (n int) { var l int _ = l if m.ID != 0 { - n += 1 + sovTypes(uint64(m.ID)) + n += 1 + sovTunnel(uint64(m.ID)) } if m.TunnelID != 0 { - n += 1 + sovTypes(uint64(m.TunnelID)) + n += 1 + sovTunnel(uint64(m.TunnelID)) } if len(m.SignalPriceInfos) > 0 { for _, e := range m.SignalPriceInfos { l = e.Size() - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } } if m.IBCQueueID != 0 { - n += 1 + sovTypes(uint64(m.IBCQueueID)) + n += 1 + sovTunnel(uint64(m.IBCQueueID)) } l = len(m.DestinationChainID) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } l = len(m.DestinationContractAddress) if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } if m.CreatedAt != nil { l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt) - n += 1 + l + sovTypes(uint64(l)) + n += 1 + l + sovTunnel(uint64(l)) } return n } -func sovTypes(x uint64) (n int) { +func sovTunnel(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozTunnel(x uint64) (n int) { + return sovTunnel(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *TSSRoute) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -1553,7 +1546,7 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1581,7 +1574,7 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1595,11 +1588,11 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -1613,7 +1606,7 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1627,11 +1620,11 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -1640,12 +1633,12 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) + skippy, err := skipTunnel(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1667,7 +1660,7 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1695,7 +1688,7 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1709,11 +1702,11 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -1727,7 +1720,7 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1741,11 +1734,11 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -1754,12 +1747,12 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) + skippy, err := skipTunnel(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1781,7 +1774,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1809,7 +1802,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1823,11 +1816,11 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -1841,7 +1834,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { m.DeviationBPS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1860,7 +1853,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { m.Interval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1874,12 +1867,12 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) + skippy, err := skipTunnel(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1901,7 +1894,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1929,7 +1922,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1943,11 +1936,11 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -1961,7 +1954,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { m.DeviationBPS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1980,7 +1973,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { m.Interval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1999,7 +1992,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { m.Price = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2018,7 +2011,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2031,11 +2024,11 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2049,12 +2042,12 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) + skippy, err := skipTunnel(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2076,7 +2069,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2104,7 +2097,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { m.ID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2123,7 +2116,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2136,11 +2129,11 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2159,7 +2152,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { m.FeedType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2178,7 +2171,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2192,11 +2185,11 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2210,7 +2203,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2223,16 +2216,16 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPriceInfos = append(m.SignalPriceInfos, &SignalPriceInfo{}) + m.SignalPriceInfos = append(m.SignalPriceInfos, SignalPriceInfo{}) if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2244,7 +2237,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { m.LastTriggeredBlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2263,7 +2256,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2283,7 +2276,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2296,19 +2289,16 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF } - if m.CreatedAt == nil { - m.CreatedAt = new(time.Time) - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2319,7 +2309,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2333,11 +2323,11 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2346,12 +2336,12 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) + skippy, err := skipTunnel(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2373,7 +2363,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2401,7 +2391,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { m.ID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2420,7 +2410,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { m.TunnelID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2439,7 +2429,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2452,11 +2442,11 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2473,7 +2463,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { m.SigningID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2492,7 +2482,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2506,11 +2496,11 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2524,7 +2514,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2538,11 +2528,11 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2556,7 +2546,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2569,11 +2559,11 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2587,12 +2577,12 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) + skippy, err := skipTunnel(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2614,7 +2604,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2642,7 +2632,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { m.ID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2661,7 +2651,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { m.TunnelID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2680,7 +2670,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2693,11 +2683,11 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2714,7 +2704,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { m.IBCQueueID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2733,7 +2723,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2747,11 +2737,11 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2765,7 +2755,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2779,11 +2769,11 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2797,7 +2787,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTypes + return ErrIntOverflowTunnel } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2810,11 +2800,11 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF @@ -2828,12 +2818,12 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) + skippy, err := skipTunnel(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes + return ErrInvalidLengthTunnel } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2847,7 +2837,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } return nil } -func skipTypes(dAtA []byte) (n int, err error) { +func skipTunnel(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -2855,7 +2845,7 @@ func skipTypes(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowTypes + return 0, ErrIntOverflowTunnel } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -2872,7 +2862,7 @@ func skipTypes(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowTypes + return 0, ErrIntOverflowTunnel } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -2888,7 +2878,7 @@ func skipTypes(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowTypes + return 0, ErrIntOverflowTunnel } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -2901,14 +2891,14 @@ func skipTypes(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthTypes + return 0, ErrInvalidLengthTunnel } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes + return 0, ErrUnexpectedEndOfGroupTunnel } depth-- case 5: @@ -2917,7 +2907,7 @@ func skipTypes(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthTypes + return 0, ErrInvalidLengthTunnel } if depth == 0 { return iNdEx, nil @@ -2927,7 +2917,7 @@ func skipTypes(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthTunnel = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTunnel = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTunnel = fmt.Errorf("proto: unexpected end of group") ) diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 1e6d1c88e..86ea30005 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -37,7 +37,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateTunnel is the transaction message to create a new tunnel. type MsgCreateTunnel struct { - SignalInfos []SignalInfo `protobuf:"bytes,1,rep,name=SignalInfos,proto3" json:"SignalInfos"` + SignalInfos []SignalInfo `protobuf:"bytes,1,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` @@ -259,45 +259,46 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 594 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xbb, 0x6e, 0xdb, 0x3c, - 0x18, 0xb5, 0x72, 0x37, 0x1d, 0xe4, 0xc7, 0x2f, 0x18, 0xb1, 0xec, 0x00, 0xb2, 0xe1, 0xa5, 0x6e, - 0x00, 0x8b, 0xb5, 0x9a, 0x66, 0xe8, 0x16, 0x05, 0x28, 0xe0, 0x21, 0x40, 0xa1, 0xa4, 0x40, 0xd0, - 0xc5, 0xa0, 0x24, 0x5a, 0x16, 0x6a, 0x93, 0x82, 0x48, 0x1b, 0xf1, 0xda, 0xb1, 0x53, 0x9f, 0x23, - 0x53, 0x86, 0x2c, 0x7d, 0x83, 0xa0, 0x53, 0xd0, 0xa9, 0x4b, 0x2f, 0xb0, 0x87, 0xbc, 0x46, 0x21, - 0x92, 0xbe, 0x09, 0x46, 0xbb, 0x48, 0x24, 0xcf, 0xf9, 0x0e, 0x0f, 0xcf, 0xf7, 0x81, 0x12, 0x1f, - 0x12, 0x82, 0xfb, 0x70, 0xd4, 0xf2, 0x30, 0x47, 0x2d, 0xc8, 0x6f, 0xac, 0x38, 0xa1, 0x9c, 0xea, - 0x07, 0x12, 0xb0, 0x14, 0x50, 0x29, 0x87, 0x94, 0x86, 0x7d, 0x0c, 0x05, 0xea, 0x0d, 0xbb, 0x10, - 0x91, 0xb1, 0xa4, 0x56, 0x8a, 0x21, 0x0d, 0xa9, 0x58, 0xc2, 0x74, 0xa5, 0x4e, 0x8f, 0x32, 0xca, - 0x31, 0x4a, 0xd0, 0x80, 0x29, 0xb0, 0xec, 0x53, 0x36, 0xa0, 0xac, 0x23, 0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4a, 0xeb, 0x94, 0x97, 0x09, 0x6b, 0x95, 0xd7, - 0x79, 0x77, 0xda, 0x0f, 0x13, 0x53, 0x7b, 0x9c, 0x98, 0xda, 0xef, 0x89, 0xa9, 0x7d, 0x9e, 0x9a, - 0xb9, 0xc7, 0xa9, 0x99, 0xfb, 0x3e, 0x35, 0x73, 0xef, 0xe1, 0xd2, 0xf0, 0x78, 0x88, 0x04, 0x62, - 0xaa, 0x7d, 0xda, 0x87, 0x7e, 0x0f, 0x45, 0x04, 0x8e, 0x6c, 0x78, 0x03, 0x55, 0x56, 0x62, 0x92, - 0xbc, 0x1d, 0xc1, 0x78, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x39, 0x05, 0x7d, 0x84, 0x04, - 0x00, 0x00, + // 613 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0x3f, 0x6f, 0xda, 0x4e, + 0x18, 0xc6, 0x3f, 0xf2, 0x8f, 0x4b, 0x94, 0x9f, 0x6a, 0x45, 0xc1, 0x10, 0xc9, 0x20, 0x96, 0xd0, + 0x48, 0xf8, 0x8a, 0x9b, 0x66, 0xc8, 0x16, 0x90, 0x2a, 0x31, 0x44, 0xaa, 0x9c, 0x54, 0x8a, 0xba, + 0xa0, 0xb3, 0x7d, 0x18, 0xab, 0x70, 0x67, 0xf9, 0x0e, 0x14, 0xd6, 0x2e, 0x95, 0x3a, 0xf5, 0x73, + 0x64, 0xca, 0x90, 0xa5, 0xdf, 0x20, 0xea, 0x14, 0x75, 0xea, 0xd4, 0x56, 0x30, 0xe4, 0x6b, 0x54, + 0xbe, 0x3b, 0x13, 0xb0, 0x68, 0xbb, 0xe0, 0xbb, 0xf7, 0x79, 0xde, 0xf7, 0x9e, 0xf7, 0x79, 0x5f, + 0x40, 0x91, 0x8f, 0x08, 0xc1, 0x03, 0x38, 0x6e, 0xba, 0x98, 0xa3, 0x26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fe, 0x22, 0xf5, 0x89, 0xaa, 0x1f, 0x83, 0x0d, + 0xb9, 0xbc, 0x6a, 0x6a, 0xfb, 0xd9, 0x99, 0xcb, 0xfa, 0x6a, 0xde, 0x8a, 0x7b, 0xfa, 0x3c, 0x69, + 0xf1, 0xa9, 0x4a, 0xa6, 0xc9, 0x45, 0x61, 0xb5, 0x92, 0x68, 0x72, 0x31, 0x94, 0x36, 0x69, 0x7f, + 0xd1, 0x40, 0xfe, 0x9c, 0x05, 0xfa, 0x15, 0xd8, 0x59, 0xda, 0xc6, 0x4a, 0x56, 0x43, 0xc6, 0xa5, + 0xf2, 0xe1, 0x3f, 0x08, 0x73, 0x1b, 0xaf, 0xc0, 0xce, 0x92, 0x4b, 0xab, 0x2a, 0x2f, 0x12, 0x56, + 0x56, 0x5e, 0xa5, 0xbd, 0xd5, 0xb9, 0x9f, 0x9a, 0xda, 0xc3, 0xd4, 0xd4, 0x7e, 0x4d, 0x4d, 0xed, + 0xf3, 0xcc, 0xcc, 0x3d, 0xcc, 0xcc, 0xdc, 0xf7, 0x99, 0x99, 0x7b, 0x07, 0x17, 0xb6, 0xcc, 0x45, + 0xc4, 0x17, 0xeb, 0xef, 0xd1, 0x01, 0xf4, 0xfa, 0x28, 0x24, 0x70, 0x6c, 0xc3, 0x6b, 0xf5, 0x5f, + 0x95, 0x2b, 0xe7, 0x6e, 0x08, 0xc6, 0xcb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x63, 0x2a, + 0xaf, 0xaf, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 84148ac2e3c9c5b5b554cf545078946f7c4191c9 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 4 Jul 2024 18:26:10 +0700 Subject: [PATCH 008/272] add unpack interface for msg create tunnel --- go.mod | 2 -- x/tunnel/keeper/msg_server.go | 1 + x/tunnel/types/msgs.go | 11 ++++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 06d11a5a1..827a1d5f2 100644 --- a/go.mod +++ b/go.mod @@ -214,6 +214,4 @@ replace ( golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // stick with compatible version of rapid in v0.47.x line pgregory.net/rapid => pgregory.net/rapid v0.5.5 - - github.com/cosmos/cosmos-sdk => ../cosmos-sdk ) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index aba88f1c0..90c77ec92 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -33,6 +33,7 @@ func (ms msgServer) CreateTunnel( // }) fmt.Printf("Msg Create Tunnel: %+v\n", req.Route.TypeUrl) + fmt.Printf("Msg ROute: %+v\n", req.Route.GetCachedValue()) fmt.Printf("Msg ROute: %+v\n", req.GetTunnelRoute()) fmt.Printf("Msg ROute: %+v\n", req.Route.GetCachedValue().(types.Route)) // switch req.Route.GetCachedValue().(type) { diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 92efb36f3..b2f780ea6 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -11,7 +11,10 @@ import ( feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) -var _ sdk.Msg = &MsgUpdateParams{} +var ( + _, _ sdk.Msg = &MsgUpdateParams{}, &MsgCreateTunnel{} + _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} +) // NewMsgUpdateParams creates a new MsgUpdateParams instance. func NewMsgUpdateParams( @@ -170,6 +173,12 @@ func (m *MsgCreateTunnel) SetTunnelRoute(route Route) error { return nil } +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (m MsgCreateTunnel) UnpackInterfaces(unpacker types.AnyUnpacker) error { + var route Route + return unpacker.UnpackAny(m.Route, &route) +} + // GetRoute returns the route of the message. func (m MsgCreateTunnel) GetTunnelRoute() Route { route, ok := m.Route.GetCachedValue().(Route) From b5c478a9dd3fcee1ce3757615850cbbbd5052c0c Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 8 Jul 2024 17:34:08 +0700 Subject: [PATCH 009/272] add gen packet with unit test --- app/app.go | 2 + proto/tunnel/v1beta1/tunnel.proto | 8 +- proto/tunnel/v1beta1/tx.proto | 17 +- x/tunnel/abci.go | 4 + x/tunnel/keeper/axelar_packet_test.go | 13 +- x/tunnel/keeper/keeper.go | 20 +- x/tunnel/keeper/keeper_test.go | 82 ++-- x/tunnel/keeper/msg_server.go | 88 ++-- x/tunnel/keeper/tss_packet.go | 22 +- x/tunnel/keeper/tss_packet_test.go | 14 +- x/tunnel/keeper/tunnel.go | 120 +++++- x/tunnel/keeper/tunnel_test.go | 156 ++++++- x/tunnel/testutil/mock_expected_keepers.go | 290 +++++++++++++ x/tunnel/testutil/mock_keeper.go | 77 ++++ x/tunnel/types/events.go | 14 +- x/tunnel/types/expected_keepers.go | 17 + x/tunnel/types/msgs.go | 47 ++- x/tunnel/types/tunnel.pb.go | 214 +++++----- x/tunnel/types/tx.pb.go | 458 ++++++++++++++++++--- 19 files changed, 1375 insertions(+), 288 deletions(-) create mode 100644 x/tunnel/testutil/mock_expected_keepers.go create mode 100644 x/tunnel/testutil/mock_keeper.go diff --git a/app/app.go b/app/app.go index d38ec219c..4b1df24d4 100644 --- a/app/app.go +++ b/app/app.go @@ -644,6 +644,8 @@ func NewBandApp( keys[tunneltypes.StoreKey], app.AccountKeeper, app.BankKeeper, + app.FeedsKeeper, + app.BandtssKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 7f49d5fa0..e2ab3fbd3 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -62,14 +62,14 @@ message TSSPacket { uint64 id = 1 [(gogoproto.customname) = "ID"]; uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; - repeated SignalPriceInfo signal_price_infos = 3; + repeated SignalPriceInfo signal_price_infos = 3 [(gogoproto.nullable) = false]; uint64 signing_id = 4 [ (gogoproto.customname) = "SigningID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/pkg/tss.SigningID" ]; string destination_chain_id = 5 [(gogoproto.customname) = "DestinationChainID"]; string destination_contract_address = 6; - google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message AxelarPacket { @@ -77,9 +77,9 @@ message AxelarPacket { uint64 id = 1 [(gogoproto.customname) = "ID"]; uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; - repeated SignalPriceInfo signal_price_infos = 3; + repeated SignalPriceInfo signal_price_infos = 3 [(gogoproto.nullable) = false]; uint64 ibc_queue_id = 4 [(gogoproto.customname) = "IBCQueueID"]; string destination_chain_id = 5 [(gogoproto.customname) = "DestinationChainID"]; string destination_contract_address = 6; - google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 6e05b563b..2fec1c8e9 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -19,6 +19,9 @@ service Msg { // CreateTunnel is a RPC method to create a new tunnel. rpc CreateTunnel(MsgCreateTunnel) returns (MsgCreateTunnelResponse); + // ActivateTunnel is a RPC method to activate a tunnel. + rpc ActivateTunnel(MsgActivateTunnel) returns (MsgActivateTunnelResponse); + // UpdateParams is a RPC method to update parameters rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } @@ -38,9 +41,21 @@ message MsgCreateTunnel { // MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. message MsgCreateTunnelResponse { - string tunnel_id = 1; + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; +} + +// MsgActivateTunnel is the transaction message to activate a tunnel. +message MsgActivateTunnel { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgActivateTunnel"; + + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// MsgActivateTunnelResponse is the response type for the Msg/ActivateTunnel RPC method. +message MsgActivateTunnelResponse {} + // MsgUpdateParams is the transaction message to update parameters. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index 06ae43858..72e9bb8de 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -10,4 +10,8 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { } func EndBlocker(ctx sdk.Context, k keeper.Keeper) { + tunnels := k.GetRequiredProcessTunnels(ctx) + for _, tunnel := range tunnels { + k.ProcessTunnel(ctx, tunnel) + } } diff --git a/x/tunnel/keeper/axelar_packet_test.go b/x/tunnel/keeper/axelar_packet_test.go index 61d0ccc82..0e33b83f8 100644 --- a/x/tunnel/keeper/axelar_packet_test.go +++ b/x/tunnel/keeper/axelar_packet_test.go @@ -1,13 +1,17 @@ package keeper_test import ( + "testing" + "github.com/stretchr/testify/require" + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func (s *KeeperTestSuite) TestGetSetAxelarPacket() { - ctx, k := s.ctx, s.keeper +func TestGetSetAxelarPacket(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper packet := types.AxelarPacket{ ID: 1, @@ -19,8 +23,9 @@ func (s *KeeperTestSuite) TestGetSetAxelarPacket() { require.Equal(s.T(), packet, storedPacket) } -func (s *KeeperTestSuite) TestGetNextAxelarPacketID() { - ctx, k := s.ctx, s.keeper +func TestGetNextAxelarPacketID(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper firstID := k.GetNextAxelarPacketID(ctx) require.Equal(s.T(), uint64(1), firstID, "expected first axelar packet ID to be 1") diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index dc60dd752..c1f7a5ac4 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -17,8 +17,10 @@ type Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey - authKeeper types.AccountKeeper - bankKeeper types.BankKeeper + authKeeper types.AccountKeeper + bankKeeper types.BankKeeper + feedsKeeper types.FeedsKeeper + bandtssKeeper types.BandtssKeeper authority string } @@ -29,6 +31,8 @@ func NewKeeper( key storetypes.StoreKey, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, + feedsKeeper types.FeedsKeeper, + bandtssKeeper types.BandtssKeeper, authority string, ) Keeper { // ensure tunnel module account is set @@ -42,11 +46,13 @@ func NewKeeper( } return Keeper{ - cdc: cdc, - storeKey: key, - authKeeper: authKeeper, - bankKeeper: bankKeeper, - authority: authority, + cdc: cdc, + storeKey: key, + authKeeper: authKeeper, + bankKeeper: bankKeeper, + feedsKeeper: feedsKeeper, + bandtssKeeper: bandtssKeeper, + authority: authority, } } diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go index dda42ba81..07b542a9a 100644 --- a/x/tunnel/keeper/keeper_test.go +++ b/x/tunnel/keeper/keeper_test.go @@ -1,43 +1,43 @@ package keeper_test -import ( - "testing" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/stretchr/testify/suite" - - bandtesting "github.com/bandprotocol/chain/v2/testing" - "github.com/bandprotocol/chain/v2/x/tunnel/keeper" - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -// Keeper of the x/tunnel store -type KeeperTestSuite struct { - suite.Suite - - ctx sdk.Context - keeper keeper.Keeper - queryClient types.QueryClient - msgSrvr types.MsgServer - authority sdk.AccAddress -} - -func (s *KeeperTestSuite) SetupTest() { - app, ctx := bandtesting.CreateTestApp(s.T(), true) - s.ctx = ctx - s.keeper = app.TunnelKeeper - - queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) - types.RegisterQueryServer(queryHelper, keeper.NewQueryServer(app.TunnelKeeper)) - queryClient := types.NewQueryClient(queryHelper) - s.queryClient = queryClient - s.msgSrvr = keeper.NewMsgServerImpl(app.TunnelKeeper) - s.authority = authtypes.NewModuleAddress(govtypes.ModuleName) -} - -func TestKeeperTestSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) -} +// import ( +// "testing" + +// "github.com/cosmos/cosmos-sdk/baseapp" +// sdk "github.com/cosmos/cosmos-sdk/types" +// authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +// govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" +// "github.com/stretchr/testify/suite" + +// bandtesting "github.com/bandprotocol/chain/v2/testing" +// "github.com/bandprotocol/chain/v2/x/tunnel/keeper" +// "github.com/bandprotocol/chain/v2/x/tunnel/types" +// ) + +// // Keeper of the x/tunnel store +// type KeeperTestSuite struct { +// suite.Suite + +// ctx sdk.Context +// keeper keeper.Keeper +// queryClient types.QueryClient +// msgSrvr types.MsgServer +// authority sdk.AccAddress +// } + +// func (s *KeeperTestSuite) SetupTest() { +// app, ctx := bandtesting.CreateTestApp(s.T(), true) +// s.ctx = ctx +// s.keeper = app.TunnelKeeper + +// queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) +// types.RegisterQueryServer(queryHelper, keeper.NewQueryServer(app.TunnelKeeper)) +// queryClient := types.NewQueryClient(queryHelper) +// s.queryClient = queryClient +// s.msgSrvr = keeper.NewMsgServerImpl(app.TunnelKeeper) +// s.authority = authtypes.NewModuleAddress(govtypes.ModuleName) +// } + +// func TestKeeperTestSuite(t *testing.T) { +// suite.Run(t, new(KeeperTestSuite)) +// } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 90c77ec92..bb1315979 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -21,33 +21,75 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{Keeper: keeper} } +// CreateTunnel creates a new tunnel. func (ms msgServer) CreateTunnel( goCtx context.Context, req *types.MsgCreateTunnel, ) (*types.MsgCreateTunnelResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - - // ms.Keeper.AddTunnel(ctx, types.Tunnel{ - // Route: req.Route, - // FeedType: req.FeedType, - // }) - - fmt.Printf("Msg Create Tunnel: %+v\n", req.Route.TypeUrl) - fmt.Printf("Msg ROute: %+v\n", req.Route.GetCachedValue()) - fmt.Printf("Msg ROute: %+v\n", req.GetTunnelRoute()) - fmt.Printf("Msg ROute: %+v\n", req.Route.GetCachedValue().(types.Route)) - // switch req.Route.GetCachedValue().(type) { - // case *types.TSSRoute: - // // Validate TSSRoute - // fmt.Printf("TSSRoute\n") - // case *types.AxelarRoute: - // // Validate AxelarRoute - // fmt.Printf("AxelarRoute\n") - // default: - // return &types.MsgCreateTunnelResponse{}, sdkerrors.ErrUnknownRequest.Wrapf("unknown route type") - // } - - return &types.MsgCreateTunnelResponse{}, nil + ctx := sdk.UnwrapSDKContext(goCtx) + + signalPriceInfos := make([]types.SignalPriceInfo, len(req.SignalInfos)) + for _, signalInfo := range req.SignalInfos { + signalPriceInfos = append(signalPriceInfos, types.SignalPriceInfo{ + SignalID: signalInfo.SignalID, + DeviationBPS: signalInfo.DeviationBPS, + Interval: signalInfo.Interval, + }) + } + + tunnelID := ms.Keeper.AddTunnel(ctx, types.Tunnel{ + Route: req.Route, + FeedType: req.FeedType, + SignalPriceInfos: signalPriceInfos, + IsActive: true, // TODO: set to false by default + }) + + tunnel, err := ms.Keeper.GetTunnel(ctx, tunnelID) + if err != nil { + return nil, err + } + + event := sdk.NewEvent( + types.EventTypeCreateTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeRoute, tunnel.Route.String()), + sdk.NewAttribute(types.AttributeFeedType, tunnel.FeedType.String()), + sdk.NewAttribute(types.AttributeFeePayer, tunnel.FeePayer), + sdk.NewAttribute(types.AttributeIsActive, fmt.Sprintf("%t", tunnel.IsActive)), + sdk.NewAttribute(types.AttributeKeyCreatedAt, tunnel.CreatedAt.String()), + sdk.NewAttribute(types.AttributeCreator, req.Creator), + ) + for _, signalInfo := range req.SignalInfos { + event = event.AppendAttributes( + sdk.NewAttribute(types.AttributeSignalPriceInfos, signalInfo.String()), + ) + } + ctx.EventManager().EmitEvent(event) + + return &types.MsgCreateTunnelResponse{ + TunnelID: tunnel.ID, + }, nil +} + +// ActivateTunnel activates a tunnel. +func (ms msgServer) ActivateTunnel( + goCtx context.Context, + req *types.MsgActivateTunnel, +) (*types.MsgActivateTunnelResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + err := ms.Keeper.ActivateTunnel(ctx, req.TunnelID, req.Creator) + if err != nil { + return nil, err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeActivateTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), + sdk.NewAttribute(types.AttributeIsActive, fmt.Sprintf("%t", true)), + )) + + return &types.MsgActivateTunnelResponse{}, nil } // UpdateParams updates the module params. diff --git a/x/tunnel/keeper/tss_packet.go b/x/tunnel/keeper/tss_packet.go index 5deb95e4b..89519255c 100644 --- a/x/tunnel/keeper/tss_packet.go +++ b/x/tunnel/keeper/tss_packet.go @@ -31,6 +31,10 @@ func (k Keeper) SetTSSPacket(ctx sdk.Context, packet types.TSSPacket) { // AddTSSPacket adds a TSS packet to the store and returns the new packet ID func (k Keeper) AddTSSPacket(ctx sdk.Context, packet types.TSSPacket) uint64 { packet.ID = k.GetNextTSSPacketID(ctx) + + // Set the creation time + packet.CreatedAt = ctx.BlockTime() + k.SetTSSPacket(ctx, packet) return packet.ID } @@ -47,4 +51,20 @@ func (k Keeper) GetTSSPacket(ctx sdk.Context, id uint64) (types.TSSPacket, error return packet, nil } -func (k Keeper) TSSPacketHandler(ctx sdk.Context, packet types.TSSPacket) {} +// MustGetTSSPacket retrieves a TSS packet by its ID and panics if the packet does not exist +func (k Keeper) MustGetTSSPacket(ctx sdk.Context, id uint64) types.TSSPacket { + packet, err := k.GetTSSPacket(ctx, id) + if err != nil { + panic(err) + } + return packet +} + +func (k Keeper) TSSPacketHandler(ctx sdk.Context, packet types.TSSPacket) uint64 { + // TODO: Implement TSS packet handler logic + // Sign TSS packet + packet.SigningID = 1 + + // Save the signed TSS packet + return k.AddTSSPacket(ctx, packet) +} diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index cfb1c3f2e..a5973f94b 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -1,14 +1,17 @@ package keeper_test import ( + "testing" + "github.com/stretchr/testify/require" + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func (s *KeeperTestSuite) TestGetSetTSSPacket() { - ctx, k := s.ctx, s.keeper - +func TestGetSetTSSPacket(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper packet := types.TSSPacket{ ID: 1, } @@ -19,8 +22,9 @@ func (s *KeeperTestSuite) TestGetSetTSSPacket() { require.Equal(s.T(), packet, storedPacket) } -func (s *KeeperTestSuite) TestGetNextTSSPacketID() { - ctx, k := s.ctx, s.keeper +func TestGetNextTSSPacketID(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper firstID := k.GetNextTSSPacketID(ctx) require.Equal(s.T(), uint64(1), firstID, "expected first tss packet ID to be 1") diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 024db5045..c9c5f76c9 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -2,10 +2,12 @@ package keeper import ( "fmt" + "math" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + feedsTypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -66,17 +68,113 @@ func (k Keeper) GetTunnel(ctx sdk.Context, id uint64) (types.Tunnel, error) { return tunnel, nil } -func (k Keeper) GeneratePackets(ctx sdk.Context, tunnel types.Tunnel) error { - var route types.Route - route, ok := tunnel.Route.GetCachedValue().(*types.TSSRoute) - if ok { - fmt.Printf("TSSRoute: %v\n", route) - return nil +// GetTunnels returns all tunnels +func (k Keeper) GetTunnels(ctx sdk.Context) []types.Tunnel { + var tunnels []types.Tunnel + iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.TunnelStoreKeyPrefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var tunnel types.Tunnel + k.cdc.MustUnmarshal(iterator.Value(), &tunnel) + tunnels = append(tunnels, tunnel) + } + return tunnels +} + +// GetActiveTunnels returns all active tunnels +func (k Keeper) GetActiveTunnels(ctx sdk.Context) []types.Tunnel { + var tunnels []types.Tunnel + iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.TunnelStoreKeyPrefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var tunnel types.Tunnel + k.cdc.MustUnmarshal(iterator.Value(), &tunnel) + + if tunnel.IsActive { + tunnels = append(tunnels, tunnel) + } + } + return tunnels +} + +// GetRequiredProcessTunnels returns all tunnels that require processing +func (k Keeper) GetRequiredProcessTunnels( + ctx sdk.Context, +) []types.Tunnel { + var tunnels []types.Tunnel + activeTunnels := k.GetActiveTunnels(ctx) + latestPrices := k.feedsKeeper.GetPrices(ctx) + latestPricesMap := make(map[string]feedsTypes.Price, len(latestPrices)) + + // Populate the map with the latest prices + for _, price := range latestPrices { + latestPricesMap[price.SignalID] = price + } + + now := ctx.BlockTime() + unixNow := ctx.BlockTime().Unix() + + // Evaluate which tunnels require processing based on the price signals + for i, at := range activeTunnels { + var trigger bool + for j, sp := range at.SignalPriceInfos { + latestPrice, exists := latestPricesMap[sp.SignalID] + if exists { + difference := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) + differenceInBPS := uint64(difference * 10000) + + if differenceInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp.Unix()+int64(sp.Interval) { + // Update the price directly + activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price + activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now + trigger = true + } + } + } + + if trigger { + tunnels = append(tunnels, at) + } + } + return tunnels +} + +// ActivateTunnel activates a tunnel +func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error { + tunnel, err := k.GetTunnel(ctx, id) + if err != nil { + return err + } + + if tunnel.Creator != creator { + return fmt.Errorf("creator %s is not the creator of tunnel %d", creator, id) } - route, ok = tunnel.Route.GetCachedValue().(*types.AxelarRoute) - if ok { - fmt.Printf("AxelarRoute: %v\n", route) - return nil + tunnel.IsActive = true + + k.SetTunnel(ctx, tunnel) + return nil +} + +// SetParams sets the tunnel module parameters +func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { + switch r := tunnel.Route.GetCachedValue().(type) { + case *types.TSSRoute: + fmt.Printf("Generating TSS packets for tunnel %d, route %s\n", tunnel.ID, r.String()) + packetID := k.TSSPacketHandler(ctx, types.TSSPacket{ + TunnelID: tunnel.ID, + SignalPriceInfos: tunnel.SignalPriceInfos, + DestinationChainID: r.DestinationChainID, + DestinationContractAddress: r.DestinationContractAddress, + }) + + packet := k.MustGetTSSPacket(ctx, packetID) + // TODO: Emit event + fmt.Printf("Emitting event for TSS packet %d\n", packet.ID) + + case *types.AxelarRoute: + fmt.Printf("Generating Axelar packets for tunnel %d, route %s\n", tunnel.ID, r.String()) + k.AxelarPacketHandler(ctx, types.AxelarPacket{}) } - return fmt.Errorf("unknown route type: %s", tunnel.Route.String()) } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index edc274510..2d25d8c14 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -1,38 +1,54 @@ package keeper_test import ( + "fmt" + "testing" "time" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" - feedtypes "github.com/bandprotocol/chain/v2/x/feeds/types" + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func (s *KeeperTestSuite) TestGenerateTunnelAccount() { - ctx, k := s.ctx, s.keeper +func TestGenerateTunnelAccount(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper tunnelID := uint64(1) - addr := k.GenerateTunnelAccount(ctx, tunnelID) + s.MockAccountKeeper.EXPECT(). + NewAccount(ctx, gomock.Any()). + Return(authtypes.NewEmptyModuleAccount(fmt.Sprintf("%s-%d", types.ModuleName, tunnelID))).Times(1) + s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) - // Assert + addr := k.GenerateTunnelAccount(ctx, tunnelID) require.NotNil(s.T(), addr, "expected generated address to be non-nil") require.Equal( s.T(), - "band1mfkys3fdex2pvylxdutwk3ng26ys8pxtmjstgp", + "cosmos1mfkys3fdex2pvylxdutwk3ng26ys8pxtzasfsf", addr.String(), "expected generated address to match", ) } -func (s *KeeperTestSuite) TestAddTunnel() { - ctx, k := s.ctx, s.keeper +func TestAddTunnel(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper // Create a new tunnel instance tunnel := types.Tunnel{ID: 1} + // Mock the account keeper to generate a new account + s.MockAccountKeeper.EXPECT(). + NewAccount(ctx, gomock.Any()). + Return(authtypes.NewEmptyModuleAccount(fmt.Sprintf("%s-%d", types.ModuleName, tunnel.ID))).Times(1) + s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + // Add the tunnel to the keeper - k.AddTunnel(s.ctx, tunnel) + k.AddTunnel(ctx, tunnel) // Attempt to retrieve the tunnel by its ID retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) @@ -41,12 +57,12 @@ func (s *KeeperTestSuite) TestAddTunnel() { expected := types.Tunnel{ ID: 1, Route: nil, - FeedType: feedtypes.FEED_TYPE_UNSPECIFIED, - FeePayer: "band1mfkys3fdex2pvylxdutwk3ng26ys8pxtmjstgp", + FeedType: feedstypes.FEED_TYPE_UNSPECIFIED, + FeePayer: "cosmos1mfkys3fdex2pvylxdutwk3ng26ys8pxtzasfsf", SignalPriceInfos: nil, LastTriggeredBlockHeight: 0, IsActive: false, - CreatedAt: time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), + CreatedAt: s.Ctx.BlockTime(), Creator: "", } @@ -54,14 +70,15 @@ func (s *KeeperTestSuite) TestAddTunnel() { require.Equal(s.T(), expected, retrievedTunnel, "the retrieved tunnel should match the original") } -func (s *KeeperTestSuite) TestGetSetTunnel() { - ctx, k := s.ctx, s.keeper +func TestGetSetTunnel(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper // Create a new tunnel instance tunnel := types.Tunnel{ID: 1} // Set the tunnel in the keeper - k.SetTunnel(s.ctx, tunnel) + k.SetTunnel(ctx, tunnel) // Attempt to retrieve the tunnel by its ID retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) @@ -73,8 +90,113 @@ func (s *KeeperTestSuite) TestGetSetTunnel() { require.Equal(s.T(), tunnel, retrievedTunnel, "the retrieved tunnel should match the original") } -func (s *KeeperTestSuite) TestGetNextTunnelID() { - ctx, k := s.ctx, s.keeper +func TestGetTunnels(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Create a new tunnel instance + tunnel := types.Tunnel{ID: 1} + + // Set the tunnel in the keeper + k.SetTunnel(ctx, tunnel) + + // Retrieve all tunnels + tunnels := k.GetTunnels(ctx) + + // Assert the number of tunnels is 1 + require.Len(s.T(), tunnels, 1, "expected 1 tunnel to be retrieved") +} + +func TestGetActiveTunnels(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Create a new tunnel instance + tunnel := types.Tunnel{ID: 1, IsActive: true} + + // Set the tunnel in the keeper + k.SetTunnel(ctx, tunnel) + + // Retrieve all active tunnels + tunnels := k.GetActiveTunnels(ctx) + + // Assert the number of active tunnels is 1 + require.Len(s.T(), tunnels, 1, "expected 1 active tunnel to be retrieved") +} + +func TestGetRequiredProcessTunnels(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + now := ctx.BlockTime() + before := now.Add(-30 * time.Second) + + // Mock data for the test cases + tunnels := []types.Tunnel{ + { + ID: 1, + SignalPriceInfos: []types.SignalPriceInfo{ + { + SignalID: "signal1", + Price: 100, + DeviationBPS: 1000, + Interval: 30, + LastTimestamp: &now, + }, + }, + IsActive: true, + }, + { + ID: 2, + SignalPriceInfos: []types.SignalPriceInfo{ + {SignalID: "signal2", Price: 100, DeviationBPS: 1000, Interval: 30, LastTimestamp: &now}, + }, + IsActive: true, + }, + { + ID: 3, + SignalPriceInfos: []types.SignalPriceInfo{ + {SignalID: "signal3", Price: 100, DeviationBPS: 1000, Interval: 30, LastTimestamp: &before}, + }, + IsActive: true, + }, + } + prices := []feedstypes.Price{ + {SignalID: "signal1", Price: 110}, + {SignalID: "signal2", Price: 111}, + {SignalID: "signal3", Price: 101}, + } + + for _, tunnel := range tunnels { + k.SetTunnel(ctx, tunnel) + } + s.MockFeedsKeeper.EXPECT().GetPrices(ctx).Return(prices).Times(1) + + // Execute the function to test + resultTunnels := k.GetRequiredProcessTunnels(ctx) + + // Assert conditions + require.Len(t, resultTunnels, 2, "There should be 2 tunnels requiring processing") + require.Equal(t, uint64(2), resultTunnels[0].ID, "The tunnel requiring processing should be tunnel1") + + // check for correct updates in the SignalPriceInfos + require.Equal( + t, + uint64(111), + resultTunnels[0].SignalPriceInfos[0].Price, + "The price should be updated to the latest price", + ) + require.Equal( + t, + uint64(101), + resultTunnels[1].SignalPriceInfos[0].Price, + "The price should be updated to the latest price", + ) +} + +func TestGetNextTunnelID(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper firstID := k.GetNextTunnelID(ctx) require.Equal(s.T(), uint64(1), firstID, "expected first tunnel ID to be 1") diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go new file mode 100644 index 000000000..0d25cae78 --- /dev/null +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -0,0 +1,290 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: x/tunnel/types/expected_keepers.go +// +// Generated by this command: +// +// mockgen --destination x/tunnel/testutil/mock_expected_keepers.go --source x/tunnel/types/expected_keepers.go --package testutil +// + +// Package testutil is a generated GoMock package. +package testutil + +import ( + reflect "reflect" + + types "github.com/bandprotocol/chain/v2/x/bandtss/types" + types0 "github.com/bandprotocol/chain/v2/x/feeds/types" + types1 "github.com/bandprotocol/chain/v2/x/tss/types" + types2 "github.com/cosmos/cosmos-sdk/types" + types3 "github.com/cosmos/cosmos-sdk/x/auth/types" + gomock "go.uber.org/mock/gomock" +) + +// MockAccountKeeper is a mock of AccountKeeper interface. +type MockAccountKeeper struct { + ctrl *gomock.Controller + recorder *MockAccountKeeperMockRecorder +} + +// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. +type MockAccountKeeperMockRecorder struct { + mock *MockAccountKeeper +} + +// NewMockAccountKeeper creates a new mock instance. +func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { + mock := &MockAccountKeeper{ctrl: ctrl} + mock.recorder = &MockAccountKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { + return m.recorder +} + +// GetAccount mocks base method. +func (m *MockAccountKeeper) GetAccount(ctx types2.Context, addr types2.AccAddress) types3.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccount", ctx, addr) + ret0, _ := ret[0].(types3.AccountI) + return ret0 +} + +// GetAccount indicates an expected call of GetAccount. +func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) +} + +// GetModuleAccount mocks base method. +func (m *MockAccountKeeper) GetModuleAccount(ctx types2.Context, moduleName string) types3.ModuleAccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) + ret0, _ := ret[0].(types3.ModuleAccountI) + return ret0 +} + +// GetModuleAccount indicates an expected call of GetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName) +} + +// GetModuleAddress mocks base method. +func (m *MockAccountKeeper) GetModuleAddress(name string) types2.AccAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddress", name) + ret0, _ := ret[0].(types2.AccAddress) + return ret0 +} + +// GetModuleAddress indicates an expected call of GetModuleAddress. +func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) +} + +// IterateAccounts mocks base method. +func (m *MockAccountKeeper) IterateAccounts(ctx types2.Context, process func(types3.AccountI) bool) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "IterateAccounts", ctx, process) +} + +// IterateAccounts indicates an expected call of IterateAccounts. +func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, process any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAccounts", reflect.TypeOf((*MockAccountKeeper)(nil).IterateAccounts), ctx, process) +} + +// NewAccount mocks base method. +func (m *MockAccountKeeper) NewAccount(ctx types2.Context, account types3.AccountI) types3.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewAccount", ctx, account) + ret0, _ := ret[0].(types3.AccountI) + return ret0 +} + +// NewAccount indicates an expected call of NewAccount. +func (mr *MockAccountKeeperMockRecorder) NewAccount(ctx, account any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccount", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccount), ctx, account) +} + +// SetAccount mocks base method. +func (m *MockAccountKeeper) SetAccount(ctx types2.Context, account types3.AccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetAccount", ctx, account) +} + +// SetAccount indicates an expected call of SetAccount. +func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, account any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, account) +} + +// SetModuleAccount mocks base method. +func (m *MockAccountKeeper) SetModuleAccount(arg0 types2.Context, arg1 types3.ModuleAccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetModuleAccount", arg0, arg1) +} + +// SetModuleAccount indicates an expected call of SetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1) +} + +// MockBankKeeper is a mock of BankKeeper interface. +type MockBankKeeper struct { + ctrl *gomock.Controller + recorder *MockBankKeeperMockRecorder +} + +// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. +type MockBankKeeperMockRecorder struct { + mock *MockBankKeeper +} + +// NewMockBankKeeper creates a new mock instance. +func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { + mock := &MockBankKeeper{ctrl: ctrl} + mock.recorder = &MockBankKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { + return m.recorder +} + +// GetAllBalances mocks base method. +func (m *MockBankKeeper) GetAllBalances(ctx types2.Context, addr types2.AccAddress) types2.Coins { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr) + ret0, _ := ret[0].(types2.Coins) + return ret0 +} + +// GetAllBalances indicates an expected call of GetAllBalances. +func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr) +} + +// SendCoinsFromAccountToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types2.Context, senderAddr types2.AccAddress, recipientModule string, amt types2.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) +} + +// SendCoinsFromModuleToAccount mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx types2.Context, senderModule string, recipientAddr types2.AccAddress, amt types2.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToAccount", ctx, senderModule, recipientAddr, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) +} + +// SendCoinsFromModuleToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types2.Context, senderModule, recipientModule string, amt types2.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt) +} + +// MockFeedsKeeper is a mock of FeedsKeeper interface. +type MockFeedsKeeper struct { + ctrl *gomock.Controller + recorder *MockFeedsKeeperMockRecorder +} + +// MockFeedsKeeperMockRecorder is the mock recorder for MockFeedsKeeper. +type MockFeedsKeeperMockRecorder struct { + mock *MockFeedsKeeper +} + +// NewMockFeedsKeeper creates a new mock instance. +func NewMockFeedsKeeper(ctrl *gomock.Controller) *MockFeedsKeeper { + mock := &MockFeedsKeeper{ctrl: ctrl} + mock.recorder = &MockFeedsKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockFeedsKeeper) EXPECT() *MockFeedsKeeperMockRecorder { + return m.recorder +} + +// GetPrices mocks base method. +func (m *MockFeedsKeeper) GetPrices(ctx types2.Context) []types0.Price { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPrices", ctx) + ret0, _ := ret[0].([]types0.Price) + return ret0 +} + +// GetPrices indicates an expected call of GetPrices. +func (mr *MockFeedsKeeperMockRecorder) GetPrices(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetPrices), ctx) +} + +// MockBandtssKeeper is a mock of BandtssKeeper interface. +type MockBandtssKeeper struct { + ctrl *gomock.Controller + recorder *MockBandtssKeeperMockRecorder +} + +// MockBandtssKeeperMockRecorder is the mock recorder for MockBandtssKeeper. +type MockBandtssKeeperMockRecorder struct { + mock *MockBandtssKeeper +} + +// NewMockBandtssKeeper creates a new mock instance. +func NewMockBandtssKeeper(ctrl *gomock.Controller) *MockBandtssKeeper { + mock := &MockBandtssKeeper{ctrl: ctrl} + mock.recorder = &MockBandtssKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBandtssKeeper) EXPECT() *MockBandtssKeeperMockRecorder { + return m.recorder +} + +// HandleCreateSigning mocks base method. +func (m *MockBandtssKeeper) HandleCreateSigning(ctx types2.Context, content types1.Content, sender types2.AccAddress, feeLimit types2.Coins) (types.SigningID, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "HandleCreateSigning", ctx, content, sender, feeLimit) + ret0, _ := ret[0].(types.SigningID) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// HandleCreateSigning indicates an expected call of HandleCreateSigning. +func (mr *MockBandtssKeeperMockRecorder) HandleCreateSigning(ctx, content, sender, feeLimit any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleCreateSigning", reflect.TypeOf((*MockBandtssKeeper)(nil).HandleCreateSigning), ctx, content, sender, feeLimit) +} diff --git a/x/tunnel/testutil/mock_keeper.go b/x/tunnel/testutil/mock_keeper.go new file mode 100644 index 000000000..eb6d92042 --- /dev/null +++ b/x/tunnel/testutil/mock_keeper.go @@ -0,0 +1,77 @@ +package testutil + +import ( + "testing" + "time" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/codec" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "go.uber.org/mock/gomock" + + "github.com/bandprotocol/chain/v2/x/tunnel" + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// TestSuite is a struct that embeds a *testing.T and provides a setup for a mock keeper +type TestSuite struct { + t *testing.T + Keeper *keeper.Keeper + QueryServer types.QueryServer + + MockAccountKeeper *MockAccountKeeper + MockBankKeeper *MockBankKeeper + MockFeedsKeeper *MockFeedsKeeper + MockBandtssKeeper *MockBandtssKeeper + + Ctx sdk.Context + Authority sdk.AccAddress +} + +// NewTestSuite returns a new TestSuite object +func NewTestSuite(t *testing.T) TestSuite { + ctrl := gomock.NewController(t) + key := sdk.NewKVStoreKey(types.StoreKey) + testCtx := sdktestutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(tunnel.AppModuleBasic{}) + ctx := testCtx.Ctx.WithBlockHeader(tmproto.Header{Time: time.Now().UTC()}) + + accountKeeper := NewMockAccountKeeper(ctrl) + bankKeeper := NewMockBankKeeper(ctrl) + feedsKeeper := NewMockFeedsKeeper(ctrl) + bandtssKeeper := NewMockBandtssKeeper(ctrl) + + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authority).AnyTimes() + tunnelKeeper := keeper.NewKeeper( + encCfg.Codec.(codec.BinaryCodec), + key, + accountKeeper, + bankKeeper, + feedsKeeper, + bandtssKeeper, + authority.String(), + ) + queryServer := keeper.NewQueryServer(tunnelKeeper) + + return TestSuite{ + t: t, + Keeper: &tunnelKeeper, + QueryServer: queryServer, + MockAccountKeeper: accountKeeper, + MockBankKeeper: bankKeeper, + MockFeedsKeeper: feedsKeeper, + MockBandtssKeeper: bandtssKeeper, + Ctx: ctx, + Authority: authority, + } +} + +func (s *TestSuite) T() *testing.T { + return s.t +} diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index f7205baf3..e53c5ed79 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,7 +2,17 @@ package types // events const ( - EventTypeUpdateParams = "update_params" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeActivateTunnel = "activate_tunnel" - AttributeKeyParams = "params" + AttributeKeyParams = "params" + AttributeKeyTunnelID = "tunnel_id" + AttributeRoute = "route" + AttributeFeedType = "feed_type" + AttributeFeePayer = "fee_payer" + AttributeSignalPriceInfos = "signal_price_infos" + AttributeIsActive = "is_active" + AttributeKeyCreatedAt = "created_at" + AttributeCreator = "creator" ) diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 141cc774a..352da9b24 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -3,6 +3,10 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + bandtsstypes "github.com/bandprotocol/chain/v2/x/bandtss/types" + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" + tsstypes "github.com/bandprotocol/chain/v2/x/tss/types" ) // AccountKeeper defines the expected account keeper (noalias) @@ -37,3 +41,16 @@ type BankKeeper interface { ) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error } + +type FeedsKeeper interface { + GetPrices(ctx sdk.Context) (prices []feedstypes.Price) +} + +type BandtssKeeper interface { + HandleCreateSigning( + ctx sdk.Context, + content tsstypes.Content, + sender sdk.AccAddress, + feeLimit sdk.Coins, + ) (bandtsstypes.SigningID, error) +} diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index b2f780ea6..985e85867 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -65,7 +65,7 @@ func NewMsgCreateTunnel( ) (*MsgCreateTunnel, error) { msg, ok := route.(proto.Message) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", msg) + return nil, sdkerrors.ErrPackAny.Wrapf("cannot proto marshal %T", msg) } any, err := types.NewAnyWithValue(msg) if err != nil { @@ -153,6 +153,22 @@ func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { + switch r := m.Route.GetCachedValue().(type) { + case *TSSRoute: + // Validate TSSRoute + err := r.ValidateBasic() + if err != nil { + return err + } + case *AxelarRoute: + // Validate AxelarRoute + err := r.ValidateBasic() + if err != nil { + return err + } + default: + return sdkerrors.ErrUnknownRequest.Wrapf("unknown route type") + } return nil } @@ -187,3 +203,32 @@ func (m MsgCreateTunnel) GetTunnelRoute() Route { } return route } + +// NewMsgActivateTunnel creates a new MsgActivateTunnel instance. +func NewMsgActivateTunnel( + id uint64, + creator string, +) *MsgActivateTunnel { + return &MsgActivateTunnel{ + TunnelID: id, + Creator: creator, + } +} + +// Route Implements Msg. +func (m MsgActivateTunnel) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgActivateTunnel) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgActivateTunnel) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgActivateTunnel) ValidateBasic() error { + return nil +} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index eb531d6f3..bd2933e93 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -382,11 +382,11 @@ func (m *Tunnel) GetCreator() string { type TSSPacket struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - SignalPriceInfos []*SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` SigningID github_com_bandprotocol_chain_v2_pkg_tss.SigningID `protobuf:"varint,4,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/pkg/tss.SigningID" json:"signing_id,omitempty"` DestinationChainID string `protobuf:"bytes,5,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` DestinationContractAddress string `protobuf:"bytes,6,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt *time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` + CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` } func (m *TSSPacket) Reset() { *m = TSSPacket{} } @@ -436,7 +436,7 @@ func (m *TSSPacket) GetTunnelID() uint64 { return 0 } -func (m *TSSPacket) GetSignalPriceInfos() []*SignalPriceInfo { +func (m *TSSPacket) GetSignalPriceInfos() []SignalPriceInfo { if m != nil { return m.SignalPriceInfos } @@ -464,21 +464,21 @@ func (m *TSSPacket) GetDestinationContractAddress() string { return "" } -func (m *TSSPacket) GetCreatedAt() *time.Time { +func (m *TSSPacket) GetCreatedAt() time.Time { if m != nil { return m.CreatedAt } - return nil + return time.Time{} } type AxelarPacket struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - SignalPriceInfos []*SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos,omitempty"` - IBCQueueID uint64 `protobuf:"varint,4,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` - DestinationChainID string `protobuf:"bytes,5,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - DestinationContractAddress string `protobuf:"bytes,6,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt *time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + IBCQueueID uint64 `protobuf:"varint,4,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` + DestinationChainID string `protobuf:"bytes,5,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,6,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` } func (m *AxelarPacket) Reset() { *m = AxelarPacket{} } @@ -528,7 +528,7 @@ func (m *AxelarPacket) GetTunnelID() uint64 { return 0 } -func (m *AxelarPacket) GetSignalPriceInfos() []*SignalPriceInfo { +func (m *AxelarPacket) GetSignalPriceInfos() []SignalPriceInfo { if m != nil { return m.SignalPriceInfos } @@ -556,11 +556,11 @@ func (m *AxelarPacket) GetDestinationContractAddress() string { return "" } -func (m *AxelarPacket) GetCreatedAt() *time.Time { +func (m *AxelarPacket) GetCreatedAt() time.Time { if m != nil { return m.CreatedAt } - return nil + return time.Time{} } func init() { @@ -576,61 +576,61 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 864 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x17, 0x35, 0xad, 0x1f, 0x93, 0x63, 0xc5, 0x5f, 0x30, 0x10, 0xf2, 0xb1, 0x72, 0x21, 0x1a, 0x5e, - 0x39, 0x8b, 0x90, 0x8d, 0xda, 0x6c, 0x02, 0x14, 0xad, 0x68, 0x21, 0x08, 0x81, 0x06, 0x70, 0x49, - 0xad, 0xba, 0x21, 0x86, 0xe4, 0x88, 0x1e, 0x58, 0xe6, 0xb0, 0x9c, 0x91, 0x10, 0xbd, 0x85, 0x1f, - 0xa1, 0x05, 0x5a, 0xa0, 0x0f, 0x90, 0x87, 0x08, 0xba, 0x0a, 0x8a, 0x2e, 0xba, 0x52, 0x0b, 0x7a, - 0xd3, 0x7d, 0xbb, 0xea, 0xaa, 0x98, 0x1f, 0x49, 0x95, 0x9b, 0xc0, 0x59, 0x14, 0x68, 0xd0, 0x1d, - 0xef, 0x9c, 0x73, 0x67, 0xee, 0xcc, 0x39, 0xf7, 0x82, 0xe0, 0x90, 0xcf, 0x8a, 0x02, 0x4f, 0xbd, - 0xf9, 0xc3, 0x04, 0x73, 0xf4, 0xd0, 0x53, 0xa1, 0x5b, 0x56, 0x94, 0x53, 0x78, 0xa0, 0x23, 0x0d, - 0xf6, 0xba, 0x39, 0xcd, 0xa9, 0x84, 0x3c, 0xf1, 0xa5, 0x58, 0x3d, 0x27, 0xa7, 0x34, 0x9f, 0x62, - 0x4f, 0x46, 0xc9, 0x6c, 0xe2, 0x71, 0x72, 0x89, 0x19, 0x47, 0x97, 0xa5, 0x26, 0xbc, 0x77, 0x93, - 0x80, 0x8a, 0xc5, 0x0a, 0x4a, 0x29, 0xbb, 0xa4, 0x2c, 0x56, 0x9b, 0xaa, 0x60, 0x05, 0x4d, 0x30, - 0xce, 0xd8, 0xba, 0x30, 0x19, 0x29, 0xe8, 0xf8, 0x6b, 0x03, 0x98, 0xe3, 0x28, 0x0a, 0xe9, 0x8c, - 0x63, 0xf8, 0x14, 0x74, 0x33, 0xcc, 0x38, 0x29, 0x10, 0x27, 0xb4, 0x88, 0xd3, 0x73, 0x44, 0x8a, - 0x98, 0x64, 0xb6, 0x71, 0x64, 0x9c, 0x58, 0xfe, 0xbd, 0x7a, 0xe9, 0xc0, 0xd1, 0x06, 0x3f, 0x15, - 0x70, 0x30, 0x0a, 0x61, 0x76, 0x73, 0x2d, 0x83, 0x9f, 0x82, 0xf7, 0x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0x97, 0x33, 0x3c, 0xc3, - 0x1b, 0x6d, 0x0f, 0xea, 0xa5, 0x03, 0x02, 0xff, 0xf4, 0x73, 0xb1, 0x1c, 0x8c, 0x42, 0x40, 0x92, - 0x54, 0x7d, 0xff, 0x17, 0x75, 0xf2, 0x9f, 0x7d, 0x57, 0xf7, 0x8d, 0x97, 0x75, 0xdf, 0x78, 0x55, - 0xf7, 0x8d, 0x5f, 0xea, 0xbe, 0x71, 0x75, 0xdd, 0xdf, 0x79, 0x75, 0xdd, 0xdf, 0xf9, 0xe9, 0xba, - 0xbf, 0xf3, 0x85, 0x77, 0xab, 0xaf, 0x9f, 0xeb, 0x1f, 0x26, 0x4f, 0x0c, 0x57, 0x96, 0xb4, 0x25, - 0xe3, 0xc3, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xaf, 0x24, 0x7b, 0x56, 0x09, 0x00, 0x00, + // 853 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xae, 0x9b, 0x1f, 0xb5, 0xa7, 0xd9, 0xb2, 0x1a, 0x45, 0x8b, 0x49, 0x51, 0x5c, 0xf5, 0xd4, + 0x3d, 0xac, 0xcd, 0x06, 0xf6, 0xb2, 0x12, 0x12, 0x71, 0xa3, 0xd5, 0x5a, 0x02, 0xa9, 0xd8, 0x39, + 0x71, 0xb1, 0xc6, 0xf6, 0xc4, 0x1d, 0x35, 0xf5, 0x18, 0xcf, 0x24, 0xda, 0xfc, 0x17, 0xfd, 0x13, + 0x40, 0xe2, 0xc0, 0x8d, 0xcb, 0xfe, 0x11, 0x2b, 0x4e, 0x2b, 0x4e, 0x9c, 0x0c, 0x72, 0x2f, 0xdc, + 0xe1, 0xc4, 0x09, 0xcd, 0x8f, 0xa4, 0xb4, 0xa8, 0xaa, 0x04, 0x48, 0x54, 0xdc, 0xfc, 0xe6, 0xfb, + 0xde, 0xcc, 0x9b, 0xf9, 0xbe, 0xf7, 0x12, 0xb0, 0xcf, 0x17, 0x45, 0x81, 0xe7, 0xde, 0xf2, 0x69, + 0x82, 0x39, 0x7a, 0xea, 0xa9, 0xd0, 0x2d, 0x2b, 0xca, 0x29, 0xdc, 0xd3, 0x91, 0x06, 0x07, 0xfd, + 0x9c, 0xe6, 0x54, 0x42, 0x9e, 0xf8, 0x52, 0xac, 0x81, 0x93, 0x53, 0x9a, 0xcf, 0xb1, 0x27, 0xa3, + 0x64, 0x31, 0xf3, 0x38, 0x39, 0xc7, 0x8c, 0xa3, 0xf3, 0x52, 0x13, 0xde, 0xbb, 0x49, 0x40, 0xc5, + 0x6a, 0x0d, 0xa5, 0x94, 0x9d, 0x53, 0x16, 0xab, 0x4d, 0x55, 0xb0, 0x86, 0x66, 0x18, 0x67, 0x6c, + 0x53, 0x98, 0x8c, 0x14, 0x74, 0xf8, 0xb5, 0x01, 0xcc, 0x69, 0x14, 0x85, 0x74, 0xc1, 0x31, 0x7c, + 0x09, 0xfa, 0x19, 0x66, 0x9c, 0x14, 0x88, 0x13, 0x5a, 0xc4, 0xe9, 0x29, 0x22, 0x45, 0x4c, 0x32, + 0xdb, 0x38, 0x30, 0x8e, 0x2c, 0xff, 0x51, 0x53, 0x3b, 0x70, 0x72, 0x85, 0x1f, 0x0b, 0x38, 0x98, + 0x84, 0x30, 0xbb, 0xb9, 0x96, 0xc1, 0x4f, 0xc0, 0xfb, 0xd7, 0x76, 0xa2, 0x05, 0xaf, 0x50, 0xca, + 0x63, 0x94, 0x65, 0x15, 0x66, 0xcc, 0xde, 0x16, 0x3b, 0x86, 0x83, 0x3f, 0x67, 0x6a, 0xca, 0x58, + 0x31, 0x9e, 0x5b, 0xdf, 0xbf, 0x7e, 0xd2, 0x91, 0x65, 0x1d, 0x7e, 0x63, 0x80, 0xdd, 0xf1, 0x2b, + 0x3c, 0x47, 0xd5, 0xbd, 0x2e, 0xf3, 0xc2, 0x00, 0x20, 0x22, 0x79, 0x81, 0xe6, 0x41, 0x31, 0xa3, + 0xf0, 0x31, 0xb0, 0x98, 0x8c, 0xae, 0x4a, 0xeb, 0x35, 0xb5, 0x63, 0x6a, 0xca, 0x24, 0x34, 0x15, + 0x1c, 0x64, 0xf0, 0x19, 0x78, 0x90, 0xe1, 0x25, 0x51, 0x45, 0x24, 0xa5, 0x3a, 0xb7, 0xed, 0x3f, + 0x6c, 0x6a, 0xa7, 0x37, 0x59, 0x03, 0xfe, 0x49, 0x14, 0xf6, 0x36, 0x34, 0xbf, 0x64, 0x70, 0x00, + 0x4c, 0x52, 0x70, 0x5c, 0x2d, 0xd1, 0xdc, 0x6e, 0x89, 0x8c, 0x70, 0x13, 0x3f, 0x6f, 0xff, 0xf2, + 0x95, 0x63, 0x1c, 0xfe, 0x6a, 0x80, 0x77, 0xd4, 0x79, 0x27, 0x15, 0x49, 0xf1, 0x7f, 0x5f, 0x17, + 0xec, 0x83, 0x4e, 0x29, 0x4a, 0xb1, 0xdb, 0x12, 0x50, 0x01, 0x7c, 0x01, 0x1e, 0x7c, 0x8a, 0x18, + 0x9f, 0xae, 0xdd, 0x6e, 0x77, 0x0e, 0x8c, 0xa3, 0xdd, 0xd1, 0xc0, 0x55, 0x76, 0x77, 0xd7, 0x76, + 0x77, 0x37, 0x0c, 0xbf, 0x7d, 0xf1, 0x93, 0x63, 0x84, 0xd7, 0xd3, 0xf4, 0xad, 0x7f, 0x6b, 0x81, + 0xee, 0x54, 0xb6, 0x1b, 0x7c, 0x04, 0xb6, 0xf5, 0x2d, 0xdb, 0x7e, 0xb7, 0xa9, 0x9d, 0xed, 0x60, + 0x12, 0x6e, 0x13, 0x71, 0xb3, 0x4e, 0x25, 0x44, 0x93, 0x37, 0xda, 0x1d, 0xf5, 0xff, 0x72, 0xd0, + 0xb8, 0x58, 0xf9, 0x57, 0xda, 0x86, 0x8a, 0x0d, 0x3f, 0x02, 0x96, 0x68, 0x9e, 0x98, 0xaf, 0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b, 0xfd, 0x27, 0xca, 0x13, + 0x03, 0x97, 0x25, 0x5d, 0xc9, 0xf8, 0xf0, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x06, 0x2f, + 0xd2, 0x6a, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -839,7 +839,7 @@ func (this *TSSPacket) Equal(that interface{}) bool { return false } for i := range this.SignalPriceInfos { - if !this.SignalPriceInfos[i].Equal(that1.SignalPriceInfos[i]) { + if !this.SignalPriceInfos[i].Equal(&that1.SignalPriceInfos[i]) { return false } } @@ -852,11 +852,7 @@ func (this *TSSPacket) Equal(that interface{}) bool { if this.DestinationContractAddress != that1.DestinationContractAddress { return false } - if that1.CreatedAt == nil { - if this.CreatedAt != nil { - return false - } - } else if !this.CreatedAt.Equal(*that1.CreatedAt) { + if !this.CreatedAt.Equal(that1.CreatedAt) { return false } return true @@ -890,7 +886,7 @@ func (this *AxelarPacket) Equal(that interface{}) bool { return false } for i := range this.SignalPriceInfos { - if !this.SignalPriceInfos[i].Equal(that1.SignalPriceInfos[i]) { + if !this.SignalPriceInfos[i].Equal(&that1.SignalPriceInfos[i]) { return false } } @@ -903,11 +899,7 @@ func (this *AxelarPacket) Equal(that interface{}) bool { if this.DestinationContractAddress != that1.DestinationContractAddress { return false } - if that1.CreatedAt == nil { - if this.CreatedAt != nil { - return false - } - } else if !this.CreatedAt.Equal(*that1.CreatedAt) { + if !this.CreatedAt.Equal(that1.CreatedAt) { return false } return true @@ -1197,16 +1189,14 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.CreatedAt != nil { - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt):]) - if err4 != nil { - return 0, err4 - } - i -= n4 - i = encodeVarintTunnel(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x3a + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) + if err4 != nil { + return 0, err4 } + i -= n4 + i = encodeVarintTunnel(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x3a if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) @@ -1273,16 +1263,14 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.CreatedAt != nil { - n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintTunnel(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x3a + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) + if err5 != nil { + return 0, err5 } + i -= n5 + i = encodeVarintTunnel(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x3a if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) @@ -1489,10 +1477,8 @@ func (m *TSSPacket) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - if m.CreatedAt != nil { - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt) - n += 1 + l + sovTunnel(uint64(l)) - } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) + n += 1 + l + sovTunnel(uint64(l)) return n } @@ -1525,10 +1511,8 @@ func (m *AxelarPacket) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - if m.CreatedAt != nil { - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt) - n += 1 + l + sovTunnel(uint64(l)) - } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) + n += 1 + l + sovTunnel(uint64(l)) return n } @@ -2451,7 +2435,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPriceInfos = append(m.SignalPriceInfos, &SignalPriceInfo{}) + m.SignalPriceInfos = append(m.SignalPriceInfos, SignalPriceInfo{}) if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2568,10 +2552,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CreatedAt == nil { - m.CreatedAt = new(time.Time) - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2692,7 +2673,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPriceInfos = append(m.SignalPriceInfos, &SignalPriceInfo{}) + m.SignalPriceInfos = append(m.SignalPriceInfos, SignalPriceInfo{}) if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2809,10 +2790,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CreatedAt == nil { - m.CreatedAt = new(time.Time) - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 86ea30005..6ab6fe89a 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -114,7 +114,7 @@ func (m *MsgCreateTunnel) GetCreator() string { // MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. type MsgCreateTunnelResponse struct { - TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` } func (m *MsgCreateTunnelResponse) Reset() { *m = MsgCreateTunnelResponse{} } @@ -150,13 +150,103 @@ func (m *MsgCreateTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateTunnelResponse proto.InternalMessageInfo -func (m *MsgCreateTunnelResponse) GetTunnelId() string { +func (m *MsgCreateTunnelResponse) GetTunnelID() uint64 { if m != nil { - return m.TunnelId + return m.TunnelID + } + return 0 +} + +// MsgActivateTunnel is the transaction message to activate a tunnel. +type MsgActivateTunnel struct { + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *MsgActivateTunnel) Reset() { *m = MsgActivateTunnel{} } +func (m *MsgActivateTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgActivateTunnel) ProtoMessage() {} +func (*MsgActivateTunnel) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{2} +} +func (m *MsgActivateTunnel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgActivateTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgActivateTunnel.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 *MsgActivateTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgActivateTunnel.Merge(m, src) +} +func (m *MsgActivateTunnel) XXX_Size() int { + return m.Size() +} +func (m *MsgActivateTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgActivateTunnel.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgActivateTunnel proto.InternalMessageInfo + +func (m *MsgActivateTunnel) GetTunnelID() uint64 { + if m != nil { + return m.TunnelID + } + return 0 +} + +func (m *MsgActivateTunnel) GetCreator() string { + if m != nil { + return m.Creator } return "" } +// MsgActivateTunnelResponse is the response type for the Msg/ActivateTunnel RPC method. +type MsgActivateTunnelResponse struct { +} + +func (m *MsgActivateTunnelResponse) Reset() { *m = MsgActivateTunnelResponse{} } +func (m *MsgActivateTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgActivateTunnelResponse) ProtoMessage() {} +func (*MsgActivateTunnelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{3} +} +func (m *MsgActivateTunnelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgActivateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgActivateTunnelResponse.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 *MsgActivateTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgActivateTunnelResponse.Merge(m, src) +} +func (m *MsgActivateTunnelResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgActivateTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgActivateTunnelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgActivateTunnelResponse proto.InternalMessageInfo + // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { // Authority is the address of the governance account. @@ -169,7 +259,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{2} + return fileDescriptor_747f2bf21e50fad9, []int{4} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -220,7 +310,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{3} + return fileDescriptor_747f2bf21e50fad9, []int{5} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -252,6 +342,8 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateTunnel)(nil), "tunnel.v1beta1.MsgCreateTunnel") proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") + proto.RegisterType((*MsgActivateTunnel)(nil), "tunnel.v1beta1.MsgActivateTunnel") + proto.RegisterType((*MsgActivateTunnelResponse)(nil), "tunnel.v1beta1.MsgActivateTunnelResponse") proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") } @@ -259,46 +351,50 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 613 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0x3f, 0x6f, 0xda, 0x4e, - 0x18, 0xc6, 0x3f, 0xf2, 0x8f, 0x4b, 0x94, 0x9f, 0x6a, 0x45, 0xc1, 0x10, 0xc9, 0x20, 0x96, 0xd0, - 0x48, 0xf8, 0x8a, 0x9b, 0x66, 0xc8, 0x16, 0x90, 0x2a, 0x31, 0x44, 0xaa, 0x9c, 0x54, 0x8a, 0xba, - 0xa0, 0xb3, 0x7d, 0x18, 0xab, 0x70, 0x67, 0xf9, 0x0e, 0x14, 0xd6, 0x2e, 0x95, 0x3a, 0xf5, 0x73, - 0x64, 0xca, 0x90, 0xa5, 0xdf, 0x20, 0xea, 0x14, 0x75, 0xea, 0xd4, 0x56, 0x30, 0xe4, 0x6b, 0x54, - 0xbe, 0x3b, 0x13, 0xb0, 0x68, 0xbb, 0xe0, 0xbb, 0xf7, 0x79, 0xde, 0xf7, 0x9e, 0xf7, 0x79, 0x5f, - 0x40, 0x91, 0x8f, 0x08, 0xc1, 0x03, 0x38, 0x6e, 0xba, 0x98, 0xa3, 0x26, 0xe4, 0xd7, 0x56, 0x14, - 0x53, 0x4e, 0xf5, 0x5d, 0x09, 0x58, 0x0a, 0x28, 0x97, 0x02, 0x4a, 0x83, 0x01, 0x86, 0x02, 0x75, - 0x47, 0x3d, 0x88, 0xc8, 0x44, 0x52, 0xcb, 0x7b, 0x01, 0x0d, 0xa8, 0x38, 0xc2, 0xe4, 0xa4, 0xa2, - 0x07, 0x99, 0xca, 0x11, 0x8a, 0xd1, 0x90, 0x29, 0xb0, 0xe4, 0x51, 0x36, 0xa4, 0xac, 0x2b, 0xb3, - 0xe4, 0x45, 0x41, 0xa6, 0xbc, 0x41, 0x17, 0x31, 0x3c, 0x4f, 0xf6, 0x68, 0x48, 0x14, 0x5e, 0x54, - 0xf8, 0x90, 0x05, 0x70, 0xdc, 0x4c, 0x3e, 0x0a, 0x78, 0x86, 0x86, 0x21, 0xa1, 0x50, 0xfc, 0xfe, - 0x41, 0x83, 0xea, 0x49, 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 0x4d, 0xed, - 0xf3, 0xcc, 0xcc, 0x3d, 0xcc, 0xcc, 0xdc, 0xf7, 0x99, 0x99, 0x7b, 0x07, 0x17, 0xb6, 0xcc, 0x45, - 0xc4, 0x17, 0xeb, 0xef, 0xd1, 0x01, 0xf4, 0xfa, 0x28, 0x24, 0x70, 0x6c, 0xc3, 0x6b, 0xf5, 0x5f, - 0x95, 0x2b, 0xe7, 0x6e, 0x08, 0xc6, 0xcb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x63, 0x2a, - 0xaf, 0xaf, 0x04, 0x00, 0x00, + // 678 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x3d, 0x4f, 0xdb, 0x40, + 0x18, 0x8e, 0x09, 0x5f, 0x39, 0x22, 0x2a, 0x2c, 0x44, 0x9c, 0x20, 0x39, 0x69, 0x16, 0x02, 0x12, + 0xbe, 0x92, 0xd2, 0x0e, 0xdd, 0x08, 0xa8, 0x52, 0x06, 0xa4, 0xca, 0x50, 0x09, 0x75, 0x68, 0xe4, + 0xd8, 0x17, 0x73, 0x6a, 0x72, 0x67, 0xf9, 0x2e, 0x11, 0x59, 0xbb, 0x54, 0xea, 0xd4, 0xb5, 0x43, + 0xff, 0x00, 0x13, 0x03, 0x3f, 0x02, 0x75, 0x42, 0x9d, 0x3a, 0xd1, 0x2a, 0x19, 0xf8, 0x1b, 0x95, + 0xef, 0xce, 0xf9, 0x70, 0xd3, 0xc2, 0x92, 0xdc, 0xbd, 0xcf, 0xf3, 0xbe, 0xf7, 0xbc, 0x5f, 0x06, + 0x39, 0xde, 0x25, 0x04, 0xb5, 0x61, 0x6f, 0xaf, 0x89, 0xb8, 0xb3, 0x07, 0xf9, 0x85, 0x15, 0x84, + 0x94, 0x53, 0x7d, 0x55, 0x02, 0x96, 0x02, 0x0a, 0x79, 0x9f, 0x52, 0xbf, 0x8d, 0xa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 0x49, 0x79, 0x13, 0xe4, 0xff, 0x32, 0xc6, + 0x79, 0x96, 0x2f, 0x35, 0x31, 0x8c, 0x6f, 0x03, 0xcf, 0xe1, 0xe8, 0x8d, 0xd8, 0x22, 0xfd, 0x25, + 0xc8, 0x38, 0x5d, 0x7e, 0x4e, 0x43, 0xcc, 0xfb, 0x42, 0xfa, 0xff, 0x14, 0x8d, 0xa9, 0xfa, 0x3e, + 0x58, 0x94, 0x7b, 0xa8, 0x06, 0x70, 0x23, 0x39, 0xbe, 0x32, 0xbe, 0x1a, 0x5d, 0xc5, 0x95, 0x99, + 0x8c, 0xa3, 0x24, 0xfa, 0x35, 0x29, 0xac, 0x9c, 0x17, 0xfd, 0x9a, 0x34, 0xc5, 0x79, 0x54, 0xbf, + 0xce, 0x81, 0xf4, 0x31, 0xf3, 0xf5, 0x33, 0x90, 0x9d, 0x5a, 0xac, 0x62, 0x52, 0x43, 0xa2, 0xe1, + 0x85, 0xad, 0x07, 0x08, 0xa3, 0x89, 0x78, 0x0f, 0x56, 0x13, 0x2d, 0x7e, 0x3a, 0xc3, 0x75, 0x9a, + 0x52, 0xd8, 0x7e, 0x90, 0x32, 0x8a, 0x7f, 0x06, 0xb2, 0x53, 0x5d, 0x98, 0xa5, 0x7c, 0x92, 0x30, + 0x53, 0xf9, 0xac, 0xda, 0xd4, 0xea, 0x37, 0x03, 0x53, 0xbb, 0x1d, 0x98, 0xda, 0xef, 0x81, 0xa9, + 0x7d, 0x19, 0x9a, 0xa9, 0xdb, 0xa1, 0x99, 0xfa, 0x39, 0x34, 0x53, 0xef, 0xe0, 0xc4, 0x42, 0x36, + 0x1d, 0xe2, 0x89, 0x2f, 0x85, 0x4b, 0xdb, 0xd0, 0x3d, 0x77, 0x30, 0x81, 0xbd, 0x2a, 0xbc, 0x50, + 0x9f, 0x35, 0xb9, 0x9d, 0xcd, 0x45, 0xc1, 0x78, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0x05, 0xe9, + 0xcb, 0x14, 0xda, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -315,6 +411,8 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) + // ActivateTunnel is a RPC method to activate a tunnel. + ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, opts ...grpc.CallOption) (*MsgActivateTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -336,6 +434,15 @@ func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts return out, nil } +func (c *msgClient) ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, opts ...grpc.CallOption) (*MsgActivateTunnelResponse, error) { + out := new(MsgActivateTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/ActivateTunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/UpdateParams", in, out, opts...) @@ -349,6 +456,8 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts type MsgServer interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) + // ActivateTunnel is a RPC method to activate a tunnel. + ActivateTunnel(context.Context, *MsgActivateTunnel) (*MsgActivateTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } @@ -360,6 +469,9 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) CreateTunnel(ctx context.Context, req *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTunnel not implemented") } +func (*UnimplementedMsgServer) ActivateTunnel(ctx context.Context, req *MsgActivateTunnel) (*MsgActivateTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ActivateTunnel not implemented") +} func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } @@ -386,6 +498,24 @@ func _Msg_CreateTunnel_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_ActivateTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgActivateTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ActivateTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Msg/ActivateTunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ActivateTunnel(ctx, req.(*MsgActivateTunnel)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -412,6 +542,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateTunnel", Handler: _Msg_CreateTunnel_Handler, }, + { + MethodName: "ActivateTunnel", + Handler: _Msg_ActivateTunnel_Handler, + }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, @@ -516,13 +650,69 @@ func (m *MsgCreateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if len(m.TunnelId) > 0 { - i -= len(m.TunnelId) - copy(dAtA[i:], m.TunnelId) - i = encodeVarintTx(dAtA, i, uint64(len(m.TunnelId))) + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgActivateTunnel) 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 *MsgActivateTunnel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgActivateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x12 } + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgActivateTunnelResponse) 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 *MsgActivateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgActivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l return len(dAtA) - i, nil } @@ -638,13 +828,37 @@ func (m *MsgCreateTunnelResponse) Size() (n int) { } var l int _ = l - l = len(m.TunnelId) + if m.TunnelID != 0 { + n += 1 + sovTx(uint64(m.TunnelID)) + } + return n +} + +func (m *MsgActivateTunnel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTx(uint64(m.TunnelID)) + } + l = len(m.Creator) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } +func (m *MsgActivateTunnelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgUpdateParams) Size() (n int) { if m == nil { return 0 @@ -910,8 +1124,96 @@ func (m *MsgCreateTunnelResponse) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgActivateTunnel) 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: MsgActivateTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgActivateTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -939,7 +1241,7 @@ func (m *MsgCreateTunnelResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TunnelId = string(dAtA[iNdEx:postIndex]) + m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -962,6 +1264,56 @@ func (m *MsgCreateTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgActivateTunnelResponse) 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: MsgActivateTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgActivateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From c9bf211ba153153a7ca585d236b26b5154cf791d Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 8 Jul 2024 17:35:18 +0700 Subject: [PATCH 010/272] remove debug --- x/tunnel/client/cli/tx.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 15d59927b..27d0c6dde 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -1,7 +1,6 @@ package cli import ( - "fmt" "strconv" "github.com/cosmos/cosmos-sdk/client" @@ -76,8 +75,6 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - fmt.Printf("msg: %+v\n", msg.GetTunnelRoute()) - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } From 48e711eced23d924736b0cf6d98fe30b6e26c947 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 8 Jul 2024 17:40:21 +0700 Subject: [PATCH 011/272] lint --- x/tunnel/types/genesis.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index b9d4d507f..d7c47c540 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -5,13 +5,13 @@ func NewGenesisState( params Params, tunnelCount uint64, tssPacketCount uint64, - AxelarPacketCount uint64, + axelarPacketCount uint64, ) *GenesisState { return &GenesisState{ Params: params, TunnelCount: tunnelCount, TssPacketCount: tssPacketCount, - AxelarPacketCount: AxelarPacketCount, + AxelarPacketCount: axelarPacketCount, } } From d1fd2a9e938bd1cc916553a475c9bc8bfae1f630 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 9 Jul 2024 14:44:14 +0700 Subject: [PATCH 012/272] add tunnel --- x/tunnel/keeper/tunnel.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index c9c5f76c9..65ba9da23 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -125,10 +125,10 @@ func (k Keeper) GetRequiredProcessTunnels( difference := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) differenceInBPS := uint64(difference * 10000) + activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price + activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now + if differenceInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp.Unix()+int64(sp.Interval) { - // Update the price directly - activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price - activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now trigger = true } } @@ -177,4 +177,6 @@ func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { fmt.Printf("Generating Axelar packets for tunnel %d, route %s\n", tunnel.ID, r.String()) k.AxelarPacketHandler(ctx, types.AxelarPacket{}) } + // Set the last SignalPriceInfos + k.SetTunnel(ctx, tunnel) } From b704a004f5bc422dd45afff60989f44009799f53 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 10 Jul 2024 15:29:40 +0700 Subject: [PATCH 013/272] fix pr --- app/app.go | 2 +- app/genesis.go | 2 +- app/upgrades/v2_6/constants.go | 2 + proto/tunnel/v1beta1/genesis.proto | 3 + proto/tunnel/v1beta1/query.proto | 14 +++- x/tunnel/client/cli/query.go | 24 +++++- x/tunnel/client/cli/tx.go | 3 - x/tunnel/genesis.go | 29 +++++-- x/tunnel/keeper/account.go | 41 +++++++++ x/tunnel/keeper/account_test.go | 33 ++++++++ x/tunnel/keeper/genesis.go | 30 ------- x/tunnel/keeper/grpc_query.go | 13 ++- x/tunnel/keeper/keeper_test.go | 43 ---------- x/tunnel/keeper/msg_server.go | 5 +- x/tunnel/keeper/tunnel.go | 19 ++--- x/tunnel/keeper/tunnel_test.go | 32 ++------ x/tunnel/module.go | 12 ++- x/tunnel/types/codec.go | 2 + x/tunnel/types/errors.go | 1 + x/tunnel/types/genesis.go | 4 +- x/tunnel/types/genesis.pb.go | 101 +++++++++++++++++++---- x/tunnel/types/keys.go | 3 + x/tunnel/types/msgs.go | 6 +- x/tunnel/types/query.pb.go | 128 ++++++++++++++++++----------- 24 files changed, 350 insertions(+), 202 deletions(-) create mode 100644 x/tunnel/keeper/account.go create mode 100644 x/tunnel/keeper/account_test.go delete mode 100644 x/tunnel/keeper/genesis.go delete mode 100644 x/tunnel/keeper/keeper_test.go diff --git a/app/app.go b/app/app.go index 4b1df24d4..ceb25cd7d 100644 --- a/app/app.go +++ b/app/app.go @@ -140,7 +140,7 @@ import ( "github.com/bandprotocol/chain/v2/x/tss" tsskeeper "github.com/bandprotocol/chain/v2/x/tss/keeper" tsstypes "github.com/bandprotocol/chain/v2/x/tss/types" - tunnel "github.com/bandprotocol/chain/v2/x/tunnel" + "github.com/bandprotocol/chain/v2/x/tunnel" tunnelkeeper "github.com/bandprotocol/chain/v2/x/tunnel/keeper" tunneltypes "github.com/bandprotocol/chain/v2/x/tunnel/types" ) diff --git a/app/genesis.go b/app/genesis.go index 75ccede11..caf9cb897 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -49,7 +49,7 @@ import ( rollingseedtypes "github.com/bandprotocol/chain/v2/x/rollingseed/types" "github.com/bandprotocol/chain/v2/x/tss" tsstypes "github.com/bandprotocol/chain/v2/x/tss/types" - tunnel "github.com/bandprotocol/chain/v2/x/tunnel" + "github.com/bandprotocol/chain/v2/x/tunnel" tunneltypes "github.com/bandprotocol/chain/v2/x/tunnel/types" ) diff --git a/app/upgrades/v2_6/constants.go b/app/upgrades/v2_6/constants.go index 66f60d6a7..cf122fd13 100644 --- a/app/upgrades/v2_6/constants.go +++ b/app/upgrades/v2_6/constants.go @@ -22,6 +22,7 @@ import ( oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" rollingseedtypes "github.com/bandprotocol/chain/v2/x/rollingseed/types" tsstypes "github.com/bandprotocol/chain/v2/x/tss/types" + tunneltypes "github.com/bandprotocol/chain/v2/x/tunnel/types" ) const UpgradeName = "v2_6" @@ -39,6 +40,7 @@ var Upgrade = upgrades.Upgrade{ rollingseedtypes.StoreKey, tsstypes.StoreKey, bandtsstype.StoreKey, + tunneltypes.StoreKey, }, }, } diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index 9aa8d55bf..bddfe488c 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -5,6 +5,7 @@ option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; import "gogoproto/gogo.proto"; import "tunnel/v1beta1/params.proto"; +import "tunnel/v1beta1/tunnel.proto"; // GenesisState represents the initial state of the blockchain. message GenesisState { @@ -16,4 +17,6 @@ message GenesisState { uint64 tss_packet_count = 3; // axelar_packet_count is the number of axelar packets. uint64 axelar_packet_count = 4; + // tunnels is the list of tunnels. + repeated Tunnel tunnels = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index fe380356d..d925f97ec 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -27,10 +27,22 @@ service Query { } } +// TunnelStatusFilter defines a filter for tunnel status. +enum TunnelStatusFilter { + option (gogoproto.goproto_enum_prefix) = false; + + // TUNNEL_STATUS_UNSPECIFIED defines an unspecified status. + TUNNEL_STATUS_UNSPECIFIED = 0; + // TUNNEL_STATUS_ACTIVE defines an active tunnel. + TUNNEL_STATUS_ACTIVE = 1; + // TUNNEL_STATUS_INACTIVE defines an inactive tunnel. + TUNNEL_STATUS_INACTIVE = 2; +} + // QueryTunnelRequest is the request type for the Query/Tunnel RPC method. message QueryTunnelsRequest { // is_active is a flag to filter active tunnels. - bool is_active = 1; + TunnelStatusFilter is_active = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index b5f1e6f5e..256478d97 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -11,7 +11,7 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -const flagTunnelIsActiveFilter = "is-active" +const flagTunnelStatusFilter = "status" // GetQueryCmd returns the cli query commands for this module func GetQueryCmd() *cobra.Command { @@ -74,13 +74,28 @@ func GetQueryTunnels() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - isActiveFilterFlag, err := cmd.Flags().GetBool(flagTunnelIsActiveFilter) + statusFilterFlag, err := cmd.Flags().GetBool(flagTunnelStatusFilter) if err != nil { return err } + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + var statusFilter types.TunnelStatusFilter + if !cmd.Flags().Changed(flagTunnelStatusFilter) { + statusFilter = types.TUNNEL_STATUS_UNSPECIFIED + } else if statusFilterFlag { + statusFilter = types.TUNNEL_STATUS_ACTIVE + } else { + statusFilter = types.TUNNEL_STATUS_INACTIVE + } + res, err := queryClient.Tunnels(context.Background(), &types.QueryTunnelsRequest{ - IsActive: isActiveFilterFlag, + IsActive: statusFilter, + Pagination: pageReq, }) if err != nil { return err @@ -90,7 +105,8 @@ func GetQueryTunnels() *cobra.Command { }, } - cmd.Flags().Bool(flagTunnelIsActiveFilter, false, "Filter tunnels by active status") + cmd.Flags().Bool(flagTunnelStatusFilter, false, "Filter tunnels by active status") + flags.AddPaginationFlagsToCmd(cmd, "tunnels") flags.AddQueryFlagsToCmd(cmd) return cmd diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 27d0c6dde..005f067ec 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -13,9 +13,6 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// default values -var () - // GetTxCmd returns a root CLI command handler for all x/tunnel transaction commands. func GetTxCmd() *cobra.Command { txCmd := &cobra.Command{ diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 291f9a339..7d49aa583 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -1,6 +1,7 @@ package tunnel import ( + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v2/x/tunnel/keeper" @@ -9,18 +10,34 @@ import ( // ValidateGenesis validates the provided genesis state. func ValidateGenesis(data *types.GenesisState) error { + if err := data.Params.Validate(); err != nil { + return errorsmod.Wrap(err, "tunnel params") + } return nil } -func InitGenesis(ctx sdk.Context, k keeper.Keeper, data types.GenesisState) { - err := k.SetParams(ctx, data.Params) - if err != nil { +// InitGenesis initializes the module's state from a provided genesis state. +func InitGenesis(ctx sdk.Context, k keeper.Keeper, data *types.GenesisState) { + if err := k.SetParams(ctx, data.Params); err != nil { panic(err) } + + k.SetTunnelCount(ctx, data.TunnelCount) + k.SetTSSPacketCount(ctx, data.TssPacketCount) + k.SetAxelarPacketCount(ctx, data.AxelarPacketCount) + + for _, tunnel := range data.Tunnels { + k.SetTunnel(ctx, tunnel) + } } -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState { - return types.GenesisState{ - Params: k.GetParams(ctx), +// ExportGenesis returns the module's exported genesis +func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { + return &types.GenesisState{ + Params: k.GetParams(ctx), + TunnelCount: k.GetTunnelCount(ctx), + TssPacketCount: k.GetTSSPacketCount(ctx), + AxelarPacketCount: k.GetAxelarPacketCount(ctx), + Tunnels: k.GetTunnels(ctx), } } diff --git a/x/tunnel/keeper/account.go b/x/tunnel/keeper/account.go new file mode 100644 index 000000000..0c7b3322c --- /dev/null +++ b/x/tunnel/keeper/account.go @@ -0,0 +1,41 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func (k Keeper) GenerateAccount(ctx sdk.Context, key string) (sdk.AccAddress, error) { + header := ctx.BlockHeader() + + buf := []byte(key) + buf = append(buf, header.AppHash...) + buf = append(buf, header.DataHash...) + + moduleCred, err := authtypes.NewModuleCredential(types.ModuleName, []byte(types.KeyAccountsKey), buf) + if err != nil { + return nil, err + } + + keyAccAddr := sdk.AccAddress(moduleCred.Address()) + + // This should not happen + if acc := k.authKeeper.GetAccount(ctx, keyAccAddr); acc != nil { + return nil, types.ErrAccountAlreadyExist.Wrapf( + "existing account for newly generated key account address %s", + keyAccAddr.String(), + ) + } + + keyAcc, err := authtypes.NewBaseAccountWithPubKey(moduleCred) + if err != nil { + return nil, err + } + + k.authKeeper.NewAccount(ctx, keyAcc) + k.authKeeper.SetAccount(ctx, keyAcc) + + return keyAccAddr, nil +} diff --git a/x/tunnel/keeper/account_test.go b/x/tunnel/keeper/account_test.go new file mode 100644 index 000000000..8eb877c6a --- /dev/null +++ b/x/tunnel/keeper/account_test.go @@ -0,0 +1,33 @@ +package keeper_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" +) + +func TestGenerateAccount(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + tunnelID := uint64(1) + s.MockAccountKeeper.EXPECT(). + GetAccount(ctx, gomock.Any()). + Return(nil).Times(1) + s.MockAccountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + + addr, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", tunnelID)) + require.NoError(s.T(), err, "expected no error generating account") + require.NotNil(s.T(), addr, "expected generated address to be non-nil") + require.Equal( + s.T(), + "cosmos1w66ct9dvwauhu68t7vt2y7gz3z73qc5kap98mzg5t0y06r3txc8spuqw0g", + addr.String(), + "expected generated address to match", + ) +} diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go deleted file mode 100644 index a77e11796..000000000 --- a/x/tunnel/keeper/genesis.go +++ /dev/null @@ -1,30 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -// InitGenesis initializes the module's state from a provided genesis state. -func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) { - if err := k.SetParams(ctx, data.Params); err != nil { - panic(err) - } - - k.SetTunnelCount(ctx, data.TunnelCount) - // TODO: Set tunnels, axelarPacket and tssPacket - - k.SetTSSPacketCount(ctx, data.TssPacketCount) - k.SetAxelarPacketCount(ctx, data.AxelarPacketCount) -} - -// ExportGenesis returns the module's exported genesis -func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { - return &types.GenesisState{ - Params: k.GetParams(ctx), - TunnelCount: k.GetTunnelCount(ctx), - TssPacketCount: k.GetTSSPacketCount(ctx), - AxelarPacketCount: k.GetAxelarPacketCount(ctx), - } -} diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index ab90e3097..4113203d3 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -28,8 +28,17 @@ func (q queryServer) Tunnels(c context.Context, req *types.QueryTunnelsRequest) store, req.Pagination, func(key []byte, t *types.Tunnel) (*types.Tunnel, error) { - if req.IsActive == t.IsActive { - return t, nil + // Filter by status + switch req.IsActive { + case types.TUNNEL_STATUS_UNSPECIFIED: + case types.TUNNEL_STATUS_ACTIVE: + if t.IsActive { + return t, nil + } + case types.TUNNEL_STATUS_INACTIVE: + if !t.IsActive { + return t, nil + } } return nil, nil diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go deleted file mode 100644 index 07b542a9a..000000000 --- a/x/tunnel/keeper/keeper_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package keeper_test - -// import ( -// "testing" - -// "github.com/cosmos/cosmos-sdk/baseapp" -// sdk "github.com/cosmos/cosmos-sdk/types" -// authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" -// govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" -// "github.com/stretchr/testify/suite" - -// bandtesting "github.com/bandprotocol/chain/v2/testing" -// "github.com/bandprotocol/chain/v2/x/tunnel/keeper" -// "github.com/bandprotocol/chain/v2/x/tunnel/types" -// ) - -// // Keeper of the x/tunnel store -// type KeeperTestSuite struct { -// suite.Suite - -// ctx sdk.Context -// keeper keeper.Keeper -// queryClient types.QueryClient -// msgSrvr types.MsgServer -// authority sdk.AccAddress -// } - -// func (s *KeeperTestSuite) SetupTest() { -// app, ctx := bandtesting.CreateTestApp(s.T(), true) -// s.ctx = ctx -// s.keeper = app.TunnelKeeper - -// queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) -// types.RegisterQueryServer(queryHelper, keeper.NewQueryServer(app.TunnelKeeper)) -// queryClient := types.NewQueryClient(queryHelper) -// s.queryClient = queryClient -// s.msgSrvr = keeper.NewMsgServerImpl(app.TunnelKeeper) -// s.authority = authtypes.NewModuleAddress(govtypes.ModuleName) -// } - -// func TestKeeperTestSuite(t *testing.T) { -// suite.Run(t, new(KeeperTestSuite)) -// } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index bb1315979..925043ead 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -37,12 +37,15 @@ func (ms msgServer) CreateTunnel( }) } - tunnelID := ms.Keeper.AddTunnel(ctx, types.Tunnel{ + tunnelID, err := ms.Keeper.AddTunnel(ctx, types.Tunnel{ Route: req.Route, FeedType: req.FeedType, SignalPriceInfos: signalPriceInfos, IsActive: true, // TODO: set to false by default }) + if err != nil { + return nil, err + } tunnel, err := ms.Keeper.GetTunnel(ctx, tunnelID) if err != nil { diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 65ba9da23..971389838 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -5,20 +5,11 @@ import ( "math" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" feedsTypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// GenerateTunnelAccount generates a new tunnel account -func (k Keeper) GenerateTunnelAccount(ctx sdk.Context, tunnelID uint64) sdk.AccAddress { - tacc := authtypes.NewEmptyModuleAccount(fmt.Sprintf("%s-%d", types.ModuleName, tunnelID)) - taccI := k.authKeeper.NewAccount(ctx, tacc) - k.authKeeper.SetAccount(ctx, taccI) - return taccI.GetAddress() -} - // SetTunnelCount sets the tunnel count in the store func (k Keeper) SetTunnelCount(ctx sdk.Context, count uint64) { ctx.KVStore(k.storeKey).Set(types.TunnelCountStoreKey, sdk.Uint64ToBigEndian(count)) @@ -42,18 +33,22 @@ func (k Keeper) SetTunnel(ctx sdk.Context, tunnel types.Tunnel) { } // AddTunnel adds a tunnel to the store and returns the new tunnel ID -func (k Keeper) AddTunnel(ctx sdk.Context, tunnel types.Tunnel) uint64 { +func (k Keeper) AddTunnel(ctx sdk.Context, tunnel types.Tunnel) (uint64, error) { tunnel.ID = k.GetNextTunnelID(ctx) // Generate a new tunnel account - acc := k.GenerateTunnelAccount(ctx, tunnel.ID) + acc, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", tunnel.ID)) + if err != nil { + return 0, err + } + tunnel.FeePayer = acc.String() // Set the creation time tunnel.CreatedAt = ctx.BlockTime() k.SetTunnel(ctx, tunnel) - return tunnel.ID + return tunnel.ID, nil } // GetTunnel retrieves a tunnel by its ID diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 2d25d8c14..6b7a98d66 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -1,11 +1,9 @@ package keeper_test import ( - "fmt" "testing" "time" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -14,26 +12,6 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestGenerateTunnelAccount(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - tunnelID := uint64(1) - s.MockAccountKeeper.EXPECT(). - NewAccount(ctx, gomock.Any()). - Return(authtypes.NewEmptyModuleAccount(fmt.Sprintf("%s-%d", types.ModuleName, tunnelID))).Times(1) - s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) - - addr := k.GenerateTunnelAccount(ctx, tunnelID) - require.NotNil(s.T(), addr, "expected generated address to be non-nil") - require.Equal( - s.T(), - "cosmos1mfkys3fdex2pvylxdutwk3ng26ys8pxtzasfsf", - addr.String(), - "expected generated address to match", - ) -} - func TestAddTunnel(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper @@ -43,12 +21,14 @@ func TestAddTunnel(t *testing.T) { // Mock the account keeper to generate a new account s.MockAccountKeeper.EXPECT(). - NewAccount(ctx, gomock.Any()). - Return(authtypes.NewEmptyModuleAccount(fmt.Sprintf("%s-%d", types.ModuleName, tunnel.ID))).Times(1) + GetAccount(ctx, gomock.Any()). + Return(nil).Times(1) + s.MockAccountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) // Add the tunnel to the keeper - k.AddTunnel(ctx, tunnel) + _, err := k.AddTunnel(ctx, tunnel) + require.NoError(s.T(), err, "adding tunnel should not produce an error") // Attempt to retrieve the tunnel by its ID retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) @@ -58,7 +38,7 @@ func TestAddTunnel(t *testing.T) { ID: 1, Route: nil, FeedType: feedstypes.FEED_TYPE_UNSPECIFIED, - FeePayer: "cosmos1mfkys3fdex2pvylxdutwk3ng26ys8pxtzasfsf", + FeePayer: "cosmos1w66ct9dvwauhu68t7vt2y7gz3z73qc5kap98mzg5t0y06r3txc8spuqw0g", SignalPriceInfos: nil, LastTriggeredBlockHeight: 0, IsActive: false, diff --git a/x/tunnel/module.go b/x/tunnel/module.go index f43015834..2770468b6 100644 --- a/x/tunnel/module.go +++ b/x/tunnel/module.go @@ -3,6 +3,7 @@ package tunnel import ( "context" "encoding/json" + "fmt" "cosmossdk.io/core/appmodule" abci "github.com/cometbft/cometbft/abci/types" @@ -58,7 +59,12 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // ValidateGenesis performs genesis state validation for the tunnel module. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - return nil + var genState types.GenesisState + if err := cdc.UnmarshalJSON(bz, &genState); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + + return ValidateGenesis(&genState) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the tunnel module. @@ -124,7 +130,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - am.keeper.InitGenesis(ctx, &genesisState) + InitGenesis(ctx, am.keeper, &genesisState) return []abci.ValidatorUpdate{} } @@ -132,7 +138,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. // ExportGenesis returns the exported genesis state as raw bytes for the tunnel // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(am.keeper.ExportGenesis(ctx)) + return cdc.MustMarshalJSON(ExportGenesis(ctx, am.keeper)) } // ConsensusVersion implements AppModule/ConsensusVersion. diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index e6220ee19..1b9b6ebac 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -14,6 +14,7 @@ import ( func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "tunnel/MsgUpdateParams") legacy.RegisterAminoMsg(cdc, &MsgCreateTunnel{}, "tunnel/MsgCreateTunnel") + legacy.RegisterAminoMsg(cdc, &MsgActivateTunnel{}, "tunnel/MsgActivateTunnel") cdc.RegisterInterface((*Route)(nil), nil) cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) @@ -26,6 +27,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*sdk.Msg)(nil), &MsgUpdateParams{}, &MsgCreateTunnel{}, + &MsgActivateTunnel{}, ) registry.RegisterInterface( diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 729c9e4f2..32d26f513 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -10,4 +10,5 @@ var ( ErrTunnelNotFound = errorsmod.Register(ModuleName, 3, "tunnel not found") ErrTSSPacketNotFound = errorsmod.Register(ModuleName, 4, "tss packet not found") ErrAxelarPacketNotFound = errorsmod.Register(ModuleName, 5, "axelar packet not found") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 6, "account already exist") ) diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index d7c47c540..acf0bc3de 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -6,16 +6,18 @@ func NewGenesisState( tunnelCount uint64, tssPacketCount uint64, axelarPacketCount uint64, + tunnels []Tunnel, ) *GenesisState { return &GenesisState{ Params: params, TunnelCount: tunnelCount, TssPacketCount: tssPacketCount, AxelarPacketCount: axelarPacketCount, + Tunnels: tunnels, } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return NewGenesisState(DefaultParams(), 0, 0, 0) + return NewGenesisState(DefaultParams(), 0, 0, 0, []Tunnel{}) } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 7fbc18e1f..17a98712d 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -33,6 +33,8 @@ type GenesisState struct { TssPacketCount uint64 `protobuf:"varint,3,opt,name=tss_packet_count,json=tssPacketCount,proto3" json:"tss_packet_count,omitempty"` // axelar_packet_count is the number of axelar packets. AxelarPacketCount uint64 `protobuf:"varint,4,opt,name=axelar_packet_count,json=axelarPacketCount,proto3" json:"axelar_packet_count,omitempty"` + // tunnels is the list of tunnels. + Tunnels []Tunnel `protobuf:"bytes,5,rep,name=tunnels,proto3" json:"tunnels"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -96,6 +98,13 @@ func (m *GenesisState) GetAxelarPacketCount() uint64 { return 0 } +func (m *GenesisState) GetTunnels() []Tunnel { + if m != nil { + return m.Tunnels + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "tunnel.v1beta1.GenesisState") } @@ -103,24 +112,26 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 272 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd0, 0x31, 0x4e, 0xc3, 0x30, - 0x18, 0x05, 0xe0, 0x18, 0xa2, 0x0e, 0x6e, 0x55, 0x41, 0x40, 0xa8, 0x2a, 0xc8, 0x14, 0xa6, 0x4c, - 0xb6, 0x5a, 0x38, 0x41, 0x19, 0x10, 0x5b, 0x55, 0x36, 0x96, 0xea, 0x4f, 0xb0, 0xd2, 0x88, 0xd4, - 0x8e, 0xe2, 0x3f, 0x55, 0xb9, 0x05, 0x57, 0x62, 0xeb, 0xd8, 0x91, 0x09, 0xa1, 0xe4, 0x22, 0xa8, - 0xb6, 0x07,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 0xbf, 0x83, 0xef, 0xa5, 0x34, 0x49, 0xc7, - 0x8a, 0xbb, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x8a, 0x49, 0x15, 0x78, 0x01, 0x00, 0x00, + // 297 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xc3, 0x30, + 0x18, 0xc7, 0x1b, 0x37, 0x27, 0x64, 0x63, 0x68, 0x15, 0x19, 0x53, 0x62, 0xf5, 0xd4, 0x53, 0xc2, + 0xa6, 0xf8, 0x00, 0xf3, 0x20, 0xde, 0xc6, 0xf4, 0xe4, 0x65, 0xa4, 0x35, 0x74, 0xc5, 0x2e, 0x29, + 0xcd, 0xd7, 0x31, 0xdf, 0xc2, 0xc7, 0xda, 0x71, 0x47, 0x4f, 0x22, 0xed, 0x53, 0x78, 0x93, 0x25, + 0x11, 0x9c, 0xe8, 0xad, 0xfd, 0xff, 0x7e, 0xf9, 0xbe, 0x3f, 0x1f, 0x3e, 0x85, 0x52, 0x4a, 0x91, + 0xb1, 0xc5, 0x20, 0x12, 0xc0, 0x07, 0x2c, 0x11, 0x52, 0xe8, 0x54, 0xd3, 0xbc, 0x50, 0xa0, 0xfc, + 0xae, 0xa5, 0xd4, 0xd1, 0xfe, 0x51, 0xa2, 0x12, 0x65, 0x10, 0xdb, 0x7c, 0x59, 0xab, 0x7f, 0xf2, + 0x6b, 0x46, 0xce, 0x0b, 0x3e, 0xd7, 0xff, 0x40, 0x37, 0xd1, 0xc0, 0x8b, 0x4f, 0x84, 0x3b, 0xb7, + 0x76, 0xe3, 0x3d, 0x70, 0x10, 0xfe, 0x15, 0x6e, 0xd9, 0xd7, 0x3d, 0x14, 0xa0, 0xb0, 0x3d, 0x3c, + 0xa6, 0xdb, 0x0d, 0xe8, 0xd8, 0xd0, 0x51, 0x73, 0xf5, 0x7e, 0xe6, 0x4d, 0x9c, 0xeb, 0x9f, 0xe3, + 0x8e, 0xd5, 0xa6, 0xb1, 0x2a, 0x25, 0xf4, 0x76, 0x02, 0x14, 0x36, 0x27, 0x6d, 0x9b, 0xdd, 0x6c, + 0x22, 0x3f, 0xc4, 0xfb, 0xa0, 0xf5, 0x34, 0xe7, 0xf1, 0xb3, 0x00, 0xa7, 0x35, 0x8c, 0xd6, 0x05, + 0xad, 0xc7, 0x26, 0xb6, 0x26, 0xc5, 0x87, 0x7c, 0x29, 0x32, 0x5e, 0x6c, 0xcb, 0x4d, 0x23, 0x1f, + 0x58, 0xf4, 0xd3, 0xbf, 0xc6, 0x7b, 0x76, 0x91, 0xee, 0xed, 0x06, 0x8d, 0xbf, 0x3a, 0x3f, 0x98, + 0x5f, 0xd7, 0xf9, 0x5b, 0x1e, 0xdd, 0xad, 0x2a, 0x82, 0xd6, 0x15, 0x41, 0x1f, 0x15, 0x41, 0xaf, + 0x35, 0xf1, 0xd6, 0x35, 0xf1, 0xde, 0x6a, 0xe2, 0x3d, 0xb2, 0x24, 0x85, 0x59, 0x19, 0xd1, 0x58, + 0xcd, 0x59, 0xc4, 0xe5, 0x93, 0xb9, 0x55, 0xac, 0x32, 0x16, 0xcf, 0x78, 0x2a, 0xd9, 0x62, 0xc8, + 0x96, 0xee, 0x8c, 0x0c, 0x5e, 0x72, 0xa1, 0xa3, 0x96, 0x31, 0x2e, 0xbf, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x94, 0x7e, 0x5c, 0x46, 0xcd, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -143,6 +154,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Tunnels) > 0 { + for iNdEx := len(m.Tunnels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tunnels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } if m.AxelarPacketCount != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.AxelarPacketCount)) i-- @@ -199,6 +224,12 @@ func (m *GenesisState) Size() (n int) { if m.AxelarPacketCount != 0 { n += 1 + sovGenesis(uint64(m.AxelarPacketCount)) } + if len(m.Tunnels) > 0 { + for _, e := range m.Tunnels { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -327,6 +358,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tunnels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tunnels = append(m.Tunnels, Tunnel{}) + if err := m.Tunnels[len(m.Tunnels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 69032fbff..42452c510 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -9,6 +9,9 @@ const ( // Version defines the current version the IBC module supports Version = "bandchain-1" + // KeyAccountsKey is used to store the key for the account + KeyAccountsKey = "tunnel" + // StoreKey defines the primary module store key StoreKey = ModuleName diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 985e85867..66525dd41 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -184,8 +184,6 @@ func (m *MsgCreateTunnel) SetTunnelRoute(route Route) error { } m.Route = any - fmt.Printf("set route: %+v\n", m.Route.GetCachedValue()) - return nil } @@ -230,5 +228,9 @@ func (m *MsgActivateTunnel) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgActivateTunnel) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) + } + return nil } diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 1ced75620..1af46d13f 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -30,10 +30,42 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// TunnelStatusFilter defines a filter for tunnel status. +type TunnelStatusFilter int32 + +const ( + // TUNNEL_STATUS_UNSPECIFIED defines an unspecified status. + TUNNEL_STATUS_UNSPECIFIED TunnelStatusFilter = 0 + // TUNNEL_STATUS_ACTIVE defines an active tunnel. + TUNNEL_STATUS_ACTIVE TunnelStatusFilter = 1 + // TUNNEL_STATUS_INACTIVE defines an inactive tunnel. + TUNNEL_STATUS_INACTIVE TunnelStatusFilter = 2 +) + +var TunnelStatusFilter_name = map[int32]string{ + 0: "TUNNEL_STATUS_UNSPECIFIED", + 1: "TUNNEL_STATUS_ACTIVE", + 2: "TUNNEL_STATUS_INACTIVE", +} + +var TunnelStatusFilter_value = map[string]int32{ + "TUNNEL_STATUS_UNSPECIFIED": 0, + "TUNNEL_STATUS_ACTIVE": 1, + "TUNNEL_STATUS_INACTIVE": 2, +} + +func (x TunnelStatusFilter) String() string { + return proto.EnumName(TunnelStatusFilter_name, int32(x)) +} + +func (TunnelStatusFilter) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{0} +} + // QueryTunnelRequest is the request type for the Query/Tunnel RPC method. type QueryTunnelsRequest struct { // is_active is a flag to filter active tunnels. - IsActive bool `protobuf:"varint,1,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + IsActive TunnelStatusFilter `protobuf:"varint,1,opt,name=is_active,json=isActive,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"is_active,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -71,11 +103,11 @@ func (m *QueryTunnelsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryTunnelsRequest proto.InternalMessageInfo -func (m *QueryTunnelsRequest) GetIsActive() bool { +func (m *QueryTunnelsRequest) GetIsActive() TunnelStatusFilter { if m != nil { return m.IsActive } - return false + return TUNNEL_STATUS_UNSPECIFIED } func (m *QueryTunnelsRequest) GetPagination() *query.PageRequest { @@ -316,6 +348,7 @@ func (m *QueryParamsResponse) GetParams() Params { } func init() { + proto.RegisterEnum("tunnel.v1beta1.TunnelStatusFilter", TunnelStatusFilter_name, TunnelStatusFilter_value) proto.RegisterType((*QueryTunnelsRequest)(nil), "tunnel.v1beta1.QueryTunnelsRequest") proto.RegisterType((*QueryTunnelsResponse)(nil), "tunnel.v1beta1.QueryTunnelsResponse") proto.RegisterType((*QueryTunnelRequest)(nil), "tunnel.v1beta1.QueryTunnelRequest") @@ -327,39 +360,44 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 497 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x4f, 0x6e, 0xd3, 0x40, - 0x14, 0xc6, 0xe3, 0x50, 0xd2, 0x30, 0x95, 0x58, 0x0c, 0x51, 0x09, 0x2e, 0x72, 0x23, 0xb7, 0x82, - 0xa8, 0x8b, 0x19, 0x12, 0xb8, 0x00, 0x5d, 0x80, 0x2a, 0x36, 0xc5, 0x62, 0xc5, 0xa6, 0x1a, 0x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38, 0xe6, 0x91, 0x65, 0x1e, - 0xe2, 0xb0, 0x9c, 0x49, 0x3f, 0xad, 0x2e, 0xe6, 0xf2, 0xf8, 0xe4, 0x6a, 0x16, 0x78, 0xd7, 0xb3, - 0xc0, 0xfb, 0x35, 0x0b, 0xbc, 0x2f, 0xf3, 0xa0, 0x76, 0x3d, 0x0f, 0x6a, 0x3f, 0xe6, 0x41, 0xed, - 0x3d, 0x4d, 0x85, 0x39, 0xcf, 0x63, 0x92, 0xa8, 0x11, 0x8d, 0x99, 0x1c, 0xd8, 0xaf, 0x32, 0x51, - 0x43, 0x9a, 0x9c, 0x33, 0x21, 0xe9, 0xb4, 0x4f, 0x3f, 0x2c, 0x0b, 0x9a, 0x8b, 0x8c, 0xeb, 0xb8, - 0x61, 0x15, 0xcf, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x99, 0x1f, 0x0e, 0x7f, 0x04, 0x00, - 0x00, + // 583 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xc1, 0x6f, 0xd3, 0x3e, + 0x18, 0x4d, 0xfa, 0xdb, 0xaf, 0xdb, 0x3c, 0x69, 0x9a, 0x4c, 0x35, 0xba, 0x0c, 0xb2, 0x29, 0x9b, + 0x60, 0xea, 0x21, 0xa6, 0x85, 0x3b, 0xea, 0x46, 0x8b, 0x22, 0x50, 0x55, 0xd2, 0x96, 0x03, 0x97, + 0xca, 0x6d, 0xad, 0x2c, 0x52, 0x1b, 0xa7, 0xb5, 0x53, 0x31, 0xa1, 0x5d, 0x38, 0x71, 0x04, 0x71, + 0xe7, 0xc2, 0x3f, 0xb3, 0xe3, 0x24, 0x2e, 0x9c, 0x10, 0x6a, 0xf9, 0x03, 0xf8, 0x13, 0x50, 0x6d, + 0xa7, 0x5b, 0x68, 0x5a, 0x6e, 0x91, 0xdf, 0xfb, 0xbe, 0xf7, 0xde, 0xe7, 0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, 0xfa, 0x50, 0x60, 0x04, 0xd6, 0xd5, 0x7a, 0xc1, + 0xf4, 0x7e, 0xc9, 0xd7, 0x61, 0x1c, 0xaf, 0x26, 0x29, 0xd5, 0x03, 0xa1, 0xba, 0x07, 0xef, 0xa2, + 0xd4, 0x17, 0xc8, 0xe0, 0x25, 0xc8, 0xca, 0x9a, 0x25, 0x49, 0x13, 0xfb, 0x65, 0x1c, 0xad, 0xe4, + 0x28, 0xcd, 0x82, 0xd0, 0x3c, 0x86, 0x56, 0xba, 0x26, 0x7a, 0x37, 0x5f, 0xd1, 0xcb, 0x53, 0xe7, + 0x6a, 0x62, 0xea, 0xd7, 0x13, 0x53, 0xff, 0x39, 0x31, 0xf5, 0x8f, 0x53, 0x53, 0xbb, 0x9e, 0x9a, + 0xda, 0xf7, 0xa9, 0xa9, 0xbd, 0x41, 0x9e, 0xcf, 0xcf, 0xa3, 0x8e, 0xdd, 0xa5, 0x03, 0xd4, 0xc1, + 0x41, 0x4f, 0xfc, 0x2b, 0xba, 0xb4, 0x8f, 0xba, 0xe7, 0xd8, 0x0f, 0xd0, 0xb8, 0x84, 0xde, 0xc6, + 0x0d, 0xf9, 0x45, 0x48, 0x58, 0x27, 0x2b, 0x18, 0x8f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbb, + 0x9c, 0x56, 0x0e, 0x15, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -552,13 +590,8 @@ func (m *QueryTunnelsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.IsActive { - i-- - if m.IsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.IsActive != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.IsActive)) i-- dAtA[i] = 0x8 } @@ -748,8 +781,8 @@ func (m *QueryTunnelsRequest) Size() (n int) { } var l int _ = l - if m.IsActive { - n += 2 + if m.IsActive != 0 { + n += 1 + sovQuery(uint64(m.IsActive)) } if m.Pagination != nil { l = m.Pagination.Size() @@ -859,7 +892,7 @@ func (m *QueryTunnelsRequest) Unmarshal(dAtA []byte) error { if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) } - var v int + m.IsActive = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -869,12 +902,11 @@ func (m *QueryTunnelsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.IsActive |= TunnelStatusFilter(b&0x7F) << shift if b < 0x80 { break } } - m.IsActive = bool(v != 0) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) From 2cd517c8f748a240a5ae13f398437fa8d63ef62b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 10 Jul 2024 16:08:04 +0700 Subject: [PATCH 014/272] update query --- x/tunnel/keeper/grpc_query.go | 1 + x/tunnel/keeper/msg_server.go | 1 + 2 files changed, 2 insertions(+) diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 4113203d3..357c859a6 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -31,6 +31,7 @@ func (q queryServer) Tunnels(c context.Context, req *types.QueryTunnelsRequest) // Filter by status switch req.IsActive { case types.TUNNEL_STATUS_UNSPECIFIED: + return t, nil case types.TUNNEL_STATUS_ACTIVE: if t.IsActive { return t, nil diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 925043ead..166239018 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -42,6 +42,7 @@ func (ms msgServer) CreateTunnel( FeedType: req.FeedType, SignalPriceInfos: signalPriceInfos, IsActive: true, // TODO: set to false by default + Creator: req.Creator, }) if err != nil { return nil, err From bca249fdcb106e40c7b717f7a34d25a1517b7169 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 15 Jul 2024 15:53:10 +0700 Subject: [PATCH 015/272] fix review --- x/tunnel/types/keys.go | 2 +- x/tunnel/types/params.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 42452c510..01b88731d 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -10,7 +10,7 @@ const ( Version = "bandchain-1" // KeyAccountsKey is used to store the key for the account - KeyAccountsKey = "tunnel" + KeyAccountsKey = "TunnelAccountsKey" // StoreKey defines the primary module store key StoreKey = ModuleName diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 1d04d90f8..5325edcb2 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -10,7 +10,7 @@ var ( DefaultMinDeviationBPS = uint64(100) DefaultTSSRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) DefaultAxelarRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) - DefaultTssSupportedChains = []string{"ethereum", "cosmos", "terra", "band"} + DefaultTSSSupportedChains = []string{"ethereum", "cosmos", "terra", "band"} DefaultAxelarSupportedChains = []string{"ethereum", "cosmos", "terra", "band"} ) @@ -40,7 +40,7 @@ func DefaultParams() Params { DefaultMinDeviationBPS, DefaultTSSRouteFee, DefaultAxelarRouteFee, - DefaultTssSupportedChains, + DefaultTSSSupportedChains, DefaultAxelarSupportedChains, ) } From 191c5e37fc1d0d959ada84fbfeb63deb19f16fe8 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 15 Jul 2024 16:00:41 +0700 Subject: [PATCH 016/272] update address --- x/tunnel/keeper/account_test.go | 2 +- x/tunnel/keeper/tunnel_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/keeper/account_test.go b/x/tunnel/keeper/account_test.go index 8eb877c6a..59fd43caf 100644 --- a/x/tunnel/keeper/account_test.go +++ b/x/tunnel/keeper/account_test.go @@ -26,7 +26,7 @@ func TestGenerateAccount(t *testing.T) { require.NotNil(s.T(), addr, "expected generated address to be non-nil") require.Equal( s.T(), - "cosmos1w66ct9dvwauhu68t7vt2y7gz3z73qc5kap98mzg5t0y06r3txc8spuqw0g", + "cosmos1zpvqkrw3uv58a9uzakr2j4ck4mk6m3venca0y3cssy2423e5zhasq6l56x", addr.String(), "expected generated address to match", ) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 6b7a98d66..e048e4a6a 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -38,7 +38,7 @@ func TestAddTunnel(t *testing.T) { ID: 1, Route: nil, FeedType: feedstypes.FEED_TYPE_UNSPECIFIED, - FeePayer: "cosmos1w66ct9dvwauhu68t7vt2y7gz3z73qc5kap98mzg5t0y06r3txc8spuqw0g", + FeePayer: "cosmos1zpvqkrw3uv58a9uzakr2j4ck4mk6m3venca0y3cssy2423e5zhasq6l56x", SignalPriceInfos: nil, LastTriggeredBlockHeight: 0, IsActive: false, From 3bdaa28c3a53137e00689038e45590a1a7206c11 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 24 Jul 2024 14:00:45 +0700 Subject: [PATCH 017/272] fixed review --- app/app.go | 1 - proto/tunnel/v1beta1/tunnel.proto | 40 ++-- x/tunnel/keeper/account_test.go | 2 +- x/tunnel/keeper/msg_server.go | 14 +- x/tunnel/keeper/tunnel.go | 3 + x/tunnel/keeper/tunnel_test.go | 2 +- x/tunnel/types/events.go | 18 +- x/tunnel/types/keys.go | 2 +- x/tunnel/types/msgs.go | 2 - x/tunnel/types/route.go | 3 +- x/tunnel/types/tunnel.pb.go | 366 +++++++++++++++++++++--------- 11 files changed, 305 insertions(+), 148 deletions(-) diff --git a/app/app.go b/app/app.go index ceb25cd7d..c92e2291e 100644 --- a/app/app.go +++ b/app/app.go @@ -211,7 +211,6 @@ var ( govtypes.ModuleName: {authtypes.Burner}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, bandtsstypes.ModuleName: nil, - tunneltypes.ModuleName: nil, } Upgrades = []upgrades.Upgrade{v2_6.Upgrade} diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index e2ab3fbd3..e518f09c0 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -47,14 +47,15 @@ message Tunnel { option (gogoproto.equal) = true; uint64 id = 1 [(gogoproto.customname) = "ID"]; - google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "Route"]; - feeds.v1beta1.FeedType feed_type = 3; - string fee_payer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated SignalPriceInfo signal_price_infos = 5 [(gogoproto.nullable) = false]; - uint64 last_triggered_block_height = 6; - bool is_active = 7; - google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - string creator = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 nonce = 2; + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; + feeds.v1beta1.FeedType feed_type = 4; + string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; + uint64 last_triggered_block_height = 7; + bool is_active = 8; + google.protobuf.Timestamp created_at = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } message TSSPacket { @@ -62,14 +63,16 @@ message TSSPacket { uint64 id = 1 [(gogoproto.customname) = "ID"]; uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; - repeated SignalPriceInfo signal_price_infos = 3 [(gogoproto.nullable) = false]; - uint64 signing_id = 4 [ + uint64 nonce = 3; + feeds.v1beta1.FeedType feed_type = 4; + repeated SignalPriceInfo signal_price_infos = 5 [(gogoproto.nullable) = false]; + uint64 signing_id = 6 [ (gogoproto.customname) = "SigningID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/pkg/tss.SigningID" ]; - string destination_chain_id = 5 [(gogoproto.customname) = "DestinationChainID"]; - string destination_contract_address = 6; - google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + string destination_chain_id = 7 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 8; + google.protobuf.Timestamp created_at = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message AxelarPacket { @@ -77,9 +80,10 @@ message AxelarPacket { uint64 id = 1 [(gogoproto.customname) = "ID"]; uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; - repeated SignalPriceInfo signal_price_infos = 3 [(gogoproto.nullable) = false]; - uint64 ibc_queue_id = 4 [(gogoproto.customname) = "IBCQueueID"]; - string destination_chain_id = 5 [(gogoproto.customname) = "DestinationChainID"]; - string destination_contract_address = 6; - google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + feeds.v1beta1.FeedType feed_type = 3; + repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; + uint64 ibc_queue_id = 5 [(gogoproto.customname) = "IBCQueueID"]; + string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 7; + google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } diff --git a/x/tunnel/keeper/account_test.go b/x/tunnel/keeper/account_test.go index 59fd43caf..08db96e73 100644 --- a/x/tunnel/keeper/account_test.go +++ b/x/tunnel/keeper/account_test.go @@ -26,7 +26,7 @@ func TestGenerateAccount(t *testing.T) { require.NotNil(s.T(), addr, "expected generated address to be non-nil") require.Equal( s.T(), - "cosmos1zpvqkrw3uv58a9uzakr2j4ck4mk6m3venca0y3cssy2423e5zhasq6l56x", + "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", addr.String(), "expected generated address to match", ) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 166239018..6142c61f7 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -56,16 +56,16 @@ func (ms msgServer) CreateTunnel( event := sdk.NewEvent( types.EventTypeCreateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), - sdk.NewAttribute(types.AttributeRoute, tunnel.Route.String()), - sdk.NewAttribute(types.AttributeFeedType, tunnel.FeedType.String()), - sdk.NewAttribute(types.AttributeFeePayer, tunnel.FeePayer), - sdk.NewAttribute(types.AttributeIsActive, fmt.Sprintf("%t", tunnel.IsActive)), + sdk.NewAttribute(types.AttributeKeyRoute, tunnel.Route.String()), + sdk.NewAttribute(types.AttributeKeyFeedType, tunnel.FeedType.String()), + sdk.NewAttribute(types.AttributeKeyFeePayer, tunnel.FeePayer), + sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), sdk.NewAttribute(types.AttributeKeyCreatedAt, tunnel.CreatedAt.String()), - sdk.NewAttribute(types.AttributeCreator, req.Creator), + sdk.NewAttribute(types.AttributeKeyCreator, req.Creator), ) for _, signalInfo := range req.SignalInfos { event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeSignalPriceInfos, signalInfo.String()), + sdk.NewAttribute(types.AttributeKeySignalPriceInfos, signalInfo.String()), ) } ctx.EventManager().EmitEvent(event) @@ -90,7 +90,7 @@ func (ms msgServer) ActivateTunnel( ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeActivateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), - sdk.NewAttribute(types.AttributeIsActive, fmt.Sprintf("%t", true)), + sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", true)), )) return &types.MsgActivateTunnelResponse{}, nil diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 971389838..c8c94185c 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -154,6 +154,9 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error // SetParams sets the tunnel module parameters func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { + // Increment the nonce + tunnel.Nonce += 1 + switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: fmt.Printf("Generating TSS packets for tunnel %d, route %s\n", tunnel.ID, r.String()) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index e048e4a6a..9e5fd5499 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -38,7 +38,7 @@ func TestAddTunnel(t *testing.T) { ID: 1, Route: nil, FeedType: feedstypes.FEED_TYPE_UNSPECIFIED, - FeePayer: "cosmos1zpvqkrw3uv58a9uzakr2j4ck4mk6m3venca0y3cssy2423e5zhasq6l56x", + FeePayer: "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", SignalPriceInfos: nil, LastTriggeredBlockHeight: 0, IsActive: false, diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index e53c5ed79..cabb4d3fc 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -6,13 +6,13 @@ const ( EventTypeCreateTunnel = "create_tunnel" EventTypeActivateTunnel = "activate_tunnel" - AttributeKeyParams = "params" - AttributeKeyTunnelID = "tunnel_id" - AttributeRoute = "route" - AttributeFeedType = "feed_type" - AttributeFeePayer = "fee_payer" - AttributeSignalPriceInfos = "signal_price_infos" - AttributeIsActive = "is_active" - AttributeKeyCreatedAt = "created_at" - AttributeCreator = "creator" + AttributeKeyParams = "params" + AttributeKeyTunnelID = "tunnel_id" + AttributeKeyRoute = "route" + AttributeKeyFeedType = "feed_type" + AttributeKeyFeePayer = "fee_payer" + AttributeKeySignalPriceInfos = "signal_price_infos" + AttributeKeyIsActive = "is_active" + AttributeKeyCreatedAt = "created_at" + AttributeKeyCreator = "creator" ) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 01b88731d..1c3949141 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -10,7 +10,7 @@ const ( Version = "bandchain-1" // KeyAccountsKey is used to store the key for the account - KeyAccountsKey = "TunnelAccountsKey" + KeyAccountsKey = "tunnel-accounts" // StoreKey defines the primary module store key StoreKey = ModuleName diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 66525dd41..85754ee0d 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -102,8 +102,6 @@ func NewMsgCreateTSSTunnel( DestinationContractAddress: destinationContractAddress, } - fmt.Printf("tssroute: %+v\n", r) - err := m.SetTunnelRoute(r) if err != nil { return nil, err diff --git a/x/tunnel/types/route.go b/x/tunnel/types/route.go index 7e3d7fdf8..d7fd1e49d 100644 --- a/x/tunnel/types/route.go +++ b/x/tunnel/types/route.go @@ -2,8 +2,7 @@ package types import "github.com/cosmos/gogoproto/proto" -// Route represents the interface of various Route types implemented -// by other modules. +// Route defines a routing path to deliver data to the destination. type Route interface { proto.Message diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index bd2933e93..6087ab0d2 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -273,14 +273,15 @@ func (m *SignalPriceInfo) GetLastTimestamp() *time.Time { type Tunnel struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` - FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - FeePayer string `protobuf:"bytes,4,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,5,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - LastTriggeredBlockHeight uint64 `protobuf:"varint,6,opt,name=last_triggered_block_height,json=lastTriggeredBlockHeight,proto3" json:"last_triggered_block_height,omitempty"` - IsActive bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` - Creator string `protobuf:"bytes,9,opt,name=creator,proto3" json:"creator,omitempty"` + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,6,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + LastTriggeredBlockHeight uint64 `protobuf:"varint,7,opt,name=last_triggered_block_height,json=lastTriggeredBlockHeight,proto3" json:"last_triggered_block_height,omitempty"` + IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + CreatedAt time.Time `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *Tunnel) Reset() { *m = Tunnel{} } @@ -323,6 +324,13 @@ func (m *Tunnel) GetID() uint64 { return 0 } +func (m *Tunnel) GetNonce() uint64 { + if m != nil { + return m.Nonce + } + return 0 +} + func (m *Tunnel) GetRoute() *types.Any { if m != nil { return m.Route @@ -382,11 +390,13 @@ func (m *Tunnel) GetCreator() string { type TSSPacket struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - SigningID github_com_bandprotocol_chain_v2_pkg_tss.SigningID `protobuf:"varint,4,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/pkg/tss.SigningID" json:"signing_id,omitempty"` - DestinationChainID string `protobuf:"bytes,5,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - DestinationContractAddress string `protobuf:"bytes,6,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,5,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + SigningID github_com_bandprotocol_chain_v2_pkg_tss.SigningID `protobuf:"varint,6,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/pkg/tss.SigningID" json:"signing_id,omitempty"` + DestinationChainID string `protobuf:"bytes,7,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,8,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + CreatedAt time.Time `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` } func (m *TSSPacket) Reset() { *m = TSSPacket{} } @@ -436,6 +446,20 @@ func (m *TSSPacket) GetTunnelID() uint64 { return 0 } +func (m *TSSPacket) GetNonce() uint64 { + if m != nil { + return m.Nonce + } + return 0 +} + +func (m *TSSPacket) GetFeedType() types1.FeedType { + if m != nil { + return m.FeedType + } + return types1.FEED_TYPE_UNSPECIFIED +} + func (m *TSSPacket) GetSignalPriceInfos() []SignalPriceInfo { if m != nil { return m.SignalPriceInfos @@ -474,11 +498,12 @@ func (m *TSSPacket) GetCreatedAt() time.Time { type AxelarPacket struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - IBCQueueID uint64 `protobuf:"varint,4,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` - DestinationChainID string `protobuf:"bytes,5,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - DestinationContractAddress string `protobuf:"bytes,6,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + IBCQueueID uint64 `protobuf:"varint,5,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` + DestinationChainID string `protobuf:"bytes,6,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,7,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` } func (m *AxelarPacket) Reset() { *m = AxelarPacket{} } @@ -528,6 +553,13 @@ func (m *AxelarPacket) GetTunnelID() uint64 { return 0 } +func (m *AxelarPacket) GetFeedType() types1.FeedType { + if m != nil { + return m.FeedType + } + return types1.FEED_TYPE_UNSPECIFIED +} + func (m *AxelarPacket) GetSignalPriceInfos() []SignalPriceInfo { if m != nil { return m.SignalPriceInfos @@ -576,61 +608,63 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 853 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xae, 0x9b, 0x1f, 0xb5, 0xa7, 0xd9, 0xb2, 0x1a, 0x45, 0x8b, 0x49, 0x51, 0x5c, 0xf5, 0xd4, - 0x3d, 0xac, 0xcd, 0x06, 0xf6, 0xb2, 0x12, 0x12, 0x71, 0xa3, 0xd5, 0x5a, 0x02, 0xa9, 0xd8, 0x39, - 0x71, 0xb1, 0xc6, 0xf6, 0xc4, 0x1d, 0x35, 0xf5, 0x18, 0xcf, 0x24, 0xda, 0xfc, 0x17, 0xfd, 0x13, - 0x40, 0xe2, 0xc0, 0x8d, 0xcb, 0xfe, 0x11, 0x2b, 0x4e, 0x2b, 0x4e, 0x9c, 0x0c, 0x72, 0x2f, 0xdc, - 0xe1, 0xc4, 0x09, 0xcd, 0x8f, 0xa4, 0xb4, 0xa8, 0xaa, 0x04, 0x48, 0x54, 0xdc, 0xfc, 0xe6, 0xfb, - 0xde, 0xcc, 0x9b, 0xf9, 0xbe, 0xf7, 0x12, 0xb0, 0xcf, 0x17, 0x45, 0x81, 0xe7, 0xde, 0xf2, 0x69, - 0x82, 0x39, 0x7a, 0xea, 0xa9, 0xd0, 0x2d, 0x2b, 0xca, 0x29, 0xdc, 0xd3, 0x91, 0x06, 0x07, 0xfd, - 0x9c, 0xe6, 0x54, 0x42, 0x9e, 0xf8, 0x52, 0xac, 0x81, 0x93, 0x53, 0x9a, 0xcf, 0xb1, 0x27, 0xa3, - 0x64, 0x31, 0xf3, 0x38, 0x39, 0xc7, 0x8c, 0xa3, 0xf3, 0x52, 0x13, 0xde, 0xbb, 0x49, 0x40, 0xc5, - 0x6a, 0x0d, 0xa5, 0x94, 0x9d, 0x53, 0x16, 0xab, 0x4d, 0x55, 0xb0, 0x86, 0x66, 0x18, 0x67, 0x6c, - 0x53, 0x98, 0x8c, 0x14, 0x74, 0xf8, 0xb5, 0x01, 0xcc, 0x69, 0x14, 0x85, 0x74, 0xc1, 0x31, 0x7c, - 0x09, 0xfa, 0x19, 0x66, 0x9c, 0x14, 0x88, 0x13, 0x5a, 0xc4, 0xe9, 0x29, 0x22, 0x45, 0x4c, 0x32, - 0xdb, 0x38, 0x30, 0x8e, 0x2c, 0xff, 0x51, 0x53, 0x3b, 0x70, 0x72, 0x85, 0x1f, 0x0b, 0x38, 0x98, - 0x84, 0x30, 0xbb, 0xb9, 0x96, 0xc1, 0x4f, 0xc0, 0xfb, 0xd7, 0x76, 0xa2, 0x05, 0xaf, 0x50, 0xca, - 0x63, 0x94, 0x65, 0x15, 0x66, 0xcc, 0xde, 0x16, 0x3b, 0x86, 0x83, 0x3f, 0x67, 0x6a, 0xca, 0x58, - 0x31, 0x9e, 0x5b, 0xdf, 0xbf, 0x7e, 0xd2, 0x91, 0x65, 0x1d, 0x7e, 0x63, 0x80, 0xdd, 0xf1, 0x2b, - 0x3c, 0x47, 0xd5, 0xbd, 0x2e, 0xf3, 0xc2, 0x00, 0x20, 0x22, 0x79, 0x81, 0xe6, 0x41, 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, 0x5d, 0xc9, 0xf8, 0xf0, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x06, 0x2f, - 0xd2, 0x6a, 0x09, 0x00, 0x00, + // 890 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0xae, 0x1b, 0x27, 0xb5, 0xa7, 0xd9, 0xb2, 0x1a, 0x45, 0x8b, 0x49, 0x51, 0x5c, 0xf5, 0xd4, + 0x3d, 0xac, 0xcd, 0x06, 0x7a, 0x59, 0x09, 0x89, 0xb8, 0xd1, 0x6a, 0x2d, 0x81, 0x54, 0xec, 0x9c, + 0xb8, 0x58, 0x63, 0x7b, 0xe2, 0x8e, 0x9a, 0x7a, 0x8c, 0x67, 0x12, 0x6d, 0xfe, 0x02, 0xa7, 0xfe, + 0x04, 0x90, 0x38, 0x20, 0xce, 0xfb, 0x23, 0x56, 0x9c, 0x2a, 0x4e, 0x9c, 0x02, 0x72, 0x85, 0xc4, + 0x9d, 0x1b, 0x27, 0x34, 0x33, 0x4e, 0xda, 0x14, 0xaa, 0x0a, 0x5a, 0x09, 0x6e, 0x7e, 0xf3, 0xbe, + 0x37, 0xf3, 0xbd, 0xf9, 0xbe, 0x37, 0x09, 0xd8, 0xe5, 0xd3, 0x3c, 0xc7, 0x13, 0x77, 0xf6, 0x3c, + 0xc6, 0x1c, 0x3d, 0x77, 0x55, 0xe8, 0x14, 0x25, 0xe5, 0x14, 0xee, 0xd4, 0x51, 0x9d, 0xec, 0x76, + 0x32, 0x9a, 0x51, 0x99, 0x72, 0xc5, 0x97, 0x42, 0x75, 0xed, 0x8c, 0xd2, 0x6c, 0x82, 0x5d, 0x19, + 0xc5, 0xd3, 0xb1, 0xcb, 0xc9, 0x19, 0x66, 0x1c, 0x9d, 0x15, 0x35, 0xe0, 0xbd, 0x9b, 0x00, 0x94, + 0xcf, 0x97, 0xa9, 0x84, 0xb2, 0x33, 0xca, 0x22, 0xb5, 0xa9, 0x0a, 0x96, 0xa9, 0x31, 0xc6, 0x29, + 0x5b, 0x11, 0x93, 0x91, 0x4a, 0xed, 0x7f, 0xa3, 0x01, 0x63, 0x14, 0x86, 0x01, 0x9d, 0x72, 0x0c, + 0x5f, 0x81, 0x4e, 0x8a, 0x19, 0x27, 0x39, 0xe2, 0x84, 0xe6, 0x51, 0x72, 0x82, 0x48, 0x1e, 0x91, + 0xd4, 0xd2, 0xf6, 0xb4, 0x03, 0xd3, 0x7b, 0x52, 0x2d, 0x6c, 0x38, 0xbc, 0xca, 0x1f, 0x89, 0xb4, + 0x3f, 0x0c, 0x60, 0x7a, 0x73, 0x2d, 0x85, 0x9f, 0x80, 0xf7, 0xd7, 0x76, 0xa2, 0x39, 0x2f, 0x51, + 0xc2, 0x23, 0x94, 0xa6, 0x25, 0x66, 0xcc, 0xda, 0x14, 0x3b, 0x06, 0xdd, 0xeb, 0x95, 0x35, 0x64, + 0xa0, 0x10, 0x2f, 0xcc, 0x1f, 0xde, 0x3c, 0x6b, 0x4a, 0x5a, 0xfb, 0xdf, 0x6a, 0x60, 0x7b, 0xf0, + 0x1a, 0x4f, 0x50, 0xf9, 0xbf, 0xa6, 0x79, 0xae, 0x01, 0x10, 0x92, 0x2c, 0x47, 0x13, 0x3f, 0x1f, + 0x53, 0xf8, 0x14, 0x98, 0x4c, 0x46, 0x57, 0xd4, 0xda, 0xd5, 0xc2, 0x36, 0x6a, 0xc8, 0x30, 0x30, + 0x54, 0xda, 0x4f, 0xe1, 0x21, 0x78, 0x94, 0xe2, 0x19, 0x51, 0x24, 0xe2, 0x42, 0x9d, 0xab, 0x7b, + 0x8f, 0xab, 0x85, 0xdd, 0x1e, 0x2e, 0x13, 0xde, 0x71, 0x18, 0xb4, 0x57, 0x30, 0xaf, 0x60, 0xb0, + 0x0b, 0x0c, 0x92, 0x73, 0x5c, 0xce, 0xd0, 0xc4, 0x6a,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this *TSSRoute) Equal(that interface{}) bool { @@ -779,6 +813,9 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.ID != that1.ID { return false } + if this.Nonce != that1.Nonce { + return false + } if !this.Route.Equal(that1.Route) { return false } @@ -835,6 +872,12 @@ func (this *TSSPacket) Equal(that interface{}) bool { if this.TunnelID != that1.TunnelID { return false } + if this.Nonce != that1.Nonce { + return false + } + if this.FeedType != that1.FeedType { + return false + } if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { return false } @@ -882,6 +925,9 @@ func (this *AxelarPacket) Equal(that interface{}) bool { if this.TunnelID != that1.TunnelID { return false } + if this.FeedType != that1.FeedType { + return false + } if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { return false } @@ -1098,7 +1144,7 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Creator) i = encodeVarintTunnel(dAtA, i, uint64(len(m.Creator))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x52 } n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) if err2 != nil { @@ -1107,7 +1153,7 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n2 i = encodeVarintTunnel(dAtA, i, uint64(n2)) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x4a if m.IsActive { i-- if m.IsActive { @@ -1116,12 +1162,12 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x38 + dAtA[i] = 0x40 } if m.LastTriggeredBlockHeight != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.LastTriggeredBlockHeight)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x38 } if len(m.SignalPriceInfos) > 0 { for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { @@ -1134,7 +1180,7 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } } if len(m.FeePayer) > 0 { @@ -1142,12 +1188,12 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.FeePayer) i = encodeVarintTunnel(dAtA, i, uint64(len(m.FeePayer))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } if m.FeedType != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.FeedType)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } if m.Route != nil { { @@ -1159,7 +1205,12 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if m.Nonce != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x10 } if m.ID != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.ID)) @@ -1196,25 +1247,25 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n4 i = encodeVarintTunnel(dAtA, i, uint64(n4)) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x4a if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x42 } if len(m.DestinationChainID) > 0 { i -= len(m.DestinationChainID) copy(dAtA[i:], m.DestinationChainID) i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a } if m.SigningID != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.SigningID)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x30 } if len(m.SignalPriceInfos) > 0 { for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { @@ -1227,9 +1278,19 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x2a } } + if m.FeedType != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.FeedType)) + i-- + dAtA[i] = 0x20 + } + if m.Nonce != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x18 + } if m.TunnelID != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) i-- @@ -1270,25 +1331,25 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n5 i = encodeVarintTunnel(dAtA, i, uint64(n5)) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(m.DestinationChainID) > 0 { i -= len(m.DestinationChainID) copy(dAtA[i:], m.DestinationChainID) i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } if m.IBCQueueID != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.IBCQueueID)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if len(m.SignalPriceInfos) > 0 { for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { @@ -1301,9 +1362,14 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } } + if m.FeedType != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.FeedType)) + i-- + dAtA[i] = 0x18 + } if m.TunnelID != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) i-- @@ -1416,6 +1482,9 @@ func (m *Tunnel) Size() (n int) { if m.ID != 0 { n += 1 + sovTunnel(uint64(m.ID)) } + if m.Nonce != 0 { + n += 1 + sovTunnel(uint64(m.Nonce)) + } if m.Route != nil { l = m.Route.Size() n += 1 + l + sovTunnel(uint64(l)) @@ -1460,6 +1529,12 @@ func (m *TSSPacket) Size() (n int) { if m.TunnelID != 0 { n += 1 + sovTunnel(uint64(m.TunnelID)) } + if m.Nonce != 0 { + n += 1 + sovTunnel(uint64(m.Nonce)) + } + if m.FeedType != 0 { + n += 1 + sovTunnel(uint64(m.FeedType)) + } if len(m.SignalPriceInfos) > 0 { for _, e := range m.SignalPriceInfos { l = e.Size() @@ -1494,6 +1569,9 @@ func (m *AxelarPacket) Size() (n int) { if m.TunnelID != 0 { n += 1 + sovTunnel(uint64(m.TunnelID)) } + if m.FeedType != 0 { + n += 1 + sovTunnel(uint64(m.FeedType)) + } if len(m.SignalPriceInfos) > 0 { for _, e := range m.SignalPriceInfos { l = e.Size() @@ -2094,6 +2172,25 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } } case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) } @@ -2129,7 +2226,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) } @@ -2148,7 +2245,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { break } } - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) } @@ -2180,7 +2277,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } m.FeePayer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) } @@ -2214,7 +2311,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LastTriggeredBlockHeight", wireType) } @@ -2233,7 +2330,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { break } } - case 7: + case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) } @@ -2253,7 +2350,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } } m.IsActive = bool(v != 0) - case 8: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -2286,7 +2383,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 9: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } @@ -2407,6 +2504,44 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } } case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + } + m.FeedType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeedType |= types1.FeedType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) } @@ -2440,7 +2575,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SigningID", wireType) } @@ -2459,7 +2594,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { break } } - case 5: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) } @@ -2491,7 +2626,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } m.DestinationChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) } @@ -2523,7 +2658,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -2645,6 +2780,25 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } } case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + } + m.FeedType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeedType |= types1.FeedType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) } @@ -2678,7 +2832,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IBCQueueID", wireType) } @@ -2697,7 +2851,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { break } } - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) } @@ -2729,7 +2883,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } m.DestinationChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) } @@ -2761,7 +2915,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } From 311b5d55689e505651633d524ee2a15340820846 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 24 Jul 2024 14:16:55 +0700 Subject: [PATCH 018/272] remove check module account on tunnel --- x/tunnel/keeper/keeper.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index c1f7a5ac4..a9221c00b 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -1,8 +1,6 @@ package keeper import ( - "fmt" - "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -35,11 +33,6 @@ func NewKeeper( bandtssKeeper types.BandtssKeeper, authority string, ) Keeper { - // ensure tunnel module account is set - if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { - panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) - } - // ensure that authority is a valid AccAddress if _, err := sdk.AccAddressFromBech32(authority); err != nil { panic("authority is not a valid acc address") From 8b0c8a35dc849d174151e6489c3a382b7d8d4ff4 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 24 Jul 2024 14:56:17 +0700 Subject: [PATCH 019/272] fixed review --- x/tunnel/client/cli/tx.go | 27 +++++++++++++++++++++++++++ x/tunnel/types/keys.go | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 005f067ec..0c13aa6f2 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -24,6 +24,7 @@ func GetTxCmd() *cobra.Command { } txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) + txCmd.AddCommand(GetTxCmdActivateTunnel()) return txCmd } @@ -80,3 +81,29 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return cmd } + +func GetTxCmdActivateTunnel() *cobra.Command { + cmd := &cobra.Command{ + Use: "activate-tunnel [id]", + Short: "Activate a tunnel", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + msg := types.NewMsgActivateTunnel(id, clientCtx.GetFromAddress().String()) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 1c3949141..eef54fc05 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -7,7 +7,7 @@ const ( ModuleName = "tunnel" // Version defines the current version the IBC module supports - Version = "bandchain-1" + Version = "tunnel-1" // KeyAccountsKey is used to store the key for the account KeyAccountsKey = "tunnel-accounts" From 641920909120bc4b69f27e3d0c85c777c4c86712 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 24 Jul 2024 15:23:59 +0700 Subject: [PATCH 020/272] add validate --- proto/tunnel/v1beta1/params.proto | 2 - x/tunnel/types/params.go | 70 ++++++++--- x/tunnel/types/params.pb.go | 187 +++++------------------------- 3 files changed, 83 insertions(+), 176 deletions(-) diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto index 9ace7d2ae..3198cef40 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/tunnel/v1beta1/params.proto @@ -22,6 +22,4 @@ message Params { ]; repeated cosmos.base.v1beta1.Coin axelar_route_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated string tss_supported_chains = 5; - repeated string axelar_supported_chains = 6; } diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 5325edcb2..4536e3f9b 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -1,17 +1,18 @@ package types import ( + fmt "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "gopkg.in/yaml.v2" ) var ( - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) - DefaultMinDeviationBPS = uint64(100) - DefaultTSSRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) - DefaultAxelarRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) - DefaultTSSSupportedChains = []string{"ethereum", "cosmos", "terra", "band"} - DefaultAxelarSupportedChains = []string{"ethereum", "cosmos", "terra", "band"} + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) + DefaultMinDeviationBPS = uint64(100) + DefaultTSSRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) + DefaultAxelarRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) ) // NewParams creates a new Params instance @@ -20,16 +21,12 @@ func NewParams( minDeviationBPS uint64, tssRouteFee sdk.Coins, axelarRouteFee sdk.Coins, - tssSupportedChains []string, - axelarSupportedChains []string, ) Params { return Params{ - MinDeposit: minDeposit, - MinDeviationBPS: minDeviationBPS, - TSSRouteFee: tssRouteFee, - AxelarRouteFee: axelarRouteFee, - TssSupportedChains: tssSupportedChains, - AxelarSupportedChains: axelarSupportedChains, + MinDeposit: minDeposit, + MinDeviationBPS: minDeviationBPS, + TSSRouteFee: tssRouteFee, + AxelarRouteFee: axelarRouteFee, } } @@ -40,13 +37,32 @@ func DefaultParams() Params { DefaultMinDeviationBPS, DefaultTSSRouteFee, DefaultAxelarRouteFee, - DefaultTSSSupportedChains, - DefaultAxelarSupportedChains, ) } // Validate validates the set of params func (p Params) Validate() error { + // Validate MinDeposit + if !p.MinDeposit.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf(p.MinDeposit.String()) + } + // Validate MinDeviationBPS uint64 + if err := validateUint64("min deviation BPS", false)(p.MinDeviationBPS); err != nil { + return err + } + // Validate MinDeviationBPS + if err := validateBasisPoint(p.MinDeviationBPS); err != nil { + return err + } + // Validate TSSRouteFee + if !p.TSSRouteFee.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf(p.TSSRouteFee.String()) + } + // Validate AxelarRouteFee + if !p.AxelarRouteFee.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf(p.AxelarRouteFee.String()) + } + return nil } @@ -55,3 +71,25 @@ func (p Params) String() string { out, _ := yaml.Marshal(p) return string(out) } + +// validateBasisPoint validates if a given number is a valid basis point (0 to 10000). +func validateBasisPoint(bp uint64) error { + if bp > 10000 { + return fmt.Errorf("invalid basis point: must be between 0 and 10000") + } + return nil +} + +// validateUint64 validates if a given number is a valid uint64. +func validateUint64(name string, positiveOnly bool) func(interface{}) error { + return func(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + if v <= 0 && positiveOnly { + return fmt.Errorf("%s must be positive: %d", name, v) + } + return nil + } +} diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 2e69fa814..140527300 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -28,12 +28,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params is the data structure that keeps the parameters of the module. type Params struct { - MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` - MinDeviationBPS uint64 `protobuf:"varint,2,opt,name=min_diviation_bps,json=minDiviationBps,proto3" json:"min_diviation_bps,omitempty"` - TSSRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tss_route_fee,json=tssRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tss_route_fee"` - AxelarRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=axelar_route_fee,json=axelarRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"axelar_route_fee"` - TssSupportedChains []string `protobuf:"bytes,5,rep,name=tss_supported_chains,json=tssSupportedChains,proto3" json:"tss_supported_chains,omitempty"` - AxelarSupportedChains []string `protobuf:"bytes,6,rep,name=axelar_supported_chains,json=axelarSupportedChains,proto3" json:"axelar_supported_chains,omitempty"` + MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` + MinDeviationBPS uint64 `protobuf:"varint,2,opt,name=min_diviation_bps,json=minDiviationBps,proto3" json:"min_diviation_bps,omitempty"` + TSSRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tss_route_fee,json=tssRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tss_route_fee"` + AxelarRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=axelar_route_fee,json=axelarRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"axelar_route_fee"` } func (m *Params) Reset() { *m = Params{} } @@ -96,20 +94,6 @@ func (m *Params) GetAxelarRouteFee() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -func (m *Params) GetTssSupportedChains() []string { - if m != nil { - return m.TssSupportedChains - } - return nil -} - -func (m *Params) GetAxelarSupportedChains() []string { - if m != nil { - return m.AxelarSupportedChains - } - return nil -} - func init() { proto.RegisterType((*Params)(nil), "tunnel.v1beta1.Params") } @@ -117,34 +101,31 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/params.proto", fileDescriptor_a7b5eedd244355eb) } var fileDescriptor_a7b5eedd244355eb = []byte{ - // 423 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xc1, 0x6b, 0xd4, 0x40, - 0x14, 0xc6, 0x13, 0x77, 0x5d, 0x74, 0x16, 0x5b, 0x8d, 0x15, 0xd3, 0x0a, 0xc9, 0xe2, 0x29, 0x17, - 0x33, 0x6d, 0x05, 0x0f, 0x5e, 0x0a, 0xa9, 0x08, 0x1e, 0x84, 0x92, 0x78, 0xf2, 0x12, 0x26, 0xc9, - 0xb8, 0x1d, 0x4c, 0x66, 0x86, 0xbc, 0xc9, 0x52, 0x2f, 0xfe, 0x0d, 0x1e, 0x3d, 0x16, 0x8f, 0xfe, - 0x25, 0x3d, 0xf6, 0xe8, 0x69, 0x95, 0xec, 0xc5, 0x3f, 0x43, 0x32, 0x33, 0x29, 0x45, 0x0f, 0x22, - 0x78, 0x4a, 0xc2, 0xef, 0xfb, 0xde, 0xf7, 0xbd, 0xf0, 0xd0, 0x23, 0xd5, 0x71, 0x4e, 0x6b, 0xbc, - 0x3a, 0x28, 0xa8, 0x22, 0x07, 0x58, 0x92, 0x96, 0x34, 0x10, 0xcb, 0x56, 0x28, 0xe1, 0x6d, 0x19, - 0x18, 0x5b, 0xb8, 0xb7, 0xb3, 0x14, 0x4b,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d, 0xff, 0xff, 0x6c, - 0xcb, 0x84, 0x5c, 0xc5, 0xee, 0xa3, 0x9d, 0x61, 0x6d, 0xe8, 0xa4, 0x14, 0xad, 0xa2, 0x55, 0x5e, - 0x9e, 0x12, 0xc6, 0xc1, 0xbf, 0xb9, 0x98, 0x44, 0xb7, 0x53, 0x4f, 0x01, 0x64, 0x23, 0x3a, 0xd6, - 0xc4, 0x7b, 0x86, 0x1e, 0xda, 0xa2, 0x7f, 0x98, 0x66, 0xda, 0xf4, 0xc0, 0xe0, 0xdf, 0x7c, 0xcf, - 0x6f, 0x7d, 0x3e, 0x0f, 0x9d, 0x9f, 0xe7, 0xa1, 0x9b, 0xbc, 0xba, 0xe8, 0x03, 0xf7, 0xb2, 0x0f, - 0xdc, 0x1f, 0x7d, 0xe0, 0x7e, 0xda, 0x04, 0xce, 0xe5, 0x26, 0x70, 0xbe, 0x6d, 0x02, 0xe7, 0x2d, - 0xbe, 0xb6, 0x47, 0x41, 0x78, 0xa5, 0x8f, 0xaa, 0x14, 0x35, 0xd6, 0x01, 0x78, 0x75, 0x88, 0xcf, - 0xb0, 0xbd, 0x6f, 0xbd, 0x54, 0x31, 0xd3, 0x8a, 0xa7, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x31, - 0xf8, 0x99, 0x45, 0xf6, 0x02, 0x00, 0x00, + // 376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x3f, 0x4f, 0xf2, 0x40, + 0x1c, 0xc7, 0xdb, 0x07, 0x42, 0x9e, 0xb4, 0x79, 0xe0, 0x79, 0xfa, 0x38, 0x00, 0x26, 0x2d, 0x71, + 0x62, 0xb1, 0x27, 0xb8, 0xb9, 0x90, 0x54, 0x63, 0xe2, 0x60, 0x42, 0xc0, 0xc9, 0xa5, 0xb9, 0x96, + 0x13, 0x2e, 0xb6, 0x77, 0x4d, 0x7f, 0x57, 0x82,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 0x30, + 0x67, 0x38, 0x1e, 0x35, 0x32, 0x6f, 0x29, 0x76, 0x22, 0x30, 0xee, 0xb5, 0x3f, 0x02, 0xc0, 0x8d, + 0x79, 0x22, 0x88, 0x7b, 0x43, 0x48, 0xb3, 0xf2, 0xd5, 0xe0, 0x41, 0x36, 0x38, 0xdd, 0x58, 0xfa, + 0xd5, 0x78, 0x3c, 0xca, 0x6c, 0xe7, 0x84, 0x7c, 0x6b, 0xbf, 0x2e, 0x00, 0x4a, 0xa3, 0x91, 0x68, + 0x7f, 0xf1, 0x82, 0x04, 0x38, 0xde, 0x99, 0x50, 0xfd, 0xf9, 0x7f, 0x56, 0x97, 0x25, 0x65, 0xed, + 0xc9, 0xef, 0xc7, 0xa5, 0xa5, 0xbc, 0x2f, 0x2d, 0xd5, 0xb9, 0x58, 0xa5, 0xa6, 0xba, 0x4e, 0x4d, + 0xf5, 0x2d, 0x35, 0xd5, 0x87, 0xad, 0xa9, 0xac, 0xb7, 0xa6, 0xf2, 0xb2, 0x35, 0x95, 0x6b, 0xb4, + 0x93, 0xee, 0x61, 0x36, 0xc9, 0x8f, 0xda, 0xe7, 0x01, 0xf2, 0x67, 0x98, 0x32, 0x34, 0xef, 0xa3, + 0x05, 0x2a, 0x6e, 0x5d, 0x5e, 0xe5, 0xd5, 0x72, 0xc5, 0xf1, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xda, 0x75, 0xe0, 0x94, 0x8c, 0x02, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -193,22 +174,6 @@ func (this *Params) Equal(that interface{}) bool { return false } } - if len(this.TssSupportedChains) != len(that1.TssSupportedChains) { - return false - } - for i := range this.TssSupportedChains { - if this.TssSupportedChains[i] != that1.TssSupportedChains[i] { - return false - } - } - if len(this.AxelarSupportedChains) != len(that1.AxelarSupportedChains) { - return false - } - for i := range this.AxelarSupportedChains { - if this.AxelarSupportedChains[i] != that1.AxelarSupportedChains[i] { - return false - } - } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -231,24 +196,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.AxelarSupportedChains) > 0 { - for iNdEx := len(m.AxelarSupportedChains) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AxelarSupportedChains[iNdEx]) - copy(dAtA[i:], m.AxelarSupportedChains[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.AxelarSupportedChains[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.TssSupportedChains) > 0 { - for iNdEx := len(m.TssSupportedChains) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TssSupportedChains[iNdEx]) - copy(dAtA[i:], m.TssSupportedChains[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.TssSupportedChains[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } if len(m.AxelarRouteFee) > 0 { for iNdEx := len(m.AxelarRouteFee) - 1; iNdEx >= 0; iNdEx-- { { @@ -337,18 +284,6 @@ func (m *Params) Size() (n int) { n += 1 + l + sovParams(uint64(l)) } } - if len(m.TssSupportedChains) > 0 { - for _, s := range m.TssSupportedChains { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } - if len(m.AxelarSupportedChains) > 0 { - for _, s := range m.AxelarSupportedChains { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } return n } @@ -508,70 +443,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TssSupportedChains", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TssSupportedChains = append(m.TssSupportedChains, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AxelarSupportedChains", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AxelarSupportedChains = append(m.AxelarSupportedChains, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) From 3e447e3fe38dacf1c3bd5a0ec44c5cb52c51884b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 24 Jul 2024 16:22:57 +0700 Subject: [PATCH 021/272] add packet id --- proto/tunnel/v1beta1/genesis.proto | 4 - proto/tunnel/v1beta1/tunnel.proto | 23 +-- x/tunnel/genesis.go | 10 +- x/tunnel/keeper/axelar_packet.go | 35 +--- x/tunnel/keeper/axelar_packet_test.go | 15 +- x/tunnel/keeper/tss_packet.go | 45 ++--- x/tunnel/keeper/tss_packet_test.go | 15 +- x/tunnel/keeper/tunnel.go | 12 +- x/tunnel/types/errors.go | 9 +- x/tunnel/types/genesis.go | 12 +- x/tunnel/types/genesis.pb.go | 109 ++-------- x/tunnel/types/keys.go | 16 +- x/tunnel/types/tunnel.pb.go | 280 +++++++++++--------------- 13 files changed, 195 insertions(+), 390 deletions(-) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index bddfe488c..2dec250ff 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -13,10 +13,6 @@ message GenesisState { Params params = 1 [(gogoproto.nullable) = false]; // tunnel_count is the number of tunnels. uint64 tunnel_count = 2; - // tss_packet_count is the number of tss packets. - uint64 tss_packet_count = 3; - // axelar_packet_count is the number of axelar packets. - uint64 axelar_packet_count = 4; // tunnels is the list of tunnels. repeated Tunnel tunnels = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index e518f09c0..231fc5b32 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -47,7 +47,7 @@ message Tunnel { option (gogoproto.equal) = true; uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 nonce = 2; + uint64 packet_count = 2; google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; feeds.v1beta1.FeedType feed_type = 4; string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -61,25 +61,24 @@ message Tunnel { message TSSPacket { option (gogoproto.equal) = true; - uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; - uint64 nonce = 3; - feeds.v1beta1.FeedType feed_type = 4; - repeated SignalPriceInfo signal_price_infos = 5 [(gogoproto.nullable) = false]; - uint64 signing_id = 6 [ + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + uint64 packet_id = 2 [(gogoproto.customname) = "PacketID"]; + feeds.v1beta1.FeedType feed_type = 3; + repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; + uint64 signing_id = 5 [ (gogoproto.customname) = "SigningID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/pkg/tss.SigningID" ]; - string destination_chain_id = 7 [(gogoproto.customname) = "DestinationChainID"]; - string destination_contract_address = 8; - google.protobuf.Timestamp created_at = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 7; + google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message AxelarPacket { option (gogoproto.equal) = true; - uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + uint64 packet_id = 2 [(gogoproto.customname) = "PacketID"]; feeds.v1beta1.FeedType feed_type = 3; repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; uint64 ibc_queue_id = 5 [(gogoproto.customname) = "IBCQueueID"]; diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 7d49aa583..6bd5446ee 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -23,8 +23,6 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, data *types.GenesisState) { } k.SetTunnelCount(ctx, data.TunnelCount) - k.SetTSSPacketCount(ctx, data.TssPacketCount) - k.SetAxelarPacketCount(ctx, data.AxelarPacketCount) for _, tunnel := range data.Tunnels { k.SetTunnel(ctx, tunnel) @@ -34,10 +32,8 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, data *types.GenesisState) { // ExportGenesis returns the module's exported genesis func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { return &types.GenesisState{ - Params: k.GetParams(ctx), - TunnelCount: k.GetTunnelCount(ctx), - TssPacketCount: k.GetTSSPacketCount(ctx), - AxelarPacketCount: k.GetAxelarPacketCount(ctx), - Tunnels: k.GetTunnels(ctx), + Params: k.GetParams(ctx), + TunnelCount: k.GetTunnelCount(ctx), + Tunnels: k.GetTunnels(ctx), } } diff --git a/x/tunnel/keeper/axelar_packet.go b/x/tunnel/keeper/axelar_packet.go index 0efc9007a..715833ee4 100644 --- a/x/tunnel/keeper/axelar_packet.go +++ b/x/tunnel/keeper/axelar_packet.go @@ -6,40 +6,23 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// SetAxelarPacketCount sets the total number of Axelar packets that have been sent -func (k Keeper) SetAxelarPacketCount(ctx sdk.Context, count uint64) { - ctx.KVStore(k.storeKey).Set(types.AxelarPacketCountStoreKey, sdk.Uint64ToBigEndian(count)) -} - -// GetAxelarPacketCount returns the current number of all Axelar packets ever sent -func (k Keeper) GetAxelarPacketCount(ctx sdk.Context) uint64 { - return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.AxelarPacketCountStoreKey)) -} - -// GetNextAxelarPacketID increments the Axelar packet count and returns the current number of Axelar packets -func (k Keeper) GetNextAxelarPacketID(ctx sdk.Context) uint64 { - packetNumber := k.GetAxelarPacketCount(ctx) + 1 - k.SetAxelarPacketCount(ctx, packetNumber) - return packetNumber -} - // SetAxelarPacket sets a Axelar packet in the store func (k Keeper) SetAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { - ctx.KVStore(k.storeKey).Set(types.AxelarPacketStoreKey(packet.ID), k.cdc.MustMarshal(&packet)) + ctx.KVStore(k.storeKey). + Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.PacketID), k.cdc.MustMarshal(&packet)) } -// AddAxelarPacket adds a Axelar packet to the store and returns the new packet ID -func (k Keeper) AddAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) uint64 { - packet.ID = k.GetNextAxelarPacketID(ctx) +// AddAxelarPacket adds a Axelar packet to the store +func (k Keeper) AddAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { + packet.CreatedAt = ctx.BlockTime() k.SetAxelarPacket(ctx, packet) - return packet.ID } -// GetAxelarPacket retrieves a Axelar packet by its ID -func (k Keeper) GetAxelarPacket(ctx sdk.Context, id uint64) (types.AxelarPacket, error) { - bz := ctx.KVStore(k.storeKey).Get(types.AxelarPacketStoreKey(id)) +// GetAxelarPacket retrieves a Axelar packet by its tunnel ID and packet ID +func (k Keeper) GetAxelarPacket(ctx sdk.Context, tunnelID uint64, packetID uint64) (types.AxelarPacket, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, packetID)) if bz == nil { - return types.AxelarPacket{}, types.ErrAxelarPacketNotFound.Wrapf("packetID: %d", id) + return types.AxelarPacket{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, packetID: %d", tunnelID, packetID) } var packet types.AxelarPacket diff --git a/x/tunnel/keeper/axelar_packet_test.go b/x/tunnel/keeper/axelar_packet_test.go index 0e33b83f8..7f3d29c8b 100644 --- a/x/tunnel/keeper/axelar_packet_test.go +++ b/x/tunnel/keeper/axelar_packet_test.go @@ -14,21 +14,12 @@ func TestGetSetAxelarPacket(t *testing.T) { ctx, k := s.Ctx, s.Keeper packet := types.AxelarPacket{ - ID: 1, + TunnelID: 1, + PacketID: 1, } k.SetAxelarPacket(ctx, packet) - storedPacket, err := k.GetAxelarPacket(ctx, 1) + storedPacket, err := k.GetAxelarPacket(ctx, 1, 1) require.NoError(s.T(), err) require.Equal(s.T(), packet, storedPacket) } - -func TestGetNextAxelarPacketID(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - firstID := k.GetNextAxelarPacketID(ctx) - require.Equal(s.T(), uint64(1), firstID, "expected first axelar packet ID to be 1") - secondID := k.GetNextAxelarPacketID(ctx) - require.Equal(s.T(), uint64(2), secondID, "expected next axelar packet ID to be 2") -} diff --git a/x/tunnel/keeper/tss_packet.go b/x/tunnel/keeper/tss_packet.go index 89519255c..343a19ddb 100644 --- a/x/tunnel/keeper/tss_packet.go +++ b/x/tunnel/keeper/tss_packet.go @@ -6,44 +6,24 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// SetTSSPacketCount sets the total number of TSS packets that have been sent -func (k Keeper) SetTSSPacketCount(ctx sdk.Context, count uint64) { - ctx.KVStore(k.storeKey).Set(types.TSSPacketCountStoreKey, sdk.Uint64ToBigEndian(count)) -} - -// GetTSSPacketCount returns the current number of all TSS packets ever sent -func (k Keeper) GetTSSPacketCount(ctx sdk.Context) uint64 { - return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.TSSPacketCountStoreKey)) -} - -// GetNextTSSPacketID increments the TSS packet count and returns the current number of TSS packets -func (k Keeper) GetNextTSSPacketID(ctx sdk.Context) uint64 { - packetNumber := k.GetTSSPacketCount(ctx) + 1 - k.SetTSSPacketCount(ctx, packetNumber) - return packetNumber -} - // SetTSSPacket sets a TSS packet in the store func (k Keeper) SetTSSPacket(ctx sdk.Context, packet types.TSSPacket) { - ctx.KVStore(k.storeKey).Set(types.TSSPacketStoreKey(packet.ID), k.cdc.MustMarshal(&packet)) + ctx.KVStore(k.storeKey). + Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.PacketID), k.cdc.MustMarshal(&packet)) } -// AddTSSPacket adds a TSS packet to the store and returns the new packet ID -func (k Keeper) AddTSSPacket(ctx sdk.Context, packet types.TSSPacket) uint64 { - packet.ID = k.GetNextTSSPacketID(ctx) - +// AddTSSPacket adds a TSS packet to the store +func (k Keeper) AddTSSPacket(ctx sdk.Context, packet types.TSSPacket) { // Set the creation time packet.CreatedAt = ctx.BlockTime() - k.SetTSSPacket(ctx, packet) - return packet.ID } -// GetTSSPacket retrieves a TSS packet by its ID -func (k Keeper) GetTSSPacket(ctx sdk.Context, id uint64) (types.TSSPacket, error) { - bz := ctx.KVStore(k.storeKey).Get(types.TSSPacketStoreKey(id)) +// GetTSSPacket retrieves a TSS packet by its tunnel ID and packet ID +func (k Keeper) GetTSSPacket(ctx sdk.Context, tunnelID uint64, packetID uint64) (types.TSSPacket, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, packetID)) if bz == nil { - return types.TSSPacket{}, types.ErrTSSPacketNotFound.Wrapf("packetID: %d", id) + return types.TSSPacket{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, packetID: %d", tunnelID, packetID) } var packet types.TSSPacket @@ -52,19 +32,20 @@ func (k Keeper) GetTSSPacket(ctx sdk.Context, id uint64) (types.TSSPacket, error } // MustGetTSSPacket retrieves a TSS packet by its ID and panics if the packet does not exist -func (k Keeper) MustGetTSSPacket(ctx sdk.Context, id uint64) types.TSSPacket { - packet, err := k.GetTSSPacket(ctx, id) +func (k Keeper) MustGetTSSPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) types.TSSPacket { + packet, err := k.GetTSSPacket(ctx, tunnelID, nonce) if err != nil { panic(err) } return packet } -func (k Keeper) TSSPacketHandler(ctx sdk.Context, packet types.TSSPacket) uint64 { +// TSSPacketHandler handles incoming TSS packets +func (k Keeper) TSSPacketHandler(ctx sdk.Context, packet types.TSSPacket) { // TODO: Implement TSS packet handler logic // Sign TSS packet packet.SigningID = 1 // Save the signed TSS packet - return k.AddTSSPacket(ctx, packet) + k.AddTSSPacket(ctx, packet) } diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index a5973f94b..36276eb9b 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -13,21 +13,12 @@ func TestGetSetTSSPacket(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper packet := types.TSSPacket{ - ID: 1, + TunnelID: 1, + PacketID: 1, } k.SetTSSPacket(ctx, packet) - storedPacket, err := k.GetTSSPacket(ctx, 1) + storedPacket, err := k.GetTSSPacket(ctx, 1, 1) require.NoError(s.T(), err) require.Equal(s.T(), packet, storedPacket) } - -func TestGetNextTSSPacketID(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - firstID := k.GetNextTSSPacketID(ctx) - require.Equal(s.T(), uint64(1), firstID, "expected first tss packet ID to be 1") - secondID := k.GetNextTSSPacketID(ctx) - require.Equal(s.T(), uint64(2), secondID, "expected next tss packet ID to be 2") -} diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index c8c94185c..ac078a6a7 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -154,23 +154,19 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error // SetParams sets the tunnel module parameters func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { - // Increment the nonce - tunnel.Nonce += 1 + // Increment the packet count + tunnel.PacketCount += 1 switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: fmt.Printf("Generating TSS packets for tunnel %d, route %s\n", tunnel.ID, r.String()) - packetID := k.TSSPacketHandler(ctx, types.TSSPacket{ + k.TSSPacketHandler(ctx, types.TSSPacket{ TunnelID: tunnel.ID, + PacketID: tunnel.PacketCount, SignalPriceInfos: tunnel.SignalPriceInfos, DestinationChainID: r.DestinationChainID, DestinationContractAddress: r.DestinationContractAddress, }) - - packet := k.MustGetTSSPacket(ctx, packetID) - // TODO: Emit event - fmt.Printf("Emitting event for TSS packet %d\n", packet.ID) - case *types.AxelarRoute: fmt.Printf("Generating Axelar packets for tunnel %d, route %s\n", tunnel.ID, r.String()) k.AxelarPacketHandler(ctx, types.AxelarPacket{}) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 32d26f513..eb3849b2e 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -6,9 +6,8 @@ import ( // x/tunnel module sentinel errors var ( - ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 2, "max tunnel channels") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 3, "tunnel not found") - ErrTSSPacketNotFound = errorsmod.Register(ModuleName, 4, "tss packet not found") - ErrAxelarPacketNotFound = errorsmod.Register(ModuleName, 5, "axelar packet not found") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 6, "account already exist") + ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 2, "max tunnel channels") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 3, "tunnel not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 4, "packet not found") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 6, "account already exist") ) diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index acf0bc3de..42dae0037 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -4,20 +4,16 @@ package types func NewGenesisState( params Params, tunnelCount uint64, - tssPacketCount uint64, - axelarPacketCount uint64, tunnels []Tunnel, ) *GenesisState { return &GenesisState{ - Params: params, - TunnelCount: tunnelCount, - TssPacketCount: tssPacketCount, - AxelarPacketCount: axelarPacketCount, - Tunnels: tunnels, + Params: params, + TunnelCount: tunnelCount, + Tunnels: tunnels, } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return NewGenesisState(DefaultParams(), 0, 0, 0, []Tunnel{}) + return NewGenesisState(DefaultParams(), 0, []Tunnel{}) } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 17a98712d..d83d7f958 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -29,10 +29,6 @@ type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // tunnel_count is the number of tunnels. TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` - // tss_packet_count is the number of tss packets. - TssPacketCount uint64 `protobuf:"varint,3,opt,name=tss_packet_count,json=tssPacketCount,proto3" json:"tss_packet_count,omitempty"` - // axelar_packet_count is the number of axelar packets. - AxelarPacketCount uint64 `protobuf:"varint,4,opt,name=axelar_packet_count,json=axelarPacketCount,proto3" json:"axelar_packet_count,omitempty"` // tunnels is the list of tunnels. Tunnels []Tunnel `protobuf:"bytes,5,rep,name=tunnels,proto3" json:"tunnels"` } @@ -84,20 +80,6 @@ func (m *GenesisState) GetTunnelCount() uint64 { return 0 } -func (m *GenesisState) GetTssPacketCount() uint64 { - if m != nil { - return m.TssPacketCount - } - return 0 -} - -func (m *GenesisState) GetAxelarPacketCount() uint64 { - if m != nil { - return m.AxelarPacketCount - } - return 0 -} - func (m *GenesisState) GetTunnels() []Tunnel { if m != nil { return m.Tunnels @@ -112,26 +94,23 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 297 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xc3, 0x30, - 0x18, 0xc7, 0x1b, 0x37, 0x27, 0x64, 0x63, 0x68, 0x15, 0x19, 0x53, 0x62, 0xf5, 0xd4, 0x53, 0xc2, - 0xa6, 0xf8, 0x00, 0xf3, 0x20, 0xde, 0xc6, 0xf4, 0xe4, 0x65, 0xa4, 0x35, 0x74, 0xc5, 0x2e, 0x29, - 0xcd, 0xd7, 0x31, 0xdf, 0xc2, 0xc7, 0xda, 0x71, 0x47, 0x4f, 0x22, 0xed, 0x53, 0x78, 0x93, 0x25, - 0x11, 0x9c, 0xe8, 0xad, 0xfd, 0xff, 0x7e, 0xf9, 0xbe, 0x3f, 0x1f, 0x3e, 0x85, 0x52, 0x4a, 0x91, - 0xb1, 0xc5, 0x20, 0x12, 0xc0, 0x07, 0x2c, 0x11, 0x52, 0xe8, 0x54, 0xd3, 0xbc, 0x50, 0xa0, 0xfc, - 0xae, 0xa5, 0xd4, 0xd1, 0xfe, 0x51, 0xa2, 0x12, 0x65, 0x10, 0xdb, 0x7c, 0x59, 0xab, 0x7f, 0xf2, - 0x6b, 0x46, 0xce, 0x0b, 0x3e, 0xd7, 0xff, 0x40, 0x37, 0xd1, 0xc0, 0x8b, 0x4f, 0x84, 0x3b, 0xb7, - 0x76, 0xe3, 0x3d, 0x70, 0x10, 0xfe, 0x15, 0x6e, 0xd9, 0xd7, 0x3d, 0x14, 0xa0, 0xb0, 0x3d, 0x3c, - 0xa6, 0xdb, 0x0d, 0xe8, 0xd8, 0xd0, 0x51, 0x73, 0xf5, 0x7e, 0xe6, 0x4d, 0x9c, 0xeb, 0x9f, 0xe3, - 0x8e, 0xd5, 0xa6, 0xb1, 0x2a, 0x25, 0xf4, 0x76, 0x02, 0x14, 0x36, 0x27, 0x6d, 0x9b, 0xdd, 0x6c, - 0x22, 0x3f, 0xc4, 0xfb, 0xa0, 0xf5, 0x34, 0xe7, 0xf1, 0xb3, 0x00, 0xa7, 0x35, 0x8c, 0xd6, 0x05, - 0xad, 0xc7, 0x26, 0xb6, 0x26, 0xc5, 0x87, 0x7c, 0x29, 0x32, 0x5e, 0x6c, 0xcb, 0x4d, 0x23, 0x1f, - 0x58, 0xf4, 0xd3, 0xbf, 0xc6, 0x7b, 0x76, 0x91, 0xee, 0xed, 0x06, 0x8d, 0xbf, 0x3a, 0x3f, 0x98, - 0x5f, 0xd7, 0xf9, 0x5b, 0x1e, 0xdd, 0xad, 0x2a, 0x82, 0xd6, 0x15, 0x41, 0x1f, 0x15, 0x41, 0xaf, - 0x35, 0xf1, 0xd6, 0x35, 0xf1, 0xde, 0x6a, 0xe2, 0x3d, 0xb2, 0x24, 0x85, 0x59, 0x19, 0xd1, 0x58, - 0xcd, 0x59, 0xc4, 0xe5, 0x93, 0xb9, 0x55, 0xac, 0x32, 0x16, 0xcf, 0x78, 0x2a, 0xd9, 0x62, 0xc8, - 0x96, 0xee, 0x8c, 0x0c, 0x5e, 0x72, 0xa1, 0xa3, 0x96, 0x31, 0x2e, 0xbf, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x94, 0x7e, 0x5c, 0x46, 0xcd, 0x01, 0x00, 0x00, + // 252 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x29, 0xcd, 0xcb, + 0x4b, 0xcd, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xea, 0x41, 0x65, 0xa5, + 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x94, 0x34, 0x9a, 0x19, + 0x05, 0x89, 0x45, 0x89, 0xb9, 0xc5, 0x38, 0x24, 0xa1, 0x26, 0x82, 0x25, 0x95, 0xe6, 0x33, 0x72, + 0xf1, 0xb8, 0x43, 0x6c, 0x0c, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x32, 0xe1, 0x62, 0x83, 0xe8, 0x96, + 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd3, 0x43, 0x75, 0x81, 0x5e, 0x00, 0x58, 0xd6, 0x89, + 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xa8, 0x5a, 0x21, 0x45, 0x2e, 0x1e, 0x88, 0xb2, 0xf8, 0xe4, + 0xfc, 0xd2, 0xbc, 0x12, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x96, 0x20, 0x6e, 0x88, 0x98, 0x33, 0x48, + 0x48, 0xc8, 0x8c, 0x8b, 0x1d, 0xc2, 0x2d, 0x96, 0x60, 0x55, 0x60, 0xc6, 0x66, 0x72, 0x08, 0x98, + 0x0b, 0x35, 0x19, 0xa6, 0xd8, 0xc9, 0xf3, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, + 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, + 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x93, 0x12, 0xf3, + 0x52, 0xc0, 0x3e, 0x4a, 0xce, 0xcf, 0xd1, 0x4f, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0x33, 0xd2, + 0xaf, 0x80, 0x7a, 0x56, 0xbf, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xac, 0xc2, 0x18, 0x10, + 0x00, 0x00, 0xff, 0xff, 0x9a, 0xdd, 0x54, 0x18, 0x73, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -168,16 +147,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if m.AxelarPacketCount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.AxelarPacketCount)) - i-- - dAtA[i] = 0x20 - } - if m.TssPacketCount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.TssPacketCount)) - i-- - dAtA[i] = 0x18 - } if m.TunnelCount != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.TunnelCount)) i-- @@ -218,12 +187,6 @@ func (m *GenesisState) Size() (n int) { if m.TunnelCount != 0 { n += 1 + sovGenesis(uint64(m.TunnelCount)) } - if m.TssPacketCount != 0 { - n += 1 + sovGenesis(uint64(m.TssPacketCount)) - } - if m.AxelarPacketCount != 0 { - n += 1 + sovGenesis(uint64(m.AxelarPacketCount)) - } if len(m.Tunnels) > 0 { for _, e := range m.Tunnels { l = e.Size() @@ -320,44 +283,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TssPacketCount", wireType) - } - m.TssPacketCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TssPacketCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AxelarPacketCount", wireType) - } - m.AxelarPacketCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AxelarPacketCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Tunnels", wireType) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index eef54fc05..0b2aaa400 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -30,15 +30,9 @@ var ( TunnelCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TunnelCount")...) - TSSPacketCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TSSPacketCount")...) - - AxelarPacketCountStoreKey = append(GlobalStoreKeyPrefix, []byte("AxelarPacketCount")...) - TunnelStoreKeyPrefix = []byte{0x01} - TSSPacketStoreKeyPrefix = []byte{0x02} - - AxelarPacketStoreKeyPrefix = []byte{0x03} + PacketStoreKeyPrefix = []byte{0x02} ParamsKey = []byte{0x10} ) @@ -47,10 +41,6 @@ func TunnelStoreKey(id uint64) []byte { return append(TunnelStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) } -func TSSPacketStoreKey(id uint64) []byte { - return append(TSSPacketStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) -} - -func AxelarPacketStoreKey(id uint64) []byte { - return append(AxelarPacketStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) +func TunnelPacketStoreKey(tunnelID uint64, packetID uint64) []byte { + return append(TunnelStoreKey(tunnelID), sdk.Uint64ToBigEndian(packetID)...) } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 6087ab0d2..35469045b 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -273,7 +273,7 @@ func (m *SignalPriceInfo) GetLastTimestamp() *time.Time { type Tunnel struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + PacketCount uint64 `protobuf:"varint,2,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"` Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` @@ -324,9 +324,9 @@ func (m *Tunnel) GetID() uint64 { return 0 } -func (m *Tunnel) GetNonce() uint64 { +func (m *Tunnel) GetPacketCount() uint64 { if m != nil { - return m.Nonce + return m.PacketCount } return 0 } @@ -388,15 +388,14 @@ func (m *Tunnel) GetCreator() string { } type TSSPacket struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` - FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,5,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - SigningID github_com_bandprotocol_chain_v2_pkg_tss.SigningID `protobuf:"varint,6,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/pkg/tss.SigningID" json:"signing_id,omitempty"` - DestinationChainID string `protobuf:"bytes,7,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - DestinationContractAddress string `protobuf:"bytes,8,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt time.Time `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + PacketID uint64 `protobuf:"varint,2,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` + FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + SigningID github_com_bandprotocol_chain_v2_pkg_tss.SigningID `protobuf:"varint,5,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/pkg/tss.SigningID" json:"signing_id,omitempty"` + DestinationChainID string `protobuf:"bytes,6,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,7,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` } func (m *TSSPacket) Reset() { *m = TSSPacket{} } @@ -432,13 +431,6 @@ func (m *TSSPacket) XXX_DiscardUnknown() { var xxx_messageInfo_TSSPacket proto.InternalMessageInfo -func (m *TSSPacket) GetID() uint64 { - if m != nil { - return m.ID - } - return 0 -} - func (m *TSSPacket) GetTunnelID() uint64 { if m != nil { return m.TunnelID @@ -446,9 +438,9 @@ func (m *TSSPacket) GetTunnelID() uint64 { return 0 } -func (m *TSSPacket) GetNonce() uint64 { +func (m *TSSPacket) GetPacketID() uint64 { if m != nil { - return m.Nonce + return m.PacketID } return 0 } @@ -496,8 +488,8 @@ func (m *TSSPacket) GetCreatedAt() time.Time { } type AxelarPacket struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + PacketID uint64 `protobuf:"varint,2,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` IBCQueueID uint64 `protobuf:"varint,5,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` @@ -539,16 +531,16 @@ func (m *AxelarPacket) XXX_DiscardUnknown() { var xxx_messageInfo_AxelarPacket proto.InternalMessageInfo -func (m *AxelarPacket) GetID() uint64 { +func (m *AxelarPacket) GetTunnelID() uint64 { if m != nil { - return m.ID + return m.TunnelID } return 0 } -func (m *AxelarPacket) GetTunnelID() uint64 { +func (m *AxelarPacket) GetPacketID() uint64 { if m != nil { - return m.TunnelID + return m.PacketID } return 0 } @@ -608,63 +600,63 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 890 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0xae, 0x1b, 0x27, 0xb5, 0xa7, 0xd9, 0xb2, 0x1a, 0x45, 0x8b, 0x49, 0x51, 0x5c, 0xf5, 0xd4, - 0x3d, 0xac, 0xcd, 0x06, 0x7a, 0x59, 0x09, 0x89, 0xb8,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06, 0x68, 0xab, 0x5f, 0x9a, 0x87, 0xf3, 0xcb, 0x9a, 0x33, 0x1a, 0xf7, 0x73, - 0x86, 0x7e, 0x3f, 0x67, 0x7c, 0x00, 0xda, 0x24, 0x4e, 0xa2, 0x2f, 0xa7, 0x78, 0x8a, 0x05, 0xf1, - 0xa6, 0x24, 0xbe, 0x53, 0x2d, 0x6c, 0xe0, 0x7b, 0x47, 0x9f, 0x8b, 0x65, 0x7f, 0x18, 0x00, 0x12, - 0x27, 0xea, 0xfb, 0x76, 0x9d, 0x5b, 0x0f, 0xae, 0xf3, 0xd6, 0x3f, 0xd4, 0xd9, 0xb8, 0x87, 0xce, - 0xde, 0x67, 0xdf, 0x55, 0x3d, 0xed, 0x6d, 0xd5, 0xd3, 0x2e, 0xaa, 0x9e, 0xf6, 0x4b, 0xd5, 0xd3, - 0xce, 0x2f, 0x7b, 0x1b, 0x17, 0x97, 0xbd, 0x8d, 0x9f, 0x2e, 0x7b, 0x1b, 0x5f, 0xb8, 0x77, 0xce, - 0xc6, 0xeb, 0xfa, 0xcf, 0x9d, 0x2b, 0x44, 0x65, 0x71, 0x4b, 0x22, 0x3e, 0xfc, 0x33, 0x00, 0x00, - 0xff, 0xff, 0xb0, 0x48, 0xa6, 0xb1, 0x02, 0x0a, 0x00, 0x00, + // 889 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xae, 0xdb, 0x24, 0xb5, 0x27, 0xd9, 0xb2, 0x1a, 0x45, 0x8b, 0x49, 0x51, 0x5c, 0x7a, 0x2a, + 0x87, 0xb5, 0xd9, 0x40, 0x2f, 0x2b, 0x21, 0x11, 0x27, 0x5a, 0xad, 0x25, 0x90, 0x8a, 0x9d, 0x13, + 0x17, 0xcb, 0xf6, 0x4c, 0xdc, 0x51, 0x53, 0x8f, 0xf1, 0x4c, 0xa2, 0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 0xfc, 0x56, 0xbd, 0x72, 0x76, 0x83, + 0x71, 0xb8, 0x4b, 0x10, 0x7c, 0x03, 0x74, 0xca, 0x24, 0xbb, 0xc0, 0x3c, 0xce, 0xe8, 0xbc, 0xe0, + 0xea, 0x60, 0x61, 0x5b, 0xe5, 0x46, 0x22, 0x05, 0x4f, 0x41, 0xb3, 0x12, 0xba, 0xca, 0x23, 0xb4, + 0x07, 0xdd, 0x5f, 0xf5, 0x32, 0x2c, 0x96, 0xfe, 0x8d, 0xfc, 0xa1, 0x62, 0xc3, 0x77, 0x80, 0x25, + 0xe6, 0x2b, 0xe6, 0xcb, 0x52, 0x1d, 0xf2, 0x60, 0xf0, 0xaa, 0xab, 0x26, 0x4e, 0xcf, 0x9f, 0xfb, + 0x04, 0x63, 0x34, 0x59, 0x96, 0x38, 0x34, 0xa7, 0x7a, 0x05, 0x4f, 0x65, 0x55, 0x5c, 0x26, 0x4b, + 0x5c, 0xc9, 0xc3, 0x5b, 0xbe, 0xfd, 0xf5, 0xf3, 0x87, 0x5d, 0x3d, 0xc6, 0xda, 0x6d, 0x11, 0xaf, + 0x48, 0x91, 0xcb, 0xb2, 0x33, 0xc1, 0x84, 0x11, 0x80, 0x5a, 0x4b, 0x79, 0x8f, 0x31, 0x29, 0xa6, + 0x94, 0xd9, 0xad, 0xa3, 0xbd, 0x93, 0xf6, 0xc0, 0x71, 0xb7, 0x9f, 0x1c, 0xf7, 0x96, 0x11, 0xfc, + 0xc6, 0x8b, 0x95, 0xb3, 0x13, 0xde, 0x67, 0xdb, 0x69, 0x06, 0xdf, 0x05, 0x87, 0xb3, 0x84, 0xf1, + 0x98, 0x57, 0x24, 0xcf, 0x71, 0x85, 0x51, 0x9c, 0xce, 0x68, 0x76, 0x11, 0x9f, 0x63, 0x92, 0x9f, + 0x73, 0x7b, 0x5f, 0x5e, 0x95, 0x2d, 0x28, 0x93, 0x35, 0xc3, 0x17, 0x84, 0xa7, 0x12, 0x87, 0x87, + 0xc0, 0x22, 0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 0xfd, 0xe6, 0xfc, 0x5f, 0xcc, 0xf2, + 0x16, 0xe8, 0x90, 0x34, 0x8b, 0x3f, 0x9e, 0xe3, 0x39, 0xbe, 0xb1, 0xcb, 0x41, 0xbd, 0x72, 0x40, + 0xe0, 0x8f, 0x3e, 0x14, 0xe9, 0x60, 0x1c, 0x02, 0x92, 0x66, 0x6a, 0xfd, 0x5f, 0x95, 0xde, 0xff, + 0xe0, 0xcb, 0xba, 0x6f, 0xbc, 0xa8, 0xfb, 0xc6, 0xcb, 0xba, 0x6f, 0x7c, 0x57, 0xf7, 0x8d, 0xab, + 0xeb, 0xfe, 0xce, 0xcb, 0xeb, 0xfe, 0xce, 0x37, 0xd7, 0xfd, 0x9d, 0x8f, 0xbc, 0x3b, 0xc7, 0xe5, + 0x99, 0xfe, 0xe7, 0xe7, 0x09, 0x51, 0x59, 0xda, 0x92, 0x8c, 0xb7, 0x7f, 0x0e, 0x00, 0x00, 0xff, + 0xff, 0xed, 0x15, 0x0f, 0x87, 0x1f, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -813,7 +805,7 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.ID != that1.ID { return false } - if this.Nonce != that1.Nonce { + if this.PacketCount != that1.PacketCount { return false } if !this.Route.Equal(that1.Route) { @@ -866,13 +858,10 @@ func (this *TSSPacket) Equal(that interface{}) bool { } else if this == nil { return false } - if this.ID != that1.ID { - return false - } if this.TunnelID != that1.TunnelID { return false } - if this.Nonce != that1.Nonce { + if this.PacketID != that1.PacketID { return false } if this.FeedType != that1.FeedType { @@ -919,10 +908,10 @@ func (this *AxelarPacket) Equal(that interface{}) bool { } else if this == nil { return false } - if this.ID != that1.ID { + if this.TunnelID != that1.TunnelID { return false } - if this.TunnelID != that1.TunnelID { + if this.PacketID != that1.PacketID { return false } if this.FeedType != that1.FeedType { @@ -1207,8 +1196,8 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if m.Nonce != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) + if m.PacketCount != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.PacketCount)) i-- dAtA[i] = 0x10 } @@ -1247,25 +1236,25 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n4 i = encodeVarintTunnel(dAtA, i, uint64(n4)) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x42 if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a } if len(m.DestinationChainID) > 0 { i -= len(m.DestinationChainID) copy(dAtA[i:], m.DestinationChainID) i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if m.SigningID != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.SigningID)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if len(m.SignalPriceInfos) > 0 { for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { @@ -1278,26 +1267,21 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } if m.FeedType != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.FeedType)) i-- - dAtA[i] = 0x20 - } - if m.Nonce != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) - i-- dAtA[i] = 0x18 } - if m.TunnelID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) + if m.PacketID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.PacketID)) i-- dAtA[i] = 0x10 } - if m.ID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.ID)) + if m.TunnelID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) i-- dAtA[i] = 0x8 } @@ -1370,13 +1354,13 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if m.TunnelID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) + if m.PacketID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.PacketID)) i-- dAtA[i] = 0x10 } - if m.ID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.ID)) + if m.TunnelID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) i-- dAtA[i] = 0x8 } @@ -1482,8 +1466,8 @@ func (m *Tunnel) Size() (n int) { if m.ID != 0 { n += 1 + sovTunnel(uint64(m.ID)) } - if m.Nonce != 0 { - n += 1 + sovTunnel(uint64(m.Nonce)) + if m.PacketCount != 0 { + n += 1 + sovTunnel(uint64(m.PacketCount)) } if m.Route != nil { l = m.Route.Size() @@ -1523,14 +1507,11 @@ func (m *TSSPacket) Size() (n int) { } var l int _ = l - if m.ID != 0 { - n += 1 + sovTunnel(uint64(m.ID)) - } if m.TunnelID != 0 { n += 1 + sovTunnel(uint64(m.TunnelID)) } - if m.Nonce != 0 { - n += 1 + sovTunnel(uint64(m.Nonce)) + if m.PacketID != 0 { + n += 1 + sovTunnel(uint64(m.PacketID)) } if m.FeedType != 0 { n += 1 + sovTunnel(uint64(m.FeedType)) @@ -1563,12 +1544,12 @@ func (m *AxelarPacket) Size() (n int) { } var l int _ = l - if m.ID != 0 { - n += 1 + sovTunnel(uint64(m.ID)) - } if m.TunnelID != 0 { n += 1 + sovTunnel(uint64(m.TunnelID)) } + if m.PacketID != 0 { + n += 1 + sovTunnel(uint64(m.PacketID)) + } if m.FeedType != 0 { n += 1 + sovTunnel(uint64(m.FeedType)) } @@ -2173,9 +2154,9 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketCount", wireType) } - m.Nonce = 0 + m.PacketCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2185,7 +2166,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + m.PacketCount |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2466,25 +2447,6 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - m.ID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) } @@ -2503,11 +2465,11 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { break } } - case 3: + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketID", wireType) } - m.Nonce = 0 + m.PacketID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2517,12 +2479,12 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + m.PacketID |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) } @@ -2541,7 +2503,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { break } } - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) } @@ -2575,7 +2537,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SigningID", wireType) } @@ -2594,7 +2556,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { break } } - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) } @@ -2626,7 +2588,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } m.DestinationChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) } @@ -2658,7 +2620,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -2743,9 +2705,9 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) } - m.ID = 0 + m.TunnelID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2755,16 +2717,16 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ID |= uint64(b&0x7F) << shift + m.TunnelID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketID", wireType) } - m.TunnelID = 0 + m.PacketID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2774,7 +2736,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TunnelID |= uint64(b&0x7F) << shift + m.PacketID |= uint64(b&0x7F) << shift if b < 0x80 { break } From e5bb0fcfcfb03e331a91662eeb2ac4ca75c0d7de Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 25 Jul 2024 16:21:02 +0700 Subject: [PATCH 022/272] fix tunnel --- x/tunnel/keeper/msg_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 6142c61f7..69994d90e 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -28,7 +28,7 @@ func (ms msgServer) CreateTunnel( ) (*types.MsgCreateTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - signalPriceInfos := make([]types.SignalPriceInfo, len(req.SignalInfos)) + var signalPriceInfos []types.SignalPriceInfo for _, signalInfo := range req.SignalInfos { signalPriceInfos = append(signalPriceInfos, types.SignalPriceInfo{ SignalID: signalInfo.SignalID, From b89c7a2e7e99c5523f62e6886af2ffbacbb61c5a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 25 Jul 2024 16:27:48 +0700 Subject: [PATCH 023/272] temp --- proto/tunnel/v1beta1/query.proto | 41 + proto/tunnel/v1beta1/tunnel.proto | 6 +- x/tunnel/keeper/axelar_packet.go | 8 +- x/tunnel/keeper/axelar_packet_test.go | 2 +- x/tunnel/keeper/grpc_query.go | 93 +++ x/tunnel/keeper/grpc_query_test.go | 65 ++ x/tunnel/keeper/tss_packet.go | 8 +- x/tunnel/keeper/tss_packet_test.go | 2 +- x/tunnel/keeper/tunnel.go | 41 +- x/tunnel/keeper/tunnel_test.go | 24 + x/tunnel/types/codec.go | 2 + x/tunnel/types/keys.go | 6 +- x/tunnel/types/query.pb.go | 1052 +++++++++++++++++++++++-- x/tunnel/types/query.pb.gw.go | 242 ++++++ x/tunnel/types/tunnel.go | 35 + x/tunnel/types/tunnel.pb.go | 180 ++--- 16 files changed, 1632 insertions(+), 175 deletions(-) create mode 100644 x/tunnel/keeper/grpc_query_test.go create mode 100644 x/tunnel/types/tunnel.go diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index d925f97ec..2b45bc201 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -6,6 +6,7 @@ option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; +import "google/protobuf/any.proto"; import "tunnel/v1beta1/params.proto"; import "tunnel/v1beta1/tunnel.proto"; @@ -25,6 +26,16 @@ service Query { rpc Tunnel(QueryTunnelRequest) returns (QueryTunnelResponse) { option (google.api.http).get = "/tunnel/v1beta1/tunnel/{tunnel_id}"; } + + // Packets is a RPC method that returns all packets of a tunnel. + rpc Packets(QueryPacketsRequest) returns (QueryPacketsResponse) { + option (google.api.http).get = "/tunnel/v1beta1/packets/{tunnel_id}"; + } + + // Packet is a RPC method that returns a packet by its tunnel ID and nonce. + rpc Packet(QueryPacketRequest) returns (QueryPacketResponse) { + option (google.api.http).get = "/tunnel/v1beta1/packet/{tunnel_id}/{nonce}"; + } } // TunnelStatusFilter defines a filter for tunnel status. @@ -67,6 +78,36 @@ message QueryTunnelResponse { Tunnel tunnel = 1 [(gogoproto.nullable) = false]; } +// QueryPacketsRequest is the request type for the Query/Packets RPC method. +message QueryPacketsRequest { + // TunnelID is the ID of the tunnel to query packets. + uint64 tunnel_id = 1; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryPacketsResponse is the response type for the Query/Packets RPC method. +message QueryPacketsResponse { + // Packets is a list of packets. + repeated google.protobuf.Any packets = 1 [(gogoproto.nullable) = false]; + // pagination defines an optional pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryPacketRequest is the request type for the Query/Packet RPC method. +message QueryPacketRequest { + // TunnelID is the ID of the tunnel to query packets. + uint64 tunnel_id = 1; + // Nonce is the nonce of the packet to query. + uint64 nonce = 2; +} + +// QueryPacketResponse is the response type for the Query/Packet RPC method. +message QueryPacketResponse { + // Packet is the packet with the given tunnel ID and nonce. + google.protobuf.Any packet = 1 [(gogoproto.nullable) = false]; +} + // QueryParamsRequest is the request type for the Query/Params RPC method. message QueryParamsRequest {} diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 231fc5b32..a55738f9c 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -47,7 +47,7 @@ message Tunnel { option (gogoproto.equal) = true; uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 packet_count = 2; + uint64 nonce_count = 2; google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; feeds.v1beta1.FeedType feed_type = 4; string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -62,7 +62,7 @@ message TSSPacket { option (gogoproto.equal) = true; uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - uint64 packet_id = 2 [(gogoproto.customname) = "PacketID"]; + uint64 nonce = 2; feeds.v1beta1.FeedType feed_type = 3; repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; uint64 signing_id = 5 [ @@ -78,7 +78,7 @@ message AxelarPacket { option (gogoproto.equal) = true; uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - uint64 packet_id = 2 [(gogoproto.customname) = "PacketID"]; + uint64 nonce = 2; feeds.v1beta1.FeedType feed_type = 3; repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; uint64 ibc_queue_id = 5 [(gogoproto.customname) = "IBCQueueID"]; diff --git a/x/tunnel/keeper/axelar_packet.go b/x/tunnel/keeper/axelar_packet.go index 715833ee4..6d96429b3 100644 --- a/x/tunnel/keeper/axelar_packet.go +++ b/x/tunnel/keeper/axelar_packet.go @@ -9,7 +9,7 @@ import ( // SetAxelarPacket sets a Axelar packet in the store func (k Keeper) SetAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { ctx.KVStore(k.storeKey). - Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.PacketID), k.cdc.MustMarshal(&packet)) + Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.Nonce), k.cdc.MustMarshal(&packet)) } // AddAxelarPacket adds a Axelar packet to the store @@ -19,10 +19,10 @@ func (k Keeper) AddAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { } // GetAxelarPacket retrieves a Axelar packet by its tunnel ID and packet ID -func (k Keeper) GetAxelarPacket(ctx sdk.Context, tunnelID uint64, packetID uint64) (types.AxelarPacket, error) { - bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, packetID)) +func (k Keeper) GetAxelarPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) (types.AxelarPacket, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, nonce)) if bz == nil { - return types.AxelarPacket{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, packetID: %d", tunnelID, packetID) + return types.AxelarPacket{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, nonce: %d", tunnelID, nonce) } var packet types.AxelarPacket diff --git a/x/tunnel/keeper/axelar_packet_test.go b/x/tunnel/keeper/axelar_packet_test.go index 7f3d29c8b..9cac487c3 100644 --- a/x/tunnel/keeper/axelar_packet_test.go +++ b/x/tunnel/keeper/axelar_packet_test.go @@ -15,7 +15,7 @@ func TestGetSetAxelarPacket(t *testing.T) { packet := types.AxelarPacket{ TunnelID: 1, - PacketID: 1, + Nonce: 1, } k.SetAxelarPacket(ctx, packet) diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 357c859a6..0657ae80e 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -2,7 +2,9 @@ package keeper import ( "context" + "fmt" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" @@ -66,6 +68,97 @@ func (q queryServer) Tunnel(c context.Context, req *types.QueryTunnelRequest) (* return &types.QueryTunnelResponse{Tunnel: tunnel}, nil } +// Packets queries all packets of the module. +func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) (*types.QueryPacketsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + tunnel, err := q.k.GetTunnel(ctx, req.TunnelId) + if err != nil { + return nil, err + } + + store := prefix.NewStore(ctx.KVStore(q.k.storeKey), types.TunnelPacketsStoreKey(req.TunnelId)) + + var pageRes *query.PageResponse + var packets []codectypes.Any + switch tunnel.Route.GetCachedValue().(type) { + case *types.TSSRoute: + pageRes, err = query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { + var packet types.TSSPacket + q.k.cdc.MustUnmarshal(value, &packet) + + any, err := codectypes.NewAnyWithValue(&packet) + if err != nil { + panic(err) + } + + packets = append(packets, *any) + return nil + }) + if err != nil { + return nil, err + } + case *types.AxelarRoute: + pageRes, err = query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { + var packet types.AxelarPacket + q.k.cdc.MustUnmarshal(value, &packet) + + any, err := codectypes.NewAnyWithValue(&packet) + if err != nil { + panic(err) + } + + packets = append(packets, *any) + return nil + }) + if err != nil { + return nil, err + } + default: + return nil, fmt.Errorf("unknown route type") + } + return &types.QueryPacketsResponse{Packets: packets, Pagination: pageRes}, nil +} + +// Packet queries a packet by its ID. +func (q queryServer) Packet(c context.Context, req *types.QueryPacketRequest) (*types.QueryPacketResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + tunnel, err := q.k.GetTunnel(ctx, req.TunnelId) + if err != nil { + return nil, err + } + + switch tunnel.Route.GetCachedValue().(type) { + case *types.TSSRoute: + packet, err := q.k.GetTSSPacket(ctx, req.TunnelId, req.Nonce) + if err != nil { + return nil, err + } + + any, err := codectypes.NewAnyWithValue(&packet) + if err != nil { + return nil, err + } + + return &types.QueryPacketResponse{Packet: *any}, nil + case *types.AxelarRoute: + packet, err := q.k.GetAxelarPacket(ctx, req.TunnelId, req.Nonce) + if err != nil { + return nil, err + } + + any, err := codectypes.NewAnyWithValue(&packet) + if err != nil { + return nil, err + } + + return &types.QueryPacketResponse{Packet: *any}, nil + default: + return nil, fmt.Errorf("unknown route type") + } +} + // Params queries all params of the module. func (q queryServer) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go new file mode 100644 index 000000000..cb783a1de --- /dev/null +++ b/x/tunnel/keeper/grpc_query_test.go @@ -0,0 +1,65 @@ +package keeper_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func TestGRPCQueryPackets(t *testing.T) { + s := testutil.NewTestSuite(t) + // q := s.QueryServer + + tunnel := types.Tunnel{ + ID: 1, + NonceCount: 2, + } + r := types.TSSRoute{ + DestinationChainID: "1", + DestinationContractAddress: "0x123", + } + err := tunnel.SetRoute(&r) + a := tunnel.Route.GetCachedValue() + fmt.Printf("route: %+v\n", a) + require.NoError(t, err) + + tssPackets := []types.TSSPacket{ + { + TunnelID: 1, + Nonce: 1, + }, + { + TunnelID: 1, + Nonce: 2, + }, + } + + s.Keeper.SetTunnel(s.Ctx, tunnel) + for _, packet := range tssPackets { + s.Keeper.SetTSSPacket(s.Ctx, packet) + } + + tu, err := s.Keeper.GetTunnel(s.Ctx, 1) + require.NoError(t, err) + + ss, err := tu.UnpackRoute() + require.NoError(t, err) + + fmt.Printf("route2 %+v\n", ss) + + // ts := s.Keeper.GetTunnels(s.Ctx) + // for _, tunnel := range ts { + // a := tunnel.Route.GetCachedValue() + // fmt.Printf("route: %+v\n", a) + // } + + // res, err := q.Packets(s.Ctx, &types.QueryPacketsRequest{ + // TunnelId: 1, + // }) + // require.NoError(t, err) + // require.Len(t, res, len(res.Packets)) +} diff --git a/x/tunnel/keeper/tss_packet.go b/x/tunnel/keeper/tss_packet.go index 343a19ddb..fc135a072 100644 --- a/x/tunnel/keeper/tss_packet.go +++ b/x/tunnel/keeper/tss_packet.go @@ -9,7 +9,7 @@ import ( // SetTSSPacket sets a TSS packet in the store func (k Keeper) SetTSSPacket(ctx sdk.Context, packet types.TSSPacket) { ctx.KVStore(k.storeKey). - Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.PacketID), k.cdc.MustMarshal(&packet)) + Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.Nonce), k.cdc.MustMarshal(&packet)) } // AddTSSPacket adds a TSS packet to the store @@ -20,10 +20,10 @@ func (k Keeper) AddTSSPacket(ctx sdk.Context, packet types.TSSPacket) { } // GetTSSPacket retrieves a TSS packet by its tunnel ID and packet ID -func (k Keeper) GetTSSPacket(ctx sdk.Context, tunnelID uint64, packetID uint64) (types.TSSPacket, error) { - bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, packetID)) +func (k Keeper) GetTSSPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) (types.TSSPacket, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, nonce)) if bz == nil { - return types.TSSPacket{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, packetID: %d", tunnelID, packetID) + return types.TSSPacket{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, nonce: %d", tunnelID, nonce) } var packet types.TSSPacket diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index 36276eb9b..407302526 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -14,7 +14,7 @@ func TestGetSetTSSPacket(t *testing.T) { ctx, k := s.Ctx, s.Keeper packet := types.TSSPacket{ TunnelID: 1, - PacketID: 1, + Nonce: 1, } k.SetTSSPacket(ctx, packet) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index ac078a6a7..f93d8a118 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -98,7 +98,11 @@ func (k Keeper) GetActiveTunnels(ctx sdk.Context) []types.Tunnel { func (k Keeper) GetRequiredProcessTunnels( ctx sdk.Context, ) []types.Tunnel { + // TODO: Remove mock test + return k.GetTunnels(ctx) + var tunnels []types.Tunnel + activeTunnels := k.GetActiveTunnels(ctx) latestPrices := k.feedsKeeper.GetPrices(ctx) latestPricesMap := make(map[string]feedsTypes.Price, len(latestPrices)) @@ -152,17 +156,47 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error return nil } +func (k Keeper) GetPackets(ctx sdk.Context, tunnelID uint64) ([]any, error) { + var packets []any + iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.TunnelPacketsStoreKey(tunnelID)) + defer iterator.Close() + + tunnel, err := k.GetTunnel(ctx, tunnelID) + if err != nil { + return nil, err + } + + switch tunnel.Route.GetCachedValue().(type) { + case *types.TSSRoute: + for ; iterator.Valid(); iterator.Next() { + var packet types.TSSPacket + k.cdc.MustUnmarshal(iterator.Value(), &packet) + packets = append(packets, packet) + } + case *types.AxelarRoute: + for ; iterator.Valid(); iterator.Next() { + var packet types.AxelarPacket + k.cdc.MustUnmarshal(iterator.Value(), &packet) + packets = append(packets, packet) + } + default: + return nil, fmt.Errorf("unknown route type") + } + + return packets, nil +} + // SetParams sets the tunnel module parameters func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { // Increment the packet count - tunnel.PacketCount += 1 + tunnel.NonceCount += 1 switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: fmt.Printf("Generating TSS packets for tunnel %d, route %s\n", tunnel.ID, r.String()) k.TSSPacketHandler(ctx, types.TSSPacket{ TunnelID: tunnel.ID, - PacketID: tunnel.PacketCount, + Nonce: tunnel.NonceCount, SignalPriceInfos: tunnel.SignalPriceInfos, DestinationChainID: r.DestinationChainID, DestinationContractAddress: r.DestinationContractAddress, @@ -170,7 +204,10 @@ func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { case *types.AxelarRoute: fmt.Printf("Generating Axelar packets for tunnel %d, route %s\n", tunnel.ID, r.String()) k.AxelarPacketHandler(ctx, types.AxelarPacket{}) + default: + panic("unknown route type") } + // Set the last SignalPriceInfos k.SetTunnel(ctx, tunnel) } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 9e5fd5499..86103e1f2 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "fmt" "testing" "time" @@ -174,6 +175,29 @@ func TestGetRequiredProcessTunnels(t *testing.T) { ) } +func TestProcessTunnel(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Create a new tunnel instance + tunnel := types.Tunnel{ + ID: 1, + } + err := tunnel.SetRoute(&types.TSSRoute{ + DestinationChainID: "1", + DestinationContractAddress: "0x123", + }) + require.NoError(t, err) + + k.SetTunnel(ctx, tunnel) + + tu, err := k.GetTunnel(ctx, tunnel.ID) + require.NoError(t, err) + + k.ProcessTunnel(ctx, tu) + fmt.Printf("route: %+v\n", tunnel.Route.GetCachedValue()) +} + func TestGetNextTunnelID(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 1b9b6ebac..9a35a8cf4 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -19,6 +19,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterInterface((*Route)(nil), nil) cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) cdc.RegisterConcrete(&AxelarRoute{}, "tunnel/AxelarRoute", nil) + // cdc.RegisterConcrete(&TSSPacket{}, "tunnel/TSSpacket", nil) + // cdc.RegisterConcrete(&AxelarPacket{}, "tunnel/AxelarPacket", nil) } // RegisterInterfaces registers the x/tunnel interfaces types with the interface registry diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 0b2aaa400..86cc05b1e 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -41,6 +41,10 @@ func TunnelStoreKey(id uint64) []byte { return append(TunnelStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) } +func TunnelPacketsStoreKey(tunnelID uint64) []byte { + return append(PacketStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) +} + func TunnelPacketStoreKey(tunnelID uint64, packetID uint64) []byte { - return append(TunnelStoreKey(tunnelID), sdk.Uint64ToBigEndian(packetID)...) + return append(TunnelPacketsStoreKey(tunnelID), sdk.Uint64ToBigEndian(packetID)...) } diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 1af46d13f..497603822 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -264,6 +265,217 @@ func (m *QueryTunnelResponse) GetTunnel() Tunnel { return Tunnel{} } +// QueryPacketsRequest is the request type for the Query/Packets RPC method. +type QueryPacketsRequest struct { + // TunnelID is the ID of the tunnel to query packets. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPacketsRequest) Reset() { *m = QueryPacketsRequest{} } +func (m *QueryPacketsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPacketsRequest) ProtoMessage() {} +func (*QueryPacketsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{4} +} +func (m *QueryPacketsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPacketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPacketsRequest.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 *QueryPacketsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPacketsRequest.Merge(m, src) +} +func (m *QueryPacketsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPacketsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPacketsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPacketsRequest proto.InternalMessageInfo + +func (m *QueryPacketsRequest) GetTunnelId() uint64 { + if m != nil { + return m.TunnelId + } + return 0 +} + +func (m *QueryPacketsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryPacketsResponse is the response type for the Query/Packets RPC method. +type QueryPacketsResponse struct { + // Packets is a list of packets. + Packets []types.Any `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets"` + // pagination defines an optional pagination for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPacketsResponse) Reset() { *m = QueryPacketsResponse{} } +func (m *QueryPacketsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPacketsResponse) ProtoMessage() {} +func (*QueryPacketsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{5} +} +func (m *QueryPacketsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPacketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPacketsResponse.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 *QueryPacketsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPacketsResponse.Merge(m, src) +} +func (m *QueryPacketsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPacketsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPacketsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPacketsResponse proto.InternalMessageInfo + +func (m *QueryPacketsResponse) GetPackets() []types.Any { + if m != nil { + return m.Packets + } + return nil +} + +func (m *QueryPacketsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryPacketRequest is the request type for the Query/Packet RPC method. +type QueryPacketRequest struct { + // TunnelID is the ID of the tunnel to query packets. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // Nonce is the nonce of the packet to query. + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` +} + +func (m *QueryPacketRequest) Reset() { *m = QueryPacketRequest{} } +func (m *QueryPacketRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPacketRequest) ProtoMessage() {} +func (*QueryPacketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{6} +} +func (m *QueryPacketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPacketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPacketRequest.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 *QueryPacketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPacketRequest.Merge(m, src) +} +func (m *QueryPacketRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPacketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPacketRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPacketRequest proto.InternalMessageInfo + +func (m *QueryPacketRequest) GetTunnelId() uint64 { + if m != nil { + return m.TunnelId + } + return 0 +} + +func (m *QueryPacketRequest) GetNonce() uint64 { + if m != nil { + return m.Nonce + } + return 0 +} + +// QueryPacketResponse is the response type for the Query/Packet RPC method. +type QueryPacketResponse struct { + // Packet is the packet with the given tunnel ID and nonce. + Packet types.Any `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` +} + +func (m *QueryPacketResponse) Reset() { *m = QueryPacketResponse{} } +func (m *QueryPacketResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPacketResponse) ProtoMessage() {} +func (*QueryPacketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{7} +} +func (m *QueryPacketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPacketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPacketResponse.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 *QueryPacketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPacketResponse.Merge(m, src) +} +func (m *QueryPacketResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPacketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPacketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPacketResponse proto.InternalMessageInfo + +func (m *QueryPacketResponse) GetPacket() types.Any { + if m != nil { + return m.Packet + } + return types.Any{} +} + // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -272,7 +484,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{4} + return fileDescriptor_220124e1821d297e, []int{8} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -311,7 +523,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{5} + return fileDescriptor_220124e1821d297e, []int{9} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -353,6 +565,10 @@ func init() { proto.RegisterType((*QueryTunnelsResponse)(nil), "tunnel.v1beta1.QueryTunnelsResponse") proto.RegisterType((*QueryTunnelRequest)(nil), "tunnel.v1beta1.QueryTunnelRequest") proto.RegisterType((*QueryTunnelResponse)(nil), "tunnel.v1beta1.QueryTunnelResponse") + proto.RegisterType((*QueryPacketsRequest)(nil), "tunnel.v1beta1.QueryPacketsRequest") + proto.RegisterType((*QueryPacketsResponse)(nil), "tunnel.v1beta1.QueryPacketsResponse") + proto.RegisterType((*QueryPacketRequest)(nil), "tunnel.v1beta1.QueryPacketRequest") + proto.RegisterType((*QueryPacketResponse)(nil), "tunnel.v1beta1.QueryPacketResponse") proto.RegisterType((*QueryParamsRequest)(nil), "tunnel.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "tunnel.v1beta1.QueryParamsResponse") } @@ -360,44 +576,54 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 583 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xc1, 0x6f, 0xd3, 0x3e, - 0x18, 0x4d, 0xfa, 0xdb, 0xaf, 0xdb, 0x3c, 0x69, 0x9a, 0x4c, 0x35, 0xba, 0x0c, 0xb2, 0x29, 0x9b, - 0x60, 0xea, 0x21, 0xa6, 0x85, 0x3b, 0xea, 0x46, 0x8b, 0x22, 0x50, 0x55, 0xd2, 0x96, 0x03, 0x97, - 0xca, 0x6d, 0xad, 0x2c, 0x52, 0x1b, 0xa7, 0xb5, 0x53, 0x31, 0xa1, 0x5d, 0x38, 0x71, 0x04, 0x71, - 0xe7, 0xc2, 0x3f, 0xb3, 0xe3, 0x24, 0x2e, 0x9c, 0x10, 0x6a, 0xf9, 0x03, 0xf8, 0x13, 0x50, 0x6d, - 0xa7, 0x5b, 0x68, 0x5a, 0x6e, 0x91, 0xdf, 0xfb, 0xbe, 0xf7, 0xde, 0xe7, 0xcf, 0x01, 0x06, 0x8f, - 0x82, 0x80, 0xf4, 0xd1, 0xb8, 0xd8, 0x21, 0x1c, 0x17, 0xd1, 0x30, 0x22, 0xa3, 0x0b, 0x3b, 0x1c, - 0x51, 0x4e, 0xe1, 0xb6, 0xc4, 0x6c, 0x85, 0x19, 0x39, 0x8f, 0x7a, 0x54, 0x40, 0x68, 0xf6, 0x25, - 0x59, 0x46, 0xa1, 0x4b, 0xd9, 0x80, 0x32, 0xd4, 0xc1, 0x8c, 0xc8, 0xf2, 0x79, 0xb3, 0x10, 0x7b, - 0x7e, 0x80, 0xb9, 0x4f, 0x03, 0xc5, 0xbd, 0xe7, 0x51, 0xea, 0xf5, 0x09, 0xc2, 0xa1, 0x8f, 0x70, - 0x10, 0x50, 0x2e, 0x40, 0xa6, 0xd0, 0xfd,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xa9, 0xbd, 0x41, 0x9e, 0xcf, 0xcf, 0xa3, 0x8e, 0xdd, 0xa5, 0x03, 0xd4, 0xc1, - 0x41, 0x4f, 0xfc, 0x2b, 0xba, 0xb4, 0x8f, 0xba, 0xe7, 0xd8, 0x0f, 0xd0, 0xb8, 0x84, 0xde, 0xc6, - 0x0d, 0xf9, 0x45, 0x48, 0x58, 0x27, 0x2b, 0x18, 0x8f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbb, - 0x9c, 0x56, 0x0e, 0x15, 0x05, 0x00, 0x00, + // 740 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x4f, 0x13, 0x41, + 0x18, 0xed, 0x62, 0x69, 0x61, 0x48, 0x08, 0x19, 0x1b, 0x2c, 0x8b, 0x2e, 0x64, 0x8b, 0x4a, 0xaa, + 0xd9, 0x91, 0xea, 0xdd, 0x14, 0x2c, 0xa4, 0xd1, 0x34, 0xd8, 0x16, 0x0f, 0x5e, 0x9a, 0xe9, 0x32, + 0x2e, 0x1b, 0xcb, 0xce, 0xd2, 0xd9, 0x25, 0x22, 0xe1, 0xa0, 0x89, 0x89, 0x47, 0x8d, 0xf1, 0xea, + 0xc5, 0x7f, 0x86, 0x23, 0x89, 0x17, 0x4f, 0xc6, 0x80, 0x7f, 0x86, 0x07, 0xb3, 0x33, 0xb3, 0x4b, + 0x97, 0xee, 0x56, 0x0e, 0xdc, 0x76, 0xe7, 0x7b, 0x33, 0xef, 0x7d, 0xef, 0xfb, 0x01, 0x54, 0xcf, + 0x77, 0x1c, 0xd2, 0x43, 0xfb, 0x2b, 0x5d, 0xe2, 0xe1, 0x15, 0xb4, 0xe7, 0x93, 0xfe, 0x81, 0xe1, + 0xf6, 0xa9, 0x47, 0xe1, 0xb4, 0x88, 0x19, 0x32, 0xa6, 0x16, 0x2c, 0x6a, 0x51, 0x1e, 0x42, 0xc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e, 0xd5, 0x94, 0x4f, 0x67, 0x5a, 0xe6, 0xe4, 0x4c, 0xcb, 0xfc, 0x3c, 0xd3, + 0x32, 0x2f, 0x91, 0x65, 0x7b, 0x3b, 0x7e, 0xd7, 0x30, 0xe9, 0x2e, 0xea, 0x62, 0x67, 0x9b, 0xcf, + 0xa5, 0x49, 0x7b, 0xc8, 0xdc, 0xc1, 0xb6, 0x83, 0xf6, 0x2b, 0xe8, 0x4d, 0xc8, 0xe3, 0x1d, 0xb8, + 0x84, 0x75, 0x73, 0x1c, 0xf1, 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xff, 0xf2, 0x34, + 0xe4, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -418,6 +644,10 @@ type QueryClient interface { Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) // Tunnel is a RPC method that returns a tunnel by its ID. Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) + // Packets is a RPC method that returns all packets of a tunnel. + Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) + // Packet is a RPC method that returns a packet by its tunnel ID and nonce. + Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) } type queryClient struct { @@ -455,6 +685,24 @@ func (c *queryClient) Tunnel(ctx context.Context, in *QueryTunnelRequest, opts . return out, nil } +func (c *queryClient) Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) { + out := new(QueryPacketsResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Packets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) { + out := new(QueryPacketResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Packet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params is a RPC method that returns all parameters of the module. @@ -463,6 +711,10 @@ type QueryServer interface { Tunnels(context.Context, *QueryTunnelsRequest) (*QueryTunnelsResponse, error) // Tunnel is a RPC method that returns a tunnel by its ID. Tunnel(context.Context, *QueryTunnelRequest) (*QueryTunnelResponse, error) + // Packets is a RPC method that returns all packets of a tunnel. + Packets(context.Context, *QueryPacketsRequest) (*QueryPacketsResponse, error) + // Packet is a RPC method that returns a packet by its tunnel ID and nonce. + Packet(context.Context, *QueryPacketRequest) (*QueryPacketResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -478,6 +730,12 @@ func (*UnimplementedQueryServer) Tunnels(ctx context.Context, req *QueryTunnelsR func (*UnimplementedQueryServer) Tunnel(ctx context.Context, req *QueryTunnelRequest) (*QueryTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Tunnel not implemented") } +func (*UnimplementedQueryServer) Packets(ctx context.Context, req *QueryPacketsRequest) (*QueryPacketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Packets not implemented") +} +func (*UnimplementedQueryServer) Packet(ctx context.Context, req *QueryPacketRequest) (*QueryPacketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Packet not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -537,6 +795,42 @@ func _Query_Tunnel_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_Packets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Packets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Query/Packets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Packets(ctx, req.(*QueryPacketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Packet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Packet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Query/Packet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Packet(ctx, req.(*QueryPacketRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "tunnel.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -553,6 +847,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Tunnel", Handler: _Query_Tunnel_Handler, }, + { + MethodName: "Packets", + Handler: _Query_Packets_Handler, + }, + { + MethodName: "Packet", + Handler: _Query_Packet_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "tunnel/v1beta1/query.proto", @@ -708,7 +1010,7 @@ func (m *QueryTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryPacketsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -718,20 +1020,37 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryPacketsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.TunnelId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TunnelId)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryPacketsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -741,48 +1060,186 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryPacketsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Packets) > 0 { + for iNdEx := len(m.Packets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Packets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryPacketRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryTunnelsRequest) Size() (n int) { - if m == nil { - return 0 - } + +func (m *QueryPacketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.IsActive != 0 { - n += 1 + sovQuery(uint64(m.IsActive)) + if m.Nonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x10 + } + if m.TunnelId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TunnelId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPacketResponse) 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 *QueryPacketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Packet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryTunnelsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IsActive != 0 { + n += 1 + sovQuery(uint64(m.IsActive)) } if m.Pagination != nil { l = m.Pagination.Size() @@ -833,6 +1290,67 @@ func (m *QueryTunnelResponse) Size() (n int) { return n } +func (m *QueryPacketsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelId != 0 { + n += 1 + sovQuery(uint64(m.TunnelId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPacketsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Packets) > 0 { + for _, e := range m.Packets { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryPacketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelId != 0 { + n += 1 + sovQuery(uint64(m.TunnelId)) + } + if m.Nonce != 0 { + n += 1 + sovQuery(uint64(m.Nonce)) + } + return n +} + +func (m *QueryPacketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Packet.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -1236,6 +1754,402 @@ func (m *QueryTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryPacketsRequest) 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 ErrIntOverflowQuery + } + 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: QueryPacketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPacketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + m.TunnelId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPacketsResponse) 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 ErrIntOverflowQuery + } + 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: QueryPacketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPacketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Packets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Packets = append(m.Packets, types.Any{}) + if err := m.Packets[len(m.Packets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPacketRequest) 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 ErrIntOverflowQuery + } + 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: QueryPacketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPacketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + m.TunnelId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + } + m.Nonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nonce |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPacketResponse) 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 ErrIntOverflowQuery + } + 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: QueryPacketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPacketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Packet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Packet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/tunnel/types/query.pb.gw.go b/x/tunnel/types/query.pb.gw.go index 475cf790b..63204a794 100644 --- a/x/tunnel/types/query.pb.gw.go +++ b/x/tunnel/types/query.pb.gw.go @@ -141,6 +141,154 @@ func local_request_Query_Tunnel_0(ctx context.Context, marshaler runtime.Marshal } +var ( + filter_Query_Packets_0 = &utilities.DoubleArray{Encoding: map[string]int{"tunnel_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_Packets_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPacketsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Packets_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Packets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Packets_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPacketsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Packets_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Packets(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Packet_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPacketRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + val, ok = pathParams["nonce"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nonce") + } + + protoReq.Nonce, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nonce", err) + } + + msg, err := client.Packet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Packet_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPacketRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + val, ok = pathParams["nonce"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nonce") + } + + protoReq.Nonce, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nonce", err) + } + + msg, err := server.Packet(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -216,6 +364,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Packets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Packets_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Packets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Packet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Packet_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Packet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -317,6 +511,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Packets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Packets_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Packets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Packet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Packet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Packet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -326,6 +560,10 @@ var ( pattern_Query_Tunnels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "tunnels"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Tunnel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 0, 1, 0, 4, 1, 5, 2}, []string{"tunnel", "v1beta1", "tunnel_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Packets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"tunnel", "v1beta1", "packets", "tunnel_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Packet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"tunnel", "v1beta1", "packet", "tunnel_id", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -334,4 +572,8 @@ var ( forward_Query_Tunnels_0 = runtime.ForwardResponseMessage forward_Query_Tunnel_0 = runtime.ForwardResponseMessage + + forward_Query_Packets_0 = runtime.ForwardResponseMessage + + forward_Query_Packet_0 = runtime.ForwardResponseMessage ) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go new file mode 100644 index 000000000..8732c0b86 --- /dev/null +++ b/x/tunnel/types/tunnel.go @@ -0,0 +1,35 @@ +package types + +import ( + "encoding/json" + fmt "fmt" + + "github.com/cosmos/cosmos-sdk/codec/types" + proto "github.com/cosmos/gogoproto/proto" +) + +func (t *Tunnel) SetRoute(route Route) error { + msg, ok := route.(proto.Message) + if !ok { + return fmt.Errorf("can't proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return err + } + t.Route = any + + return nil +} + +func (t Tunnel) UnpackRoute() (TSSRoute, error) { + var route TSSRoute + fmt.Printf("route: %+v\n", t.Route) + fmt.Printf("route: %+v\n", t.Route.GetValue()) + err := json.Unmarshal(t.Route.GetValue(), &route) + if err != nil { + return TSSRoute{}, err + } + fmt.Printf("route: %+v\n", route) + return route, nil +} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 35469045b..7c1e2e86b 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -273,7 +273,7 @@ func (m *SignalPriceInfo) GetLastTimestamp() *time.Time { type Tunnel struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - PacketCount uint64 `protobuf:"varint,2,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"` + NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` @@ -324,9 +324,9 @@ func (m *Tunnel) GetID() uint64 { return 0 } -func (m *Tunnel) GetPacketCount() uint64 { +func (m *Tunnel) GetNonceCount() uint64 { if m != nil { - return m.PacketCount + return m.NonceCount } return 0 } @@ -389,7 +389,7 @@ func (m *Tunnel) GetCreator() string { type TSSPacket struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - PacketID uint64 `protobuf:"varint,2,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` SigningID github_com_bandprotocol_chain_v2_pkg_tss.SigningID `protobuf:"varint,5,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/pkg/tss.SigningID" json:"signing_id,omitempty"` @@ -438,9 +438,9 @@ func (m *TSSPacket) GetTunnelID() uint64 { return 0 } -func (m *TSSPacket) GetPacketID() uint64 { +func (m *TSSPacket) GetNonce() uint64 { if m != nil { - return m.PacketID + return m.Nonce } return 0 } @@ -489,7 +489,7 @@ func (m *TSSPacket) GetCreatedAt() time.Time { type AxelarPacket struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - PacketID uint64 `protobuf:"varint,2,opt,name=packet_id,json=packetId,proto3" json:"packet_id,omitempty"` + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` IBCQueueID uint64 `protobuf:"varint,5,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` @@ -538,9 +538,9 @@ func (m *AxelarPacket) GetTunnelID() uint64 { return 0 } -func (m *AxelarPacket) GetPacketID() uint64 { +func (m *AxelarPacket) GetNonce() uint64 { if m != nil { - return m.PacketID + return m.Nonce } return 0 } @@ -600,63 +600,63 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 889 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xae, 0xdb, 0x24, 0xb5, 0x27, 0xd9, 0xb2, 0x1a, 0x45, 0x8b, 0x49, 0x51, 0x5c, 0x7a, 0x2a, - 0x87, 0xb5, 0xd9, 0x40, 0x2f, 0x2b, 0x21, 0x11, 0x27, 0x5a, 0xad, 0x25, 0x90, 0x8a, 0x9d, 0x13, - 0x17, 0xcb, 0xf6, 0x4c, 0xdc, 0x51, 0x53, 0x8f, 0xf1, 0x4c, 0xa2, 0xcd, 0x7f, 0xd1, 0x1b, 0x57, - 0x90, 0x90, 0xe0, 0x0f, 0xd8, 0x3f, 0x62, 0xc5, 0x69, 0xc5, 0x89, 0x53, 0x40, 0xee, 0x85, 0x3b, - 0x17, 0xc4, 0x09, 0xcd, 0x8f, 0xa4, 0xa4, 0x80, 0x8a, 0x00, 0x09, 0x04, 0xb7, 0x79, 0xef, 0xfb, - 0xde, 0xf8, 0xcd, 0x7c, 0xdf, 0x9b, 0x04, 0x1c, 0xf2, 0x79, 0x51, 0xe0, 0x99, 0xb7, 0x78, 0x94, - 0x62, 0x9e, 0x3c, 0xf2, 0x54, 0xe8, 0x96, 0x15, 0xe5, 0x14, 0x1e, 0xe8, 0x48, 0x83, 0xbd, 0x6e, - 0x4e, 0x73, 0x2a, 0x21, 0x4f, 0xac, 0x14, 0xab, 0xe7, 0xe4, 0x94, 0xe6, 0x33, 0xec, 0xc9, 0x28, - 0x9d, 0x4f, 0x3d, 0x4e, 0x2e, 0x31, 0xe3, 0xc9, 0x65, 0xa9, 0x09, 0xaf, 0xdd, 0x26, 0x24, 0xc5, - 0x72, 0x0d, 0x65, 0x94, 0x5d, 0x52, 0x16, 0xab, 0x4d, 0x55, 0xb0, 0x86, 0xa6, 0x18, 0x23, 0xb6, - 0x69, 0x4c, 0x46, 0x0a, 0x3a, 0xfe, 0xcc, 0x00, 0xe6, 0x24, 0x8a, 0x42, 0x3a, 0xe7, 0x18, 0x3e, - 0x05, 0x5d, 0x84, 0x19, 0x27, 0x45, 0xc2, 0x09, 0x2d, 0xe2, 0xec, 0x3c, 0x21, 0x45, 0x4c, 0x90, - 0x6d, 0x1c, 0x19, 0x27, 0x96, 0xff, 0xa0, 0x5e, 0x39, 0x70, 0x7c, 0x83, 0x8f, 0x04, 0x1c, 0x8c, - 0x43, 0x88, 0x6e, 0xe7, 0x10, 0x7c, 0x0f, 0xbc, 0xbe, 0xb5, 0x13, 0x2d, 0x78, 0x95, 0x64, 0x3c, - 0x4e, 0x10, 0xaa, 0x30, 0x63, 0xf6, 0xae, 0xd8, 0x31, 0xec, 0xfd, 0xb2, 0x52, 0x53, 0x86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, 0x74, 0xca, 0x24, 0xbb, 0xc0, 0x3c, 0xce, 0xe8, 0xbc, 0xe0, - 0xea, 0x60, 0x61, 0x5b, 0xe5, 0x46, 0x22, 0x05, 0x4f, 0x41, 0xb3, 0x12, 0xba, 0xca, 0x23, 0xb4, - 0x07, 0xdd, 0x5f, 0xf5, 0x32, 0x2c, 0x96, 0xfe, 0x8d, 0xfc, 0xa1, 0x62, 0xc3, 0x77, 0x80, 0x25, - 0xe6, 0x2b, 0xe6, 0xcb, 0x52, 0x1d, 0xf2, 0x60, 0xf0, 0xaa, 0xab, 0x26, 0x4e, 0xcf, 0x9f, 0xfb, - 0x04, 0x63, 0x34, 0x59, 0x96, 0x38, 0x34, 0xa7, 0x7a, 0x05, 0x4f, 0x65, 0x55, 0x5c, 0x26, 0x4b, - 0x5c, 0xc9, 0xc3, 0x5b, 0xbe, 0xfd, 0xf5, 0xf3, 0x87, 0x5d, 0x3d, 0xc6, 0xda, 0x6d, 0x11, 0xaf, - 0x48, 0x91, 0xcb, 0xb2, 0x33, 0xc1, 0x84, 0x11, 0x80, 0x5a, 0x4b, 0x79, 0x8f, 0x31, 0x29, 0xa6, - 0x94, 0xd9, 0xad, 0xa3, 0xbd, 0x93, 0xf6, 0xc0, 0x71, 0xb7, 0x9f, 0x1c, 0xf7, 0x96, 0x11, 0xfc, - 0xc6, 0x8b, 0x95, 0xb3, 0x13, 0xde, 0x67, 0xdb, 0x69, 0x06, 0xdf, 0x05, 0x87, 0xb3, 0x84, 0xf1, - 0x98, 0x57, 0x24, 0xcf, 0x71, 0x85, 0x51, 0x9c, 0xce, 0x68, 0x76, 0x11, 0x9f, 0x63, 0x92, 0x9f, - 0x73, 0x7b, 0x5f, 0x5e, 0x95, 0x2d, 0x28, 0x93, 0x35, 0xc3, 0x17, 0x84, 0xa7, 0x12, 0x87, 0x87, - 0xc0, 0x22, 0x2c, 0x4e, 0x32, 0x4e, 0x16, 0xd8, 0x36, 0x8f, 0x8c, 0x13, 0x33, 0x34, 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0x3f, 0x9e, 0xe3, 0x39, 0xbe, 0xb1, 0xcb, 0x41, 0xbd, 0x72, 0x40, - 0xe0, 0x8f, 0x3e, 0x14, 0xe9, 0x60, 0x1c, 0x02, 0x92, 0x66, 0x6a, 0xfd, 0x5f, 0x95, 0xde, 0xff, - 0xe0, 0xcb, 0xba, 0x6f, 0xbc, 0xa8, 0xfb, 0xc6, 0xcb, 0xba, 0x6f, 0x7c, 0x57, 0xf7, 0x8d, 0xab, - 0xeb, 0xfe, 0xce, 0xcb, 0xeb, 0xfe, 0xce, 0x37, 0xd7, 0xfd, 0x9d, 0x8f, 0xbc, 0x3b, 0xc7, 0xe5, - 0x99, 0xfe, 0xe7, 0xe7, 0x09, 0x51, 0x59, 0xda, 0x92, 0x8c, 0xb7, 0x7f, 0x0e, 0x00, 0x00, 0xff, - 0xff, 0xed, 0x15, 0x0f, 0x87, 0x1f, 0x0a, 0x00, 0x00, + // 881 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0xdb, 0x24, 0xb5, 0x27, 0xd9, 0xb2, 0x1a, 0x45, 0x8b, 0x49, 0x51, 0x5c, 0xf5, 0x54, + 0x0e, 0x6b, 0xb3, 0x81, 0x5e, 0x56, 0x42, 0x22, 0x4e, 0xb4, 0xda, 0x48, 0x20, 0x15, 0x27, 0x27, + 0x2e, 0xd6, 0xd8, 0x9e, 0xb8, 0xa3, 0xa6, 0x33, 0xc6, 0x33, 0x89, 0x36, 0xdf, 0xa2, 0x42, 0xe2, + 0x0e, 0x12, 0x07, 0x3e, 0xc0, 0x7e, 0x88, 0x15, 0xa7, 0x15, 0x27, 0x4e, 0x01, 0xb9, 0x17, 0xee, + 0xdc, 0x38, 0xa1, 0xf9, 0x93, 0x94, 0x14, 0x50, 0x11, 0x20, 0x81, 0x7a, 0x9b, 0xf7, 0x7e,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x7e, 0xfc, 0x4d, 0xd5, 0xb5, 0x5e, 0x55, 0x5d, 0xeb, + 0x75, 0xd5, 0xb5, 0x7e, 0xac, 0xba, 0xd6, 0xd5, 0x75, 0x77, 0xe7, 0xf5, 0x75, 0x77, 0xe7, 0xfb, + 0xeb, 0xee, 0xce, 0xa7, 0xc1, 0x9d, 0x93, 0xf1, 0xc2, 0xfc, 0x9b, 0x0b, 0x64, 0x53, 0x79, 0xd2, + 0x50, 0x8c, 0xf7, 0x7e, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x03, 0x8f, 0x1b, 0x82, 0xf3, 0x09, 0x00, + 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -805,7 +805,7 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.ID != that1.ID { return false } - if this.PacketCount != that1.PacketCount { + if this.NonceCount != that1.NonceCount { return false } if !this.Route.Equal(that1.Route) { @@ -861,7 +861,7 @@ func (this *TSSPacket) Equal(that interface{}) bool { if this.TunnelID != that1.TunnelID { return false } - if this.PacketID != that1.PacketID { + if this.Nonce != that1.Nonce { return false } if this.FeedType != that1.FeedType { @@ -911,7 +911,7 @@ func (this *AxelarPacket) Equal(that interface{}) bool { if this.TunnelID != that1.TunnelID { return false } - if this.PacketID != that1.PacketID { + if this.Nonce != that1.Nonce { return false } if this.FeedType != that1.FeedType { @@ -1196,8 +1196,8 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if m.PacketCount != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.PacketCount)) + if m.NonceCount != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.NonceCount)) i-- dAtA[i] = 0x10 } @@ -1275,8 +1275,8 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if m.PacketID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.PacketID)) + if m.Nonce != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) i-- dAtA[i] = 0x10 } @@ -1354,8 +1354,8 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if m.PacketID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.PacketID)) + if m.Nonce != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) i-- dAtA[i] = 0x10 } @@ -1466,8 +1466,8 @@ func (m *Tunnel) Size() (n int) { if m.ID != 0 { n += 1 + sovTunnel(uint64(m.ID)) } - if m.PacketCount != 0 { - n += 1 + sovTunnel(uint64(m.PacketCount)) + if m.NonceCount != 0 { + n += 1 + sovTunnel(uint64(m.NonceCount)) } if m.Route != nil { l = m.Route.Size() @@ -1510,8 +1510,8 @@ func (m *TSSPacket) Size() (n int) { if m.TunnelID != 0 { n += 1 + sovTunnel(uint64(m.TunnelID)) } - if m.PacketID != 0 { - n += 1 + sovTunnel(uint64(m.PacketID)) + if m.Nonce != 0 { + n += 1 + sovTunnel(uint64(m.Nonce)) } if m.FeedType != 0 { n += 1 + sovTunnel(uint64(m.FeedType)) @@ -1547,8 +1547,8 @@ func (m *AxelarPacket) Size() (n int) { if m.TunnelID != 0 { n += 1 + sovTunnel(uint64(m.TunnelID)) } - if m.PacketID != 0 { - n += 1 + sovTunnel(uint64(m.PacketID)) + if m.Nonce != 0 { + n += 1 + sovTunnel(uint64(m.Nonce)) } if m.FeedType != 0 { n += 1 + sovTunnel(uint64(m.FeedType)) @@ -2154,9 +2154,9 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketCount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NonceCount", wireType) } - m.PacketCount = 0 + m.NonceCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2166,7 +2166,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PacketCount |= uint64(b&0x7F) << shift + m.NonceCount |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2467,9 +2467,9 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) } - m.PacketID = 0 + m.Nonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2479,7 +2479,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PacketID |= uint64(b&0x7F) << shift + m.Nonce |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2724,9 +2724,9 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) } - m.PacketID = 0 + m.Nonce = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2736,7 +2736,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PacketID |= uint64(b&0x7F) << shift + m.Nonce |= uint64(b&0x7F) << shift if b < 0x80 { break } From 530d5d8793ade0fd02658c6b1d31aeecc7c05108 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 25 Jul 2024 16:28:12 +0700 Subject: [PATCH 024/272] temp --- x/tunnel/types/tunnel.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 8732c0b86..67d72ce6d 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -26,6 +26,7 @@ func (t Tunnel) UnpackRoute() (TSSRoute, error) { var route TSSRoute fmt.Printf("route: %+v\n", t.Route) fmt.Printf("route: %+v\n", t.Route.GetValue()) + t.Route.GetCachedValue() err := json.Unmarshal(t.Route.GetValue(), &route) if err != nil { return TSSRoute{}, err From c3ff5f29a2b2bc2b4ef6ffcbdace32f3e56b8118 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 30 Jul 2024 16:26:55 +0700 Subject: [PATCH 025/272] add packet query --- x/tunnel/client/cli/query.go | 90 ++++++++++++++++++++++++++++-- x/tunnel/keeper/grpc_query.go | 5 +- x/tunnel/keeper/grpc_query_test.go | 71 ++++++++++++++++------- x/tunnel/keeper/msg_server.go | 11 ++++ x/tunnel/keeper/tunnel.go | 51 +---------------- x/tunnel/keeper/tunnel_test.go | 3 +- x/tunnel/types/codec.go | 11 +++- x/tunnel/types/query.go | 33 +++++++++++ x/tunnel/types/tunnel.go | 23 +++----- 9 files changed, 206 insertions(+), 92 deletions(-) create mode 100644 x/tunnel/types/query.go diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index 256478d97..1fca94b0b 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -24,15 +24,18 @@ func GetQueryCmd() *cobra.Command { } queryCmd.AddCommand( - GetQueryTunnel(), - GetQueryTunnels(), + GetQueryCmdTunnel(), + GetQueryCmdTunnels(), + GetQueryCmdPackets(), + GetQueryCmdPacket(), GetQueryCmdParams(), ) return queryCmd } -func GetQueryTunnel() *cobra.Command { +// GetQueryCmdTunnel implements the query tunnel command. +func GetQueryCmdTunnel() *cobra.Command { cmd := &cobra.Command{ Use: "tunnel [tunnel-id]", Short: "Query the tunnel by tunnel id", @@ -63,8 +66,8 @@ func GetQueryTunnel() *cobra.Command { return cmd } -// GetQueryTunnels implements the query tunnels command. -func GetQueryTunnels() *cobra.Command { +// GetQueryCmdTunnels implements the query tunnels command. +func GetQueryCmdTunnels() *cobra.Command { cmd := &cobra.Command{ Use: "tunnels", Short: "Query all tunnels", @@ -112,6 +115,83 @@ func GetQueryTunnels() *cobra.Command { return cmd } +// GetQueryCmdPackets implements the query packets command. +func GetQueryCmdPackets() *cobra.Command { + cmd := &cobra.Command{ + Use: "packets [tunnel-id]", + Short: "Query the packets of a tunnel", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + tunnelID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + res, err := queryClient.Packets(context.Background(), &types.QueryPacketsRequest{ + TunnelId: tunnelID, + Pagination: pageReq, + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, "packets") + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetQueryCmdPacket implements the query packet command. +func GetQueryCmdPacket() *cobra.Command { + cmd := &cobra.Command{ + Use: "packet [tunnel-id] [nonce]", + Short: "Query a packet by tunnel id and nonce", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + tunnelID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + nonce, err := strconv.ParseUint(args[1], 10, 64) + if err != nil { + return err + } + + res, err := queryClient.Packet(context.Background(), &types.QueryPacketRequest{ + TunnelId: tunnelID, + Nonce: nonce, + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // GetQueryCmdParams implements the query params command. func GetQueryCmdParams() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 0657ae80e..0076dd407 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -89,7 +89,7 @@ func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) any, err := codectypes.NewAnyWithValue(&packet) if err != nil { - panic(err) + return err } packets = append(packets, *any) @@ -105,7 +105,7 @@ func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) any, err := codectypes.NewAnyWithValue(&packet) if err != nil { - panic(err) + return err } packets = append(packets, *any) @@ -117,6 +117,7 @@ func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) default: return nil, fmt.Errorf("unknown route type") } + return &types.QueryPacketsResponse{Packets: packets, Pagination: pageRes}, nil } diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index cb783a1de..97b07b306 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "fmt" "testing" "github.com/stretchr/testify/require" @@ -12,8 +11,9 @@ import ( func TestGRPCQueryPackets(t *testing.T) { s := testutil.NewTestSuite(t) - // q := s.QueryServer + q := s.QueryServer + // set tunnel tunnel := types.Tunnel{ ID: 1, NonceCount: 2, @@ -23,10 +23,10 @@ func TestGRPCQueryPackets(t *testing.T) { DestinationContractAddress: "0x123", } err := tunnel.SetRoute(&r) - a := tunnel.Route.GetCachedValue() - fmt.Printf("route: %+v\n", a) require.NoError(t, err) + s.Keeper.SetTunnel(s.Ctx, tunnel) + // set tss packets tssPackets := []types.TSSPacket{ { TunnelID: 1, @@ -37,29 +37,62 @@ func TestGRPCQueryPackets(t *testing.T) { Nonce: 2, }, } - - s.Keeper.SetTunnel(s.Ctx, tunnel) for _, packet := range tssPackets { s.Keeper.SetTSSPacket(s.Ctx, packet) } - tu, err := s.Keeper.GetTunnel(s.Ctx, 1) + // query packets + res, err := q.Packets(s.Ctx, &types.QueryPacketsRequest{ + TunnelId: 1, + }) require.NoError(t, err) + for i, packet := range res.Packets { + tssPacket, ok := packet.GetCachedValue().(*types.TSSPacket) + require.True(t, ok) + require.Equal(t, tssPackets[i], *tssPacket) + } +} + +func TestGRPCQueryPacket(t *testing.T) { + s := testutil.NewTestSuite(t) + q := s.QueryServer - ss, err := tu.UnpackRoute() + // set tunnel + tunnel := types.Tunnel{ + ID: 1, + NonceCount: 2, + } + r := types.TSSRoute{ + DestinationChainID: "1", + DestinationContractAddress: "0x123", + } + err := tunnel.SetRoute(&r) require.NoError(t, err) + s.Keeper.SetTunnel(s.Ctx, tunnel) - fmt.Printf("route2 %+v\n", ss) + // set tss packets + tssPackets := []types.TSSPacket{ + { + TunnelID: 1, + Nonce: 1, + }, + { + TunnelID: 1, + Nonce: 2, + }, + } + for _, packet := range tssPackets { + s.Keeper.SetTSSPacket(s.Ctx, packet) + } - // ts := s.Keeper.GetTunnels(s.Ctx) - // for _, tunnel := range ts { - // a := tunnel.Route.GetCachedValue() - // fmt.Printf("route: %+v\n", a) - // } + // query packet + res, err := q.Packet(s.Ctx, &types.QueryPacketRequest{ + TunnelId: 1, + Nonce: 2, + }) + require.NoError(t, err) - // res, err := q.Packets(s.Ctx, &types.QueryPacketsRequest{ - // TunnelId: 1, - // }) - // require.NoError(t, err) - // require.Len(t, res, len(res.Packets)) + tssPacket, ok := res.Packet.GetCachedValue().(*types.TSSPacket) + require.True(t, ok) + require.Equal(t, tssPackets[1], *tssPacket) } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 69994d90e..d05c19d9c 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -21,6 +21,7 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{Keeper: keeper} } +// CreateTunnel creates a new tunnel. // CreateTunnel creates a new tunnel. func (ms msgServer) CreateTunnel( goCtx context.Context, @@ -48,6 +49,16 @@ func (ms msgServer) CreateTunnel( return nil, err } + // mock + ms.Keeper.AddTSSPacket(ctx, types.TSSPacket{ + TunnelID: tunnelID, + Nonce: 1, + }) + ms.Keeper.AddTSSPacket(ctx, types.TSSPacket{ + TunnelID: tunnelID, + Nonce: 2, + }) + tunnel, err := ms.Keeper.GetTunnel(ctx, tunnelID) if err != nil { return nil, err diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index f93d8a118..c365bb857 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -98,11 +98,7 @@ func (k Keeper) GetActiveTunnels(ctx sdk.Context) []types.Tunnel { func (k Keeper) GetRequiredProcessTunnels( ctx sdk.Context, ) []types.Tunnel { - // TODO: Remove mock test - return k.GetTunnels(ctx) - var tunnels []types.Tunnel - activeTunnels := k.GetActiveTunnels(ctx) latestPrices := k.feedsKeeper.GetPrices(ctx) latestPricesMap := make(map[string]feedsTypes.Price, len(latestPrices)) @@ -124,10 +120,10 @@ func (k Keeper) GetRequiredProcessTunnels( difference := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) differenceInBPS := uint64(difference * 10000) - activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price - activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now - if differenceInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp.Unix()+int64(sp.Interval) { + // Update the price directly + activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price + activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now trigger = true } } @@ -156,58 +152,17 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error return nil } -func (k Keeper) GetPackets(ctx sdk.Context, tunnelID uint64) ([]any, error) { - var packets []any - iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.TunnelPacketsStoreKey(tunnelID)) - defer iterator.Close() - - tunnel, err := k.GetTunnel(ctx, tunnelID) - if err != nil { - return nil, err - } - - switch tunnel.Route.GetCachedValue().(type) { - case *types.TSSRoute: - for ; iterator.Valid(); iterator.Next() { - var packet types.TSSPacket - k.cdc.MustUnmarshal(iterator.Value(), &packet) - packets = append(packets, packet) - } - case *types.AxelarRoute: - for ; iterator.Valid(); iterator.Next() { - var packet types.AxelarPacket - k.cdc.MustUnmarshal(iterator.Value(), &packet) - packets = append(packets, packet) - } - default: - return nil, fmt.Errorf("unknown route type") - } - - return packets, nil -} - // SetParams sets the tunnel module parameters func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { - // Increment the packet count - tunnel.NonceCount += 1 - switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - fmt.Printf("Generating TSS packets for tunnel %d, route %s\n", tunnel.ID, r.String()) k.TSSPacketHandler(ctx, types.TSSPacket{ TunnelID: tunnel.ID, - Nonce: tunnel.NonceCount, SignalPriceInfos: tunnel.SignalPriceInfos, DestinationChainID: r.DestinationChainID, DestinationContractAddress: r.DestinationContractAddress, }) case *types.AxelarRoute: - fmt.Printf("Generating Axelar packets for tunnel %d, route %s\n", tunnel.ID, r.String()) k.AxelarPacketHandler(ctx, types.AxelarPacket{}) - default: - panic("unknown route type") } - - // Set the last SignalPriceInfos - k.SetTunnel(ctx, tunnel) } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 86103e1f2..1d1e0a72b 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -28,8 +28,7 @@ func TestAddTunnel(t *testing.T) { s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) // Add the tunnel to the keeper - _, err := k.AddTunnel(ctx, tunnel) - require.NoError(s.T(), err, "adding tunnel should not produce an error") + k.AddTunnel(ctx, tunnel) // Attempt to retrieve the tunnel by its ID retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 9a35a8cf4..54ef83d9e 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -19,8 +19,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterInterface((*Route)(nil), nil) cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) cdc.RegisterConcrete(&AxelarRoute{}, "tunnel/AxelarRoute", nil) - // cdc.RegisterConcrete(&TSSPacket{}, "tunnel/TSSpacket", nil) - // cdc.RegisterConcrete(&AxelarPacket{}, "tunnel/AxelarPacket", nil) + + cdc.RegisterInterface((*Packet)(nil), nil) } // RegisterInterfaces registers the x/tunnel interfaces types with the interface registry @@ -39,6 +39,13 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &AxelarRoute{}, ) + registry.RegisterInterface( + "tunnel.v1beta1.Packet", + (*Packet)(nil), + &TSSPacket{}, + &AxelarPacket{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/tunnel/types/query.go b/x/tunnel/types/query.go new file mode 100644 index 000000000..99512da83 --- /dev/null +++ b/x/tunnel/types/query.go @@ -0,0 +1,33 @@ +package types + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + proto "github.com/cosmos/gogoproto/proto" +) + +var ( + _ codectypes.UnpackInterfacesMessage = &QueryPacketsResponse{} + _ codectypes.UnpackInterfacesMessage = &QueryPacketResponse{} +) + +// Packet defines a type that implements the Packet interface +type Packet interface { + proto.Message +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (m *QueryPacketsResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + for _, p := range m.Packets { + var packet Packet + if err := unpacker.UnpackAny(&p, &packet); err != nil { + return err + } + } + return nil +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (m *QueryPacketResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { + var packet Packet + return unpacker.UnpackAny(&m.Packet, &packet) +} diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 67d72ce6d..bc500513d 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -1,13 +1,21 @@ package types import ( - "encoding/json" fmt "fmt" "github.com/cosmos/cosmos-sdk/codec/types" proto "github.com/cosmos/gogoproto/proto" ) +var _ types.UnpackInterfacesMessage = Tunnel{} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (t Tunnel) UnpackInterfaces(unpacker types.AnyUnpacker) error { + var route Route + return unpacker.UnpackAny(t.Route, &route) +} + +// SetRoute sets the route of the tunnel. func (t *Tunnel) SetRoute(route Route) error { msg, ok := route.(proto.Message) if !ok { @@ -21,16 +29,3 @@ func (t *Tunnel) SetRoute(route Route) error { return nil } - -func (t Tunnel) UnpackRoute() (TSSRoute, error) { - var route TSSRoute - fmt.Printf("route: %+v\n", t.Route) - fmt.Printf("route: %+v\n", t.Route.GetValue()) - t.Route.GetCachedValue() - err := json.Unmarshal(t.Route.GetValue(), &route) - if err != nil { - return TSSRoute{}, err - } - fmt.Printf("route: %+v\n", route) - return route, nil -} From 50c6c73c072fbc47778a464f877365d41a42a6ae Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 31 Jul 2024 10:04:30 +0700 Subject: [PATCH 026/272] remove mock test --- x/tunnel/keeper/msg_server.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index d05c19d9c..10301a557 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -49,16 +49,6 @@ func (ms msgServer) CreateTunnel( return nil, err } - // mock - ms.Keeper.AddTSSPacket(ctx, types.TSSPacket{ - TunnelID: tunnelID, - Nonce: 1, - }) - ms.Keeper.AddTSSPacket(ctx, types.TSSPacket{ - TunnelID: tunnelID, - Nonce: 2, - }) - tunnel, err := ms.Keeper.GetTunnel(ctx, tunnelID) if err != nil { return nil, err From 3b6a427ec5ab5f7b6c5ba2b54b06b6547fec1424 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 31 Jul 2024 11:12:57 +0700 Subject: [PATCH 027/272] fix lint --- proto/tunnel/v1beta1/query.proto | 4 +- x/tunnel/keeper/grpc_query.go | 10 +-- x/tunnel/keeper/tunnel_test.go | 3 +- x/tunnel/types/query.go | 4 +- x/tunnel/types/query.pb.go | 135 ++++++++++++++++--------------- 5 files changed, 82 insertions(+), 74 deletions(-) diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index 2b45bc201..464313028 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -89,7 +89,7 @@ message QueryPacketsRequest { // QueryPacketsResponse is the response type for the Query/Packets RPC method. message QueryPacketsResponse { // Packets is a list of packets. - repeated google.protobuf.Any packets = 1 [(gogoproto.nullable) = false]; + repeated google.protobuf.Any packets = 1; // pagination defines an optional pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -105,7 +105,7 @@ message QueryPacketRequest { // QueryPacketResponse is the response type for the Query/Packet RPC method. message QueryPacketResponse { // Packet is the packet with the given tunnel ID and nonce. - google.protobuf.Any packet = 1 [(gogoproto.nullable) = false]; + google.protobuf.Any packet = 1; } // QueryParamsRequest is the request type for the Query/Params RPC method. diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 0076dd407..f4c5c8e0b 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -80,7 +80,7 @@ func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) store := prefix.NewStore(ctx.KVStore(q.k.storeKey), types.TunnelPacketsStoreKey(req.TunnelId)) var pageRes *query.PageResponse - var packets []codectypes.Any + var packets []*codectypes.Any switch tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: pageRes, err = query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { @@ -92,7 +92,7 @@ func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) return err } - packets = append(packets, *any) + packets = append(packets, any) return nil }) if err != nil { @@ -108,7 +108,7 @@ func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) return err } - packets = append(packets, *any) + packets = append(packets, any) return nil }) if err != nil { @@ -142,7 +142,7 @@ func (q queryServer) Packet(c context.Context, req *types.QueryPacketRequest) (* return nil, err } - return &types.QueryPacketResponse{Packet: *any}, nil + return &types.QueryPacketResponse{Packet: any}, nil case *types.AxelarRoute: packet, err := q.k.GetAxelarPacket(ctx, req.TunnelId, req.Nonce) if err != nil { @@ -154,7 +154,7 @@ func (q queryServer) Packet(c context.Context, req *types.QueryPacketRequest) (* return nil, err } - return &types.QueryPacketResponse{Packet: *any}, nil + return &types.QueryPacketResponse{Packet: any}, nil default: return nil, fmt.Errorf("unknown route type") } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 1d1e0a72b..ca925ed0e 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -28,7 +28,8 @@ func TestAddTunnel(t *testing.T) { s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) // Add the tunnel to the keeper - k.AddTunnel(ctx, tunnel) + _, err := k.AddTunnel(ctx, tunnel) + require.NoError(t, err, "adding tunnel should not produce an error") // Attempt to retrieve the tunnel by its ID retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) diff --git a/x/tunnel/types/query.go b/x/tunnel/types/query.go index 99512da83..9925ffac5 100644 --- a/x/tunnel/types/query.go +++ b/x/tunnel/types/query.go @@ -19,7 +19,7 @@ type Packet interface { func (m *QueryPacketsResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { for _, p := range m.Packets { var packet Packet - if err := unpacker.UnpackAny(&p, &packet); err != nil { + if err := unpacker.UnpackAny(p, &packet); err != nil { return err } } @@ -29,5 +29,5 @@ func (m *QueryPacketsResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (m *QueryPacketResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var packet Packet - return unpacker.UnpackAny(&m.Packet, &packet) + return unpacker.UnpackAny(m.Packet, &packet) } diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 497603822..36cd4f93f 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -323,7 +323,7 @@ func (m *QueryPacketsRequest) GetPagination() *query.PageRequest { // QueryPacketsResponse is the response type for the Query/Packets RPC method. type QueryPacketsResponse struct { // Packets is a list of packets. - Packets []types.Any `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets"` + Packets []*types.Any `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets,omitempty"` // pagination defines an optional pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -361,7 +361,7 @@ func (m *QueryPacketsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPacketsResponse proto.InternalMessageInfo -func (m *QueryPacketsResponse) GetPackets() []types.Any { +func (m *QueryPacketsResponse) GetPackets() []*types.Any { if m != nil { return m.Packets } @@ -433,7 +433,7 @@ func (m *QueryPacketRequest) GetNonce() uint64 { // QueryPacketResponse is the response type for the Query/Packet RPC method. type QueryPacketResponse struct { // Packet is the packet with the given tunnel ID and nonce. - Packet types.Any `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"` + Packet *types.Any `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` } func (m *QueryPacketResponse) Reset() { *m = QueryPacketResponse{} } @@ -469,11 +469,11 @@ func (m *QueryPacketResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPacketResponse proto.InternalMessageInfo -func (m *QueryPacketResponse) GetPacket() types.Any { +func (m *QueryPacketResponse) GetPacket() *types.Any { if m != nil { return m.Packet } - return types.Any{} + return nil } // QueryParamsRequest is the request type for the Query/Params RPC method. @@ -576,54 +576,54 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 740 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x4f, 0x13, 0x41, - 0x18, 0xed, 0x62, 0x69, 0x61, 0x48, 0x08, 0x19, 0x1b, 0x2c, 0x8b, 0x2e, 0x64, 0x8b, 0x4a, 0xaa, - 0xd9, 0x91, 0xea, 0xdd, 0x14, 0x2c, 0xa4, 0xd1, 0x34, 0xd8, 0x16, 0x0f, 0x5e, 0x9a, 0xe9, 0x32, - 0x2e, 0x1b, 0xcb, 0xce, 0xd2, 0xd9, 0x25, 0x22, 0xe1, 0xa0, 0x89, 0x89, 0x47, 0x8d, 0xf1, 0xea, - 0xc5, 0x7f, 0x86, 0x23, 0x89, 0x17, 0x4f, 0xc6, 0x80, 0x7f, 0x86, 0x07, 0xb3, 0x33, 0xb3, 0x4b, - 0x97, 0xee, 0x56, 0x0e, 0xdc, 0x76, 0xe7, 0x7b, 0x33, 0xef, 0x7d, 0xef, 0xfb, 0x01, 0x54, 0xcf, - 0x77, 0x1c, 0xd2, 0x43, 0xfb, 0x2b, 0x5d, 0xe2, 0xe1, 0x15, 0xb4, 0xe7, 0x93, 0xfe, 0x81, 0xe1, - 0xf6, 0xa9, 0x47, 0xe1, 0xb4, 0x88, 0x19, 0x32, 0xa6, 0x16, 0x2c, 0x6a, 0x51, 0x1e, 0x42, 0xc1, - 0x97, 0x40, 0xa9, 0x65, 0x93, 0xb2, 0x5d, 0xca, 0x50, 0x17, 0x33, 0x22, 0xae, 0x47, 0x8f, 0xb9, - 0xd8, 0xb2, 0x1d, 0xec, 0xd9, 0xd4, 0x91, 0xd8, 0x9b, 0x16, 0xa5, 0x56, 0x8f, 0x20, 0xec, 0xda, - 0x08, 0x3b, 0x0e, 0xf5, 0x78, 0x90, 0xc9, 0xe8, 0x9c, 0x8c, 0xf2, 0xbf, 0xae, 0xff, 0x0a, 0x61, - 0x47, 0x4a, 0x51, 0xe7, 0x2f, 0xc8,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x00, 0x00, 0xff, 0xff, 0xd2, 0xff, 0xf2, 0x34, - 0xe4, 0x07, 0x00, 0x00, + // 741 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x4f, 0x13, 0x4f, + 0x14, 0xc7, 0xbb, 0xfc, 0x4a, 0x0b, 0x43, 0x42, 0xc8, 0xfc, 0x1a, 0x2c, 0x8b, 0x2e, 0x64, 0x8b, + 0x4a, 0x2a, 0xd9, 0x91, 0xea, 0xdd, 0x14, 0x2c, 0xa4, 0xd1, 0x34, 0xb8, 0x2d, 0x1e, 0xbc, 0x34, + 0xd3, 0x65, 0x5c, 0x36, 0x96, 0x9d, 0xa5, 0xb3, 0x4b, 0x44, 0xc2, 0x41, 0x13, 0x13, 0x6f, 0x6a, + 0xbc, 0x7b, 0xf1, 0x9f, 0xe1, 0x48, 0xe2, 0xc5, 0x93, 0x31, 0xe0, 0x9f, 0xe1, 0xc1, 0x74, 0x66, + 0x76, 0xe9, 0xd2, 0xdd, 0xca, 0x81, 0x5b, 0x3b, 0xef, 0xfb, 0xe6, 0x7d, 0xde, 0xfb, 0xee, 0x1b, + 0xa0, 0xfa, 0x81, 0xeb, 0x92, 0x2e, 0x3a, 0x58, 0xed, 0x10, 0x1f, 0xaf, 0xa2, 0xfd, 0x80, 0xf4, + 0x0e, 0x0d, 0xaf, 0x47, 0x7d, 0x0a, 0xa7, 0x45, 0xcc, 0x90, 0x31, 0xb5, 0x60, 0x53, 0x9b, 0xf2, + 0x10, 0xea, 0xff, 0x12, 0x2a, 0xb5, 0x6c, 0x51, 0xb6, 0x47, 0x19, 0xea, 0x60, 0x46, 0x44, 0x7a, + 0x74, 0x99, 0x87, 0x6d, 0xc7, 0xc5, 0xbe, 0x43, 0x5d, 0xa9, 0xbd, 0x69, 0x53, 0x6a, 0x77, 0x09, + 0xc2, 0x9e, 0x83, 0xb0, 0xeb, 0x52, 0x9f, 0x07, 0x99, 0x8c, 0xce, 0xc9, 0x28, 0xff, 0xd7, 0x09, + 0x5e, 0x22, 0xec, 0x4a, 0x14, 0x75, 0xfe, 0x12, 0xa6, 0x87, 0x7b, 0x78, 0x8f, 0xa5, 0x04, 0x25, + 0x36, 0x0f, 0xea, 0x5f, 0x15, 0xf0, 0xff, 0xb3, 0x3e, 0x55, 0x8b, 0x9f, 0x32, 0x93, 0xec, 0x07, + 0x84, 0xf9, 0xf0, 0x11, 0x98, 0x74, 0x58, 0x1b, 0x5b, 0xbe, 0x73, 0x40, 0x8a, 0xca, 0xa2, 0xb2, + 0x3c, 0x5d, 0xd1, 0x8d, 0x78, 0xc3, 0x86, 0x48, 0x69, 0xfa, 0xd8, 0x0f, 0xd8, 0x86, 0xd3, 0xf5, + 0x49, 0xcf, 0x9c, 0x70, 0x58, 0x95, 0xe7, 0xc0, 0x0d, 0x00, 0x2e, 0xfa, 0x2b, 0x8e, 0x2d, 0x2a, + 0xcb, 0x53, 0x95, 0x3b, 0x86, 0x18, 0x86, 0xd1, 0x1f, 0x86, 0x21, 0x66, 0x19, 0x5e, 0xb6, 0x85, + 0x6d, 0x22, 0x8b, 0x9b, 0x03, 0x99, 0xfa, 0x67, 0x05, 0x14, 0xe2, 0x80, 0xcc, 0xa3, 0x2e, 0x23, + 0xf0, 0x3e, 0xc8, 0x0b, 0x1e, 0x56, 0x54, 0x16, 0xff, 0x5b, 0x9e, 0xaa, 0xcc, 0x26, 0xf3, 0x99, + 0xa1, 0x0c, 0x6e, 0x26, 0x20, 0xdd, 0xfd, 0x27, 0x92, 0x28, 0x17, 0x63, 0x5a, 0x05, 0x70, 0x00, + 0x29, 0x1c, 0xd9, 0x3c, 0x98, 0x14, 0x95, 0xda, 0xce, 0x0e, 0x1f, 0x59, 0xd6, 0x9c, 0x10, 0x07, + 0xf5, 0x1d, 0xfd, 0x49, 0x6c, 0xcc, 0x51, 0x13, 0x0f, 0x41, 0x4e, 0x48, 0x78, 0x42, 0x6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5, 0x8e, 0x8b, 0x0e, 0x2a, 0xe8, 0x75, 0x58, 0xc7, 0x3f, + 0xf4, 0x08, 0xeb, 0xe4, 0xb8, 0xe2, 0xc1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x7e, + 0xe6, 0xd8, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1152,16 +1152,18 @@ func (m *QueryPacketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.Packet.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Packet != nil { + { + size, err := m.Packet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -1346,8 +1348,10 @@ func (m *QueryPacketResponse) Size() (n int) { } var l int _ = l - l = m.Packet.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.Packet != nil { + l = m.Packet.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -1917,7 +1921,7 @@ func (m *QueryPacketsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Packets = append(m.Packets, types.Any{}) + m.Packets = append(m.Packets, &types.Any{}) if err := m.Packets[len(m.Packets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2125,6 +2129,9 @@ func (m *QueryPacketResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.Packet == nil { + m.Packet = &types.Any{} + } if err := m.Packet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } From e731005d008aadf3a8cbe29998fc1bb56ec3b9e5 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 31 Jul 2024 13:21:05 +0700 Subject: [PATCH 028/272] clean code --- x/tunnel/keeper/keeper.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index a9221c00b..a7697b9df 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -5,7 +5,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -49,21 +48,6 @@ func NewKeeper( } } -// GetTunnelAccount returns the tunnel ModuleAccount -func (k Keeper) GetTunnelAccount(ctx sdk.Context) authtypes.ModuleAccountI { - return k.authKeeper.GetModuleAccount(ctx, types.ModuleName) -} - -// GetModuleBalance returns the balance of the tunnel ModuleAccount -func (k Keeper) GetModuleBalance(ctx sdk.Context) sdk.Coins { - return k.bankKeeper.GetAllBalances(ctx, k.GetTunnelAccount(ctx).GetAddress()) -} - -// SetModuleAccount sets a module account in the account keeper. -func (k Keeper) SetModuleAccount(ctx sdk.Context, acc authtypes.ModuleAccountI) { - k.authKeeper.SetModuleAccount(ctx, acc) -} - // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) From 62943ee01589039bfbf011237f525953dcbae33a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 31 Jul 2024 17:24:23 +0700 Subject: [PATCH 029/272] add update tunnel --- x/tunnel/keeper/tunnel.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index c365bb857..b375fa6cf 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -154,6 +154,9 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error // SetParams sets the tunnel module parameters func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { + // Increment the nonce + tunnel.NonceCount += 1 + switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: k.TSSPacketHandler(ctx, types.TSSPacket{ @@ -165,4 +168,7 @@ func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { case *types.AxelarRoute: k.AxelarPacketHandler(ctx, types.AxelarPacket{}) } + + // Update the tunnel + k.SetTunnel(ctx, tunnel) } From cb4ecf6d827562c9686b93d0e3029f5720557cff Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 2 Aug 2024 16:53:34 +0700 Subject: [PATCH 030/272] clean up --- proto/tunnel/v1beta1/genesis.proto | 2 +- proto/tunnel/v1beta1/params.proto | 9 +- proto/tunnel/v1beta1/query.proto | 6 +- proto/tunnel/v1beta1/tunnel.proto | 2 +- proto/tunnel/v1beta1/tx.proto | 19 +++- x/tunnel/client/cli/util.go | 9 +- x/tunnel/genesis.go | 23 ++++ x/tunnel/keeper/msg_server.go | 3 +- x/tunnel/keeper/tunnel.go | 6 +- x/tunnel/types/errors.go | 7 +- x/tunnel/types/genesis.pb.go | 10 +- x/tunnel/types/params.go | 9 ++ x/tunnel/types/params.pb.go | 172 +++++++++++++++++++++++------ x/tunnel/types/query.pb.go | 96 ++++++++-------- x/tunnel/types/query.pb.gw.go | 6 +- x/tunnel/types/tunnel.pb.go | 132 +++++++++++----------- x/tunnel/types/tx.pb.go | 23 ++-- 17 files changed, 348 insertions(+), 186 deletions(-) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index 2dec250ff..f90870b98 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -14,5 +14,5 @@ message GenesisState { // tunnel_count is the number of tunnels. uint64 tunnel_count = 2; // tunnels is the list of tunnels. - repeated Tunnel tunnels = 5 [(gogoproto.nullable) = false]; + repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto index 3198cef40..14e2cdeea 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/tunnel/v1beta1/params.proto @@ -14,12 +14,15 @@ message Params { repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - uint64 min_diviation_bps = 2 [(gogoproto.customname) = "MinDeviationBPS"]; - repeated cosmos.base.v1beta1.Coin tss_route_fee = 3 [ + uint64 min_deviation_bps = 2 [(gogoproto.customname) = "MinDeviationBPS"]; + uint64 min_interval = 3; + repeated cosmos.base.v1beta1.Coin base_fee = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin tss_route_fee = 5 [ (gogoproto.nullable) = false, (gogoproto.customname) = "TSSRouteFee", (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; - repeated cosmos.base.v1beta1.Coin axelar_route_fee = 4 + repeated cosmos.base.v1beta1.Coin axelar_route_fee = 6 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index 464313028..3f4a6c127 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -24,17 +24,17 @@ service Query { // Tunnel is a RPC method that returns a tunnel by its ID. rpc Tunnel(QueryTunnelRequest) returns (QueryTunnelResponse) { - option (google.api.http).get = "/tunnel/v1beta1/tunnel/{tunnel_id}"; + option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}"; } // Packets is a RPC method that returns all packets of a tunnel. rpc Packets(QueryPacketsRequest) returns (QueryPacketsResponse) { - option (google.api.http).get = "/tunnel/v1beta1/packets/{tunnel_id}"; + option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/packets"; } // Packet is a RPC method that returns a packet by its tunnel ID and nonce. rpc Packet(QueryPacketRequest) returns (QueryPacketResponse) { - option (google.api.http).get = "/tunnel/v1beta1/packet/{tunnel_id}/{nonce}"; + option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/packets/{nonce}"; } } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index a55738f9c..3a68f9915 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -67,7 +67,7 @@ message TSSPacket { repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; uint64 signing_id = 5 [ (gogoproto.customname) = "SigningID", - (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/pkg/tss.SigningID" + (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" ]; string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; string destination_contract_address = 7; diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 2fec1c8e9..3b8a288ce 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -31,11 +31,16 @@ message MsgCreateTunnel { option (cosmos.msg.v1.signer) = "creator"; option (amino.name) = "tunnel/MsgCreateTunnel"; - repeated SignalInfo signal_infos = 1 [(gogoproto.nullable) = false]; - google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "Route"]; - feeds.v1beta1.FeedType feed_type = 3; + // signal_infos is the list of signal infos. + repeated SignalInfo signal_infos = 1 [(gogoproto.nullable) = false]; + // route is the route for delivering the signal prices + google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "Route"]; + // feed_type is the type of feed data. + feeds.v1beta1.FeedType feed_type = 3; + // deposit is the deposit required to create a tunnel. repeated cosmos.base.v1beta1.Coin deposit = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // creator is the address of the creator. string creator = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } @@ -49,8 +54,10 @@ message MsgActivateTunnel { option (cosmos.msg.v1.signer) = "creator"; option (amino.name) = "tunnel/MsgActivateTunnel"; + // tunnel_id is the ID of the tunnel to activate. uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // creator is the address of the creator. + string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgActivateTunnelResponse is the response type for the Msg/ActivateTunnel RPC method. @@ -61,10 +68,10 @@ message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; option (amino.name) = "tunnel/MsgUpdateParams"; - // Authority is the address of the governance account. + // authority is the address of the governance account. string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Params is the x/tunnel parameters to update. + // params is the x/tunnel parameters to update. Params params = 2 [(gogoproto.nullable) = false]; } diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index 268cb7ff5..18d793617 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -7,11 +7,14 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +// SignalInfos represents the signal infos in the file +type SignalInfos struct { + SignalInfos []types.SignalInfo `json:"signal_infos"` +} + // parseSignalInfos parses the signal infos from the given file func parseSignalInfos(signalInfosFile string) ([]types.SignalInfo, error) { - signalInfos := struct { - SignalInfos []types.SignalInfo `json:"signal_infos"` - }{} + var signalInfos SignalInfos if signalInfosFile == "" { return signalInfos.SignalInfos, nil diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 6bd5446ee..664be9050 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -13,6 +13,29 @@ func ValidateGenesis(data *types.GenesisState) error { if err := data.Params.Validate(); err != nil { return errorsmod.Wrap(err, "tunnel params") } + + // Validate the tunnel count + if uint64(len(data.Tunnels)) != data.TunnelCount { + return errorsmod.Wrapf( + types.ErrInvalidGenesis, + "TunnelCount: %d, actual tunnels: %d", + data.TunnelCount, + len(data.Tunnels), + ) + } + + // Validate the tunnel IDs + for _, tunnel := range data.Tunnels { + if tunnel.ID > data.TunnelCount { + return errorsmod.Wrapf( + types.ErrInvalidGenesis, + "TunnelID %d is greater than the TunnelCount %d", + tunnel.ID, + data.TunnelCount, + ) + } + } + return nil } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 10301a557..0e5b3e302 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -21,7 +21,6 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{Keeper: keeper} } -// CreateTunnel creates a new tunnel. // CreateTunnel creates a new tunnel. func (ms msgServer) CreateTunnel( goCtx context.Context, @@ -42,7 +41,7 @@ func (ms msgServer) CreateTunnel( Route: req.Route, FeedType: req.FeedType, SignalPriceInfos: signalPriceInfos, - IsActive: true, // TODO: set to false by default + IsActive: false, Creator: req.Creator, }) if err != nil { diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index b375fa6cf..b2d326e3c 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -117,10 +117,10 @@ func (k Keeper) GetRequiredProcessTunnels( for j, sp := range at.SignalPriceInfos { latestPrice, exists := latestPricesMap[sp.SignalID] if exists { - difference := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) - differenceInBPS := uint64(difference * 10000) + deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) + deviationInBPS := uint64(deviation * 10000) - if differenceInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp.Unix()+int64(sp.Interval) { + if deviationInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp.Unix()+int64(sp.Interval) { // Update the price directly activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index eb3849b2e..8dee22916 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -6,8 +6,9 @@ import ( // x/tunnel module sentinel errors var ( - ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 2, "max tunnel channels") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 3, "tunnel not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 4, "packet not found") + ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") + ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 3, "max tunnel channels") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 4, "tunnel not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 5, "packet not found") ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 6, "account already exist") ) diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index d83d7f958..94d6dc09b 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -30,7 +30,7 @@ type GenesisState struct { // tunnel_count is the number of tunnels. TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` // tunnels is the list of tunnels. - Tunnels []Tunnel `protobuf:"bytes,5,rep,name=tunnels,proto3" json:"tunnels"` + Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -104,13 +104,13 @@ var fileDescriptor_cb87d9373a74da2e = []byte{ 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd3, 0x43, 0x75, 0x81, 0x5e, 0x00, 0x58, 0xd6, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xa8, 0x5a, 0x21, 0x45, 0x2e, 0x1e, 0x88, 0xb2, 0xf8, 0xe4, 0xfc, 0xd2, 0xbc, 0x12, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x96, 0x20, 0x6e, 0x88, 0x98, 0x33, 0x48, - 0x48, 0xc8, 0x8c, 0x8b, 0x1d, 0xc2, 0x2d, 0x96, 0x60, 0x55, 0x60, 0xc6, 0x66, 0x72, 0x08, 0x98, + 0x48, 0xc8, 0x8c, 0x8b, 0x1d, 0xc2, 0x2d, 0x96, 0x60, 0x56, 0x60, 0xc6, 0x66, 0x72, 0x08, 0x98, 0x0b, 0x35, 0x19, 0xa6, 0xd8, 0xc9, 0xf3, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x93, 0x12, 0xf3, 0x52, 0xc0, 0x3e, 0x4a, 0xce, 0xcf, 0xd1, 0x4f, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0x33, 0xd2, 0xaf, 0x80, 0x7a, 0x56, 0xbf, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xac, 0xc2, 0x18, 0x10, - 0x00, 0x00, 0xff, 0xff, 0x9a, 0xdd, 0x54, 0x18, 0x73, 0x01, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x37, 0x22, 0xb5, 0x7f, 0x73, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -144,7 +144,7 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x1a } } if m.TunnelCount != 0 { @@ -283,7 +283,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } - case 5: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Tunnels", wireType) } diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 4536e3f9b..93eda49b2 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -2,6 +2,7 @@ package types import ( fmt "fmt" + "time" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -9,8 +10,10 @@ import ( ) var ( + DefaultMinInterval = uint64((1 * time.Second).Seconds()) DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) DefaultMinDeviationBPS = uint64(100) + DefaultBaseFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) DefaultTSSRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) DefaultAxelarRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) ) @@ -19,12 +22,16 @@ var ( func NewParams( minDeposit sdk.Coins, minDeviationBPS uint64, + minInterval uint64, + baseFee sdk.Coins, tssRouteFee sdk.Coins, axelarRouteFee sdk.Coins, ) Params { return Params{ MinDeposit: minDeposit, MinDeviationBPS: minDeviationBPS, + MinInterval: minInterval, + BaseFee: baseFee, TSSRouteFee: tssRouteFee, AxelarRouteFee: axelarRouteFee, } @@ -35,6 +42,8 @@ func DefaultParams() Params { return NewParams( DefaultMinDeposit, DefaultMinDeviationBPS, + DefaultMinInterval, + DefaultBaseFee, DefaultTSSRouteFee, DefaultAxelarRouteFee, ) diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 140527300..951a8b525 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -29,9 +29,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params is the data structure that keeps the parameters of the module. type Params struct { MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` - MinDeviationBPS uint64 `protobuf:"varint,2,opt,name=min_diviation_bps,json=minDiviationBps,proto3" json:"min_diviation_bps,omitempty"` - TSSRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tss_route_fee,json=tssRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tss_route_fee"` - AxelarRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=axelar_route_fee,json=axelarRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"axelar_route_fee"` + MinDeviationBPS uint64 `protobuf:"varint,2,opt,name=min_deviation_bps,json=minDeviationBps,proto3" json:"min_deviation_bps,omitempty"` + MinInterval uint64 `protobuf:"varint,3,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` + BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` + TSSRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=tss_route_fee,json=tssRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tss_route_fee"` + AxelarRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=axelar_route_fee,json=axelarRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"axelar_route_fee"` } func (m *Params) Reset() { *m = Params{} } @@ -80,6 +82,20 @@ func (m *Params) GetMinDeviationBPS() uint64 { return 0 } +func (m *Params) GetMinInterval() uint64 { + if m != nil { + return m.MinInterval + } + return 0 +} + +func (m *Params) GetBaseFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.BaseFee + } + return nil +} + func (m *Params) GetTSSRouteFee() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TSSRouteFee @@ -101,31 +117,33 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/params.proto", fileDescriptor_a7b5eedd244355eb) } var fileDescriptor_a7b5eedd244355eb = []byte{ - // 376 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x3f, 0x4f, 0xf2, 0x40, - 0x1c, 0xc7, 0xdb, 0x07, 0x42, 0x9e, 0xb4, 0x79, 0xe0, 0x79, 0xfa, 0x38, 0x00, 0x26, 0x2d, 0x71, - 0x62, 0xb1, 0x27, 0xb8, 0xb9, 0x90, 0x54, 0x63, 0xe2, 0x60, 0x42, 0xc0, 0xc9, 0xa5, 0xb9, 0x96, - 0x13, 0x2e, 0xb6, 0x77, 0x4d, 0x7f, 0x57, 0x82, 0x8b, 0xaf, 0xc1, 0xd1, 0x91, 0xd9, 0x57, 0xe0, - 0x4b, 0x60, 0x64, 0x74, 0x42, 0x53, 0x16, 0x5f, 0x86, 0x69, 0xaf, 0x35, 0x6c, 0xc6, 0xc4, 0xa9, - 0x6d, 0x3e, 0xdf, 0x7f, 0xe9, 0x9d, 0xb6, 0x2f, 0x12, 0xc6, 0x48, 0x80, 0xe6, 0x3d, 0x8f, 0x08, - 0xdc, 0x43, 0x11, 0x8e, 0x71, 0x08, 0x76, 0x14, 0x73, 0xc1, 0x8d, 0xba, 0x84, 0x76, 0x01, 0xdb, - 0x7b, 0x53, 0x3e, 0xe5, 0x39, 0x42, 0xd9, 0x9b, 0x54, 0xb5, 0x4d, 0x9f, 0x43, 0xc8, 0x01, 0x79, - 0x18, 0xc8, 0x67, 0x8e, 0xcf, 0x29, 0x2b, 0x78, 0x4b, 0x72, 0x57, 0x1a, 0xe5, 0x87, 0x44, 0x07, - 0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ac, 0xb7, 0xa6, 0xf2, 0xb2, 0x35, 0x95, 0x6b, 0xb4, - 0x93, 0xee, 0x61, 0x36, 0xc9, 0x8f, 0xda, 0xe7, 0x01, 0xf2, 0x67, 0x98, 0x32, 0x34, 0xef, 0xa3, - 0x05, 0x2a, 0x6e, 0x5d, 0x5e, 0xe5, 0xd5, 0x72, 0xc5, 0xf1, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xda, 0x75, 0xe0, 0x94, 0x8c, 0x02, 0x00, 0x00, + // 407 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x3f, 0xcf, 0xd2, 0x40, + 0x1c, 0xc7, 0x5b, 0x1f, 0xc4, 0x27, 0x57, 0x05, 0xad, 0x0e, 0x05, 0x93, 0x16, 0x9d, 0x58, 0xec, + 0x09, 0x6e, 0x2e, 0x24, 0xd5, 0x90, 0x30, 0x98, 0x90, 0xe2, 0xe4, 0xd2, 0x5c, 0xcb, 0x01, 0x17, + 0xdb, 0xbb, 0xa6, 0x77, 0x6d, 0x70, 0xf1, 0x35, 0x38, 0x3a, 0x32, 0xfb, 0x36, 0x5c, 0x18, 0x19, + 0x9d, 0xd0, 0x94, 0xc5, 0x97, 0x61, 0xae, 0x77, 0x18, 0x36, 0x63, 0xc2, 0xd4, 0xf6, 0xbe, 0x7f, + 0x3e, 0xbf, 0x5f, 0xd2, 0x03, 0x4f, 0x45, 0x49, 0x29, 0x4e, 0x61, 0x35, 0x8a, 0xb1, 0x40, 0x23, + 0x98, 0xa3, 0x02, 0x65, 0xdc, 0xcf, 0x0b, 0x26, 0x98, 0xdd, 0x51, 0xa2, 0xaf, 0xc5, 0xfe, 0x93, + 0x35, 0x5b, 0xb3, 0x46, 0x82, 0xf2, 0x4d, 0xb9, 0xfa, 0x6e, 0xc2, 0x78, 0xc6, 0x38, 0x8c, 0x11, + 0xc7, 0x7f, 0x7b, 0x12,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0x9c, 0x9f, 0x83, 0x76, 0x09, 0x1e, + 0xa2, 0x2d, 0x4e, 0x51, 0x71, 0x31, 0x42, 0xfb, 0xfa, 0xfb, 0x76, 0x14, 0xe4, 0x8c, 0x7d, 0x7d, + 0xfb, 0x75, 0xe7, 0x19, 0xbf, 0x77, 0x9e, 0x19, 0xcc, 0xf6, 0xb5, 0x6b, 0x1e, 0x6a, 0xd7, 0xfc, + 0x55, 0xbb, 0xe6, 0x97, 0x93, 0x6b, 0x1c, 0x4e, 0xae, 0xf1, 0xe3, 0xe4, 0x1a, 0x1f, 0xe0, 0x45, + 0x7b, 0x8c, 0xe8, 0xb2, 0xf9, 0xeb, 0x12, 0x96, 0xc2, 0x64, 0x83, 0x08, 0x85, 0xd5, 0x18, 0x6e, + 0xa1, 0xbe, 0x00, 0x0d, 0x2a, 0x6e, 0x37, 0x8e, 0x57, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x2a, + 0x8b, 0x9c, 0x17, 0x17, 0x03, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -158,6 +176,17 @@ func (this *Params) Equal(that interface{}) bool { if this.MinDeviationBPS != that1.MinDeviationBPS { return false } + if this.MinInterval != that1.MinInterval { + return false + } + if len(this.BaseFee) != len(that1.BaseFee) { + return false + } + for i := range this.BaseFee { + if !this.BaseFee[i].Equal(&that1.BaseFee[i]) { + return false + } + } if len(this.TSSRouteFee) != len(that1.TSSRouteFee) { return false } @@ -207,7 +236,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintParams(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } } if len(m.TSSRouteFee) > 0 { @@ -221,9 +250,28 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintParams(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x2a + } + } + if len(m.BaseFee) > 0 { + for iNdEx := len(m.BaseFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BaseFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } } + if m.MinInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MinInterval)) + i-- + dAtA[i] = 0x18 + } if m.MinDeviationBPS != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MinDeviationBPS)) i-- @@ -272,6 +320,15 @@ func (m *Params) Size() (n int) { if m.MinDeviationBPS != 0 { n += 1 + sovParams(uint64(m.MinDeviationBPS)) } + if m.MinInterval != 0 { + n += 1 + sovParams(uint64(m.MinInterval)) + } + if len(m.BaseFee) > 0 { + for _, e := range m.BaseFee { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } if len(m.TSSRouteFee) > 0 { for _, e := range m.TSSRouteFee { l = e.Size() @@ -376,6 +433,59 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinInterval", wireType) + } + m.MinInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseFee = append(m.BaseFee, types.Coin{}) + if err := m.BaseFee[len(m.BaseFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TSSRouteFee", wireType) } @@ -409,7 +519,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AxelarRouteFee", wireType) } diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 36cd4f93f..282f2802e 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -576,54 +576,54 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 741 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x4f, 0x13, 0x4f, - 0x14, 0xc7, 0xbb, 0xfc, 0x4a, 0x0b, 0x43, 0x42, 0xc8, 0xfc, 0x1a, 0x2c, 0x8b, 0x2e, 0x64, 0x8b, - 0x4a, 0x2a, 0xd9, 0x91, 0xea, 0xdd, 0x14, 0x2c, 0xa4, 0xd1, 0x34, 0xb8, 0x2d, 0x1e, 0xbc, 0x34, - 0xd3, 0x65, 0x5c, 0x36, 0x96, 0x9d, 0xa5, 0xb3, 0x4b, 0x44, 0xc2, 0x41, 0x13, 0x13, 0x6f, 0x6a, - 0xbc, 0x7b, 0xf1, 0x9f, 0xe1, 0x48, 0xe2, 0xc5, 0x93, 0x31, 0xe0, 0x9f, 0xe1, 0xc1, 0x74, 0x66, - 0x76, 0xe9, 0xd2, 0xdd, 0xca, 0x81, 0x5b, 0x3b, 0xef, 0xfb, 0xe6, 0x7d, 0xde, 0xfb, 0xee, 0x1b, - 0xa0, 0xfa, 0x81, 0xeb, 0x92, 0x2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xa9, 0xa5, 0x91, 0x1a, 0x09, 0x50, 0xe1, 0x00, 0x2b, - 0xb0, 0x9c, 0x0c, 0x30, 0x58, 0x1f, 0x1d, 0xf1, 0xb5, 0x3c, 0x5e, 0xab, 0x9f, 0x9c, 0x69, 0xca, - 0xe9, 0x99, 0xa6, 0xfc, 0x3a, 0xd3, 0x94, 0x4f, 0xe7, 0x5a, 0xe6, 0xf4, 0x5c, 0xcb, 0xfc, 0x38, - 0xd7, 0x32, 0x2f, 0x90, 0xed, 0xf8, 0xbb, 0x41, 0xc7, 0xb0, 0xe8, 0x1e, 0xea, 0x60, 0x77, 0x87, - 0x6f, 0xa4, 0x45, 0xbb, 0xc8, 0xda, 0xc5, 0x8e, 0x8b, 0x0e, 0x2a, 0xe8, 0x75, 0x58, 0xc7, 0x3f, - 0xf4, 0x08, 0xeb, 0xe4, 0xb8, 0xe2, 0xc1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x7e, - 0xe6, 0xd8, 0x07, 0x00, 0x00, + // 739 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xc7, 0xbb, 0x58, 0x5a, 0x18, 0x12, 0x42, 0xc6, 0x06, 0xcb, 0xa2, 0x0b, 0xd9, 0xfa, 0x83, + 0x80, 0xee, 0x48, 0xd1, 0x93, 0x07, 0x53, 0xb0, 0x90, 0x46, 0xd3, 0xe0, 0xb6, 0x78, 0xf0, 0xd2, + 0x4c, 0x97, 0x71, 0xd9, 0x58, 0x76, 0x96, 0xce, 0x2e, 0x11, 0x09, 0x1e, 0x3c, 0xe9, 0x05, 0x35, + 0xde, 0xbd, 0xf8, 0xcf, 0x70, 0x24, 0xf1, 0xe2, 0xc9, 0x18, 0xf0, 0x0f, 0x31, 0x9d, 0x99, 0x5d, + 0xba, 0xd0, 0xad, 0x35, 0xe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70, 0x61, 0x00, 0x06, 0x14, 0x5a, 0xf5, 0x50, 0xe9, 0x8c, + 0xbd, 0xf3, 0x9d, 0x38, 0xf6, 0x2e, 0xeb, 0xa9, 0x85, 0xbe, 0x1a, 0x09, 0xf2, 0x88, 0x83, 0x3c, + 0x84, 0x4b, 0xff, 0x01, 0x82, 0xf6, 0xb9, 0x51, 0x0f, 0x96, 0x2b, 0x47, 0x27, 0x9a, 0x72, 0x7c, + 0xa2, 0x29, 0xbf, 0x4f, 0x34, 0xe5, 0xf3, 0xa9, 0x96, 0x3a, 0x3e, 0xd5, 0x52, 0x3f, 0x4f, 0xb5, + 0xd4, 0x4b, 0x64, 0x3b, 0xfe, 0x56, 0xd0, 0x34, 0x2c, 0xba, 0x8d, 0x9a, 0xd8, 0xdd, 0xe4, 0x1e, + 0xb5, 0x68, 0x0b, 0x59, 0x5b, 0xd8, 0x71, 0xd1, 0x6e, 0x11, 0xbd, 0x09, 0x13, 0xfa, 0x7b, 0x1e, + 0x61, 0xcd, 0x0c, 0x57, 0x2c, 0xfd, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x4c, 0x75, 0x77, 0xea, + 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tunnel/types/query.pb.gw.go b/x/tunnel/types/query.pb.gw.go index 63204a794..36dbbecfa 100644 --- a/x/tunnel/types/query.pb.gw.go +++ b/x/tunnel/types/query.pb.gw.go @@ -559,11 +559,11 @@ var ( pattern_Query_Tunnels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "tunnels"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Tunnel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 0, 1, 0, 4, 1, 5, 2}, []string{"tunnel", "v1beta1", "tunnel_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Tunnel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Packets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"tunnel", "v1beta1", "packets", "tunnel_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Packets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Packet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"tunnel", "v1beta1", "packet", "tunnel_id", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Packet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 7c1e2e86b..3db27bfb8 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - github_com_bandprotocol_chain_v2_pkg_tss "github.com/bandprotocol/chain/v2/pkg/tss" + github_com_bandprotocol_chain_v2_x_bandtss_types "github.com/bandprotocol/chain/v2/x/bandtss/types" types1 "github.com/bandprotocol/chain/v2/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" @@ -388,14 +388,14 @@ func (m *Tunnel) GetCreator() string { } type TSSPacket struct { - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - SigningID github_com_bandprotocol_chain_v2_pkg_tss.SigningID `protobuf:"varint,5,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/pkg/tss.SigningID" json:"signing_id,omitempty"` - DestinationChainID string `protobuf:"bytes,6,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - DestinationContractAddress string `protobuf:"bytes,7,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + SigningID github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID `protobuf:"varint,5,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" json:"signing_id,omitempty"` + DestinationChainID string `protobuf:"bytes,6,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,7,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` } func (m *TSSPacket) Reset() { *m = TSSPacket{} } @@ -459,7 +459,7 @@ func (m *TSSPacket) GetSignalPriceInfos() []SignalPriceInfo { return nil } -func (m *TSSPacket) GetSigningID() github_com_bandprotocol_chain_v2_pkg_tss.SigningID { +func (m *TSSPacket) GetSigningID() github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID { if m != nil { return m.SigningID } @@ -600,63 +600,63 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 881 bytes of a gzipped FileDescriptorProto + // 884 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, 0x14, 0xaf, 0xdb, 0x24, 0xb5, 0x27, 0xd9, 0xb2, 0x1a, 0x45, 0x8b, 0x49, 0x51, 0x5c, 0xf5, 0x54, - 0x0e, 0x6b, 0xb3, 0x81, 0x5e, 0x56, 0x42, 0x22, 0x4e, 0xb4, 0xda, 0x48, 0x20, 0x15, 0x27, 0x27, - 0x2e, 0xd6, 0xd8, 0x9e, 0xb8, 0xa3, 0xa6, 0x33, 0xc6, 0x33, 0x89, 0x36, 0xdf, 0xa2, 0x42, 0xe2, - 0x0e, 0x12, 0x07, 0x3e, 0xc0, 0x7e, 0x88, 0x15, 0xa7, 0x15, 0x27, 0x4e, 0x01, 0xb9, 0x17, 0xee, - 0xdc, 0x38, 0xa1, 0xf9, 0x93, 0x94, 0x14, 0x50, 0x11, 0x20, 0x81, 0x7a, 0x9b, 0xf7, 0x7e, 0xbf, - 0x37, 0x7e, 0x6f, 0xde, 0x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x03, 0x20, 0x7d, 0x84, 0x16, 0xb2, 0x98, 0xba, 0x2a, 0xe6, 0xa3, 0x6a, + 0xe9, 0x39, 0xb1, 0xf6, 0x0e, 0x07, 0xbf, 0x2d, 0xbd, 0x93, 0x82, 0x88, 0xf3, 0x59, 0xea, 0x67, + 0xec, 0x22, 0x48, 0x11, 0xcd, 0xd5, 0x83, 0x67, 0x6c, 0x12, 0xa8, 0x05, 0x1a, 0xcc, 0x7b, 0xc1, + 0x33, 0xe5, 0x17, 0x9c, 0x07, 0xb2, 0x26, 0xee, 0xaf, 0xa3, 0x23, 0xc7, 0x5c, 0x3f, 0xcc, 0xff, + 0x76, 0xfb, 0x36, 0xfe, 0xf3, 0xed, 0xbb, 0x7b, 0xdb, 0xf6, 0xbd, 0x21, 0x28, 0xfb, 0x1f, 0x09, + 0xca, 0x88, 0xe3, 0x6a, 0x07, 0xb4, 0xf4, 0x8f, 0xcc, 0x1d, 0xd4, 0xc7, 0xbb, 0xa0, 0x45, 0xd2, + 0x2c, 0xf9, 0x62, 0x86, 0x67, 0xf8, 0x5a, 0x21, 0x7b, 0xd5, 0xd2, 0x03, 0xc3, 0xf0, 0xf4, 0x53, + 0xe9, 0x1e, 0x0e, 0x22, 0x40, 0xd2, 0x4c, 0x9f, 0xef, 0x6a, 0x97, 0xc3, 0x4f, 0xbe, 0xab, 0xba, + 0xd6, 0x8b, 0xaa, 0x6b, 0xbd, 0xac, 0xba, 0xd6, 0xcf, 0x55, 0xd7, 0xba, 0xbc, 0xea, 0x6e, 0xbd, + 0xbc, 0xea, 0x6e, 0xfd, 0x78, 0xd5, 0xdd, 0xfa, 0x2c, 0x78, 0x85, 0x09, 0x31, 0x7f, 0xf2, 0xd4, + 0x80, 0xa4, 0x0d, 0xc5, 0x78, 0xef, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x41, 0x32, 0xfb, 0x43, + 0xfb, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -2551,7 +2551,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SigningID |= github_com_bandprotocol_chain_v2_pkg_tss.SigningID(b&0x7F) << shift + m.SigningID |= github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 6ab6fe89a..d7bcfbf37 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -37,11 +37,16 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateTunnel is the transaction message to create a new tunnel. type MsgCreateTunnel struct { - SignalInfos []SignalInfo `protobuf:"bytes,1,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` - Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` - FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` - Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` + // signal_infos is the list of signal infos. + SignalInfos []SignalInfo `protobuf:"bytes,1,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` + // route is the route for delivering the signal prices + Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` + // feed_type is the type of feed data. + FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + // deposit is the deposit required to create a tunnel. + Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *MsgCreateTunnel) Reset() { *m = MsgCreateTunnel{} } @@ -159,8 +164,10 @@ func (m *MsgCreateTunnelResponse) GetTunnelID() uint64 { // MsgActivateTunnel is the transaction message to activate a tunnel. type MsgActivateTunnel struct { + // tunnel_id is the ID of the tunnel to activate. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *MsgActivateTunnel) Reset() { *m = MsgActivateTunnel{} } @@ -249,9 +256,9 @@ var xxx_messageInfo_MsgActivateTunnelResponse proto.InternalMessageInfo // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { - // Authority is the address of the governance account. + // authority is the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Params is the x/tunnel parameters to update. + // params is the x/tunnel parameters to update. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } From 1c6ebd4a702a8b5e4c8763163e08f3f25b00d066 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 5 Aug 2024 13:13:25 +0700 Subject: [PATCH 031/272] fix from review --- x/tunnel/client/cli/query.go | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index 1fca94b0b..b9ffff024 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -41,7 +41,10 @@ func GetQueryCmdTunnel() *cobra.Command { Short: "Query the tunnel by tunnel id", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) @@ -73,7 +76,10 @@ func GetQueryCmdTunnels() *cobra.Command { Short: "Query all tunnels", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) @@ -122,7 +128,10 @@ func GetQueryCmdPackets() *cobra.Command { Short: "Query the packets of a tunnel", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) @@ -136,7 +145,7 @@ func GetQueryCmdPackets() *cobra.Command { return err } - res, err := queryClient.Packets(context.Background(), &types.QueryPacketsRequest{ + res, err := queryClient.Packets(cmd.Context(), &types.QueryPacketsRequest{ TunnelId: tunnelID, Pagination: pageReq, }) @@ -161,7 +170,10 @@ func GetQueryCmdPacket() *cobra.Command { Short: "Query a packet by tunnel id and nonce", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) @@ -175,7 +187,7 @@ func GetQueryCmdPacket() *cobra.Command { return err } - res, err := queryClient.Packet(context.Background(), &types.QueryPacketRequest{ + res, err := queryClient.Packet(cmd.Context(), &types.QueryPacketRequest{ TunnelId: tunnelID, Nonce: nonce, }) @@ -199,11 +211,14 @@ func GetQueryCmdParams() *cobra.Command { Short: "Shows the parameters of the module", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) + res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) if err != nil { return err } From 63a2f77e2521009fb6d6bf132cd334479a21f841 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 5 Aug 2024 14:35:22 +0700 Subject: [PATCH 032/272] add manual trigger tunnel --- proto/tunnel/v1beta1/tunnel.proto | 12 + proto/tunnel/v1beta1/tx.proto | 17 ++ x/tunnel/abci.go | 1 + x/tunnel/client/cli/tx.go | 27 ++ x/tunnel/keeper/msg_server.go | 25 ++ x/tunnel/keeper/tunnel.go | 52 ++++ x/tunnel/keeper/tunnel_test.go | 34 +++ x/tunnel/types/events.go | 7 +- x/tunnel/types/keys.go | 2 + x/tunnel/types/msgs.go | 36 ++- x/tunnel/types/tunnel.go | 10 + x/tunnel/types/tunnel.pb.go | 405 +++++++++++++++++++++----- x/tunnel/types/tx.pb.go | 462 +++++++++++++++++++++++++++--- 13 files changed, 970 insertions(+), 120 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 3a68f9915..d6984f195 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -11,6 +11,7 @@ import "feeds/v1beta1/feeds.proto"; option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; option (gogoproto.equal_all) = true; +// Route is the type for a route message TSSRoute { option (cosmos_proto.implements_interface) = "Route"; @@ -18,6 +19,7 @@ message TSSRoute { string destination_contract_address = 2; } +// AxelarRoute is the type for an Axelar route message AxelarRoute { option (cosmos_proto.implements_interface) = "Route"; @@ -25,6 +27,7 @@ message AxelarRoute { string destination_contract_address = 2; } +// SignalInfo is the type for a signal info message SignalInfo { option (gogoproto.equal) = true; @@ -33,6 +36,7 @@ message SignalInfo { uint64 interval = 3; } +// SignalPriceInfo is the type for a signal price info message SignalPriceInfo { option (gogoproto.equal) = true; @@ -43,6 +47,7 @@ message SignalPriceInfo { google.protobuf.Timestamp LastTimestamp = 5 [(gogoproto.stdtime) = true]; } +// Tunnel is the type for a tunnel message Tunnel { option (gogoproto.equal) = true; @@ -58,6 +63,12 @@ message Tunnel { string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +message PendingTriggerTunnels { + // IDs is a list of tunnel IDs that are waiting to be triggered + repeated uint64 ids = 1 [(gogoproto.customname) = "IDs"]; +} + +// TSSPacket is the packet type for TSS message TSSPacket { option (gogoproto.equal) = true; @@ -74,6 +85,7 @@ message TSSPacket { google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } +// AxelarPacket is the packet type for Axelar message AxelarPacket { option (gogoproto.equal) = true; diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 3b8a288ce..bdf423b6d 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -22,6 +22,9 @@ service Msg { // ActivateTunnel is a RPC method to activate a tunnel. rpc ActivateTunnel(MsgActivateTunnel) returns (MsgActivateTunnelResponse); + // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. + rpc ManualTriggerTunnel(MsgManualTriggerTunnel) returns (MsgManualTriggerTunnelResponse); + // UpdateParams is a RPC method to update parameters rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } @@ -63,6 +66,20 @@ message MsgActivateTunnel { // MsgActivateTunnelResponse is the response type for the Msg/ActivateTunnel RPC method. message MsgActivateTunnelResponse {} +// MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. +message MsgManualTriggerTunnel { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgManualTrigger"; + + // tunnel_id is the ID of the tunnel to manually trigger. + uint64 id = 1 [(gogoproto.customname) = "ID"]; + // creator is the address of the creator. + string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgManualTriggerTunnelResponse is the response type for the Msg/ManualTrigger RPC method. +message MsgManualTriggerTunnelResponse {} + // MsgUpdateParams is the transaction message to update parameters. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index 72e9bb8de..a258c3da2 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -11,6 +11,7 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { func EndBlocker(ctx sdk.Context, k keeper.Keeper) { tunnels := k.GetRequiredProcessTunnels(ctx) + for _, tunnel := range tunnels { k.ProcessTunnel(ctx, tunnel) } diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 0c13aa6f2..ec7522ce4 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -25,6 +25,7 @@ func GetTxCmd() *cobra.Command { txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) txCmd.AddCommand(GetTxCmdActivateTunnel()) + txCmd.AddCommand(GetTxCmdManualTriggerTunnel()) return txCmd } @@ -107,3 +108,29 @@ func GetTxCmdActivateTunnel() *cobra.Command { return cmd } + +func GetTxCmdManualTriggerTunnel() *cobra.Command { + cmd := &cobra.Command{ + Use: "manual-trigger-tunnel [id]", + Short: "Manual trigger a tunnel", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + msg := types.NewMsgManualTriggerTunnel(id, clientCtx.GetFromAddress().String()) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 0e5b3e302..291370d68 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -96,6 +96,31 @@ func (ms msgServer) ActivateTunnel( return &types.MsgActivateTunnelResponse{}, nil } +// ManualTriggerTunnel manually triggers a tunnel. +func (ms msgServer) ManualTriggerTunnel( + goCtx context.Context, + req *types.MsgManualTriggerTunnel, +) (*types.MsgManualTriggerTunnelResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + tunnel, err := ms.Keeper.GetTunnel(ctx, req.ID) + if err != nil { + return nil, err + } + if req.Creator != tunnel.Creator { + return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.ID) + } + + ms.Keeper.AddPendingTriggerTunnel(ctx, req.ID) + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeManualTriggerTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.ID)), + )) + + return &types.MsgManualTriggerTunnelResponse{}, nil +} + // UpdateParams updates the module params. func (ms msgServer) UpdateParams( goCtx context.Context, diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index b2d326e3c..72e4aae51 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -63,6 +63,15 @@ func (k Keeper) GetTunnel(ctx sdk.Context, id uint64) (types.Tunnel, error) { return tunnel, nil } +// MustGetTunnel retrieves a tunnel by its ID. Panics if the tunnel does not exist. +func (k Keeper) MustGetTunnel(ctx sdk.Context, id uint64) types.Tunnel { + tunnel, err := k.GetTunnel(ctx, id) + if err != nil { + panic(err) + } + return tunnel +} + // GetTunnels returns all tunnels func (k Keeper) GetTunnels(ctx sdk.Context) []types.Tunnel { var tunnels []types.Tunnel @@ -94,6 +103,33 @@ func (k Keeper) GetActiveTunnels(ctx sdk.Context) []types.Tunnel { return tunnels } +// AddPendingTriggerTunnel adds the tunnel ID to the list of pending trigger tunnels +func (k Keeper) AddPendingTriggerTunnel(ctx sdk.Context, id uint64) { + pendingList := k.GetPendingTriggerTunnels(ctx) + pendingList = append(pendingList, id) + k.SetPendingTriggerTunnels(ctx, pendingList) +} + +// SetPendingTriggerTunnels saves the list of pending trigger tunnels that will be executed at the end of the block. +func (k Keeper) SetPendingTriggerTunnels(ctx sdk.Context, ids []uint64) { + bz := k.cdc.MustMarshal(&types.PendingTriggerTunnels{IDs: ids}) + if bz == nil { + bz = []byte{} + } + ctx.KVStore(k.storeKey).Set(types.PendingTriggerTunnelsStoreKey, bz) +} + +// GetPendingTriggerTunnels returns the list of pending trigger tunnels to be executed during EndBlock. +func (k Keeper) GetPendingTriggerTunnels(ctx sdk.Context) (ids []uint64) { + bz := ctx.KVStore(k.storeKey).Get(types.PendingTriggerTunnelsStoreKey) + if len(bz) == 0 { // Return an empty list if the key does not exist in the store. + return []uint64{} + } + pendingTriggerTunnels := types.PendingTriggerTunnels{} + k.cdc.MustUnmarshal(bz, &pendingTriggerTunnels) + return pendingTriggerTunnels.IDs +} + // GetRequiredProcessTunnels returns all tunnels that require processing func (k Keeper) GetRequiredProcessTunnels( ctx sdk.Context, @@ -133,6 +169,22 @@ func (k Keeper) GetRequiredProcessTunnels( tunnels = append(tunnels, at) } } + + // add pending trigger tunnels + pendingTriggerTunnels := k.GetPendingTriggerTunnels(ctx) + for _, id := range pendingTriggerTunnels { + if !types.IsTunnelInList(id, tunnels) { + tunnel := k.MustGetTunnel(ctx, id) + for i, sp := range tunnel.SignalPriceInfos { + latestPrice, exists := latestPricesMap[sp.SignalID] + if exists { + tunnel.SignalPriceInfos[i].Price = latestPrice.Price + tunnel.SignalPriceInfos[i].LastTimestamp = &now + tunnels = append(tunnels, tunnel) + } + } + } + } return tunnels } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index ca925ed0e..033865385 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -105,6 +105,40 @@ func TestGetActiveTunnels(t *testing.T) { require.Len(s.T(), tunnels, 1, "expected 1 active tunnel to be retrieved") } +func TestAddPendingTriggerTunnel(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Create a new tunnel instance + tunnel := types.Tunnel{ID: 1} + + // Add the tunnel to the keeper + k.AddPendingTriggerTunnel(ctx, tunnel.ID) + + // Attempt to retrieve the pending trigger tunnels + pendingTriggerTunnels := k.GetPendingTriggerTunnels(ctx) + + // Assert the number of pending trigger tunnels is 1 + require.Len(s.T(), pendingTriggerTunnels, 1, "expected 1 pending trigger tunnel to be retrieved") +} + +func TestGetSetPendingTriggerTunnels(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Create a new tunnel instance + tunnel := types.Tunnel{ID: 1} + + // Set the pending trigger tunnels in the keeper + k.SetPendingTriggerTunnels(ctx, []uint64{tunnel.ID}) + + // Attempt to retrieve the pending trigger tunnels + pendingTriggerTunnels := k.GetPendingTriggerTunnels(ctx) + + // Assert the number of pending trigger tunnels is 1 + require.Len(s.T(), pendingTriggerTunnels, 1, "expected 1 pending trigger tunnel to be retrieved") +} + func TestGetRequiredProcessTunnels(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index cabb4d3fc..77c1b51d2 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,9 +2,10 @@ package types // events const ( - EventTypeUpdateParams = "update_params" - EventTypeCreateTunnel = "create_tunnel" - EventTypeActivateTunnel = "activate_tunnel" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeActivateTunnel = "activate_tunnel" + EventTypeManualTriggerTunnel = "manual_trigger_tunnel" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 86cc05b1e..fea6d3b09 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -30,6 +30,8 @@ var ( TunnelCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TunnelCount")...) + PendingTriggerTunnelsStoreKey = append(GlobalStoreKeyPrefix, []byte("PendingTriggerTunnels")...) + TunnelStoreKeyPrefix = []byte{0x01} PacketStoreKeyPrefix = []byte{0x02} diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 85754ee0d..506368986 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -12,8 +12,8 @@ import ( ) var ( - _, _ sdk.Msg = &MsgUpdateParams{}, &MsgCreateTunnel{} - _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} + _, _, _, _ sdk.Msg = &MsgUpdateParams{}, &MsgCreateTunnel{}, &MsgActivateTunnel{}, &MsgManualTriggerTunnel{} + _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) // NewMsgUpdateParams creates a new MsgUpdateParams instance. @@ -232,3 +232,35 @@ func (m MsgActivateTunnel) ValidateBasic() error { return nil } + +func NewMsgManualTriggerTunnel( + id uint64, + creator string, +) *MsgActivateTunnel { + return &MsgActivateTunnel{ + TunnelID: id, + Creator: creator, + } +} + +// Route Implements Msg. +func (m MsgManualTriggerTunnel) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgManualTriggerTunnel) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgManualTriggerTunnel) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgManualTriggerTunnel) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) + } + + return nil +} diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index bc500513d..c15054a71 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -29,3 +29,13 @@ func (t *Tunnel) SetRoute(route Route) error { return nil } + +// IsTunnelInList checks if a tunnel with the given ID is in the list of tunnels. +func IsTunnelInList(id uint64, tunnels []Tunnel) bool { + for _, tunnel := range tunnels { + if tunnel.ID == id { + return true + } + } + return false +} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 3db27bfb8..e830e13de 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -31,6 +31,7 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Route is the type for a route type TSSRoute struct { DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` @@ -83,6 +84,7 @@ func (m *TSSRoute) GetDestinationContractAddress() string { return "" } +// AxelarRoute is the type for an Axelar route type AxelarRoute struct { DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` @@ -135,6 +137,7 @@ func (m *AxelarRoute) GetDestinationContractAddress() string { return "" } +// SignalInfo is the type for a signal info type SignalInfo struct { SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` @@ -195,6 +198,7 @@ func (m *SignalInfo) GetInterval() uint64 { return 0 } +// SignalPriceInfo is the type for a signal price info type SignalPriceInfo struct { SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` @@ -271,6 +275,7 @@ func (m *SignalPriceInfo) GetLastTimestamp() *time.Time { return nil } +// Tunnel is the type for a tunnel type Tunnel struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` @@ -387,6 +392,52 @@ func (m *Tunnel) GetCreator() string { return "" } +type PendingTriggerTunnels struct { + // IDs is a list of tunnel IDs that are waiting to be triggered + IDs []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` +} + +func (m *PendingTriggerTunnels) Reset() { *m = PendingTriggerTunnels{} } +func (m *PendingTriggerTunnels) String() string { return proto.CompactTextString(m) } +func (*PendingTriggerTunnels) ProtoMessage() {} +func (*PendingTriggerTunnels) Descriptor() ([]byte, []int) { + return fileDescriptor_b5270a56045f1d8a, []int{5} +} +func (m *PendingTriggerTunnels) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PendingTriggerTunnels) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PendingTriggerTunnels.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 *PendingTriggerTunnels) XXX_Merge(src proto.Message) { + xxx_messageInfo_PendingTriggerTunnels.Merge(m, src) +} +func (m *PendingTriggerTunnels) XXX_Size() int { + return m.Size() +} +func (m *PendingTriggerTunnels) XXX_DiscardUnknown() { + xxx_messageInfo_PendingTriggerTunnels.DiscardUnknown(m) +} + +var xxx_messageInfo_PendingTriggerTunnels proto.InternalMessageInfo + +func (m *PendingTriggerTunnels) GetIDs() []uint64 { + if m != nil { + return m.IDs + } + return nil +} + +// TSSPacket is the packet type for TSS type TSSPacket struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` @@ -402,7 +453,7 @@ func (m *TSSPacket) Reset() { *m = TSSPacket{} } func (m *TSSPacket) String() string { return proto.CompactTextString(m) } func (*TSSPacket) ProtoMessage() {} func (*TSSPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{5} + return fileDescriptor_b5270a56045f1d8a, []int{6} } func (m *TSSPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -487,6 +538,7 @@ func (m *TSSPacket) GetCreatedAt() time.Time { return time.Time{} } +// AxelarPacket is the packet type for Axelar type AxelarPacket struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` @@ -502,7 +554,7 @@ func (m *AxelarPacket) Reset() { *m = AxelarPacket{} } func (m *AxelarPacket) String() string { return proto.CompactTextString(m) } func (*AxelarPacket) ProtoMessage() {} func (*AxelarPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{6} + return fileDescriptor_b5270a56045f1d8a, []int{7} } func (m *AxelarPacket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -593,6 +645,7 @@ func init() { proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") proto.RegisterType((*SignalPriceInfo)(nil), "tunnel.v1beta1.SignalPriceInfo") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") + proto.RegisterType((*PendingTriggerTunnels)(nil), "tunnel.v1beta1.PendingTriggerTunnels") proto.RegisterType((*TSSPacket)(nil), "tunnel.v1beta1.TSSPacket") proto.RegisterType((*AxelarPacket)(nil), "tunnel.v1beta1.AxelarPacket") } @@ -600,63 +653,65 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 884 bytes of a gzipped FileDesc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0xbd, 0x93, 0x82, 0x88, 0xf3, 0x59, 0xea, 0x67, - 0xec, 0x22, 0x48, 0x11, 0xcd, 0xd5, 0x83, 0x67, 0x6c, 0x12, 0xa8, 0x05, 0x1a, 0xcc, 0x7b, 0xc1, - 0x33, 0xe5, 0x17, 0x9c, 0x07, 0xb2, 0x26, 0xee, 0xaf, 0xa3, 0x23, 0xc7, 0x5c, 0x3f, 0xcc, 0xff, - 0x76, 0xfb, 0x36, 0xfe, 0xf3, 0xed, 0xbb, 0x7b, 0xdb, 0xf6, 0xbd, 0x21, 0x28, 0xfb, 0x1f, 0x09, - 0xca, 0x88, 0xe3, 0x6a, 0x07, 0xb4, 0xf4, 0x8f, 0xcc, 0x1d, 0xd4, 0xc7, 0xbb, 0xa0, 0x45, 0xd2, - 0x2c, 0xf9, 0x62, 0x86, 0x67, 0xf8, 0x5a, 0x21, 0x7b, 0xd5, 0xd2, 0x03, 0xc3, 0xf0, 0xf4, 0x53, - 0xe9, 0x1e, 0x0e, 0x22, 0x40, 0xd2, 0x4c, 0x9f, 0xef, 0x6a, 0x97, 0xc3, 0x4f, 0xbe, 0xab, 0xba, - 0xd6, 0x8b, 0xaa, 0x6b, 0xbd, 0xac, 0xba, 0xd6, 0xcf, 0x55, 0xd7, 0xba, 0xbc, 0xea, 0x6e, 0xbd, - 0xbc, 0xea, 0x6e, 0xfd, 0x78, 0xd5, 0xdd, 0xfa, 0x2c, 0x78, 0x85, 0x09, 0x31, 0x7f, 0xf2, 0xd4, - 0x80, 0xa4, 0x0d, 0xc5, 0x78, 0xef, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x41, 0x32, 0xfb, 0x43, - 0xfb, 0x09, 0x00, 0x00, + // 917 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x3f, 0x8f, 0xe3, 0x44, + 0x14, 0x5f, 0x6f, 0x9c, 0xac, 0x3d, 0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 0x62, 0x3e, 0x2a, + 0xd7, 0xae, 0x3d, 0x52, 0xde, 0x70, 0xf0, 0xdb, 0xda, 0x3d, 0xcd, 0x31, 0x3f, 0x5f, 0x4c, 0xbc, + 0x94, 0x5e, 0xf8, 0x93, 0x84, 0x64, 0xb2, 0x49, 0x29, 0x9d, 0xf9, 0x72, 0xe9, 0xfa, 0xcb, 0x9e, + 0xff, 0x54, 0xfa, 0x39, 0x63, 0xbe, 0xa8, 0x89, 0x79, 0xdb, 0xe8, 0xc8, 0xd6, 0xd7, 0x87, 0xd9, + 0xdf, 0x6e, 0xec, 0xda, 0x7f, 0xbe, 0xb1, 0x0f, 0x6e, 0xdb, 0xd8, 0x37, 0x44, 0x68, 0xfd, 0x23, + 0x11, 0x6a, 0x41, 0x5d, 0x55, 0x40, 0x43, 0xfd, 0x30, 0xbd, 0x86, 0xfa, 0x78, 0x17, 0x34, 0xf0, + 0x24, 0x8d, 0xbf, 0x58, 0xa0, 0x05, 0xba, 0x56, 0xc8, 0x61, 0xb9, 0x76, 0x41, 0x18, 0x9c, 0x7d, + 0x2a, 0xdc, 0xe1, 0x20, 0x02, 0x78, 0x92, 0xaa, 0xf3, 0xeb, 0xda, 0xe5, 0xe0, 0x93, 0xef, 0xca, + 0xb6, 0xf1, 0xbc, 0x6c, 0x1b, 0x2f, 0xca, 0xb6, 0xf1, 0x73, 0xd9, 0x36, 0x2e, 0xaf, 0xda, 0x7b, + 0x2f, 0xae, 0xda, 0x7b, 0x3f, 0x5e, 0xb5, 0xf7, 0x3e, 0xf3, 0x5f, 0x62, 0x42, 0xf4, 0x1f, 0x43, + 0x39, 0x20, 0x93, 0x9a, 0x64, 0xbc, 0xf7, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x59, 0x00, + 0xeb, 0x2f, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -839,6 +894,35 @@ func (this *Tunnel) Equal(that interface{}) bool { } return true } +func (this *PendingTriggerTunnels) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*PendingTriggerTunnels) + if !ok { + that2, ok := that.(PendingTriggerTunnels) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.IDs) != len(that1.IDs) { + return false + } + for i := range this.IDs { + if this.IDs[i] != that1.IDs[i] { + return false + } + } + return true +} func (this *TSSPacket) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1209,6 +1293,47 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PendingTriggerTunnels) 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 *PendingTriggerTunnels) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PendingTriggerTunnels) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.IDs) > 0 { + dAtA5 := make([]byte, len(m.IDs)*10) + var j4 int + for _, num := range m.IDs { + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintTunnel(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *TSSPacket) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1229,12 +1354,12 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) - if err4 != nil { - return 0, err4 + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) + if err6 != nil { + return 0, err6 } - i -= n4 - i = encodeVarintTunnel(dAtA, i, uint64(n4)) + i -= n6 + i = encodeVarintTunnel(dAtA, i, uint64(n6)) i-- dAtA[i] = 0x42 if len(m.DestinationContractAddress) > 0 { @@ -1308,12 +1433,12 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) - if err5 != nil { - return 0, err5 + n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) + if err7 != nil { + return 0, err7 } - i -= n5 - i = encodeVarintTunnel(dAtA, i, uint64(n5)) + i -= n7 + i = encodeVarintTunnel(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x42 if len(m.DestinationContractAddress) > 0 { @@ -1501,6 +1626,22 @@ func (m *Tunnel) Size() (n int) { return n } +func (m *PendingTriggerTunnels) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.IDs) > 0 { + l = 0 + for _, e := range m.IDs { + l += sovTunnel(uint64(e)) + } + n += 1 + sovTunnel(uint64(l)) + l + } + return n +} + func (m *TSSPacket) Size() (n int) { if m == nil { return 0 @@ -2417,6 +2558,132 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } return nil } +func (m *PendingTriggerTunnels) 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 ErrIntOverflowTunnel + } + 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: PendingTriggerTunnels: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PendingTriggerTunnels: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IDs = append(m.IDs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.IDs) == 0 { + m.IDs = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IDs = append(m.IDs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field IDs", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTunnel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTunnel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *TSSPacket) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index d7bcfbf37..9de417667 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -254,6 +254,98 @@ func (m *MsgActivateTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgActivateTunnelResponse proto.InternalMessageInfo +// MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. +type MsgManualTriggerTunnel struct { + // tunnel_id is the ID of the tunnel to manually trigger. + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *MsgManualTriggerTunnel) Reset() { *m = MsgManualTriggerTunnel{} } +func (m *MsgManualTriggerTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgManualTriggerTunnel) ProtoMessage() {} +func (*MsgManualTriggerTunnel) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{4} +} +func (m *MsgManualTriggerTunnel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgManualTriggerTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgManualTriggerTunnel.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 *MsgManualTriggerTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgManualTriggerTunnel.Merge(m, src) +} +func (m *MsgManualTriggerTunnel) XXX_Size() int { + return m.Size() +} +func (m *MsgManualTriggerTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgManualTriggerTunnel.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgManualTriggerTunnel proto.InternalMessageInfo + +func (m *MsgManualTriggerTunnel) GetID() uint64 { + if m != nil { + return m.ID + } + return 0 +} + +func (m *MsgManualTriggerTunnel) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +// MsgManualTriggerTunnelResponse is the response type for the Msg/ManualTrigger RPC method. +type MsgManualTriggerTunnelResponse struct { +} + +func (m *MsgManualTriggerTunnelResponse) Reset() { *m = MsgManualTriggerTunnelResponse{} } +func (m *MsgManualTriggerTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgManualTriggerTunnelResponse) ProtoMessage() {} +func (*MsgManualTriggerTunnelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{5} +} +func (m *MsgManualTriggerTunnelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgManualTriggerTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgManualTriggerTunnelResponse.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 *MsgManualTriggerTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgManualTriggerTunnelResponse.Merge(m, src) +} +func (m *MsgManualTriggerTunnelResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgManualTriggerTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgManualTriggerTunnelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgManualTriggerTunnelResponse proto.InternalMessageInfo + // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { // authority is the address of the governance account. @@ -266,7 +358,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{4} + return fileDescriptor_747f2bf21e50fad9, []int{6} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -317,7 +409,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{5} + return fileDescriptor_747f2bf21e50fad9, []int{7} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -351,6 +443,8 @@ func init() { proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") proto.RegisterType((*MsgActivateTunnel)(nil), "tunnel.v1beta1.MsgActivateTunnel") proto.RegisterType((*MsgActivateTunnelResponse)(nil), "tunnel.v1beta1.MsgActivateTunnelResponse") + proto.RegisterType((*MsgManualTriggerTunnel)(nil), "tunnel.v1beta1.MsgManualTriggerTunnel") + proto.RegisterType((*MsgManualTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgManualTriggerTunnelResponse") proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") } @@ -358,50 +452,54 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 678 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x3d, 0x4f, 0xdb, 0x40, - 0x18, 0x8e, 0x09, 0x5f, 0x39, 0x22, 0x2a, 0x2c, 0x44, 0x9c, 0x20, 0x39, 0x69, 0x16, 0x02, 0x12, - 0xbe, 0x92, 0xd2, 0x0e, 0xdd, 0x08, 0xa8, 0x52, 0x06, 0xa4, 0xca, 0x50, 0x09, 0x75, 0x68, 0xe4, - 0xd8, 0x17, 0x73, 0x6a, 0x72, 0x67, 0xf9, 0x2e, 0x11, 0x59, 0xbb, 0x54, 0xea, 0xd4, 0xb5, 0x43, - 0xff, 0x00, 0x13, 0x03, 0x3f, 0x02, 0x75, 0x42, 0x9d, 0x3a, 0xd1, 0x2a, 0x19, 0xf8, 0x1b, 0x95, - 0xef, 0xce, 0xf9, 0x70, 0xd3, 0xc2, 0x92, 0xdc, 0xbd, 0xcf, 0xf3, 0xbe, 0xf7, 0xbc, 0x5f, 0x06, - 0x39, 0xde, 0x25, 0x04, 0xb5, 0x61, 0x6f, 0xaf, 0x89, 0xb8, 0xb3, 0x07, 0xf9, 0x85, 0x15, 0x84, - 0x94, 0x53, 0x7d, 0x55, 0x02, 0x96, 0x02, 0x0a, 0x79, 0x9f, 0x52, 0xbf, 0x8d, 0xa0, 0x40, 0x9b, - 0xdd, 0x16, 0x74, 0x48, 0x5f, 0x52, 0x0b, 0xeb, 0x3e, 0xf5, 0xa9, 0x38, 0xc2, 0xe8, 0xa4, 0xac, - 0x9b, 0x89, 0xc8, 0x81, 0x13, 0x3a, 0x1d, 0xa6, 0xc0, 0xbc, 0x4b, 0x59, 0x87, 0xb2, 0x86, 0xf4, - 0x92, 0x17, 0x05, 0x99, 0xf2, 0x06, 0x9b, 0x0e, 0x43, 0x23, 0x67, 0x97, 0x62, 0xa2, 0xf0, 0x9c, - 0xc2, 0x3b, 0xcc, 0x87, 0xbd, 0xbd, 0xe8, 0x4f, 0x01, 0x6b, 0x4e, 0x07, 0x13, 0x0a, 0xc5, 0xef, - 0x3f, 0x34, 0xa8, 0x9c, 0x94, 0x86, 0x16, 0x42, 0x1e, 0x1b, 0x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33, 0x90, 0x9d, 0x5a, 0xac, 0x62, 0x52, 0x43, 0xa2, 0xe1, - 0x85, 0xad, 0x07, 0x08, 0xa3, 0x89, 0x78, 0x0f, 0x56, 0x13, 0x2d, 0x7e, 0x3a, 0xc3, 0x75, 0x9a, - 0x52, 0xd8, 0x7e, 0x90, 0x32, 0x8a, 0x7f, 0x06, 0xb2, 0x53, 0x5d, 0x98, 0xa5, 0x7c, 0x92, 0x30, - 0x53, 0xf9, 0xac, 0xda, 0xd4, 0xea, 0x37, 0x03, 0x53, 0xbb, 0x1d, 0x98, 0xda, 0xef, 0x81, 0xa9, - 0x7d, 0x19, 0x9a, 0xa9, 0xdb, 0xa1, 0x99, 0xfa, 0x39, 0x34, 0x53, 0xef, 0xe0, 0xc4, 0x42, 0x36, - 0x1d, 0xe2, 0x89, 0x2f, 0x85, 0x4b, 0xdb, 0xd0, 0x3d, 0x77, 0x30, 0x81, 0xbd, 0x2a, 0xbc, 0x50, - 0x9f, 0x35, 0xb9, 0x9d, 0xcd, 0x45, 0xc1, 0x78, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0x05, 0xe9, - 0xcb, 0x14, 0xda, 0x05, 0x00, 0x00, + // 749 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x3f, 0x6f, 0xd3, 0x40, + 0x14, 0x8f, 0x93, 0xfe, 0xcb, 0x35, 0x2a, 0xaa, 0xa9, 0x12, 0x27, 0x95, 0x9c, 0x90, 0x81, 0xa6, + 0x95, 0x6a, 0xd3, 0x50, 0x18, 0xd8, 0x9a, 0x56, 0x48, 0x19, 0x22, 0x21, 0xb7, 0x48, 0x15, 0x03, + 0x91, 0x13, 0x5f, 0xdc, 0x13, 0xc9, 0x5d, 0xe4, 0xbb, 0x44, 0xcd, 0xca, 0x02, 0x62, 0x40, 0x7c, + 0x01, 0xbe, 0x40, 0xa7, 0x0e, 0xfd, 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0xd5, 0xa0, 0xae, 0x7a, 0x0c, 0x32, 0x33, 0xb3, + 0xa0, 0x18, 0xd5, 0x10, 0xa9, 0xd1, 0xc2, 0xc6, 0x1d, 0x84, 0xb0, 0x88, 0xdf, 0x82, 0x95, 0x48, + 0x55, 0x3e, 0x8a, 0x31, 0x9d, 0xa5, 0x14, 0x36, 0xef, 0xa4, 0x84, 0xfe, 0x7b, 0xe0, 0x61, 0x5c, + 0xe1, 0x3c, 0x8e, 0xf1, 0x10, 0xc3, 0x2b, 0x18, 0xf7, 0xe3, 0x85, 0xd7, 0x1d, 0x83, 0xcc, 0xcc, + 0xa3, 0xc7, 0x25, 0x6a, 0x9a, 0x10, 0x9b, 0xa8, 0xb8, 0xa7, 0xa8, 0xd5, 0x2f, 0xc7, 0xba, 0x72, + 0x35, 0xd6, 0x95, 0x5f, 0x63, 0x5d, 0xf9, 0x72, 0xa3, 0x27, 0xae, 0x6e, 0xf4, 0xc4, 0x8f, 0x1b, + 0x3d, 0xf1, 0xc6, 0x9c, 0x1a, 0x59, 0x2d, 0x1b, 0x3b, 0x7c, 0x96, 0xb6, 0x49, 0xd7, 0x6c, 0x9f, + 0xd8, 0x08, 0x9b, 0xc3, 0xaa, 0x79, 0x2a, 0x07, 0xbf, 0x98, 0x5f, 0xad, 0x05, 0xce, 0x78, 0xfa, + 0x3b, 0x00, 0x00, 0xff, 0xff, 0x66, 0x2d, 0x88, 0x90, 0xfc, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -420,6 +518,8 @@ type MsgClient interface { CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) // ActivateTunnel is a RPC method to activate a tunnel. ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, opts ...grpc.CallOption) (*MsgActivateTunnelResponse, error) + // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. + ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -450,6 +550,15 @@ func (c *msgClient) ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, o return out, nil } +func (c *msgClient) ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) { + out := new(MsgManualTriggerTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/ManualTriggerTunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/UpdateParams", in, out, opts...) @@ -465,6 +574,8 @@ type MsgServer interface { CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) // ActivateTunnel is a RPC method to activate a tunnel. ActivateTunnel(context.Context, *MsgActivateTunnel) (*MsgActivateTunnelResponse, error) + // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. + ManualTriggerTunnel(context.Context, *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } @@ -479,6 +590,9 @@ func (*UnimplementedMsgServer) CreateTunnel(ctx context.Context, req *MsgCreateT func (*UnimplementedMsgServer) ActivateTunnel(ctx context.Context, req *MsgActivateTunnel) (*MsgActivateTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ActivateTunnel not implemented") } +func (*UnimplementedMsgServer) ManualTriggerTunnel(ctx context.Context, req *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ManualTriggerTunnel not implemented") +} func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } @@ -523,6 +637,24 @@ func _Msg_ActivateTunnel_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_ManualTriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgManualTriggerTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ManualTriggerTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Msg/ManualTriggerTunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ManualTriggerTunnel(ctx, req.(*MsgManualTriggerTunnel)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -553,6 +685,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ActivateTunnel", Handler: _Msg_ActivateTunnel_Handler, }, + { + MethodName: "ManualTriggerTunnel", + Handler: _Msg_ManualTriggerTunnel_Handler, + }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, @@ -723,6 +859,64 @@ func (m *MsgActivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *MsgManualTriggerTunnel) 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 *MsgManualTriggerTunnel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgManualTriggerTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x12 + } + if m.ID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgManualTriggerTunnelResponse) 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 *MsgManualTriggerTunnelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgManualTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -866,6 +1060,31 @@ func (m *MsgActivateTunnelResponse) Size() (n int) { return n } +func (m *MsgManualTriggerTunnel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ID != 0 { + n += 1 + sovTx(uint64(m.ID)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgManualTriggerTunnelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgUpdateParams) Size() (n int) { if m == nil { return 0 @@ -1321,6 +1540,157 @@ func (m *MsgActivateTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgManualTriggerTunnel) 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: MsgManualTriggerTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgManualTriggerTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + m.ID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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 *MsgManualTriggerTunnelResponse) 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: MsgManualTriggerTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgManualTriggerTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 3f0cf9870633ac0c206e9d8ffc876de8266e7bcb Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 5 Aug 2024 14:41:26 +0700 Subject: [PATCH 033/272] cleanup --- x/tunnel/genesis.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 664be9050..8b683cd4c 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -10,10 +10,6 @@ import ( // ValidateGenesis validates the provided genesis state. func ValidateGenesis(data *types.GenesisState) error { - if err := data.Params.Validate(); err != nil { - return errorsmod.Wrap(err, "tunnel params") - } - // Validate the tunnel count if uint64(len(data.Tunnels)) != data.TunnelCount { return errorsmod.Wrapf( @@ -36,7 +32,7 @@ func ValidateGenesis(data *types.GenesisState) error { } } - return nil + return data.Params.Validate() } // InitGenesis initializes the module's state from a provided genesis state. From ee3656b8a5a1461d6c0338f6e0e1e196997629e2 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 5 Aug 2024 15:25:22 +0700 Subject: [PATCH 034/272] typo --- proto/tunnel/v1beta1/tunnel.proto | 10 +-- x/tunnel/types/tunnel.pb.go | 116 +++++++++++++++--------------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index d6984f195..17d3e44a1 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -40,11 +40,11 @@ message SignalInfo { message SignalPriceInfo { option (gogoproto.equal) = true; - string signal_id = 1 [(gogoproto.customname) = "SignalID"]; - uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; - uint64 interval = 3; - uint64 price = 4; - google.protobuf.Timestamp LastTimestamp = 5 [(gogoproto.stdtime) = true]; + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; + uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; + uint64 interval = 3; + uint64 price = 4; + google.protobuf.Timestamp last_timestamp = 5 [(gogoproto.stdtime) = true]; } // Tunnel is the type for a tunnel diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index e830e13de..5eb51d436 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -204,7 +204,7 @@ type SignalPriceInfo struct { DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` - LastTimestamp *time.Time `protobuf:"bytes,5,opt,name=LastTimestamp,proto3,stdtime" json:"LastTimestamp,omitempty"` + LastTimestamp *time.Time `protobuf:"bytes,5,opt,name=last_timestamp,json=lastTimestamp,proto3,stdtime" json:"last_timestamp,omitempty"` } func (m *SignalPriceInfo) Reset() { *m = SignalPriceInfo{} } @@ -655,63 +655,63 @@ func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b var fileDescriptor_b5270a56045f1d8a = []byte{ // 917 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x3f, 0x8f, 0xe3, 0x44, - 0x14, 0x5f, 0x6f, 0x9c, 0xac, 0x3d, 0xc9, 0x2d, 0xa7, 0x51, 0x38, 0x7c, 0x59, 0x14, 0x47, 0x5b, - 0x85, 0xe2, 0x6c, 0x2e, 0xb0, 0xcd, 0x4a, 0x48, 0xc4, 0x1b, 0x9d, 0xce, 0x02, 0xa4, 0xe0, 0xa4, - 0xa2, 0xb1, 0x1c, 0x7b, 0xe2, 0x1d, 0x2e, 0x3b, 0x13, 0x3c, 0x93, 0xe8, 0xf2, 0x2d, 0xb6, 0xa1, - 0xa1, 0x02, 0x89, 0x82, 0x0f, 0x70, 0x1f, 0xe2, 0x44, 0x75, 0xa2, 0xa2, 0x0a, 0xc8, 0xdb, 0xd0, - 0xd3, 0x51, 0xa1, 0xf9, 0x93, 0x2c, 0x59, 0x40, 0x7b, 0x02, 0x24, 0x4e, 0xd7, 0xcd, 0x7b, 0xbf, - 0xdf, 0x1b, 0xbf, 0x37, 0xef, 0xf7, 0x5e, 0x02, 0x8e, 0xf8, 0x82, 0x10, 0x34, 0xf3, 0x97, 0x0f, - 0x27, 0x88, 0x27, 0x0f, 0x7d, 0x65, 0x7a, 0xf3, 0x82, 0x72, 0x0a, 0x0f, 0xb5, 0xa5, 0xc1, 0x56, - 0x33, 0xa7, 0x39, 0x95, 0x90, 0x2f, 0x4e, 0x8a, 0xd5, 0x72, 0x73, 0x4a, 0xf3, 0x19, 0xf2, 0xa5, - 0x35, 0x59, 0x4c, 0x7d, 0x8e, 0x2f, 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 0x84, + 0x84, 0x6c, 0xb6, 0x50, 0x4a, 0xd9, 0x39, 0x65, 0xb1, 0xba, 0x54, 0x19, 0x5b, 0x68, 0x8e, 0x50, + 0xc6, 0x76, 0x89, 0x49, 0x4b, 0x41, 0x47, 0x5f, 0x1b, 0xc0, 0x9a, 0x4e, 0x26, 0x11, 0x5d, 0x71, + 0x04, 0x1f, 0x83, 0x76, 0x86, 0x18, 0xc7, 0x24, 0xe1, 0x98, 0x92, 0x38, 0x3d, 0x4b, 0x30, 0x89, + 0x71, 0xe6, 0x18, 0x3d, 0xa3, 0x6f, 0x07, 0xf7, 0xaa, 0xd2, 0x85, 0xa3, 0x2b, 0xfc, 0x54, 0xc0, + 0xe1, 0x28, 0x82, 0xd9, 0x4d, 0x5f, 0x06, 0xdf, 0x07, 0x6f, 0x5e, 0xbb, 0x89, 0x12, 0x5e, 0x24, + 0x29, 0x8f, 0x93, 0x2c, 0x2b, 0x10, 0x63, 0xce, 0xbe, 0xb8, 0x31, 0xea, 0xfc, 0x3e, 0x52, 0x53, + 0x86, 0x8a, 0x71, 0x62, 0x7f, 0xf7, 0xec, 0x61, 0x5d, 0xa6, 0x75, 0xf4, 0x8d, 0x01, 0x9a, 0xc3, + 0xa7, 0x68, 0x91, 0x14, 0xff, 0xeb, 0x34, 0x2f, 0x0c, 0x00, 0x26, 0x38, 0x27, 0xc9, 0x22, 0x24, + 0x73, 0x0a, 0xdf, 0x02, 0x36, 0x93, 0xd6, 0x55, 0x6a, 0xad, 0xaa, 0x74, 0x2d, 0x4d, 0x19, 0x45, + 0x96, 0x82, 0xc3, 0x0c, 0x1e, 0x83, 0x3b, 0x19, 0x5a, 0x63, 0x95, 0xc4, 0x6c, 0xa9, 0xbe, 0x6b, + 0x06, 0x77, 0xab, 0xd2, 0x6d, 0x8d, 0xb6, 0x40, 0x30, 0x9e, 0x44, 0xad, 0x1d, 0x2d, 0x58, 0x32, + 0xd8, 0x01, 0x16, 0x26, 0x1c, 0x15, 0xeb, 0x64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 0xbb, 0x7b, 0x9f, 0xfa, 0x2f, 0x31, 0x21, 0xfa, 0x9f, + 0xa1, 0x1c, 0x90, 0x59, 0x43, 0x32, 0xde, 0xf9, 0x2d, 0x00, 0x00, 0xff, 0xff, 0x43, 0x72, 0x9e, + 0x64, 0x30, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { From 54d3eec49be540d4ee8d7d9a566aa7387d7849b3 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 6 Aug 2024 13:38:38 +0700 Subject: [PATCH 035/272] update logic --- x/tunnel/keeper/tunnel.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 72e4aae51..c3a8794c3 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -152,16 +152,18 @@ func (k Keeper) GetRequiredProcessTunnels( var trigger bool for j, sp := range at.SignalPriceInfos { latestPrice, exists := latestPricesMap[sp.SignalID] - if exists { - deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) - deviationInBPS := uint64(deviation * 10000) - - if deviationInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp.Unix()+int64(sp.Interval) { - // Update the price directly - activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price - activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now - trigger = true - } + if !exists { + continue + } + + deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) + deviationInBPS := uint64(deviation * 10000) + + if deviationInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp.Unix()+int64(sp.Interval) { + // Update the price directly + activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price + activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now + trigger = true } } From 6dbbd3974f19acd7218e83367db70c330b39f999 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 6 Aug 2024 17:51:46 +0700 Subject: [PATCH 036/272] update codec --- x/tunnel/types/codec.go | 19 ++++++++++++++----- x/tunnel/types/msgs.go | 8 ++++---- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 54ef83d9e..a59cd6f1b 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -3,7 +3,7 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" - "github.com/cosmos/cosmos-sdk/codec/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -24,7 +24,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the x/tunnel interfaces types with the interface registry -func RegisterInterfaces(registry types.InterfaceRegistry) { +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, @@ -50,12 +50,21 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { } var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/tunnel module codec. Note, the codec + // should ONLY be used in certain instances of tests and for JSON encoding. + // + // The actual codec used for serialization should be provided to x/tunnel and + // defined at the application level. + ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) + + // AminoCdc is a amino codec created to support amino json compatible msgs. + AminoCdc = codec.NewAminoCodec(amino) ) func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) - sdk.RegisterLegacyAminoCodec(amino) + amino.Seal() } diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 506368986..61957a24d 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -35,7 +35,7 @@ func (m MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. @@ -141,7 +141,7 @@ func (m MsgCreateTunnel) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. func (m MsgCreateTunnel) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. @@ -216,7 +216,7 @@ func (m MsgActivateTunnel) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. func (m MsgActivateTunnel) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. @@ -248,7 +248,7 @@ func (m MsgManualTriggerTunnel) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. func (m MsgManualTriggerTunnel) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. From 81c507da5331f3b444b6f190eca2b6647f280620 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 9 Aug 2024 18:05:06 +0700 Subject: [PATCH 037/272] remove unused keeper --- x/tunnel/testutil/mock_expected_keepers.go | 40 ---------------------- x/tunnel/testutil/mock_keeper.go | 1 - x/tunnel/types/expected_keepers.go | 8 +---- 3 files changed, 1 insertion(+), 48 deletions(-) diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go index 0d25cae78..54ca0c7db 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -57,34 +57,6 @@ func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) } -// GetModuleAccount mocks base method. -func (m *MockAccountKeeper) GetModuleAccount(ctx types2.Context, moduleName string) types3.ModuleAccountI { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) - ret0, _ := ret[0].(types3.ModuleAccountI) - return ret0 -} - -// GetModuleAccount indicates an expected call of GetModuleAccount. -func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName) -} - -// GetModuleAddress mocks base method. -func (m *MockAccountKeeper) GetModuleAddress(name string) types2.AccAddress { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetModuleAddress", name) - ret0, _ := ret[0].(types2.AccAddress) - return ret0 -} - -// GetModuleAddress indicates an expected call of GetModuleAddress. -func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) -} - // IterateAccounts mocks base method. func (m *MockAccountKeeper) IterateAccounts(ctx types2.Context, process func(types3.AccountI) bool) { m.ctrl.T.Helper() @@ -123,18 +95,6 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, account any) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, account) } -// SetModuleAccount mocks base method. -func (m *MockAccountKeeper) SetModuleAccount(arg0 types2.Context, arg1 types3.ModuleAccountI) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "SetModuleAccount", arg0, arg1) -} - -// SetModuleAccount indicates an expected call of SetModuleAccount. -func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1) -} - // MockBankKeeper is a mock of BankKeeper interface. type MockBankKeeper struct { ctrl *gomock.Controller diff --git a/x/tunnel/testutil/mock_keeper.go b/x/tunnel/testutil/mock_keeper.go index eb6d92042..c9b75c835 100644 --- a/x/tunnel/testutil/mock_keeper.go +++ b/x/tunnel/testutil/mock_keeper.go @@ -47,7 +47,6 @@ func NewTestSuite(t *testing.T) TestSuite { bandtssKeeper := NewMockBandtssKeeper(ctrl) authority := authtypes.NewModuleAddress(govtypes.ModuleName) - accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authority).AnyTimes() tunnelKeeper := keeper.NewKeeper( encCfg.Codec.(codec.BinaryCodec), key, diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 352da9b24..659592f00 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -12,16 +12,10 @@ import ( // AccountKeeper defines the expected account keeper (noalias) type AccountKeeper interface { IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool)) - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation + GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI NewAccount(ctx sdk.Context, account authtypes.AccountI) authtypes.AccountI SetAccount(ctx sdk.Context, account authtypes.AccountI) - - GetModuleAddress(name string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI - - // TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 - SetModuleAccount(sdk.Context, authtypes.ModuleAccountI) } type BankKeeper interface { From 0e564d19e9cb93f026350a7ce28ebf271d407d9f Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 13 Aug 2024 14:34:05 +0700 Subject: [PATCH 038/272] change timestamp unit --- proto/tunnel/v1beta1/tunnel.proto | 12 +- x/tunnel/keeper/tunnel.go | 7 +- x/tunnel/keeper/tunnel_test.go | 10 +- x/tunnel/types/tunnel.pb.go | 235 +++++++++++++----------------- 4 files changed, 118 insertions(+), 146 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 17d3e44a1..a09f363df 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -33,18 +33,18 @@ message SignalInfo { string signal_id = 1 [(gogoproto.customname) = "SignalID"]; uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; - uint64 interval = 3; + int64 interval = 3; } // SignalPriceInfo is the type for a signal price info message SignalPriceInfo { option (gogoproto.equal) = true; - string signal_id = 1 [(gogoproto.customname) = "SignalID"]; - uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; - uint64 interval = 3; - uint64 price = 4; - google.protobuf.Timestamp last_timestamp = 5 [(gogoproto.stdtime) = true]; + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; + uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; + int64 interval = 3; + uint64 price = 4; + int64 last_timestamp = 5; } // Tunnel is the type for a tunnel diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index c3a8794c3..518e9c4b2 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -144,7 +144,6 @@ func (k Keeper) GetRequiredProcessTunnels( latestPricesMap[price.SignalID] = price } - now := ctx.BlockTime() unixNow := ctx.BlockTime().Unix() // Evaluate which tunnels require processing based on the price signals @@ -159,10 +158,10 @@ func (k Keeper) GetRequiredProcessTunnels( deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) deviationInBPS := uint64(deviation * 10000) - if deviationInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp.Unix()+int64(sp.Interval) { + if deviationInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp+sp.Interval { // Update the price directly activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price - activeTunnels[i].SignalPriceInfos[j].LastTimestamp = &now + activeTunnels[i].SignalPriceInfos[j].LastTimestamp = unixNow trigger = true } } @@ -181,7 +180,7 @@ func (k Keeper) GetRequiredProcessTunnels( latestPrice, exists := latestPricesMap[sp.SignalID] if exists { tunnel.SignalPriceInfos[i].Price = latestPrice.Price - tunnel.SignalPriceInfos[i].LastTimestamp = &now + tunnel.SignalPriceInfos[i].LastTimestamp = unixNow tunnels = append(tunnels, tunnel) } } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 033865385..7393ce5d4 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -143,8 +143,8 @@ func TestGetRequiredProcessTunnels(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper - now := ctx.BlockTime() - before := now.Add(-30 * time.Second) + now := ctx.BlockTime().Unix() + before := ctx.BlockTime().Add(-30 * time.Second).Unix() // Mock data for the test cases tunnels := []types.Tunnel{ @@ -156,7 +156,7 @@ func TestGetRequiredProcessTunnels(t *testing.T) { Price: 100, DeviationBPS: 1000, Interval: 30, - LastTimestamp: &now, + LastTimestamp: now, }, }, IsActive: true, @@ -164,14 +164,14 @@ func TestGetRequiredProcessTunnels(t *testing.T) { { ID: 2, SignalPriceInfos: []types.SignalPriceInfo{ - {SignalID: "signal2", Price: 100, DeviationBPS: 1000, Interval: 30, LastTimestamp: &now}, + {SignalID: "signal2", Price: 100, DeviationBPS: 1000, Interval: 30, LastTimestamp: now}, }, IsActive: true, }, { ID: 3, SignalPriceInfos: []types.SignalPriceInfo{ - {SignalID: "signal3", Price: 100, DeviationBPS: 1000, Interval: 30, LastTimestamp: &before}, + {SignalID: "signal3", Price: 100, DeviationBPS: 1000, Interval: 30, LastTimestamp: before}, }, IsActive: true, }, diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 5eb51d436..ede5a60fb 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -141,7 +141,7 @@ func (m *AxelarRoute) GetDestinationContractAddress() string { type SignalInfo struct { SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` - Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` + Interval int64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` } func (m *SignalInfo) Reset() { *m = SignalInfo{} } @@ -191,7 +191,7 @@ func (m *SignalInfo) GetDeviationBPS() uint64 { return 0 } -func (m *SignalInfo) GetInterval() uint64 { +func (m *SignalInfo) GetInterval() int64 { if m != nil { return m.Interval } @@ -200,11 +200,11 @@ func (m *SignalInfo) GetInterval() uint64 { // SignalPriceInfo is the type for a signal price info type SignalPriceInfo struct { - SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` - Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` - Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` - LastTimestamp *time.Time `protobuf:"bytes,5,opt,name=last_timestamp,json=lastTimestamp,proto3,stdtime" json:"last_timestamp,omitempty"` + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` + Interval int64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` + Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` + LastTimestamp int64 `protobuf:"varint,5,opt,name=last_timestamp,json=lastTimestamp,proto3" json:"last_timestamp,omitempty"` } func (m *SignalPriceInfo) Reset() { *m = SignalPriceInfo{} } @@ -254,7 +254,7 @@ func (m *SignalPriceInfo) GetDeviationBPS() uint64 { return 0 } -func (m *SignalPriceInfo) GetInterval() uint64 { +func (m *SignalPriceInfo) GetInterval() int64 { if m != nil { return m.Interval } @@ -268,11 +268,11 @@ func (m *SignalPriceInfo) GetPrice() uint64 { return 0 } -func (m *SignalPriceInfo) GetLastTimestamp() *time.Time { +func (m *SignalPriceInfo) GetLastTimestamp() int64 { if m != nil { return m.LastTimestamp } - return nil + return 0 } // Tunnel is the type for a tunnel @@ -653,65 +653,65 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 917 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x3f, 0x8f, 0xe3, 0x44, - 0x14, 0x5f, 0x6f, 0x9c, 0xac, 0x3d, 0xc9, 0x2d, 0xa7, 0x51, 0x38, 0x7c, 0x39, 0x14, 0x47, 0x5b, - 0x85, 0xe2, 0x6c, 0x2e, 0xb0, 0xcd, 0x4a, 0x48, 0xc4, 0x1b, 0xc1, 0x59, 0x08, 0x29, 0x38, 0xa9, - 0x68, 0x2c, 0xc7, 0x9e, 0x78, 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, 0xeb, 0xfa, 0xeb, - 0x81, 0xff, 0x54, 0xfa, 0x39, 0x63, 0xbe, 0xa8, 0x89, 0x79, 0xbb, 0xe8, 0xc8, 0xd6, 0xd7, 0x87, - 0xd9, 0x5f, 0xae, 0xec, 0xc6, 0xbf, 0xbe, 0xb2, 0x0f, 0x6e, 0x5b, 0xd9, 0x37, 0x44, 0x68, 0xfd, - 0x2d, 0x11, 0x6a, 0x41, 0x5d, 0xd6, 0x40, 0x4b, 0xfd, 0x32, 0xbd, 0x82, 0xfa, 0x78, 0x1b, 0xb4, - 0xf0, 0x2c, 0x8d, 0x3f, 0x5f, 0xa1, 0x15, 0xba, 0x52, 0xc8, 0x61, 0x55, 0xba, 0x20, 0x0c, 0x4e, - 0x3f, 0x11, 0xee, 0x70, 0x14, 0x01, 0x3c, 0x4b, 0xd5, 0xf9, 0x55, 0xed, 0x72, 0xf0, 0xf1, 0xb7, - 0x55, 0xd7, 0x78, 0x5e, 0x75, 0x8d, 0x17, 0x55, 0xd7, 0xf8, 0xa9, 0xea, 0x1a, 0x17, 0x97, 0xdd, - 0xbd, 0x17, 0x97, 0xdd, 0xbd, 0x1f, 0x2e, 0xbb, 0x7b, 0x9f, 0xfa, 0x2f, 0x31, 0x21, 0xfa, 0x9f, - 0xa1, 0x1c, 0x90, 0x59, 0x43, 0x32, 0xde, 0xf9, 0x2d, 0x00, 0x00, 0xff, 0xff, 0x43, 0x72, 0x9e, - 0x64, 0x30, 0x0a, 0x00, 0x00, + // 914 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0x9b, 0x34, 0xb5, 0xa7, 0xd9, 0xb2, 0x1a, 0x85, 0xc5, 0x9b, 0xa2, 0x38, 0xaa, 0x84, + 0x14, 0x0e, 0x6b, 0xb3, 0x81, 0x5e, 0x2a, 0x21, 0x11, 0x37, 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0x94, 0xb1, 0x79, 0xa0, 0xde, 0xd4, 0x60, 0xd5, 0x0f, 0x9e, 0x28, + 0xbf, 0xe0, 0x3c, 0x90, 0x3d, 0x71, 0x7f, 0x7b, 0x3b, 0x76, 0x4c, 0xfa, 0x08, 0xfd, 0xe5, 0x83, + 0xdc, 0xf8, 0xd7, 0x1f, 0xe4, 0xfd, 0x97, 0x3d, 0xc8, 0xb7, 0x48, 0x68, 0xff, 0x2d, 0x12, 0x1a, + 0x42, 0x5d, 0xd5, 0x40, 0x53, 0xff, 0xee, 0xbc, 0x86, 0xfc, 0x78, 0x0f, 0x34, 0xc9, 0x34, 0x4b, + 0xbe, 0x5c, 0xe2, 0x25, 0xbe, 0x66, 0xc8, 0x61, 0x55, 0x7a, 0x20, 0x0a, 0xcf, 0x3e, 0x93, 0xee, + 0x68, 0x18, 0x03, 0x32, 0xcd, 0xf4, 0xf9, 0x75, 0xdd, 0x72, 0xf8, 0xe9, 0xf7, 0x55, 0xc7, 0x7a, + 0x56, 0x75, 0xac, 0xe7, 0x55, 0xc7, 0xfa, 0xb9, 0xea, 0x58, 0x97, 0x57, 0x9d, 0x9d, 0xe7, 0x57, + 0x9d, 0x9d, 0x1f, 0xaf, 0x3a, 0x3b, 0x9f, 0x07, 0xaf, 0xa0, 0x10, 0xf3, 0xbf, 0x4f, 0x09, 0x64, + 0xda, 0x50, 0x88, 0xf7, 0x7f, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x36, 0x9e, 0xe1, 0x11, 0x0e, 0x0a, + 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -829,11 +829,7 @@ func (this *SignalPriceInfo) Equal(that interface{}) bool { if this.Price != that1.Price { return false } - if that1.LastTimestamp == nil { - if this.LastTimestamp != nil { - return false - } - } else if !this.LastTimestamp.Equal(*that1.LastTimestamp) { + if this.LastTimestamp != that1.LastTimestamp { return false } return true @@ -1157,15 +1153,10 @@ func (m *SignalPriceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.LastTimestamp != nil { - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.LastTimestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.LastTimestamp):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintTunnel(dAtA, i, uint64(n1)) + if m.LastTimestamp != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.LastTimestamp)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x28 } if m.Price != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.Price)) @@ -1219,12 +1210,12 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x52 } - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) - if err2 != nil { - return 0, err2 + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) + if err1 != nil { + return 0, err1 } - i -= n2 - i = encodeVarintTunnel(dAtA, i, uint64(n2)) + i -= n1 + i = encodeVarintTunnel(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x4a if m.IsActive { @@ -1314,20 +1305,20 @@ func (m *PendingTriggerTunnels) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.IDs) > 0 { - dAtA5 := make([]byte, len(m.IDs)*10) - var j4 int + dAtA4 := make([]byte, len(m.IDs)*10) + var j3 int for _, num := range m.IDs { for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j4++ + j3++ } - dAtA5[j4] = uint8(num) - j4++ + dAtA4[j3] = uint8(num) + j3++ } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintTunnel(dAtA, i, uint64(j4)) + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintTunnel(dAtA, i, uint64(j3)) i-- dAtA[i] = 0xa } @@ -1354,12 +1345,12 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) - if err6 != nil { - return 0, err6 + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) + if err5 != nil { + return 0, err5 } - i -= n6 - i = encodeVarintTunnel(dAtA, i, uint64(n6)) + i -= n5 + i = encodeVarintTunnel(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x42 if len(m.DestinationContractAddress) > 0 { @@ -1433,12 +1424,12 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) - if err7 != nil { - return 0, err7 + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) + if err6 != nil { + return 0, err6 } - i -= n7 - i = encodeVarintTunnel(dAtA, i, uint64(n7)) + i -= n6 + i = encodeVarintTunnel(dAtA, i, uint64(n6)) i-- dAtA[i] = 0x42 if len(m.DestinationContractAddress) > 0 { @@ -1575,9 +1566,8 @@ func (m *SignalPriceInfo) Size() (n int) { if m.Price != 0 { n += 1 + sovTunnel(uint64(m.Price)) } - if m.LastTimestamp != nil { - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.LastTimestamp) - n += 1 + l + sovTunnel(uint64(l)) + if m.LastTimestamp != 0 { + n += 1 + sovTunnel(uint64(m.LastTimestamp)) } return n } @@ -2044,7 +2034,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= uint64(b&0x7F) << shift + m.Interval |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2164,7 +2154,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= uint64(b&0x7F) << shift + m.Interval |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2189,10 +2179,10 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } } case 5: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LastTimestamp", wireType) } - var msglen int + m.LastTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2202,28 +2192,11 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.LastTimestamp |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastTimestamp == nil { - m.LastTimestamp = new(time.Time) - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.LastTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTunnel(dAtA[iNdEx:]) From a8fe9c58403270ef88b98759b8b9c8efe849a245 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 14 Aug 2024 10:44:36 +0700 Subject: [PATCH 039/272] add event --- x/tunnel/keeper/tunnel.go | 15 +++++++++++---- x/tunnel/types/events.go | 4 ++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 518e9c4b2..2ac4c3080 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -178,11 +178,18 @@ func (k Keeper) GetRequiredProcessTunnels( tunnel := k.MustGetTunnel(ctx, id) for i, sp := range tunnel.SignalPriceInfos { latestPrice, exists := latestPricesMap[sp.SignalID] - if exists { - tunnel.SignalPriceInfos[i].Price = latestPrice.Price - tunnel.SignalPriceInfos[i].LastTimestamp = unixNow - tunnels = append(tunnels, tunnel) + if !exists { + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeSignalIDNotFound, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeSignalID, sp.SignalID), + )) + continue } + + tunnel.SignalPriceInfos[i].Price = latestPrice.Price + tunnel.SignalPriceInfos[i].LastTimestamp = unixNow + tunnels = append(tunnels, tunnel) } } } diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 77c1b51d2..63e60885d 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -6,9 +6,12 @@ const ( EventTypeCreateTunnel = "create_tunnel" EventTypeActivateTunnel = "activate_tunnel" EventTypeManualTriggerTunnel = "manual_trigger_tunnel" + EventTypeSignalIDNotFound = "signal_id_not_found" + EventTypeSendPacketFail = "send_packet_fail" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" + AttributeSignalID = "signal_id" AttributeKeyRoute = "route" AttributeKeyFeedType = "feed_type" AttributeKeyFeePayer = "fee_payer" @@ -16,4 +19,5 @@ const ( AttributeKeyIsActive = "is_active" AttributeKeyCreatedAt = "created_at" AttributeKeyCreator = "creator" + AttributeKeyReason = "reason" ) From 1d0fe0581080536121d40f4969c7f8a620910733 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 14 Aug 2024 10:52:19 +0700 Subject: [PATCH 040/272] update unix time --- proto/tunnel/v1beta1/tunnel.proto | 42 ++--- x/tunnel/keeper/axelar_packet.go | 2 +- x/tunnel/keeper/msg_server.go | 2 +- x/tunnel/keeper/tss_packet.go | 2 +- x/tunnel/keeper/tunnel.go | 2 +- x/tunnel/keeper/tunnel_test.go | 2 +- x/tunnel/types/tunnel.pb.go | 274 ++++++++++++------------------ 7 files changed, 137 insertions(+), 189 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index a09f363df..9f97fceab 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -51,16 +51,16 @@ message SignalPriceInfo { message Tunnel { option (gogoproto.equal) = true; - uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 nonce_count = 2; - google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; - feeds.v1beta1.FeedType feed_type = 4; - string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; - uint64 last_triggered_block_height = 7; - bool is_active = 8; - google.protobuf.Timestamp created_at = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 id = 1 [(gogoproto.customname) = "ID"]; + uint64 nonce_count = 2; + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; + feeds.v1beta1.FeedType feed_type = 4; + string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; + uint64 last_triggered_block_height = 7; + bool is_active = 8; + int64 created_at = 9; + string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } message PendingTriggerTunnels { @@ -80,21 +80,21 @@ message TSSPacket { (gogoproto.customname) = "SigningID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" ]; - string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; - string destination_contract_address = 7; - google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 7; + int64 created_at = 8; } // AxelarPacket is the packet type for Axelar message AxelarPacket { option (gogoproto.equal) = true; - uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - uint64 nonce = 2; - feeds.v1beta1.FeedType feed_type = 3; - repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; - uint64 ibc_queue_id = 5 [(gogoproto.customname) = "IBCQueueID"]; - string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; - string destination_contract_address = 7; - google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + uint64 nonce = 2; + feeds.v1beta1.FeedType feed_type = 3; + repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; + uint64 ibc_queue_id = 5 [(gogoproto.customname) = "IBCQueueID"]; + string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 7; + int64 created_at = 8; } diff --git a/x/tunnel/keeper/axelar_packet.go b/x/tunnel/keeper/axelar_packet.go index 6d96429b3..95ae7f770 100644 --- a/x/tunnel/keeper/axelar_packet.go +++ b/x/tunnel/keeper/axelar_packet.go @@ -14,7 +14,7 @@ func (k Keeper) SetAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { // AddAxelarPacket adds a Axelar packet to the store func (k Keeper) AddAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { - packet.CreatedAt = ctx.BlockTime() + packet.CreatedAt = ctx.BlockTime().Unix() k.SetAxelarPacket(ctx, packet) } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 291370d68..b616c465f 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -60,7 +60,7 @@ func (ms msgServer) CreateTunnel( sdk.NewAttribute(types.AttributeKeyFeedType, tunnel.FeedType.String()), sdk.NewAttribute(types.AttributeKeyFeePayer, tunnel.FeePayer), sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), - sdk.NewAttribute(types.AttributeKeyCreatedAt, tunnel.CreatedAt.String()), + sdk.NewAttribute(types.AttributeKeyCreatedAt, fmt.Sprintf("%d", tunnel.CreatedAt)), sdk.NewAttribute(types.AttributeKeyCreator, req.Creator), ) for _, signalInfo := range req.SignalInfos { diff --git a/x/tunnel/keeper/tss_packet.go b/x/tunnel/keeper/tss_packet.go index fc135a072..e53754e22 100644 --- a/x/tunnel/keeper/tss_packet.go +++ b/x/tunnel/keeper/tss_packet.go @@ -15,7 +15,7 @@ func (k Keeper) SetTSSPacket(ctx sdk.Context, packet types.TSSPacket) { // AddTSSPacket adds a TSS packet to the store func (k Keeper) AddTSSPacket(ctx sdk.Context, packet types.TSSPacket) { // Set the creation time - packet.CreatedAt = ctx.BlockTime() + packet.CreatedAt = ctx.BlockTime().Unix() k.SetTSSPacket(ctx, packet) } diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 2ac4c3080..4bf21215d 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -45,7 +45,7 @@ func (k Keeper) AddTunnel(ctx sdk.Context, tunnel types.Tunnel) (uint64, error) tunnel.FeePayer = acc.String() // Set the creation time - tunnel.CreatedAt = ctx.BlockTime() + tunnel.CreatedAt = ctx.BlockTime().Unix() k.SetTunnel(ctx, tunnel) return tunnel.ID, nil diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 7393ce5d4..a8f931d27 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -43,7 +43,7 @@ func TestAddTunnel(t *testing.T) { SignalPriceInfos: nil, LastTriggeredBlockHeight: 0, IsActive: false, - CreatedAt: s.Ctx.BlockTime(), + CreatedAt: s.Ctx.BlockTime().Unix(), Creator: "", } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index ede5a60fb..53e2a32f4 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -11,19 +11,16 @@ import ( types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -285,7 +282,7 @@ type Tunnel struct { SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,6,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` LastTriggeredBlockHeight uint64 `protobuf:"varint,7,opt,name=last_triggered_block_height,json=lastTriggeredBlockHeight,proto3" json:"last_triggered_block_height,omitempty"` IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - CreatedAt time.Time `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + CreatedAt int64 `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` } @@ -378,11 +375,11 @@ func (m *Tunnel) GetIsActive() bool { return false } -func (m *Tunnel) GetCreatedAt() time.Time { +func (m *Tunnel) GetCreatedAt() int64 { if m != nil { return m.CreatedAt } - return time.Time{} + return 0 } func (m *Tunnel) GetCreator() string { @@ -446,7 +443,7 @@ type TSSPacket struct { SigningID github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID `protobuf:"varint,5,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" json:"signing_id,omitempty"` DestinationChainID string `protobuf:"bytes,6,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` DestinationContractAddress string `protobuf:"bytes,7,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (m *TSSPacket) Reset() { *m = TSSPacket{} } @@ -531,11 +528,11 @@ func (m *TSSPacket) GetDestinationContractAddress() string { return "" } -func (m *TSSPacket) GetCreatedAt() time.Time { +func (m *TSSPacket) GetCreatedAt() int64 { if m != nil { return m.CreatedAt } - return time.Time{} + return 0 } // AxelarPacket is the packet type for Axelar @@ -547,7 +544,7 @@ type AxelarPacket struct { IBCQueueID uint64 `protobuf:"varint,5,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` DestinationChainID string `protobuf:"bytes,6,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` DestinationContractAddress string `protobuf:"bytes,7,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"` + CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (m *AxelarPacket) Reset() { *m = AxelarPacket{} } @@ -632,11 +629,11 @@ func (m *AxelarPacket) GetDestinationContractAddress() string { return "" } -func (m *AxelarPacket) GetCreatedAt() time.Time { +func (m *AxelarPacket) GetCreatedAt() int64 { if m != nil { return m.CreatedAt } - return time.Time{} + return 0 } func init() { @@ -653,65 +650,64 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 914 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xaf, 0x9b, 0x34, 0xb5, 0xa7, 0xd9, 0xb2, 0x1a, 0x85, 0xc5, 0x9b, 0xa2, 0x38, 0xaa, 0x84, - 0x14, 0x0e, 0x6b, 0xb3, 0x81, 0x5e, 0x2a, 0x21, 0x11, 0x37, 0x42, 0x6b, 0x21, 0xa4, 0xe0, 0xe4, - 0xc4, 0xc5, 0x72, 0x3c, 0x13, 0x77, 0xd8, 0x74, 0x26, 0x78, 0x26, 0xd1, 0xe6, 0x5b, 0xf4, 0xc2, - 0x85, 0x13, 0x48, 0x1c, 0xf8, 0x00, 0xfb, 0x21, 0x56, 0x9c, 0x56, 0x7b, 0xe2, 0x64, 0x90, 0x7b, - 0xe1, 0x33, 0x70, 0x42, 0xf3, 0x27, 0x29, 0x2d, 0xa0, 0x5d, 0x01, 0x12, 0x68, 0x6f, 0xf3, 0xde, - 0xfb, 0xcd, 0xf3, 0xfb, 0xf3, 0xfb, 0x4d, 0x02, 0x8e, 0xc4, 0x92, 0x52, 0x3c, 0x0f, 0x56, 0x0f, - 0xa7, 0x58, 0xa4, 0x0f, 0x03, 0x6d, 0xfa, 0x8b, 0x82, 0x09, 0x06, 0x0f, 0x8d, 0x65, 0x82, 0xed, - 0x56, 0xce, 0x72, 0xa6, 0x42, 0x81, 0x3c, 0x69, 0x54, 0xdb, 0xcb, 0x19, 0xcb, 0xe7, 0x38, 0x50, - 0xd6, 0x74, 0x39, 0x0b, 0x04, 0xb9, 0xc0, 0x5c, 0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 0x8d, 0x45, 0x41, 0x68, 0xae, 0xae, 0x8d, 0x24, 0x12, 0x8e, 0x01, 0x34, - 0x8b, 0x52, 0x43, 0x4a, 0x08, 0x9d, 0x31, 0xee, 0x36, 0xba, 0xb5, 0xde, 0x41, 0xdf, 0xf3, 0x6f, - 0xbe, 0x27, 0xfe, 0xad, 0x2d, 0x87, 0xf5, 0x67, 0xa5, 0xb7, 0x13, 0xdf, 0xe5, 0x37, 0xdd, 0x1c, - 0x7e, 0x08, 0x8e, 0xf4, 0xa4, 0x0b, 0x92, 0xe7, 0xb8, 0xc0, 0x28, 0x99, 0xce, 0x59, 0xf6, 0x38, - 0x39, 0xc7, 0x24, 0x3f, 0x17, 0xee, 0xbe, 0x9a, 0x94, 0xab, 0xc6, 0xbe, 0x41, 0x84, 0x12, 0xf0, - 0x48, 0xc5, 0xe1, 0x11, 0x70, 0x08, 0x4f, 0xd2, 0x4c, 0x90, 0x15, 0x76, 0xed, 0xae, 0xd5, 0xb3, - 0x63, 0x9b, 0xf0, 0x81, 0xb2, 0xe1, 0x19, 0x00, 0x59, 0x81, 0x53, 0x81, 0x51, 0x92, 0x0a, 0xd7, - 0x51, 0x93, 0x6d, 0xff, 0x61, 0xb2, 0xdb, 0x75, 0x86, 0xb6, 0xac, 0xf1, 0xf2, 0x27, 0xcf, 0x8a, - 0x1d, 0x73, 0x6f, 0x20, 0x60, 0x1f, 0xec, 0x2b, 0x83, 0x15, 0x2e, 0x78, 0xc9, 0xa8, 0x36, 0x40, - 0xc3, 0x8b, 0x3e, 0x78, 0x73, 0x84, 0x29, 0x22, 0x34, 0x37, 0xa5, 0x6b, 0x92, 0x70, 0x78, 0x1f, - 0xd4, 0x08, 0xe2, 0xae, 0xd5, 0xad, 0xf5, 0xea, 0xe1, 0x7e, 0x55, 0x7a, 0xb5, 0x68, 0xc8, 0x63, - 0xe9, 0x3b, 0xfe, 0xba, 0x0e, 0x9c, 0xc9, 0x78, 0x3c, 0x4a, 0xb3, 0xc7, 0x58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1f, 0xaf, 0x3a, 0x3b, 0x9f, 0x07, 0xaf, 0xa0, 0x10, 0xf3, 0xbf, 0x4f, 0x09, 0x64, - 0xda, 0x50, 0x88, 0xf7, 0x7f, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x36, 0x9e, 0xe1, 0x11, 0x0e, 0x0a, - 0x00, 0x00, + // 902 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x3f, 0x8f, 0xe3, 0xc4, + 0x1b, 0x5e, 0xaf, 0x93, 0x6c, 0x3c, 0x9b, 0xdb, 0xdf, 0x69, 0x94, 0xdf, 0xe1, 0xdb, 0x85, 0x38, + 0x5a, 0x09, 0x29, 0x14, 0x67, 0x73, 0x81, 0x6d, 0x56, 0x42, 0x22, 0xde, 0x08, 0x9d, 0x85, 0x90, + 0x82, 0x93, 0x8a, 0xc6, 0x72, 0x3c, 0x13, 0xef, 0x70, 0xd9, 0x99, 0xe0, 0x99, 0x44, 0x97, 0x6f, + 0x71, 0x1f, 0x01, 0x24, 0x0a, 0x3e, 0xc0, 0xb5, 0xf4, 0x27, 0xaa, 0xd3, 0x55, 0x54, 0x16, 0xf2, + 0x36, 0x74, 0x34, 0x54, 0x54, 0x68, 0xfe, 0x24, 0xcb, 0x46, 0xa0, 0x3b, 0x09, 0x24, 0xfe, 0x74, + 0xf3, 0x3e, 0xef, 0x33, 0xe3, 0xf7, 0x9d, 0xe7, 0x79, 0x27, 0x01, 0x27, 0x62, 0x49, 0x29, 0x9e, + 0x07, 0xab, 0x87, 0x53, 0x2c, 0xd2, 0x87, 0x81, 0x0e, 0xfd, 0x45, 0xc1, 0x04, 0x83, 0x47, 0x26, + 0x32, 0xc9, 0xe3, 0x76, 0xce, 0x72, 0xa6, 0x52, 0x81, 0x5c, 0x69, 0xd6, 0xb1, 0x97, 0x33, 0x96, + 0xcf, 0x71, 0xa0, 0xa2, 0xe9, 0x72, 0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 0xd7, 0x70, 0xb5, 0xf9, + 0x17, 0xa6, 0x4c, 0x3d, 0x6d, 0x28, 0xc6, 0x7b, 0xbf, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xdb, + 0x35, 0x91, 0x9c, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -882,7 +878,7 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.IsActive != that1.IsActive { return false } - if !this.CreatedAt.Equal(that1.CreatedAt) { + if this.CreatedAt != that1.CreatedAt { return false } if this.Creator != that1.Creator { @@ -964,7 +960,7 @@ func (this *TSSPacket) Equal(that interface{}) bool { if this.DestinationContractAddress != that1.DestinationContractAddress { return false } - if !this.CreatedAt.Equal(that1.CreatedAt) { + if this.CreatedAt != that1.CreatedAt { return false } return true @@ -1014,7 +1010,7 @@ func (this *AxelarPacket) Equal(that interface{}) bool { if this.DestinationContractAddress != that1.DestinationContractAddress { return false } - if !this.CreatedAt.Equal(that1.CreatedAt) { + if this.CreatedAt != that1.CreatedAt { return false } return true @@ -1210,14 +1206,11 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x52 } - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) - if err1 != nil { - return 0, err1 + if m.CreatedAt != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x48 } - i -= n1 - i = encodeVarintTunnel(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x4a if m.IsActive { i-- if m.IsActive { @@ -1305,20 +1298,20 @@ func (m *PendingTriggerTunnels) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.IDs) > 0 { - dAtA4 := make([]byte, len(m.IDs)*10) - var j3 int + dAtA3 := make([]byte, len(m.IDs)*10) + var j2 int for _, num := range m.IDs { for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j3++ + j2++ } - dAtA4[j3] = uint8(num) - j3++ + dAtA3[j2] = uint8(num) + j2++ } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintTunnel(dAtA, i, uint64(j3)) + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintTunnel(dAtA, i, uint64(j2)) i-- dAtA[i] = 0xa } @@ -1345,14 +1338,11 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintTunnel(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x42 + if m.CreatedAt != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x40 + } if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) @@ -1424,14 +1414,11 @@ func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt):]) - if err6 != nil { - return 0, err6 - } - i -= n6 - i = encodeVarintTunnel(dAtA, i, uint64(n6)) - i-- - dAtA[i] = 0x42 + if m.CreatedAt != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) + i-- + dAtA[i] = 0x40 + } if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) @@ -1607,8 +1594,9 @@ func (m *Tunnel) Size() (n int) { if m.IsActive { n += 2 } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) - n += 1 + l + sovTunnel(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovTunnel(uint64(m.CreatedAt)) + } l = len(m.Creator) if l > 0 { n += 1 + l + sovTunnel(uint64(l)) @@ -1664,8 +1652,9 @@ func (m *TSSPacket) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) - n += 1 + l + sovTunnel(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovTunnel(uint64(m.CreatedAt)) + } return n } @@ -1701,8 +1690,9 @@ func (m *AxelarPacket) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreatedAt) - n += 1 + l + sovTunnel(uint64(l)) + if m.CreatedAt != 0 { + n += 1 + sovTunnel(uint64(m.CreatedAt)) + } return n } @@ -2446,10 +2436,10 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } m.IsActive = bool(v != 0) case 9: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } - var msglen int + m.CreatedAt = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2459,25 +2449,11 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.CreatedAt |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) @@ -2861,10 +2837,10 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 8: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } - var msglen int + m.CreatedAt = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2874,25 +2850,11 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.CreatedAt |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTunnel(dAtA[iNdEx:]) @@ -3118,10 +3080,10 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 8: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } - var msglen int + m.CreatedAt = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -3131,25 +3093,11 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.CreatedAt |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTunnel(dAtA[iNdEx:]) From 96af493f9eeb676c36468554b168d58028deea87 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 15 Aug 2024 15:38:58 +0700 Subject: [PATCH 041/272] update msg --- x/tunnel/types/msgs.go | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 61957a24d..1af442b2d 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -151,21 +151,13 @@ func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { - switch r := m.Route.GetCachedValue().(type) { - case *TSSRoute: - // Validate TSSRoute - err := r.ValidateBasic() - if err != nil { - return err - } - case *AxelarRoute: - // Validate AxelarRoute - err := r.ValidateBasic() - if err != nil { - return err - } - default: - return sdkerrors.ErrUnknownRequest.Wrapf("unknown route type") + r, ok := m.Route.GetCachedValue().(Route) + if !ok { + return sdkerrors.ErrPackAny.Wrapf("cannot unpack route") + } + err := r.ValidateBasic() + if err != nil { + return err } return nil } From 4cade296c7e7def69c1f0c621b5b92b47b203087 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Sun, 18 Aug 2024 21:32:43 +0700 Subject: [PATCH 042/272] clean code --- proto/tunnel/v1beta1/query.proto | 4 +- proto/tunnel/v1beta1/tunnel.proto | 45 +- x/tunnel/client/cli/tx.go | 2 +- x/tunnel/keeper/axelar_packet.go | 33 - x/tunnel/keeper/axelar_packet_handler.go | 10 + x/tunnel/keeper/axelar_packet_handler_test.go | 7 + x/tunnel/keeper/axelar_packet_test.go | 25 - x/tunnel/keeper/grpc_query.go | 94 +-- x/tunnel/keeper/grpc_query_test.go | 80 +- x/tunnel/keeper/packet.go | 41 + x/tunnel/keeper/packet_test.go | 66 ++ x/tunnel/keeper/tss_packet.go | 51 -- x/tunnel/keeper/tss_packet_handler.go | 27 + x/tunnel/keeper/tss_packet_handler_test.go | 47 ++ x/tunnel/keeper/tss_packet_test.go | 24 - x/tunnel/keeper/tunnel.go | 12 +- x/tunnel/types/axelar_route.go | 2 +- x/tunnel/types/codec.go | 19 +- x/tunnel/types/errors.go | 3 +- x/tunnel/types/msgs.go | 12 +- x/tunnel/types/packet.go | 59 ++ x/tunnel/types/packet_content.go | 8 + x/tunnel/types/query.go | 33 - x/tunnel/types/query.pb.go | 109 ++- x/tunnel/types/route.go | 4 +- x/tunnel/types/tss_route.go | 2 +- x/tunnel/types/tunnel.go | 15 +- x/tunnel/types/tunnel.pb.go | 723 +++++++++--------- 28 files changed, 797 insertions(+), 760 deletions(-) delete mode 100644 x/tunnel/keeper/axelar_packet.go create mode 100644 x/tunnel/keeper/axelar_packet_handler.go create mode 100644 x/tunnel/keeper/axelar_packet_handler_test.go delete mode 100644 x/tunnel/keeper/axelar_packet_test.go create mode 100644 x/tunnel/keeper/packet.go create mode 100644 x/tunnel/keeper/packet_test.go delete mode 100644 x/tunnel/keeper/tss_packet.go create mode 100644 x/tunnel/keeper/tss_packet_handler.go create mode 100644 x/tunnel/keeper/tss_packet_handler_test.go delete mode 100644 x/tunnel/keeper/tss_packet_test.go create mode 100644 x/tunnel/types/packet.go create mode 100644 x/tunnel/types/packet_content.go delete mode 100644 x/tunnel/types/query.go diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index 3f4a6c127..45890516b 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -89,7 +89,7 @@ message QueryPacketsRequest { // QueryPacketsResponse is the response type for the Query/Packets RPC method. message QueryPacketsResponse { // Packets is a list of packets. - repeated google.protobuf.Any packets = 1; + repeated Packet packets = 1; // pagination defines an optional pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -105,7 +105,7 @@ message QueryPacketRequest { // QueryPacketResponse is the response type for the Query/Packet RPC method. message QueryPacketResponse { // Packet is the packet with the given tunnel ID and nonce. - google.protobuf.Any packet = 1; + Packet packet = 1; } // QueryParamsRequest is the request type for the Query/Params RPC method. diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 9f97fceab..5ad0c3319 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -13,7 +13,7 @@ option (gogoproto.equal_all) = true; // Route is the type for a route message TSSRoute { - option (cosmos_proto.implements_interface) = "Route"; + option (cosmos_proto.implements_interface) = "RouteI"; string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; string destination_contract_address = 2; @@ -21,7 +21,7 @@ message TSSRoute { // AxelarRoute is the type for an Axelar route message AxelarRoute { - option (cosmos_proto.implements_interface) = "Route"; + option (cosmos_proto.implements_interface) = "RouteI"; string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; string destination_contract_address = 2; @@ -53,7 +53,7 @@ message Tunnel { uint64 id = 1 [(gogoproto.customname) = "ID"]; uint64 nonce_count = 2; - google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; feeds.v1beta1.FeedType feed_type = 4; string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; @@ -63,38 +63,39 @@ message Tunnel { string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered message PendingTriggerTunnels { // IDs is a list of tunnel IDs that are waiting to be triggered repeated uint64 ids = 1 [(gogoproto.customname) = "IDs"]; } -// TSSPacket is the packet type for TSS -message TSSPacket { - option (gogoproto.equal) = true; - +// Packet is the packet that tunnel produces +message Packet { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; uint64 nonce = 2; feeds.v1beta1.FeedType feed_type = 3; repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; - uint64 signing_id = 5 [ + google.protobuf.Any packet_content = 5 [(cosmos_proto.accepts_interface) = "PacketContentI"]; + int64 created_at = 6; +} + +// TSSPacketContent is the packet content for TSS +message TSSPacketContent { + option (cosmos_proto.implements_interface) = "PacketContentI"; + + uint64 signing_id = 1 [ (gogoproto.customname) = "SigningID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" ]; - string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; - string destination_contract_address = 7; - int64 created_at = 8; + string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 3; } -// AxelarPacket is the packet type for Axelar -message AxelarPacket { - option (gogoproto.equal) = true; +// AxelarPacketContent is the packet content for Axelar +message AxelarPacketContent { + option (cosmos_proto.implements_interface) = "PacketContentI"; - uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - uint64 nonce = 2; - feeds.v1beta1.FeedType feed_type = 3; - repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; - uint64 ibc_queue_id = 5 [(gogoproto.customname) = "IBCQueueID"]; - string destination_chain_id = 6 [(gogoproto.customname) = "DestinationChainID"]; - string destination_contract_address = 7; - int64 created_at = 8; + uint64 ibc_queue_id = 1 [(gogoproto.customname) = "IBCQueueID"]; + string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; + string destination_contract_address = 3; } diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index ec7522ce4..e767ff215 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -56,7 +56,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - var route types.Route + var route types.RouteI tssRoute := types.TSSRoute{ DestinationChainID: args[1], DestinationContractAddress: args[2], diff --git a/x/tunnel/keeper/axelar_packet.go b/x/tunnel/keeper/axelar_packet.go deleted file mode 100644 index 95ae7f770..000000000 --- a/x/tunnel/keeper/axelar_packet.go +++ /dev/null @@ -1,33 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -// SetAxelarPacket sets a Axelar packet in the store -func (k Keeper) SetAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { - ctx.KVStore(k.storeKey). - Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.Nonce), k.cdc.MustMarshal(&packet)) -} - -// AddAxelarPacket adds a Axelar packet to the store -func (k Keeper) AddAxelarPacket(ctx sdk.Context, packet types.AxelarPacket) { - packet.CreatedAt = ctx.BlockTime().Unix() - k.SetAxelarPacket(ctx, packet) -} - -// GetAxelarPacket retrieves a Axelar packet by its tunnel ID and packet ID -func (k Keeper) GetAxelarPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) (types.AxelarPacket, error) { - bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, nonce)) - if bz == nil { - return types.AxelarPacket{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, nonce: %d", tunnelID, nonce) - } - - var packet types.AxelarPacket - k.cdc.MustUnmarshal(bz, &packet) - return packet, nil -} - -func (k Keeper) AxelarPacketHandler(ctx sdk.Context, packet types.AxelarPacket) {} diff --git a/x/tunnel/keeper/axelar_packet_handler.go b/x/tunnel/keeper/axelar_packet_handler.go new file mode 100644 index 000000000..301a2df05 --- /dev/null +++ b/x/tunnel/keeper/axelar_packet_handler.go @@ -0,0 +1,10 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// AxelarPacketHandler handles incoming Axelar packets +func (k Keeper) AxelarPacketHandler(ctx sdk.Context, route *types.AxelarRoute, packet types.Packet) {} diff --git a/x/tunnel/keeper/axelar_packet_handler_test.go b/x/tunnel/keeper/axelar_packet_handler_test.go new file mode 100644 index 000000000..27400b0dd --- /dev/null +++ b/x/tunnel/keeper/axelar_packet_handler_test.go @@ -0,0 +1,7 @@ +package keeper_test + +import ( + "testing" +) + +func TestGetSetAxelarPacket(t *testing.T) {} diff --git a/x/tunnel/keeper/axelar_packet_test.go b/x/tunnel/keeper/axelar_packet_test.go deleted file mode 100644 index 9cac487c3..000000000 --- a/x/tunnel/keeper/axelar_packet_test.go +++ /dev/null @@ -1,25 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -func TestGetSetAxelarPacket(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - packet := types.AxelarPacket{ - TunnelID: 1, - Nonce: 1, - } - k.SetAxelarPacket(ctx, packet) - - storedPacket, err := k.GetAxelarPacket(ctx, 1, 1) - require.NoError(s.T(), err) - require.Equal(s.T(), packet, storedPacket) -} diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index f4c5c8e0b..5231df19a 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -2,12 +2,12 @@ package keeper import ( "context" - "fmt" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -72,92 +72,32 @@ func (q queryServer) Tunnel(c context.Context, req *types.QueryTunnelRequest) (* func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) (*types.QueryPacketsResponse, error) { ctx := sdk.UnwrapSDKContext(c) - tunnel, err := q.k.GetTunnel(ctx, req.TunnelId) - if err != nil { - return nil, err - } - store := prefix.NewStore(ctx.KVStore(q.k.storeKey), types.TunnelPacketsStoreKey(req.TunnelId)) - - var pageRes *query.PageResponse - var packets []*codectypes.Any - switch tunnel.Route.GetCachedValue().(type) { - case *types.TSSRoute: - pageRes, err = query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { - var packet types.TSSPacket - q.k.cdc.MustUnmarshal(value, &packet) - - any, err := codectypes.NewAnyWithValue(&packet) - if err != nil { - return err - } - - packets = append(packets, any) - return nil - }) - if err != nil { - return nil, err - } - case *types.AxelarRoute: - pageRes, err = query.Paginate(store, req.Pagination, func(key []byte, value []byte) error { - var packet types.AxelarPacket - q.k.cdc.MustUnmarshal(value, &packet) - - any, err := codectypes.NewAnyWithValue(&packet) - if err != nil { - return err - } - - packets = append(packets, any) - return nil - }) - if err != nil { - return nil, err - } - default: - return nil, fmt.Errorf("unknown route type") + filteredPackets, pageRes, err := query.GenericFilteredPaginate( + q.k.cdc, + store, + req.Pagination, + func(key []byte, p *types.Packet) (*types.Packet, error) { + return p, nil + }, func() *types.Packet { + return &types.Packet{} + }, + ) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) } - - return &types.QueryPacketsResponse{Packets: packets, Pagination: pageRes}, nil + return &types.QueryPacketsResponse{Packets: filteredPackets, Pagination: pageRes}, nil } // Packet queries a packet by its ID. func (q queryServer) Packet(c context.Context, req *types.QueryPacketRequest) (*types.QueryPacketResponse, error) { ctx := sdk.UnwrapSDKContext(c) - tunnel, err := q.k.GetTunnel(ctx, req.TunnelId) + packet, err := q.k.GetPacket(ctx, req.TunnelId, req.Nonce) if err != nil { return nil, err } - - switch tunnel.Route.GetCachedValue().(type) { - case *types.TSSRoute: - packet, err := q.k.GetTSSPacket(ctx, req.TunnelId, req.Nonce) - if err != nil { - return nil, err - } - - any, err := codectypes.NewAnyWithValue(&packet) - if err != nil { - return nil, err - } - - return &types.QueryPacketResponse{Packet: any}, nil - case *types.AxelarRoute: - packet, err := q.k.GetAxelarPacket(ctx, req.TunnelId, req.Nonce) - if err != nil { - return nil, err - } - - any, err := codectypes.NewAnyWithValue(&packet) - if err != nil { - return nil, err - } - - return &types.QueryPacketResponse{Packet: any}, nil - default: - return nil, fmt.Errorf("unknown route type") - } + return &types.QueryPacketResponse{Packet: &packet}, nil } // Params queries all params of the module. diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index 97b07b306..700eed34f 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -13,7 +13,7 @@ func TestGRPCQueryPackets(t *testing.T) { s := testutil.NewTestSuite(t) q := s.QueryServer - // set tunnel + // Set tunnel tunnel := types.Tunnel{ ID: 1, NonceCount: 2, @@ -26,31 +26,39 @@ func TestGRPCQueryPackets(t *testing.T) { require.NoError(t, err) s.Keeper.SetTunnel(s.Ctx, tunnel) - // set tss packets - tssPackets := []types.TSSPacket{ - { - TunnelID: 1, - Nonce: 1, - }, - { - TunnelID: 1, - Nonce: 2, - }, + // Set packets + packet1 := types.Packet{ + TunnelID: 1, + Nonce: 1, } - for _, packet := range tssPackets { - s.Keeper.SetTSSPacket(s.Ctx, packet) + packet2 := types.Packet{ + TunnelID: 1, + Nonce: 2, } + err = packet1.SetPacketContent(&types.TSSPacketContent{ + SigningID: 1, + DestinationChainID: r.DestinationChainID, + DestinationContractAddress: r.DestinationContractAddress, + }) + require.NoError(t, err) + err = packet2.SetPacketContent(&types.TSSPacketContent{ + SigningID: 2, + DestinationChainID: r.DestinationChainID, + DestinationContractAddress: r.DestinationContractAddress, + }) + require.NoError(t, err) + s.Keeper.SetPacket(s.Ctx, packet1) + s.Keeper.SetPacket(s.Ctx, packet2) - // query packets - res, err := q.Packets(s.Ctx, &types.QueryPacketsRequest{ + // Query packets + resp, err := q.Packets(s.Ctx, &types.QueryPacketsRequest{ TunnelId: 1, }) require.NoError(t, err) - for i, packet := range res.Packets { - tssPacket, ok := packet.GetCachedValue().(*types.TSSPacket) - require.True(t, ok) - require.Equal(t, tssPackets[i], *tssPacket) - } + require.NotNil(t, resp) + require.Len(t, resp.Packets, 2) + require.Equal(t, packet1, *resp.Packets[0]) + require.Equal(t, packet2, *resp.Packets[1]) } func TestGRPCQueryPacket(t *testing.T) { @@ -70,29 +78,23 @@ func TestGRPCQueryPacket(t *testing.T) { require.NoError(t, err) s.Keeper.SetTunnel(s.Ctx, tunnel) - // set tss packets - tssPackets := []types.TSSPacket{ - { - TunnelID: 1, - Nonce: 1, - }, - { - TunnelID: 1, - Nonce: 2, - }, - } - for _, packet := range tssPackets { - s.Keeper.SetTSSPacket(s.Ctx, packet) + packet1 := types.Packet{ + TunnelID: 1, + Nonce: 1, } + err = packet1.SetPacketContent(&types.TSSPacketContent{ + SigningID: 1, + DestinationChainID: r.DestinationChainID, + DestinationContractAddress: r.DestinationContractAddress, + }) + require.NoError(t, err) + s.Keeper.SetPacket(s.Ctx, packet1) - // query packet res, err := q.Packet(s.Ctx, &types.QueryPacketRequest{ TunnelId: 1, - Nonce: 2, + Nonce: 1, }) require.NoError(t, err) - - tssPacket, ok := res.Packet.GetCachedValue().(*types.TSSPacket) - require.True(t, ok) - require.Equal(t, tssPackets[1], *tssPacket) + require.NotNil(t, res) + require.Equal(t, packet1, *res.Packet) } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go new file mode 100644 index 000000000..d111e1d73 --- /dev/null +++ b/x/tunnel/keeper/packet.go @@ -0,0 +1,41 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// SetPacket sets a packet in the store +func (k Keeper) SetPacket(ctx sdk.Context, packet types.Packet) { + ctx.KVStore(k.storeKey). + Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.Nonce), k.cdc.MustMarshal(&packet)) +} + +// AddPacket adds a packet to the store +func (k Keeper) AddPacket(ctx sdk.Context, packet types.Packet) { + // Set the creation time + packet.CreatedAt = ctx.BlockTime().Unix() + k.SetPacket(ctx, packet) +} + +// GetPacket retrieves a packet by its tunnel ID and packet ID +func (k Keeper) GetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) (types.Packet, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, nonce)) + if bz == nil { + return types.Packet{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, nonce: %d", tunnelID, nonce) + } + + var packet types.Packet + k.cdc.MustUnmarshal(bz, &packet) + return packet, nil +} + +// MustGetPacket retrieves a packet by its tunnel ID and packet ID and panics if the packet does not exist +func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) types.Packet { + packet, err := k.GetPacket(ctx, tunnelID, nonce) + if err != nil { + panic(err) + } + return packet +} diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go new file mode 100644 index 000000000..0c0c5854f --- /dev/null +++ b/x/tunnel/keeper/packet_test.go @@ -0,0 +1,66 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func TestGetSetPacket(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx := s.Ctx + k := s.Keeper + + packet := types.Packet{ + TunnelID: 1, + Nonce: 1, + } + + k.SetPacket(ctx, packet) + + storedPacket, err := k.GetPacket(ctx, packet.TunnelID, packet.Nonce) + require.NoError(t, err) + require.Equal(t, packet, storedPacket) +} + +func TestAddPacket(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx := s.Ctx + k := s.Keeper + + packet := types.Packet{ + TunnelID: 1, + Nonce: 1, + } + + k.AddPacket(ctx, packet) + + storedPacket, err := k.GetPacket(ctx, packet.TunnelID, packet.Nonce) + require.NoError(t, err) + require.Equal(t, packet.TunnelID, storedPacket.TunnelID) + require.Equal(t, packet.Nonce, storedPacket.Nonce) + require.NotZero(t, storedPacket.CreatedAt) +} + +func TestMustGetPacket(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx := s.Ctx + k := s.Keeper + + packet := types.Packet{ + TunnelID: 1, + Nonce: 1, + } + + k.SetPacket(ctx, packet) + + storedPacket := k.MustGetPacket(ctx, packet.TunnelID, packet.Nonce) + require.Equal(t, packet, storedPacket) + + require.Panics(t, func() { + k.MustGetPacket(ctx, packet.TunnelID, 999) + }) +} diff --git a/x/tunnel/keeper/tss_packet.go b/x/tunnel/keeper/tss_packet.go deleted file mode 100644 index e53754e22..000000000 --- a/x/tunnel/keeper/tss_packet.go +++ /dev/null @@ -1,51 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -// SetTSSPacket sets a TSS packet in the store -func (k Keeper) SetTSSPacket(ctx sdk.Context, packet types.TSSPacket) { - ctx.KVStore(k.storeKey). - Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.Nonce), k.cdc.MustMarshal(&packet)) -} - -// AddTSSPacket adds a TSS packet to the store -func (k Keeper) AddTSSPacket(ctx sdk.Context, packet types.TSSPacket) { - // Set the creation time - packet.CreatedAt = ctx.BlockTime().Unix() - k.SetTSSPacket(ctx, packet) -} - -// GetTSSPacket retrieves a TSS packet by its tunnel ID and packet ID -func (k Keeper) GetTSSPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) (types.TSSPacket, error) { - bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, nonce)) - if bz == nil { - return types.TSSPacket{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, nonce: %d", tunnelID, nonce) - } - - var packet types.TSSPacket - k.cdc.MustUnmarshal(bz, &packet) - return packet, nil -} - -// MustGetTSSPacket retrieves a TSS packet by its ID and panics if the packet does not exist -func (k Keeper) MustGetTSSPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) types.TSSPacket { - packet, err := k.GetTSSPacket(ctx, tunnelID, nonce) - if err != nil { - panic(err) - } - return packet -} - -// TSSPacketHandler handles incoming TSS packets -func (k Keeper) TSSPacketHandler(ctx sdk.Context, packet types.TSSPacket) { - // TODO: Implement TSS packet handler logic - // Sign TSS packet - packet.SigningID = 1 - - // Save the signed TSS packet - k.AddTSSPacket(ctx, packet) -} diff --git a/x/tunnel/keeper/tss_packet_handler.go b/x/tunnel/keeper/tss_packet_handler.go new file mode 100644 index 000000000..0349d3816 --- /dev/null +++ b/x/tunnel/keeper/tss_packet_handler.go @@ -0,0 +1,27 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// TSSPacketHandler handles incoming TSS packets +func (k Keeper) TSSPacketHandler(ctx sdk.Context, route *types.TSSRoute, packet types.Packet) { + // TODO: Implement TSS packet handler logic + // Sign TSS packet + + // Set the packet content + packetContent := types.TSSPacketContent{ + SigningID: 1, + DestinationChainID: route.DestinationChainID, + DestinationContractAddress: route.DestinationContractAddress, + } + err := packet.SetPacketContent(&packetContent) + if err != nil { + panic(err) + } + + // Save the signed TSS packet + k.AddPacket(ctx, packet) +} diff --git a/x/tunnel/keeper/tss_packet_handler_test.go b/x/tunnel/keeper/tss_packet_handler_test.go new file mode 100644 index 000000000..e996df6d5 --- /dev/null +++ b/x/tunnel/keeper/tss_packet_handler_test.go @@ -0,0 +1,47 @@ +package keeper_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + bandtsstypes "github.com/bandprotocol/chain/v2/x/bandtss/types" + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func TestTSSPacketHandler(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Create a sample TSSRoute + route := types.TSSRoute{ + DestinationChainID: "chain-1", + DestinationContractAddress: "0x1234567890abcdef", + } + + // Create a sample Packet + packet := types.NewPacket( + 1, // tunnelID + 1, // nonce + feedstypes.FEED_TYPE_DEFAULT, + nil, // SignalPriceInfos + time.Now().Unix(), + ) + + // Call the TSSPacketHandler + k.TSSPacketHandler(ctx, &route, packet) + + // Retrieve the packet from the keeper + savedPacket, err := k.GetPacket(ctx, 1, 1) + require.NoError(t, err) + + // Assert the packet content + packetContent, ok := savedPacket.PacketContent.GetCachedValue().(*types.TSSPacketContent) + require.True(t, ok) + require.Equal(t, "chain-1", packetContent.DestinationChainID) + require.Equal(t, "0x1234567890abcdef", packetContent.DestinationContractAddress) + require.Equal(t, bandtsstypes.SigningID(1), packetContent.SigningID) +} diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go deleted file mode 100644 index 407302526..000000000 --- a/x/tunnel/keeper/tss_packet_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -func TestGetSetTSSPacket(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - packet := types.TSSPacket{ - TunnelID: 1, - Nonce: 1, - } - k.SetTSSPacket(ctx, packet) - - storedPacket, err := k.GetTSSPacket(ctx, 1, 1) - require.NoError(s.T(), err) - require.Equal(s.T(), packet, storedPacket) -} diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 4bf21215d..f413701fb 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -217,16 +217,14 @@ func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { // Increment the nonce tunnel.NonceCount += 1 + // Process the tunnel based on the route type switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - k.TSSPacketHandler(ctx, types.TSSPacket{ - TunnelID: tunnel.ID, - SignalPriceInfos: tunnel.SignalPriceInfos, - DestinationChainID: r.DestinationChainID, - DestinationContractAddress: r.DestinationContractAddress, - }) + k.TSSPacketHandler(ctx, r, tunnel.CreatePacket(ctx.BlockTime().Unix())) case *types.AxelarRoute: - k.AxelarPacketHandler(ctx, types.AxelarPacket{}) + k.AxelarPacketHandler(ctx, r, tunnel.CreatePacket(ctx.BlockTime().Unix())) + default: + panic(fmt.Sprintf("unknown route type: %T", r)) } // Update the tunnel diff --git a/x/tunnel/types/axelar_route.go b/x/tunnel/types/axelar_route.go index 6ae7a7de8..b380cd5b6 100644 --- a/x/tunnel/types/axelar_route.go +++ b/x/tunnel/types/axelar_route.go @@ -1,6 +1,6 @@ package types -var _ Route = &AxelarRoute{} +var _ RouteI = &AxelarRoute{} func (r *AxelarRoute) ValidateBasic() error { return nil diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index a59cd6f1b..11b3a91a6 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -16,11 +16,12 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgCreateTunnel{}, "tunnel/MsgCreateTunnel") legacy.RegisterAminoMsg(cdc, &MsgActivateTunnel{}, "tunnel/MsgActivateTunnel") - cdc.RegisterInterface((*Route)(nil), nil) + cdc.RegisterInterface((*RouteI)(nil), nil) cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) cdc.RegisterConcrete(&AxelarRoute{}, "tunnel/AxelarRoute", nil) - - cdc.RegisterInterface((*Packet)(nil), nil) + cdc.RegisterInterface((*PacketContentI)(nil), nil) + cdc.RegisterConcrete(&TSSPacketContent{}, "tunnel/TSSPacketContent", nil) + cdc.RegisterConcrete(&AxelarPacketContent{}, "tunnel/AxelarPacketContent", nil) } // RegisterInterfaces registers the x/tunnel interfaces types with the interface registry @@ -33,17 +34,17 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { ) registry.RegisterInterface( - "tunnel.v1beta1.Route", - (*Route)(nil), + "tunnel.v1beta1.RouteI", + (*RouteI)(nil), &TSSRoute{}, &AxelarRoute{}, ) registry.RegisterInterface( - "tunnel.v1beta1.Packet", - (*Packet)(nil), - &TSSPacket{}, - &AxelarPacket{}, + "tunnel.v1beta1.PacketContentI", + (*PacketContentI)(nil), + &TSSPacketContent{}, + &AxelarPacketContent{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 8dee22916..b5a5c8f4b 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -10,5 +10,6 @@ var ( ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 3, "max tunnel channels") ErrTunnelNotFound = errorsmod.Register(ModuleName, 4, "tunnel not found") ErrPacketNotFound = errorsmod.Register(ModuleName, 5, "packet not found") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 6, "account already exist") + ErrNoPacketContent = errorsmod.Register(ModuleName, 6, "no packet content") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 7, "account already exist") ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 1af442b2d..1024937b4 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -59,7 +59,7 @@ func (m *MsgUpdateParams) ValidateBasic() error { func NewMsgCreateTunnel( signalInfos []SignalInfo, feedType feedstypes.FeedType, - route Route, + route RouteI, deposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { @@ -151,7 +151,7 @@ func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { - r, ok := m.Route.GetCachedValue().(Route) + r, ok := m.Route.GetCachedValue().(RouteI) if !ok { return sdkerrors.ErrPackAny.Wrapf("cannot unpack route") } @@ -163,7 +163,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { } // SetRoute sets the route for the message. -func (m *MsgCreateTunnel) SetTunnelRoute(route Route) error { +func (m *MsgCreateTunnel) SetTunnelRoute(route RouteI) error { msg, ok := route.(proto.Message) if !ok { return fmt.Errorf("can't proto marshal %T", msg) @@ -179,13 +179,13 @@ func (m *MsgCreateTunnel) SetTunnelRoute(route Route) error { // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (m MsgCreateTunnel) UnpackInterfaces(unpacker types.AnyUnpacker) error { - var route Route + var route RouteI return unpacker.UnpackAny(m.Route, &route) } // GetRoute returns the route of the message. -func (m MsgCreateTunnel) GetTunnelRoute() Route { - route, ok := m.Route.GetCachedValue().(Route) +func (m MsgCreateTunnel) GetTunnelRoute() RouteI { + route, ok := m.Route.GetCachedValue().(RouteI) if !ok { return nil } diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go new file mode 100644 index 000000000..13e27bb93 --- /dev/null +++ b/x/tunnel/types/packet.go @@ -0,0 +1,59 @@ +package types + +import ( + fmt "fmt" + + "github.com/cosmos/cosmos-sdk/codec/types" + proto "github.com/cosmos/gogoproto/proto" + + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" +) + +var _ types.UnpackInterfacesMessage = Packet{} + +func NewPacket( + tunnelID uint64, + nonce uint64, + feedType feedstypes.FeedType, + signalPriceInfos []SignalPriceInfo, + createdAt int64, +) Packet { + return Packet{ + TunnelID: tunnelID, + Nonce: nonce, + FeedType: feedType, + SignalPriceInfos: signalPriceInfos, + CreatedAt: createdAt, + } +} + +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (p Packet) UnpackInterfaces(unpacker types.AnyUnpacker) error { + var packetContent PacketContentI + return unpacker.UnpackAny(p.PacketContent, &packetContent) +} + +// SetPacketContent sets the packet content of the packet. +func (p *Packet) SetPacketContent(packetContent PacketContentI) error { + msg, ok := packetContent.(proto.Message) + if !ok { + return fmt.Errorf("can't proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return err + } + p.PacketContent = any + + return nil +} + +// GetGrant unpacks allowance +func (p Packet) GetContent() (PacketContentI, error) { + packetContent, ok := p.PacketContent.GetCachedValue().(PacketContentI) + if !ok { + return nil, ErrNoPacketContent.Wrapf("tunnelID: %d, nonce: %d", p.TunnelID, p.Nonce) + } + + return packetContent, nil +} diff --git a/x/tunnel/types/packet_content.go b/x/tunnel/types/packet_content.go new file mode 100644 index 000000000..90f710627 --- /dev/null +++ b/x/tunnel/types/packet_content.go @@ -0,0 +1,8 @@ +package types + +import "github.com/cosmos/gogoproto/proto" + +// PacketI defines a type that implements the Packet interface +type PacketContentI interface { + proto.Message +} diff --git a/x/tunnel/types/query.go b/x/tunnel/types/query.go deleted file mode 100644 index 9925ffac5..000000000 --- a/x/tunnel/types/query.go +++ /dev/null @@ -1,33 +0,0 @@ -package types - -import ( - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/cosmos/gogoproto/proto" -) - -var ( - _ codectypes.UnpackInterfacesMessage = &QueryPacketsResponse{} - _ codectypes.UnpackInterfacesMessage = &QueryPacketResponse{} -) - -// Packet defines a type that implements the Packet interface -type Packet interface { - proto.Message -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (m *QueryPacketsResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - for _, p := range m.Packets { - var packet Packet - if err := unpacker.UnpackAny(p, &packet); err != nil { - return err - } - } - return nil -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (m *QueryPacketResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - var packet Packet - return unpacker.UnpackAny(m.Packet, &packet) -} diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 282f2802e..09474d0dc 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/cosmos/cosmos-sdk/codec/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -323,7 +323,7 @@ func (m *QueryPacketsRequest) GetPagination() *query.PageRequest { // QueryPacketsResponse is the response type for the Query/Packets RPC method. type QueryPacketsResponse struct { // Packets is a list of packets. - Packets []*types.Any `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets,omitempty"` + Packets []*Packet `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets,omitempty"` // pagination defines an optional pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -361,7 +361,7 @@ func (m *QueryPacketsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPacketsResponse proto.InternalMessageInfo -func (m *QueryPacketsResponse) GetPackets() []*types.Any { +func (m *QueryPacketsResponse) GetPackets() []*Packet { if m != nil { return m.Packets } @@ -433,7 +433,7 @@ func (m *QueryPacketRequest) GetNonce() uint64 { // QueryPacketResponse is the response type for the Query/Packet RPC method. type QueryPacketResponse struct { // Packet is the packet with the given tunnel ID and nonce. - Packet *types.Any `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` + Packet *Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` } func (m *QueryPacketResponse) Reset() { *m = QueryPacketResponse{} } @@ -469,7 +469,7 @@ func (m *QueryPacketResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPacketResponse proto.InternalMessageInfo -func (m *QueryPacketResponse) GetPacket() *types.Any { +func (m *QueryPacketResponse) GetPacket() *Packet { if m != nil { return m.Packet } @@ -576,54 +576,53 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 739 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0xc7, 0xbb, 0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 0x97, 0x7a, 0xb3, 0xbf, 0x48, 0x66, 0x9d, 0xe1, 0x59, 0xa7, - 0xe0, 0x35, 0xd4, 0xf3, 0x75, 0x64, 0xf0, 0x1d, 0xc8, 0x88, 0x3d, 0x09, 0x95, 0xc6, 0xbc, 0xaf, - 0x16, 0xfa, 0x6a, 0x64, 0xce, 0x05, 0x9e, 0xf3, 0x16, 0x2c, 0x24, 0xe4, 0x44, 0xfb, 0xd1, 0x8d, - 0x3d, 0x80, 0x1f, 0x15, 0x90, 0x95, 0x16, 0x83, 0x49, 0x7d, 0xec, 0x76, 0x7f, 0x42, 0xdd, 0xe7, - 0x5c, 0xaa, 0x2f, 0x71, 0x86, 0x7b, 0x70, 0x61, 0x00, 0x06, 0x14, 0x5a, 0xf5, 0x50, 0xe9, 0x8c, - 0xbd, 0xf3, 0x9d, 0x38, 0xf6, 0x2e, 0xeb, 0xa9, 0x85, 0xbe, 0x1a, 0x09, 0xf2, 0x88, 0x83, 0x3c, - 0x84, 0x4b, 0xff, 0x01, 0x82, 0xf6, 0xb9, 0x51, 0x0f, 0x96, 0x2b, 0x47, 0x27, 0x9a, 0x72, 0x7c, - 0xa2, 0x29, 0xbf, 0x4f, 0x34, 0xe5, 0xf3, 0xa9, 0x96, 0x3a, 0x3e, 0xd5, 0x52, 0x3f, 0x4f, 0xb5, - 0xd4, 0x4b, 0x64, 0x3b, 0xfe, 0x56, 0xd0, 0x34, 0x2c, 0xba, 0x8d, 0x9a, 0xd8, 0xdd, 0xe4, 0x1e, - 0xb5, 0x68, 0x0b, 0x59, 0x5b, 0xd8, 0x71, 0xd1, 0x6e, 0x11, 0xbd, 0x09, 0x13, 0xfa, 0x7b, 0x1e, - 0x61, 0xcd, 0x0c, 0x57, 0x2c, 0xfd, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x4c, 0x75, 0x77, 0xea, - 0x07, 0x00, 0x00, + // 726 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00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 0xbf, 0xdd, 0x9f, 0xa4, 0x54, 0xa7, 0x85, 0xea, + 0x24, 0xbc, 0x81, 0x7a, 0x6e, 0x48, 0x06, 0xdf, 0x83, 0x9c, 0x8c, 0x49, 0xc9, 0x34, 0x31, 0xff, + 0x7a, 0xb1, 0x2f, 0x47, 0x69, 0xce, 0x0b, 0xcd, 0x3b, 0xb0, 0x98, 0xa2, 0x89, 0xf6, 0xe3, 0x37, + 0x7b, 0x00, 0x3f, 0x69, 0x60, 0x48, 0x8d, 0x19, 0x4c, 0xab, 0x63, 0xf7, 0x06, 0x48, 0xc9, 0xfb, + 0xdc, 0xa4, 0x9a, 0x8b, 0xc2, 0xc3, 0x7d, 0x38, 0x7f, 0x09, 0x0f, 0x28, 0x1a, 0xd6, 0x43, 0x2d, + 0x6c, 0x7b, 0xf8, 0x3b, 0xb5, 0xed, 0x5d, 0xc3, 0xa7, 0x17, 0xfb, 0x72, 0x94, 0x91, 0xc7, 0xc2, + 0xc8, 0x23, 0xb8, 0xf8, 0x1f, 0x46, 0xd0, 0xbe, 0x18, 0xd5, 0x83, 0xe5, 0xca, 0xd1, 0x89, 0xa1, + 0x1d, 0x9f, 0x18, 0xda, 0xef, 0x13, 0x43, 0xfb, 0x7c, 0x6a, 0x64, 0x8e, 0x4f, 0x8d, 0xcc, 0xcf, + 0x53, 0x23, 0xf3, 0x0a, 0x39, 0x2e, 0xdf, 0x0a, 0x9a, 0x56, 0x8b, 0x6e, 0xa3, 0x26, 0xf6, 0x36, + 0xc5, 0x3f, 0x5d, 0x8b, 0xb6, 0x51, 0x6b, 0x0b, 0xbb, 0x1e, 0xda, 0x2d, 0xa1, 0xb7, 0x91, 0x20, + 0xdf, 0xf3, 0x09, 0x6b, 0xe6, 0x04, 0x63, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x2d, + 0xa3, 0xc9, 0xee, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1921,7 +1920,7 @@ func (m *QueryPacketsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Packets = append(m.Packets, &types.Any{}) + m.Packets = append(m.Packets, &Packet{}) if err := m.Packets[len(m.Packets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2130,7 +2129,7 @@ func (m *QueryPacketResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Packet == nil { - m.Packet = &types.Any{} + m.Packet = &Packet{} } if err := m.Packet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/tunnel/types/route.go b/x/tunnel/types/route.go index d7fd1e49d..f0a222a89 100644 --- a/x/tunnel/types/route.go +++ b/x/tunnel/types/route.go @@ -2,8 +2,8 @@ package types import "github.com/cosmos/gogoproto/proto" -// Route defines a routing path to deliver data to the destination. -type Route interface { +// RouteI defines a routing path to deliver data to the destination. +type RouteI interface { proto.Message ValidateBasic() error diff --git a/x/tunnel/types/tss_route.go b/x/tunnel/types/tss_route.go index 95e6e22e8..285935a48 100644 --- a/x/tunnel/types/tss_route.go +++ b/x/tunnel/types/tss_route.go @@ -1,6 +1,6 @@ package types -var _ Route = &TSSRoute{} +var _ RouteI = &TSSRoute{} func (r *TSSRoute) ValidateBasic() error { return nil diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index c15054a71..4d3e91f2c 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -11,12 +11,12 @@ var _ types.UnpackInterfacesMessage = Tunnel{} // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (t Tunnel) UnpackInterfaces(unpacker types.AnyUnpacker) error { - var route Route + var route RouteI return unpacker.UnpackAny(t.Route, &route) } // SetRoute sets the route of the tunnel. -func (t *Tunnel) SetRoute(route Route) error { +func (t *Tunnel) SetRoute(route RouteI) error { msg, ok := route.(proto.Message) if !ok { return fmt.Errorf("can't proto marshal %T", msg) @@ -30,6 +30,17 @@ func (t *Tunnel) SetRoute(route Route) error { return nil } +// createPacket creates a new packet for the tunnel +func (t Tunnel) CreatePacket(createdAt int64) Packet { + return NewPacket( + t.ID, + t.NonceCount, + t.FeedType, + t.SignalPriceInfos, + createdAt, + ) +} + // IsTunnelInList checks if a tunnel with the given ID is in the list of tunnels. func IsTunnelInList(id uint64, tunnels []Tunnel) bool { for _, tunnel := range tunnels { diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 53e2a32f4..23b5a6d86 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -389,6 +389,7 @@ func (m *Tunnel) GetCreator() string { return "" } +// PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered type PendingTriggerTunnels struct { // IDs is a list of tunnel IDs that are waiting to be triggered IDs []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` @@ -434,30 +435,28 @@ func (m *PendingTriggerTunnels) GetIDs() []uint64 { return nil } -// TSSPacket is the packet type for TSS -type TSSPacket struct { - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - SigningID github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID `protobuf:"varint,5,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" json:"signing_id,omitempty"` - DestinationChainID string `protobuf:"bytes,6,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - DestinationContractAddress string `protobuf:"bytes,7,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +// Packet is the packet that tunnel produces +type Packet struct { + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + PacketContent *types.Any `protobuf:"bytes,5,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + CreatedAt int64 `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } -func (m *TSSPacket) Reset() { *m = TSSPacket{} } -func (m *TSSPacket) String() string { return proto.CompactTextString(m) } -func (*TSSPacket) ProtoMessage() {} -func (*TSSPacket) Descriptor() ([]byte, []int) { +func (m *Packet) Reset() { *m = Packet{} } +func (m *Packet) String() string { return proto.CompactTextString(m) } +func (*Packet) ProtoMessage() {} +func (*Packet) Descriptor() ([]byte, []int) { return fileDescriptor_b5270a56045f1d8a, []int{6} } -func (m *TSSPacket) XXX_Unmarshal(b []byte) error { +func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TSSPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TSSPacket.Marshal(b, m, deterministic) + return xxx_messageInfo_Packet.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -467,98 +466,79 @@ func (m *TSSPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *TSSPacket) XXX_Merge(src proto.Message) { - xxx_messageInfo_TSSPacket.Merge(m, src) +func (m *Packet) XXX_Merge(src proto.Message) { + xxx_messageInfo_Packet.Merge(m, src) } -func (m *TSSPacket) XXX_Size() int { +func (m *Packet) XXX_Size() int { return m.Size() } -func (m *TSSPacket) XXX_DiscardUnknown() { - xxx_messageInfo_TSSPacket.DiscardUnknown(m) +func (m *Packet) XXX_DiscardUnknown() { + xxx_messageInfo_Packet.DiscardUnknown(m) } -var xxx_messageInfo_TSSPacket proto.InternalMessageInfo +var xxx_messageInfo_Packet proto.InternalMessageInfo -func (m *TSSPacket) GetTunnelID() uint64 { +func (m *Packet) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *TSSPacket) GetNonce() uint64 { +func (m *Packet) GetNonce() uint64 { if m != nil { return m.Nonce } return 0 } -func (m *TSSPacket) GetFeedType() types1.FeedType { +func (m *Packet) GetFeedType() types1.FeedType { if m != nil { return m.FeedType } return types1.FEED_TYPE_UNSPECIFIED } -func (m *TSSPacket) GetSignalPriceInfos() []SignalPriceInfo { +func (m *Packet) GetSignalPriceInfos() []SignalPriceInfo { if m != nil { return m.SignalPriceInfos } return nil } -func (m *TSSPacket) GetSigningID() github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID { +func (m *Packet) GetPacketContent() *types.Any { if m != nil { - return m.SigningID - } - return 0 -} - -func (m *TSSPacket) GetDestinationChainID() string { - if m != nil { - return m.DestinationChainID - } - return "" -} - -func (m *TSSPacket) GetDestinationContractAddress() string { - if m != nil { - return m.DestinationContractAddress + return m.PacketContent } - return "" + return nil } -func (m *TSSPacket) GetCreatedAt() int64 { +func (m *Packet) GetCreatedAt() int64 { if m != nil { return m.CreatedAt } return 0 } -// AxelarPacket is the packet type for Axelar -type AxelarPacket struct { - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - IBCQueueID uint64 `protobuf:"varint,5,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` - DestinationChainID string `protobuf:"bytes,6,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - DestinationContractAddress string `protobuf:"bytes,7,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` - CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +// TSSPacketContent is the packet content for TSS +type TSSPacketContent struct { + SigningID github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" json:"signing_id,omitempty"` + DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } -func (m *AxelarPacket) Reset() { *m = AxelarPacket{} } -func (m *AxelarPacket) String() string { return proto.CompactTextString(m) } -func (*AxelarPacket) ProtoMessage() {} -func (*AxelarPacket) Descriptor() ([]byte, []int) { +func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } +func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } +func (*TSSPacketContent) ProtoMessage() {} +func (*TSSPacketContent) Descriptor() ([]byte, []int) { return fileDescriptor_b5270a56045f1d8a, []int{7} } -func (m *AxelarPacket) XXX_Unmarshal(b []byte) error { +func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AxelarPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TSSPacketContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_AxelarPacket.Marshal(b, m, deterministic) + return xxx_messageInfo_TSSPacketContent.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -568,74 +548,100 @@ func (m *AxelarPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *AxelarPacket) XXX_Merge(src proto.Message) { - xxx_messageInfo_AxelarPacket.Merge(m, src) +func (m *TSSPacketContent) XXX_Merge(src proto.Message) { + xxx_messageInfo_TSSPacketContent.Merge(m, src) } -func (m *AxelarPacket) XXX_Size() int { +func (m *TSSPacketContent) XXX_Size() int { return m.Size() } -func (m *AxelarPacket) XXX_DiscardUnknown() { - xxx_messageInfo_AxelarPacket.DiscardUnknown(m) +func (m *TSSPacketContent) XXX_DiscardUnknown() { + xxx_messageInfo_TSSPacketContent.DiscardUnknown(m) } -var xxx_messageInfo_AxelarPacket proto.InternalMessageInfo +var xxx_messageInfo_TSSPacketContent proto.InternalMessageInfo -func (m *AxelarPacket) GetTunnelID() uint64 { +func (m *TSSPacketContent) GetSigningID() github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID { if m != nil { - return m.TunnelID + return m.SigningID } return 0 } -func (m *AxelarPacket) GetNonce() uint64 { +func (m *TSSPacketContent) GetDestinationChainID() string { if m != nil { - return m.Nonce + return m.DestinationChainID } - return 0 + return "" } -func (m *AxelarPacket) GetFeedType() types1.FeedType { +func (m *TSSPacketContent) GetDestinationContractAddress() string { if m != nil { - return m.FeedType + return m.DestinationContractAddress } - return types1.FEED_TYPE_UNSPECIFIED + return "" } -func (m *AxelarPacket) GetSignalPriceInfos() []SignalPriceInfo { - if m != nil { - return m.SignalPriceInfos +// AxelarPacketContent is the packet content for Axelar +type AxelarPacketContent struct { + IBCQueueID uint64 `protobuf:"varint,1,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` + DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (m *AxelarPacketContent) Reset() { *m = AxelarPacketContent{} } +func (m *AxelarPacketContent) String() string { return proto.CompactTextString(m) } +func (*AxelarPacketContent) ProtoMessage() {} +func (*AxelarPacketContent) Descriptor() ([]byte, []int) { + return fileDescriptor_b5270a56045f1d8a, []int{8} +} +func (m *AxelarPacketContent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AxelarPacketContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AxelarPacketContent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return nil +} +func (m *AxelarPacketContent) XXX_Merge(src proto.Message) { + xxx_messageInfo_AxelarPacketContent.Merge(m, src) +} +func (m *AxelarPacketContent) XXX_Size() int { + return m.Size() +} +func (m *AxelarPacketContent) XXX_DiscardUnknown() { + xxx_messageInfo_AxelarPacketContent.DiscardUnknown(m) } -func (m *AxelarPacket) GetIBCQueueID() uint64 { +var xxx_messageInfo_AxelarPacketContent proto.InternalMessageInfo + +func (m *AxelarPacketContent) GetIBCQueueID() uint64 { if m != nil { return m.IBCQueueID } return 0 } -func (m *AxelarPacket) GetDestinationChainID() string { +func (m *AxelarPacketContent) GetDestinationChainID() string { if m != nil { return m.DestinationChainID } return "" } -func (m *AxelarPacket) GetDestinationContractAddress() string { +func (m *AxelarPacketContent) GetDestinationContractAddress() string { if m != nil { return m.DestinationContractAddress } return "" } -func (m *AxelarPacket) GetCreatedAt() int64 { - if m != nil { - return m.CreatedAt - } - return 0 -} - func init() { proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") @@ -643,71 +649,74 @@ func init() { proto.RegisterType((*SignalPriceInfo)(nil), "tunnel.v1beta1.SignalPriceInfo") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") proto.RegisterType((*PendingTriggerTunnels)(nil), "tunnel.v1beta1.PendingTriggerTunnels") - proto.RegisterType((*TSSPacket)(nil), "tunnel.v1beta1.TSSPacket") - proto.RegisterType((*AxelarPacket)(nil), "tunnel.v1beta1.AxelarPacket") + proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") + proto.RegisterType((*TSSPacketContent)(nil), "tunnel.v1beta1.TSSPacketContent") + proto.RegisterType((*AxelarPacketContent)(nil), "tunnel.v1beta1.AxelarPacketContent") } func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 902 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x3f, 0x8f, 0xe3, 0xc4, - 0x1b, 0x5e, 0xaf, 0x93, 0x6c, 0x3c, 0x9b, 0xdb, 0xdf, 0x69, 0x94, 0xdf, 0xe1, 0xdb, 0x85, 0x38, - 0x5a, 0x09, 0x29, 0x14, 0x67, 0x73, 0x81, 0x6d, 0x56, 0x42, 0x22, 0xde, 0x08, 0x9d, 0x85, 0x90, - 0x82, 0x93, 0x8a, 0xc6, 0x72, 0x3c, 0x13, 0xef, 0x70, 0xd9, 0x99, 0xe0, 0x99, 0x44, 0x97, 0x6f, - 0x71, 0x1f, 0x01, 0x24, 0x0a, 0x3e, 0xc0, 0xb5, 0xf4, 0x27, 0xaa, 0xd3, 0x55, 0x54, 0x16, 0xf2, - 0x36, 0x74, 0x34, 0x54, 0x54, 0x68, 0xfe, 0x24, 0xcb, 0x46, 0xa0, 0x3b, 0x09, 0x24, 0xfe, 0x74, - 0xf3, 0x3e, 0xef, 0x33, 0xe3, 0xf7, 0x9d, 0xe7, 0x79, 0x27, 0x01, 0x27, 0x62, 0x49, 0x29, 0x9e, - 0x07, 0xab, 0x87, 0x53, 0x2c, 0xd2, 0x87, 0x81, 0x0e, 0xfd, 0x45, 0xc1, 0x04, 0x83, 0x47, 0x26, - 0x32, 0xc9, 0xe3, 0x76, 0xce, 0x72, 0xa6, 0x52, 0x81, 0x5c, 0x69, 0xd6, 0xb1, 0x97, 0x33, 0x96, - 0xcf, 0x71, 0xa0, 0xa2, 0xe9, 0x72, 0x16, 0x08, 0x72, 0x85, 0xb9, 0x48, 0xaf, 0x16, 0x86, 0x70, - 0x7f, 0x97, 0x90, 0xd2, 0xf5, 0x26, 0x95, 0x31, 0x7e, 0xc5, 0x78, 0xa2, 0x0f, 0xd5, 0xc1, 0x26, - 0x35, 0xc3, 0x18, 0xf1, 0x6d, 0x61, 0x2a, 0xd2, 0xa9, 0xd3, 0xaf, 0x2c, 0xd0, 0x9c, 0x8c, 0xc7, - 0x31, 0x5b, 0x0a, 0x0c, 0x1f, 0x81, 0x36, 0xc2, 0x5c, 0x10, 0x9a, 0x0a, 0xc2, 0x68, 0x92, 0x5d, - 0xa6, 0x84, 0x26, 0x04, 0xb9, 0x56, 0xd7, 0xea, 0x39, 0xe1, 0xbd, 0xaa, 0xf4, 0xe0, 0xf0, 0x26, - 0x7f, 0x21, 0xd3, 0xd1, 0x30, 0x86, 0x68, 0x17, 0x43, 0xf0, 0x43, 0xf0, 0xe6, 0xad, 0x93, 0x18, - 0x15, 0x45, 0x9a, 0x89, 0x24, 0x45, 0xa8, 0xc0, 0x9c, 0xbb, 0xfb, 0xf2, 0xc4, 0xf8, 0xf8, 0xb7, - 0x3b, 0x0d, 0x65, 0xa0, 0x19, 0xe7, 0xce, 0x77, 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 0xff, 0x56, 0xfc, 0x07, 0x95, 0x7f, 0x17, - 0xb4, 0xc8, 0x34, 0x4b, 0xbe, 0x58, 0xe2, 0x25, 0xbe, 0xd1, 0xfe, 0xa8, 0x2a, 0x3d, 0x10, 0x85, - 0x17, 0x9f, 0x4a, 0x38, 0x1a, 0xc6, 0x80, 0x4c, 0x33, 0xbd, 0xfe, 0xf7, 0xe9, 0x17, 0x7e, 0xf2, - 0x4d, 0xd5, 0xb1, 0x9e, 0x57, 0x1d, 0xeb, 0x45, 0xd5, 0xb1, 0x7e, 0xa8, 0x3a, 0xd6, 0xd3, 0xeb, - 0xce, 0xde, 0x8b, 0xeb, 0xce, 0xde, 0xf7, 0xd7, 0x9d, 0xbd, 0xcf, 0x82, 0xd7, 0x70, 0xb5, 0xf9, - 0x17, 0xa6, 0x4c, 0x3d, 0x6d, 0x28, 0xc6, 0x7b, 0xbf, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xdb, - 0x35, 0x91, 0x9c, 0x09, 0x00, 0x00, + // 937 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0xae, 0x93, 0x34, 0x4d, 0x5e, 0xdb, 0x50, 0x0d, 0x61, 0xf1, 0xb6, 0x10, 0x47, 0x91, 0x90, + 0xc2, 0xa1, 0x36, 0x1b, 0x58, 0x0e, 0x95, 0x90, 0x88, 0x1b, 0xa1, 0xb5, 0x10, 0x22, 0x38, 0x39, + 0x71, 0xb1, 0x1c, 0x7b, 0xe2, 0x0e, 0x9b, 0xce, 0x18, 0xcf, 0x24, 0xda, 0xfc, 0x8b, 0xfd, 0x05, + 0x08, 0x21, 0x21, 0xf1, 0x03, 0xfa, 0x13, 0x38, 0xac, 0xf6, 0xb4, 0xda, 0x13, 0x27, 0x0b, 0xb9, + 0x07, 0x38, 0x72, 0xe6, 0x84, 0x3c,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 0x38, 0xb7, + 0x72, 0x62, 0xb9, 0xb9, 0xbe, 0xed, 0xd6, 0x8b, 0xf4, 0x4e, 0xf8, 0xd2, 0x75, 0x5f, 0xfa, 0xcf, + 0xd7, 0x7d, 0xf9, 0x95, 0xeb, 0xfe, 0x05, 0x74, 0x76, 0xfe, 0xd0, 0xe0, 0x6d, 0xf5, 0xf3, 0xb4, + 0xc9, 0xd1, 0x47, 0x70, 0x40, 0x26, 0x81, 0xf7, 0xfd, 0x1c, 0xcf, 0xf1, 0x0d, 0x4b, 0x8d, 0x2c, + 0x35, 0xc0, 0xb1, 0xcf, 0xbf, 0xc9, 0xdd, 0xce, 0xc0, 0x05, 0x32, 0x09, 0xd4, 0xf9, 0x8d, 0x7f, + 0xa9, 0xfd, 0xd5, 0x2f, 0x59, 0x4b, 0x7b, 0x92, 0xb5, 0xb4, 0x67, 0x59, 0x4b, 0xfb, 0x3d, 0x6b, + 0x69, 0x8f, 0xaf, 0x5b, 0x3b, 0xcf, 0xae, 0x5b, 0x3b, 0xbf, 0x5d, 0xb7, 0x76, 0xbe, 0xb5, 0x5e, + 0x43, 0xee, 0xe2, 0x3f, 0x92, 0x54, 0x7b, 0x52, 0x95, 0x88, 0x8f, 0xff, 0x09, 0x00, 0x00, 0xff, + 0xff, 0xdf, 0x9d, 0x0d, 0xeb, 0x3a, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -915,14 +924,14 @@ func (this *PendingTriggerTunnels) Equal(that interface{}) bool { } return true } -func (this *TSSPacket) Equal(that interface{}) bool { +func (this *Packet) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*TSSPacket) + that1, ok := that.(*Packet) if !ok { - that2, ok := that.(TSSPacket) + that2, ok := that.(Packet) if ok { that1 = &that2 } else { @@ -951,13 +960,7 @@ func (this *TSSPacket) Equal(that interface{}) bool { return false } } - if this.SigningID != that1.SigningID { - return false - } - if this.DestinationChainID != that1.DestinationChainID { - return false - } - if this.DestinationContractAddress != that1.DestinationContractAddress { + if !this.PacketContent.Equal(that1.PacketContent) { return false } if this.CreatedAt != that1.CreatedAt { @@ -965,14 +968,14 @@ func (this *TSSPacket) Equal(that interface{}) bool { } return true } -func (this *AxelarPacket) Equal(that interface{}) bool { +func (this *TSSPacketContent) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*AxelarPacket) + that1, ok := that.(*TSSPacketContent) if !ok { - that2, ok := that.(AxelarPacket) + that2, ok := that.(TSSPacketContent) if ok { that1 = &that2 } else { @@ -984,23 +987,36 @@ func (this *AxelarPacket) Equal(that interface{}) bool { } else if this == nil { return false } - if this.TunnelID != that1.TunnelID { + if this.SigningID != that1.SigningID { return false } - if this.Nonce != that1.Nonce { + if this.DestinationChainID != that1.DestinationChainID { return false } - if this.FeedType != that1.FeedType { + if this.DestinationContractAddress != that1.DestinationContractAddress { return false } - if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { - return false + return true +} +func (this *AxelarPacketContent) Equal(that interface{}) bool { + if that == nil { + return this == nil } - for i := range this.SignalPriceInfos { - if !this.SignalPriceInfos[i].Equal(&that1.SignalPriceInfos[i]) { + + that1, ok := that.(*AxelarPacketContent) + if !ok { + that2, ok := that.(AxelarPacketContent) + if ok { + that1 = &that2 + } else { return false } } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } if this.IBCQueueID != that1.IBCQueueID { return false } @@ -1010,9 +1026,6 @@ func (this *AxelarPacket) Equal(that interface{}) bool { if this.DestinationContractAddress != that1.DestinationContractAddress { return false } - if this.CreatedAt != that1.CreatedAt { - return false - } return true } func (m *TSSRoute) Marshal() (dAtA []byte, err error) { @@ -1318,7 +1331,7 @@ func (m *PendingTriggerTunnels) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TSSPacket) Marshal() (dAtA []byte, err error) { +func (m *Packet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1328,12 +1341,12 @@ func (m *TSSPacket) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TSSPacket) MarshalTo(dAtA []byte) (int, error) { +func (m *Packet) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1341,26 +1354,19 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.CreatedAt != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x30 } - if len(m.DestinationContractAddress) > 0 { - i -= len(m.DestinationContractAddress) - copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) - i-- - dAtA[i] = 0x3a - } - if len(m.DestinationChainID) > 0 { - i -= len(m.DestinationChainID) - copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) - i-- - dAtA[i] = 0x32 - } - if m.SigningID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.SigningID)) + if m.PacketContent != nil { + { + size, err := m.PacketContent.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTunnel(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x28 + dAtA[i] = 0x2a } if len(m.SignalPriceInfos) > 0 { for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { @@ -1394,7 +1400,7 @@ func (m *TSSPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *AxelarPacket) Marshal() (dAtA []byte, err error) { +func (m *TSSPacketContent) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1404,66 +1410,74 @@ func (m *AxelarPacket) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AxelarPacket) MarshalTo(dAtA []byte) (int, error) { +func (m *TSSPacketContent) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AxelarPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TSSPacketContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.CreatedAt != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) - i-- - dAtA[i] = 0x40 - } if len(m.DestinationContractAddress) > 0 { i -= len(m.DestinationContractAddress) copy(dAtA[i:], m.DestinationContractAddress) i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x1a } if len(m.DestinationChainID) > 0 { i -= len(m.DestinationChainID) copy(dAtA[i:], m.DestinationChainID) i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x12 } - if m.IBCQueueID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.IBCQueueID)) + if m.SigningID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.SigningID)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x8 } - if len(m.SignalPriceInfos) > 0 { - for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SignalPriceInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTunnel(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } + return len(dAtA) - i, nil +} + +func (m *AxelarPacketContent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if m.FeedType != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.FeedType)) + return dAtA[:n], nil +} + +func (m *AxelarPacketContent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AxelarPacketContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DestinationContractAddress) > 0 { + i -= len(m.DestinationContractAddress) + copy(dAtA[i:], m.DestinationContractAddress) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } - if m.Nonce != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) + if len(m.DestinationChainID) > 0 { + i -= len(m.DestinationChainID) + copy(dAtA[i:], m.DestinationChainID) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.TunnelID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) + if m.IBCQueueID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.IBCQueueID)) i-- dAtA[i] = 0x8 } @@ -1620,7 +1634,7 @@ func (m *PendingTriggerTunnels) Size() (n int) { return n } -func (m *TSSPacket) Size() (n int) { +func (m *Packet) Size() (n int) { if m == nil { return 0 } @@ -1641,6 +1655,22 @@ func (m *TSSPacket) Size() (n int) { n += 1 + l + sovTunnel(uint64(l)) } } + if m.PacketContent != nil { + l = m.PacketContent.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + if m.CreatedAt != 0 { + n += 1 + sovTunnel(uint64(m.CreatedAt)) + } + return n +} + +func (m *TSSPacketContent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l if m.SigningID != 0 { n += 1 + sovTunnel(uint64(m.SigningID)) } @@ -1652,33 +1682,15 @@ func (m *TSSPacket) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - if m.CreatedAt != 0 { - n += 1 + sovTunnel(uint64(m.CreatedAt)) - } return n } -func (m *AxelarPacket) Size() (n int) { +func (m *AxelarPacketContent) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.TunnelID != 0 { - n += 1 + sovTunnel(uint64(m.TunnelID)) - } - if m.Nonce != 0 { - n += 1 + sovTunnel(uint64(m.Nonce)) - } - if m.FeedType != 0 { - n += 1 + sovTunnel(uint64(m.FeedType)) - } - if len(m.SignalPriceInfos) > 0 { - for _, e := range m.SignalPriceInfos { - l = e.Size() - n += 1 + l + sovTunnel(uint64(l)) - } - } if m.IBCQueueID != 0 { n += 1 + sovTunnel(uint64(m.IBCQueueID)) } @@ -1690,9 +1702,6 @@ func (m *AxelarPacket) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - if m.CreatedAt != 0 { - n += 1 + sovTunnel(uint64(m.CreatedAt)) - } return n } @@ -2633,7 +2642,7 @@ func (m *PendingTriggerTunnels) Unmarshal(dAtA []byte) error { } return nil } -func (m *TSSPacket) Unmarshal(dAtA []byte) error { +func (m *Packet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2656,10 +2665,10 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TSSPacket: wiretype end group for non-group") + return fmt.Errorf("proto: Packet: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TSSPacket: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2754,29 +2763,10 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SigningID", wireType) - } - m.SigningID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SigningID |= github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PacketContent", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2786,57 +2776,29 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTunnel } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF } - m.DestinationChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + if m.PacketContent == nil { + m.PacketContent = &types.Any{} } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.PacketContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -2876,7 +2838,7 @@ func (m *TSSPacket) Unmarshal(dAtA []byte) error { } return nil } -func (m *AxelarPacket) Unmarshal(dAtA []byte) error { +func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2899,17 +2861,17 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AxelarPacket: wiretype end group for non-group") + return fmt.Errorf("proto: TSSPacketContent: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AxelarPacket: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SigningID", wireType) } - m.TunnelID = 0 + m.SigningID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2919,16 +2881,16 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TunnelID |= uint64(b&0x7F) << shift + m.SigningID |= github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID(b&0x7F) << shift if b < 0x80 { break } } case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) } - m.Nonce = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2938,35 +2900,29 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTunnel } - m.FeedType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeedType |= types1.FeedType(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTunnel } - case 4: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2976,27 +2932,75 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTunnel } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTunnel } if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPriceInfos = append(m.SignalPriceInfos, SignalPriceInfo{}) - if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTunnel(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 5: + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTunnel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AxelarPacketContent) 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 ErrIntOverflowTunnel + } + 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: AxelarPacketContent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AxelarPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IBCQueueID", wireType) } @@ -3015,7 +3019,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { break } } - case 6: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) } @@ -3047,7 +3051,7 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } m.DestinationChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) } @@ -3079,25 +3083,6 @@ func (m *AxelarPacket) Unmarshal(dAtA []byte) error { } m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - m.CreatedAt = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTunnel(dAtA[iNdEx:]) From 0ae83c197366aca989e81c2a964e984e20f2d6c0 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 19 Aug 2024 15:06:18 +0700 Subject: [PATCH 043/272] update error handling --- x/tunnel/keeper/msg_server.go | 7 +++++- x/tunnel/keeper/tss_packet_handler.go | 4 +++- x/tunnel/keeper/tunnel.go | 32 +++++++++++++-------------- x/tunnel/types/errors.go | 13 ++++++----- 4 files changed, 32 insertions(+), 24 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index b616c465f..5c1bd7c93 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -108,9 +108,14 @@ func (ms msgServer) ManualTriggerTunnel( return nil, err } if req.Creator != tunnel.Creator { - return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.ID) + return nil, types.ErrInvalidTunnelCreator.Wrapf( + "creator %s, tunnelID %d", + req.Creator, + req.ID, + ) } + // Add the tunnel to the pending trigger list ms.Keeper.AddPendingTriggerTunnel(ctx, req.ID) ctx.EventManager().EmitEvent(sdk.NewEvent( diff --git a/x/tunnel/keeper/tss_packet_handler.go b/x/tunnel/keeper/tss_packet_handler.go index 0349d3816..805411ca3 100644 --- a/x/tunnel/keeper/tss_packet_handler.go +++ b/x/tunnel/keeper/tss_packet_handler.go @@ -1,6 +1,8 @@ package keeper import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" @@ -19,7 +21,7 @@ func (k Keeper) TSSPacketHandler(ctx sdk.Context, route *types.TSSRoute, packet } err := packet.SetPacketContent(&packetContent) if err != nil { - panic(err) + panic(fmt.Errorf("failed to set packet content: %w", err)) } // Save the signed TSS packet diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index f413701fb..74b5f5615 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -130,6 +130,22 @@ func (k Keeper) GetPendingTriggerTunnels(ctx sdk.Context) (ids []uint64) { return pendingTriggerTunnels.IDs } +// ActivateTunnel activates a tunnel +func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error { + tunnel, err := k.GetTunnel(ctx, id) + if err != nil { + return err + } + + if tunnel.Creator != creator { + return fmt.Errorf("creator %s is not the creator of tunnel %d", creator, id) + } + tunnel.IsActive = true + + k.SetTunnel(ctx, tunnel) + return nil +} + // GetRequiredProcessTunnels returns all tunnels that require processing func (k Keeper) GetRequiredProcessTunnels( ctx sdk.Context, @@ -196,22 +212,6 @@ func (k Keeper) GetRequiredProcessTunnels( return tunnels } -// ActivateTunnel activates a tunnel -func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error { - tunnel, err := k.GetTunnel(ctx, id) - if err != nil { - return err - } - - if tunnel.Creator != creator { - return fmt.Errorf("creator %s is not the creator of tunnel %d", creator, id) - } - tunnel.IsActive = true - - k.SetTunnel(ctx, tunnel) - return nil -} - // SetParams sets the tunnel module parameters func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { // Increment the nonce diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index b5a5c8f4b..5bef606ec 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -6,10 +6,11 @@ import ( // x/tunnel module sentinel errors var ( - ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") - ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 3, "max tunnel channels") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 4, "tunnel not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 5, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 6, "no packet content") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 7, "account already exist") + ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") + ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 3, "max tunnel channels") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 4, "tunnel not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 5, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 6, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 7, "invalid creator of tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 8, "account already exist") ) From eb464a25a73ba98a338da467fbefe39f4883ea4e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 19 Aug 2024 15:58:45 +0700 Subject: [PATCH 044/272] add genesis test --- app/keepers/keepers.go | 2 +- x/tunnel/abci.go | 2 +- x/tunnel/genesis.go | 17 ++++- x/tunnel/genesis_test.go | 85 ++++++++++++++++++++++ x/tunnel/keeper/grpc_query.go | 4 +- x/tunnel/keeper/keeper.go | 29 +++++++- x/tunnel/keeper/msg_server.go | 4 +- x/tunnel/module.go | 4 +- x/tunnel/testutil/mock_expected_keepers.go | 40 ++++++++++ x/tunnel/testutil/mock_keeper.go | 3 +- x/tunnel/types/expected_keepers.go | 5 +- 11 files changed, 180 insertions(+), 15 deletions(-) create mode 100644 x/tunnel/genesis_test.go diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index d2776a4b9..cf4387aa2 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -59,7 +59,7 @@ type AppKeepers struct { FeedsKeeper feedskeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper GlobalfeeKeeper globalfeekeeper.Keeper - TunnelKeeper tunnelkeeper.Keeper + TunnelKeeper *tunnelkeeper.Keeper RestakeKeeper restakekeeper.Keeper // make scoped keepers public for test purposes diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index a258c3da2..626a3ba5b 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -9,7 +9,7 @@ import ( func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { } -func EndBlocker(ctx sdk.Context, k keeper.Keeper) { +func EndBlocker(ctx sdk.Context, k *keeper.Keeper) { tunnels := k.GetRequiredProcessTunnels(ctx) for _, tunnel := range tunnels { diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 8b683cd4c..4edd928c0 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -1,6 +1,8 @@ package tunnel import ( + "fmt" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -36,11 +38,22 @@ func ValidateGenesis(data *types.GenesisState) error { } // InitGenesis initializes the module's state from a provided genesis state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, data *types.GenesisState) { +func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { if err := k.SetParams(ctx, data.Params); err != nil { panic(err) } + // check if the module account exists + moduleAcc := k.GetTunnelAccount(ctx) + if moduleAcc == nil { + panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + } + // Set module account if its balance is zero + if balance := k.GetModuleBalance(ctx); balance.IsZero() { + k.SetModuleAccount(ctx, moduleAcc) + } + + // Set the tunnel count k.SetTunnelCount(ctx, data.TunnelCount) for _, tunnel := range data.Tunnels { @@ -49,7 +62,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, data *types.GenesisState) { } // ExportGenesis returns the module's exported genesis -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { +func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { return &types.GenesisState{ Params: k.GetParams(ctx), TunnelCount: k.GetTunnelCount(ctx), diff --git a/x/tunnel/genesis_test.go b/x/tunnel/genesis_test.go new file mode 100644 index 000000000..b0ba09326 --- /dev/null +++ b/x/tunnel/genesis_test.go @@ -0,0 +1,85 @@ +package tunnel_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/bandprotocol/chain/v2/x/tunnel" + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func TestValidateGenesis(t *testing.T) { + // Create a valid genesis state + validGenesisState := &types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 1, + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + } + + // Test with valid genesis state + err := tunnel.ValidateGenesis(validGenesisState) + require.NoError(t, err) + + // Test with invalid tunnel count + invalidGenesisState := &types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + } + err = tunnel.ValidateGenesis(invalidGenesisState) + require.Error(t, err) + + // Test with invalid tunnel IDs + invalidGenesisState = &types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 1, + Tunnels: []types.Tunnel{ + {ID: 2}, + }, + } + err = tunnel.ValidateGenesis(invalidGenesisState) + require.Error(t, err) +} + +func TestInitExportGenesis(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Mock the account keeper + s.MockAccountKeeper.EXPECT(). + GetModuleAccount(ctx, gomock.Any()). + Return(authtypes.AccountI(&authtypes.ModuleAccount{ + BaseAccount: &authtypes.BaseAccount{Address: "test"}, + })). + AnyTimes() + s.MockAccountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(sdk.AccAddress{}).AnyTimes() + s.MockAccountKeeper.EXPECT().SetModuleAccount(ctx, gomock.Any()).AnyTimes() + s.MockBankKeeper.EXPECT().GetAllBalances(ctx, gomock.Any()).Return(sdk.Coins{}).AnyTimes() + + // Create a valid genesis state + genesisState := &types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 1, + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + } + + // Initialize the genesis state + tunnel.InitGenesis(ctx, k, genesisState) + + // Export the genesis state + exportedGenesisState := tunnel.ExportGenesis(ctx, k) + + // Verify the exported state matches the initialized state + require.Equal(t, genesisState, exportedGenesisState) +} diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 5231df19a..ac3a443c9 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -14,9 +14,9 @@ import ( var _ types.QueryServer = queryServer{} -type queryServer struct{ k Keeper } +type queryServer struct{ k *Keeper } -func NewQueryServer(k Keeper) types.QueryServer { +func NewQueryServer(k *Keeper) types.QueryServer { return queryServer{k: k} } diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index a7697b9df..ddc74b524 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -1,10 +1,13 @@ package keeper import ( + "fmt" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -31,13 +34,18 @@ func NewKeeper( feedsKeeper types.FeedsKeeper, bandtssKeeper types.BandtssKeeper, authority string, -) Keeper { +) *Keeper { + // ensure tunnel module account is set + if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { + panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + } + // ensure that authority is a valid AccAddress if _, err := sdk.AccAddressFromBech32(authority); err != nil { - panic("authority is not a valid acc address") + panic(fmt.Errorf("invalid bandtss authority address: %w", err)) } - return Keeper{ + return &Keeper{ cdc: cdc, storeKey: key, authKeeper: authKeeper, @@ -48,6 +56,21 @@ func NewKeeper( } } +// GetTunnelAccount returns the tunnel ModuleAccount +func (k Keeper) GetTunnelAccount(ctx sdk.Context) authtypes.ModuleAccountI { + return k.authKeeper.GetModuleAccount(ctx, types.ModuleName) +} + +// GetModuleBalance returns the balance of the tunnel ModuleAccount +func (k Keeper) GetModuleBalance(ctx sdk.Context) sdk.Coins { + return k.bankKeeper.GetAllBalances(ctx, k.GetTunnelAccount(ctx).GetAddress()) +} + +// SetModuleAccount sets a module account in the account keeper. +func (k Keeper) SetModuleAccount(ctx sdk.Context, acc authtypes.ModuleAccountI) { + k.authKeeper.SetModuleAccount(ctx, acc) +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 5c1bd7c93..4f3deb089 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -13,11 +13,11 @@ import ( var _ types.MsgServer = msgServer{} type msgServer struct { - Keeper + *Keeper } // NewMsgServerImpl returns an implementation of the x/tunnel MsgServer interface. -func NewMsgServerImpl(keeper Keeper) types.MsgServer { +func NewMsgServerImpl(keeper *Keeper) types.MsgServer { return &msgServer{Keeper: keeper} } diff --git a/x/tunnel/module.go b/x/tunnel/module.go index 2770468b6..5969a4aef 100644 --- a/x/tunnel/module.go +++ b/x/tunnel/module.go @@ -88,13 +88,13 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { type AppModule struct { AppModuleBasic - keeper keeper.Keeper + keeper *keeper.Keeper } // NewAppModule creates a new AppModule object func NewAppModule( cdc codec.Codec, - keeper keeper.Keeper, + keeper *keeper.Keeper, ) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc}, diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go index 54ca0c7db..13ee12d90 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -57,6 +57,34 @@ func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) } +// GetModuleAccount mocks base method. +func (m *MockAccountKeeper) GetModuleAccount(ctx types2.Context, name string) types3.ModuleAccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAccount", ctx, name) + ret0, _ := ret[0].(types3.ModuleAccountI) + return ret0 +} + +// GetModuleAccount indicates an expected call of GetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, name any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, name) +} + +// GetModuleAddress mocks base method. +func (m *MockAccountKeeper) GetModuleAddress(name string) types2.AccAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddress", name) + ret0, _ := ret[0].(types2.AccAddress) + return ret0 +} + +// GetModuleAddress indicates an expected call of GetModuleAddress. +func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) +} + // IterateAccounts mocks base method. func (m *MockAccountKeeper) IterateAccounts(ctx types2.Context, process func(types3.AccountI) bool) { m.ctrl.T.Helper() @@ -95,6 +123,18 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, account any) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, account) } +// SetModuleAccount mocks base method. +func (m *MockAccountKeeper) SetModuleAccount(arg0 types2.Context, arg1 types3.ModuleAccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetModuleAccount", arg0, arg1) +} + +// SetModuleAccount indicates an expected call of SetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1) +} + // MockBankKeeper is a mock of BankKeeper interface. type MockBankKeeper struct { ctrl *gomock.Controller diff --git a/x/tunnel/testutil/mock_keeper.go b/x/tunnel/testutil/mock_keeper.go index c9b75c835..ced606042 100644 --- a/x/tunnel/testutil/mock_keeper.go +++ b/x/tunnel/testutil/mock_keeper.go @@ -47,6 +47,7 @@ func NewTestSuite(t *testing.T) TestSuite { bandtssKeeper := NewMockBandtssKeeper(ctrl) authority := authtypes.NewModuleAddress(govtypes.ModuleName) + accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authority).AnyTimes() tunnelKeeper := keeper.NewKeeper( encCfg.Codec.(codec.BinaryCodec), key, @@ -60,7 +61,7 @@ func NewTestSuite(t *testing.T) TestSuite { return TestSuite{ t: t, - Keeper: &tunnelKeeper, + Keeper: tunnelKeeper, QueryServer: queryServer, MockAccountKeeper: accountKeeper, MockBankKeeper: bankKeeper, diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 659592f00..3d6d8f0b3 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -11,9 +11,12 @@ import ( // AccountKeeper defines the expected account keeper (noalias) type AccountKeeper interface { + GetModuleAddress(name string) sdk.AccAddress + GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI + SetModuleAccount(sdk.Context, authtypes.ModuleAccountI) + IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool)) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - NewAccount(ctx sdk.Context, account authtypes.AccountI) authtypes.AccountI SetAccount(ctx sdk.Context, account authtypes.AccountI) } From 572b0c60ab004df9bc7120a9b5257b7ce42fe2ca Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 19 Aug 2024 16:09:22 +0700 Subject: [PATCH 045/272] add module account perms --- app/app.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/app.go b/app/app.go index 8cfc6ddf2..acabc98b4 100644 --- a/app/app.go +++ b/app/app.go @@ -216,6 +216,7 @@ var ( ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, bandtsstypes.ModuleName: nil, restaketypes.ModuleName: nil, + tunneltypes.ModuleName: nil, } Upgrades = []upgrades.Upgrade{v2_6.Upgrade} From 2b4128ec7c71c4b10e017df8161e1fcc291fca9b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 21 Aug 2024 15:21:37 +0700 Subject: [PATCH 046/272] typo --- proto/tunnel/v1beta1/tx.proto | 2 +- x/tunnel/types/tx.pb.go | 84 +++++++++++++++++------------------ 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index bdf423b6d..653dba1eb 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -69,7 +69,7 @@ message MsgActivateTunnelResponse {} // MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. message MsgManualTriggerTunnel { option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "tunnel/MsgManualTrigger"; + option (amino.name) = "tunnel/MsgManualTriggerTunnel"; // tunnel_id is the ID of the tunnel to manually trigger. uint64 id = 1 [(gogoproto.customname) = "ID"]; diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 9de417667..529c4fd69 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -453,53 +453,53 @@ func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2 var fileDescriptor_747f2bf21e50fad9 = []byte{ // 749 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x3f, 0x6f, 0xd3, 0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0x42, 0x31, 0xaa, 0x21, 0xd2, 0xa9, 0x85, 0x8d, 0x3b, 0x08, 0x61, 0x2b, 0xbf, 0x01, 0x2b, 0x91, + 0xde, 0x7c, 0x18, 0x63, 0x3a, 0x4b, 0x29, 0x6c, 0xde, 0x49, 0x09, 0xfd, 0xf7, 0xc0, 0xff, 0x71, + 0xed, 0xf3, 0x28, 0xc6, 0x43, 0x0c, 0xaf, 0x60, 0xdc, 0x8f, 0x17, 0x5e, 0x77, 0x0c, 0x32, 0x33, + 0x45, 0x8f, 0x4b, 0xd4, 0x34, 0x21, 0x36, 0x51, 0x71, 0xa5, 0xa8, 0xd5, 0x2f, 0xc7, 0xba, 0x72, + 0x35, 0xd6, 0x95, 0x9f, 0x63, 0x5d, 0xf9, 0x74, 0xa3, 0x27, 0xae, 0x6e, 0xf4, 0xc4, 0xf7, 0x1b, + 0x3d, 0xf1, 0xda, 0x9c, 0x1a, 0x5c, 0x2d, 0x1b, 0x3b, 0x7c, 0xa2, 0xb6, 0x49, 0xd7, 0x6c, 0x9f, + 0xd8, 0x08, 0x9b, 0xc3, 0xaa, 0x79, 0x2a, 0xc7, 0xbf, 0x98, 0x62, 0xad, 0x05, 0xce, 0x78, 0xf2, + 0x2b, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x30, 0x36, 0x67, 0x02, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 0b288629067bc61f3fc8a47c58365600f42a1dfd Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 23 Aug 2024 14:28:13 +0700 Subject: [PATCH 047/272] update tunnel generate packets logic --- proto/tunnel/v1beta1/params.proto | 1 - proto/tunnel/v1beta1/query.proto | 17 +- proto/tunnel/v1beta1/tunnel.proto | 45 ++- proto/tunnel/v1beta1/tx.proto | 12 +- scripts/tunnel/signal_infos.json | 8 +- x/tunnel/abci.go | 9 +- x/tunnel/client/cli/query.go | 8 +- x/tunnel/client/cli/tx.go | 14 +- x/tunnel/client/cli/util_test.go | 4 +- x/tunnel/genesis.go | 7 +- x/tunnel/keeper/account.go | 2 +- x/tunnel/keeper/axelar_packet_handler.go | 6 +- x/tunnel/keeper/grpc_query.go | 6 +- x/tunnel/keeper/msg_server.go | 7 +- x/tunnel/keeper/packet.go | 7 - x/tunnel/keeper/packet_test.go | 19 -- x/tunnel/keeper/tss_packet_handler.go | 10 +- x/tunnel/keeper/tss_packet_handler_test.go | 11 +- x/tunnel/keeper/tunnel.go | 193 +++++++---- x/tunnel/keeper/tunnel_test.go | 256 +++++++++----- x/tunnel/types/events.go | 2 +- x/tunnel/types/keys.go | 4 +- x/tunnel/types/msgs.go | 10 +- x/tunnel/types/packet.go | 6 +- x/tunnel/types/params.go | 2 +- x/tunnel/types/params.pb.go | 55 ++- x/tunnel/types/query.pb.go | 123 ++++--- x/tunnel/types/tunnel.go | 30 +- x/tunnel/types/tunnel.pb.go | 376 ++++++++++----------- x/tunnel/types/tx.pb.go | 157 +++++---- 30 files changed, 789 insertions(+), 618 deletions(-) diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto index 14e2cdeea..63d7102ff 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/tunnel/v1beta1/params.proto @@ -5,7 +5,6 @@ option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; // Params is the data structure that keeps the parameters of the module. message Params { diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index 45890516b..b0c5524bf 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -6,7 +6,6 @@ option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; import "tunnel/v1beta1/params.proto"; import "tunnel/v1beta1/tunnel.proto"; @@ -42,15 +41,15 @@ service Query { enum TunnelStatusFilter { option (gogoproto.goproto_enum_prefix) = false; - // TUNNEL_STATUS_UNSPECIFIED defines an unspecified status. - TUNNEL_STATUS_UNSPECIFIED = 0; - // TUNNEL_STATUS_ACTIVE defines an active tunnel. - TUNNEL_STATUS_ACTIVE = 1; - // TUNNEL_STATUS_INACTIVE defines an inactive tunnel. - TUNNEL_STATUS_INACTIVE = 2; + // TUNNEL_STATUS_FILTER_UNSPECIFIED defines an unspecified status. + TUNNEL_STATUS_FILTER_UNSPECIFIED = 0; + // TUNNEL_STATUS_FILTER_ACTIVE defines an active tunnel. + TUNNEL_STATUS_FILTER_ACTIVE = 1; + // TUNNEL_STATUS_FILTER_INACTIVE defines an inactive tunnel. + TUNNEL_STATUS_FILTER_INACTIVE = 2; } -// QueryTunnelRequest is the request type for the Query/Tunnel RPC method. +// QueryTunnelsRequest is the request type for the Query/Tunnel RPC method. message QueryTunnelsRequest { // is_active is a flag to filter active tunnels. TunnelStatusFilter is_active = 1; @@ -58,7 +57,7 @@ message QueryTunnelsRequest { cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryTunnelResponse is the response type for the Query/Tunnel RPC method. +// QueryTunnelsResponse is the response type for the Query/Tunnel RPC method. message QueryTunnelsResponse { // Tunnels is a list of tunnels. repeated Tunnel tunnels = 1; diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 5ad0c3319..4ba83b9b0 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package tunnel.v1beta1; import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; @@ -31,36 +30,37 @@ message AxelarRoute { message SignalInfo { option (gogoproto.equal) = true; - string signal_id = 1 [(gogoproto.customname) = "SignalID"]; - uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; - int64 interval = 3; + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; + uint64 soft_deviation_bps = 2 [(gogoproto.customname) = "SoftDeviationBPS"]; + uint64 hard_deviation_bps = 3 [(gogoproto.customname) = "HardDeviationBPS"]; } // SignalPriceInfo is the type for a signal price info message SignalPriceInfo { option (gogoproto.equal) = true; - string signal_id = 1 [(gogoproto.customname) = "SignalID"]; - uint64 deviation_bps = 2 [(gogoproto.customname) = "DeviationBPS"]; - int64 interval = 3; - uint64 price = 4; - int64 last_timestamp = 5; + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; + uint64 soft_deviation_bps = 2 [(gogoproto.customname) = "SoftDeviationBPS"]; + uint64 hard_deviation_bps = 3 [(gogoproto.customname) = "HardDeviationBPS"]; + uint64 price = 4; + int64 timestamp = 5; } // Tunnel is the type for a tunnel message Tunnel { option (gogoproto.equal) = true; - uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 nonce_count = 2; - google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; - feeds.v1beta1.FeedType feed_type = 4; - string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; - uint64 last_triggered_block_height = 7; - bool is_active = 8; - int64 created_at = 9; - string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 id = 1 [(gogoproto.customname) = "ID"]; + uint64 nonce_count = 2; + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; + feeds.v1beta1.FeedType feed_type = 4; + string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; + uint64 interval = 7; + int64 timestamp = 8; + bool is_active = 9; + int64 created_at = 10; + string creator = 11 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered @@ -73,10 +73,9 @@ message PendingTriggerTunnels { message Packet { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; uint64 nonce = 2; - feeds.v1beta1.FeedType feed_type = 3; - repeated SignalPriceInfo signal_price_infos = 4 [(gogoproto.nullable) = false]; - google.protobuf.Any packet_content = 5 [(cosmos_proto.accepts_interface) = "PacketContentI"]; - int64 created_at = 6; + repeated SignalPriceInfo signal_price_infos = 3 [(gogoproto.nullable) = false]; + google.protobuf.Any packet_content = 4 [(cosmos_proto.accepts_interface) = "PacketContentI"]; + int64 created_at = 5; } // TSSPacketContent is the packet content for TSS diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 653dba1eb..4ae1f73e2 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -36,15 +36,17 @@ message MsgCreateTunnel { // signal_infos is the list of signal infos. repeated SignalInfo signal_infos = 1 [(gogoproto.nullable) = false]; + // interval is the interval for delivering the signal prices. + uint64 interval = 2; // route is the route for delivering the signal prices - google.protobuf.Any route = 2 [(cosmos_proto.accepts_interface) = "Route"]; + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; // feed_type is the type of feed data. - feeds.v1beta1.FeedType feed_type = 3; + feeds.v1beta1.FeedType feed_type = 4; // deposit is the deposit required to create a tunnel. - repeated cosmos.base.v1beta1.Coin deposit = 4 + repeated cosmos.base.v1beta1.Coin deposit = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // creator is the address of the creator. - string creator = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string creator = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. @@ -72,7 +74,7 @@ message MsgManualTriggerTunnel { option (amino.name) = "tunnel/MsgManualTriggerTunnel"; // tunnel_id is the ID of the tunnel to manually trigger. - uint64 id = 1 [(gogoproto.customname) = "ID"]; + uint64 tunnel_id = 1 [(gogoproto.customname) = "ID"]; // creator is the address of the creator. string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } diff --git a/scripts/tunnel/signal_infos.json b/scripts/tunnel/signal_infos.json index 462dcb662..b68bdb25b 100644 --- a/scripts/tunnel/signal_infos.json +++ b/scripts/tunnel/signal_infos.json @@ -2,13 +2,13 @@ "signal_infos": [ { "signal_id": "BTC", - "deviation_bps": 10, - "interval": 5 + "soft_deviation_bps": 0, + "hard_deviation_bps": 2000 }, { "signal_id": "ETH", - "deviation_bps": 10, - "interval": 5 + "soft_deviation_bps": 0, + "hard_deviation_bps": 4000 } ] } diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index 626a3ba5b..635d7f436 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -10,9 +10,10 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { } func EndBlocker(ctx sdk.Context, k *keeper.Keeper) { - tunnels := k.GetRequiredProcessTunnels(ctx) - - for _, tunnel := range tunnels { - k.ProcessTunnel(ctx, tunnel) + // Generate packets to be sent + packets := k.GeneratePackets(ctx) + for _, packet := range packets { + // Send packet to the destination route and store the packet + k.HandlePacket(ctx, packet) } } diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index b9ffff024..8867bc2a5 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -24,8 +24,8 @@ func GetQueryCmd() *cobra.Command { } queryCmd.AddCommand( - GetQueryCmdTunnel(), GetQueryCmdTunnels(), + GetQueryCmdTunnel(), GetQueryCmdPackets(), GetQueryCmdPacket(), GetQueryCmdParams(), @@ -95,11 +95,11 @@ func GetQueryCmdTunnels() *cobra.Command { var statusFilter types.TunnelStatusFilter if !cmd.Flags().Changed(flagTunnelStatusFilter) { - statusFilter = types.TUNNEL_STATUS_UNSPECIFIED + statusFilter = types.TUNNEL_STATUS_FILTER_UNSPECIFIED } else if statusFilterFlag { - statusFilter = types.TUNNEL_STATUS_ACTIVE + statusFilter = types.TUNNEL_STATUS_FILTER_ACTIVE } else { - statusFilter = types.TUNNEL_STATUS_INACTIVE + statusFilter = types.TUNNEL_STATUS_FILTER_INACTIVE } res, err := queryClient.Tunnels(context.Background(), &types.QueryTunnelsRequest{ diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index e767ff215..9a814a122 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -56,6 +56,11 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } + interval, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + var route types.RouteI tssRoute := types.TSSRoute{ DestinationChainID: args[1], @@ -65,8 +70,9 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { msg, err := types.NewMsgCreateTunnel( signalInfos, - feedstypes.FeedType(feedType), + interval, route, + feedstypes.FeedType(feedType), deposit, clientCtx.GetFromAddress(), ) @@ -111,7 +117,7 @@ func GetTxCmdActivateTunnel() *cobra.Command { func GetTxCmdManualTriggerTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "manual-trigger-tunnel [id]", + Use: "manual-trigger-tunnel [tunnel-id]", Short: "Manual trigger a tunnel", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -120,12 +126,12 @@ func GetTxCmdManualTriggerTunnel() *cobra.Command { return err } - id, err := strconv.ParseUint(args[0], 10, 64) + tunnelID, err := strconv.ParseUint(args[0], 10, 64) if err != nil { return err } - msg := types.NewMsgManualTriggerTunnel(id, clientCtx.GetFromAddress().String()) + msg := types.NewMsgManualTriggerTunnel(tunnelID, clientCtx.GetFromAddress().String()) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/tunnel/client/cli/util_test.go b/x/tunnel/client/cli/util_test.go index 3f2b0ee66..800cc2453 100644 --- a/x/tunnel/client/cli/util_test.go +++ b/x/tunnel/client/cli/util_test.go @@ -15,8 +15,8 @@ func TestParseSignalInfos(t *testing.T) { t.Run("valid signal info", func(t *testing.T) { // Setup signalInfos := []types.SignalInfo{ - {SignalID: "BTC", DeviationBPS: 10, Interval: 10}, - {SignalID: "ETH", DeviationBPS: 10, Interval: 10}, + {SignalID: "BTC", SoftDeviationBPS: 1000, HardDeviationBPS: 2000}, + {SignalID: "ETH", SoftDeviationBPS: 3000, HardDeviationBPS: 4000}, } file, cleanup := createTempSignalInfoFile(signalInfos) defer cleanup() diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 4edd928c0..37c0334d2 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -3,7 +3,6 @@ package tunnel import ( "fmt" - errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v2/x/tunnel/keeper" @@ -14,8 +13,7 @@ import ( func ValidateGenesis(data *types.GenesisState) error { // Validate the tunnel count if uint64(len(data.Tunnels)) != data.TunnelCount { - return errorsmod.Wrapf( - types.ErrInvalidGenesis, + return types.ErrInvalidGenesis.Wrapf( "TunnelCount: %d, actual tunnels: %d", data.TunnelCount, len(data.Tunnels), @@ -25,8 +23,7 @@ func ValidateGenesis(data *types.GenesisState) error { // Validate the tunnel IDs for _, tunnel := range data.Tunnels { if tunnel.ID > data.TunnelCount { - return errorsmod.Wrapf( - types.ErrInvalidGenesis, + return types.ErrInvalidGenesis.Wrapf( "TunnelID %d is greater than the TunnelCount %d", tunnel.ID, data.TunnelCount, diff --git a/x/tunnel/keeper/account.go b/x/tunnel/keeper/account.go index 0c7b3322c..d40d3061d 100644 --- a/x/tunnel/keeper/account.go +++ b/x/tunnel/keeper/account.go @@ -14,7 +14,7 @@ func (k Keeper) GenerateAccount(ctx sdk.Context, key string) (sdk.AccAddress, er buf = append(buf, header.AppHash...) buf = append(buf, header.DataHash...) - moduleCred, err := authtypes.NewModuleCredential(types.ModuleName, []byte(types.KeyAccountsKey), buf) + moduleCred, err := authtypes.NewModuleCredential(types.ModuleName, []byte(types.TunnelAccountsKey), buf) if err != nil { return nil, err } diff --git a/x/tunnel/keeper/axelar_packet_handler.go b/x/tunnel/keeper/axelar_packet_handler.go index 301a2df05..5c16fb6ab 100644 --- a/x/tunnel/keeper/axelar_packet_handler.go +++ b/x/tunnel/keeper/axelar_packet_handler.go @@ -6,5 +6,7 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// AxelarPacketHandler handles incoming Axelar packets -func (k Keeper) AxelarPacketHandler(ctx sdk.Context, route *types.AxelarRoute, packet types.Packet) {} +// AxelarPacketHandle handles incoming Axelar packets +func (k Keeper) AxelarPacketHandle(ctx sdk.Context, route *types.AxelarRoute, packet types.Packet) error { + return nil +} diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index ac3a443c9..98a49f4c7 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -32,13 +32,13 @@ func (q queryServer) Tunnels(c context.Context, req *types.QueryTunnelsRequest) func(key []byte, t *types.Tunnel) (*types.Tunnel, error) { // Filter by status switch req.IsActive { - case types.TUNNEL_STATUS_UNSPECIFIED: + case types.TUNNEL_STATUS_FILTER_UNSPECIFIED: return t, nil - case types.TUNNEL_STATUS_ACTIVE: + case types.TUNNEL_STATUS_FILTER_ACTIVE: if t.IsActive { return t, nil } - case types.TUNNEL_STATUS_INACTIVE: + case types.TUNNEL_STATUS_FILTER_INACTIVE: if !t.IsActive { return t, nil } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 4f3deb089..8975a6ff7 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -31,9 +31,9 @@ func (ms msgServer) CreateTunnel( var signalPriceInfos []types.SignalPriceInfo for _, signalInfo := range req.SignalInfos { signalPriceInfos = append(signalPriceInfos, types.SignalPriceInfo{ - SignalID: signalInfo.SignalID, - DeviationBPS: signalInfo.DeviationBPS, - Interval: signalInfo.Interval, + SignalID: signalInfo.SignalID, + SoftDeviationBPS: signalInfo.SoftDeviationBPS, + HardDeviationBPS: signalInfo.HardDeviationBPS, }) } @@ -41,6 +41,7 @@ func (ms msgServer) CreateTunnel( Route: req.Route, FeedType: req.FeedType, SignalPriceInfos: signalPriceInfos, + Interval: req.Interval, IsActive: false, Creator: req.Creator, }) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index d111e1d73..0c5f431ed 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -12,13 +12,6 @@ func (k Keeper) SetPacket(ctx sdk.Context, packet types.Packet) { Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.Nonce), k.cdc.MustMarshal(&packet)) } -// AddPacket adds a packet to the store -func (k Keeper) AddPacket(ctx sdk.Context, packet types.Packet) { - // Set the creation time - packet.CreatedAt = ctx.BlockTime().Unix() - k.SetPacket(ctx, packet) -} - // GetPacket retrieves a packet by its tunnel ID and packet ID func (k Keeper) GetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) (types.Packet, error) { bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, nonce)) diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 0c0c5854f..0981bbb81 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -26,25 +26,6 @@ func TestGetSetPacket(t *testing.T) { require.Equal(t, packet, storedPacket) } -func TestAddPacket(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx := s.Ctx - k := s.Keeper - - packet := types.Packet{ - TunnelID: 1, - Nonce: 1, - } - - k.AddPacket(ctx, packet) - - storedPacket, err := k.GetPacket(ctx, packet.TunnelID, packet.Nonce) - require.NoError(t, err) - require.Equal(t, packet.TunnelID, storedPacket.TunnelID) - require.Equal(t, packet.Nonce, storedPacket.Nonce) - require.NotZero(t, storedPacket.CreatedAt) -} - func TestMustGetPacket(t *testing.T) { s := testutil.NewTestSuite(t) ctx := s.Ctx diff --git a/x/tunnel/keeper/tss_packet_handler.go b/x/tunnel/keeper/tss_packet_handler.go index 805411ca3..f9daddfd5 100644 --- a/x/tunnel/keeper/tss_packet_handler.go +++ b/x/tunnel/keeper/tss_packet_handler.go @@ -8,9 +8,10 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// TSSPacketHandler handles incoming TSS packets -func (k Keeper) TSSPacketHandler(ctx sdk.Context, route *types.TSSRoute, packet types.Packet) { +// TSSPacketHandle handles incoming TSS packets +func (k Keeper) TSSPacketHandle(ctx sdk.Context, route *types.TSSRoute, packet types.Packet) error { // TODO: Implement TSS packet handler logic + // Sign TSS packet // Set the packet content @@ -21,9 +22,10 @@ func (k Keeper) TSSPacketHandler(ctx sdk.Context, route *types.TSSRoute, packet } err := packet.SetPacketContent(&packetContent) if err != nil { - panic(fmt.Errorf("failed to set packet content: %w", err)) + panic(fmt.Sprintf("failed to set packet content: %s", err)) } // Save the signed TSS packet - k.AddPacket(ctx, packet) + k.SetPacket(ctx, packet) + return nil } diff --git a/x/tunnel/keeper/tss_packet_handler_test.go b/x/tunnel/keeper/tss_packet_handler_test.go index e996df6d5..13e8c6711 100644 --- a/x/tunnel/keeper/tss_packet_handler_test.go +++ b/x/tunnel/keeper/tss_packet_handler_test.go @@ -7,12 +7,11 @@ import ( "github.com/stretchr/testify/require" bandtsstypes "github.com/bandprotocol/chain/v2/x/bandtss/types" - feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestTSSPacketHandler(t *testing.T) { +func TSSPacketHandle(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper @@ -24,15 +23,15 @@ func TestTSSPacketHandler(t *testing.T) { // Create a sample Packet packet := types.NewPacket( - 1, // tunnelID - 1, // nonce - feedstypes.FEED_TYPE_DEFAULT, + 1, // tunnelID + 1, // nonce nil, // SignalPriceInfos time.Now().Unix(), ) // Call the TSSPacketHandler - k.TSSPacketHandler(ctx, &route, packet) + err := k.TSSPacketHandle(ctx, &route, packet) + require.NoError(t, err) // Retrieve the packet from the keeper savedPacket, err := k.GetPacket(ctx, 1, 1) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 74b5f5615..5fb7ececd 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -146,87 +146,164 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error return nil } -// GetRequiredProcessTunnels returns all tunnels that require processing -func (k Keeper) GetRequiredProcessTunnels( - ctx sdk.Context, -) []types.Tunnel { - var tunnels []types.Tunnel +// GeneratePackets generates packets for all tunnels that require triggering +func (k Keeper) GeneratePackets(ctx sdk.Context) []types.Packet { + packets := []types.Packet{} + activeTunnels := k.GetActiveTunnels(ctx) latestPrices := k.feedsKeeper.GetPrices(ctx) - latestPricesMap := make(map[string]feedsTypes.Price, len(latestPrices)) - - // Populate the map with the latest prices - for _, price := range latestPrices { - latestPricesMap[price.SignalID] = price - } - + latestPricesMap := CreateLatestPricesMap(latestPrices) unixNow := ctx.BlockTime().Unix() - // Evaluate which tunnels require processing based on the price signals - for i, at := range activeTunnels { - var trigger bool - for j, sp := range at.SignalPriceInfos { - latestPrice, exists := latestPricesMap[sp.SignalID] - if !exists { - continue + // check for active tunnels + for _, at := range activeTunnels { + if unixNow >= int64(at.Interval)+at.Timestamp { + sps := GenerateSignalPriceInfos(ctx, at.SignalPriceInfos, latestPricesMap, at.ID) + if len(sps) > 0 { + packets = append(packets, types.NewPacket(at.ID, at.NonceCount+1, sps, unixNow)) } - - deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) - deviationInBPS := uint64(deviation * 10000) - - if deviationInBPS > sp.DeviationBPS || unixNow >= sp.LastTimestamp+sp.Interval { - // Update the price directly - activeTunnels[i].SignalPriceInfos[j].Price = latestPrice.Price - activeTunnels[i].SignalPriceInfos[j].LastTimestamp = unixNow - trigger = true + } else { + sps := GenerateSignalPriceInfosBasedOnDeviation(ctx, at.SignalPriceInfos, latestPricesMap, at.ID) + if len(sps) > 0 { + packets = append(packets, types.NewPacket(at.ID, at.NonceCount+1, sps, unixNow)) } } - - if trigger { - tunnels = append(tunnels, at) - } } - // add pending trigger tunnels + // check for pending trigger tunnels pendingTriggerTunnels := k.GetPendingTriggerTunnels(ctx) for _, id := range pendingTriggerTunnels { - if !types.IsTunnelInList(id, tunnels) { - tunnel := k.MustGetTunnel(ctx, id) - for i, sp := range tunnel.SignalPriceInfos { - latestPrice, exists := latestPricesMap[sp.SignalID] - if !exists { - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSignalIDNotFound, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), - sdk.NewAttribute(types.AttributeSignalID, sp.SignalID), - )) - continue - } - - tunnel.SignalPriceInfos[i].Price = latestPrice.Price - tunnel.SignalPriceInfos[i].LastTimestamp = unixNow - tunnels = append(tunnels, tunnel) - } + tunnel := k.MustGetTunnel(ctx, id) + // skip if the tunnel is already in trigger list + if unixNow >= int64(tunnel.Interval)+tunnel.Timestamp && tunnel.IsActive { + continue + } + sps := GenerateSignalPriceInfos(ctx, tunnel.SignalPriceInfos, latestPricesMap, tunnel.ID) + if len(sps) > 0 { + packets = append(packets, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, sps, unixNow)) } } - return tunnels + + return packets } -// SetParams sets the tunnel module parameters -func (k Keeper) ProcessTunnel(ctx sdk.Context, tunnel types.Tunnel) { - // Increment the nonce - tunnel.NonceCount += 1 +// HandlePacket sends a packet to destination route, stores the packet in the store, and updates the tunnel data +func (k Keeper) HandlePacket(ctx sdk.Context, packet types.Packet) { + // get tunnel from tunnelID + tunnel := k.MustGetTunnel(ctx, packet.TunnelID) // Process the tunnel based on the route type switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - k.TSSPacketHandler(ctx, r, tunnel.CreatePacket(ctx.BlockTime().Unix())) + err := k.TSSPacketHandle(ctx, r, packet) + if err != nil { + // Emit an event if the packet processing fails + emitPacketFailEvent(ctx, packet.TunnelID, r, err) + return + } case *types.AxelarRoute: - k.AxelarPacketHandler(ctx, r, tunnel.CreatePacket(ctx.BlockTime().Unix())) + err := k.AxelarPacketHandle(ctx, r, packet) + if err != nil { + // Emit an event if the packet processing fails + emitPacketFailEvent(ctx, packet.TunnelID, r, err) + return + } default: panic(fmt.Sprintf("unknown route type: %T", r)) } - // Update the tunnel + // update tunnel data + tunnel.NonceCount = packet.Nonce + tunnel.SignalPriceInfos = packet.SignalPriceInfos + tunnel.Timestamp = packet.CreatedAt k.SetTunnel(ctx, tunnel) } + +// emitPacketFailEvent emits an event when a packet fails to be sent +func emitPacketFailEvent(ctx sdk.Context, tunnelID uint64, route interface{}, err error) { + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeSendPacketFail, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeyRoute, fmt.Sprintf("%v", route)), + sdk.NewAttribute(types.AttributeKeyReason, err.Error()), + )) +} + +// GenerateSignalPriceInfos generates signal price infos based on the latest prices +func GenerateSignalPriceInfos( + ctx sdk.Context, + signalPriceInfos []types.SignalPriceInfo, + latestPricesMap map[string]feedsTypes.Price, + tunnelID uint64, +) []types.SignalPriceInfo { + var nsps []types.SignalPriceInfo + for _, sp := range signalPriceInfos { + latestPrice, exists := latestPricesMap[sp.SignalID] + if !exists || latestPrice.PriceStatus != feedsTypes.PriceStatusAvailable { + nsps = append(nsps, types.NewSignalPriceInfo(sp.SignalID, sp.SoftDeviationBPS, sp.HardDeviationBPS, 0, 0)) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeSignalIDNotFound, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeySignalID, sp.SignalID), + )) + continue + } + nsps = append( + nsps, + types.NewSignalPriceInfo( + sp.SignalID, + sp.SoftDeviationBPS, + sp.HardDeviationBPS, + latestPrice.Price, + latestPrice.Timestamp, + ), + ) + } + return nsps +} + +// GenerateSignalPriceInfosBasedOnDeviation generates signal price infos based on the deviation of the latest prices +func GenerateSignalPriceInfosBasedOnDeviation( + ctx sdk.Context, + signalPriceInfos []types.SignalPriceInfo, + latestPricesMap map[string]feedsTypes.Price, + tunnelID uint64, +) []types.SignalPriceInfo { + var nsps []types.SignalPriceInfo + for _, sp := range signalPriceInfos { + latestPrice, exists := latestPricesMap[sp.SignalID] + if !exists || latestPrice.PriceStatus != feedsTypes.PriceStatusAvailable { + nsps = append(nsps, types.NewSignalPriceInfo(sp.SignalID, sp.SoftDeviationBPS, sp.HardDeviationBPS, 0, 0)) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeSignalIDNotFound, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeySignalID, sp.SignalID), + )) + continue + } + deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) + deviationInBPS := uint64(deviation * 10000) + if deviationInBPS >= sp.HardDeviationBPS { + nsps = append( + nsps, + types.NewSignalPriceInfo( + sp.SignalID, + sp.SoftDeviationBPS, + sp.HardDeviationBPS, + latestPrice.Price, + latestPrice.Timestamp, + ), + ) + } + } + return nsps +} + +// CreateLatestPricesMap creates a map of latest prices with signal ID as the key +func CreateLatestPricesMap(latestPrices []feedsTypes.Price) map[string]feedsTypes.Price { + latestPricesMap := make(map[string]feedsTypes.Price, len(latestPrices)) + for _, price := range latestPrices { + latestPricesMap[price.SignalID] = price + } + return latestPricesMap +} diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index a8f931d27..7ba91d15e 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "fmt" "testing" "time" @@ -9,6 +8,7 @@ import ( "go.uber.org/mock/gomock" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -36,15 +36,14 @@ func TestAddTunnel(t *testing.T) { require.NoError(s.T(), err, "retrieving tunnel should not produce an error") expected := types.Tunnel{ - ID: 1, - Route: nil, - FeedType: feedstypes.FEED_TYPE_UNSPECIFIED, - FeePayer: "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", - SignalPriceInfos: nil, - LastTriggeredBlockHeight: 0, - IsActive: false, - CreatedAt: s.Ctx.BlockTime().Unix(), - Creator: "", + ID: 1, + Route: nil, + FeedType: feedstypes.FEED_TYPE_UNSPECIFIED, + FeePayer: "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", + SignalPriceInfos: nil, + IsActive: false, + CreatedAt: s.Ctx.BlockTime().Unix(), + Creator: "", } // Assert the retrieved tunnel matches the one we set @@ -139,106 +138,183 @@ func TestGetSetPendingTriggerTunnels(t *testing.T) { require.Len(s.T(), pendingTriggerTunnels, 1, "expected 1 pending trigger tunnel to be retrieved") } -func TestGetRequiredProcessTunnels(t *testing.T) { +func TestGetNextTunnelID(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper - now := ctx.BlockTime().Unix() - before := ctx.BlockTime().Add(-30 * time.Second).Unix() + firstID := k.GetNextTunnelID(ctx) + require.Equal(s.T(), uint64(1), firstID, "expected first tunnel ID to be 1") + + secondID := k.GetNextTunnelID(ctx) + require.Equal(s.T(), uint64(2), secondID, "expected next tunnel ID to be 2") +} - // Mock data for the test cases - tunnels := []types.Tunnel{ +func TestGenerateSignalPriceInfos(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx := s.Ctx + + signalPriceInfos := []types.SignalPriceInfo{ + {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000}, + {SignalID: "signal2", SoftDeviationBPS: 0, HardDeviationBPS: 1000}, + } + + latestPricesMap := map[string]feedstypes.Price{ + "signal1": {Price: 1000, Timestamp: time.Now().Unix(), PriceStatus: feedstypes.PriceStatusAvailable}, + "signal2": {Price: 2000, Timestamp: time.Now().Unix(), PriceStatus: feedstypes.PriceStatusUnavailable}, + } + + tunnelID := uint64(1) + expected := []types.SignalPriceInfo{ { - ID: 1, - SignalPriceInfos: []types.SignalPriceInfo{ - { - SignalID: "signal1", - Price: 100, - DeviationBPS: 1000, - Interval: 30, - LastTimestamp: now, + SignalID: "signal1", + SoftDeviationBPS: 0, + HardDeviationBPS: 1000, + Price: 1000, + Timestamp: latestPricesMap["signal1"].Timestamp, + }, + {SignalID: "signal2", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, + } + + result := keeper.GenerateSignalPriceInfos(ctx, signalPriceInfos, latestPricesMap, tunnelID) + + require.Equal(t, expected, result) +} + +func TestGenerateSignalPriceInfosBasedOnDeviation(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx := s.Ctx + + // Define test cases + testCases := []struct { + name string + signalPriceInfos []types.SignalPriceInfo + latestPricesMap map[string]feedstypes.Price + tunnelID uint64 + expectedResults []types.SignalPriceInfo + }{ + { + name: "All prices available and within deviation", + signalPriceInfos: []types.SignalPriceInfo{ + {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, + {SignalID: "signal2", Price: 200, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, + }, + latestPricesMap: map[string]feedstypes.Price{ + "signal1": { + SignalID: "signal1", + Price: 109, + PriceStatus: feedstypes.PriceStatusAvailable, + Timestamp: 1234567890, + }, + "signal2": { + SignalID: "signal2", + Price: 205, + PriceStatus: feedstypes.PriceStatusAvailable, + Timestamp: 1234567891, + }, + }, + tunnelID: 1, + expectedResults: []types.SignalPriceInfo{}, + }, + { + name: "Price not available", + signalPriceInfos: []types.SignalPriceInfo{ + {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, + }, + latestPricesMap: map[string]feedstypes.Price{ + "signal1": { + SignalID: "signal1", + Price: 0, + PriceStatus: feedstypes.PriceStatusUnavailable, + Timestamp: 1234567890, }, }, - IsActive: true, + tunnelID: 1, + expectedResults: []types.SignalPriceInfo{ + {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, + }, }, { - ID: 2, - SignalPriceInfos: []types.SignalPriceInfo{ - {SignalID: "signal2", Price: 100, DeviationBPS: 1000, Interval: 30, LastTimestamp: now}, + name: "Price exceeds hard deviation", + signalPriceInfos: []types.SignalPriceInfo{ + {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, + }, + latestPricesMap: map[string]feedstypes.Price{ + "signal1": { + SignalID: "signal1", + Price: 150, + PriceStatus: feedstypes.PriceStatusAvailable, + Timestamp: 1234567890, + }, + }, + tunnelID: 1, + expectedResults: []types.SignalPriceInfo{ + { + SignalID: "signal1", + SoftDeviationBPS: 0, + HardDeviationBPS: 1000, + Price: 150, + Timestamp: 1234567890, + }, }, - IsActive: true, }, { - ID: 3, - SignalPriceInfos: []types.SignalPriceInfo{ - {SignalID: "signal3", Price: 100, DeviationBPS: 1000, Interval: 30, LastTimestamp: before}, + name: "Signal ID not found", + signalPriceInfos: []types.SignalPriceInfo{ + {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, + }, + latestPricesMap: map[string]feedstypes.Price{}, + tunnelID: 1, + expectedResults: []types.SignalPriceInfo{ + {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, }, - IsActive: true, }, } - prices := []feedstypes.Price{ - {SignalID: "signal1", Price: 110}, - {SignalID: "signal2", Price: 111}, - {SignalID: "signal3", Price: 101}, - } - for _, tunnel := range tunnels { - k.SetTunnel(ctx, tunnel) + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + // Call the GenerateSignalPriceInfosBasedOnDeviation method + nsps := keeper.GenerateSignalPriceInfosBasedOnDeviation( + ctx, + tc.signalPriceInfos, + tc.latestPricesMap, + tc.tunnelID, + ) + + // Verify the results + require.Equal(t, len(tc.expectedResults), len(nsps)) + for i, expected := range tc.expectedResults { + require.Equal(t, expected.SignalID, nsps[i].SignalID) + require.Equal(t, expected.Price, nsps[i].Price) + require.Equal(t, expected.Timestamp, nsps[i].Timestamp) + } + }) } - s.MockFeedsKeeper.EXPECT().GetPrices(ctx).Return(prices).Times(1) - - // Execute the function to test - resultTunnels := k.GetRequiredProcessTunnels(ctx) - - // Assert conditions - require.Len(t, resultTunnels, 2, "There should be 2 tunnels requiring processing") - require.Equal(t, uint64(2), resultTunnels[0].ID, "The tunnel requiring processing should be tunnel1") - - // check for correct updates in the SignalPriceInfos - require.Equal( - t, - uint64(111), - resultTunnels[0].SignalPriceInfos[0].Price, - "The price should be updated to the latest price", - ) - require.Equal( - t, - uint64(101), - resultTunnels[1].SignalPriceInfos[0].Price, - "The price should be updated to the latest price", - ) } -func TestProcessTunnel(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - // Create a new tunnel instance - tunnel := types.Tunnel{ - ID: 1, +func TestCreateLatestPricesMap(t *testing.T) { + // Create test data + latestPrices := []feedstypes.Price{ + { + SignalID: "signal1", + Price: 100, + PriceStatus: feedstypes.PriceStatusAvailable, + Timestamp: 1234567890, + }, + { + SignalID: "signal2", + Price: 200, + PriceStatus: feedstypes.PriceStatusAvailable, + Timestamp: 1234567891, + }, } - err := tunnel.SetRoute(&types.TSSRoute{ - DestinationChainID: "1", - DestinationContractAddress: "0x123", - }) - require.NoError(t, err) - - k.SetTunnel(ctx, tunnel) - - tu, err := k.GetTunnel(ctx, tunnel.ID) - require.NoError(t, err) - - k.ProcessTunnel(ctx, tu) - fmt.Printf("route: %+v\n", tunnel.Route.GetCachedValue()) -} - -func TestGetNextTunnelID(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - firstID := k.GetNextTunnelID(ctx) - require.Equal(s.T(), uint64(1), firstID, "expected first tunnel ID to be 1") + // Call the createLatestPricesMap method + latestPricesMap := keeper.CreateLatestPricesMap(latestPrices) - secondID := k.GetNextTunnelID(ctx) - require.Equal(s.T(), uint64(2), secondID, "expected next tunnel ID to be 2") + // Verify the results + require.Equal(t, 2, len(latestPricesMap)) + require.Contains(t, latestPricesMap, "signal1") + require.Contains(t, latestPricesMap, "signal2") + require.Equal(t, latestPrices[0], latestPricesMap["signal1"]) + require.Equal(t, latestPrices[1], latestPricesMap["signal2"]) } diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 63e60885d..326426d5e 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -11,7 +11,7 @@ const ( AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" - AttributeSignalID = "signal_id" + AttributeKeySignalID = "signal_id" AttributeKeyRoute = "route" AttributeKeyFeedType = "feed_type" AttributeKeyFeePayer = "fee_payer" diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index fea6d3b09..b65db83d4 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -9,8 +9,8 @@ const ( // Version defines the current version the IBC module supports Version = "tunnel-1" - // KeyAccountsKey is used to store the key for the account - KeyAccountsKey = "tunnel-accounts" + // TunnelAccountsKey is used to store the key for the account + TunnelAccountsKey = "tunnel-accounts" // StoreKey defines the primary module store key StoreKey = ModuleName diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 1024937b4..922dccfeb 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -1,7 +1,7 @@ package types import ( - fmt "fmt" + "fmt" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -58,8 +58,9 @@ func (m *MsgUpdateParams) ValidateBasic() error { func NewMsgCreateTunnel( signalInfos []SignalInfo, - feedType feedstypes.FeedType, + interval uint64, route RouteI, + feedType feedstypes.FeedType, deposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { @@ -74,6 +75,7 @@ func NewMsgCreateTunnel( return &MsgCreateTunnel{ SignalInfos: signalInfos, + Interval: interval, Route: any, FeedType: feedType, Deposit: deposit, @@ -226,11 +228,11 @@ func (m MsgActivateTunnel) ValidateBasic() error { } func NewMsgManualTriggerTunnel( - id uint64, + tunnelID uint64, creator string, ) *MsgActivateTunnel { return &MsgActivateTunnel{ - TunnelID: id, + TunnelID: tunnelID, Creator: creator, } } diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 13e27bb93..fd558102e 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -1,12 +1,10 @@ package types import ( - fmt "fmt" + "fmt" "github.com/cosmos/cosmos-sdk/codec/types" proto "github.com/cosmos/gogoproto/proto" - - feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) var _ types.UnpackInterfacesMessage = Packet{} @@ -14,14 +12,12 @@ var _ types.UnpackInterfacesMessage = Packet{} func NewPacket( tunnelID uint64, nonce uint64, - feedType feedstypes.FeedType, signalPriceInfos []SignalPriceInfo, createdAt int64, ) Packet { return Packet{ TunnelID: tunnelID, Nonce: nonce, - FeedType: feedType, SignalPriceInfos: signalPriceInfos, CreatedAt: createdAt, } diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 93eda49b2..7dfaac92f 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -1,7 +1,7 @@ package types import ( - fmt "fmt" + "fmt" "time" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 951a8b525..726c5e12c 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -117,33 +116,33 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/params.proto", fileDescriptor_a7b5eedd244355eb) } var fileDescriptor_a7b5eedd244355eb = []byte{ - // 407 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x3f, 0xcf, 0xd2, 0x40, - 0x1c, 0xc7, 0x5b, 0x1f, 0xc4, 0x27, 0x57, 0x05, 0xad, 0x0e, 0x05, 0x93, 0x16, 0x9d, 0x58, 0xec, - 0x09, 0x6e, 0x2e, 0x24, 0xd5, 0x90, 0x30, 0x98, 0x90, 0xe2, 0xe4, 0xd2, 0x5c, 0xcb, 0x01, 0x17, - 0xdb, 0xbb, 0xa6, 0x77, 0x6d, 0x70, 0xf1, 0x35, 0x38, 0x3a, 0x32, 0xfb, 0x36, 0x5c, 0x18, 0x19, - 0x9d, 0xd0, 0x94, 0xc5, 0x97, 0x61, 0xae, 0x77, 0x18, 0x36, 0x63, 0xc2, 0xd4, 0xf6, 0xbe, 0x7f, - 0x3e, 0xbf, 0x5f, 0xd2, 0x03, 0x4f, 0x45, 0x49, 0x29, 0x4e, 0x61, 0x35, 0x8a, 0xb1, 0x40, 0x23, - 0x98, 0xa3, 0x02, 0x65, 0xdc, 0xcf, 0x0b, 0x26, 0x98, 0xdd, 0x51, 0xa2, 0xaf, 0xc5, 0xfe, 0x93, - 0x35, 0x5b, 0xb3,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0b, 0x36, 0x91, 0xb0, 0xfa, 0xe8, 0x59, 0xef, - 0x17, 0x8b, 0x50, 0xc6, 0xa6, 0x18, 0xff, 0x17, 0xdb, 0x12, 0x9c, 0x9f, 0x83, 0x76, 0x09, 0x1e, - 0xa2, 0x2d, 0x4e, 0x51, 0x71, 0x31, 0x42, 0xfb, 0xfa, 0xfb, 0x76, 0x14, 0xe4, 0x8c, 0x7d, 0x7d, - 0xfb, 0x75, 0xe7, 0x19, 0xbf, 0x77, 0x9e, 0x19, 0xcc, 0xf6, 0xb5, 0x6b, 0x1e, 0x6a, 0xd7, 0xfc, - 0x55, 0xbb, 0xe6, 0x97, 0x93, 0x6b, 0x1c, 0x4e, 0xae, 0xf1, 0xe3, 0xe4, 0x1a, 0x1f, 0xe0, 0x45, - 0x7b, 0x8c, 0xe8, 0xb2, 0xf9, 0xeb, 0x12, 0x96, 0xc2, 0x64, 0x83, 0x08, 0x85, 0xd5, 0x18, 0x6e, - 0xa1, 0xbe, 0x00, 0x0d, 0x2a, 0x6e, 0x37, 0x8e, 0x57, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x2a, - 0x8b, 0x9c, 0x17, 0x17, 0x03, 0x00, 0x00, + // 402 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x31, 0x8f, 0xd3, 0x30, + 0x18, 0x86, 0x13, 0x5a, 0x4a, 0xe5, 0x40, 0x0b, 0x81, 0x21, 0x14, 0x29, 0x29, 0x4c, 0x5d, 0x88, + 0x69, 0xd9, 0x58, 0x2a, 0x05, 0x54, 0xa9, 0x03, 0x52, 0x95, 0x32, 0xb1, 0x44, 0x4e, 0xea, 0xb6, + 0x16, 0x89, 0x1d, 0xc5, 0x4e, 0x54, 0x16, 0x7e, 0x03, 0x23, 0x63, 0x67, 0xfe, 0x06, 0x4b, 0xc7, + 0x8e, 0x4c, 0xbd, 0x53, 0xba, 0xdc, 0xcf, 0x38, 0x39, 0x4e, 0x4f, 0xdd, 0x4e, 0x27, 0x75, 0x4a, + 0xe4, 0xf7, 0x7b, 0x9f, 0xc7, 0x9f, 0x64, 0xf0, 0x46, 0xe4, 0x94, 0xe2, 0x18, 0x16, 0xc3, 0x10, + 0x0b, 0x34, 0x84, 0x29, 0xca, 0x50, 0xc2, 0xdd, 0x34, 0x63, 0x82, 0x99, 0x1d, 0x15, 0xba, 0x75, + 0xd8, 0x7b, 0xb5, 0x62, 0x2b, 0x56, 0x45, 0x50, 0xfe, 0xa9, 0xa9, 0x9e, 0x1d, 0x31, 0x9e, 0x30, + 0x0e, 0x43, 0xc4, 0xf1, 0x1d, 0x27, 0x62, 0x84, 0xaa, 0xfc, 0xdd, 0xbf, 0x26, 0x68, 0xcd, 0x2a, + 0xac, 0x19, 0x03, 0x23, 0x21, 0x34, 0x58, 0xe0, 0x94, 0x71, 0x22, 0x2c, 0xbd, 0xdf, 0x18, 0x18, + 0xa3, 0xd7, 0xae, 0x02, 0xb8, 0x12, 0x70, 0x72, 0xb9, 0x9f, 0x19, 0xa1, 0xde, 0x87, 0xdd, 0xc1, + 0xd1, 0xfe, 0x5e, 0x39, 0x83, 0x15, 0x11, 0xeb, 0x3c, 0x74, 0x23, 0x96, 0xc0, 0xda, 0xa6, 0x3e, + 0xef, 0xf9, 0xe2, 0x07, 0x14, 0x3f, 0x53, 0xcc, 0xab, 0x02, 0xf7, 0x41, 0x42, 0xe8, 0x17, 0x85, + 0x37, 0xc7, 0xe0, 0x85, 0xb2, 0x15, 0x04, 0x09, 0xc2, 0x68, 0x10, 0xa6, 0xdc, 0x7a, 0xd4, 0xd7, + 0x07, 0x4d, 0xef, 0x65, 0x79, 0x70, 0xba, 0x5f, 0xe5, 0x68, 0x9d, 0x79, 0xb3, 0xb9, 0xdf, 0x4d, + 0xce, 0x0f, 0x52, 0x6e, 0xbe, 0x05, 0x4f, 0x25, 0x80, 0x50, 0x81, 0xb3, 0x02, 0xc5, 0x56, 0x43, + 0x76, 0x7d, 0xb9, 0xc2, 0xb4, 0x3e, 0x32, 0x97, 0xa0, 0x2d, 0xaf, 0x1d, 0x2c, 0x31, 0xb6, 0x9a, + 0x97, 0x5f, 0xe7, 0x89, 0x84, 0x4c, 0x30, 0x36, 0x7f, 0x81, 0x67, 0x82, 0xf3, 0x20, 0x63, 0xb9, + 0x50, 0xb2, 0xc7, 0xf7, 0xc9, 0xc6, 0x52, 0x56, 0x1e, 0x1c, 0xe3, 0xdb, 0x7c, 0xee, 0xcb, 0xda, + 0x04, 0xe3, 0x07, 0xb9, 0x0d, 0xc1, 0xf9, 0xa9, 0x68, 0xe6, 0xe0, 0x39, 0xda, 0xe0, 0x18, 0x65, + 0x67, 0x57, 0x68, 0x5d, 0x7e, 0xdf, 0x8e, 0x92, 0x9c, 0xb4, 0x9f, 0xda, 0x7f, 0xb6, 0x8e, 0x76, + 0xb3, 0x75, 0x74, 0x6f, 0xba, 0x2b, 0x6d, 0x7d, 0x5f, 0xda, 0xfa, 0x75, 0x69, 0xeb, 0xbf, 0x8f, + 0xb6, 0xb6, 0x3f, 0xda, 0xda, 0xff, 0xa3, 0xad, 0x7d, 0x87, 0x67, 0xf4, 0x10, 0xd1, 0x45, 0xf5, + 0xea, 0x22, 0x16, 0xc3, 0x68, 0x8d, 0x08, 0x85, 0xc5, 0x08, 0x6e, 0x60, 0xfd, 0xca, 0x2b, 0x55, + 0xd8, 0xaa, 0x26, 0x3e, 0xde, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xed, 0xb5, 0xd1, 0xfc, 0x02, + 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 09474d0dc..141490c67 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -6,7 +6,6 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/codec/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -35,24 +34,24 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TunnelStatusFilter int32 const ( - // TUNNEL_STATUS_UNSPECIFIED defines an unspecified status. - TUNNEL_STATUS_UNSPECIFIED TunnelStatusFilter = 0 - // TUNNEL_STATUS_ACTIVE defines an active tunnel. - TUNNEL_STATUS_ACTIVE TunnelStatusFilter = 1 - // TUNNEL_STATUS_INACTIVE defines an inactive tunnel. - TUNNEL_STATUS_INACTIVE TunnelStatusFilter = 2 + // TUNNEL_STATUS_FILTER_UNSPECIFIED defines an unspecified status. + TUNNEL_STATUS_FILTER_UNSPECIFIED TunnelStatusFilter = 0 + // TUNNEL_STATUS_FILTER_ACTIVE defines an active tunnel. + TUNNEL_STATUS_FILTER_ACTIVE TunnelStatusFilter = 1 + // TUNNEL_STATUS_FILTER_INACTIVE defines an inactive tunnel. + TUNNEL_STATUS_FILTER_INACTIVE TunnelStatusFilter = 2 ) var TunnelStatusFilter_name = map[int32]string{ - 0: "TUNNEL_STATUS_UNSPECIFIED", - 1: "TUNNEL_STATUS_ACTIVE", - 2: "TUNNEL_STATUS_INACTIVE", + 0: "TUNNEL_STATUS_FILTER_UNSPECIFIED", + 1: "TUNNEL_STATUS_FILTER_ACTIVE", + 2: "TUNNEL_STATUS_FILTER_INACTIVE", } var TunnelStatusFilter_value = map[string]int32{ - "TUNNEL_STATUS_UNSPECIFIED": 0, - "TUNNEL_STATUS_ACTIVE": 1, - "TUNNEL_STATUS_INACTIVE": 2, + "TUNNEL_STATUS_FILTER_UNSPECIFIED": 0, + "TUNNEL_STATUS_FILTER_ACTIVE": 1, + "TUNNEL_STATUS_FILTER_INACTIVE": 2, } func (x TunnelStatusFilter) String() string { @@ -63,7 +62,7 @@ func (TunnelStatusFilter) EnumDescriptor() ([]byte, []int) { return fileDescriptor_220124e1821d297e, []int{0} } -// QueryTunnelRequest is the request type for the Query/Tunnel RPC method. +// QueryTunnelsRequest is the request type for the Query/Tunnel RPC method. type QueryTunnelsRequest struct { // is_active is a flag to filter active tunnels. IsActive TunnelStatusFilter `protobuf:"varint,1,opt,name=is_active,json=isActive,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"is_active,omitempty"` @@ -108,7 +107,7 @@ func (m *QueryTunnelsRequest) GetIsActive() TunnelStatusFilter { if m != nil { return m.IsActive } - return TUNNEL_STATUS_UNSPECIFIED + return TUNNEL_STATUS_FILTER_UNSPECIFIED } func (m *QueryTunnelsRequest) GetPagination() *query.PageRequest { @@ -118,7 +117,7 @@ func (m *QueryTunnelsRequest) GetPagination() *query.PageRequest { return nil } -// QueryTunnelResponse is the response type for the Query/Tunnel RPC method. +// QueryTunnelsResponse is the response type for the Query/Tunnel RPC method. type QueryTunnelsResponse struct { // Tunnels is a list of tunnels. Tunnels []*Tunnel `protobuf:"bytes,1,rep,name=tunnels,proto3" json:"tunnels,omitempty"` @@ -577,52 +576,52 @@ func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_22 var fileDescriptor_220124e1821d297e = []byte{ // 726 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0xee, 0x62, 0x29, 0x30, 0x24, 0x84, 0x8c, 0x0d, 0x96, 0x45, 0x17, 0xb2, 0xf5, 0x07, 0x81, - 0xb8, 0x23, 0x45, 0x4f, 0x1e, 0x0c, 0x60, 0x21, 0x8d, 0xa6, 0xc1, 0x6d, 0xf1, 0xe0, 0xa5, 0x99, - 0x96, 0x71, 0xd9, 0x58, 0x76, 0x96, 0xce, 0x2c, 0x11, 0x09, 0x1e, 0x3c, 0xe9, 0x85, 0x68, 0xbc, - 0x7b, 0xf1, 0x9f, 0xe1, 0x48, 0xe2, 0xc5, 0x93, 0x31, 0xe0, 0x1f, 0x62, 0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b, 0xb5, 0xed, 0x7d, 0x23, 0xa9, 0x96, 0x06, 0x62, 0xa4, 0x90, 0x47, 0x5c, + 0xc8, 0x43, 0xb8, 0xf4, 0x17, 0x42, 0xd0, 0x01, 0x1f, 0xe0, 0xc3, 0x95, 0xda, 0xf1, 0xa9, 0xa6, + 0x9c, 0x9c, 0x6a, 0xca, 0xcf, 0x53, 0x4d, 0xf9, 0x78, 0xa6, 0x65, 0x4e, 0xce, 0xb4, 0xcc, 0xf7, + 0x33, 0x2d, 0xf3, 0x02, 0xd9, 0x8e, 0xbf, 0xdd, 0x6b, 0x1b, 0x16, 0xdd, 0x41, 0x6d, 0xec, 0x6e, + 0xf1, 0xff, 0x3f, 0x8b, 0x76, 0x90, 0xb5, 0x8d, 0x1d, 0x17, 0xed, 0x95, 0xd1, 0xab, 0x90, 0xd0, + 0xdf, 0xf7, 0x08, 0x6b, 0xe7, 0x38, 0x62, 0xe9, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x25, 0x5e, + 0xea, 0x41, 0xe9, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 4d3e91f2c..9b0e6a2da 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -1,7 +1,7 @@ package types import ( - fmt "fmt" + "fmt" "github.com/cosmos/cosmos-sdk/codec/types" proto "github.com/cosmos/gogoproto/proto" @@ -30,17 +30,6 @@ func (t *Tunnel) SetRoute(route RouteI) error { return nil } -// createPacket creates a new packet for the tunnel -func (t Tunnel) CreatePacket(createdAt int64) Packet { - return NewPacket( - t.ID, - t.NonceCount, - t.FeedType, - t.SignalPriceInfos, - createdAt, - ) -} - // IsTunnelInList checks if a tunnel with the given ID is in the list of tunnels. func IsTunnelInList(id uint64, tunnels []Tunnel) bool { for _, tunnel := range tunnels { @@ -50,3 +39,20 @@ func IsTunnelInList(id uint64, tunnels []Tunnel) bool { } return false } + +// NewSignalPriceInfo creates a new SignalPriceInfo instance. +func NewSignalPriceInfo( + signalID string, + softDeviationBPS uint64, + hardDeviationBPS uint64, + price uint64, + timestamp int64, +) SignalPriceInfo { + return SignalPriceInfo{ + SignalID: signalID, + SoftDeviationBPS: softDeviationBPS, + HardDeviationBPS: hardDeviationBPS, + Price: price, + Timestamp: timestamp, + } +} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 23b5a6d86..380878929 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -11,7 +11,6 @@ import ( types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" @@ -136,9 +135,9 @@ func (m *AxelarRoute) GetDestinationContractAddress() string { // SignalInfo is the type for a signal info type SignalInfo struct { - SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` - Interval int64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + SoftDeviationBPS uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` + HardDeviationBPS uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` } func (m *SignalInfo) Reset() { *m = SignalInfo{} } @@ -181,27 +180,27 @@ func (m *SignalInfo) GetSignalID() string { return "" } -func (m *SignalInfo) GetDeviationBPS() uint64 { +func (m *SignalInfo) GetSoftDeviationBPS() uint64 { if m != nil { - return m.DeviationBPS + return m.SoftDeviationBPS } return 0 } -func (m *SignalInfo) GetInterval() int64 { +func (m *SignalInfo) GetHardDeviationBPS() uint64 { if m != nil { - return m.Interval + return m.HardDeviationBPS } return 0 } // SignalPriceInfo is the type for a signal price info type SignalPriceInfo struct { - SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - DeviationBPS uint64 `protobuf:"varint,2,opt,name=deviation_bps,json=deviationBps,proto3" json:"deviation_bps,omitempty"` - Interval int64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` - Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` - LastTimestamp int64 `protobuf:"varint,5,opt,name=last_timestamp,json=lastTimestamp,proto3" json:"last_timestamp,omitempty"` + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + SoftDeviationBPS uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` + HardDeviationBPS uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` + Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } func (m *SignalPriceInfo) Reset() { *m = SignalPriceInfo{} } @@ -244,16 +243,16 @@ func (m *SignalPriceInfo) GetSignalID() string { return "" } -func (m *SignalPriceInfo) GetDeviationBPS() uint64 { +func (m *SignalPriceInfo) GetSoftDeviationBPS() uint64 { if m != nil { - return m.DeviationBPS + return m.SoftDeviationBPS } return 0 } -func (m *SignalPriceInfo) GetInterval() int64 { +func (m *SignalPriceInfo) GetHardDeviationBPS() uint64 { if m != nil { - return m.Interval + return m.HardDeviationBPS } return 0 } @@ -265,25 +264,26 @@ func (m *SignalPriceInfo) GetPrice() uint64 { return 0 } -func (m *SignalPriceInfo) GetLastTimestamp() int64 { +func (m *SignalPriceInfo) GetTimestamp() int64 { if m != nil { - return m.LastTimestamp + return m.Timestamp } return 0 } // Tunnel is the type for a tunnel type Tunnel struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` - Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` - FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,6,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - LastTriggeredBlockHeight uint64 `protobuf:"varint,7,opt,name=last_triggered_block_height,json=lastTriggeredBlockHeight,proto3" json:"last_triggered_block_height,omitempty"` - IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - CreatedAt int64 `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` + Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,6,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` + Timestamp int64 `protobuf:"varint,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + IsActive bool `protobuf:"varint,9,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *Tunnel) Reset() { *m = Tunnel{} } @@ -361,9 +361,16 @@ func (m *Tunnel) GetSignalPriceInfos() []SignalPriceInfo { return nil } -func (m *Tunnel) GetLastTriggeredBlockHeight() uint64 { +func (m *Tunnel) GetInterval() uint64 { if m != nil { - return m.LastTriggeredBlockHeight + return m.Interval + } + return 0 +} + +func (m *Tunnel) GetTimestamp() int64 { + if m != nil { + return m.Timestamp } return 0 } @@ -439,10 +446,9 @@ func (m *PendingTriggerTunnels) GetIDs() []uint64 { type Packet struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,4,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - PacketContent *types.Any `protobuf:"bytes,5,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` - CreatedAt int64 `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + PacketContent *types.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (m *Packet) Reset() { *m = Packet{} } @@ -492,13 +498,6 @@ func (m *Packet) GetNonce() uint64 { return 0 } -func (m *Packet) GetFeedType() types1.FeedType { - if m != nil { - return m.FeedType - } - return types1.FEED_TYPE_UNSPECIFIED -} - func (m *Packet) GetSignalPriceInfos() []SignalPriceInfo { if m != nil { return m.SignalPriceInfos @@ -657,66 +656,65 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 937 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0xae, 0x93, 0x34, 0x4d, 0x5e, 0xdb, 0x50, 0x0d, 0x61, 0xf1, 0xb6, 0x10, 0x47, 0x91, 0x90, - 0xc2, 0xa1, 0x36, 0x1b, 0x58, 0x0e, 0x95, 0x90, 0x88, 0x1b, 0xa1, 0xb5, 0x10, 0x22, 0x38, 0x39, - 0x71, 0xb1, 0x1c, 0x7b, 0xe2, 0x0e, 0x9b, 0xce, 0x18, 0xcf, 0x24, 0xda, 0xfc, 0x8b, 0xfd, 0x05, - 0x08, 0x21, 0x21, 0xf1, 0x03, 0xfa, 0x13, 0x38, 0xac, 0xf6, 0xb4, 0xda, 0x13, 0x27, 0x0b, 0xb9, - 0x07, 0x38, 0x72, 0xe6, 0x84, 0x3c, 0xe3, 0xa4, 0x4d, 0xb4, 0xab, 0x5d, 0x09, 0x24, 0xf6, 0x36, - 0xef, 0xbd, 0x6f, 0x9e, 0xdf, 0x7c, 0xdf, 0x7b, 0x2f, 0x81, 0x13, 0x31, 0xa7, 0x14, 0xcf, 0xac, - 0xc5, 0xbd, 0x09, 0x16, 0xfe, 0x3d, 0x4b, 0x99, 0x66, 0x9c, 0x30, 0xc1, 0x50, 0xa3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 0x26, 0x81, 0xf7, 0xfd, 0x1c, 0xcf, 0xf1, 0x0d, 0x4b, 0x8d, 0x2c, - 0x35, 0xc0, 0xb1, 0xcf, 0xbf, 0xc9, 0xdd, 0xce, 0xc0, 0x05, 0x32, 0x09, 0xd4, 0xf9, 0x8d, 0x7f, - 0xa9, 0xfd, 0xd5, 0x2f, 0x59, 0x4b, 0x7b, 0x92, 0xb5, 0xb4, 0x67, 0x59, 0x4b, 0xfb, 0x3d, 0x6b, - 0x69, 0x8f, 0xaf, 0x5b, 0x3b, 0xcf, 0xae, 0x5b, 0x3b, 0xbf, 0x5d, 0xb7, 0x76, 0xbe, 0xb5, 0x5e, - 0x43, 0xee, 0xe2, 0x3f, 0x92, 0x54, 0x7b, 0x52, 0x95, 0x88, 0x8f, 0xff, 0x09, 0x00, 0x00, 0xff, - 0xff, 0xdf, 0x9d, 0x0d, 0xeb, 0x3a, 0x09, 0x00, 0x00, + // 916 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x8e, 0xe3, 0x44, + 0x10, 0x1e, 0x27, 0x99, 0x6c, 0x52, 0xb3, 0x0c, 0xa3, 0x26, 0x2c, 0xde, 0xd9, 0x25, 0x8e, 0x72, + 0x0a, 0x87, 0xb1, 0xd9, 0xf0, 0x73, 0x98, 0x13, 0xf1, 0x44, 0x68, 0x2d, 0x84, 0x08, 0x76, 0x4e, + 0x5c, 0x2c, 0xc7, 0xdd, 0xf1, 0x34, 0x64, 0xba, 0x8d, 0xbb, 0x13, 0x6d, 0x5e, 0x02, 0xf1, 0x04, + 0x08, 0x21, 0x21, 0xf1, 0x00, 0xf3, 0x0a, 0x48, 0xab, 0x3d, 0xad, 0x38, 0x71, 0x8a, 0x90, 0xe7, + 0x00, 0x12, 0x6f, 0xc0, 0x01, 0x21, 0x77, 0x3b, 0x93, 0x49, 0xc4, 0x68, 0x91, 0xe0, 0xb0, 0xdc, + 0xba, 0xbe, 0xfa, 0x71, 0xd5, 0x57, 0x55, 0xdd, 0x86, 0x07, 0x72, 0xce, 0x18, 0x99, 0x39, 0x8b, + 0x47, 0x13, 0x22, 0xa3, 0x47, 0x8e, 0x16, 0xed, 0x34, 0xe3, 0x92, 0xa3, 0xc3, 0x52, 0x2a, 0x95, + 0xc7, 0xad, 0x84, 0x27, 0x5c, 0xa9, 0x9c, 0xe2, 0xa4, 0xad, 0x8e, 0xef, 0x27, 0x9c, 0x27, 0x33, + 0xe2, 0x28, 0x69, 0x32, 0x9f, 0x3a, 0x11, 0x5b, 0xae, 0x55, 0x31, 0x17, 0x17, 0x5c, 0x84, 0xda, + 0x47, 0x0b, 0x6b, 0xd5, 0x94, 0x10, 0x2c, 0xae, 0xbf, 0xab, 0x24, 0xad, 0xea, 0x7e, 0x67, 0x40, + 0x63, 0x1c, 0x04, 0x3e, 0x9f, 0x4b, 0x82, 0x1e, 0x43, 0x0b, 0x13, 0x21, 0x29, 0x8b, 0x24, 0xe5, + 0x2c, 0x8c, 0xcf, 0x23, 0xca, 0x42, 0x8a, 0x4d, 0xa3, 0x63, 0xf4, 0x9a, 0xee, 0xbd, 0x7c, 0x65, + 0xa1, 0xe1, 0x46, 0x7f, 0x56, 0xa8, 0xbd, 0xa1, 0x8f, 0xf0, 0x2e, 0x86, 0xd1, 0x07, 0xf0, 0x70, + 0x2b, 0x12, 0x67, 0x32, 0x8b, 0x62, 0x19, 0x46, 0x18, 0x67, 0x44, 0x08, 0xb3, 0x52, 0x44, 0xf4, + 0x8f, 0x6f, 0x7a, 0x96, 0x26, 0x03, 0x6d, 0x71, 0x0a, 0xcf, 0x2e, 0x4f, 0xea, 0x2a, 0x2d, 0xaf, + 0xfb, 0xbd, 0x01, 0x07, 0x83, 0x27, 0x64, 0x16, 0x65, 0x2f, 0x77, 0x9e, 0x3f, 0x1a, 0x00, 0x01, + 0x4d, 0x58, 0x34, 0xf3, 0xd8, 0x94, 0xa3, 0xb7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, 0xe3, 0x6b, + 0x73, 0xf4, 0x2e, 0x34, 0x8b, 0x05, 0x0d, 0xe5, 0x32, 0xd5, 0x99, 0x1f, 0xf6, 0xdf, 0xb0, 0xf5, + 0xca, 0x96, 0x0b, 0x6c, 0x7f, 0x48, 0x08, 0x1e, 0x2f, 0x53, 0xe2, 0x37, 0xa6, 0xe5, 0x09, 0xbd, + 0xa7, 0xbc, 0xc2, 0x34, 0x5a, 0x92, 0x4c, 0x55, 0xd5, 0x74, 0xcd, 0x9f, 0x2e, 0x4f, 0x5a, 0xe5, + 0x3d, 0x50, 0x4e, 0x6b, 0x20, 0x33, 0xca, 0x12, 0xe5, 0x36, 0x2a, 0x2c, 0x51, 0x00, 0xa8, 0xec, + 0xaa, 0x22, 0x27, 0xa4, 0x6c, 0xca, 0x85, 0x59, 0xef, 0x54, 0x7b, 0x07, 0x7d, 0xcb, 0xde, 0xbe, + 0x92, 0xec, 0x9d, 0x91, 0x70, 0x6b, 0x4f, 0x57, 0xd6, 0x9e, 0x7f, 0x24, 0xb6, 0x61, 0x81, 0x8e, + 0xa1, 0x41, 0x99, 0x24, 0xd9, 0x22, 0x9a, 0x99, 0x77, 0x14, 0x2f, 0xd7, 0xf2, 0x36, 0xfb, 0x8d, + 0x1d, 0xf6, 0xd1, 0x03, 0x68, 0x52, 0x11, 0x46, 0xb1, 0xa4, 0x0b, 0x62, 0x36, 0x3b, 0x46, 0xaf, + 0xe1, 0x37, 0xa8, 0x18, 0x28, 0x19, 0xbd, 0x09, 0x10, 0x67, 0x24, 0x92, 0x04, 0x87, 0x91, 0x34, + 0x41, 0xfb, 0x96, 0xc8, 0x40, 0xa2, 0x3e, 0xdc, 0x51, 0x02, 0xcf, 0xcc, 0x83, 0x17, 0xd4, 0xbf, + 0x36, 0x2c, 0xbb, 0xdd, 0x87, 0xd7, 0x47, 0x84, 0x61, 0xca, 0x92, 0x71, 0x46, 0x93, 0x84, 0x64, + 0xba, 0xf5, 0x02, 0xdd, 0x87, 0x2a,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de, 0x86, 0xbb, 0x74, + 0x12, 0x87, 0x5f, 0xce, 0xc9, 0x9c, 0x6c, 0x58, 0x3a, 0xcc, 0x57, 0x16, 0x78, 0xee, 0xd9, 0xa7, + 0x05, 0xec, 0x0d, 0x7d, 0xa0, 0x93, 0x58, 0x9f, 0x5f, 0xfa, 0x4a, 0xdd, 0x8f, 0x7f, 0xc8, 0xdb, + 0xc6, 0xd3, 0xbc, 0x6d, 0x3c, 0xcf, 0xdb, 0xc6, 0x2f, 0x79, 0xdb, 0xf8, 0xfa, 0xaa, 0xbd, 0xf7, + 0xfc, 0xaa, 0xbd, 0xf7, 0xf3, 0x55, 0x7b, 0xef, 0x33, 0xe7, 0x1f, 0xb4, 0xbb, 0xfc, 0x51, 0x52, + 0xdd, 0x9e, 0xd4, 0x95, 0xc5, 0x3b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x32, 0x93, 0x91, 0x4d, + 0x3f, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -795,10 +793,10 @@ func (this *SignalInfo) Equal(that interface{}) bool { if this.SignalID != that1.SignalID { return false } - if this.DeviationBPS != that1.DeviationBPS { + if this.SoftDeviationBPS != that1.SoftDeviationBPS { return false } - if this.Interval != that1.Interval { + if this.HardDeviationBPS != that1.HardDeviationBPS { return false } return true @@ -825,16 +823,16 @@ func (this *SignalPriceInfo) Equal(that interface{}) bool { if this.SignalID != that1.SignalID { return false } - if this.DeviationBPS != that1.DeviationBPS { + if this.SoftDeviationBPS != that1.SoftDeviationBPS { return false } - if this.Interval != that1.Interval { + if this.HardDeviationBPS != that1.HardDeviationBPS { return false } if this.Price != that1.Price { return false } - if this.LastTimestamp != that1.LastTimestamp { + if this.Timestamp != that1.Timestamp { return false } return true @@ -881,7 +879,10 @@ func (this *Tunnel) Equal(that interface{}) bool { return false } } - if this.LastTriggeredBlockHeight != that1.LastTriggeredBlockHeight { + if this.Interval != that1.Interval { + return false + } + if this.Timestamp != that1.Timestamp { return false } if this.IsActive != that1.IsActive { @@ -949,9 +950,6 @@ func (this *Packet) Equal(that interface{}) bool { if this.Nonce != that1.Nonce { return false } - if this.FeedType != that1.FeedType { - return false - } if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { return false } @@ -1122,13 +1120,13 @@ func (m *SignalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Interval != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Interval)) + if m.HardDeviationBPS != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.HardDeviationBPS)) i-- dAtA[i] = 0x18 } - if m.DeviationBPS != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.DeviationBPS)) + if m.SoftDeviationBPS != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.SoftDeviationBPS)) i-- dAtA[i] = 0x10 } @@ -1162,8 +1160,8 @@ func (m *SignalPriceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.LastTimestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.LastTimestamp)) + if m.Timestamp != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x28 } @@ -1172,13 +1170,13 @@ func (m *SignalPriceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - if m.Interval != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Interval)) + if m.HardDeviationBPS != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.HardDeviationBPS)) i-- dAtA[i] = 0x18 } - if m.DeviationBPS != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.DeviationBPS)) + if m.SoftDeviationBPS != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.SoftDeviationBPS)) i-- dAtA[i] = 0x10 } @@ -1217,12 +1215,12 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Creator) i = encodeVarintTunnel(dAtA, i, uint64(len(m.Creator))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x5a } if m.CreatedAt != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) i-- - dAtA[i] = 0x48 + dAtA[i] = 0x50 } if m.IsActive { i-- @@ -1232,10 +1230,15 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- + dAtA[i] = 0x48 + } + if m.Timestamp != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) + i-- dAtA[i] = 0x40 } - if m.LastTriggeredBlockHeight != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.LastTriggeredBlockHeight)) + if m.Interval != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Interval)) i-- dAtA[i] = 0x38 } @@ -1354,7 +1357,7 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.CreatedAt != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if m.PacketContent != nil { { @@ -1366,7 +1369,7 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if len(m.SignalPriceInfos) > 0 { for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { @@ -1379,14 +1382,9 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTunnel(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } - if m.FeedType != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.FeedType)) - i-- - dAtA[i] = 0x18 - } if m.Nonce != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) i-- @@ -1539,11 +1537,11 @@ func (m *SignalInfo) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - if m.DeviationBPS != 0 { - n += 1 + sovTunnel(uint64(m.DeviationBPS)) + if m.SoftDeviationBPS != 0 { + n += 1 + sovTunnel(uint64(m.SoftDeviationBPS)) } - if m.Interval != 0 { - n += 1 + sovTunnel(uint64(m.Interval)) + if m.HardDeviationBPS != 0 { + n += 1 + sovTunnel(uint64(m.HardDeviationBPS)) } return n } @@ -1558,17 +1556,17 @@ func (m *SignalPriceInfo) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - if m.DeviationBPS != 0 { - n += 1 + sovTunnel(uint64(m.DeviationBPS)) + if m.SoftDeviationBPS != 0 { + n += 1 + sovTunnel(uint64(m.SoftDeviationBPS)) } - if m.Interval != 0 { - n += 1 + sovTunnel(uint64(m.Interval)) + if m.HardDeviationBPS != 0 { + n += 1 + sovTunnel(uint64(m.HardDeviationBPS)) } if m.Price != 0 { n += 1 + sovTunnel(uint64(m.Price)) } - if m.LastTimestamp != 0 { - n += 1 + sovTunnel(uint64(m.LastTimestamp)) + if m.Timestamp != 0 { + n += 1 + sovTunnel(uint64(m.Timestamp)) } return n } @@ -1602,8 +1600,11 @@ func (m *Tunnel) Size() (n int) { n += 1 + l + sovTunnel(uint64(l)) } } - if m.LastTriggeredBlockHeight != 0 { - n += 1 + sovTunnel(uint64(m.LastTriggeredBlockHeight)) + if m.Interval != 0 { + n += 1 + sovTunnel(uint64(m.Interval)) + } + if m.Timestamp != 0 { + n += 1 + sovTunnel(uint64(m.Timestamp)) } if m.IsActive { n += 2 @@ -1646,9 +1647,6 @@ func (m *Packet) Size() (n int) { if m.Nonce != 0 { n += 1 + sovTunnel(uint64(m.Nonce)) } - if m.FeedType != 0 { - n += 1 + sovTunnel(uint64(m.FeedType)) - } if len(m.SignalPriceInfos) > 0 { for _, e := range m.SignalPriceInfos { l = e.Size() @@ -2002,9 +2000,9 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviationBPS", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBPS", wireType) } - m.DeviationBPS = 0 + m.SoftDeviationBPS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2014,16 +2012,16 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DeviationBPS |= uint64(b&0x7F) << shift + m.SoftDeviationBPS |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBPS", wireType) } - m.Interval = 0 + m.HardDeviationBPS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2033,7 +2031,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= int64(b&0x7F) << shift + m.HardDeviationBPS |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2122,9 +2120,9 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviationBPS", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBPS", wireType) } - m.DeviationBPS = 0 + m.SoftDeviationBPS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2134,16 +2132,16 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DeviationBPS |= uint64(b&0x7F) << shift + m.SoftDeviationBPS |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBPS", wireType) } - m.Interval = 0 + m.HardDeviationBPS = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2153,7 +2151,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= int64(b&0x7F) << shift + m.HardDeviationBPS |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -2179,9 +2177,9 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } - m.LastTimestamp = 0 + m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2191,7 +2189,7 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastTimestamp |= int64(b&0x7F) << shift + m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -2407,9 +2405,9 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTriggeredBlockHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) } - m.LastTriggeredBlockHeight = 0 + m.Interval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2419,12 +2417,31 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastTriggeredBlockHeight |= uint64(b&0x7F) << shift + m.Interval |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) } @@ -2444,7 +2461,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } } m.IsActive = bool(v != 0) - case 9: + case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -2463,7 +2480,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { break } } - case 10: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } @@ -2710,25 +2727,6 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } } case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) - } - m.FeedType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeedType |= types1.FeedType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) } @@ -2762,7 +2760,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PacketContent", wireType) } @@ -2798,7 +2796,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 529c4fd69..6a1961b5d 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -39,14 +39,16 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgCreateTunnel struct { // signal_infos is the list of signal infos. SignalInfos []SignalInfo `protobuf:"bytes,1,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` + // interval is the interval for delivering the signal prices. + Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` // route is the route for delivering the signal prices - Route *types.Any `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` + Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // feed_type is the type of feed data. - FeedType types1.FeedType `protobuf:"varint,3,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` // deposit is the deposit required to create a tunnel. - Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` + Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` // creator is the address of the creator. - Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` + Creator string `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *MsgCreateTunnel) Reset() { *m = MsgCreateTunnel{} } @@ -89,6 +91,13 @@ func (m *MsgCreateTunnel) GetSignalInfos() []SignalInfo { return nil } +func (m *MsgCreateTunnel) GetInterval() uint64 { + if m != nil { + return m.Interval + } + return 0 +} + func (m *MsgCreateTunnel) GetRoute() *types.Any { if m != nil { return m.Route @@ -257,7 +266,7 @@ var xxx_messageInfo_MsgActivateTunnelResponse proto.InternalMessageInfo // MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. type MsgManualTriggerTunnel struct { // tunnel_id is the ID of the tunnel to manually trigger. - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // creator is the address of the creator. Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } @@ -452,54 +461,55 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 749 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0x8e, 0x93, 0xfe, 0xcb, 0x35, 0xea, 0x4f, 0xf5, 0xaf, 0x4a, 0x9c, 0x54, 0x38, 0x21, 0x03, - 0x4d, 0x2b, 0xd5, 0xa6, 0xa1, 0x30, 0xb0, 0x35, 0xad, 0x90, 0x32, 0x44, 0x42, 0x6e, 0x91, 0x2a, - 0x06, 0x22, 0x27, 0xbe, 0xb8, 0x27, 0x92, 0xbb, 0xc8, 0x77, 0x89, 0x9a, 0x95, 0x05, 0xc4, 0xc4, - 0xc0, 0xca, 0x17, 0xe8, 0xd4, 0xa1, 0x1f, 0xa2, 0x62, 0xaa, 0x98, 0x98, 0x0a, 0x4a, 0x87, 0x7e, - 0x0d, 0xe4, 0xbb, 0xb3, 0x93, 0x18, 0x43, 0x2b, 0x16, 0xfb, 0xee, 0x9e, 0xe7, 0x7d, 0xef, 0x79, - 0xff, 0xdc, 0x0b, 0x72, 0x6c, 0x80, 0x31, 0xec, 0x9a, 0xc3, 0x9d, 0x16, 0x64, 0xf6, 0x8e, 0xc9, - 0x4e, 0x8d, 0xbe, 0x47, 0x18, 0x51, 0x57, 0x04, 0x60, 0x48, 0xa0, 0x90, 0x77, 0x09, 0x71, 0xbb, - 0xd0, 0xe4, 0x68, 0x6b, 0xd0, 0x31, 0x6d, 0x3c, 0x12, 0xd4, 0xc2, 0x9a, 0x4b, 0x5c, 0xc2, 0x97, - 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, 0xb0, 0xf1, 0xc0, - 0xee, 0x1e, 0x79, 0xc8, 0x75, 0xa1, 0x27, 0x23, 0xc8, 0x82, 0x64, 0x28, 0x7d, 0x61, 0x7c, 0x5d, - 0x4c, 0xd6, 0x0f, 0xac, 0x24, 0xfa, 0x37, 0xb9, 0x46, 0x54, 0xee, 0x83, 0x89, 0xdc, 0x98, 0xbb, - 0xcb, 0x25, 0xa0, 0xc7, 0x23, 0xa1, 0xf0, 0x33, 0x85, 0xbf, 0xa2, 0x57, 0x7d, 0xc7, 0x66, 0xf0, - 0x25, 0x7f, 0xfe, 0xea, 0x33, 0x90, 0xb6, 0x07, 0xec, 0x84, 0x78, 0x88, 0x8d, 0xb8, 0xf0, 0xbf, - 0x69, 0x9b, 0x50, 0xd5, 0x5d, 0xb0, 0x20, 0x06, 0x88, 0x7c, 0x39, 0xd9, 0xe8, 0xbb, 0x13, 0xfe, - 0xe5, 0x9b, 0x93, 0x5c, 0x51, 0x82, 0x89, 0x97, 0x48, 0xa3, 0x4d, 0x0b, 0x2b, 0xe7, 0x79, 0xa3, - 0x4d, 0x1f, 0x05, 0x71, 0x54, 0x3f, 0xa4, 0x40, 0xaa, 0x41, 0x5d, 0xf5, 0x18, 0x64, 0x66, 0x26, - 0x42, 0x31, 0xaa, 0x21, 0xd2, 0xa9, 0x85, 0x8d, 0x3b, 0x08, 0x61, 0x2b, 0xbf, 0x01, 0x2b, 0x91, - 0xde, 0x7c, 0x18, 0x63, 0x3a, 0x4b, 0x29, 0x6c, 0xde, 0x49, 0x09, 0xfd, 0xf7, 0xc0, 0xff, 0x71, - 0xed, 0xf3, 0x28, 0xc6, 0x43, 0x0c, 0xaf, 0x60, 0xdc, 0x8f, 0x17, 0x5e, 0x77, 0x0c, 0x32, 0x33, - 0x45, 0x8f, 0x4b, 0xd4, 0x34, 0x21, 0x36, 0x51, 0x71, 0xa5, 0xa8, 0xd5, 0x2f, 0xc7, 0xba, 0x72, - 0x35, 0xd6, 0x95, 0x9f, 0x63, 0x5d, 0xf9, 0x74, 0xa3, 0x27, 0xae, 0x6e, 0xf4, 0xc4, 0xf7, 0x1b, - 0x3d, 0xf1, 0xda, 0x9c, 0x1a, 0x5c, 0x2d, 0x1b, 0x3b, 0x7c, 0xa2, 0xb6, 0x49, 0xd7, 0x6c, 0x9f, - 0xd8, 0x08, 0x9b, 0xc3, 0xaa, 0x79, 0x2a, 0xc7, 0xbf, 0x98, 0x62, 0xad, 0x05, 0xce, 0x78, 0xf2, - 0x2b, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x30, 0x36, 0x67, 0x02, 0x07, 0x00, 0x00, + // 763 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xc1, 0x4f, 0x1a, 0x4f, + 0x14, 0x66, 0x45, 0x11, 0x06, 0xe2, 0x2f, 0xee, 0xcf, 0xc8, 0x82, 0xe9, 0x42, 0x69, 0x52, 0xd1, + 0xc4, 0xdd, 0x4a, 0x6d, 0x0f, 0xbd, 0x89, 0xa6, 0x09, 0x07, 0x92, 0x66, 0xb5, 0x89, 0xe9, 0xa1, + 0x64, 0x60, 0x87, 0x75, 0x53, 0x98, 0x21, 0x3b, 0x03, 0x91, 0x6b, 0x4f, 0x4d, 0x4f, 0xfd, 0x07, + 0x7a, 0x68, 0x7a, 0xf3, 0xe4, 0xc1, 0x3f, 0xc2, 0xf4, 0x64, 0x7a, 0xea, 0xc9, 0x36, 0x78, 0xf0, + 0xdf, 0x68, 0x76, 0x66, 0x58, 0x60, 0xdd, 0x56, 0x93, 0x5e, 0xd8, 0x9d, 0xf9, 0xbe, 0xf7, 0xf6, + 0xfb, 0xde, 0x9b, 0x79, 0x80, 0x2c, 0xeb, 0x63, 0x8c, 0x3a, 0xe6, 0x60, 0xbb, 0x89, 0x18, 0xdc, + 0x36, 0xd9, 0x89, 0xd1, 0xf3, 0x08, 0x23, 0xea, 0x92, 0x00, 0x0c, 0x09, 0xe4, 0x73, 0x0e, 0x21, + 0x4e, 0x07, 0x99, 0x1c, 0x6d, 0xf6, 0xdb, 0x26, 0xc4, 0x43, 0x41, 0xcd, 0xaf, 0x38, 0xc4, 0x21, + 0xfc, 0xd5, 0xf4, 0xdf, 0xe4, 0xee, 0x5a, 0x28, 0x73, 0x0f, 0x7a, 0xb0, 0x4b, 0x25, 0x98, 0x6b, + 0x11, 0xda, 0x25, 0xb4, 0x21, 0xa2, 0xc4, 0x42, 0x42, 0xba, 0x58, 0x99, 0x4d, 0x48, 0x51, 0x10, + 0xdc, 0x22, 0x2e, 0x96, 0x78, 0x56, 0xe2, 0x5d, 0xea, 0x98, 0x83, 0x6d, 0xff, 0x21, 0x81, 0x65, + 0xd8, 0x75, 0x31, 0x31, 0xf9, 0xef, 0x1f, 0x34, 0x48, 0x4f, 0x52, 0x43, 0x1b, 0x21, 0x9b, 0x06, + 0x18, 0x5f, 0x09, 0xa8, 0xf4, 0x35, 0x0e, 0xfe, 0xab, 0x53, 0x67, 0xcf, 0x43, 0x90, 0xa1, 0x43, + 0x1e, 0xa4, 0xee, 0x81, 0x0c, 0x75, 0x1d, 0x0c, 0x3b, 0x0d, 0x17, 0xb7, 0x09, 0xd5, 0x94, 0x62, + 0xbc, 0x9c, 0xae, 0xe4, 0x8d, 0xd9, 0x3a, 0x19, 0x07, 0x9c, 0x53, 0xc3, 0x6d, 0x52, 0x9d, 0xbf, + 0xb8, 0x2a, 0xc4, 0xac, 0x34, 0x0d, 0x76, 0xa8, 0x9a, 0x07, 0x49, 0x17, 0x33, 0xe4, 0x0d, 0x60, + 0x47, 0x9b, 0x2b, 0x2a, 0xe5, 0x79, 0x2b, 0x58, 0xab, 0xcf, 0xc0, 0x82, 0x47, 0xfa, 0x0c, 0x69, + 0xf1, 0xa2, 0x52, 0x4e, 0x57, 0x56, 0x0c, 0x51, 0x71, 0x63, 0x5c, 0x71, 0x63, 0x17, 0x0f, 0xab, + 0xa9, 0x6f, 0xe7, 0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 0x3d, + 0x8e, 0xc8, 0x10, 0xc1, 0xcb, 0x1b, 0xf7, 0xe3, 0x05, 0x9f, 0x3b, 0x02, 0x99, 0x99, 0xa6, 0x47, + 0x15, 0x6a, 0x9a, 0x10, 0x59, 0xa8, 0xa8, 0x56, 0x54, 0x6b, 0x17, 0x23, 0x5d, 0xb9, 0x1c, 0xe9, + 0xca, 0xaf, 0x91, 0xae, 0x7c, 0xba, 0xd6, 0x63, 0x97, 0xd7, 0x7a, 0xec, 0xc7, 0xb5, 0x1e, 0x7b, + 0x63, 0x4e, 0x4d, 0xb1, 0x26, 0xc4, 0x36, 0x1f, 0xaf, 0x2d, 0xd2, 0x31, 0x5b, 0xc7, 0xd0, 0xc5, + 0xe6, 0xa0, 0x62, 0x9e, 0xc8, 0xff, 0x09, 0x31, 0xd2, 0x9a, 0x09, 0xce, 0x78, 0xfa, 0x3b, 0x00, + 0x00, 0xff, 0xff, 0x51, 0x81, 0x6b, 0x1d, 0x2b, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -723,7 +733,7 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Creator) i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } if len(m.Deposit) > 0 { for iNdEx := len(m.Deposit) - 1; iNdEx >= 0; iNdEx-- { @@ -736,13 +746,13 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } } if m.FeedType != 0 { i = encodeVarintTx(dAtA, i, uint64(m.FeedType)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } if m.Route != nil { { @@ -754,7 +764,12 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if m.Interval != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Interval)) + i-- + dAtA[i] = 0x10 } if len(m.SignalInfos) > 0 { for iNdEx := len(m.SignalInfos) - 1; iNdEx >= 0; iNdEx-- { @@ -1003,6 +1018,9 @@ func (m *MsgCreateTunnel) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } + if m.Interval != 0 { + n += 1 + sovTx(uint64(m.Interval)) + } if m.Route != nil { l = m.Route.Size() n += 1 + l + sovTx(uint64(l)) @@ -1179,6 +1197,25 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + m.Interval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) } @@ -1214,7 +1251,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) } @@ -1233,7 +1270,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { break } } - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) } @@ -1267,7 +1304,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } From 266c03ed2cf2228e21fd53e83f455e095452d36d Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 23 Aug 2024 14:34:03 +0700 Subject: [PATCH 048/272] add comment --- x/tunnel/keeper/tunnel.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 5fb7ececd..6ed6d7afd 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -283,6 +283,9 @@ func GenerateSignalPriceInfosBasedOnDeviation( } deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) deviationInBPS := uint64(deviation * 10000) + + // if the deviation is greater than the hard deviation, send the signal price info + // soft deviation is the feature to be implemented in the future if deviationInBPS >= sp.HardDeviationBPS { nsps = append( nsps, From 9bf4655a0b2a746f9aafbbb41fa37a92895d3318 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 23 Aug 2024 14:34:33 +0700 Subject: [PATCH 049/272] update comment --- x/tunnel/keeper/tunnel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 6ed6d7afd..48db7ba0a 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -284,7 +284,7 @@ func GenerateSignalPriceInfosBasedOnDeviation( deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) deviationInBPS := uint64(deviation * 10000) - // if the deviation is greater than the hard deviation, send the signal price info + // if the deviation is greater than the hard deviation, add the signal price info to the list // soft deviation is the feature to be implemented in the future if deviationInBPS >= sp.HardDeviationBPS { nsps = append( From 022b1e101bbb648b32e7a6e9da4a5b5a4ec3d952 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 26 Aug 2024 15:30:44 +0700 Subject: [PATCH 050/272] update comment --- proto/tunnel/v1beta1/genesis.proto | 2 +- proto/tunnel/v1beta1/query.proto | 14 +-- proto/tunnel/v1beta1/tunnel.proto | 22 ++-- proto/tunnel/v1beta1/tx.proto | 2 +- x/tunnel/client/cli/tx.go | 14 +-- x/tunnel/keeper/account.go | 14 +-- x/tunnel/keeper/msg_server.go | 10 +- x/tunnel/keeper/tunnel.go | 15 +-- x/tunnel/keeper/tunnel_test.go | 8 +- x/tunnel/types/genesis.pb.go | 2 +- x/tunnel/types/keys.go | 4 +- x/tunnel/types/msgs.go | 32 ++---- x/tunnel/types/packet.go | 2 +- x/tunnel/types/params.go | 17 +-- x/tunnel/types/query.pb.go | 14 +-- x/tunnel/types/tunnel.go | 10 -- x/tunnel/types/tunnel.pb.go | 161 +++++++++++++++-------------- x/tunnel/types/tx.pb.go | 118 ++++++++++----------- 18 files changed, 219 insertions(+), 242 deletions(-) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index f90870b98..ccf9382ee 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -9,7 +9,7 @@ import "tunnel/v1beta1/tunnel.proto"; // GenesisState represents the initial state of the blockchain. message GenesisState { - // Params is all parameters of the module. + // params is all parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; // tunnel_count is the number of tunnels. uint64 tunnel_count = 2; diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index b0c5524bf..f329f5a34 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -67,19 +67,19 @@ message QueryTunnelsResponse { // QueryTunnelRequest is the request type for the Query/Tunnel RPC method. message QueryTunnelRequest { - // TunnelID is the ID of the tunnel to query. + // tunnel_id is the ID of the tunnel to query. uint64 tunnel_id = 1; } // QueryTunnelResponse is the response type for the Query/Tunnel RPC method. message QueryTunnelResponse { - // Tunnel is the tunnel with the given ID. + // tunnel is the tunnel with the given ID. Tunnel tunnel = 1 [(gogoproto.nullable) = false]; } // QueryPacketsRequest is the request type for the Query/Packets RPC method. message QueryPacketsRequest { - // TunnelID is the ID of the tunnel to query packets. + // tunnel_id is the ID of the tunnel to query packets. uint64 tunnel_id = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -87,7 +87,7 @@ message QueryPacketsRequest { // QueryPacketsResponse is the response type for the Query/Packets RPC method. message QueryPacketsResponse { - // Packets is a list of packets. + // packets is a list of packets. repeated Packet packets = 1; // pagination defines an optional pagination for the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; @@ -95,9 +95,9 @@ message QueryPacketsResponse { // QueryPacketRequest is the request type for the Query/Packet RPC method. message QueryPacketRequest { - // TunnelID is the ID of the tunnel to query packets. + // tunnel_id is the ID of the tunnel to query packets. uint64 tunnel_id = 1; - // Nonce is the nonce of the packet to query. + // nonce is the nonce of the packet to query. uint64 nonce = 2; } @@ -112,6 +112,6 @@ message QueryParamsRequest {} // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { - // Params is the parameters of the module. + // params is the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 4ba83b9b0..3b99e2f64 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -50,17 +50,17 @@ message SignalPriceInfo { message Tunnel { option (gogoproto.equal) = true; - uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 nonce_count = 2; - google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; - feeds.v1beta1.FeedType feed_type = 4; - string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; - uint64 interval = 7; - int64 timestamp = 8; - bool is_active = 9; - int64 created_at = 10; - string creator = 11 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 id = 1 [(gogoproto.customname) = "ID"]; + uint64 nonce_count = 2; + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; + feeds.v1beta1.FeedType feed_type = 4; + string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; + uint64 interval = 7; + int64 last_interval_timestamp = 8; + bool is_active = 9; + int64 created_at = 10; + string creator = 11 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 4ae1f73e2..609531caf 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -74,7 +74,7 @@ message MsgManualTriggerTunnel { option (amino.name) = "tunnel/MsgManualTriggerTunnel"; // tunnel_id is the ID of the tunnel to manually trigger. - uint64 tunnel_id = 1 [(gogoproto.customname) = "ID"]; + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // creator is the address of the creator. string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 9a814a122..d7d5a6621 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -61,18 +61,12 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - var route types.RouteI - tssRoute := types.TSSRoute{ - DestinationChainID: args[1], - DestinationContractAddress: args[2], - } - route = &tssRoute - - msg, err := types.NewMsgCreateTunnel( + msg, err := types.NewMsgCreateTSSTunnel( signalInfos, interval, - route, feedstypes.FeedType(feedType), + args[1], + args[2], deposit, clientCtx.GetFromAddress(), ) @@ -91,7 +85,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { func GetTxCmdActivateTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "activate-tunnel [id]", + Use: "activate-tunnel [tunnel-id]", Short: "Activate a tunnel", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/tunnel/keeper/account.go b/x/tunnel/keeper/account.go index d40d3061d..1b109c017 100644 --- a/x/tunnel/keeper/account.go +++ b/x/tunnel/keeper/account.go @@ -19,23 +19,23 @@ func (k Keeper) GenerateAccount(ctx sdk.Context, key string) (sdk.AccAddress, er return nil, err } - keyAccAddr := sdk.AccAddress(moduleCred.Address()) + tunnelAccAddr := sdk.AccAddress(moduleCred.Address()) // This should not happen - if acc := k.authKeeper.GetAccount(ctx, keyAccAddr); acc != nil { + if acc := k.authKeeper.GetAccount(ctx, tunnelAccAddr); acc != nil { return nil, types.ErrAccountAlreadyExist.Wrapf( "existing account for newly generated key account address %s", - keyAccAddr.String(), + tunnelAccAddr.String(), ) } - keyAcc, err := authtypes.NewBaseAccountWithPubKey(moduleCred) + tunnelAcc, err := authtypes.NewBaseAccountWithPubKey(moduleCred) if err != nil { return nil, err } - k.authKeeper.NewAccount(ctx, keyAcc) - k.authKeeper.SetAccount(ctx, keyAcc) + k.authKeeper.NewAccount(ctx, tunnelAcc) + k.authKeeper.SetAccount(ctx, tunnelAcc) - return keyAccAddr, nil + return tunnelAccAddr, nil } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 8975a6ff7..e775d2eb4 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -28,6 +28,8 @@ func (ms msgServer) CreateTunnel( ) (*types.MsgCreateTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) + // TODO: check deposit with params, transfer deposit to module account + var signalPriceInfos []types.SignalPriceInfo for _, signalInfo := range req.SignalInfos { signalPriceInfos = append(signalPriceInfos, types.SignalPriceInfo{ @@ -104,7 +106,7 @@ func (ms msgServer) ManualTriggerTunnel( ) (*types.MsgManualTriggerTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - tunnel, err := ms.Keeper.GetTunnel(ctx, req.ID) + tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) if err != nil { return nil, err } @@ -112,16 +114,16 @@ func (ms msgServer) ManualTriggerTunnel( return nil, types.ErrInvalidTunnelCreator.Wrapf( "creator %s, tunnelID %d", req.Creator, - req.ID, + req.TunnelID, ) } // Add the tunnel to the pending trigger list - ms.Keeper.AddPendingTriggerTunnel(ctx, req.ID) + ms.Keeper.AddPendingTriggerTunnel(ctx, req.TunnelID) ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeManualTriggerTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.ID)), + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), )) return &types.MsgManualTriggerTunnelResponse{}, nil diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 48db7ba0a..803d24035 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -86,8 +86,8 @@ func (k Keeper) GetTunnels(ctx sdk.Context) []types.Tunnel { return tunnels } -// GetActiveTunnels returns all active tunnels -func (k Keeper) GetActiveTunnels(ctx sdk.Context) []types.Tunnel { +// GetTunnelsByActiveStatus returns all tunnels by their active status +func (k Keeper) GetTunnelsByActiveStatus(ctx sdk.Context, isActive bool) []types.Tunnel { var tunnels []types.Tunnel iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.TunnelStoreKeyPrefix) defer iterator.Close() @@ -96,7 +96,7 @@ func (k Keeper) GetActiveTunnels(ctx sdk.Context) []types.Tunnel { var tunnel types.Tunnel k.cdc.MustUnmarshal(iterator.Value(), &tunnel) - if tunnel.IsActive { + if tunnel.IsActive == isActive { tunnels = append(tunnels, tunnel) } } @@ -150,14 +150,15 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error func (k Keeper) GeneratePackets(ctx sdk.Context) []types.Packet { packets := []types.Packet{} - activeTunnels := k.GetActiveTunnels(ctx) + activeTunnels := k.GetTunnelsByActiveStatus(ctx, true) + // TODO: feeds module needs to be implemented get prices that can use latestPrices := k.feedsKeeper.GetPrices(ctx) latestPricesMap := CreateLatestPricesMap(latestPrices) unixNow := ctx.BlockTime().Unix() // check for active tunnels for _, at := range activeTunnels { - if unixNow >= int64(at.Interval)+at.Timestamp { + if unixNow >= int64(at.Interval)+at.LastIntervalTimestamp { sps := GenerateSignalPriceInfos(ctx, at.SignalPriceInfos, latestPricesMap, at.ID) if len(sps) > 0 { packets = append(packets, types.NewPacket(at.ID, at.NonceCount+1, sps, unixNow)) @@ -175,7 +176,7 @@ func (k Keeper) GeneratePackets(ctx sdk.Context) []types.Packet { for _, id := range pendingTriggerTunnels { tunnel := k.MustGetTunnel(ctx, id) // skip if the tunnel is already in trigger list - if unixNow >= int64(tunnel.Interval)+tunnel.Timestamp && tunnel.IsActive { + if unixNow >= int64(tunnel.Interval)+tunnel.LastIntervalTimestamp && tunnel.IsActive { continue } sps := GenerateSignalPriceInfos(ctx, tunnel.SignalPriceInfos, latestPricesMap, tunnel.ID) @@ -215,7 +216,7 @@ func (k Keeper) HandlePacket(ctx sdk.Context, packet types.Packet) { // update tunnel data tunnel.NonceCount = packet.Nonce tunnel.SignalPriceInfos = packet.SignalPriceInfos - tunnel.Timestamp = packet.CreatedAt + tunnel.LastIntervalTimestamp = packet.CreatedAt k.SetTunnel(ctx, tunnel) } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 7ba91d15e..3f08fa744 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -87,18 +87,18 @@ func TestGetTunnels(t *testing.T) { require.Len(s.T(), tunnels, 1, "expected 1 tunnel to be retrieved") } -func TestGetActiveTunnels(t *testing.T) { +func TestGetTunnelsByActiveStatus(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper // Create a new tunnel instance - tunnel := types.Tunnel{ID: 1, IsActive: true} + tunnel := types.Tunnel{ID: 1, IsActive: false} // Set the tunnel in the keeper k.SetTunnel(ctx, tunnel) - // Retrieve all active tunnels - tunnels := k.GetActiveTunnels(ctx) + // Retrieve all tunnels by active status + tunnels := k.GetTunnelsByActiveStatus(ctx, false) // Assert the number of active tunnels is 1 require.Len(s.T(), tunnels, 1, "expected 1 active tunnel to be retrieved") diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 94d6dc09b..260fa8790 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -25,7 +25,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState represents the initial state of the blockchain. type GenesisState struct { - // Params is all parameters of the module. + // params is all parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // tunnel_count is the number of tunnels. TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index b65db83d4..6c5312ca0 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -39,8 +39,8 @@ var ( ParamsKey = []byte{0x10} ) -func TunnelStoreKey(id uint64) []byte { - return append(TunnelStoreKeyPrefix, sdk.Uint64ToBigEndian(id)...) +func TunnelStoreKey(tunnelID uint64) []byte { + return append(TunnelStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } func TunnelPacketsStoreKey(tunnelID uint64) []byte { diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 922dccfeb..069cbc230 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -86,25 +86,18 @@ func NewMsgCreateTunnel( // NewMsgCreateTunnel creates a new MsgCreateTunnel instance. func NewMsgCreateTSSTunnel( signalInfos []SignalInfo, + interval uint64, feedType feedstypes.FeedType, destinationChainID string, destinationContractAddress string, deposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { - m := &MsgCreateTunnel{ - SignalInfos: signalInfos, - FeedType: feedType, - Deposit: deposit, - Creator: creator.String(), - } - r := &TSSRoute{ DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } - - err := m.SetTunnelRoute(r) + m, err := NewMsgCreateTunnel(signalInfos, interval, r, feedType, deposit, creator) if err != nil { return nil, err } @@ -115,26 +108,22 @@ func NewMsgCreateTSSTunnel( // NewMsgCreateTunnel creates a new MsgCreateTunnel instance. func NewMsgCreateAxelarTunnel( signalInfos []SignalInfo, + interval uint64, feedType feedstypes.FeedType, destinationChainID string, destinationContractAddress string, deposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { - m := &MsgCreateTunnel{ - SignalInfos: signalInfos, - FeedType: feedType, - Deposit: deposit, - Creator: creator.String(), - } - - err := m.SetTunnelRoute(&AxelarRoute{ + r := &TSSRoute{ DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, - }) + } + m, err := NewMsgCreateTunnel(signalInfos, interval, r, feedType, deposit, creator) if err != nil { return nil, err } + return m, nil } @@ -157,8 +146,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { if !ok { return sdkerrors.ErrPackAny.Wrapf("cannot unpack route") } - err := r.ValidateBasic() - if err != nil { + if err := r.ValidateBasic(); err != nil { return err } return nil @@ -196,11 +184,11 @@ func (m MsgCreateTunnel) GetTunnelRoute() RouteI { // NewMsgActivateTunnel creates a new MsgActivateTunnel instance. func NewMsgActivateTunnel( - id uint64, + tunnelID uint64, creator string, ) *MsgActivateTunnel { return &MsgActivateTunnel{ - TunnelID: id, + TunnelID: tunnelID, Creator: creator, } } diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index fd558102e..ff10d72ab 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -44,7 +44,7 @@ func (p *Packet) SetPacketContent(packetContent PacketContentI) error { return nil } -// GetGrant unpacks allowance +// GetContent returns the content of the packet. func (p Packet) GetContent() (PacketContentI, error) { packetContent, ok := p.PacketContent.GetCachedValue().(PacketContentI) if !ok { diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 7dfaac92f..cda3a48ae 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -2,7 +2,6 @@ package types import ( "fmt" - "time" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -10,7 +9,7 @@ import ( ) var ( - DefaultMinInterval = uint64((1 * time.Second).Seconds()) + DefaultMinInterval = uint64(1) DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) DefaultMinDeviationBPS = uint64(100) DefaultBaseFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) @@ -55,14 +54,12 @@ func (p Params) Validate() error { if !p.MinDeposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf(p.MinDeposit.String()) } - // Validate MinDeviationBPS uint64 - if err := validateUint64("min deviation BPS", false)(p.MinDeviationBPS); err != nil { - return err - } + // Validate MinDeviationBPS - if err := validateBasisPoint(p.MinDeviationBPS); err != nil { + if err := validateBasisPoint("min deviation BPS", p.MinDeviationBPS); err != nil { return err } + // Validate TSSRouteFee if !p.TSSRouteFee.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf(p.TSSRouteFee.String()) @@ -82,7 +79,11 @@ func (p Params) String() string { } // validateBasisPoint validates if a given number is a valid basis point (0 to 10000). -func validateBasisPoint(bp uint64) error { +func validateBasisPoint(name string, bp uint64) error { + if err := validateUint64(name, false)(bp); err != nil { + return err + } + if bp > 10000 { return fmt.Errorf("invalid basis point: must be between 0 and 10000") } diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 141490c67..fcba36ed8 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -174,7 +174,7 @@ func (m *QueryTunnelsResponse) GetPagination() *query.PageResponse { // QueryTunnelRequest is the request type for the Query/Tunnel RPC method. type QueryTunnelRequest struct { - // TunnelID is the ID of the tunnel to query. + // tunnel_id is the ID of the tunnel to query. TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` } @@ -220,7 +220,7 @@ func (m *QueryTunnelRequest) GetTunnelId() uint64 { // QueryTunnelResponse is the response type for the Query/Tunnel RPC method. type QueryTunnelResponse struct { - // Tunnel is the tunnel with the given ID. + // tunnel is the tunnel with the given ID. Tunnel Tunnel `protobuf:"bytes,1,opt,name=tunnel,proto3" json:"tunnel"` } @@ -266,7 +266,7 @@ func (m *QueryTunnelResponse) GetTunnel() Tunnel { // QueryPacketsRequest is the request type for the Query/Packets RPC method. type QueryPacketsRequest struct { - // TunnelID is the ID of the tunnel to query packets. + // tunnel_id is the ID of the tunnel to query packets. TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -321,7 +321,7 @@ func (m *QueryPacketsRequest) GetPagination() *query.PageRequest { // QueryPacketsResponse is the response type for the Query/Packets RPC method. type QueryPacketsResponse struct { - // Packets is a list of packets. + // packets is a list of packets. Packets []*Packet `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets,omitempty"` // pagination defines an optional pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -376,9 +376,9 @@ func (m *QueryPacketsResponse) GetPagination() *query.PageResponse { // QueryPacketRequest is the request type for the Query/Packet RPC method. type QueryPacketRequest struct { - // TunnelID is the ID of the tunnel to query packets. + // tunnel_id is the ID of the tunnel to query packets. TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // Nonce is the nonce of the packet to query. + // nonce is the nonce of the packet to query. Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` } @@ -514,7 +514,7 @@ var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { - // Params is the parameters of the module. + // params is the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 9b0e6a2da..6c5bb56d4 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -30,16 +30,6 @@ func (t *Tunnel) SetRoute(route RouteI) error { return nil } -// IsTunnelInList checks if a tunnel with the given ID is in the list of tunnels. -func IsTunnelInList(id uint64, tunnels []Tunnel) bool { - for _, tunnel := range tunnels { - if tunnel.ID == id { - return true - } - } - return false -} - // NewSignalPriceInfo creates a new SignalPriceInfo instance. func NewSignalPriceInfo( signalID string, diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 380878929..bed685d67 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -273,17 +273,17 @@ func (m *SignalPriceInfo) GetTimestamp() int64 { // Tunnel is the type for a tunnel type Tunnel struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` - Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` - FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,6,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` - Timestamp int64 `protobuf:"varint,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - IsActive bool `protobuf:"varint,9,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` + Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,6,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` + Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` + LastIntervalTimestamp int64 `protobuf:"varint,8,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` + IsActive bool `protobuf:"varint,9,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *Tunnel) Reset() { *m = Tunnel{} } @@ -368,9 +368,9 @@ func (m *Tunnel) GetInterval() uint64 { return 0 } -func (m *Tunnel) GetTimestamp() int64 { +func (m *Tunnel) GetLastIntervalTimestamp() int64 { if m != nil { - return m.Timestamp + return m.LastIntervalTimestamp } return 0 } @@ -656,65 +656,66 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 916 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x8e, 0xe3, 0x44, - 0x10, 0x1e, 0x27, 0x99, 0x6c, 0x52, 0xb3, 0x0c, 0xa3, 0x26, 0x2c, 0xde, 0xd9, 0x25, 0x8e, 0x72, - 0x0a, 0x87, 0xb1, 0xd9, 0xf0, 0x73, 0x98, 0x13, 0xf1, 0x44, 0x68, 0x2d, 0x84, 0x08, 0x76, 0x4e, - 0x5c, 0x2c, 0xc7, 0xdd, 0xf1, 0x34, 0x64, 0xba, 0x8d, 0xbb, 0x13, 0x6d, 0x5e, 0x02, 0xf1, 0x04, - 0x08, 0x21, 0x21, 0xf1, 0x00, 0xf3, 0x0a, 0x48, 0xab, 0x3d, 0xad, 0x38, 0x71, 0x8a, 0x90, 0xe7, - 0x00, 0x12, 0x6f, 0xc0, 0x01, 0x21, 0x77, 0x3b, 0x93, 0x49, 0xc4, 0x68, 0x91, 0xe0, 0xb0, 0xdc, - 0xba, 0xbe, 0xfa, 0x71, 0xd5, 0x57, 0x55, 0xdd, 0x86, 0x07, 0x72, 0xce, 0x18, 0x99, 0x39, 0x8b, - 0x47, 0x13, 0x22, 0xa3, 0x47, 0x8e, 0x16, 0xed, 0x34, 0xe3, 0x92, 0xa3, 0xc3, 0x52, 0x2a, 0x95, - 0xc7, 0xad, 0x84, 0x27, 0x5c, 0xa9, 0x9c, 0xe2, 0xa4, 0xad, 0x8e, 0xef, 0x27, 0x9c, 0x27, 0x33, - 0xe2, 0x28, 0x69, 0x32, 0x9f, 0x3a, 0x11, 0x5b, 0xae, 0x55, 0x31, 0x17, 0x17, 0x5c, 0x84, 0xda, - 0x47, 0x0b, 0x6b, 0xd5, 0x94, 0x10, 0x2c, 0xae, 0xbf, 0xab, 0x24, 0xad, 0xea, 0x7e, 0x67, 0x40, - 0x63, 0x1c, 0x04, 0x3e, 0x9f, 0x4b, 0x82, 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91, 0x70, 0x6b, 0x4f, 0x57, 0xd6, 0x9e, 0x7f, 0x24, 0xb6, 0x61, 0x81, 0x8e, - 0xa1, 0x41, 0x99, 0x24, 0xd9, 0x22, 0x9a, 0x99, 0x77, 0x14, 0x2f, 0xd7, 0xf2, 0x36, 0xfb, 0x8d, - 0x1d, 0xf6, 0xd1, 0x03, 0x68, 0x52, 0x11, 0x46, 0xb1, 0xa4, 0x0b, 0x62, 0x36, 0x3b, 0x46, 0xaf, - 0xe1, 0x37, 0xa8, 0x18, 0x28, 0x19, 0xbd, 0x09, 0x10, 0x67, 0x24, 0x92, 0x04, 0x87, 0x91, 0x34, - 0x41, 0xfb, 0x96, 0xc8, 0x40, 0xa2, 0x3e, 0xdc, 0x51, 0x02, 0xcf, 0xcc, 0x83, 0x17, 0xd4, 0xbf, - 0x36, 0x2c, 0xbb, 0xdd, 0x87, 0xd7, 0x47, 0x84, 0x61, 0xca, 0x92, 0x71, 0x46, 0x93, 0x84, 0x64, - 0xba, 0xf5, 0x02, 0xdd, 0x87, 0x2a, 0xc5, 0xc2, 0x34, 0x3a, 0xd5, 0x5e, 0xcd, 0xbd, 0x93, 0xaf, - 0xac, 0xaa, 0x37, 0x14, 0x7e, 0x81, 0x75, 0xbf, 0xaa, 0x40, 0x7d, 0x14, 0xc5, 0x5f, 0x10, 0x59, - 0x6c, 0x86, 0x26, 0x2a, 0xbc, 0x1e, 0x14, 0xb5, 0x19, 0x3a, 0x4a, 0xb1, 0x19, 0x5a, 0xed, 0xe1, - 0x62, 0x22, 0xd5, 0x84, 0x94, 0xe3, 0xa2, 0x85, 0x5b, 0x9a, 0x50, 0xfd, 0x77, 0x4d, 0xf8, 0x04, - 0x0e, 0x53, 0x95, 0x9f, 0xba, 0xd4, 0x08, 0x93, 0x6a, 0x96, 0x6e, 0x9b, 0x43, 0xf4, 0xec, 0xf2, - 0xe4, 0x50, 0xd7, 0x73, 0xa6, 0xcd, 0x3d, 0xff, 0x95, 0xf4, 0xa6, 0xbc,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0x09, 0x00, 0x00, + // 934 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, + 0x14, 0x5f, 0x27, 0xd9, 0x6c, 0xf2, 0x52, 0xc2, 0x6a, 0x48, 0x5b, 0x77, 0x5b, 0xe2, 0x28, 0xa7, + 0x70, 0x58, 0x9b, 0x06, 0xe8, 0x61, 0x4f, 0xc4, 0x1b, 0xa1, 0x5a, 0x08, 0x11, 0xec, 0x9c, 0xb8, + 0x58, 0x8e, 0x3d, 0xf1, 0x0e, 0x64, 0x67, 0x8c, 0x67, 0x12, 0x35, 0x1f, 0x80, 0x2b, 0xe2, 0x13, + 0x20, 0x84, 0x84, 0xc4, 0x07, 0xd8, 0xaf, 0x80, 0x54, 0xf5, 0x54, 0x71, 0xe2, 0x14, 0x21, 0xef, + 0x01, 0x3e, 0x03, 0x07, 0x84, 0x3c, 0xe3, 0x6c, 0x36, 0x11, 0xab, 0x22, 0xc1, 0x61, 0x7b, 0xf3, + 0xfb, 0xfd, 0xde, 0xbc, 0xbc, 0x3f, 0xbf, 0x37, 0x13, 0x78, 0x28, 0xe6, 0x94, 0xe2, 0x99, 0xb5, + 0x78, 0x3c, 0xc1, 0x22, 0x78, 0x6c, 0x29, 0xd3, 0x4c, 0x52, 0x26, 0x18, 0x6a, 0x16, 0x56, 0x41, + 0x1e, 0xb5, 0x62, 0x16, 0x33, 0x49, 0x59, 0xf9, 0x97, 0xf2, 0x3a, 0x7a, 0x10, 0x33, 0x16, 0xcf, + 0xb0, 0x25, 0xad, 0xc9, 0x7c, 0x6a, 0x05, 0x74, 0xb9, 0xa6, 0x42, 0xc6, 0xcf, 0x19, 0xf7, 0xd5, + 0x19, 0x65, 0xac, 0xa9, 0x29, 0xc6, 0x11, 0xbf, 0xfa, 0x5d, 0x69, 0x29, 0xaa, 0xfb, 0x83, 0x06, + 0xb5, 0xb1, 0xe7, 0xb9, 0x6c, 0x2e, 0x30, 0x7a, 0x0a, 0xad, 0x08, 0x73, 0x41, 0x68, 0x20, 0x08, + 0xa3, 0x7e, 0x78, 0x16, 0x10, 0xea, 0x93, 0x48, 0xd7, 0x3a, 0x5a, 0xaf, 0x6e, 0xdf, 0xcb, 0x56, + 0x06, 0x1a, 0x6e, 0xf8, 0xd3, 0x9c, 0x76, 0x86, 0x2e, 0x8a, 0x76, 0xb1, 0x08, 0x7d, 0x08, 0x8f, + 0xb6, 0x22, 0x31, 0x2a, 0xd2, 0x20, 0x14, 0x7e, 0x10, 0x45, 0x29, 0xe6, 0x5c, 0x2f, 0xe5, 0x11, + 0xdd, 0xa3, 0xeb, 0x27, 0x0b, 0x97, 0x81, 0xf2, 0x38, 0x81, 0x17, 0x17, 0xc7, 0x55, 0x99, 0x96, + 0xd3, 0xfd, 0x51, 0x83, 0xc6, 0xe0, 0x19, 0x9e, 0x05, 0xe9, 0xed, 0xce, 0xf3, 0x67, 0x0d, 0xc0, + 0x23, 0x31, 0x0d, 0x66, 0x0e, 0x9d, 0x32, 0xf4, 0x0e, 0xd4, 0xb9, 0xb4, 0x36, 0xb9, 0xdd, 0xc9, + 0x56, 0x46, 0xad, 0x70, 0x19, 0xba, 0x35, 0x45, 0x3b, 0x11, 0xb2, 0x01, 0x71, 0x36, 0x15, 0x7e, + 0x84, 0x17, 0x44, 0xa5, 0x32, 0x49, 0xd4, 0xaf, 0x57, 0xec, 0x56, 0xb6, 0x32, 0x0e, 0x3d, 0x36, + 0x15, 0xc3, 0x35, 0x69, 0x8f, 0x3c, 0xf7, 0x90, 0x6f, 0x21, 0x09, 0xcf, 0x63, 0x9c, 0x05, 0x69, + 0xb4, 0x13, 0xa3, 0xbc, 0x89, 0xf1, 0x34, 0x48, 0xa3, 0xed, 0x18, 0x67, 0x5b, 0x48, 0xc2, 0x4f, + 0x2a, 0x7f, 0x7c, 0x6f, 0x68, 0xdd, 0xbf, 0x34, 0x78, 0x53, 0x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 0x24, 0x73, 0x47, 0x12, 0x76, 0xe5, 0xf9, 0xca, 0xd8, 0x73, 0x0f, 0xf9, 0x36, 0xcc, 0xd1, + 0x11, 0xd4, 0x08, 0x15, 0x38, 0x5d, 0x04, 0x33, 0xfd, 0x40, 0xf6, 0xe5, 0xca, 0x46, 0x4f, 0xe0, + 0xfe, 0x2c, 0xe0, 0xc2, 0x5f, 0x03, 0xfe, 0x66, 0x16, 0x35, 0x39, 0x8b, 0xbb, 0x39, 0xed, 0x14, + 0xec, 0x78, 0x4d, 0xa2, 0x87, 0x50, 0x27, 0xdc, 0x0f, 0x42, 0x41, 0x16, 0x58, 0xaf, 0x77, 0xb4, + 0x5e, 0xcd, 0xad, 0x11, 0x3e, 0x90, 0x36, 0x7a, 0x1b, 0x20, 0x4c, 0x71, 0x20, 0x70, 0xe4, 0x07, + 0x42, 0x07, 0x35, 0xd3, 0x02, 0x19, 0x08, 0xd4, 0x87, 0x03, 0x69, 0xb0, 0x54, 0x6f, 0xbc, 0xa2, + 0x33, 0x6b, 0xc7, 0x42, 0x07, 0x7d, 0xb8, 0x3b, 0xc2, 0x34, 0x22, 0x34, 0x1e, 0xa7, 0x24, 0x8e, + 0x71, 0xaa, 0x44, 0xc1, 0xd1, 0x03, 0x28, 0x93, 0x88, 0xeb, 0x5a, 0xa7, 0xdc, 0xab, 0xd8, 0x07, + 0xd9, 0xca, 0x28, 0x3b, 0x43, 0xee, 0xe6, 0x58, 0xf7, 0x9b, 0x12, 0x54, 0x47, 0x41, 0xf8, 0x25, + 0x16, 0xf9, 0xce, 0xa8, 0x16, 0xfa, 0x57, 0x12, 0x92, 0x3b, 0xa3, 0xa2, 0xe4, 0x3b, 0xa3, 0x68, + 0x27, 0xca, 0xb5, 0x2a, 0xb5, 0x53, 0x08, 0x49, 0x19, 0x37, 0x8c, 0xa7, 0xfc, 0xdf, 0xc6, 0xf3, + 0x29, 0x34, 0x13, 0x99, 0x9f, 0xbc, 0xee, 0x30, 0x15, 0x52, 0x65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x7f, + 0xa1, 0xe4, 0xb4, 0x27, 0x55, 0xe9, 0xf1, 0xde, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x3d, + 0xbd, 0xc0, 0x59, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -882,7 +883,7 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.Interval != that1.Interval { return false } - if this.Timestamp != that1.Timestamp { + if this.LastIntervalTimestamp != that1.LastIntervalTimestamp { return false } if this.IsActive != that1.IsActive { @@ -1232,8 +1233,8 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x48 } - if m.Timestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) + if m.LastIntervalTimestamp != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.LastIntervalTimestamp)) i-- dAtA[i] = 0x40 } @@ -1603,8 +1604,8 @@ func (m *Tunnel) Size() (n int) { if m.Interval != 0 { n += 1 + sovTunnel(uint64(m.Interval)) } - if m.Timestamp != 0 { - n += 1 + sovTunnel(uint64(m.Timestamp)) + if m.LastIntervalTimestamp != 0 { + n += 1 + sovTunnel(uint64(m.LastIntervalTimestamp)) } if m.IsActive { n += 2 @@ -2424,9 +2425,9 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastIntervalTimestamp", wireType) } - m.Timestamp = 0 + m.LastIntervalTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2436,7 +2437,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift + m.LastIntervalTimestamp |= int64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 6a1961b5d..5dc64ada5 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -266,7 +266,7 @@ var xxx_messageInfo_MsgActivateTunnelResponse proto.InternalMessageInfo // MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. type MsgManualTriggerTunnel struct { // tunnel_id is the ID of the tunnel to manually trigger. - ID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // creator is the address of the creator. Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } @@ -304,9 +304,9 @@ func (m *MsgManualTriggerTunnel) XXX_DiscardUnknown() { var xxx_messageInfo_MsgManualTriggerTunnel proto.InternalMessageInfo -func (m *MsgManualTriggerTunnel) GetID() uint64 { +func (m *MsgManualTriggerTunnel) GetTunnelID() uint64 { if m != nil { - return m.ID + return m.TunnelID } return 0 } @@ -461,55 +461,55 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 763 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xc1, 0x4f, 0x1a, 0x4f, - 0x14, 0x66, 0x45, 0x11, 0x06, 0xe2, 0x2f, 0xee, 0xcf, 0xc8, 0x82, 0xe9, 0x42, 0x69, 0x52, 0xd1, - 0xc4, 0xdd, 0x4a, 0x6d, 0x0f, 0xbd, 0x89, 0xa6, 0x09, 0x07, 0x92, 0x66, 0xb5, 0x89, 0xe9, 0xa1, - 0x64, 0x60, 0x87, 0x75, 0x53, 0x98, 0x21, 0x3b, 0x03, 0x91, 0x6b, 0x4f, 0x4d, 0x4f, 0xfd, 0x07, - 0x7a, 0x68, 0x7a, 0xf3, 0xe4, 0xc1, 0x3f, 0xc2, 0xf4, 0x64, 0x7a, 0xea, 0xc9, 0x36, 0x78, 0xf0, - 0xdf, 0x68, 0x76, 0x66, 0x58, 0x60, 0xdd, 0x56, 0x93, 0x5e, 0xd8, 0x9d, 0xf9, 0xbe, 0xf7, 0xf6, - 0xfb, 0xde, 0x9b, 0x79, 0x80, 0x2c, 0xeb, 0x63, 0x8c, 0x3a, 0xe6, 0x60, 0xbb, 0x89, 0x18, 0xdc, - 0x36, 0xd9, 0x89, 0xd1, 0xf3, 0x08, 0x23, 0xea, 0x92, 0x00, 0x0c, 0x09, 0xe4, 0x73, 0x0e, 0x21, - 0x4e, 0x07, 0x99, 0x1c, 0x6d, 0xf6, 0xdb, 0x26, 0xc4, 0x43, 0x41, 0xcd, 0xaf, 0x38, 0xc4, 0x21, - 0xfc, 0xd5, 0xf4, 0xdf, 0xe4, 0xee, 0x5a, 0x28, 0x73, 0x0f, 0x7a, 0xb0, 0x4b, 0x25, 0x98, 0x6b, - 0x11, 0xda, 0x25, 0xb4, 0x21, 0xa2, 0xc4, 0x42, 0x42, 0xba, 0x58, 0x99, 0x4d, 0x48, 0x51, 0x10, - 0xdc, 0x22, 0x2e, 0x96, 0x78, 0x56, 0xe2, 0x5d, 0xea, 0x98, 0x83, 0x6d, 0xff, 0x21, 0x81, 0x65, - 0xd8, 0x75, 0x31, 0x31, 0xf9, 0xef, 0x1f, 0x34, 0x48, 0x4f, 0x52, 0x43, 0x1b, 0x21, 0x9b, 0x06, - 0x18, 0x5f, 0x09, 0xa8, 0xf4, 0x35, 0x0e, 0xfe, 0xab, 0x53, 0x67, 0xcf, 0x43, 0x90, 0xa1, 0x43, - 0x1e, 0xa4, 0xee, 0x81, 0x0c, 0x75, 0x1d, 0x0c, 0x3b, 0x0d, 0x17, 0xb7, 0x09, 0xd5, 0x94, 0x62, - 0xbc, 0x9c, 0xae, 0xe4, 0x8d, 0xd9, 0x3a, 0x19, 0x07, 0x9c, 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0, 0xa9, 0x9b, 0x16, 0x56, 0xca, 0xf1, 0x53, 0x37, 0xbd, 0x35, - 0xf6, 0x51, 0xf9, 0x10, 0x07, 0xf1, 0x3a, 0x75, 0xd4, 0x23, 0x90, 0x99, 0x19, 0x1d, 0x85, 0xb0, - 0x86, 0xd0, 0xb1, 0xcd, 0xaf, 0xdf, 0x41, 0x08, 0xce, 0xf5, 0x5b, 0xb0, 0x14, 0x3a, 0xa8, 0x0f, - 0x23, 0x42, 0x67, 0x29, 0xf9, 0x8d, 0x3b, 0x29, 0x41, 0xfe, 0x2e, 0xf8, 0x3f, 0xea, 0x2c, 0x3d, - 0x8e, 0xc8, 0x10, 0xc1, 0xcb, 0x1b, 0xf7, 0xe3, 0x05, 0x9f, 0x3b, 0x02, 0x99, 0x99, 0xa6, 0x47, - 0x15, 0x6a, 0x9a, 0x10, 0x59, 0xa8, 0xa8, 0x56, 0x54, 0x6b, 0x17, 0x23, 0x5d, 0xb9, 0x1c, 0xe9, - 0xca, 0xaf, 0x91, 0xae, 0x7c, 0xba, 0xd6, 0x63, 0x97, 0xd7, 0x7a, 0xec, 0xc7, 0xb5, 0x1e, 0x7b, - 0x63, 0x4e, 0x4d, 0xb1, 0x26, 0xc4, 0x36, 0x1f, 0xaf, 0x2d, 0xd2, 0x31, 0x5b, 0xc7, 0xd0, 0xc5, - 0xe6, 0xa0, 0x62, 0x9e, 0xc8, 0xff, 0x09, 0x31, 0xd2, 0x9a, 0x09, 0xce, 0x78, 0xfa, 0x3b, 0x00, - 0x00, 0xff, 0xff, 0x51, 0x81, 0x6b, 0x1d, 0x2b, 0x07, 0x00, 0x00, + // 754 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xbf, 0x6f, 0xda, 0x4e, + 0x14, 0xc7, 0x21, 0x3f, 0xe0, 0x40, 0xf9, 0x2a, 0xfe, 0x46, 0xc1, 0x10, 0xd5, 0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0xa8, 0x15, 0xf8, 0x56, 0xab, + 0x60, 0xa9, 0xed, 0x27, 0x91, 0x78, 0xda, 0x62, 0x49, 0xa9, 0xa4, 0x6b, 0xda, 0xb7, 0x8b, 0xed, + 0x55, 0x79, 0xd3, 0x9e, 0x6d, 0x7b, 0x88, 0xd2, 0x43, 0xe6, 0xb9, 0xd8, 0xb1, 0x02, 0xe2, 0xf3, + 0x8d, 0x77, 0xb7, 0xe7, 0x5b, 0xc1, 0xee, 0xc3, 0xed, 0xf9, 0xd6, 0x9a, 0xac, 0x62, 0xa4, 0x22, + 0xe5, 0x03, 0x90, 0x8b, 0x1c, 0x59, 0x88, 0xf6, 0x09, 0xa6, 0x48, 0xdd, 0x04, 0x69, 0x61, 0xd4, + 0x74, 0x6d, 0x4d, 0xf1, 0x13, 0x5d, 0xcb, 0x8e, 0xaf, 0x8b, 0x29, 0x41, 0xab, 0x1f, 0x58, 0x29, + 0x01, 0xd7, 0xed, 0xf2, 0x27, 0x05, 0xac, 0x34, 0xa8, 0xb3, 0xd7, 0x66, 0xee, 0x70, 0x52, 0xed, + 0xfb, 0x3b, 0x98, 0xd6, 0x38, 0x77, 0x5f, 0x8d, 0x9b, 0x51, 0x8d, 0xda, 0x44, 0xe3, 0x6c, 0x24, + 0xe5, 0x75, 0x90, 0xff, 0xed, 0x30, 0xd0, 0x59, 0xfe, 0xa2, 0x80, 0xb5, 0x06, 0x75, 0x1a, 0x10, + 0x0f, 0x60, 0xf7, 0xc8, 0x73, 0x1d, 0x07, 0x79, 0xff, 0x46, 0x81, 0x11, 0x55, 0xf0, 0x60, 0xa2, + 0x20, 0x26, 0x9c, 0x72, 0x09, 0xe8, 0xf1, 0x48, 0xa8, 0xe5, 0x4c, 0xe1, 0x8f, 0xee, 0x55, 0xdf, + 0x86, 0x0c, 0xbd, 0xe4, 0xd3, 0x42, 0x7d, 0x06, 0xd2, 0x70, 0xc0, 0x4e, 0x88, 0xe7, 0xb2, 0x11, + 0x17, 0xf1, 0xb7, 0xd8, 0x26, 0x54, 0x75, 0x17, 0x2c, 0x8a, 0x79, 0xc3, 0x05, 0x65, 0xaa, 0x6b, + 0xd1, 0x67, 0x2a, 0xfc, 0xcb, 0x27, 0x2a, 0xb9, 0xa2, 0x2a, 0x13, 0x2f, 0x91, 0xde, 0x9b, 0x0e, + 0xac, 0x9c, 0xe7, 0xbd, 0x37, 0x7d, 0x14, 0xe8, 0xa8, 0xbe, 0x4f, 0x82, 0x64, 0x83, 0x3a, 0xea, + 0x31, 0xc8, 0xce, 0x0c, 0x90, 0x62, 0x34, 0x86, 0x48, 0xf3, 0x16, 0x36, 0xee, 0x20, 0x84, 0xdd, + 0xfd, 0x06, 0x2c, 0x47, 0xda, 0xf5, 0x61, 0x8c, 0xe9, 0x2c, 0xa5, 0xb0, 0x79, 0x27, 0x25, 0xf4, + 0xdf, 0x03, 0xff, 0xc7, 0x75, 0xd4, 0xa3, 0x18, 0x0f, 0x31, 0xbc, 0x82, 0x71, 0x3f, 0x5e, 0x78, + 0xdd, 0x31, 0xc8, 0xce, 0x14, 0x3d, 0x2e, 0x51, 0xd3, 0x84, 0xd8, 0x44, 0xc5, 0x95, 0xa2, 0x56, + 0xbf, 0x1c, 0xeb, 0xca, 0xd5, 0x58, 0x57, 0x7e, 0x8e, 0x75, 0xe5, 0xe3, 0x8d, 0x9e, 0xb8, 0xba, + 0xd1, 0x13, 0xdf, 0x6f, 0xf4, 0xc4, 0x6b, 0x73, 0x6a, 0x96, 0xb5, 0x20, 0xb6, 0xf9, 0x90, 0x6d, + 0x93, 0xae, 0xd9, 0x3e, 0x81, 0x2e, 0x36, 0x87, 0x55, 0xf3, 0x54, 0xfe, 0x5b, 0x88, 0xc1, 0xd6, + 0x5a, 0xe4, 0x8c, 0x27, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x01, 0x06, 0x7a, 0x31, 0x07, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -901,8 +901,8 @@ func (m *MsgManualTriggerTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x12 } - if m.ID != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ID)) + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) i-- dAtA[i] = 0x8 } @@ -1084,8 +1084,8 @@ func (m *MsgManualTriggerTunnel) Size() (n int) { } var l int _ = l - if m.ID != 0 { - n += 1 + sovTx(uint64(m.ID)) + if m.TunnelID != 0 { + n += 1 + sovTx(uint64(m.TunnelID)) } l = len(m.Creator) if l > 0 { @@ -1608,9 +1608,9 @@ func (m *MsgManualTriggerTunnel) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) } - m.ID = 0 + m.TunnelID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1620,7 +1620,7 @@ func (m *MsgManualTriggerTunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ID |= uint64(b&0x7F) << shift + m.TunnelID |= uint64(b&0x7F) << shift if b < 0x80 { break } From 00eaa77aefa725d179dbf0e087726f60177ae7b3 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 27 Aug 2024 13:22:31 +0700 Subject: [PATCH 051/272] add create tunnel --- x/tunnel/keeper/msg_server.go | 16 ++-------- x/tunnel/keeper/tunnel.go | 56 ++++++++++++++++++++++------------ x/tunnel/keeper/tunnel_test.go | 38 ----------------------- x/tunnel/types/tunnel.go | 32 +++++++++++++++++++ 4 files changed, 72 insertions(+), 70 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index e775d2eb4..3a6398445 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -39,23 +39,13 @@ func (ms msgServer) CreateTunnel( }) } - tunnelID, err := ms.Keeper.AddTunnel(ctx, types.Tunnel{ - Route: req.Route, - FeedType: req.FeedType, - SignalPriceInfos: signalPriceInfos, - Interval: req.Interval, - IsActive: false, - Creator: req.Creator, - }) - if err != nil { - return nil, err - } - - tunnel, err := ms.Keeper.GetTunnel(ctx, tunnelID) + tunnel, err := ms.Keeper.CreateTunnel(ctx, req.Route, req.FeedType, signalPriceInfos, req.Interval, req.Creator) if err != nil { return nil, err } + ms.Keeper.SetTunnel(ctx, tunnel) + // Emit an event event := sdk.NewEvent( types.EventTypeCreateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 803d24035..4ade06a7a 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -4,12 +4,49 @@ import ( "fmt" "math" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" feedsTypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +// CreateTunnel creates a new tunnel +func (k Keeper) CreateTunnel( + ctx sdk.Context, + route *codectypes.Any, + feedType feedsTypes.FeedType, + signalPriceInfos []types.SignalPriceInfo, + interval uint64, + creator string, +) (types.Tunnel, error) { + id := k.GetTunnelCount(ctx) + newID := id + 1 + + // Generate a new tunnel account + acc, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", newID)) + if err != nil { + return types.Tunnel{}, err + } + + // Set the new tunnel count + k.SetTunnelCount(ctx, newID) + + return types.NewTunnel( + id, + 0, + route, + feedType, + acc.String(), + signalPriceInfos, + interval, + 0, + false, + ctx.BlockTime().Unix(), + creator, + ), nil +} + // SetTunnelCount sets the tunnel count in the store func (k Keeper) SetTunnelCount(ctx sdk.Context, count uint64) { ctx.KVStore(k.storeKey).Set(types.TunnelCountStoreKey, sdk.Uint64ToBigEndian(count)) @@ -32,25 +69,6 @@ func (k Keeper) SetTunnel(ctx sdk.Context, tunnel types.Tunnel) { ctx.KVStore(k.storeKey).Set(types.TunnelStoreKey(tunnel.ID), k.cdc.MustMarshal(&tunnel)) } -// AddTunnel adds a tunnel to the store and returns the new tunnel ID -func (k Keeper) AddTunnel(ctx sdk.Context, tunnel types.Tunnel) (uint64, error) { - tunnel.ID = k.GetNextTunnelID(ctx) - - // Generate a new tunnel account - acc, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", tunnel.ID)) - if err != nil { - return 0, err - } - - tunnel.FeePayer = acc.String() - - // Set the creation time - tunnel.CreatedAt = ctx.BlockTime().Unix() - - k.SetTunnel(ctx, tunnel) - return tunnel.ID, nil -} - // GetTunnel retrieves a tunnel by its ID func (k Keeper) GetTunnel(ctx sdk.Context, id uint64) (types.Tunnel, error) { bz := ctx.KVStore(k.storeKey).Get(types.TunnelStoreKey(id)) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 3f08fa744..a2f35894d 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -5,7 +5,6 @@ import ( "time" "github.com/stretchr/testify/require" - "go.uber.org/mock/gomock" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/keeper" @@ -13,43 +12,6 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestAddTunnel(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - // Create a new tunnel instance - tunnel := types.Tunnel{ID: 1} - - // Mock the account keeper to generate a new account - s.MockAccountKeeper.EXPECT(). - GetAccount(ctx, gomock.Any()). - Return(nil).Times(1) - s.MockAccountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) - s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) - - // Add the tunnel to the keeper - _, err := k.AddTunnel(ctx, tunnel) - require.NoError(t, err, "adding tunnel should not produce an error") - - // Attempt to retrieve the tunnel by its ID - retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) - require.NoError(s.T(), err, "retrieving tunnel should not produce an error") - - expected := types.Tunnel{ - ID: 1, - Route: nil, - FeedType: feedstypes.FEED_TYPE_UNSPECIFIED, - FeePayer: "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", - SignalPriceInfos: nil, - IsActive: false, - CreatedAt: s.Ctx.BlockTime().Unix(), - Creator: "", - } - - // Assert the retrieved tunnel matches the one we set - require.Equal(s.T(), expected, retrievedTunnel, "the retrieved tunnel should match the original") -} - func TestGetSetTunnel(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 6c5bb56d4..936b443d0 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -4,11 +4,43 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/codec/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" proto "github.com/cosmos/gogoproto/proto" + + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) var _ types.UnpackInterfacesMessage = Tunnel{} +// NewTunnel creates a new Tunnel instance. +func NewTunnel( + id uint64, + nonceCount uint64, + route *codectypes.Any, + feedType feedstypes.FeedType, + feePayer string, + signalPriceInfos []SignalPriceInfo, + interval uint64, + lastIntervalTimestamp int64, + isActive bool, + createdAt int64, + creator string, +) Tunnel { + return Tunnel{ + ID: id, + NonceCount: nonceCount, + Route: route, + FeedType: feedType, + FeePayer: feePayer, + SignalPriceInfos: signalPriceInfos, + Interval: interval, + LastIntervalTimestamp: lastIntervalTimestamp, + IsActive: isActive, + CreatedAt: createdAt, + Creator: creator, + } +} + // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (t Tunnel) UnpackInterfaces(unpacker types.AnyUnpacker) error { var route RouteI From e62d8a4380c1f1fff123e28aa75f2dadacd6a1fe Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 27 Aug 2024 16:59:18 +0700 Subject: [PATCH 052/272] update type --- x/tunnel/types/tunnel.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 936b443d0..985256cfc 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -4,7 +4,6 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/codec/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" proto "github.com/cosmos/gogoproto/proto" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" @@ -16,7 +15,7 @@ var _ types.UnpackInterfacesMessage = Tunnel{} func NewTunnel( id uint64, nonceCount uint64, - route *codectypes.Any, + route *types.Any, feedType feedstypes.FeedType, feePayer string, signalPriceInfos []SignalPriceInfo, From 49ab39a3e94823f84eb7943869d66e1c053b3dcf Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 29 Aug 2024 16:17:02 +0700 Subject: [PATCH 053/272] clean up --- proto/tunnel/v1beta1/params.proto | 7 - proto/tunnel/v1beta1/tunnel.proto | 56 +- scripts/tunnel/signal_infos.json | 6 +- x/tunnel/abci.go | 9 +- x/tunnel/client/cli/tx.go | 2 +- x/tunnel/client/cli/util.go | 33 +- x/tunnel/client/cli/util_test.go | 16 +- x/tunnel/keeper/msg_server.go | 22 +- x/tunnel/keeper/packet.go | 174 +++ x/tunnel/keeper/signal_prices_info.go | 25 + x/tunnel/keeper/tss_packet_handler_test.go | 7 +- x/tunnel/keeper/tunnel.go | 213 +--- x/tunnel/keeper/tunnel_test.go | 386 +++---- x/tunnel/types/errors.go | 15 +- x/tunnel/types/events.go | 14 +- x/tunnel/types/keys.go | 16 +- x/tunnel/types/packet.go | 12 +- x/tunnel/types/signal.go | 52 + x/tunnel/types/tunnel.go | 44 +- x/tunnel/types/tunnel.pb.go | 1155 +++++++++++--------- 20 files changed, 1235 insertions(+), 1029 deletions(-) create mode 100644 x/tunnel/keeper/signal_prices_info.go create mode 100644 x/tunnel/types/signal.go diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto index 63d7102ff..bf75210d7 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/tunnel/v1beta1/params.proto @@ -17,11 +17,4 @@ message Params { uint64 min_interval = 3; repeated cosmos.base.v1beta1.Coin base_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - repeated cosmos.base.v1beta1.Coin tss_route_fee = 5 [ - (gogoproto.nullable) = false, - (gogoproto.customname) = "TSSRouteFee", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - repeated cosmos.base.v1beta1.Coin axelar_route_fee = 6 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 3b99e2f64..0fd1a6fdf 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -35,32 +35,38 @@ message SignalInfo { uint64 hard_deviation_bps = 3 [(gogoproto.customname) = "HardDeviationBPS"]; } -// SignalPriceInfo is the type for a signal price info -message SignalPriceInfo { +// Tunnel is the type for a tunnel +message Tunnel { option (gogoproto.equal) = true; - string signal_id = 1 [(gogoproto.customname) = "SignalID"]; - uint64 soft_deviation_bps = 2 [(gogoproto.customname) = "SoftDeviationBPS"]; - uint64 hard_deviation_bps = 3 [(gogoproto.customname) = "HardDeviationBPS"]; - uint64 price = 4; - int64 timestamp = 5; + uint64 id = 1 [(gogoproto.customname) = "ID"]; + uint64 nonce_count = 2; + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; + feeds.v1beta1.FeedType feed_type = 4; + string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated SignalInfo signal_infos = 6 [(gogoproto.nullable) = false]; + uint64 interval = 7; + bool is_active = 8; + int64 created_at = 9; + string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// Tunnel is the type for a tunnel -message Tunnel { +// SignalPrices is the type for a list of signal prices with the last interval timestamp +message SignalPricesInfo { + option (gogoproto.equal) = true; + + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; + int64 last_interval_timestamp = 3; +} + +// SignalPrice is the type for a signal price +message SignalPrice { option (gogoproto.equal) = true; - uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 nonce_count = 2; - google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; - feeds.v1beta1.FeedType feed_type = 4; - string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated SignalPriceInfo signal_price_infos = 6 [(gogoproto.nullable) = false]; - uint64 interval = 7; - int64 last_interval_timestamp = 8; - bool is_active = 9; - int64 created_at = 10; - string creator = 11 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; + uint64 price = 2; + int64 timestamp = 3; } // PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered @@ -71,11 +77,11 @@ message PendingTriggerTunnels { // Packet is the packet that tunnel produces message Packet { - uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - uint64 nonce = 2; - repeated SignalPriceInfo signal_price_infos = 3 [(gogoproto.nullable) = false]; - google.protobuf.Any packet_content = 4 [(cosmos_proto.accepts_interface) = "PacketContentI"]; - int64 created_at = 5; + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + uint64 nonce = 2; + repeated SignalPrice signal_prices = 3 [(gogoproto.nullable) = false]; + google.protobuf.Any packet_content = 4 [(cosmos_proto.accepts_interface) = "PacketContentI"]; + int64 created_at = 5; } // TSSPacketContent is the packet content for TSS diff --git a/scripts/tunnel/signal_infos.json b/scripts/tunnel/signal_infos.json index b68bdb25b..c62da697b 100644 --- a/scripts/tunnel/signal_infos.json +++ b/scripts/tunnel/signal_infos.json @@ -2,13 +2,11 @@ "signal_infos": [ { "signal_id": "BTC", - "soft_deviation_bps": 0, - "hard_deviation_bps": 2000 + "deviation_bps": 2000 }, { "signal_id": "ETH", - "soft_deviation_bps": 0, - "hard_deviation_bps": 4000 + "deviation_bps": 4000 } ] } diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index 635d7f436..89f50aa09 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -10,10 +10,7 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { } func EndBlocker(ctx sdk.Context, k *keeper.Keeper) { - // Generate packets to be sent - packets := k.GeneratePackets(ctx) - for _, packet := range packets { - // Send packet to the destination route and store the packet - k.HandlePacket(ctx, packet) - } + // produce packets for all tunnels that are active and have passed the interval time trigger + // or deviated from the last price to destination route + k.ProduceActiveTunnelPackets(ctx) } diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index d7d5a6621..489c7cc3b 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -62,7 +62,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { } msg, err := types.NewMsgCreateTSSTunnel( - signalInfos, + signalInfos.ToSignalInfos(), interval, feedstypes.FeedType(feedType), args[1], diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index 18d793617..01b1e335d 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -9,25 +9,46 @@ import ( // SignalInfos represents the signal infos in the file type SignalInfos struct { - SignalInfos []types.SignalInfo `json:"signal_infos"` + SignalInfos []SignalInfo `json:"signal_infos"` +} + +// SignalInfo represents the signal info without soft deviation that will implement in the future +type SignalInfo struct { + SignalID string `json:"signal_id"` + DeviationBPS uint64 `json:"deviation_bps"` +} + +// ToSignalInfos converts the signal infos to the types.SignalInfo without soft deviation +// Note: soft deviation can be use in the future to adjust the deviation +func (sis SignalInfos) ToSignalInfos() []types.SignalInfo { + var signalInfos []types.SignalInfo + for _, si := range sis.SignalInfos { + signalInfo := types.SignalInfo{ + SignalID: si.SignalID, + SoftDeviationBPS: 0, + HardDeviationBPS: si.DeviationBPS, + } + signalInfos = append(signalInfos, signalInfo) + } + return signalInfos } // parseSignalInfos parses the signal infos from the given file -func parseSignalInfos(signalInfosFile string) ([]types.SignalInfo, error) { +func parseSignalInfos(signalInfosFile string) (SignalInfos, error) { var signalInfos SignalInfos if signalInfosFile == "" { - return signalInfos.SignalInfos, nil + return SignalInfos{}, nil } contents, err := os.ReadFile(signalInfosFile) if err != nil { - return nil, err + return SignalInfos{}, err } if err := json.Unmarshal(contents, &signalInfos); err != nil { - return nil, err + return SignalInfos{}, err } - return signalInfos.SignalInfos, nil + return signalInfos, nil } diff --git a/x/tunnel/client/cli/util_test.go b/x/tunnel/client/cli/util_test.go index 800cc2453..68abd940e 100644 --- a/x/tunnel/client/cli/util_test.go +++ b/x/tunnel/client/cli/util_test.go @@ -6,17 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" - - "github.com/bandprotocol/chain/v2/x/tunnel/types" ) func TestParseSignalInfos(t *testing.T) { // Test case for valid signal info t.Run("valid signal info", func(t *testing.T) { // Setup - signalInfos := []types.SignalInfo{ - {SignalID: "BTC", SoftDeviationBPS: 1000, HardDeviationBPS: 2000}, - {SignalID: "ETH", SoftDeviationBPS: 3000, HardDeviationBPS: 4000}, + signalInfos := []SignalInfo{ + {SignalID: "BTC", DeviationBPS: 2000}, + {SignalID: "ETH", DeviationBPS: 4000}, } file, cleanup := createTempSignalInfoFile(signalInfos) defer cleanup() @@ -26,7 +24,7 @@ func TestParseSignalInfos(t *testing.T) { // Verify require.NoError(t, err) - require.Equal(t, signalInfos, result) + require.Equal(t, signalInfos, result.SignalInfos) }) // Test case for empty file path @@ -34,12 +32,12 @@ func TestParseSignalInfos(t *testing.T) { result, err := parseSignalInfos("") require.NoError(t, err) - require.Nil(t, result) + require.Equal(t, SignalInfos{}, result) }) } // Helper function to create a temporary file with signal info JSON content -func createTempSignalInfoFile(signalInfos []types.SignalInfo) (string, func()) { +func createTempSignalInfoFile(signalInfos []SignalInfo) (string, func()) { file, err := os.CreateTemp("", "signalInfos*.json") if err != nil { panic(err) @@ -47,7 +45,7 @@ func createTempSignalInfoFile(signalInfos []types.SignalInfo) (string, func()) { filePath := file.Name() data := struct { - SignalInfos []types.SignalInfo `json:"signal_infos"` + SignalInfos []SignalInfo `json:"signal_infos"` }{SignalInfos: signalInfos} content, err := json.Marshal(data) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 3a6398445..037318ede 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -30,16 +30,16 @@ func (ms msgServer) CreateTunnel( // TODO: check deposit with params, transfer deposit to module account - var signalPriceInfos []types.SignalPriceInfo + var signalInfos []types.SignalInfo for _, signalInfo := range req.SignalInfos { - signalPriceInfos = append(signalPriceInfos, types.SignalPriceInfo{ + signalInfos = append(signalInfos, types.SignalInfo{ SignalID: signalInfo.SignalID, SoftDeviationBPS: signalInfo.SoftDeviationBPS, HardDeviationBPS: signalInfo.HardDeviationBPS, }) } - tunnel, err := ms.Keeper.CreateTunnel(ctx, req.Route, req.FeedType, signalPriceInfos, req.Interval, req.Creator) + tunnel, err := ms.Keeper.CreateTunnel(ctx, req.Route, req.FeedType, signalInfos, req.Interval, req.Creator) if err != nil { return nil, err } @@ -80,6 +80,7 @@ func (ms msgServer) ActivateTunnel( return nil, err } + // Emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeActivateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), @@ -108,9 +109,19 @@ func (ms msgServer) ManualTriggerTunnel( ) } - // Add the tunnel to the pending trigger list - ms.Keeper.AddPendingTriggerTunnel(ctx, req.TunnelID) + // Get signal prices info + signalPricesInfo, err := ms.Keeper.GetSignalPricesInfo(ctx, tunnel.ID) + if err != nil { + return nil, err + } + + // Produce packet with trigger all signals + err = ms.Keeper.ProducePacket(ctx, tunnel, signalPricesInfo, true) + if err != nil { + return nil, err + } + // Emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeManualTriggerTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), @@ -138,6 +149,7 @@ func (ms msgServer) UpdateParams( return nil, err } + // Emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeUpdateParams, sdk.NewAttribute(types.AttributeKeyParams, req.Params.String()), diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 0c5f431ed..de192967f 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -1,8 +1,12 @@ package keeper import ( + "fmt" + "math" + sdk "github.com/cosmos/cosmos-sdk/types" + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -32,3 +36,173 @@ func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) ty } return packet } + +// ProduceActiveTunnelPackets generates packets and sends packets to the destination route for all active tunnels +func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { + // get all active tunnels + activeTunnels := k.GetTunnelsByActiveStatus(ctx, true) + + // check for active tunnels + for _, at := range activeTunnels { + signalPricesInfo, err := k.GetSignalPricesInfo(ctx, at.ID) + if err != nil { + // emit get signal prices info fail event + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeGetSignalPricesInfoFail, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", at.ID)), + sdk.NewAttribute(types.AttributeKeyReason, err.Error()), + )) + continue + } + + // check if the interval has passed + intervalTrigger := ctx.BlockTime().Unix() >= int64(at.Interval)+signalPricesInfo.LastIntervalTimestamp + + // produce packet + err = k.ProducePacket(ctx, at, signalPricesInfo, intervalTrigger) + if err != nil { + // emit send packet fail event + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeProducePacketFail, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", at.ID)), + sdk.NewAttribute(types.AttributeKeyRoute, fmt.Sprintf("%v", at.Route)), + sdk.NewAttribute(types.AttributeKeyReason, err.Error()), + )) + continue + } + } +} + +// ProducePacket generates a packet and sends it to the destination route +func (k Keeper) ProducePacket( + ctx sdk.Context, + tunnel types.Tunnel, + signalPricesInfo types.SignalPricesInfo, + triggerAll bool, +) error { + unixNow := ctx.BlockTime().Unix() + + // TODO: feeds module needs to be implemented get prices that can use + latestPrices := k.feedsKeeper.GetPrices(ctx) + latestPricesMap := createLatestPricesMap(latestPrices) + + // generate new signal prices + nsps := GenerateSignalPrices( + ctx, + tunnel.ID, + latestPricesMap, + tunnel.GetSignalInfoMap(), + signalPricesInfo.SignalPrices, + triggerAll, + ) + if len(nsps) > 0 { + err := k.SendPacket(ctx, tunnel, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow)) + if err != nil { + return err + } + + // update signal prices info + signalPricesInfo.UpdateSignalPrices(nsps) + if triggerAll { + signalPricesInfo.LastIntervalTimestamp = unixNow + } + k.SetSignalPricesInfo(ctx, signalPricesInfo) + + // update tunnel nonce count + tunnel.NonceCount++ + k.SetTunnel(ctx, tunnel) + } + + return nil +} + +// SendPacket sends a packet to the destination route +func (k Keeper) SendPacket( + ctx sdk.Context, + tunnel types.Tunnel, + packet types.Packet, +) error { + // Process the tunnel based on the route type + switch r := tunnel.Route.GetCachedValue().(type) { + case *types.TSSRoute: + err := k.TSSPacketHandle(ctx, r, packet) + if err != nil { + return err + } + case *types.AxelarRoute: + err := k.AxelarPacketHandle(ctx, r, packet) + if err != nil { + return err + } + default: + panic(fmt.Sprintf("unknown route type: %T", r)) + } + return nil +} + +// GenerateSignalPrices generates signal prices based on the latest prices and signal info +func GenerateSignalPrices( + ctx sdk.Context, + tunnelID uint64, + latestPricesMap map[string]feedstypes.Price, + signalInfoMap map[string]types.SignalInfo, + signalPrices []types.SignalPrice, + triggerAll bool, +) []types.SignalPrice { + var sps []types.SignalPrice + for _, sp := range signalPrices { + latestPrice, exists := latestPricesMap[sp.SignalID] + // TODO: remove check PriceStatusAvailable when feeds module is implemented + if !exists || latestPrice.PriceStatus != feedstypes.PriceStatusAvailable { + sps = append(sps, types.NewSignalPrice(sp.SignalID, 0, 0)) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeSignalIDNotFound, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeySignalID, sp.SignalID), + )) + continue + } + + // get signal info from signalInfoMap + signalInfo, exists := signalInfoMap[sp.SignalID] + if !exists { + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeSignalInfoNotFound, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeySignalID, sp.SignalID), + )) + continue + } + + // if triggerAll is true or the deviation exceeds the threshold, add the signal price info to the list + if triggerAll || deviationExceedsThreshold(sp.Price, latestPrice.Price, signalInfo.HardDeviationBPS) { + sps = append( + sps, + types.NewSignalPrice( + sp.SignalID, + latestPrice.Price, + latestPrice.Timestamp, + ), + ) + } + } + return sps +} + +// deviationExceedsThreshold checks if the deviation between the old price and the new price exceeds the threshold +func deviationExceedsThreshold(oldPrice, newPrice uint64, thresholdBPS uint64) bool { + // if the deviation is greater than the hard deviation, add the signal price info to the list + // soft deviation is the feature to be implemented in the future + deviation := math.Abs(float64(newPrice-oldPrice)) / float64(oldPrice) + deviationInBPS := uint64(deviation * 10000) + return deviationInBPS >= thresholdBPS +} + +// createLatestPricesMap creates a map of latest prices with signal ID as the key +func createLatestPricesMap(latestPrices []feedstypes.Price) map[string]feedstypes.Price { + latestPricesMap := make(map[string]feedstypes.Price, len(latestPrices)) + for _, price := range latestPrices { + latestPricesMap[price.SignalID] = price + } + return latestPricesMap +} diff --git a/x/tunnel/keeper/signal_prices_info.go b/x/tunnel/keeper/signal_prices_info.go new file mode 100644 index 000000000..f6641370f --- /dev/null +++ b/x/tunnel/keeper/signal_prices_info.go @@ -0,0 +1,25 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// SetSignalPricesInfo sets the signal prices info in the store +func (k Keeper) SetSignalPricesInfo(ctx sdk.Context, signalPricesInfo types.SignalPricesInfo) { + ctx.KVStore(k.storeKey). + Set(types.SignalPricesInfoStoreKey(signalPricesInfo.TunnelID), k.cdc.MustMarshal(&signalPricesInfo)) +} + +// GetSignalPricesInfo gets the signal prices info from the store +func (k Keeper) GetSignalPricesInfo(ctx sdk.Context, tunnelID uint64) (types.SignalPricesInfo, error) { + bz := ctx.KVStore(k.storeKey).Get(types.SignalPricesInfoStoreKey(tunnelID)) + if bz == nil { + return types.SignalPricesInfo{}, types.ErrSignalPricesInfoNotFound.Wrapf("tunnelID: %d", tunnelID) + } + + var signalPricesInfo types.SignalPricesInfo + k.cdc.MustUnmarshal(bz, &signalPricesInfo) + return signalPricesInfo, nil +} diff --git a/x/tunnel/keeper/tss_packet_handler_test.go b/x/tunnel/keeper/tss_packet_handler_test.go index 13e8c6711..f171c4ee5 100644 --- a/x/tunnel/keeper/tss_packet_handler_test.go +++ b/x/tunnel/keeper/tss_packet_handler_test.go @@ -23,9 +23,10 @@ func TSSPacketHandle(t *testing.T) { // Create a sample Packet packet := types.NewPacket( - 1, // tunnelID - 1, // nonce - nil, // SignalPriceInfos + 1, // tunnelID + 1, // nonce + []types.SignalPrice{}, // SignalPriceInfos + nil, time.Now().Unix(), ) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 4ade06a7a..b7a6a2624 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -2,7 +2,6 @@ package keeper import ( "fmt" - "math" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,7 +15,7 @@ func (k Keeper) CreateTunnel( ctx sdk.Context, route *codectypes.Any, feedType feedsTypes.FeedType, - signalPriceInfos []types.SignalPriceInfo, + signalInfos []types.SignalInfo, interval uint64, creator string, ) (types.Tunnel, error) { @@ -32,15 +31,21 @@ func (k Keeper) CreateTunnel( // Set the new tunnel count k.SetTunnelCount(ctx, newID) + // Set the signal prices info + var signalPrices []types.SignalPrice + for _, sp := range signalInfos { + signalPrices = append(signalPrices, types.NewSignalPrice(sp.SignalID, 0, 0)) + } + k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(newID, signalPrices, 0)) + return types.NewTunnel( id, 0, route, feedType, acc.String(), - signalPriceInfos, + signalInfos, interval, - 0, false, ctx.BlockTime().Unix(), creator, @@ -57,13 +62,6 @@ func (k Keeper) GetTunnelCount(ctx sdk.Context) uint64 { return sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.TunnelCountStoreKey)) } -// GetNextTunnelID increments the tunnel count and returns the current number of tunnels -func (k Keeper) GetNextTunnelID(ctx sdk.Context) uint64 { - tunnelNumber := k.GetTunnelCount(ctx) + 1 - k.SetTunnelCount(ctx, tunnelNumber) - return tunnelNumber -} - // SetTunnel sets a tunnel in the store func (k Keeper) SetTunnel(ctx sdk.Context, tunnel types.Tunnel) { ctx.KVStore(k.storeKey).Set(types.TunnelStoreKey(tunnel.ID), k.cdc.MustMarshal(&tunnel)) @@ -121,33 +119,6 @@ func (k Keeper) GetTunnelsByActiveStatus(ctx sdk.Context, isActive bool) []types return tunnels } -// AddPendingTriggerTunnel adds the tunnel ID to the list of pending trigger tunnels -func (k Keeper) AddPendingTriggerTunnel(ctx sdk.Context, id uint64) { - pendingList := k.GetPendingTriggerTunnels(ctx) - pendingList = append(pendingList, id) - k.SetPendingTriggerTunnels(ctx, pendingList) -} - -// SetPendingTriggerTunnels saves the list of pending trigger tunnels that will be executed at the end of the block. -func (k Keeper) SetPendingTriggerTunnels(ctx sdk.Context, ids []uint64) { - bz := k.cdc.MustMarshal(&types.PendingTriggerTunnels{IDs: ids}) - if bz == nil { - bz = []byte{} - } - ctx.KVStore(k.storeKey).Set(types.PendingTriggerTunnelsStoreKey, bz) -} - -// GetPendingTriggerTunnels returns the list of pending trigger tunnels to be executed during EndBlock. -func (k Keeper) GetPendingTriggerTunnels(ctx sdk.Context) (ids []uint64) { - bz := ctx.KVStore(k.storeKey).Get(types.PendingTriggerTunnelsStoreKey) - if len(bz) == 0 { // Return an empty list if the key does not exist in the store. - return []uint64{} - } - pendingTriggerTunnels := types.PendingTriggerTunnels{} - k.cdc.MustUnmarshal(bz, &pendingTriggerTunnels) - return pendingTriggerTunnels.IDs -} - // ActivateTunnel activates a tunnel func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error { tunnel, err := k.GetTunnel(ctx, id) @@ -163,169 +134,3 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error k.SetTunnel(ctx, tunnel) return nil } - -// GeneratePackets generates packets for all tunnels that require triggering -func (k Keeper) GeneratePackets(ctx sdk.Context) []types.Packet { - packets := []types.Packet{} - - activeTunnels := k.GetTunnelsByActiveStatus(ctx, true) - // TODO: feeds module needs to be implemented get prices that can use - latestPrices := k.feedsKeeper.GetPrices(ctx) - latestPricesMap := CreateLatestPricesMap(latestPrices) - unixNow := ctx.BlockTime().Unix() - - // check for active tunnels - for _, at := range activeTunnels { - if unixNow >= int64(at.Interval)+at.LastIntervalTimestamp { - sps := GenerateSignalPriceInfos(ctx, at.SignalPriceInfos, latestPricesMap, at.ID) - if len(sps) > 0 { - packets = append(packets, types.NewPacket(at.ID, at.NonceCount+1, sps, unixNow)) - } - } else { - sps := GenerateSignalPriceInfosBasedOnDeviation(ctx, at.SignalPriceInfos, latestPricesMap, at.ID) - if len(sps) > 0 { - packets = append(packets, types.NewPacket(at.ID, at.NonceCount+1, sps, unixNow)) - } - } - } - - // check for pending trigger tunnels - pendingTriggerTunnels := k.GetPendingTriggerTunnels(ctx) - for _, id := range pendingTriggerTunnels { - tunnel := k.MustGetTunnel(ctx, id) - // skip if the tunnel is already in trigger list - if unixNow >= int64(tunnel.Interval)+tunnel.LastIntervalTimestamp && tunnel.IsActive { - continue - } - sps := GenerateSignalPriceInfos(ctx, tunnel.SignalPriceInfos, latestPricesMap, tunnel.ID) - if len(sps) > 0 { - packets = append(packets, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, sps, unixNow)) - } - } - - return packets -} - -// HandlePacket sends a packet to destination route, stores the packet in the store, and updates the tunnel data -func (k Keeper) HandlePacket(ctx sdk.Context, packet types.Packet) { - // get tunnel from tunnelID - tunnel := k.MustGetTunnel(ctx, packet.TunnelID) - - // Process the tunnel based on the route type - switch r := tunnel.Route.GetCachedValue().(type) { - case *types.TSSRoute: - err := k.TSSPacketHandle(ctx, r, packet) - if err != nil { - // Emit an event if the packet processing fails - emitPacketFailEvent(ctx, packet.TunnelID, r, err) - return - } - case *types.AxelarRoute: - err := k.AxelarPacketHandle(ctx, r, packet) - if err != nil { - // Emit an event if the packet processing fails - emitPacketFailEvent(ctx, packet.TunnelID, r, err) - return - } - default: - panic(fmt.Sprintf("unknown route type: %T", r)) - } - - // update tunnel data - tunnel.NonceCount = packet.Nonce - tunnel.SignalPriceInfos = packet.SignalPriceInfos - tunnel.LastIntervalTimestamp = packet.CreatedAt - k.SetTunnel(ctx, tunnel) -} - -// emitPacketFailEvent emits an event when a packet fails to be sent -func emitPacketFailEvent(ctx sdk.Context, tunnelID uint64, route interface{}, err error) { - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSendPacketFail, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), - sdk.NewAttribute(types.AttributeKeyRoute, fmt.Sprintf("%v", route)), - sdk.NewAttribute(types.AttributeKeyReason, err.Error()), - )) -} - -// GenerateSignalPriceInfos generates signal price infos based on the latest prices -func GenerateSignalPriceInfos( - ctx sdk.Context, - signalPriceInfos []types.SignalPriceInfo, - latestPricesMap map[string]feedsTypes.Price, - tunnelID uint64, -) []types.SignalPriceInfo { - var nsps []types.SignalPriceInfo - for _, sp := range signalPriceInfos { - latestPrice, exists := latestPricesMap[sp.SignalID] - if !exists || latestPrice.PriceStatus != feedsTypes.PriceStatusAvailable { - nsps = append(nsps, types.NewSignalPriceInfo(sp.SignalID, sp.SoftDeviationBPS, sp.HardDeviationBPS, 0, 0)) - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSignalIDNotFound, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), - sdk.NewAttribute(types.AttributeKeySignalID, sp.SignalID), - )) - continue - } - nsps = append( - nsps, - types.NewSignalPriceInfo( - sp.SignalID, - sp.SoftDeviationBPS, - sp.HardDeviationBPS, - latestPrice.Price, - latestPrice.Timestamp, - ), - ) - } - return nsps -} - -// GenerateSignalPriceInfosBasedOnDeviation generates signal price infos based on the deviation of the latest prices -func GenerateSignalPriceInfosBasedOnDeviation( - ctx sdk.Context, - signalPriceInfos []types.SignalPriceInfo, - latestPricesMap map[string]feedsTypes.Price, - tunnelID uint64, -) []types.SignalPriceInfo { - var nsps []types.SignalPriceInfo - for _, sp := range signalPriceInfos { - latestPrice, exists := latestPricesMap[sp.SignalID] - if !exists || latestPrice.PriceStatus != feedsTypes.PriceStatusAvailable { - nsps = append(nsps, types.NewSignalPriceInfo(sp.SignalID, sp.SoftDeviationBPS, sp.HardDeviationBPS, 0, 0)) - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSignalIDNotFound, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), - sdk.NewAttribute(types.AttributeKeySignalID, sp.SignalID), - )) - continue - } - deviation := math.Abs(float64(latestPrice.Price)-float64(sp.Price)) / float64(sp.Price) - deviationInBPS := uint64(deviation * 10000) - - // if the deviation is greater than the hard deviation, add the signal price info to the list - // soft deviation is the feature to be implemented in the future - if deviationInBPS >= sp.HardDeviationBPS { - nsps = append( - nsps, - types.NewSignalPriceInfo( - sp.SignalID, - sp.SoftDeviationBPS, - sp.HardDeviationBPS, - latestPrice.Price, - latestPrice.Timestamp, - ), - ) - } - } - return nsps -} - -// CreateLatestPricesMap creates a map of latest prices with signal ID as the key -func CreateLatestPricesMap(latestPrices []feedsTypes.Price) map[string]feedsTypes.Price { - latestPricesMap := make(map[string]feedsTypes.Price, len(latestPrices)) - for _, price := range latestPrices { - latestPricesMap[price.SignalID] = price - } - return latestPricesMap -} diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index a2f35894d..776a90f53 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -2,12 +2,9 @@ package keeper_test import ( "testing" - "time" "github.com/stretchr/testify/require" - feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" - "github.com/bandprotocol/chain/v2/x/tunnel/keeper" "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -66,217 +63,172 @@ func TestGetTunnelsByActiveStatus(t *testing.T) { require.Len(s.T(), tunnels, 1, "expected 1 active tunnel to be retrieved") } -func TestAddPendingTriggerTunnel(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - // Create a new tunnel instance - tunnel := types.Tunnel{ID: 1} - - // Add the tunnel to the keeper - k.AddPendingTriggerTunnel(ctx, tunnel.ID) - - // Attempt to retrieve the pending trigger tunnels - pendingTriggerTunnels := k.GetPendingTriggerTunnels(ctx) - - // Assert the number of pending trigger tunnels is 1 - require.Len(s.T(), pendingTriggerTunnels, 1, "expected 1 pending trigger tunnel to be retrieved") -} - -func TestGetSetPendingTriggerTunnels(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - // Create a new tunnel instance - tunnel := types.Tunnel{ID: 1} - - // Set the pending trigger tunnels in the keeper - k.SetPendingTriggerTunnels(ctx, []uint64{tunnel.ID}) - - // Attempt to retrieve the pending trigger tunnels - pendingTriggerTunnels := k.GetPendingTriggerTunnels(ctx) - - // Assert the number of pending trigger tunnels is 1 - require.Len(s.T(), pendingTriggerTunnels, 1, "expected 1 pending trigger tunnel to be retrieved") -} - -func TestGetNextTunnelID(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - firstID := k.GetNextTunnelID(ctx) - require.Equal(s.T(), uint64(1), firstID, "expected first tunnel ID to be 1") - - secondID := k.GetNextTunnelID(ctx) - require.Equal(s.T(), uint64(2), secondID, "expected next tunnel ID to be 2") -} - -func TestGenerateSignalPriceInfos(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx := s.Ctx - - signalPriceInfos := []types.SignalPriceInfo{ - {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000}, - {SignalID: "signal2", SoftDeviationBPS: 0, HardDeviationBPS: 1000}, - } - - latestPricesMap := map[string]feedstypes.Price{ - "signal1": {Price: 1000, Timestamp: time.Now().Unix(), PriceStatus: feedstypes.PriceStatusAvailable}, - "signal2": {Price: 2000, Timestamp: time.Now().Unix(), PriceStatus: feedstypes.PriceStatusUnavailable}, - } - - tunnelID := uint64(1) - expected := []types.SignalPriceInfo{ - { - SignalID: "signal1", - SoftDeviationBPS: 0, - HardDeviationBPS: 1000, - Price: 1000, - Timestamp: latestPricesMap["signal1"].Timestamp, - }, - {SignalID: "signal2", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, - } - - result := keeper.GenerateSignalPriceInfos(ctx, signalPriceInfos, latestPricesMap, tunnelID) - - require.Equal(t, expected, result) -} - -func TestGenerateSignalPriceInfosBasedOnDeviation(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx := s.Ctx - - // Define test cases - testCases := []struct { - name string - signalPriceInfos []types.SignalPriceInfo - latestPricesMap map[string]feedstypes.Price - tunnelID uint64 - expectedResults []types.SignalPriceInfo - }{ - { - name: "All prices available and within deviation", - signalPriceInfos: []types.SignalPriceInfo{ - {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, - {SignalID: "signal2", Price: 200, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, - }, - latestPricesMap: map[string]feedstypes.Price{ - "signal1": { - SignalID: "signal1", - Price: 109, - PriceStatus: feedstypes.PriceStatusAvailable, - Timestamp: 1234567890, - }, - "signal2": { - SignalID: "signal2", - Price: 205, - PriceStatus: feedstypes.PriceStatusAvailable, - Timestamp: 1234567891, - }, - }, - tunnelID: 1, - expectedResults: []types.SignalPriceInfo{}, - }, - { - name: "Price not available", - signalPriceInfos: []types.SignalPriceInfo{ - {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, - }, - latestPricesMap: map[string]feedstypes.Price{ - "signal1": { - SignalID: "signal1", - Price: 0, - PriceStatus: feedstypes.PriceStatusUnavailable, - Timestamp: 1234567890, - }, - }, - tunnelID: 1, - expectedResults: []types.SignalPriceInfo{ - {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, - }, - }, - { - name: "Price exceeds hard deviation", - signalPriceInfos: []types.SignalPriceInfo{ - {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, - }, - latestPricesMap: map[string]feedstypes.Price{ - "signal1": { - SignalID: "signal1", - Price: 150, - PriceStatus: feedstypes.PriceStatusAvailable, - Timestamp: 1234567890, - }, - }, - tunnelID: 1, - expectedResults: []types.SignalPriceInfo{ - { - SignalID: "signal1", - SoftDeviationBPS: 0, - HardDeviationBPS: 1000, - Price: 150, - Timestamp: 1234567890, - }, - }, - }, - { - name: "Signal ID not found", - signalPriceInfos: []types.SignalPriceInfo{ - {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, - }, - latestPricesMap: map[string]feedstypes.Price{}, - tunnelID: 1, - expectedResults: []types.SignalPriceInfo{ - {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, - }, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - // Call the GenerateSignalPriceInfosBasedOnDeviation method - nsps := keeper.GenerateSignalPriceInfosBasedOnDeviation( - ctx, - tc.signalPriceInfos, - tc.latestPricesMap, - tc.tunnelID, - ) - - // Verify the results - require.Equal(t, len(tc.expectedResults), len(nsps)) - for i, expected := range tc.expectedResults { - require.Equal(t, expected.SignalID, nsps[i].SignalID) - require.Equal(t, expected.Price, nsps[i].Price) - require.Equal(t, expected.Timestamp, nsps[i].Timestamp) - } - }) - } -} - -func TestCreateLatestPricesMap(t *testing.T) { - // Create test data - latestPrices := []feedstypes.Price{ - { - SignalID: "signal1", - Price: 100, - PriceStatus: feedstypes.PriceStatusAvailable, - Timestamp: 1234567890, - }, - { - SignalID: "signal2", - Price: 200, - PriceStatus: feedstypes.PriceStatusAvailable, - Timestamp: 1234567891, - }, - } - - // Call the createLatestPricesMap method - latestPricesMap := keeper.CreateLatestPricesMap(latestPrices) - - // Verify the results - require.Equal(t, 2, len(latestPricesMap)) - require.Contains(t, latestPricesMap, "signal1") - require.Contains(t, latestPricesMap, "signal2") - require.Equal(t, latestPrices[0], latestPricesMap["signal1"]) - require.Equal(t, latestPrices[1], latestPricesMap["signal2"]) -} +// func TestGenerateSignalPriceInfos(t *testing.T) { +// s := testutil.NewTestSuite(t) +// ctx := s.Ctx + +// signalPriceInfos := []types.SignalPriceInfo{ +// {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000}, +// {SignalID: "signal2", SoftDeviationBPS: 0, HardDeviationBPS: 1000}, +// } + +// latestPricesMap := map[string]feedstypes.Price{ +// "signal1": {Price: 1000, Timestamp: time.Now().Unix(), PriceStatus: feedstypes.PriceStatusAvailable}, +// "signal2": {Price: 2000, Timestamp: time.Now().Unix(), PriceStatus: feedstypes.PriceStatusUnavailable}, +// } + +// tunnelID := uint64(1) +// expected := []types.SignalPriceInfo{ +// { +// SignalID: "signal1", +// SoftDeviationBPS: 0, +// HardDeviationBPS: 1000, +// Price: 1000, +// Timestamp: latestPricesMap["signal1"].Timestamp, +// }, +// {SignalID: "signal2", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, +// } + +// result := keeper.GenerateSignalPriceInfos(ctx, signalPriceInfos, latestPricesMap, tunnelID) + +// require.Equal(t, expected, result) +// } + +// func TestGenerateSignalPriceInfosBasedOnDeviation(t *testing.T) { +// s := testutil.NewTestSuite(t) +// ctx := s.Ctx + +// // Define test cases +// testCases := []struct { +// name string +// signalPriceInfos []types.SignalPriceInfo +// latestPricesMap map[string]feedstypes.Price +// tunnelID uint64 +// expectedResults []types.SignalPriceInfo +// }{ +// { +// name: "All prices available and within deviation", +// signalPriceInfos: []types.SignalPriceInfo{ +// {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, +// {SignalID: "signal2", Price: 200, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, +// }, +// latestPricesMap: map[string]feedstypes.Price{ +// "signal1": { +// SignalID: "signal1", +// Price: 109, +// PriceStatus: feedstypes.PriceStatusAvailable, +// Timestamp: 1234567890, +// }, +// "signal2": { +// SignalID: "signal2", +// Price: 205, +// PriceStatus: feedstypes.PriceStatusAvailable, +// Timestamp: 1234567891, +// }, +// }, +// tunnelID: 1, +// expectedResults: []types.SignalPriceInfo{}, +// }, +// { +// name: "Price not available", +// signalPriceInfos: []types.SignalPriceInfo{ +// {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, +// }, +// latestPricesMap: map[string]feedstypes.Price{ +// "signal1": { +// SignalID: "signal1", +// Price: 0, +// PriceStatus: feedstypes.PriceStatusUnavailable, +// Timestamp: 1234567890, +// }, +// }, +// tunnelID: 1, +// expectedResults: []types.SignalPriceInfo{ +// {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, +// }, +// }, +// { +// name: "Price exceeds hard deviation", +// signalPriceInfos: []types.SignalPriceInfo{ +// {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, +// }, +// latestPricesMap: map[string]feedstypes.Price{ +// "signal1": { +// SignalID: "signal1", +// Price: 150, +// PriceStatus: feedstypes.PriceStatusAvailable, +// Timestamp: 1234567890, +// }, +// }, +// tunnelID: 1, +// expectedResults: []types.SignalPriceInfo{ +// { +// SignalID: "signal1", +// SoftDeviationBPS: 0, +// HardDeviationBPS: 1000, +// Price: 150, +// Timestamp: 1234567890, +// }, +// }, +// }, +// { +// name: "Signal ID not found", +// signalPriceInfos: []types.SignalPriceInfo{ +// {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, +// }, +// latestPricesMap: map[string]feedstypes.Price{}, +// tunnelID: 1, +// expectedResults: []types.SignalPriceInfo{ +// {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, +// }, +// }, +// } + +// for _, tc := range testCases { +// t.Run(tc.name, func(t *testing.T) { +// // Call the GenerateSignalPriceInfosBasedOnDeviation method +// nsps := keeper.GenerateSignalPriceInfosBasedOnDeviation( +// ctx, +// tc.signalPriceInfos, +// tc.latestPricesMap, +// tc.tunnelID, +// ) + +// // Verify the results +// require.Equal(t, len(tc.expectedResults), len(nsps)) +// for i, expected := range tc.expectedResults { +// require.Equal(t, expected.SignalID, nsps[i].SignalID) +// require.Equal(t, expected.Price, nsps[i].Price) +// require.Equal(t, expected.Timestamp, nsps[i].Timestamp) +// } +// }) +// } +// } + +// func TestCreateLatestPricesMap(t *testing.T) { +// // Create test data +// latestPrices := []feedstypes.Price{ +// { +// SignalID: "signal1", +// Price: 100, +// PriceStatus: feedstypes.PriceStatusAvailable, +// Timestamp: 1234567890, +// }, +// { +// SignalID: "signal2", +// Price: 200, +// PriceStatus: feedstypes.PriceStatusAvailable, +// Timestamp: 1234567891, +// }, +// } + +// // Call the createLatestPricesMap method +// latestPricesMap := keeper.CreateLatestPricesMap(latestPrices) + +// // Verify the results +// require.Equal(t, 2, len(latestPricesMap)) +// require.Contains(t, latestPricesMap, "signal1") +// require.Contains(t, latestPricesMap, "signal2") +// require.Equal(t, latestPrices[0], latestPricesMap["signal1"]) +// require.Equal(t, latestPrices[1], latestPricesMap["signal2"]) +// } diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 5bef606ec..e7e0aaf77 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -6,11 +6,12 @@ import ( // x/tunnel module sentinel errors var ( - ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") - ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 3, "max tunnel channels") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 4, "tunnel not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 5, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 6, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 7, "invalid creator of tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 8, "account already exist") + ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") + ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 3, "max tunnel channels") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 4, "tunnel not found") + ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 5, "signal prices info not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 6, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 7, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 8, "invalid creator of tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 9, "account already exist") ) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 326426d5e..4487113f3 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,12 +2,14 @@ package types // events const ( - EventTypeUpdateParams = "update_params" - EventTypeCreateTunnel = "create_tunnel" - EventTypeActivateTunnel = "activate_tunnel" - EventTypeManualTriggerTunnel = "manual_trigger_tunnel" - EventTypeSignalIDNotFound = "signal_id_not_found" - EventTypeSendPacketFail = "send_packet_fail" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeActivateTunnel = "activate_tunnel" + EventTypeManualTriggerTunnel = "manual_trigger_tunnel" + EventTypeSignalIDNotFound = "signal_id_not_found" + EventTypeSignalInfoNotFound = "signal_info_not_found" + EventTypeProducePacketFail = "produce_packet_fail" + EventTypeGetSignalPricesInfoFail = "get_signal_prices_info_fail" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 6c5312ca0..0b99c3caf 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -26,17 +26,15 @@ const ( ) var ( - GlobalStoreKeyPrefix = []byte{0x00} + TunnelCountStoreKey = []byte{0x00} - TunnelCountStoreKey = append(GlobalStoreKeyPrefix, []byte("TunnelCount")...) + TunnelStoreKeyPrefix = []byte{0x11} - PendingTriggerTunnelsStoreKey = append(GlobalStoreKeyPrefix, []byte("PendingTriggerTunnels")...) + PacketStoreKeyPrefix = []byte{0x12} - TunnelStoreKeyPrefix = []byte{0x01} + SignalPricesInfoStoreKeyPrefix = []byte{0x13} - PacketStoreKeyPrefix = []byte{0x02} - - ParamsKey = []byte{0x10} + ParamsKey = []byte{0x90} ) func TunnelStoreKey(tunnelID uint64) []byte { @@ -50,3 +48,7 @@ func TunnelPacketsStoreKey(tunnelID uint64) []byte { func TunnelPacketStoreKey(tunnelID uint64, packetID uint64) []byte { return append(TunnelPacketsStoreKey(tunnelID), sdk.Uint64ToBigEndian(packetID)...) } + +func SignalPricesInfoStoreKey(tunnelID uint64) []byte { + return append(SignalPricesInfoStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) +} diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index ff10d72ab..5f855cd34 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -12,14 +12,16 @@ var _ types.UnpackInterfacesMessage = Packet{} func NewPacket( tunnelID uint64, nonce uint64, - signalPriceInfos []SignalPriceInfo, + signalPrices []SignalPrice, + packetContent *types.Any, createdAt int64, ) Packet { return Packet{ - TunnelID: tunnelID, - Nonce: nonce, - SignalPriceInfos: signalPriceInfos, - CreatedAt: createdAt, + TunnelID: tunnelID, + Nonce: nonce, + SignalPrices: signalPrices, + PacketContent: packetContent, + CreatedAt: createdAt, } } diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go new file mode 100644 index 000000000..60a84940b --- /dev/null +++ b/x/tunnel/types/signal.go @@ -0,0 +1,52 @@ +package types + +// NewSignalInfo creates a new SignalInfo instance. +func NewSignalInfo( + signalID string, + softDeviationBPS uint64, + hardDeviationBPS uint64, +) SignalInfo { + return SignalInfo{ + SignalID: signalID, + SoftDeviationBPS: softDeviationBPS, + HardDeviationBPS: hardDeviationBPS, + } +} + +// NewSignalPricesInfo creates a new SignalPricesInfo instance. +func NewSignalPricesInfo( + tunnelID uint64, + signalPrices []SignalPrice, + lastIntervalTimestamp int64, +) SignalPricesInfo { + return SignalPricesInfo{ + TunnelID: tunnelID, + SignalPrices: signalPrices, + LastIntervalTimestamp: lastIntervalTimestamp, + } +} + +// UpdateSignalPrices updates the signal prices based on signal IDs +func (spsi *SignalPricesInfo) UpdateSignalPrices(signalPrices []SignalPrice) { + for _, sp := range signalPrices { + for i, spInfo := range spsi.SignalPrices { + if sp.SignalID == spInfo.SignalID { + spsi.SignalPrices[i] = sp + break + } + } + } +} + +// NewSignalPrice creates a new SignalPrice instance. +func NewSignalPrice( + signalID string, + price uint64, + timestamp int64, +) SignalPrice { + return SignalPrice{ + SignalID: signalID, + Price: price, + Timestamp: timestamp, + } +} diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 985256cfc..9acd9f072 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -18,25 +18,23 @@ func NewTunnel( route *types.Any, feedType feedstypes.FeedType, feePayer string, - signalPriceInfos []SignalPriceInfo, + signalInfos []SignalInfo, interval uint64, - lastIntervalTimestamp int64, isActive bool, createdAt int64, creator string, ) Tunnel { return Tunnel{ - ID: id, - NonceCount: nonceCount, - Route: route, - FeedType: feedType, - FeePayer: feePayer, - SignalPriceInfos: signalPriceInfos, - Interval: interval, - LastIntervalTimestamp: lastIntervalTimestamp, - IsActive: isActive, - CreatedAt: createdAt, - Creator: creator, + ID: id, + NonceCount: nonceCount, + Route: route, + FeedType: feedType, + FeePayer: feePayer, + SignalInfos: signalInfos, + Interval: interval, + IsActive: isActive, + CreatedAt: createdAt, + Creator: creator, } } @@ -61,19 +59,11 @@ func (t *Tunnel) SetRoute(route RouteI) error { return nil } -// NewSignalPriceInfo creates a new SignalPriceInfo instance. -func NewSignalPriceInfo( - signalID string, - softDeviationBPS uint64, - hardDeviationBPS uint64, - price uint64, - timestamp int64, -) SignalPriceInfo { - return SignalPriceInfo{ - SignalID: signalID, - SoftDeviationBPS: softDeviationBPS, - HardDeviationBPS: hardDeviationBPS, - Price: price, - Timestamp: timestamp, +// GetSignalInfoMap returns the signal info map by signal ID from the tunnel. +func (t Tunnel) GetSignalInfoMap() map[string]SignalInfo { + signalInfoMap := make(map[string]SignalInfo, len(t.SignalInfos)) + for _, si := range t.SignalInfos { + signalInfoMap[si.SignalID] = si } + return signalInfoMap } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index bed685d67..3c59691cb 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -194,103 +194,25 @@ func (m *SignalInfo) GetHardDeviationBPS() uint64 { return 0 } -// SignalPriceInfo is the type for a signal price info -type SignalPriceInfo struct { - SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - SoftDeviationBPS uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` - HardDeviationBPS uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` - Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` - Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (m *SignalPriceInfo) Reset() { *m = SignalPriceInfo{} } -func (m *SignalPriceInfo) String() string { return proto.CompactTextString(m) } -func (*SignalPriceInfo) ProtoMessage() {} -func (*SignalPriceInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{3} -} -func (m *SignalPriceInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignalPriceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignalPriceInfo.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 *SignalPriceInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignalPriceInfo.Merge(m, src) -} -func (m *SignalPriceInfo) XXX_Size() int { - return m.Size() -} -func (m *SignalPriceInfo) XXX_DiscardUnknown() { - xxx_messageInfo_SignalPriceInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_SignalPriceInfo proto.InternalMessageInfo - -func (m *SignalPriceInfo) GetSignalID() string { - if m != nil { - return m.SignalID - } - return "" -} - -func (m *SignalPriceInfo) GetSoftDeviationBPS() uint64 { - if m != nil { - return m.SoftDeviationBPS - } - return 0 -} - -func (m *SignalPriceInfo) GetHardDeviationBPS() uint64 { - if m != nil { - return m.HardDeviationBPS - } - return 0 -} - -func (m *SignalPriceInfo) GetPrice() uint64 { - if m != nil { - return m.Price - } - return 0 -} - -func (m *SignalPriceInfo) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - // Tunnel is the type for a tunnel type Tunnel struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` - Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` - FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,6,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` - LastIntervalTimestamp int64 `protobuf:"varint,8,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` - IsActive bool `protobuf:"varint,9,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"` + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` + Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + SignalInfos []SignalInfo `protobuf:"bytes,6,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` + Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` + IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + CreatedAt int64 `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *Tunnel) Reset() { *m = Tunnel{} } func (m *Tunnel) String() string { return proto.CompactTextString(m) } func (*Tunnel) ProtoMessage() {} func (*Tunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{4} + return fileDescriptor_b5270a56045f1d8a, []int{3} } func (m *Tunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,9 +276,9 @@ func (m *Tunnel) GetFeePayer() string { return "" } -func (m *Tunnel) GetSignalPriceInfos() []SignalPriceInfo { +func (m *Tunnel) GetSignalInfos() []SignalInfo { if m != nil { - return m.SignalPriceInfos + return m.SignalInfos } return nil } @@ -368,13 +290,6 @@ func (m *Tunnel) GetInterval() uint64 { return 0 } -func (m *Tunnel) GetLastIntervalTimestamp() int64 { - if m != nil { - return m.LastIntervalTimestamp - } - return 0 -} - func (m *Tunnel) GetIsActive() bool { if m != nil { return m.IsActive @@ -396,6 +311,128 @@ func (m *Tunnel) GetCreator() string { return "" } +// SignalPrices is the type for a list of signal prices with the last interval timestamp +type SignalPricesInfo struct { + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` + LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` +} + +func (m *SignalPricesInfo) Reset() { *m = SignalPricesInfo{} } +func (m *SignalPricesInfo) String() string { return proto.CompactTextString(m) } +func (*SignalPricesInfo) ProtoMessage() {} +func (*SignalPricesInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_b5270a56045f1d8a, []int{4} +} +func (m *SignalPricesInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignalPricesInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignalPricesInfo.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 *SignalPricesInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalPricesInfo.Merge(m, src) +} +func (m *SignalPricesInfo) XXX_Size() int { + return m.Size() +} +func (m *SignalPricesInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SignalPricesInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalPricesInfo proto.InternalMessageInfo + +func (m *SignalPricesInfo) GetTunnelID() uint64 { + if m != nil { + return m.TunnelID + } + return 0 +} + +func (m *SignalPricesInfo) GetSignalPrices() []SignalPrice { + if m != nil { + return m.SignalPrices + } + return nil +} + +func (m *SignalPricesInfo) GetLastIntervalTimestamp() int64 { + if m != nil { + return m.LastIntervalTimestamp + } + return 0 +} + +// SignalPrice is the type for a signal price +type SignalPrice struct { + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (m *SignalPrice) Reset() { *m = SignalPrice{} } +func (m *SignalPrice) String() string { return proto.CompactTextString(m) } +func (*SignalPrice) ProtoMessage() {} +func (*SignalPrice) Descriptor() ([]byte, []int) { + return fileDescriptor_b5270a56045f1d8a, []int{5} +} +func (m *SignalPrice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignalPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignalPrice.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 *SignalPrice) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalPrice.Merge(m, src) +} +func (m *SignalPrice) XXX_Size() int { + return m.Size() +} +func (m *SignalPrice) XXX_DiscardUnknown() { + xxx_messageInfo_SignalPrice.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalPrice proto.InternalMessageInfo + +func (m *SignalPrice) GetSignalID() string { + if m != nil { + return m.SignalID + } + return "" +} + +func (m *SignalPrice) GetPrice() uint64 { + if m != nil { + return m.Price + } + return 0 +} + +func (m *SignalPrice) GetTimestamp() int64 { + if m != nil { + return m.Timestamp + } + return 0 +} + // PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered type PendingTriggerTunnels struct { // IDs is a list of tunnel IDs that are waiting to be triggered @@ -406,7 +443,7 @@ func (m *PendingTriggerTunnels) Reset() { *m = PendingTriggerTunnels{} } func (m *PendingTriggerTunnels) String() string { return proto.CompactTextString(m) } func (*PendingTriggerTunnels) ProtoMessage() {} func (*PendingTriggerTunnels) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{5} + return fileDescriptor_b5270a56045f1d8a, []int{6} } func (m *PendingTriggerTunnels) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -444,18 +481,18 @@ func (m *PendingTriggerTunnels) GetIDs() []uint64 { // Packet is the packet that tunnel produces type Packet struct { - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - SignalPriceInfos []SignalPriceInfo `protobuf:"bytes,3,rep,name=signal_price_infos,json=signalPriceInfos,proto3" json:"signal_price_infos"` - PacketContent *types.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` - CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + SignalPrices []SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` + PacketContent *types.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{6} + return fileDescriptor_b5270a56045f1d8a, []int{7} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,9 +535,9 @@ func (m *Packet) GetNonce() uint64 { return 0 } -func (m *Packet) GetSignalPriceInfos() []SignalPriceInfo { +func (m *Packet) GetSignalPrices() []SignalPrice { if m != nil { - return m.SignalPriceInfos + return m.SignalPrices } return nil } @@ -530,7 +567,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{7} + return fileDescriptor_b5270a56045f1d8a, []int{8} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -591,7 +628,7 @@ func (m *AxelarPacketContent) Reset() { *m = AxelarPacketContent{} } func (m *AxelarPacketContent) String() string { return proto.CompactTextString(m) } func (*AxelarPacketContent) ProtoMessage() {} func (*AxelarPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{8} + return fileDescriptor_b5270a56045f1d8a, []int{9} } func (m *AxelarPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -645,8 +682,9 @@ func init() { proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") - proto.RegisterType((*SignalPriceInfo)(nil), "tunnel.v1beta1.SignalPriceInfo") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") + proto.RegisterType((*SignalPricesInfo)(nil), "tunnel.v1beta1.SignalPricesInfo") + proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") proto.RegisterType((*PendingTriggerTunnels)(nil), "tunnel.v1beta1.PendingTriggerTunnels") proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") proto.RegisterType((*TSSPacketContent)(nil), "tunnel.v1beta1.TSSPacketContent") @@ -656,66 +694,68 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 934 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x5f, 0x27, 0xd9, 0x6c, 0xf2, 0x52, 0xc2, 0x6a, 0x48, 0x5b, 0x77, 0x5b, 0xe2, 0x28, 0xa7, - 0x70, 0x58, 0x9b, 0x06, 0xe8, 0x61, 0x4f, 0xc4, 0x1b, 0xa1, 0x5a, 0x08, 0x11, 0xec, 0x9c, 0xb8, - 0x58, 0x8e, 0x3d, 0xf1, 0x0e, 0x64, 0x67, 0x8c, 0x67, 0x12, 0x35, 0x1f, 0x80, 0x2b, 0xe2, 0x13, - 0x20, 0x84, 0x84, 0xc4, 0x07, 0xd8, 0xaf, 0x80, 0x54, 0xf5, 0x54, 0x71, 0xe2, 0x14, 0x21, 0xef, - 0x01, 0x3e, 0x03, 0x07, 0x84, 0x3c, 0xe3, 0x6c, 0x36, 0x11, 0xab, 0x22, 0xc1, 0x61, 0x7b, 0xf3, - 0xfb, 0xfd, 0xde, 0xbc, 0xbc, 0x3f, 0xbf, 0x37, 0x13, 0x78, 0x28, 0xe6, 0x94, 0xe2, 0x99, 0xb5, - 0x78, 0x3c, 0xc1, 0x22, 0x78, 0x6c, 0x29, 0xd3, 0x4c, 0x52, 0x26, 0x18, 0x6a, 0x16, 0x56, 0x41, - 0x1e, 0xb5, 0x62, 0x16, 0x33, 0x49, 0x59, 0xf9, 0x97, 0xf2, 0x3a, 0x7a, 0x10, 0x33, 0x16, 0xcf, - 0xb0, 0x25, 0xad, 0xc9, 0x7c, 0x6a, 0x05, 0x74, 0xb9, 0xa6, 0x42, 0xc6, 0xcf, 0x19, 0xf7, 0xd5, - 0x19, 0x65, 0xac, 0xa9, 0x29, 0xc6, 0x11, 0xbf, 0xfa, 0x5d, 0x69, 0x29, 0xaa, 0xfb, 0x83, 0x06, - 0xb5, 0xb1, 0xe7, 0xb9, 0x6c, 0x2e, 0x30, 0x7a, 0x0a, 0xad, 0x08, 0x73, 0x41, 0x68, 0x20, 0x08, - 0xa3, 0x7e, 0x78, 0x16, 0x10, 0xea, 0x93, 0x48, 0xd7, 0x3a, 0x5a, 0xaf, 0x6e, 0xdf, 0xcb, 0x56, - 0x06, 0x1a, 0x6e, 0xf8, 0xd3, 0x9c, 0x76, 0x86, 0x2e, 0x8a, 0x76, 0xb1, 0x08, 0x7d, 0x08, 0x8f, - 0xb6, 0x22, 0x31, 0x2a, 0xd2, 0x20, 0x14, 0x7e, 0x10, 0x45, 0x29, 0xe6, 0x5c, 0x2f, 0xe5, 0x11, - 0xdd, 0xa3, 0xeb, 0x27, 0x0b, 0x97, 0x81, 0xf2, 0x38, 0x81, 0x17, 0x17, 0xc7, 0x55, 0x99, 0x96, - 0xd3, 0xfd, 0x51, 0x83, 0xc6, 0xe0, 0x19, 0x9e, 0x05, 0xe9, 0xed, 0xce, 0xf3, 0x67, 0x0d, 0xc0, - 0x23, 0x31, 0x0d, 0x66, 0x0e, 0x9d, 0x32, 0xf4, 0x0e, 0xd4, 0xb9, 0xb4, 0x36, 0xb9, 0xdd, 0xc9, - 0x56, 0x46, 0xad, 0x70, 0x19, 0xba, 0x35, 0x45, 0x3b, 0x11, 0xb2, 0x01, 0x71, 0x36, 0x15, 0x7e, - 0x84, 0x17, 0x44, 0xa5, 0x32, 0x49, 0xd4, 0xaf, 0x57, 0xec, 0x56, 0xb6, 0x32, 0x0e, 0x3d, 0x36, - 0x15, 0xc3, 0x35, 0x69, 0x8f, 0x3c, 0xf7, 0x90, 0x6f, 0x21, 0x09, 0xcf, 0x63, 0x9c, 0x05, 0x69, - 0xb4, 0x13, 0xa3, 0xbc, 0x89, 0xf1, 0x34, 0x48, 0xa3, 0xed, 0x18, 0x67, 0x5b, 0x48, 0xc2, 0x4f, - 0x2a, 0x7f, 0x7c, 0x6f, 0x68, 0xdd, 0xbf, 0x34, 0x78, 0x53, 0x25, 0x39, 0x4a, 0x49, 0x88, 0x5f, - 0xd3, 0x62, 0x50, 0x0b, 0xf6, 0x93, 0x3c, 0x7f, 0xbd, 0x92, 0x1f, 0x73, 0x95, 0x81, 0x1e, 0x41, - 0x5d, 0x90, 0x73, 0xcc, 0x45, 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, 0xca, 0x46, 0x4f, 0xe0, - 0xfe, 0x2c, 0xe0, 0xc2, 0x5f, 0x03, 0xfe, 0x66, 0x16, 0x35, 0x39, 0x8b, 0xbb, 0x39, 0xed, 0x14, - 0xec, 0x78, 0x4d, 0xa2, 0x87, 0x50, 0x27, 0xdc, 0x0f, 0x42, 0x41, 0x16, 0x58, 0xaf, 0x77, 0xb4, - 0x5e, 0xcd, 0xad, 0x11, 0x3e, 0x90, 0x36, 0x7a, 0x1b, 0x20, 0x4c, 0x71, 0x20, 0x70, 0xe4, 0x07, - 0x42, 0x07, 0x35, 0xd3, 0x02, 0x19, 0x08, 0xd4, 0x87, 0x03, 0x69, 0xb0, 0x54, 0x6f, 0xbc, 0xa2, - 0x33, 0x6b, 0xc7, 0x42, 0x07, 0x7d, 0xb8, 0x3b, 0xc2, 0x34, 0x22, 0x34, 0x1e, 0xa7, 0x24, 0x8e, - 0x71, 0xaa, 0x44, 0xc1, 0xd1, 0x03, 0x28, 0x93, 0x88, 0xeb, 0x5a, 0xa7, 0xdc, 0xab, 0xd8, 0x07, - 0xd9, 0xca, 0x28, 0x3b, 0x43, 0xee, 0xe6, 0x58, 0xf7, 0x9b, 0x12, 0x54, 0x47, 0x41, 0xf8, 0x25, - 0x16, 0xf9, 0xce, 0xa8, 0x16, 0xfa, 0x57, 0x12, 0x92, 0x3b, 0xa3, 0xa2, 0xe4, 0x3b, 0xa3, 0x68, - 0x27, 0xca, 0xb5, 0x2a, 0xb5, 0x53, 0x08, 0x49, 0x19, 0x37, 0x8c, 0xa7, 0xfc, 0xdf, 0xc6, 0xf3, - 0x29, 0x34, 0x13, 0x99, 0x9f, 0xbc, 0xee, 0x30, 0x15, 0x52, 0x65, 0x37, 0x29, 0x14, 0xbd, 0xb8, - 0x38, 0x6e, 0xaa, 0x7a, 0x4e, 0x95, 0xbb, 0xe3, 0xbe, 0x91, 0x5c, 0xb7, 0x77, 0xda, 0xbf, 0xbf, - 0xd3, 0xfe, 0xee, 0x77, 0x25, 0x38, 0x1c, 0x7b, 0xde, 0x56, 0x0c, 0xf4, 0x05, 0x40, 0x9e, 0x18, - 0xa1, 0xf1, 0xa6, 0x37, 0x1f, 0x67, 0x2b, 0xa3, 0xee, 0x29, 0xd4, 0x19, 0xfe, 0xb9, 0x32, 0x4e, - 0x62, 0x22, 0xce, 0xe6, 0x13, 0x33, 0x64, 0xe7, 0xd6, 0x24, 0xa0, 0x91, 0x4c, 0x2c, 0x64, 0x33, - 0x4b, 0xde, 0xf8, 0xd6, 0xa2, 0x6f, 0x3d, 0x93, 0xb8, 0xe0, 0xdc, 0xca, 0xd7, 0x85, 0x9b, 0x57, - 0xa7, 0xdd, 0x7a, 0x11, 0xde, 0x89, 0x6e, 0x7c, 0x2e, 0x4a, 0xff, 0xfb, 0x73, 0x51, 0x7e, 0xe5, - 0x73, 0xf1, 0x0f, 0xed, 0xec, 0xfe, 0xae, 0xc1, 0x5b, 0xea, 0x79, 0xdb, 0xee, 0xd1, 0xbb, 0x70, - 0x87, 0x4c, 0x42, 0xff, 0xab, 0x39, 0x9e, 0xe3, 0x4d, 0x97, 0x9a, 0xd9, 0xca, 0x00, 0xc7, 0x3e, - 0xfd, 0x2c, 0x87, 0x9d, 0xa1, 0x0b, 0x64, 0x12, 0xaa, 0xef, 0x5b, 0x5f, 0xa9, 0xfd, 0xc9, 0x4f, - 0x59, 0x5b, 0x7b, 0x9e, 0xb5, 0xb5, 0x97, 0x59, 0x5b, 0xfb, 0x2d, 0x6b, 0x6b, 0xdf, 0x5e, 0xb6, - 0xf7, 0x5e, 0x5e, 0xb6, 0xf7, 0x7e, 0xbd, 0x6c, 0xef, 0x7d, 0x6e, 0xfd, 0x8b, 0x71, 0x17, 0x7f, - 0xa1, 0xe4, 0xb4, 0x27, 0x55, 0xe9, 0xf1, 0xde, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x3d, - 0xbd, 0xc0, 0x59, 0x09, 0x00, 0x00, + // 961 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xda, 0x8e, 0x63, 0x3f, 0xa7, 0x51, 0x34, 0xb8, 0xed, 0x36, 0x29, 0x5e, 0xcb, 0x27, + 0x73, 0xc8, 0x2e, 0x35, 0xd0, 0x43, 0x4e, 0x64, 0x63, 0x55, 0x5d, 0x21, 0x44, 0x58, 0xfb, 0xc4, + 0x65, 0xb5, 0xde, 0x1d, 0x6f, 0x06, 0x9c, 0x99, 0x65, 0x67, 0x1c, 0x35, 0x47, 0xbe, 0x01, 0x9f, + 0x00, 0x21, 0x24, 0x24, 0x3e, 0x40, 0xae, 0x9c, 0x10, 0x52, 0xd5, 0x53, 0xc5, 0x89, 0x93, 0x85, + 0x36, 0x07, 0xf8, 0x0c, 0x9c, 0xd0, 0xce, 0xcc, 0xc6, 0xb1, 0x69, 0x55, 0x8a, 0x7a, 0xe8, 0x6d, + 0xdf, 0x9f, 0x79, 0xef, 0x37, 0xbf, 0xf7, 0x9b, 0x99, 0x85, 0x7d, 0x31, 0xa7, 0x14, 0xcf, 0x9c, + 0xf3, 0x07, 0x13, 0x2c, 0xc2, 0x07, 0x8e, 0x32, 0xed, 0x34, 0x63, 0x82, 0xa1, 0x1d, 0x6d, 0xe9, + 0xe0, 0x5e, 0x3b, 0x61, 0x09, 0x93, 0x21, 0xa7, 0xf8, 0x52, 0x59, 0x7b, 0xf7, 0x12, 0xc6, 0x92, + 0x19, 0x76, 0xa4, 0x35, 0x99, 0x4f, 0x9d, 0x90, 0x5e, 0x94, 0xa1, 0x88, 0xf1, 0x33, 0xc6, 0x03, + 0xb5, 0x46, 0x19, 0x65, 0x68, 0x8a, 0x71, 0xcc, 0xaf, 0xfb, 0x4a, 0x4b, 0x85, 0x7a, 0x3f, 0x18, + 0xd0, 0x18, 0x8f, 0x46, 0x3e, 0x9b, 0x0b, 0x8c, 0x1e, 0x43, 0x3b, 0xc6, 0x5c, 0x10, 0x1a, 0x0a, + 0xc2, 0x68, 0x10, 0x9d, 0x86, 0x84, 0x06, 0x24, 0x36, 0x8d, 0xae, 0xd1, 0x6f, 0xba, 0x77, 0xf2, + 0x85, 0x85, 0x86, 0xcb, 0xf8, 0x71, 0x11, 0xf6, 0x86, 0x3e, 0x8a, 0xd7, 0x7d, 0x31, 0xfa, 0x18, + 0xee, 0xaf, 0x54, 0x62, 0x54, 0x64, 0x61, 0x24, 0x82, 0x30, 0x8e, 0x33, 0xcc, 0xb9, 0x59, 0x29, + 0x2a, 0xfa, 0x7b, 0x37, 0x57, 0xea, 0x94, 0x23, 0x95, 0x71, 0x08, 0xcf, 0x2e, 0x0f, 0xea, 0x12, + 0x96, 0xd7, 0xfb, 0xd1, 0x80, 0xd6, 0xd1, 0x13, 0x3c, 0x0b, 0xb3, 0xb7, 0x1b, 0xe7, 0xaf, 0x06, + 0xc0, 0x88, 0x24, 0x34, 0x9c, 0x79, 0x74, 0xca, 0xd0, 0x7b, 0xd0, 0xe4, 0xd2, 0x5a, 0x62, 0xdb, + 0xce, 0x17, 0x56, 0x43, 0xa7, 0x0c, 0xfd, 0x86, 0x0a, 0x7b, 0x31, 0x72, 0x01, 0x71, 0x36, 0x15, + 0x41, 0x8c, 0xcf, 0x89, 0x82, 0x32, 0x49, 0x55, 0xf7, 0x9a, 0xdb, 0xce, 0x17, 0xd6, 0xee, 0x88, + 0x4d, 0xc5, 0xb0, 0x0c, 0xba, 0x27, 0x23, 0x7f, 0x97, 0xaf, 0x78, 0x52, 0x5e, 0xd4, 0x38, 0x0d, + 0xb3, 0x78, 0xad, 0x46, 0x75, 0x59, 0xe3, 0x71, 0x98, 0xc5, 0xab, 0x35, 0x4e, 0x57, 0x3c, 0x29, + 0x3f, 0xac, 0xfd, 0xf5, 0xbd, 0x65, 0xf4, 0x7e, 0xae, 0x42, 0x7d, 0x2c, 0xe5, 0x88, 0xee, 0x40, + 0x45, 0x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xde, 0x31, 0xfe, 0xc8, 0x3b, 0xc6, 0xb7, 0x57, 0x9d, 0x8d, 0xe7, 0x57, 0x9d, + 0x8d, 0xdf, 0xaf, 0x3a, 0x1b, 0x5f, 0x38, 0xff, 0x61, 0xdc, 0xfa, 0x37, 0x49, 0x4e, 0x7b, 0x52, + 0x97, 0x19, 0x1f, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xb5, 0xed, 0x5c, 0x3d, 0x09, 0x00, + 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -802,14 +842,14 @@ func (this *SignalInfo) Equal(that interface{}) bool { } return true } -func (this *SignalPriceInfo) Equal(that interface{}) bool { +func (this *Tunnel) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SignalPriceInfo) + that1, ok := that.(*Tunnel) if !ok { - that2, ok := that.(SignalPriceInfo) + that2, ok := that.(Tunnel) if ok { that1 = &that2 } else { @@ -821,31 +861,51 @@ func (this *SignalPriceInfo) Equal(that interface{}) bool { } else if this == nil { return false } - if this.SignalID != that1.SignalID { + if this.ID != that1.ID { return false } - if this.SoftDeviationBPS != that1.SoftDeviationBPS { + if this.NonceCount != that1.NonceCount { return false } - if this.HardDeviationBPS != that1.HardDeviationBPS { + if !this.Route.Equal(that1.Route) { return false } - if this.Price != that1.Price { + if this.FeedType != that1.FeedType { return false } - if this.Timestamp != that1.Timestamp { + if this.FeePayer != that1.FeePayer { + return false + } + if len(this.SignalInfos) != len(that1.SignalInfos) { + return false + } + for i := range this.SignalInfos { + if !this.SignalInfos[i].Equal(&that1.SignalInfos[i]) { + return false + } + } + if this.Interval != that1.Interval { + return false + } + if this.IsActive != that1.IsActive { + return false + } + if this.CreatedAt != that1.CreatedAt { + return false + } + if this.Creator != that1.Creator { return false } return true } -func (this *Tunnel) Equal(that interface{}) bool { +func (this *SignalPricesInfo) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Tunnel) + that1, ok := that.(*SignalPricesInfo) if !ok { - that2, ok := that.(Tunnel) + that2, ok := that.(SignalPricesInfo) if ok { that1 = &that2 } else { @@ -857,42 +917,48 @@ func (this *Tunnel) Equal(that interface{}) bool { } else if this == nil { return false } - if this.ID != that1.ID { - return false - } - if this.NonceCount != that1.NonceCount { + if this.TunnelID != that1.TunnelID { return false } - if !this.Route.Equal(that1.Route) { + if len(this.SignalPrices) != len(that1.SignalPrices) { return false } - if this.FeedType != that1.FeedType { - return false + for i := range this.SignalPrices { + if !this.SignalPrices[i].Equal(&that1.SignalPrices[i]) { + return false + } } - if this.FeePayer != that1.FeePayer { + if this.LastIntervalTimestamp != that1.LastIntervalTimestamp { return false } - if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { - return false + return true +} +func (this *SignalPrice) Equal(that interface{}) bool { + if that == nil { + return this == nil } - for i := range this.SignalPriceInfos { - if !this.SignalPriceInfos[i].Equal(&that1.SignalPriceInfos[i]) { + + that1, ok := that.(*SignalPrice) + if !ok { + that2, ok := that.(SignalPrice) + if ok { + that1 = &that2 + } else { return false } } - if this.Interval != that1.Interval { - return false - } - if this.LastIntervalTimestamp != that1.LastIntervalTimestamp { + if that1 == nil { + return this == nil + } else if this == nil { return false } - if this.IsActive != that1.IsActive { + if this.SignalID != that1.SignalID { return false } - if this.CreatedAt != that1.CreatedAt { + if this.Price != that1.Price { return false } - if this.Creator != that1.Creator { + if this.Timestamp != that1.Timestamp { return false } return true @@ -951,11 +1017,11 @@ func (this *Packet) Equal(that interface{}) bool { if this.Nonce != that1.Nonce { return false } - if len(this.SignalPriceInfos) != len(that1.SignalPriceInfos) { + if len(this.SignalPrices) != len(that1.SignalPrices) { return false } - for i := range this.SignalPriceInfos { - if !this.SignalPriceInfos[i].Equal(&that1.SignalPriceInfos[i]) { + for i := range this.SignalPrices { + if !this.SignalPrices[i].Equal(&that1.SignalPrices[i]) { return false } } @@ -1141,7 +1207,7 @@ func (m *SignalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SignalPriceInfo) Marshal() (dAtA []byte, err error) { +func (m *Tunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1151,102 +1217,47 @@ func (m *SignalPriceInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SignalPriceInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *Tunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SignalPriceInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Timestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.Creator))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x52 } - if m.Price != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Price)) + if m.CreatedAt != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x48 } - if m.HardDeviationBPS != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.HardDeviationBPS)) + if m.IsActive { i-- - dAtA[i] = 0x18 - } - if m.SoftDeviationBPS != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.SoftDeviationBPS)) + if m.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- - dAtA[i] = 0x10 + dAtA[i] = 0x40 } - if len(m.SignalID) > 0 { - i -= len(m.SignalID) - copy(dAtA[i:], m.SignalID) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.SignalID))) + if m.Interval != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Interval)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x38 } - return len(dAtA) - i, nil -} - -func (m *Tunnel) 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 *Tunnel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0x5a - } - if m.CreatedAt != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) - i-- - dAtA[i] = 0x50 - } - if m.IsActive { - i-- - if m.IsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.LastIntervalTimestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.LastIntervalTimestamp)) - i-- - dAtA[i] = 0x40 - } - if m.Interval != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Interval)) - i-- - dAtA[i] = 0x38 - } - if len(m.SignalPriceInfos) > 0 { - for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { + if len(m.SignalInfos) > 0 { + for iNdEx := len(m.SignalInfos) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SignalPriceInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.SignalInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1294,6 +1305,93 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SignalPricesInfo) 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 *SignalPricesInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignalPricesInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastIntervalTimestamp != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.LastIntervalTimestamp)) + i-- + dAtA[i] = 0x18 + } + if len(m.SignalPrices) > 0 { + for iNdEx := len(m.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignalPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTunnel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.TunnelID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SignalPrice) 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 *SignalPrice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignalPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Timestamp != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x18 + } + if m.Price != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Price)) + i-- + dAtA[i] = 0x10 + } + if len(m.SignalID) > 0 { + i -= len(m.SignalID) + copy(dAtA[i:], m.SignalID) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.SignalID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *PendingTriggerTunnels) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1372,10 +1470,10 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.SignalPriceInfos) > 0 { - for iNdEx := len(m.SignalPriceInfos) - 1; iNdEx >= 0; iNdEx-- { + if len(m.SignalPrices) > 0 { + for iNdEx := len(m.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SignalPriceInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.SignalPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1547,31 +1645,6 @@ func (m *SignalInfo) Size() (n int) { return n } -func (m *SignalPriceInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SignalID) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - if m.SoftDeviationBPS != 0 { - n += 1 + sovTunnel(uint64(m.SoftDeviationBPS)) - } - if m.HardDeviationBPS != 0 { - n += 1 + sovTunnel(uint64(m.HardDeviationBPS)) - } - if m.Price != 0 { - n += 1 + sovTunnel(uint64(m.Price)) - } - if m.Timestamp != 0 { - n += 1 + sovTunnel(uint64(m.Timestamp)) - } - return n -} - func (m *Tunnel) Size() (n int) { if m == nil { return 0 @@ -1595,8 +1668,8 @@ func (m *Tunnel) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - if len(m.SignalPriceInfos) > 0 { - for _, e := range m.SignalPriceInfos { + if len(m.SignalInfos) > 0 { + for _, e := range m.SignalInfos { l = e.Size() n += 1 + l + sovTunnel(uint64(l)) } @@ -1604,9 +1677,6 @@ func (m *Tunnel) Size() (n int) { if m.Interval != 0 { n += 1 + sovTunnel(uint64(m.Interval)) } - if m.LastIntervalTimestamp != 0 { - n += 1 + sovTunnel(uint64(m.LastIntervalTimestamp)) - } if m.IsActive { n += 2 } @@ -1620,6 +1690,46 @@ func (m *Tunnel) Size() (n int) { return n } +func (m *SignalPricesInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTunnel(uint64(m.TunnelID)) + } + if len(m.SignalPrices) > 0 { + for _, e := range m.SignalPrices { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + if m.LastIntervalTimestamp != 0 { + n += 1 + sovTunnel(uint64(m.LastIntervalTimestamp)) + } + return n +} + +func (m *SignalPrice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SignalID) + if l > 0 { + n += 1 + l + sovTunnel(uint64(l)) + } + if m.Price != 0 { + n += 1 + sovTunnel(uint64(m.Price)) + } + if m.Timestamp != 0 { + n += 1 + sovTunnel(uint64(m.Timestamp)) + } + return n +} + func (m *PendingTriggerTunnels) Size() (n int) { if m == nil { return 0 @@ -1648,8 +1758,8 @@ func (m *Packet) Size() (n int) { if m.Nonce != 0 { n += 1 + sovTunnel(uint64(m.Nonce)) } - if len(m.SignalPriceInfos) > 0 { - for _, e := range m.SignalPriceInfos { + if len(m.SignalPrices) > 0 { + for _, e := range m.SignalPrices { l = e.Size() n += 1 + l + sovTunnel(uint64(l)) } @@ -2058,7 +2168,7 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { +func (m *Tunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2081,17 +2191,17 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignalPriceInfo: wiretype end group for non-group") + return fmt.Errorf("proto: Tunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignalPriceInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Tunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalID", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } - var stringLen uint64 + m.ID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2101,29 +2211,16 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ID |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SignalID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBPS", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NonceCount", wireType) } - m.SoftDeviationBPS = 0 + m.NonceCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2133,16 +2230,16 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SoftDeviationBPS |= uint64(b&0x7F) << shift + m.NonceCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBPS", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) } - m.HardDeviationBPS = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2152,16 +2249,33 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HardDeviationBPS |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Route == nil { + m.Route = &types.Any{} + } + if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) } - m.Price = 0 + m.FeedType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2171,16 +2285,16 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Price |= uint64(b&0x7F) << shift + m.FeedType |= types1.FeedType(b&0x7F) << shift if b < 0x80 { break } } case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2190,66 +2304,29 @@ func (m *SignalPriceInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTunnel } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tunnel) 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 ErrIntOverflowTunnel + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTunnel } - if iNdEx >= l { + if postIndex > 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: Tunnel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tunnel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + m.FeePayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalInfos", wireType) } - m.ID = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2259,16 +2336,31 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ID |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 2: + if msglen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignalInfos = append(m.SignalInfos, SignalInfo{}) + if err := m.SignalInfos[len(m.SignalInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NonceCount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) } - m.NonceCount = 0 + m.Interval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2278,16 +2370,16 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NonceCount |= uint64(b&0x7F) << shift + m.Interval |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2297,33 +2389,17 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Route == nil { - m.Route = &types.Any{} - } - if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: + m.IsActive = bool(v != 0) + case 9: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } - m.FeedType = 0 + m.CreatedAt = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2333,14 +2409,14 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FeedType |= types1.FeedType(b&0x7F) << shift + m.CreatedAt |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2368,11 +2444,80 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FeePayer = string(dAtA[iNdEx:postIndex]) + m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + default: + iNdEx = preIndex + skippy, err := skipTunnel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTunnel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignalPricesInfo) 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 ErrIntOverflowTunnel + } + 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: SignalPricesInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignalPricesInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2399,31 +2544,12 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPriceInfos = append(m.SignalPriceInfos, SignalPriceInfo{}) - if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SignalPrices = append(m.SignalPrices, SignalPrice{}) + if err := m.SignalPrices[len(m.SignalPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) - } - m.Interval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Interval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LastIntervalTimestamp", wireType) } @@ -2442,11 +2568,61 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { break } } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + default: + iNdEx = preIndex + skippy, err := skipTunnel(dAtA[iNdEx:]) + if err != nil { + return err } - var v int + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTunnel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignalPrice) 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 ErrIntOverflowTunnel + } + 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: SignalPrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignalPrice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalID", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2456,17 +2632,29 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IsActive = bool(v != 0) - case 10: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignalID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) } - m.CreatedAt = 0 + m.Price = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2476,16 +2664,16 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CreatedAt |= int64(b&0x7F) << shift + m.Price |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } - var stringLen uint64 + m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2495,24 +2683,11 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTunnel(dAtA[iNdEx:]) @@ -2729,7 +2904,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalPriceInfos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2756,8 +2931,8 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPriceInfos = append(m.SignalPriceInfos, SignalPriceInfo{}) - if err := m.SignalPriceInfos[len(m.SignalPriceInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SignalPrices = append(m.SignalPrices, SignalPrice{}) + if err := m.SignalPrices[len(m.SignalPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From 13e73da21e57b6ede5a21780aab81c87a470198e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 29 Aug 2024 16:34:06 +0700 Subject: [PATCH 054/272] add comment --- x/tunnel/client/cli/util.go | 6 +++--- x/tunnel/keeper/packet.go | 13 ++----------- x/tunnel/types/events.go | 1 - 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index 01b1e335d..e075c0dfb 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -12,14 +12,14 @@ type SignalInfos struct { SignalInfos []SignalInfo `json:"signal_infos"` } -// SignalInfo represents the signal info without soft deviation that will implement in the future +// SignalInfo represents the signal information without soft deviation, which may be implemented in the future. type SignalInfo struct { SignalID string `json:"signal_id"` DeviationBPS uint64 `json:"deviation_bps"` } -// ToSignalInfos converts the signal infos to the types.SignalInfo without soft deviation -// Note: soft deviation can be use in the future to adjust the deviation +// ToSignalInfos converts signal information to types.SignalInfo, excluding soft deviation. +// Note: Soft deviation may be utilized in the future for deviation adjustments. func (sis SignalInfos) ToSignalInfos() []types.SignalInfo { var signalInfos []types.SignalInfo for _, si := range sis.SignalInfos { diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index de192967f..ffe35f9be 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -155,23 +155,14 @@ func GenerateSignalPrices( // TODO: remove check PriceStatusAvailable when feeds module is implemented if !exists || latestPrice.PriceStatus != feedstypes.PriceStatusAvailable { sps = append(sps, types.NewSignalPrice(sp.SignalID, 0, 0)) - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSignalIDNotFound, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), - sdk.NewAttribute(types.AttributeKeySignalID, sp.SignalID), - )) continue } // get signal info from signalInfoMap signalInfo, exists := signalInfoMap[sp.SignalID] if !exists { - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSignalInfoNotFound, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), - sdk.NewAttribute(types.AttributeKeySignalID, sp.SignalID), - )) - continue + // panic if signal info not found for signal ID in the tunnel that should not happen + panic(fmt.Sprintf("signal info not found for signal ID: %s", sp.SignalID)) } // if triggerAll is true or the deviation exceeds the threshold, add the signal price info to the list diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 4487113f3..d5c9b210f 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -6,7 +6,6 @@ const ( EventTypeCreateTunnel = "create_tunnel" EventTypeActivateTunnel = "activate_tunnel" EventTypeManualTriggerTunnel = "manual_trigger_tunnel" - EventTypeSignalIDNotFound = "signal_id_not_found" EventTypeSignalInfoNotFound = "signal_info_not_found" EventTypeProducePacketFail = "produce_packet_fail" EventTypeGetSignalPricesInfoFail = "get_signal_prices_info_fail" From 98e738486e3e7c5e73b27681f43787874bfd43be Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 29 Aug 2024 16:44:30 +0700 Subject: [PATCH 055/272] add comment --- proto/tunnel/v1beta1/params.proto | 8 +- proto/tunnel/v1beta1/tunnel.proto | 86 +++++++++---- x/tunnel/types/params.pb.go | 202 +++++------------------------- x/tunnel/types/tunnel.pb.go | 92 +++++++++----- 4 files changed, 160 insertions(+), 228 deletions(-) diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto index bf75210d7..a2978f13e 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/tunnel/v1beta1/params.proto @@ -11,10 +11,14 @@ message Params { option (gogoproto.equal) = true; // Use gogoproto.equal for proto3 message equality checks option (gogoproto.goproto_stringer) = false; // Disable stringer generation for better control + // min_deposit is the minimum deposit required to create a tunnel repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - uint64 min_deviation_bps = 2 [(gogoproto.customname) = "MinDeviationBPS"]; - uint64 min_interval = 3; + // min_deviation_bps is the minimum deviation in basis points + uint64 min_deviation_bps = 2 [(gogoproto.customname) = "MinDeviationBPS"]; + // min_interval is the minimum interval in seconds + uint64 min_interval = 3; + // base_fee is the base fee for each tunnel repeated cosmos.base.v1beta1.Coin base_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 0fd1a6fdf..27fb147cf 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -14,7 +14,9 @@ option (gogoproto.equal_all) = true; message TSSRoute { option (cosmos_proto.implements_interface) = "RouteI"; - string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; + // destination_chain_id is the destination chain ID + string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; + // destination_contract_address is the destination contract address string destination_contract_address = 2; } @@ -22,7 +24,9 @@ message TSSRoute { message AxelarRoute { option (cosmos_proto.implements_interface) = "RouteI"; - string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; + // destination_chain_id is the destination chain ID + string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; + // destination_contract_address is the destination contract address string destination_contract_address = 2; } @@ -30,8 +34,11 @@ message AxelarRoute { message SignalInfo { option (gogoproto.equal) = true; - string signal_id = 1 [(gogoproto.customname) = "SignalID"]; + // signal_id is the signal ID + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; + // soft_deviation_bps is the soft deviation in basis points uint64 soft_deviation_bps = 2 [(gogoproto.customname) = "SoftDeviationBPS"]; + // hard_deviation_bps is the hard deviation in basis points uint64 hard_deviation_bps = 3 [(gogoproto.customname) = "HardDeviationBPS"]; } @@ -39,34 +46,50 @@ message SignalInfo { message Tunnel { option (gogoproto.equal) = true; - uint64 id = 1 [(gogoproto.customname) = "ID"]; - uint64 nonce_count = 2; - google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; - feeds.v1beta1.FeedType feed_type = 4; - string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated SignalInfo signal_infos = 6 [(gogoproto.nullable) = false]; - uint64 interval = 7; - bool is_active = 8; - int64 created_at = 9; - string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // id is the tunnel ID + uint64 id = 1 [(gogoproto.customname) = "ID"]; + // nonce_count is representing the number of packets sent + uint64 nonce_count = 2; + // route is the route for delivering the signal prices + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; + // feed_type is the type of feed data + feeds.v1beta1.FeedType feed_type = 4; + // fee_payer is the address of the fee payer + string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // signal_infos is the list of signal infos + repeated SignalInfo signal_infos = 6 [(gogoproto.nullable) = false]; + // interval is the interval for delivering the signal prices + uint64 interval = 7; + // is_active is the flag to indicate if the tunnel is active + bool is_active = 8; + // created_at is the timestamp when the tunnel is created + int64 created_at = 9; + // creator is the address of the creator + string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // SignalPrices is the type for a list of signal prices with the last interval timestamp message SignalPricesInfo { option (gogoproto.equal) = true; - uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; - int64 last_interval_timestamp = 3; + // tunnel_id is the tunnel ID + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // signal_prices is the list of signal prices + repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; + // last_interval_timestamp is the timestamp of the last time that the packet is sent + int64 last_interval_timestamp = 3; } // SignalPrice is the type for a signal price message SignalPrice { option (gogoproto.equal) = true; + // signal_id is the signal ID string signal_id = 1 [(gogoproto.customname) = "SignalID"]; - uint64 price = 2; - int64 timestamp = 3; + // price is the price of the signal + uint64 price = 2; + // timestamp is the timestamp of the signal + int64 timestamp = 3; } // PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered @@ -77,22 +100,30 @@ message PendingTriggerTunnels { // Packet is the packet that tunnel produces message Packet { - uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - uint64 nonce = 2; - repeated SignalPrice signal_prices = 3 [(gogoproto.nullable) = false]; - google.protobuf.Any packet_content = 4 [(cosmos_proto.accepts_interface) = "PacketContentI"]; - int64 created_at = 5; + // tunnel_id is the tunnel ID + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // nonce is the nonce of the packet + uint64 nonce = 2; + // signal_prices is the list of signal prices + repeated SignalPrice signal_prices = 3 [(gogoproto.nullable) = false]; + // packet_content is the content of the packet that implements PacketContentI + google.protobuf.Any packet_content = 4 [(cosmos_proto.accepts_interface) = "PacketContentI"]; + // created_at is the timestamp when the packet is created + int64 created_at = 5; } // TSSPacketContent is the packet content for TSS message TSSPacketContent { option (cosmos_proto.implements_interface) = "PacketContentI"; + // signing_id is the signing ID uint64 signing_id = 1 [ (gogoproto.customname) = "SigningID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" ]; - string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; + // destination_chain_id is the destination chain ID + string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; + // destination_contract_address is the destination contract address string destination_contract_address = 3; } @@ -100,7 +131,10 @@ message TSSPacketContent { message AxelarPacketContent { option (cosmos_proto.implements_interface) = "PacketContentI"; - uint64 ibc_queue_id = 1 [(gogoproto.customname) = "IBCQueueID"]; - string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; + // ibc_queue_id is the IBC queue ID + uint64 ibc_queue_id = 1 [(gogoproto.customname) = "IBCQueueID"]; + // destination_chain_id is the destination chain ID + string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; + // destination_contract_address is the destination contract address string destination_contract_address = 3; } diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 726c5e12c..64f1ee620 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -27,12 +27,14 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params is the data structure that keeps the parameters of the module. type Params struct { - MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` - MinDeviationBPS uint64 `protobuf:"varint,2,opt,name=min_deviation_bps,json=minDeviationBps,proto3" json:"min_deviation_bps,omitempty"` - MinInterval uint64 `protobuf:"varint,3,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` - BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` - TSSRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=tss_route_fee,json=tssRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tss_route_fee"` - AxelarRouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=axelar_route_fee,json=axelarRouteFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"axelar_route_fee"` + // min_deposit is the minimum deposit required to create a tunnel + MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` + // min_deviation_bps is the minimum deviation in basis points + MinDeviationBPS uint64 `protobuf:"varint,2,opt,name=min_deviation_bps,json=minDeviationBps,proto3" json:"min_deviation_bps,omitempty"` + // min_interval is the minimum interval in seconds + MinInterval uint64 `protobuf:"varint,3,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` + // base_fee is the base fee for each tunnel + BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` } func (m *Params) Reset() { *m = Params{} } @@ -95,20 +97,6 @@ func (m *Params) GetBaseFee() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -func (m *Params) GetTSSRouteFee() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.TSSRouteFee - } - return nil -} - -func (m *Params) GetAxelarRouteFee() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.AxelarRouteFee - } - return nil -} - func init() { proto.RegisterType((*Params)(nil), "tunnel.v1beta1.Params") } @@ -116,33 +104,29 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/params.proto", fileDescriptor_a7b5eedd244355eb) } var fileDescriptor_a7b5eedd244355eb = []byte{ - // 402 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x31, 0x8f, 0xd3, 0x30, - 0x18, 0x86, 0x13, 0x5a, 0x4a, 0xe5, 0x40, 0x0b, 0x81, 0x21, 0x14, 0x29, 0x29, 0x4c, 0x5d, 0x88, - 0x69, 0xd9, 0x58, 0x2a, 0x05, 0x54, 0xa9, 0x03, 0x52, 0x95, 0x32, 0xb1, 0x44, 0x4e, 0xea, 0xb6, - 0x16, 0x89, 0x1d, 0xc5, 0x4e, 0x54, 0x16, 0x7e, 0x03, 0x23, 0x63, 0x67, 0xfe, 0x06, 0x4b, 0xc7, - 0x8e, 0x4c, 0xbd, 0x53, 0xba, 0xdc, 0xcf, 0x38, 0x39, 0x4e, 0x4f, 0xdd, 0x4e, 0x27, 0x75, 0x4a, - 0xe4, 0xf7, 0x7b, 0x9f, 0xc7, 0x9f, 0x64, 0xf0, 0x46, 0xe4, 0x94, 0xe2, 0x18, 0x16, 0xc3, 0x10, - 0x0b, 0x34, 0x84, 0x29, 0xca, 0x50, 0xc2, 0xdd, 0x34, 0x63, 0x82, 0x99, 0x1d, 0x15, 0xba, 0x75, - 0xd8, 0x7b, 0xb5, 0x62, 0x2b, 0x56, 0x45, 0x50, 0xfe, 0xa9, 0xa9, 0x9e, 0x1d, 0x31, 0x9e, 0x30, - 0x0e, 0x43, 0xc4, 0xf1, 0x1d, 0x27, 0x62, 0x84, 0xaa, 0xfc, 0xdd, 0xbf, 0x26, 0x68, 0xcd, 0x2a, - 0xac, 0x19, 0x03, 0x23, 0x21, 0x34, 0x58, 0xe0, 0x94, 0x71, 0x22, 0x2c, 0xbd, 0xdf, 0x18, 0x18, - 0xa3, 0xd7, 0xae, 0x02, 0xb8, 0x12, 0x70, 0x72, 0xb9, 0x9f, 0x19, 0xa1, 0xde, 0x87, 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da, 0xff, 0xa3, 0xad, 0x7d, 0x87, 0x67, 0xf4, 0x10, 0xd1, 0x45, 0xf5, - 0xea, 0x22, 0x16, 0xc3, 0x68, 0x8d, 0x08, 0x85, 0xc5, 0x08, 0x6e, 0x60, 0xfd, 0xca, 0x2b, 0x55, - 0xd8, 0xaa, 0x26, 0x3e, 0xde, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xed, 0xb5, 0xd1, 0xfc, 0x02, - 0x00, 0x00, + // 343 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xb1, 0x4e, 0x02, 0x31, + 0x18, 0xc7, 0xef, 0x80, 0x20, 0x29, 0x46, 0xe2, 0xe9, 0x70, 0x62, 0xd2, 0x43, 0x27, 0x16, 0xaf, + 0x82, 0x9b, 0x8b, 0xc9, 0x69, 0x4c, 0x18, 0x4c, 0x08, 0x6e, 0x2e, 0xa4, 0x77, 0x14, 0x68, 0xbc, + 0x6b, 0x2f, 0xb4, 0x5c, 0xf4, 0x2d, 0x1c, 0x1d, 0x99, 0x7d, 0x12, 0x06, 0x07, 0x46, 0x27, 0x34, + 0xc7, 0xe2, 0x63, 0x98, 0xb6, 0xa7, 0xe1, 0x01, 0x9c, 0xda, 0x7c, 0xff, 0xff, 0xf7, 0xfb, 0xf7, + 0xeb, 0x07, 0x8e, 0xe5, 0x9c, 0x31, 0x12, 0xa3, 0xac, 0x13, 0x12, 0x89, 0x3b, 0x28, 0xc5, 0x33, + 0x9c, 0x08, 0x3f, 0x9d, 0x71, 0xc9, 0x9d, 0x3d, 0x23, 0xfa, 0x85, 0xd8, 0x3c, 0x9c, 0xf0, 0x09, + 0xd7, 0x12, 0x52, 0x37, 0xe3, 0x6a, 0xc2, 0x88, 0x8b, 0x84, 0x0b, 0x14, 0x62, 0x41, 0xfe, 0x38, + 0x11, 0xa7, 0xcc, 0xe8, 0xa7, 0xef, 0x25, 0x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b, 0xa2, + 0x27, 0x54, 0xac, 0x5b, 0x67, 0x84, 0x55, 0xed, 0xb8, 0xf8, 0x09, 0x00, 0x00, 0xff, 0xff, 0x2a, + 0x67, 0x59, 0x50, 0x05, 0x02, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -186,22 +170,6 @@ func (this *Params) Equal(that interface{}) bool { return false } } - if len(this.TSSRouteFee) != len(that1.TSSRouteFee) { - return false - } - for i := range this.TSSRouteFee { - if !this.TSSRouteFee[i].Equal(&that1.TSSRouteFee[i]) { - return false - } - } - if len(this.AxelarRouteFee) != len(that1.AxelarRouteFee) { - return false - } - for i := range this.AxelarRouteFee { - if !this.AxelarRouteFee[i].Equal(&that1.AxelarRouteFee[i]) { - return false - } - } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -224,34 +192,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.AxelarRouteFee) > 0 { - for iNdEx := len(m.AxelarRouteFee) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AxelarRouteFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.TSSRouteFee) > 0 { - for iNdEx := len(m.TSSRouteFee) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TSSRouteFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } if len(m.BaseFee) > 0 { for iNdEx := len(m.BaseFee) - 1; iNdEx >= 0; iNdEx-- { { @@ -328,18 +268,6 @@ func (m *Params) Size() (n int) { n += 1 + l + sovParams(uint64(l)) } } - if len(m.TSSRouteFee) > 0 { - for _, e := range m.TSSRouteFee { - l = e.Size() - n += 1 + l + sovParams(uint64(l)) - } - } - if len(m.AxelarRouteFee) > 0 { - for _, e := range m.AxelarRouteFee { - l = e.Size() - n += 1 + l + sovParams(uint64(l)) - } - } return n } @@ -484,74 +412,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TSSRouteFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TSSRouteFee = append(m.TSSRouteFee, types.Coin{}) - if err := m.TSSRouteFee[len(m.TSSRouteFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AxelarRouteFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AxelarRouteFee = append(m.AxelarRouteFee, types.Coin{}) - if err := m.AxelarRouteFee[len(m.AxelarRouteFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 3c59691cb..1cc709d0a 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -29,7 +29,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Route is the type for a route type TSSRoute struct { - DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } @@ -82,7 +84,9 @@ func (m *TSSRoute) GetDestinationContractAddress() string { // AxelarRoute is the type for an Axelar route type AxelarRoute struct { - DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } @@ -135,8 +139,11 @@ func (m *AxelarRoute) GetDestinationContractAddress() string { // SignalInfo is the type for a signal info type SignalInfo struct { - SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // signal_id is the signal ID + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // soft_deviation_bps is the soft deviation in basis points SoftDeviationBPS uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` + // hard_deviation_bps is the hard deviation in basis points HardDeviationBPS uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` } @@ -196,16 +203,26 @@ func (m *SignalInfo) GetHardDeviationBPS() uint64 { // Tunnel is the type for a tunnel type Tunnel struct { - ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` - Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` - FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` - SignalInfos []SignalInfo `protobuf:"bytes,6,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` - Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` - IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - CreatedAt int64 `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` + // id is the tunnel ID + ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // nonce_count is representing the number of packets sent + NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` + // route is the route for delivering the signal prices + Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + // feed_type is the type of feed data + FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + // fee_payer is the address of the fee payer + FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + // signal_infos is the list of signal infos + SignalInfos []SignalInfo `protobuf:"bytes,6,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` + // interval is the interval for delivering the signal prices + Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` + // is_active is the flag to indicate if the tunnel is active + IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + // created_at is the timestamp when the tunnel is created + CreatedAt int64 `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // creator is the address of the creator + Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *Tunnel) Reset() { *m = Tunnel{} } @@ -313,9 +330,12 @@ func (m *Tunnel) GetCreator() string { // SignalPrices is the type for a list of signal prices with the last interval timestamp type SignalPricesInfo struct { - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` - LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` + // tunnel_id is the tunnel ID + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // signal_prices is the list of signal prices + SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` + // last_interval_timestamp is the timestamp of the last time that the packet is sent + LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` } func (m *SignalPricesInfo) Reset() { *m = SignalPricesInfo{} } @@ -374,9 +394,12 @@ func (m *SignalPricesInfo) GetLastIntervalTimestamp() int64 { // SignalPrice is the type for a signal price type SignalPrice struct { - SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // signal_id is the signal ID + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // price is the price of the signal + Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` + // timestamp is the timestamp of the signal + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } func (m *SignalPrice) Reset() { *m = SignalPrice{} } @@ -481,11 +504,16 @@ func (m *PendingTriggerTunnels) GetIDs() []uint64 { // Packet is the packet that tunnel produces type Packet struct { - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - SignalPrices []SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` - PacketContent *types.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` - CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // tunnel_id is the tunnel ID + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // nonce is the nonce of the packet + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // signal_prices is the list of signal prices + SignalPrices []SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` + // packet_content is the content of the packet that implements PacketContentI + PacketContent *types.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + // created_at is the timestamp when the packet is created + CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (m *Packet) Reset() { *m = Packet{} } @@ -558,9 +586,12 @@ func (m *Packet) GetCreatedAt() int64 { // TSSPacketContent is the packet content for TSS type TSSPacketContent struct { - SigningID github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" json:"signing_id,omitempty"` - DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + // signing_id is the signing ID + SigningID github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v2/x/bandtss/types.SigningID" json:"signing_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } @@ -619,8 +650,11 @@ func (m *TSSPacketContent) GetDestinationContractAddress() string { // AxelarPacketContent is the packet content for Axelar type AxelarPacketContent struct { - IBCQueueID uint64 `protobuf:"varint,1,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` - DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // ibc_queue_id is the IBC queue ID + IBCQueueID uint64 `protobuf:"varint,1,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } From ac2fff5fddaa7f8b42e1dfb5825b105876c7c2c0 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 29 Aug 2024 16:46:16 +0700 Subject: [PATCH 056/272] update params --- x/tunnel/types/params.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index cda3a48ae..4689203b5 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -13,8 +13,6 @@ var ( DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) DefaultMinDeviationBPS = uint64(100) DefaultBaseFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) - DefaultTSSRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) - DefaultAxelarRouteFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) ) // NewParams creates a new Params instance @@ -23,16 +21,12 @@ func NewParams( minDeviationBPS uint64, minInterval uint64, baseFee sdk.Coins, - tssRouteFee sdk.Coins, - axelarRouteFee sdk.Coins, ) Params { return Params{ MinDeposit: minDeposit, MinDeviationBPS: minDeviationBPS, MinInterval: minInterval, BaseFee: baseFee, - TSSRouteFee: tssRouteFee, - AxelarRouteFee: axelarRouteFee, } } @@ -43,8 +37,6 @@ func DefaultParams() Params { DefaultMinDeviationBPS, DefaultMinInterval, DefaultBaseFee, - DefaultTSSRouteFee, - DefaultAxelarRouteFee, ) } @@ -60,15 +52,6 @@ func (p Params) Validate() error { return err } - // Validate TSSRouteFee - if !p.TSSRouteFee.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf(p.TSSRouteFee.String()) - } - // Validate AxelarRouteFee - if !p.AxelarRouteFee.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf(p.AxelarRouteFee.String()) - } - return nil } From 08f25ac51db18c2493ef396eae182c56454a8bc5 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 29 Aug 2024 16:49:38 +0700 Subject: [PATCH 057/272] update tss func --- x/tunnel/testutil/mock_expected_keepers.go | 12 ++++++------ x/tunnel/types/expected_keepers.go | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go index 13ee12d90..f41c36b07 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -274,17 +274,17 @@ func (m *MockBandtssKeeper) EXPECT() *MockBandtssKeeperMockRecorder { return m.recorder } -// HandleCreateSigning mocks base method. -func (m *MockBandtssKeeper) HandleCreateSigning(ctx types2.Context, content types1.Content, sender types2.AccAddress, feeLimit types2.Coins) (types.SigningID, error) { +// CreateDirectSigningRequest mocks base method. +func (m *MockBandtssKeeper) CreateDirectSigningRequest(ctx types2.Context, content types1.Content, memo string, sender types2.AccAddress, feeLimit types2.Coins) (types.SigningID, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleCreateSigning", ctx, content, sender, feeLimit) + ret := m.ctrl.Call(m, "CreateDirectSigningRequest", ctx, content, memo, sender, feeLimit) ret0, _ := ret[0].(types.SigningID) ret1, _ := ret[1].(error) return ret0, ret1 } -// HandleCreateSigning indicates an expected call of HandleCreateSigning. -func (mr *MockBandtssKeeperMockRecorder) HandleCreateSigning(ctx, content, sender, feeLimit any) *gomock.Call { +// CreateDirectSigningRequest indicates an expected call of CreateDirectSigningRequest. +func (mr *MockBandtssKeeperMockRecorder) CreateDirectSigningRequest(ctx, content, memo, sender, feeLimit any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleCreateSigning", reflect.TypeOf((*MockBandtssKeeper)(nil).HandleCreateSigning), ctx, content, sender, feeLimit) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDirectSigningRequest", reflect.TypeOf((*MockBandtssKeeper)(nil).CreateDirectSigningRequest), ctx, content, memo, sender, feeLimit) } diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 3d6d8f0b3..942762c7e 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -44,9 +44,10 @@ type FeedsKeeper interface { } type BandtssKeeper interface { - HandleCreateSigning( + CreateDirectSigningRequest( ctx sdk.Context, content tsstypes.Content, + memo string, sender sdk.AccAddress, feeLimit sdk.Coins, ) (bandtsstypes.SigningID, error) From 4db1555db1283aa9b44ddda0a41e4eb0e5a39fe5 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 30 Aug 2024 20:06:58 +0700 Subject: [PATCH 058/272] add features inactive, update params and export genesis --- proto/tunnel/v1beta1/genesis.proto | 4 + proto/tunnel/v1beta1/params.proto | 6 +- proto/tunnel/v1beta1/tunnel.proto | 8 + proto/tunnel/v1beta1/tx.proto | 38 + x/tunnel/client/cli/tx.go | 27 + x/tunnel/genesis.go | 25 +- x/tunnel/keeper/msg_server.go | 108 ++- x/tunnel/keeper/signal_prices_info.go | 13 + x/tunnel/keeper/tunnel.go | 111 ++- x/tunnel/types/errors.go | 17 +- x/tunnel/types/events.go | 3 + x/tunnel/types/genesis.go | 12 +- x/tunnel/types/genesis.pb.go | 213 ++++- x/tunnel/types/keys.go | 8 +- x/tunnel/types/msgs.go | 108 +++ x/tunnel/types/params.go | 34 +- x/tunnel/types/params.pb.go | 87 +- x/tunnel/types/tunnel.pb.go | 411 +++++++-- x/tunnel/types/tx.pb.go | 1122 +++++++++++++++++++++---- 19 files changed, 2017 insertions(+), 338 deletions(-) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index ccf9382ee..8c0e0a1ad 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -15,4 +15,8 @@ message GenesisState { uint64 tunnel_count = 2; // tunnels is the list of tunnels. repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; + // active_tunnel_ids is the list of active tunnel IDs. + repeated uint64 active_tunnel_ids = 4 [(gogoproto.customname) = "ActiveTunnelIDs"]; + // signal_prices_infos is the signal prices info. + repeated SignalPricesInfo signal_prices_infos = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto index a2978f13e..078a53395 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/tunnel/v1beta1/params.proto @@ -14,10 +14,10 @@ message Params { // min_deposit is the minimum deposit required to create a tunnel repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - // min_deviation_bps is the minimum deviation in basis points - uint64 min_deviation_bps = 2 [(gogoproto.customname) = "MinDeviationBPS"]; // min_interval is the minimum interval in seconds - uint64 min_interval = 3; + uint64 min_interval = 2; + // max_signals defines the maximum number of signals allowed per tunnel. + uint64 max_signals = 3; // base_fee is the base fee for each tunnel repeated cosmos.base.v1beta1.Coin base_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 27fb147cf..ed9200ccc 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -68,6 +68,14 @@ message Tunnel { string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// ActiveTunnelIDs is the type for a list of active tunnel IDs +message ActiveTunnelIDs { + option (gogoproto.equal) = true; + + // IDs is the list of active tunnel IDs + repeated uint64 ids = 1 [(gogoproto.customname) = "IDs"]; +} + // SignalPrices is the type for a list of signal prices with the last interval timestamp message SignalPricesInfo { option (gogoproto.equal) = true; diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 609531caf..adb46b953 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -19,9 +19,15 @@ service Msg { // CreateTunnel is a RPC method to create a new tunnel. rpc CreateTunnel(MsgCreateTunnel) returns (MsgCreateTunnelResponse); + // EditTunnel is a RPC method to edit a tunnel. + rpc EditTunnel(MsgEditTunnel) returns (MsgEditTunnelResponse); + // ActivateTunnel is a RPC method to activate a tunnel. rpc ActivateTunnel(MsgActivateTunnel) returns (MsgActivateTunnelResponse); + // DeactivateTunnel is a RPC method to deactivate a tunnel. + rpc DeactivateTunnel(MsgDeactivateTunnel) returns (MsgDeactivateTunnelResponse); + // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. rpc ManualTriggerTunnel(MsgManualTriggerTunnel) returns (MsgManualTriggerTunnelResponse); @@ -49,6 +55,24 @@ message MsgCreateTunnel { string creator = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// MsgEditTunnel is the transaction message to edit a tunnel. +message MsgEditTunnel { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgEditTunnel"; + + // tunnel_id is the ID of the tunnel to edit. + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // signal_infos is the list of signal infos. + repeated SignalInfo signal_infos = 2 [(gogoproto.nullable) = false]; + // interval is the interval for delivering the signal prices. + uint64 interval = 3; + // creator is the address of the creator. + string creator = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. +message MsgEditTunnelResponse {} + // MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. message MsgCreateTunnelResponse { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; @@ -68,6 +92,20 @@ message MsgActivateTunnel { // MsgActivateTunnelResponse is the response type for the Msg/ActivateTunnel RPC method. message MsgActivateTunnelResponse {} +// MsgDeactivateTunnel is the transaction message to deactivate a tunnel. +message MsgDeactivateTunnel { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgDeactivateTunnel"; + + // tunnel_id is the ID of the tunnel to deactivate. + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // creator is the address of the creator. + string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgDeactivateTunnelResponse is the response type for the Msg/DeactivateTunnel RPC method. +message MsgDeactivateTunnelResponse {} + // MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. message MsgManualTriggerTunnel { option (cosmos.msg.v1.signer) = "creator"; diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 489c7cc3b..3f8ef6656 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -25,6 +25,7 @@ func GetTxCmd() *cobra.Command { txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) txCmd.AddCommand(GetTxCmdActivateTunnel()) + txCmd.AddCommand(GetTxCmdDeactivateTunnel()) txCmd.AddCommand(GetTxCmdManualTriggerTunnel()) return txCmd @@ -109,6 +110,32 @@ func GetTxCmdActivateTunnel() *cobra.Command { return cmd } +func GetTxCmdDeactivateTunnel() *cobra.Command { + cmd := &cobra.Command{ + Use: "deactivate-tunnel [tunnel-id]", + Short: "Deactivate a tunnel", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + msg := types.NewMsgDeactivateTunnel(id, clientCtx.GetFromAddress().String()) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + func GetTxCmdManualTriggerTunnel() *cobra.Command { cmd := &cobra.Command{ Use: "manual-trigger-tunnel [tunnel-id]", diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 37c0334d2..0ce41b2a4 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -11,7 +11,7 @@ import ( // ValidateGenesis validates the provided genesis state. func ValidateGenesis(data *types.GenesisState) error { - // Validate the tunnel count + // validate the tunnel count if uint64(len(data.Tunnels)) != data.TunnelCount { return types.ErrInvalidGenesis.Wrapf( "TunnelCount: %d, actual tunnels: %d", @@ -20,7 +20,7 @@ func ValidateGenesis(data *types.GenesisState) error { ) } - // Validate the tunnel IDs + // validate the tunnel IDs for _, tunnel := range data.Tunnels { if tunnel.ID > data.TunnelCount { return types.ErrInvalidGenesis.Wrapf( @@ -45,24 +45,35 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { if moduleAcc == nil { panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) } - // Set module account if its balance is zero + // set module account if its balance is zero if balance := k.GetModuleBalance(ctx); balance.IsZero() { k.SetModuleAccount(ctx, moduleAcc) } - // Set the tunnel count + // set the tunnel count k.SetTunnelCount(ctx, data.TunnelCount) + // set the tunnels for _, tunnel := range data.Tunnels { k.SetTunnel(ctx, tunnel) } + + // set the active tunnel IDs + k.SetActiveTunnelIDs(ctx, data.ActiveTunnelIDs) + + // set the signal prices infos + for _, signalPricesInfo := range data.SignalPricesInfos { + k.SetSignalPricesInfo(ctx, signalPricesInfo) + } } // ExportGenesis returns the module's exported genesis func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { return &types.GenesisState{ - Params: k.GetParams(ctx), - TunnelCount: k.GetTunnelCount(ctx), - Tunnels: k.GetTunnels(ctx), + Params: k.GetParams(ctx), + TunnelCount: k.GetTunnelCount(ctx), + Tunnels: k.GetTunnels(ctx), + ActiveTunnelIDs: k.MustGetActiveTunnelIDs(ctx), + SignalPricesInfos: k.GetSignalPricesInfos(ctx), } } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 037318ede..db586b22b 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -30,25 +30,26 @@ func (ms msgServer) CreateTunnel( // TODO: check deposit with params, transfer deposit to module account - var signalInfos []types.SignalInfo - for _, signalInfo := range req.SignalInfos { - signalInfos = append(signalInfos, types.SignalInfo{ - SignalID: signalInfo.SignalID, - SoftDeviationBPS: signalInfo.SoftDeviationBPS, - HardDeviationBPS: signalInfo.HardDeviationBPS, - }) + // validate signal infos and interval + params := ms.Keeper.GetParams(ctx) + if len(req.SignalInfos) > int(params.MaxSignals) { + return nil, types.ErrMaxSignalsExceeded + } + if req.Interval < params.MinInterval { + return nil, types.ErrMinIntervalExceeded } - tunnel, err := ms.Keeper.CreateTunnel(ctx, req.Route, req.FeedType, signalInfos, req.Interval, req.Creator) + // Add a new tunnel + tunnel, err := ms.Keeper.AddTunnel(ctx, req.Route, req.FeedType, req.SignalInfos, req.Interval, req.Creator) if err != nil { return nil, err } - ms.Keeper.SetTunnel(ctx, tunnel) // Emit an event event := sdk.NewEvent( types.EventTypeCreateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), sdk.NewAttribute(types.AttributeKeyRoute, tunnel.Route.String()), sdk.NewAttribute(types.AttributeKeyFeedType, tunnel.FeedType.String()), sdk.NewAttribute(types.AttributeKeyFeePayer, tunnel.FeePayer), @@ -68,6 +69,53 @@ func (ms msgServer) CreateTunnel( }, nil } +// EditTunnel edits a tunnel. +func (ms msgServer) EditTunnel( + goCtx context.Context, + req *types.MsgEditTunnel, +) (*types.MsgEditTunnelResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // validate signal infos and interval + params := ms.Keeper.GetParams(ctx) + if len(req.SignalInfos) > int(params.MaxSignals) { + return nil, types.ErrMaxSignalsExceeded + } + if req.Interval < params.MinInterval { + return nil, types.ErrMinIntervalExceeded + } + + tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) + if err != nil { + return nil, err + } + + if req.Creator != tunnel.Creator { + return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) + } + + err = ms.Keeper.EditTunnel(ctx, req.TunnelID, req.SignalInfos, req.Interval) + if err != nil { + return nil, err + } + + // Emit an event + event := sdk.NewEvent( + types.EventTypeEditTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), + sdk.NewAttribute(types.AttributeKeyCreator, req.Creator), + ) + for _, signalInfo := range req.SignalInfos { + event = event.AppendAttributes( + sdk.NewAttribute(types.AttributeKeySignalPriceInfos, signalInfo.String()), + ) + } + ctx.EventManager().EmitEvent(event) + + return &types.MsgEditTunnelResponse{}, nil +} + // ActivateTunnel activates a tunnel. func (ms msgServer) ActivateTunnel( goCtx context.Context, @@ -75,7 +123,16 @@ func (ms msgServer) ActivateTunnel( ) (*types.MsgActivateTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - err := ms.Keeper.ActivateTunnel(ctx, req.TunnelID, req.Creator) + tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) + if err != nil { + return nil, err + } + + if req.Creator != tunnel.Creator { + return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) + } + + err = ms.Keeper.ActivateTunnel(ctx, req.TunnelID) if err != nil { return nil, err } @@ -90,6 +147,37 @@ func (ms msgServer) ActivateTunnel( return &types.MsgActivateTunnelResponse{}, nil } +// DeactivateTunnel deactivates a tunnel. +func (ms msgServer) DeactivateTunnel( + goCtx context.Context, + req *types.MsgDeactivateTunnel, +) (*types.MsgDeactivateTunnelResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) + if err != nil { + return nil, err + } + + if req.Creator != tunnel.Creator { + return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) + } + + err = ms.Keeper.DeactivateTunnel(ctx, req.TunnelID) + if err != nil { + return nil, err + } + + // Emit an event + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeDeactivateTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), + sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", false)), + )) + + return &types.MsgDeactivateTunnelResponse{}, nil +} + // ManualTriggerTunnel manually triggers a tunnel. func (ms msgServer) ManualTriggerTunnel( goCtx context.Context, diff --git a/x/tunnel/keeper/signal_prices_info.go b/x/tunnel/keeper/signal_prices_info.go index f6641370f..e696a870a 100644 --- a/x/tunnel/keeper/signal_prices_info.go +++ b/x/tunnel/keeper/signal_prices_info.go @@ -23,3 +23,16 @@ func (k Keeper) GetSignalPricesInfo(ctx sdk.Context, tunnelID uint64) (types.Sig k.cdc.MustUnmarshal(bz, &signalPricesInfo) return signalPricesInfo, nil } + +// GetSignalPricesInfos gets all signal prices infos from the store +func (k Keeper) GetSignalPricesInfos(ctx sdk.Context) []types.SignalPricesInfo { + var signalPricesInfos []types.SignalPricesInfo + iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.SignalPricesInfoStoreKeyPrefix) + defer iterator.Close() + for ; iterator.Valid(); iterator.Next() { + var signalPricesInfo types.SignalPricesInfo + k.cdc.MustUnmarshal(iterator.Value(), &signalPricesInfo) + signalPricesInfos = append(signalPricesInfos, signalPricesInfo) + } + return signalPricesInfos +} diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index b7a6a2624..a75bb89be 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -10,8 +10,8 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// CreateTunnel creates a new tunnel -func (k Keeper) CreateTunnel( +// AddTunnel adds a new tunnel +func (k Keeper) AddTunnel( ctx sdk.Context, route *codectypes.Any, feedType feedsTypes.FeedType, @@ -28,17 +28,15 @@ func (k Keeper) CreateTunnel( return types.Tunnel{}, err } - // Set the new tunnel count - k.SetTunnelCount(ctx, newID) - // Set the signal prices info var signalPrices []types.SignalPrice - for _, sp := range signalInfos { - signalPrices = append(signalPrices, types.NewSignalPrice(sp.SignalID, 0, 0)) + for _, si := range signalInfos { + signalPrices = append(signalPrices, types.NewSignalPrice(si.SignalID, 0, 0)) } k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(newID, signalPrices, 0)) - return types.NewTunnel( + // Create a new tunnel + tunnel := types.NewTunnel( id, 0, route, @@ -49,7 +47,38 @@ func (k Keeper) CreateTunnel( false, ctx.BlockTime().Unix(), creator, - ), nil + ) + k.SetTunnel(ctx, tunnel) + k.SetTunnelCount(ctx, tunnel.ID) + + return tunnel, nil +} + +// EditTunnel edits a tunnel +func (k Keeper) EditTunnel( + ctx sdk.Context, + tunnelID uint64, + signalInfos []types.SignalInfo, + interval uint64, +) error { + tunnel, err := k.GetTunnel(ctx, tunnelID) + if err != nil { + return err + } + + // Edit the signal infos and interval + tunnel.SignalInfos = signalInfos + tunnel.Interval = interval + k.SetTunnel(ctx, tunnel) + + // Edit the signal prices info + var signalPrices []types.SignalPrice + for _, sp := range signalInfos { + signalPrices = append(signalPrices, types.NewSignalPrice(sp.SignalID, 0, 0)) + } + k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(tunnelID, signalPrices, 0)) + + return nil } // SetTunnelCount sets the tunnel count in the store @@ -119,18 +148,74 @@ func (k Keeper) GetTunnelsByActiveStatus(ctx sdk.Context, isActive bool) []types return tunnels } +// SetActiveTunnelIDs sets the active tunnel IDs in the store +func (k Keeper) SetActiveTunnelIDs(ctx sdk.Context, ids []uint64) { + ctx.KVStore(k.storeKey).Set(types.ActiveTunnelIDsStoreKey, k.cdc.MustMarshal(&types.ActiveTunnelIDs{IDs: ids})) +} + +// GetActiveTunnelIDs retrieves the active tunnel IDs from the store +func (k Keeper) GetActiveTunnelIDs(ctx sdk.Context) ([]uint64, error) { + bz := ctx.KVStore(k.storeKey).Get(types.ActiveTunnelIDsStoreKey) + if bz == nil { + return []uint64{}, types.ErrActiveTunnelIDsNotFound + } + var activeTunnelIDs types.ActiveTunnelIDs + k.cdc.MustUnmarshal(bz, &activeTunnelIDs) + return activeTunnelIDs.IDs, nil +} + +// MustGetActiveTunnelIDs retrieves the active tunnel IDs from the store and panics if the IDs do not exist +func (k Keeper) MustGetActiveTunnelIDs(ctx sdk.Context) []uint64 { + ids, err := k.GetActiveTunnelIDs(ctx) + if err != nil { + panic(err) + } + return ids +} + // ActivateTunnel activates a tunnel -func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64, creator string) error { +func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64) error { tunnel, err := k.GetTunnel(ctx, id) if err != nil { return err } + tunnel.IsActive = true - if tunnel.Creator != creator { - return fmt.Errorf("creator %s is not the creator of tunnel %d", creator, id) + // Add the tunnel ID to the active tunnel IDs + activeTunnelIDs, err := k.GetActiveTunnelIDs(ctx) + if err != nil { + return err } - tunnel.IsActive = true + activeTunnelIDs = append(activeTunnelIDs, id) + k.SetActiveTunnelIDs(ctx, activeTunnelIDs) + + // Set the last interval timestamp to the current block time + k.SetTunnel(ctx, tunnel) + return nil +} + +// DeactivateTunnel deactivates a tunnel +func (k Keeper) DeactivateTunnel(ctx sdk.Context, id uint64) error { + tunnel, err := k.GetTunnel(ctx, id) + if err != nil { + return err + } + tunnel.IsActive = false + + // Remove the tunnel ID from the active tunnel IDs + activeTunnelIDs, err := k.GetActiveTunnelIDs(ctx) + if err != nil { + return err + } + for i, activeID := range activeTunnelIDs { + if activeID == id { + activeTunnelIDs = append(activeTunnelIDs[:i], activeTunnelIDs[i+1:]...) + break + } + } + k.SetActiveTunnelIDs(ctx, activeTunnelIDs) + // Set the last interval timestamp to the current block time k.SetTunnel(ctx, tunnel) return nil } diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index e7e0aaf77..5e5f880bf 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -7,11 +7,14 @@ import ( // x/tunnel module sentinel errors var ( ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") - ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 3, "max tunnel channels") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 4, "tunnel not found") - ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 5, "signal prices info not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 6, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 7, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 8, "invalid creator of tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 9, "account already exist") + ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") + ErrMinIntervalExceeded = errorsmod.Register(ModuleName, 4, "min interval exceeded") + ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 5, "max tunnel channels") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 6, "tunnel not found") + ErrActiveTunnelIDsNotFound = errorsmod.Register(ModuleName, 7, "active tunnel IDs not found") + ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 8, "signal prices info not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 9, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 10, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 11, "invalid creator of tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 12, "account already exist") ) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index d5c9b210f..72b3b7681 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -4,7 +4,9 @@ package types const ( EventTypeUpdateParams = "update_params" EventTypeCreateTunnel = "create_tunnel" + EventTypeEditTunnel = "edit_tunnel" EventTypeActivateTunnel = "activate_tunnel" + EventTypeDeactivateTunnel = "deactivate_tunnel" EventTypeManualTriggerTunnel = "manual_trigger_tunnel" EventTypeSignalInfoNotFound = "signal_info_not_found" EventTypeProducePacketFail = "produce_packet_fail" @@ -13,6 +15,7 @@ const ( AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" AttributeKeySignalID = "signal_id" + AttributeKeyInterval = "interval" AttributeKeyRoute = "route" AttributeKeyFeedType = "feed_type" AttributeKeyFeePayer = "fee_payer" diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 42dae0037..96176e493 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -5,15 +5,19 @@ func NewGenesisState( params Params, tunnelCount uint64, tunnels []Tunnel, + activeTunnelIDs []uint64, + signalPricesInfos []SignalPricesInfo, ) *GenesisState { return &GenesisState{ - Params: params, - TunnelCount: tunnelCount, - Tunnels: tunnels, + Params: params, + TunnelCount: tunnelCount, + Tunnels: tunnels, + ActiveTunnelIDs: activeTunnelIDs, + SignalPricesInfos: signalPricesInfos, } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return NewGenesisState(DefaultParams(), 0, []Tunnel{}) + return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []uint64{}, []SignalPricesInfo{}) } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 260fa8790..7ace324a2 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -31,6 +31,10 @@ type GenesisState struct { TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` // tunnels is the list of tunnels. Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` + // active_tunnel_ids is the list of active tunnel IDs. + ActiveTunnelIDs []uint64 `protobuf:"varint,4,rep,packed,name=active_tunnel_ids,json=activeTunnelIds,proto3" json:"active_tunnel_ids,omitempty"` + // signal_prices_infos is the signal prices info. + SignalPricesInfos []SignalPricesInfo `protobuf:"bytes,5,rep,name=signal_prices_infos,json=signalPricesInfos,proto3" json:"signal_prices_infos"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -87,6 +91,20 @@ func (m *GenesisState) GetTunnels() []Tunnel { return nil } +func (m *GenesisState) GetActiveTunnelIDs() []uint64 { + if m != nil { + return m.ActiveTunnelIDs + } + return nil +} + +func (m *GenesisState) GetSignalPricesInfos() []SignalPricesInfo { + if m != nil { + return m.SignalPricesInfos + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "tunnel.v1beta1.GenesisState") } @@ -94,23 +112,29 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 252 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x29, 0xcd, 0xcb, - 0x4b, 0xcd, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, - 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xea, 0x41, 0x65, 0xa5, - 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x94, 0x34, 0x9a, 0x19, - 0x05, 0x89, 0x45, 0x89, 0xb9, 0xc5, 0x38, 0x24, 0xa1, 0x26, 0x82, 0x25, 0x95, 0xe6, 0x33, 0x72, - 0xf1, 0xb8, 0x43, 0x6c, 0x0c, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x32, 0xe1, 0x62, 0x83, 0xe8, 0x96, - 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd3, 0x43, 0x75, 0x81, 0x5e, 0x00, 0x58, 0xd6, 0x89, - 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xa8, 0x5a, 0x21, 0x45, 0x2e, 0x1e, 0x88, 0xb2, 0xf8, 0xe4, - 0xfc, 0xd2, 0xbc, 0x12, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x96, 0x20, 0x6e, 0x88, 0x98, 0x33, 0x48, - 0x48, 0xc8, 0x8c, 0x8b, 0x1d, 0xc2, 0x2d, 0x96, 0x60, 0x56, 0x60, 0xc6, 0x66, 0x72, 0x08, 0x98, - 0x0b, 0x35, 0x19, 0xa6, 0xd8, 0xc9, 0xf3, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, - 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, - 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x93, 0x12, 0xf3, - 0x52, 0xc0, 0x3e, 0x4a, 0xce, 0xcf, 0xd1, 0x4f, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0x33, 0xd2, - 0xaf, 0x80, 0x7a, 0x56, 0xbf, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xac, 0xc2, 0x18, 0x10, - 0x00, 0x00, 0xff, 0xff, 0x37, 0x22, 0xb5, 0x7f, 0x73, 0x01, 0x00, 0x00, + // 337 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4e, 0xc2, 0x40, + 0x14, 0x45, 0x5b, 0xa8, 0x98, 0x0c, 0x44, 0x42, 0x31, 0xa6, 0x41, 0x53, 0xaa, 0x2b, 0x56, 0x9d, +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0x6e, 0x3d, 0xdf, 0x34, 0xab, 0xb7, 0xca, 0xd4, 0xbb, 0xbd, + 0x7b, 0x18, 0x54, 0xc9, 0x4f, 0x61, 0x04, 0xee, 0x13, 0xaa, 0x03, 0x4b, 0x39, 0x99, 0x46, 0xd9, + 0x9c, 0x25, 0x14, 0x22, 0xc6, 0xc7, 0x02, 0xbc, 0x03, 0x55, 0x22, 0xd8, 0x2f, 0x31, 0x54, 0x68, + 0x5f, 0x91, 0x3d, 0x3e, 0x16, 0xa6, 0x4e, 0x0d, 0xf6, 0x74, 0xe8, 0xf6, 0x56, 0xb9, 0x6f, 0xaf, + 0x73, 0xdf, 0xfe, 0xcc, 0x7d, 0xfb, 0x6d, 0xeb, 0x5b, 0xeb, 0xad, 0x6f, 0x7d, 0x6c, 0x7d, 0xeb, + 0x19, 0xa7, 0x4c, 0x4e, 0x16, 0x71, 0x98, 0x88, 0x19, 0x8e, 0x09, 0x1f, 0xa9, 0x5f, 0x9d, 0x88, + 0x29, 0x4e, 0x26, 0x84, 0x71, 0xbc, 0xec, 0xe0, 0x17, 0xf3, 0x0a, 0x58, 0xbe, 0x66, 0x14, 0xe2, + 0x92, 0x22, 0x2e, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x33, 0x13, 0x0d, 0x0c, 0x02, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -133,6 +157,38 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.SignalPricesInfos) > 0 { + for iNdEx := len(m.SignalPricesInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignalPricesInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.ActiveTunnelIDs) > 0 { + dAtA2 := make([]byte, len(m.ActiveTunnelIDs)*10) + var j1 int + for _, num := range m.ActiveTunnelIDs { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintGenesis(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x22 + } if len(m.Tunnels) > 0 { for iNdEx := len(m.Tunnels) - 1; iNdEx >= 0; iNdEx-- { { @@ -193,6 +249,19 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.ActiveTunnelIDs) > 0 { + l = 0 + for _, e := range m.ActiveTunnelIDs { + l += sovGenesis(uint64(e)) + } + n += 1 + sovGenesis(uint64(l)) + l + } + if len(m.SignalPricesInfos) > 0 { + for _, e := range m.SignalPricesInfos { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -317,6 +386,116 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ActiveTunnelIDs = append(m.ActiveTunnelIDs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.ActiveTunnelIDs) == 0 { + m.ActiveTunnelIDs = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ActiveTunnelIDs = append(m.ActiveTunnelIDs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveTunnelIDs", wireType) + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalPricesInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignalPricesInfos = append(m.SignalPricesInfos, SignalPricesInfo{}) + if err := m.SignalPricesInfos[len(m.SignalPricesInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 0b99c3caf..c8feebcaa 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -28,11 +28,13 @@ const ( var ( TunnelCountStoreKey = []byte{0x00} - TunnelStoreKeyPrefix = []byte{0x11} + ActiveTunnelIDsStoreKey = []byte{0x01} - PacketStoreKeyPrefix = []byte{0x12} + TunnelStoreKeyPrefix = []byte{0x10} - SignalPricesInfoStoreKeyPrefix = []byte{0x13} + PacketStoreKeyPrefix = []byte{0x11} + + SignalPricesInfoStoreKeyPrefix = []byte{0x12} ParamsKey = []byte{0x90} ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 069cbc230..8ec0b4906 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -142,6 +142,17 @@ func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { + // creator address must be valid + if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) + } + + // signalInfos must not be empty + if len(m.SignalInfos) == 0 { + return sdkerrors.ErrInvalidRequest.Wrapf("signal infos cannot be empty") + } + + // route must be valid r, ok := m.Route.GetCachedValue().(RouteI) if !ok { return sdkerrors.ErrPackAny.Wrapf("cannot unpack route") @@ -149,6 +160,21 @@ func (m MsgCreateTunnel) ValidateBasic() error { if err := r.ValidateBasic(); err != nil { return err } + + // minimum deposit must be positive + if !m.Deposit.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf("invalid deposit: %s", m.Deposit) + } + + // signalIDs must be unique + signalIDMap := make(map[string]bool) + for _, signalInfo := range m.SignalInfos { + if _, ok := signalIDMap[signalInfo.SignalID]; ok { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalInfo.SignalID) + } + signalIDMap[signalInfo.SignalID] = true + } + return nil } @@ -179,9 +205,57 @@ func (m MsgCreateTunnel) GetTunnelRoute() RouteI { if !ok { return nil } + return route } +// NewMsgEditTunnel creates a new MsgEditTunnel instance. +func NewMsgEditTunnel( + tunnelID uint64, + signalInfos []SignalInfo, + interval uint64, + creator string, +) *MsgEditTunnel { + return &MsgEditTunnel{ + TunnelID: tunnelID, + SignalInfos: signalInfos, + Interval: interval, + Creator: creator, + } +} + +// Route Implements Msg. +func (m MsgEditTunnel) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgEditTunnel) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgEditTunnel) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgEditTunnel) ValidateBasic() error { + // creator address must be valid + if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) + } + + // signalIDs must be unique + signalIDMap := make(map[string]bool) + for _, signalInfo := range m.SignalInfos { + if _, ok := signalIDMap[signalInfo.SignalID]; ok { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalInfo.SignalID) + } + signalIDMap[signalInfo.SignalID] = true + } + + return nil +} + // NewMsgActivateTunnel creates a new MsgActivateTunnel instance. func NewMsgActivateTunnel( tunnelID uint64, @@ -215,6 +289,40 @@ func (m MsgActivateTunnel) ValidateBasic() error { return nil } +// NewMsgDeactivateTunnel creates a new MsgDeactivateTunnel instance. +func NewMsgDeactivateTunnel( + tunnelID uint64, + creator string, +) *MsgDeactivateTunnel { + return &MsgDeactivateTunnel{ + TunnelID: tunnelID, + Creator: creator, + } +} + +// Route Implements Msg. +func (m MsgDeactivateTunnel) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgDeactivateTunnel) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgDeactivateTunnel) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgDeactivateTunnel) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) + } + + return nil +} + +// NewMsgManualTriggerTunnel creates a new MsgManualTriggerTunnel instance. func NewMsgManualTriggerTunnel( tunnelID uint64, creator string, diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 4689203b5..7e4bff1d6 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -9,24 +9,24 @@ import ( ) var ( - DefaultMinInterval = uint64(1) - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) - DefaultMinDeviationBPS = uint64(100) - DefaultBaseFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) + DefaultMinInterval = uint64(1) + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) + DefaultMaxSignals = uint64(100) + DefaultBaseFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) ) // NewParams creates a new Params instance func NewParams( minDeposit sdk.Coins, - minDeviationBPS uint64, minInterval uint64, + maxSignals uint64, baseFee sdk.Coins, ) Params { return Params{ - MinDeposit: minDeposit, - MinDeviationBPS: minDeviationBPS, - MinInterval: minInterval, - BaseFee: baseFee, + MinDeposit: minDeposit, + MinInterval: minInterval, + MaxSignals: maxSignals, + BaseFee: baseFee, } } @@ -34,8 +34,8 @@ func NewParams( func DefaultParams() Params { return NewParams( DefaultMinDeposit, - DefaultMinDeviationBPS, DefaultMinInterval, + DefaultMaxSignals, DefaultBaseFee, ) } @@ -47,11 +47,21 @@ func (p Params) Validate() error { return sdkerrors.ErrInvalidCoins.Wrapf(p.MinDeposit.String()) } - // Validate MinDeviationBPS - if err := validateBasisPoint("min deviation BPS", p.MinDeviationBPS); err != nil { + // Validate MinInterval + if err := validateUint64("min interval", true)(p.MinInterval); err != nil { return err } + // Validate MaxSignals + if err := validateUint64("max signals", true)(p.MaxSignals); err != nil { + return err + } + + // Validate BaseFee + if !p.BaseFee.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf(p.BaseFee.String()) + } + return nil } diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 64f1ee620..61b9862a7 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -29,10 +29,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Params struct { // min_deposit is the minimum deposit required to create a tunnel MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` - // min_deviation_bps is the minimum deviation in basis points - MinDeviationBPS uint64 `protobuf:"varint,2,opt,name=min_deviation_bps,json=minDeviationBps,proto3" json:"min_deviation_bps,omitempty"` // min_interval is the minimum interval in seconds - MinInterval uint64 `protobuf:"varint,3,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` + MinInterval uint64 `protobuf:"varint,2,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` + // max_signals defines the maximum number of signals allowed per tunnel. + MaxSignals uint64 `protobuf:"varint,3,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` // base_fee is the base fee for each tunnel BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` } @@ -76,16 +76,16 @@ func (m *Params) GetMinDeposit() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -func (m *Params) GetMinDeviationBPS() uint64 { +func (m *Params) GetMinInterval() uint64 { if m != nil { - return m.MinDeviationBPS + return m.MinInterval } return 0 } -func (m *Params) GetMinInterval() uint64 { +func (m *Params) GetMaxSignals() uint64 { if m != nil { - return m.MinInterval + return m.MaxSignals } return 0 } @@ -104,29 +104,28 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/params.proto", fileDescriptor_a7b5eedd244355eb) } var fileDescriptor_a7b5eedd244355eb = []byte{ - // 343 bytes of a gzipped FileDescriptorProto + // 324 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xb1, 0x4e, 0x02, 0x31, - 0x18, 0xc7, 0xef, 0x80, 0x20, 0x29, 0x46, 0xe2, 0xe9, 0x70, 0x62, 0xd2, 0x43, 0x27, 0x16, 0xaf, - 0x82, 0x9b, 0x8b, 0xc9, 0x69, 0x4c, 0x18, 0x4c, 0x08, 0x6e, 0x2e, 0xa4, 0x77, 0x14, 0x68, 0xbc, - 0x6b, 0x2f, 0xb4, 0x5c, 0xf4, 0x2d, 0x1c, 0x1d, 0x99, 0x7d, 0x12, 0x06, 0x07, 0x46, 0x27, 0x34, - 0xc7, 0xe2, 0x63, 0x98, 0xb6, 0xa7, 0xe1, 0x01, 0x9c, 0xda, 0x7c, 0xff, 0xff, 0xf7, 0xfb, 0xf7, - 0xeb, 0x07, 0x8e, 0xe5, 0x9c, 0x31, 0x12, 0xa3, 0xac, 0x13, 0x12, 0x89, 0x3b, 0x28, 0xc5, 0x33, - 0x9c, 0x08, 0x3f, 0x9d, 0x71, 0xc9, 0x9d, 0x3d, 0x23, 0xfa, 0x85, 0xd8, 0x3c, 0x9c, 0xf0, 0x09, - 0xd7, 0x12, 0x52, 0x37, 0xe3, 0x6a, 0xc2, 0x88, 0x8b, 0x84, 0x0b, 0x14, 0x62, 0x41, 0xfe, 0x38, - 0x11, 0xa7, 0xcc, 0xe8, 0xa7, 0xef, 0x25, 0x50, 0xed, 0x6b, 0xac, 0x13, 0x83, 0x7a, 0x42, 0xd9, - 0x70, 0x44, 0x52, 0x2e, 0xa8, 0x74, 0xed, 0x56, 0xb9, 0x5d, 0xef, 0x1e, 0xf9, 0x06, 0xe0, 0x2b, - 0xc0, 0x6f, 0x96, 0x7f, 0xcd, 0x29, 0x0b, 0xce, 0x97, 0x6b, 0xcf, 0x7a, 0xfb, 0xf4, 0xda, 0x13, - 0x2a, 0xa7, 0xf3, 0xd0, 0x8f, 0x78, 0x82, 0x8a, 0x34, 0x73, 0x9c, 0x89, 0xd1, 0x23, 0x92, 0xcf, - 0x29, 0x11, 0xba, 0x41, 0x0c, 0x40, 0x42, 0xd9, 0x8d, 0xc1, 0x3b, 0x57, 0x60, 0xdf, 0xa4, 0x65, - 0x14, 0x4b, 0xca, 0xd9, 0x30, 0x4c, 0x85, 0x5b, 0x6a, 0xd9, 0xed, 0x4a, 0x70, 0x90, 0xaf, 0xbd, - 0xc6, 0x9d, 0xb2, 0x16, 0x5a, 0xd0, 0xbf, 0x1f, 0x34, 0x92, 0xed, 0x42, 0x2a, 0x9c, 0x13, 0xb0, - 0xab, 0x00, 0x94, 0x49, 0x32, 0xcb, 0x70, 0xec, 0x96, 0x55, 0xef, 0x40, 0x8d, 0xd0, 0x2b, 0x4a, - 0xce, 0x18, 0xd4, 0xd4, 0xb3, 0x87, 0x63, 0x42, 0xdc, 0xca, 0xff, 0x8f, 0xb3, 0xa3, 0x20, 0xb7, - 0x84, 0x5c, 0xd6, 0x5e, 0x17, 0x9e, 0xf5, 0xbd, 0xf0, 0xec, 0xa0, 0xb7, 0xcc, 0xa1, 0xbd, 0xca, - 0xa1, 0xfd, 0x95, 0x43, 0xfb, 0x65, 0x03, 0xad, 0xd5, 0x06, 0x5a, 0x1f, 0x1b, 0x68, 0x3d, 0xa0, - 0x2d, 0x6c, 0x88, 0xd9, 0x48, 0x7f, 0x7f, 0xc4, 0x63, 0x14, 0x4d, 0x31, 0x65, 0x28, 0xeb, 0xa2, - 0x27, 0x54, 0xac, 0x5b, 0x67, 0x84, 0x55, 0xed, 0xb8, 0xf8, 0x09, 0x00, 0x00, 0xff, 0xff, 0x2a, - 0x67, 0x59, 0x50, 0x05, 0x02, 0x00, 0x00, + 0x1c, 0xc6, 0xaf, 0x40, 0x90, 0x14, 0xe3, 0x70, 0x71, 0x38, 0x31, 0xe9, 0xa1, 0x13, 0x8b, 0xad, + 0xe0, 0xe6, 0x88, 0xc6, 0x84, 0xcd, 0xe0, 0xe6, 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, + 0xcd, 0x33, 0x49, 0x73, 0x1d, 0x55, 0x9d, 0x03, 0x0a, 0xba, 0xbc, 0xf3, 0x93, 0x70, 0x02, 0x1b, + 0xb6, 0xd6, 0x68, 0xc2, 0x58, 0x54, 0xfb, 0xff, 0xba, 0x7b, 0x16, 0x72, 0xc3, 0xd8, 0x65, 0xe3, + 0x79, 0x15, 0x07, 0x5f, 0xab, 0x18, 0xf4, 0x07, 0xeb, 0x2d, 0x02, 0x9b, 0x2d, 0x02, 0x9f, 0x5b, + 0x04, 0x9e, 0x76, 0x28, 0xd8, 0xec, 0x50, 0xf0, 0xb6, 0x43, 0xc1, 0x3d, 0xf9, 0x83, 0x4d, 0xa8, + 0x1c, 0xbb, 0xef, 0x4d, 0x55, 0x4e, 0xd2, 0x29, 0xe5, 0x92, 0x2c, 0x7a, 0x64, 0x49, 0xca, 0x75, + 0xba, 0x8c, 0xa4, 0xee, 0x1c, 0x17, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x09, 0x5d, 0x1b, 0xe4, + 0xe5, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -156,10 +155,10 @@ func (this *Params) Equal(that interface{}) bool { return false } } - if this.MinDeviationBPS != that1.MinDeviationBPS { + if this.MinInterval != that1.MinInterval { return false } - if this.MinInterval != that1.MinInterval { + if this.MaxSignals != that1.MaxSignals { return false } if len(this.BaseFee) != len(that1.BaseFee) { @@ -206,13 +205,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - if m.MinInterval != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MinInterval)) + if m.MaxSignals != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxSignals)) i-- dAtA[i] = 0x18 } - if m.MinDeviationBPS != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MinDeviationBPS)) + if m.MinInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MinInterval)) i-- dAtA[i] = 0x10 } @@ -256,12 +255,12 @@ func (m *Params) Size() (n int) { n += 1 + l + sovParams(uint64(l)) } } - if m.MinDeviationBPS != 0 { - n += 1 + sovParams(uint64(m.MinDeviationBPS)) - } if m.MinInterval != 0 { n += 1 + sovParams(uint64(m.MinInterval)) } + if m.MaxSignals != 0 { + n += 1 + sovParams(uint64(m.MaxSignals)) + } if len(m.BaseFee) > 0 { for _, e := range m.BaseFee { l = e.Size() @@ -342,9 +341,9 @@ func (m *Params) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinDeviationBPS", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MinInterval", wireType) } - m.MinDeviationBPS = 0 + m.MinInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams @@ -354,16 +353,16 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MinDeviationBPS |= uint64(b&0x7F) << shift + m.MinInterval |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinInterval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaxSignals", wireType) } - m.MinInterval = 0 + m.MaxSignals = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams @@ -373,7 +372,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MinInterval |= uint64(b&0x7F) << shift + m.MaxSignals |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 1cc709d0a..f4d4b5b91 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -328,6 +328,52 @@ func (m *Tunnel) GetCreator() string { return "" } +// ActiveTunnelIDs is the type for a list of active tunnel IDs +type ActiveTunnelIDs struct { + // IDs is the list of active tunnel IDs + IDs []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` +} + +func (m *ActiveTunnelIDs) Reset() { *m = ActiveTunnelIDs{} } +func (m *ActiveTunnelIDs) String() string { return proto.CompactTextString(m) } +func (*ActiveTunnelIDs) ProtoMessage() {} +func (*ActiveTunnelIDs) Descriptor() ([]byte, []int) { + return fileDescriptor_b5270a56045f1d8a, []int{4} +} +func (m *ActiveTunnelIDs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ActiveTunnelIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ActiveTunnelIDs.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 *ActiveTunnelIDs) XXX_Merge(src proto.Message) { + xxx_messageInfo_ActiveTunnelIDs.Merge(m, src) +} +func (m *ActiveTunnelIDs) XXX_Size() int { + return m.Size() +} +func (m *ActiveTunnelIDs) XXX_DiscardUnknown() { + xxx_messageInfo_ActiveTunnelIDs.DiscardUnknown(m) +} + +var xxx_messageInfo_ActiveTunnelIDs proto.InternalMessageInfo + +func (m *ActiveTunnelIDs) GetIDs() []uint64 { + if m != nil { + return m.IDs + } + return nil +} + // SignalPrices is the type for a list of signal prices with the last interval timestamp type SignalPricesInfo struct { // tunnel_id is the tunnel ID @@ -342,7 +388,7 @@ func (m *SignalPricesInfo) Reset() { *m = SignalPricesInfo{} } func (m *SignalPricesInfo) String() string { return proto.CompactTextString(m) } func (*SignalPricesInfo) ProtoMessage() {} func (*SignalPricesInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{4} + return fileDescriptor_b5270a56045f1d8a, []int{5} } func (m *SignalPricesInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -406,7 +452,7 @@ func (m *SignalPrice) Reset() { *m = SignalPrice{} } func (m *SignalPrice) String() string { return proto.CompactTextString(m) } func (*SignalPrice) ProtoMessage() {} func (*SignalPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{5} + return fileDescriptor_b5270a56045f1d8a, []int{6} } func (m *SignalPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,7 +512,7 @@ func (m *PendingTriggerTunnels) Reset() { *m = PendingTriggerTunnels{} } func (m *PendingTriggerTunnels) String() string { return proto.CompactTextString(m) } func (*PendingTriggerTunnels) ProtoMessage() {} func (*PendingTriggerTunnels) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{6} + return fileDescriptor_b5270a56045f1d8a, []int{7} } func (m *PendingTriggerTunnels) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -520,7 +566,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{7} + return fileDescriptor_b5270a56045f1d8a, []int{8} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -598,7 +644,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{8} + return fileDescriptor_b5270a56045f1d8a, []int{9} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +708,7 @@ func (m *AxelarPacketContent) Reset() { *m = AxelarPacketContent{} } func (m *AxelarPacketContent) String() string { return proto.CompactTextString(m) } func (*AxelarPacketContent) ProtoMessage() {} func (*AxelarPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{9} + return fileDescriptor_b5270a56045f1d8a, []int{10} } func (m *AxelarPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -717,6 +763,7 @@ func init() { proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") + proto.RegisterType((*ActiveTunnelIDs)(nil), "tunnel.v1beta1.ActiveTunnelIDs") proto.RegisterType((*SignalPricesInfo)(nil), "tunnel.v1beta1.SignalPricesInfo") proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") proto.RegisterType((*PendingTriggerTunnels)(nil), "tunnel.v1beta1.PendingTriggerTunnels") @@ -728,68 +775,68 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 961 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x8e, 0x63, 0x3f, 0xa7, 0x51, 0x34, 0xb8, 0xed, 0x36, 0x29, 0x5e, 0xcb, 0x27, - 0x73, 0xc8, 0x2e, 0x35, 0xd0, 0x43, 0x4e, 0x64, 0x63, 0x55, 0x5d, 0x21, 0x44, 0x58, 0xfb, 0xc4, - 0x65, 0xb5, 0xde, 0x1d, 0x6f, 0x06, 0x9c, 0x99, 0x65, 0x67, 0x1c, 0x35, 0x47, 0xbe, 0x01, 0x9f, - 0x00, 0x21, 0x24, 0x24, 0x3e, 0x40, 0xae, 0x9c, 0x10, 0x52, 0xd5, 0x53, 0xc5, 0x89, 0x93, 0x85, - 0x36, 0x07, 0xf8, 0x0c, 0x9c, 0xd0, 0xce, 0xcc, 0xc6, 0xb1, 0x69, 0x55, 0x8a, 0x7a, 0xe8, 0x6d, - 0xdf, 0x9f, 0x79, 0xef, 0x37, 0xbf, 0xf7, 0x9b, 0x99, 0x85, 0x7d, 0x31, 0xa7, 0x14, 0xcf, 0x9c, - 0xf3, 0x07, 0x13, 0x2c, 0xc2, 0x07, 0x8e, 0x32, 0xed, 0x34, 0x63, 0x82, 0xa1, 0x1d, 0x6d, 0xe9, - 0xe0, 0x5e, 0x3b, 0x61, 0x09, 0x93, 0x21, 0xa7, 0xf8, 0x52, 0x59, 0x7b, 0xf7, 0x12, 0xc6, 0x92, - 0x19, 0x76, 0xa4, 0x35, 0x99, 0x4f, 0x9d, 0x90, 0x5e, 0x94, 0xa1, 0x88, 0xf1, 0x33, 0xc6, 0x03, - 0xb5, 0x46, 0x19, 0x65, 0x68, 0x8a, 0x71, 0xcc, 0xaf, 0xfb, 0x4a, 0x4b, 0x85, 0x7a, 0x3f, 0x18, - 0xd0, 0x18, 0x8f, 0x46, 0x3e, 0x9b, 0x0b, 0x8c, 0x1e, 0x43, 0x3b, 0xc6, 0x5c, 0x10, 0x1a, 0x0a, - 0xc2, 0x68, 0x10, 0x9d, 0x86, 0x84, 0x06, 0x24, 0x36, 0x8d, 0xae, 0xd1, 0x6f, 0xba, 0x77, 0xf2, - 0x85, 0x85, 0x86, 0xcb, 0xf8, 0x71, 0x11, 0xf6, 0x86, 0x3e, 0x8a, 0xd7, 0x7d, 0x31, 0xfa, 0x18, - 0xee, 0xaf, 0x54, 0x62, 0x54, 0x64, 0x61, 0x24, 0x82, 0x30, 0x8e, 0x33, 0xcc, 0xb9, 0x59, 0x29, - 0x2a, 0xfa, 0x7b, 0x37, 0x57, 0xea, 0x94, 0x23, 0x95, 0x71, 0x08, 0xcf, 0x2e, 0x0f, 0xea, 0x12, - 0x96, 0xd7, 0xfb, 0xd1, 0x80, 0xd6, 0xd1, 0x13, 0x3c, 0x0b, 0xb3, 0xb7, 0x1b, 0xe7, 0xaf, 0x06, - 0xc0, 0x88, 0x24, 0x34, 0x9c, 0x79, 0x74, 0xca, 0xd0, 0x7b, 0xd0, 0xe4, 0xd2, 0x5a, 0x62, 0xdb, - 0xce, 0x17, 0x56, 0x43, 0xa7, 0x0c, 0xfd, 0x86, 0x0a, 0x7b, 0x31, 0x72, 0x01, 0x71, 0x36, 0x15, - 0x41, 0x8c, 0xcf, 0x89, 0x82, 0x32, 0x49, 0x55, 0xf7, 0x9a, 0xdb, 0xce, 0x17, 0xd6, 0xee, 0x88, - 0x4d, 0xc5, 0xb0, 0x0c, 0xba, 0x27, 0x23, 0x7f, 0x97, 0xaf, 0x78, 0x52, 0x5e, 0xd4, 0x38, 0x0d, - 0xb3, 0x78, 0xad, 0x46, 0x75, 0x59, 0xe3, 0x71, 0x98, 0xc5, 0xab, 0x35, 0x4e, 0x57, 0x3c, 0x29, - 0x3f, 0xac, 0xfd, 0xf5, 0xbd, 0x65, 0xf4, 0x7e, 0xae, 0x42, 0x7d, 0x2c, 0xe5, 0x88, 0xee, 0x40, - 0x45, 0x83, 0xaf, 0xb9, 0xf5, 0x7c, 0x61, 0x55, 0xbc, 0xa1, 0x5f, 0x21, 0x31, 0xb2, 0xa0, 0x45, - 0x19, 0x8d, 0x70, 0x10, 0xb1, 0x39, 0x15, 0x0a, 0xa9, 0x0f, 0xd2, 0x75, 0x5c, 0x78, 0xd0, 0x43, - 0xd8, 0xcc, 0x0a, 0x56, 0x24, 0x80, 0xd6, 0xa0, 0x6d, 0x2b, 0xe5, 0xda, 0xa5, 0x72, 0xed, 0x23, - 0x7a, 0xe1, 0xde, 0x20, 0xcf, 0x57, 0xe9, 0xe8, 0x43, 0x68, 0x16, 0xfa, 0x0c, 0xc4, 0x45, 0x8a, + // 973 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xce, 0xda, 0x8e, 0x63, 0xbf, 0x4e, 0xf3, 0x8b, 0xe6, 0xe7, 0xb6, 0xdb, 0xa4, 0x78, 0x2d, + 0x9f, 0xcc, 0x21, 0xbb, 0xd4, 0x40, 0x0f, 0x39, 0x91, 0x8d, 0x55, 0x75, 0x85, 0x10, 0x61, 0xed, + 0x13, 0x97, 0xd5, 0x7a, 0x77, 0xbc, 0x19, 0x70, 0x66, 0x96, 0x9d, 0x71, 0xd4, 0x1c, 0xf9, 0x06, + 0x7c, 0x02, 0x84, 0x90, 0x90, 0xf8, 0x00, 0xb9, 0x72, 0x42, 0x48, 0x55, 0x4f, 0x15, 0x27, 0x4e, + 0x16, 0xda, 0x1c, 0xe0, 0x33, 0x70, 0x42, 0x3b, 0x33, 0x6b, 0xc7, 0xa1, 0xa5, 0x14, 0x71, 0xe8, + 0x6d, 0xdf, 0xf7, 0x79, 0xff, 0xcd, 0xf3, 0x3e, 0xe3, 0x31, 0xec, 0x8b, 0x39, 0xa5, 0x78, 0xe6, + 0x9c, 0x3f, 0x98, 0x60, 0x11, 0x3e, 0x70, 0x94, 0x69, 0xa7, 0x19, 0x13, 0x0c, 0xed, 0x68, 0x4b, + 0x83, 0x7b, 0xed, 0x84, 0x25, 0x4c, 0x42, 0x4e, 0xf1, 0xa5, 0xa2, 0xf6, 0xee, 0x25, 0x8c, 0x25, + 0x33, 0xec, 0x48, 0x6b, 0x32, 0x9f, 0x3a, 0x21, 0xbd, 0x28, 0xa1, 0x88, 0xf1, 0x33, 0xc6, 0x03, + 0x95, 0xa3, 0x8c, 0x12, 0x9a, 0x62, 0x1c, 0xf3, 0x65, 0x5f, 0x69, 0x29, 0xa8, 0xf7, 0xad, 0x01, + 0x8d, 0xf1, 0x68, 0xe4, 0xb3, 0xb9, 0xc0, 0xe8, 0x31, 0xb4, 0x63, 0xcc, 0x05, 0xa1, 0xa1, 0x20, + 0x8c, 0x06, 0xd1, 0x69, 0x48, 0x68, 0x40, 0x62, 0xd3, 0xe8, 0x1a, 0xfd, 0xa6, 0x7b, 0x27, 0x5f, + 0x58, 0x68, 0xb8, 0xc2, 0x8f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c, 0xfa, 0x37, 0x49, 0x4e, 0x7b, 0x52, - 0x97, 0x19, 0x1f, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xb5, 0xed, 0x5c, 0x3d, 0x09, 0x00, - 0x00, + 0xf1, 0x45, 0x8a, 0xfd, 0xc6, 0x54, 0x7f, 0xa1, 0xf7, 0x65, 0x56, 0x90, 0x86, 0x17, 0x38, 0x33, + 0x37, 0x25, 0xd5, 0xe6, 0xcf, 0x97, 0x07, 0x6d, 0x7d, 0x0d, 0xf4, 0xb2, 0x46, 0x22, 0x23, 0x34, + 0x91, 0x69, 0x27, 0x45, 0x24, 0x3a, 0x86, 0xed, 0x72, 0x43, 0x74, 0xca, 0xb8, 0x59, 0xef, 0x56, + 0xfb, 0xad, 0xc1, 0x9e, 0xbd, 0x7e, 0x17, 0xed, 0xd5, 0x4e, 0xdd, 0xda, 0xd3, 0x85, 0xb5, 0xe1, + 0xb7, 0xf8, 0xd2, 0xc3, 0xd1, 0x1e, 0x34, 0x08, 0x15, 0x38, 0x3b, 0x0f, 0x67, 0xe6, 0x96, 0xe4, + 0x61, 0x69, 0xa3, 0x7d, 0x68, 0x12, 0x1e, 0x84, 0x91, 0x20, 0xe7, 0xd8, 0x6c, 0x74, 0x8d, 0x7e, + 0xc3, 0x6f, 0x10, 0x7e, 0x24, 0x6d, 0xf4, 0x16, 0x40, 0x94, 0xe1, 0x50, 0xe0, 0x38, 0x08, 0x85, + 0xd9, 0xec, 0x1a, 0xfd, 0xaa, 0xdf, 0xd4, 0x9e, 0x23, 0x81, 0x06, 0xb0, 0x25, 0x0d, 0x96, 0x99, + 0xf0, 0x8a, 0x13, 0x95, 0x81, 0x7a, 0x7f, 0x03, 0xf8, 0x9f, 0x6a, 0xa1, 0x96, 0xe8, 0x0d, 0x39, + 0xba, 0x07, 0x55, 0x12, 0x73, 0xd3, 0xe8, 0x56, 0xfb, 0x35, 0x77, 0x2b, 0x5f, 0x58, 0x55, 0x6f, + 0xc8, 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0x7b, 0x5f, 0x57, 0x60, 0x77, 0x3c, 0x1a, 0xad, + 0xd5, 0x40, 0x9f, 0x01, 0x14, 0x43, 0x11, 0x9a, 0xac, 0xe8, 0xf8, 0x30, 0x5f, 0x58, 0xcd, 0x91, + 0xf2, 0x7a, 0xc3, 0x3f, 0x16, 0xd6, 0x61, 0x42, 0xc4, 0xe9, 0x7c, 0x62, 0x47, 0xec, 0xcc, 0x99, + 0x84, 0x34, 0x96, 0x83, 0x45, 0x6c, 0xe6, 0xc8, 0x97, 0xc0, 0x39, 0x1f, 0x38, 0x4f, 0xa4, 0x5f, + 0x70, 0xee, 0x14, 0xbf, 0x23, 0xdc, 0x5e, 0x66, 0xfb, 0x4d, 0x5d, 0xde, 0x8b, 0x5f, 0xfa, 0x8c, + 0x54, 0xfe, 0xf3, 0x67, 0xa4, 0xfa, 0xca, 0x67, 0xe4, 0x05, 0x74, 0xf6, 0x7e, 0x33, 0xe0, 0xff, + 0xea, 0xd9, 0x5b, 0xe7, 0xe8, 0x1d, 0xd8, 0x26, 0x93, 0x28, 0xf8, 0x62, 0x8e, 0xe7, 0x78, 0xc5, + 0xd2, 0x4e, 0xbe, 0xb0, 0xc0, 0x73, 0x8f, 0x3f, 0x29, 0xdc, 0xde, 0xd0, 0x07, 0x32, 0x89, 0xd4, + 0xf7, 0x1b, 0x7f, 0x52, 0xf7, 0xa3, 0xef, 0xf3, 0x8e, 0xf1, 0x34, 0xef, 0x18, 0xcf, 0xf3, 0x8e, + 0xf1, 0x6b, 0xde, 0x31, 0xbe, 0xba, 0xea, 0x6c, 0x3c, 0xbf, 0xea, 0x6c, 0xfc, 0x72, 0xd5, 0xd9, + 0xf8, 0xd4, 0xf9, 0x07, 0xeb, 0xd6, 0x7f, 0xad, 0xe4, 0xb6, 0x27, 0x75, 0x19, 0xf1, 0xee, 0x9f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x63, 0xcc, 0x57, 0x71, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -932,6 +979,35 @@ func (this *Tunnel) Equal(that interface{}) bool { } return true } +func (this *ActiveTunnelIDs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ActiveTunnelIDs) + if !ok { + that2, ok := that.(ActiveTunnelIDs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.IDs) != len(that1.IDs) { + return false + } + for i := range this.IDs { + if this.IDs[i] != that1.IDs[i] { + return false + } + } + return true +} func (this *SignalPricesInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1339,6 +1415,47 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ActiveTunnelIDs) 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 *ActiveTunnelIDs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ActiveTunnelIDs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.IDs) > 0 { + dAtA3 := make([]byte, len(m.IDs)*10) + var j2 int + for _, num := range m.IDs { + for num >= 1<<7 { + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j2++ + } + dAtA3[j2] = uint8(num) + j2++ + } + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintTunnel(dAtA, i, uint64(j2)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *SignalPricesInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1447,20 +1564,20 @@ func (m *PendingTriggerTunnels) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.IDs) > 0 { - dAtA3 := make([]byte, len(m.IDs)*10) - var j2 int + dAtA5 := make([]byte, len(m.IDs)*10) + var j4 int for _, num := range m.IDs { for num >= 1<<7 { - dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j2++ + j4++ } - dAtA3[j2] = uint8(num) - j2++ + dAtA5[j4] = uint8(num) + j4++ } - i -= j2 - copy(dAtA[i:], dAtA3[:j2]) - i = encodeVarintTunnel(dAtA, i, uint64(j2)) + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintTunnel(dAtA, i, uint64(j4)) i-- dAtA[i] = 0xa } @@ -1724,6 +1841,22 @@ func (m *Tunnel) Size() (n int) { return n } +func (m *ActiveTunnelIDs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.IDs) > 0 { + l = 0 + for _, e := range m.IDs { + l += sovTunnel(uint64(e)) + } + n += 1 + sovTunnel(uint64(l)) + l + } + return n +} + func (m *SignalPricesInfo) Size() (n int) { if m == nil { return 0 @@ -2501,6 +2634,132 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } return nil } +func (m *ActiveTunnelIDs) 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 ErrIntOverflowTunnel + } + 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: ActiveTunnelIDs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ActiveTunnelIDs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IDs = append(m.IDs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.IDs) == 0 { + m.IDs = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IDs = append(m.IDs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field IDs", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTunnel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTunnel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SignalPricesInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 5dc64ada5..e01e13f13 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -126,6 +126,116 @@ func (m *MsgCreateTunnel) GetCreator() string { return "" } +// MsgEditTunnel is the transaction message to edit a tunnel. +type MsgEditTunnel struct { + // tunnel_id is the ID of the tunnel to edit. + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // signal_infos is the list of signal infos. + SignalInfos []SignalInfo `protobuf:"bytes,2,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` + // interval is the interval for delivering the signal prices. + Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *MsgEditTunnel) Reset() { *m = MsgEditTunnel{} } +func (m *MsgEditTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgEditTunnel) ProtoMessage() {} +func (*MsgEditTunnel) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{1} +} +func (m *MsgEditTunnel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEditTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEditTunnel.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 *MsgEditTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEditTunnel.Merge(m, src) +} +func (m *MsgEditTunnel) XXX_Size() int { + return m.Size() +} +func (m *MsgEditTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEditTunnel.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEditTunnel proto.InternalMessageInfo + +func (m *MsgEditTunnel) GetTunnelID() uint64 { + if m != nil { + return m.TunnelID + } + return 0 +} + +func (m *MsgEditTunnel) GetSignalInfos() []SignalInfo { + if m != nil { + return m.SignalInfos + } + return nil +} + +func (m *MsgEditTunnel) GetInterval() uint64 { + if m != nil { + return m.Interval + } + return 0 +} + +func (m *MsgEditTunnel) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +// MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. +type MsgEditTunnelResponse struct { +} + +func (m *MsgEditTunnelResponse) Reset() { *m = MsgEditTunnelResponse{} } +func (m *MsgEditTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEditTunnelResponse) ProtoMessage() {} +func (*MsgEditTunnelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{2} +} +func (m *MsgEditTunnelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEditTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEditTunnelResponse.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 *MsgEditTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEditTunnelResponse.Merge(m, src) +} +func (m *MsgEditTunnelResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEditTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEditTunnelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEditTunnelResponse proto.InternalMessageInfo + // MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. type MsgCreateTunnelResponse struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` @@ -135,7 +245,7 @@ func (m *MsgCreateTunnelResponse) Reset() { *m = MsgCreateTunnelResponse func (m *MsgCreateTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreateTunnelResponse) ProtoMessage() {} func (*MsgCreateTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{1} + return fileDescriptor_747f2bf21e50fad9, []int{3} } func (m *MsgCreateTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,7 +293,7 @@ func (m *MsgActivateTunnel) Reset() { *m = MsgActivateTunnel{} } func (m *MsgActivateTunnel) String() string { return proto.CompactTextString(m) } func (*MsgActivateTunnel) ProtoMessage() {} func (*MsgActivateTunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{2} + return fileDescriptor_747f2bf21e50fad9, []int{4} } func (m *MsgActivateTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -234,7 +344,7 @@ func (m *MsgActivateTunnelResponse) Reset() { *m = MsgActivateTunnelResp func (m *MsgActivateTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgActivateTunnelResponse) ProtoMessage() {} func (*MsgActivateTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{3} + return fileDescriptor_747f2bf21e50fad9, []int{5} } func (m *MsgActivateTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -263,6 +373,98 @@ func (m *MsgActivateTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgActivateTunnelResponse proto.InternalMessageInfo +// MsgDeactivateTunnel is the transaction message to deactivate a tunnel. +type MsgDeactivateTunnel struct { + // tunnel_id is the ID of the tunnel to deactivate. + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *MsgDeactivateTunnel) Reset() { *m = MsgDeactivateTunnel{} } +func (m *MsgDeactivateTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgDeactivateTunnel) ProtoMessage() {} +func (*MsgDeactivateTunnel) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{6} +} +func (m *MsgDeactivateTunnel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeactivateTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeactivateTunnel.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 *MsgDeactivateTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeactivateTunnel.Merge(m, src) +} +func (m *MsgDeactivateTunnel) XXX_Size() int { + return m.Size() +} +func (m *MsgDeactivateTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeactivateTunnel.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeactivateTunnel proto.InternalMessageInfo + +func (m *MsgDeactivateTunnel) GetTunnelID() uint64 { + if m != nil { + return m.TunnelID + } + return 0 +} + +func (m *MsgDeactivateTunnel) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +// MsgDeactivateTunnelResponse is the response type for the Msg/DeactivateTunnel RPC method. +type MsgDeactivateTunnelResponse struct { +} + +func (m *MsgDeactivateTunnelResponse) Reset() { *m = MsgDeactivateTunnelResponse{} } +func (m *MsgDeactivateTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeactivateTunnelResponse) ProtoMessage() {} +func (*MsgDeactivateTunnelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{7} +} +func (m *MsgDeactivateTunnelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeactivateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeactivateTunnelResponse.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 *MsgDeactivateTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeactivateTunnelResponse.Merge(m, src) +} +func (m *MsgDeactivateTunnelResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeactivateTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeactivateTunnelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeactivateTunnelResponse proto.InternalMessageInfo + // MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. type MsgManualTriggerTunnel struct { // tunnel_id is the ID of the tunnel to manually trigger. @@ -275,7 +477,7 @@ func (m *MsgManualTriggerTunnel) Reset() { *m = MsgManualTriggerTunnel{} func (m *MsgManualTriggerTunnel) String() string { return proto.CompactTextString(m) } func (*MsgManualTriggerTunnel) ProtoMessage() {} func (*MsgManualTriggerTunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{4} + return fileDescriptor_747f2bf21e50fad9, []int{8} } func (m *MsgManualTriggerTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +528,7 @@ func (m *MsgManualTriggerTunnelResponse) Reset() { *m = MsgManualTrigger func (m *MsgManualTriggerTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgManualTriggerTunnelResponse) ProtoMessage() {} func (*MsgManualTriggerTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{5} + return fileDescriptor_747f2bf21e50fad9, []int{9} } func (m *MsgManualTriggerTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -367,7 +569,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{6} + return fileDescriptor_747f2bf21e50fad9, []int{10} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -418,7 +620,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{7} + return fileDescriptor_747f2bf21e50fad9, []int{11} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -449,9 +651,13 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateTunnel)(nil), "tunnel.v1beta1.MsgCreateTunnel") + proto.RegisterType((*MsgEditTunnel)(nil), "tunnel.v1beta1.MsgEditTunnel") + proto.RegisterType((*MsgEditTunnelResponse)(nil), "tunnel.v1beta1.MsgEditTunnelResponse") proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") proto.RegisterType((*MsgActivateTunnel)(nil), "tunnel.v1beta1.MsgActivateTunnel") proto.RegisterType((*MsgActivateTunnelResponse)(nil), "tunnel.v1beta1.MsgActivateTunnelResponse") + proto.RegisterType((*MsgDeactivateTunnel)(nil), "tunnel.v1beta1.MsgDeactivateTunnel") + proto.RegisterType((*MsgDeactivateTunnelResponse)(nil), "tunnel.v1beta1.MsgDeactivateTunnelResponse") proto.RegisterType((*MsgManualTriggerTunnel)(nil), "tunnel.v1beta1.MsgManualTriggerTunnel") proto.RegisterType((*MsgManualTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgManualTriggerTunnelResponse") proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") @@ -461,55 +667,62 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 754 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 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0x56, 0x1c, 0x97, 0x9d, 0x0c, 0x5a, 0x46, 0x9b, 0xf4, 0x64, - 0xc9, 0xe4, 0x67, 0x9b, 0xda, 0x6f, 0x4d, 0xff, 0x7e, 0xca, 0x0d, 0xa8, 0x15, 0xf8, 0x56, 0xab, - 0x60, 0xa9, 0xed, 0x27, 0x91, 0x78, 0xda, 0x62, 0x49, 0xa9, 0xa4, 0x6b, 0xda, 0xb7, 0x8b, 0xed, - 0x55, 0x79, 0xd3, 0x9e, 0x6d, 0x7b, 0x88, 0xd2, 0x43, 0xe6, 0xb9, 0xd8, 0xb1, 0x02, 0xe2, 0xf3, - 0x8d, 0x77, 0xb7, 0xe7, 0x5b, 0xc1, 0xee, 0xc3, 0xed, 0xf9, 0xd6, 0x9a, 0xac, 0x62, 0xa4, 0x22, - 0xe5, 0x03, 0x90, 0x8b, 0x1c, 0x59, 0x88, 0xf6, 0x09, 0xa6, 0x48, 0xdd, 0x04, 0x69, 0x61, 0xd4, - 0x74, 0x6d, 0x4d, 0xf1, 0x13, 0x5d, 0xcb, 0x8e, 0xaf, 0x8b, 0x29, 0x41, 0xab, 0x1f, 0x58, 0x29, - 0x01, 0xd7, 0xed, 0xf2, 0x27, 0x05, 0xac, 0x34, 0xa8, 0xb3, 0xd7, 0x66, 0xee, 0x70, 0x52, 0xed, - 0xfb, 0x3b, 0x98, 0xd6, 0x38, 0x77, 0x5f, 0x8d, 0x9b, 0x51, 0x8d, 0xda, 0x44, 0xe3, 0x6c, 0x24, - 0xe5, 0x75, 0x90, 0xff, 0xed, 0x30, 0xd0, 0x59, 0xfe, 0xa2, 0x80, 0xb5, 0x06, 0x75, 0x1a, 0x10, - 0x0f, 0x60, 0xf7, 0xc8, 0x73, 0x1d, 0x07, 0x79, 0xff, 0x46, 0x81, 0x11, 0x55, 0xf0, 0x60, 0xa2, - 0x20, 0x26, 0x9c, 0x72, 0x09, 0xe8, 0xf1, 0x48, 0xa8, 0xe5, 0x4c, 0xe1, 0x8f, 0xee, 0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bf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x01, 0x06, 0x7a, 0x31, 0x07, - 0x00, 0x00, + // 867 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0x9b, 0xb4, 0x9b, 0x4c, 0x42, 0x61, 0xbd, 0xa1, 0x71, 0x5c, 0xd5, 0x09, 0x46, 0xcb, + 0xa6, 0xbb, 0xaa, 0x4d, 0xc3, 0xc2, 0x81, 0x5b, 0xd3, 0x82, 0x94, 0x43, 0x24, 0xe4, 0x2d, 0xd2, + 0x8a, 0x03, 0xd1, 0x24, 0x9e, 0x4c, 0x2d, 0x92, 0x99, 0xc8, 0x33, 0x89, 0x36, 0x57, 0x8e, 0x9c, + 0xf8, 0x03, 0x1c, 0x10, 0x07, 0xa4, 0x3d, 0xed, 0x61, 0x7f, 0x01, 0xa7, 0x15, 0xa7, 0x15, 0x27, + 0x4e, 0x05, 0xa5, 0x87, 0xfe, 0x03, 0xce, 0xc8, 0x9e, 0x89, 0x9d, 0xb8, 0xa6, 0x4d, 0x85, 0xd4, + 0x4b, 0xec, 0x99, 0xef, 0x7b, 0x33, 0xdf, 0xf7, 0xde, 0x3c, 0x4f, 0x40, 0x85, 0x4f, 0x08, 0x41, + 0x43, 0x7b, 0x7a, 0xd8, 0x43, 0x1c, 0x1e, 0xda, 0xfc, 0x85, 0x35, 0xf6, 0x29, 0xa7, 0xea, 0xb6, + 0x00, 0x2c, 0x09, 0xe8, 0x55, 0x4c, 0x29, 0x1e, 0x22, 0x3b, 0x44, 0x7b, 0x93, 0x81, 0x0d, 0xc9, + 0x4c, 0x50, 0xf5, 0x32, 0xa6, 0x98, 0x86, 0xaf, 0x76, 0xf0, 0x26, 0x67, 0x77, 0x13, 0x2b, 0x8f, + 0xa1, 0x0f, 0x47, 0x4c, 0x82, 0xd5, 0x3e, 0x65, 0x23, 0xca, 0xba, 0x22, 0x4a, 0x0c, 0x24, 0x64, + 0x88, 0x91, 0xdd, 0x83, 0x0c, 0x45, 0xc1, 0x7d, 0xea, 0x11, 0x89, 0x57, 0x24, 0x3e, 0x62, 0xd8, + 0x9e, 0x1e, 0x06, 0x0f, 0x09, 0xdc, 0x87, 0x23, 0x8f, 0x50, 0x3b, 0xfc, 0xfd, 0x0f, 0x0d, 0xd2, + 0x93, 0xd4, 0x30, 0x40, 0xc8, 0x65, 0x11, 0x16, 0x8e, 0x04, 0x64, 0xfe, 0x92, 0x05, 0xef, 0x76, + 0x18, 0x3e, 0xf6, 0x11, 0xe4, 0xe8, 0x34, 0x0c, 0x52, 0x8f, 0x41, 0x89, 0x79, 0x98, 0xc0, 0x61, + 0xd7, 0x23, 0x03, 0xca, 0x34, 0xa5, 0x9e, 0x6d, 0x14, 0x9b, 0xba, 0xb5, 0x9a, 0x27, 0xeb, 0x59, + 0xc8, 0x69, 0x93, 0x01, 0x6d, 0xe5, 0xde, 0x9c, 0xd7, 0x32, 0x4e, 0x91, 0x45, 0x33, 0x4c, 0xd5, + 0x41, 0xde, 0x23, 0x1c, 0xf9, 0x53, 0x38, 0xd4, 0x36, 0xea, 0x4a, 0x23, 0xe7, 0x44, 0x63, 0xf5, + 0x53, 0xb0, 0xe9, 0xd3, 0x09, 0x47, 0x5a, 0xb6, 0xae, 0x34, 0x8a, 0xcd, 0xb2, 0x25, 0x32, 0x6e, + 0x2d, 0x32, 0x6e, 0x1d, 0x91, 0x59, 0xab, 0xf0, 0xfb, 0xeb, 0x83, 0x4d, 0x27, 0xa0, 0x39, 0x82, + 0xad, 0x3e, 0x05, 0x85, 0x40, 0x7a, 0x97, 0xcf, 0xc6, 0x48, 0xcb, 0xd5, 0x95, 0xc6, 0x76, 0xb3, + 0x62, 0x09, 0x33, 0x0b, 0x4d, 0x5f, 0x22, 0xe4, 0x9e, 0xce, 0xc6, 0xc8, 0xc9, 0x0f, 0xe4, 0x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 0x0d, 0x84, 0xa8, 0x41, 0x1d, + 0x00, 0x96, 0xbe, 0x64, 0x7b, 0x29, 0x61, 0x31, 0xac, 0x3f, 0xbc, 0x16, 0x8e, 0xd6, 0xfc, 0x16, + 0x6c, 0x27, 0xba, 0xf8, 0x83, 0x94, 0xc0, 0x55, 0x8a, 0xbe, 0x7f, 0x23, 0x25, 0x5a, 0xdf, 0x05, + 0xef, 0x5d, 0x69, 0xb4, 0x0f, 0x53, 0xc2, 0x93, 0x24, 0xfd, 0xc9, 0x1a, 0xa4, 0x68, 0x97, 0x11, + 0x78, 0x90, 0xd6, 0x0b, 0x1f, 0xa5, 0xac, 0x91, 0xc2, 0xd3, 0xad, 0xf5, 0x78, 0xd1, 0x76, 0xcf, + 0x41, 0x69, 0xe5, 0xb8, 0xa6, 0x95, 0x78, 0x99, 0x90, 0x5a, 0xe2, 0xb4, 0x43, 0xd4, 0x6a, 0xbf, + 0x99, 0x1b, 0xca, 0xdb, 0xb9, 0xa1, 0xfc, 0x3d, 0x37, 0x94, 0x1f, 0x2f, 0x8c, 0xcc, 0xdb, 0x0b, + 0x23, 0xf3, 0xe7, 0x85, 0x91, 0xf9, 0xc6, 0x5e, 0xba, 0x5a, 0x7b, 0x90, 0xb8, 0xe1, 0x9d, 0xdf, + 0xa7, 0x43, 0xbb, 0x7f, 0x06, 0x3d, 0x62, 0x4f, 0x9b, 0xf6, 0x0b, 0xf9, 0xe7, 0x45, 0xdc, 0xb3, + 0xbd, 0xad, 0x90, 0xf1, 0xc9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x18, 0xd3, 0x71, 0xc0, + 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -526,8 +739,12 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) + // EditTunnel is a RPC method to edit a tunnel. + EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) // ActivateTunnel is a RPC method to activate a tunnel. ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, opts ...grpc.CallOption) (*MsgActivateTunnelResponse, error) + // DeactivateTunnel is a RPC method to deactivate a tunnel. + DeactivateTunnel(ctx context.Context, in *MsgDeactivateTunnel, opts ...grpc.CallOption) (*MsgDeactivateTunnelResponse, error) // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) // UpdateParams is a RPC method to update parameters @@ -551,6 +768,15 @@ func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts return out, nil } +func (c *msgClient) EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) { + out := new(MsgEditTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/EditTunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, opts ...grpc.CallOption) (*MsgActivateTunnelResponse, error) { out := new(MsgActivateTunnelResponse) err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/ActivateTunnel", in, out, opts...) @@ -560,6 +786,15 @@ func (c *msgClient) ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, o return out, nil } +func (c *msgClient) DeactivateTunnel(ctx context.Context, in *MsgDeactivateTunnel, opts ...grpc.CallOption) (*MsgDeactivateTunnelResponse, error) { + out := new(MsgDeactivateTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/DeactivateTunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) { out := new(MsgManualTriggerTunnelResponse) err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/ManualTriggerTunnel", in, out, opts...) @@ -582,8 +817,12 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts type MsgServer interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) + // EditTunnel is a RPC method to edit a tunnel. + EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) // ActivateTunnel is a RPC method to activate a tunnel. ActivateTunnel(context.Context, *MsgActivateTunnel) (*MsgActivateTunnelResponse, error) + // DeactivateTunnel is a RPC method to deactivate a tunnel. + DeactivateTunnel(context.Context, *MsgDeactivateTunnel) (*MsgDeactivateTunnelResponse, error) // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. ManualTriggerTunnel(context.Context, *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) // UpdateParams is a RPC method to update parameters @@ -597,9 +836,15 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) CreateTunnel(ctx context.Context, req *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTunnel not implemented") } +func (*UnimplementedMsgServer) EditTunnel(ctx context.Context, req *MsgEditTunnel) (*MsgEditTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EditTunnel not implemented") +} func (*UnimplementedMsgServer) ActivateTunnel(ctx context.Context, req *MsgActivateTunnel) (*MsgActivateTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ActivateTunnel not implemented") } +func (*UnimplementedMsgServer) DeactivateTunnel(ctx context.Context, req *MsgDeactivateTunnel) (*MsgDeactivateTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeactivateTunnel not implemented") +} func (*UnimplementedMsgServer) ManualTriggerTunnel(ctx context.Context, req *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ManualTriggerTunnel not implemented") } @@ -629,6 +874,24 @@ func _Msg_CreateTunnel_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_EditTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEditTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EditTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Msg/EditTunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EditTunnel(ctx, req.(*MsgEditTunnel)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_ActivateTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgActivateTunnel) if err := dec(in); err != nil { @@ -647,6 +910,24 @@ func _Msg_ActivateTunnel_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_DeactivateTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeactivateTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeactivateTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Msg/DeactivateTunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeactivateTunnel(ctx, req.(*MsgDeactivateTunnel)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_ManualTriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgManualTriggerTunnel) if err := dec(in); err != nil { @@ -691,10 +972,18 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateTunnel", Handler: _Msg_CreateTunnel_Handler, }, + { + MethodName: "EditTunnel", + Handler: _Msg_EditTunnel_Handler, + }, { MethodName: "ActivateTunnel", Handler: _Msg_ActivateTunnel_Handler, }, + { + MethodName: "DeactivateTunnel", + Handler: _Msg_DeactivateTunnel_Handler, + }, { MethodName: "ManualTriggerTunnel", Handler: _Msg_ManualTriggerTunnel_Handler, @@ -788,7 +1077,7 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgCreateTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgEditTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -798,16 +1087,42 @@ func (m *MsgCreateTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCreateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgEditTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCreateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgEditTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x22 + } + if m.Interval != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Interval)) + i-- + dAtA[i] = 0x18 + } + if len(m.SignalInfos) > 0 { + for iNdEx := len(m.SignalInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SignalInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } if m.TunnelID != 0 { i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) i-- @@ -816,7 +1131,7 @@ func (m *MsgCreateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgActivateTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgEditTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -826,32 +1141,20 @@ func (m *MsgActivateTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgActivateTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgEditTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgActivateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgEditTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0x12 - } - if m.TunnelID != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } -func (m *MsgActivateTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgCreateTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -861,20 +1164,25 @@ func (m *MsgActivateTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgActivateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgCreateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgActivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgCreateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } -func (m *MsgManualTriggerTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgActivateTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -884,12 +1192,12 @@ func (m *MsgManualTriggerTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgManualTriggerTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgActivateTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgManualTriggerTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgActivateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -909,7 +1217,7 @@ func (m *MsgManualTriggerTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgManualTriggerTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgActivateTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -919,12 +1227,12 @@ func (m *MsgManualTriggerTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgManualTriggerTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgActivateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgManualTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgActivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -932,7 +1240,7 @@ func (m *MsgManualTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { +func (m *MsgDeactivateTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -942,20 +1250,136 @@ func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDeactivateTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDeactivateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x12 + } + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgDeactivateTunnelResponse) 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 *MsgDeactivateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeactivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgManualTriggerTunnel) 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 *MsgManualTriggerTunnel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgManualTriggerTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x12 + } + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgManualTriggerTunnelResponse) 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 *MsgManualTriggerTunnelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgManualTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } i -= size i = encodeVarintTx(dAtA, i, uint64(size)) @@ -1041,6 +1465,40 @@ func (m *MsgCreateTunnel) Size() (n int) { return n } +func (m *MsgEditTunnel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTx(uint64(m.TunnelID)) + } + if len(m.SignalInfos) > 0 { + for _, e := range m.SignalInfos { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if m.Interval != 0 { + n += 1 + sovTx(uint64(m.Interval)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgEditTunnelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgCreateTunnelResponse) Size() (n int) { if m == nil { return 0 @@ -1078,6 +1536,31 @@ func (m *MsgActivateTunnelResponse) Size() (n int) { return n } +func (m *MsgDeactivateTunnel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTx(uint64(m.TunnelID)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgDeactivateTunnelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgManualTriggerTunnel) Size() (n int) { if m == nil { return 0 @@ -1357,7 +1840,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgEditTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1380,10 +1863,10 @@ func (m *MsgCreateTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgEditTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgEditTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1405,61 +1888,45 @@ func (m *MsgCreateTunnelResponse) Unmarshal(dAtA []byte) error { break } } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalInfos", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx + 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 (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return ErrInvalidLengthTx } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgActivateTunnel) 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.SignalInfos = append(m.SignalInfos, SignalInfo{}) + if err := m.SignalInfos[len(m.SignalInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgActivateTunnel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgActivateTunnel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) } - m.TunnelID = 0 + m.Interval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1469,12 +1936,12 @@ func (m *MsgActivateTunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TunnelID |= uint64(b&0x7F) << shift + m.Interval |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 2: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } @@ -1527,7 +1994,227 @@ func (m *MsgActivateTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgActivateTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgEditTunnelResponse) 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: MsgEditTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEditTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateTunnelResponse) 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: MsgCreateTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgActivateTunnel) 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: MsgActivateTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgActivateTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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 *MsgActivateTunnelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1577,6 +2264,157 @@ func (m *MsgActivateTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgDeactivateTunnel) 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: MsgDeactivateTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeactivateTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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 *MsgDeactivateTunnelResponse) 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: MsgDeactivateTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeactivateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgManualTriggerTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 0b201a21b4d9f3b915aaa14c9dc924ed50e82533 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 13:21:32 +0700 Subject: [PATCH 059/272] use get active tunnel ids --- x/tunnel/keeper/packet.go | 26 +++++++++----------------- x/tunnel/keeper/signal_prices_info.go | 9 +++++++++ x/tunnel/keeper/tunnel.go | 17 ----------------- x/tunnel/keeper/tunnel_test.go | 17 ----------------- x/tunnel/types/events.go | 17 ++++++++--------- 5 files changed, 26 insertions(+), 60 deletions(-) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index ffe35f9be..9f1777936 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -39,33 +39,25 @@ func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) ty // ProduceActiveTunnelPackets generates packets and sends packets to the destination route for all active tunnels func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { - // get all active tunnels - activeTunnels := k.GetTunnelsByActiveStatus(ctx, true) + // get active tunnel IDs + ids := k.MustGetActiveTunnelIDs(ctx) // check for active tunnels - for _, at := range activeTunnels { - signalPricesInfo, err := k.GetSignalPricesInfo(ctx, at.ID) - if err != nil { - // emit get signal prices info fail event - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeGetSignalPricesInfoFail, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", at.ID)), - sdk.NewAttribute(types.AttributeKeyReason, err.Error()), - )) - continue - } + for _, id := range ids { + tunnel := k.MustGetTunnel(ctx, id) + signalPricesInfo := k.MustGetSignalPricesInfo(ctx, tunnel.ID) // check if the interval has passed - intervalTrigger := ctx.BlockTime().Unix() >= int64(at.Interval)+signalPricesInfo.LastIntervalTimestamp + intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+signalPricesInfo.LastIntervalTimestamp // produce packet - err = k.ProducePacket(ctx, at, signalPricesInfo, intervalTrigger) + err := k.ProducePacket(ctx, tunnel, signalPricesInfo, intervalTrigger) if err != nil { // emit send packet fail event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeProducePacketFail, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", at.ID)), - sdk.NewAttribute(types.AttributeKeyRoute, fmt.Sprintf("%v", at.Route)), + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeKeyRoute, fmt.Sprintf("%v", tunnel.Route)), sdk.NewAttribute(types.AttributeKeyReason, err.Error()), )) continue diff --git a/x/tunnel/keeper/signal_prices_info.go b/x/tunnel/keeper/signal_prices_info.go index e696a870a..97b70ef22 100644 --- a/x/tunnel/keeper/signal_prices_info.go +++ b/x/tunnel/keeper/signal_prices_info.go @@ -24,6 +24,15 @@ func (k Keeper) GetSignalPricesInfo(ctx sdk.Context, tunnelID uint64) (types.Sig return signalPricesInfo, nil } +// MustGetSignalPricesInfo gets the signal prices info from the store and panics if it does not exist +func (k Keeper) MustGetSignalPricesInfo(ctx sdk.Context, tunnelID uint64) types.SignalPricesInfo { + signalPricesInfo, err := k.GetSignalPricesInfo(ctx, tunnelID) + if err != nil { + panic(err) + } + return signalPricesInfo +} + // GetSignalPricesInfos gets all signal prices infos from the store func (k Keeper) GetSignalPricesInfos(ctx sdk.Context) []types.SignalPricesInfo { var signalPricesInfos []types.SignalPricesInfo diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index a75bb89be..649a81c51 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -131,23 +131,6 @@ func (k Keeper) GetTunnels(ctx sdk.Context) []types.Tunnel { return tunnels } -// GetTunnelsByActiveStatus returns all tunnels by their active status -func (k Keeper) GetTunnelsByActiveStatus(ctx sdk.Context, isActive bool) []types.Tunnel { - var tunnels []types.Tunnel - iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.TunnelStoreKeyPrefix) - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var tunnel types.Tunnel - k.cdc.MustUnmarshal(iterator.Value(), &tunnel) - - if tunnel.IsActive == isActive { - tunnels = append(tunnels, tunnel) - } - } - return tunnels -} - // SetActiveTunnelIDs sets the active tunnel IDs in the store func (k Keeper) SetActiveTunnelIDs(ctx sdk.Context, ids []uint64) { ctx.KVStore(k.storeKey).Set(types.ActiveTunnelIDsStoreKey, k.cdc.MustMarshal(&types.ActiveTunnelIDs{IDs: ids})) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 776a90f53..17a186b8f 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -46,23 +46,6 @@ func TestGetTunnels(t *testing.T) { require.Len(s.T(), tunnels, 1, "expected 1 tunnel to be retrieved") } -func TestGetTunnelsByActiveStatus(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper - - // Create a new tunnel instance - tunnel := types.Tunnel{ID: 1, IsActive: false} - - // Set the tunnel in the keeper - k.SetTunnel(ctx, tunnel) - - // Retrieve all tunnels by active status - tunnels := k.GetTunnelsByActiveStatus(ctx, false) - - // Assert the number of active tunnels is 1 - require.Len(s.T(), tunnels, 1, "expected 1 active tunnel to be retrieved") -} - // func TestGenerateSignalPriceInfos(t *testing.T) { // s := testutil.NewTestSuite(t) // ctx := s.Ctx diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 72b3b7681..2c92eb268 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,15 +2,14 @@ package types // events const ( - EventTypeUpdateParams = "update_params" - EventTypeCreateTunnel = "create_tunnel" - EventTypeEditTunnel = "edit_tunnel" - EventTypeActivateTunnel = "activate_tunnel" - EventTypeDeactivateTunnel = "deactivate_tunnel" - EventTypeManualTriggerTunnel = "manual_trigger_tunnel" - EventTypeSignalInfoNotFound = "signal_info_not_found" - EventTypeProducePacketFail = "produce_packet_fail" - EventTypeGetSignalPricesInfoFail = "get_signal_prices_info_fail" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeEditTunnel = "edit_tunnel" + EventTypeActivateTunnel = "activate_tunnel" + EventTypeDeactivateTunnel = "deactivate_tunnel" + EventTypeManualTriggerTunnel = "manual_trigger_tunnel" + EventTypeSignalInfoNotFound = "signal_info_not_found" + EventTypeProducePacketFail = "produce_packet_fail" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" From d7fbff357d4afca97048d5f6a1afbf9d23030e3f Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 13:55:32 +0700 Subject: [PATCH 060/272] update activate logic --- x/tunnel/keeper/tunnel.go | 38 +++++++++++++++++++++++++++----------- x/tunnel/types/errors.go | 2 ++ x/tunnel/types/tunnel.go | 10 ++++++++++ 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 649a81c51..a2d322548 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -97,10 +97,10 @@ func (k Keeper) SetTunnel(ctx sdk.Context, tunnel types.Tunnel) { } // GetTunnel retrieves a tunnel by its ID -func (k Keeper) GetTunnel(ctx sdk.Context, id uint64) (types.Tunnel, error) { - bz := ctx.KVStore(k.storeKey).Get(types.TunnelStoreKey(id)) +func (k Keeper) GetTunnel(ctx sdk.Context, tunnelID uint64) (types.Tunnel, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelStoreKey(tunnelID)) if bz == nil { - return types.Tunnel{}, types.ErrTunnelNotFound.Wrapf("tunnelID: %d", id) + return types.Tunnel{}, types.ErrTunnelNotFound.Wrapf("tunnelID: %d", tunnelID) } var tunnel types.Tunnel @@ -109,8 +109,8 @@ func (k Keeper) GetTunnel(ctx sdk.Context, id uint64) (types.Tunnel, error) { } // MustGetTunnel retrieves a tunnel by its ID. Panics if the tunnel does not exist. -func (k Keeper) MustGetTunnel(ctx sdk.Context, id uint64) types.Tunnel { - tunnel, err := k.GetTunnel(ctx, id) +func (k Keeper) MustGetTunnel(ctx sdk.Context, tunnelID uint64) types.Tunnel { + tunnel, err := k.GetTunnel(ctx, tunnelID) if err != nil { panic(err) } @@ -157,11 +157,18 @@ func (k Keeper) MustGetActiveTunnelIDs(ctx sdk.Context) []uint64 { } // ActivateTunnel activates a tunnel -func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64) error { - tunnel, err := k.GetTunnel(ctx, id) +func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { + tunnel, err := k.GetTunnel(ctx, tunnelID) if err != nil { return err } + + // Check if the tunnel is already active + if tunnel.IsActive { + return types.ErrTunnelAlreadyActive + } + + // Activate the tunnel tunnel.IsActive = true // Add the tunnel ID to the active tunnel IDs @@ -169,7 +176,8 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64) error { if err != nil { return err } - activeTunnelIDs = append(activeTunnelIDs, id) + + activeTunnelIDs = append(activeTunnelIDs, tunnelID) k.SetActiveTunnelIDs(ctx, activeTunnelIDs) // Set the last interval timestamp to the current block time @@ -178,11 +186,17 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, id uint64) error { } // DeactivateTunnel deactivates a tunnel -func (k Keeper) DeactivateTunnel(ctx sdk.Context, id uint64) error { - tunnel, err := k.GetTunnel(ctx, id) +func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { + tunnel, err := k.GetTunnel(ctx, tunnelID) if err != nil { return err } + + // Check if the tunnel is already inactive + if !tunnel.IsActive { + return types.ErrTunnelNotActive + } + tunnel.IsActive = false // Remove the tunnel ID from the active tunnel IDs @@ -190,8 +204,10 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, id uint64) error { if err != nil { return err } + + // Remove the tunnel ID from the active tunnel IDs for i, activeID := range activeTunnelIDs { - if activeID == id { + if activeID == tunnelID { activeTunnelIDs = append(activeTunnelIDs[:i], activeTunnelIDs[i+1:]...) break } diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 5e5f880bf..39bedb027 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -17,4 +17,6 @@ var ( ErrNoPacketContent = errorsmod.Register(ModuleName, 10, "no packet content") ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 11, "invalid creator of tunnel") ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 12, "account already exist") + ErrTunnelAlreadyActive = errorsmod.Register(ModuleName, 13, "tunnel already active") + ErrTunnelNotActive = errorsmod.Register(ModuleName, 14, "tunnel not active") ) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 9acd9f072..4b2d11310 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -67,3 +67,13 @@ func (t Tunnel) GetSignalInfoMap() map[string]SignalInfo { } return signalInfoMap } + +// FindIndex returns the index of the given tunnel ID in the active tunnel IDs. +func (a ActiveTunnelIDs) FindIndex(tunnelID uint64) int { + for i, v := range a.IDs { + if v == tunnelID { + return i + } + } + return -1 +} From ea1e33ff0af85ce6e2c20c8d8238b1766beb90f2 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 14:20:36 +0700 Subject: [PATCH 061/272] update func name --- x/tunnel/keeper/axelar_packet_handler.go | 4 ++-- x/tunnel/keeper/axelar_packet_handler_test.go | 2 +- x/tunnel/keeper/packet.go | 4 ++-- x/tunnel/keeper/tss_packet_handler.go | 4 ++-- x/tunnel/keeper/tss_packet_handler_test.go | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/x/tunnel/keeper/axelar_packet_handler.go b/x/tunnel/keeper/axelar_packet_handler.go index 5c16fb6ab..45ca23065 100644 --- a/x/tunnel/keeper/axelar_packet_handler.go +++ b/x/tunnel/keeper/axelar_packet_handler.go @@ -6,7 +6,7 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// AxelarPacketHandle handles incoming Axelar packets -func (k Keeper) AxelarPacketHandle(ctx sdk.Context, route *types.AxelarRoute, packet types.Packet) error { +// HandleAxelarPacket handles Axelar packet +func (k Keeper) HandleAxelarPacket(ctx sdk.Context, route *types.AxelarRoute, packet types.Packet) error { return nil } diff --git a/x/tunnel/keeper/axelar_packet_handler_test.go b/x/tunnel/keeper/axelar_packet_handler_test.go index 27400b0dd..9aa8165bc 100644 --- a/x/tunnel/keeper/axelar_packet_handler_test.go +++ b/x/tunnel/keeper/axelar_packet_handler_test.go @@ -4,4 +4,4 @@ import ( "testing" ) -func TestGetSetAxelarPacket(t *testing.T) {} +func TestHandleAxelarPacket(t *testing.T) {} diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 9f1777936..5165f5bf9 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -117,12 +117,12 @@ func (k Keeper) SendPacket( // Process the tunnel based on the route type switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - err := k.TSSPacketHandle(ctx, r, packet) + err := k.HandleTSSPacket(ctx, r, packet) if err != nil { return err } case *types.AxelarRoute: - err := k.AxelarPacketHandle(ctx, r, packet) + err := k.HandleAxelarPacket(ctx, r, packet) if err != nil { return err } diff --git a/x/tunnel/keeper/tss_packet_handler.go b/x/tunnel/keeper/tss_packet_handler.go index f9daddfd5..5594b9040 100644 --- a/x/tunnel/keeper/tss_packet_handler.go +++ b/x/tunnel/keeper/tss_packet_handler.go @@ -8,8 +8,8 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// TSSPacketHandle handles incoming TSS packets -func (k Keeper) TSSPacketHandle(ctx sdk.Context, route *types.TSSRoute, packet types.Packet) error { +// HandleTSSPacket handles TSS packet +func (k Keeper) HandleTSSPacket(ctx sdk.Context, route *types.TSSRoute, packet types.Packet) error { // TODO: Implement TSS packet handler logic // Sign TSS packet diff --git a/x/tunnel/keeper/tss_packet_handler_test.go b/x/tunnel/keeper/tss_packet_handler_test.go index f171c4ee5..237e6b83f 100644 --- a/x/tunnel/keeper/tss_packet_handler_test.go +++ b/x/tunnel/keeper/tss_packet_handler_test.go @@ -11,7 +11,7 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TSSPacketHandle(t *testing.T) { +func TestHandleTSSPacket(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper @@ -30,8 +30,8 @@ func TSSPacketHandle(t *testing.T) { time.Now().Unix(), ) - // Call the TSSPacketHandler - err := k.TSSPacketHandle(ctx, &route, packet) + // Handle the TSS packet + err := k.HandleTSSPacket(ctx, &route, packet) require.NoError(t, err) // Retrieve the packet from the keeper From c26875970485cb2b96cd8cdde4fa2e08bea70be1 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 14:30:14 +0700 Subject: [PATCH 062/272] update set content --- x/tunnel/keeper/axelar_packet_handler.go | 8 +++++-- x/tunnel/keeper/packet.go | 27 ++++++++++++++-------- x/tunnel/keeper/tss_packet_handler.go | 16 +++++-------- x/tunnel/keeper/tss_packet_handler_test.go | 8 ++----- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/x/tunnel/keeper/axelar_packet_handler.go b/x/tunnel/keeper/axelar_packet_handler.go index 45ca23065..db9fdafac 100644 --- a/x/tunnel/keeper/axelar_packet_handler.go +++ b/x/tunnel/keeper/axelar_packet_handler.go @@ -7,6 +7,10 @@ import ( ) // HandleAxelarPacket handles Axelar packet -func (k Keeper) HandleAxelarPacket(ctx sdk.Context, route *types.AxelarRoute, packet types.Packet) error { - return nil +func (k Keeper) HandleAxelarPacket( + ctx sdk.Context, + route *types.AxelarRoute, + packet types.Packet, +) (types.PacketContentI, error) { + return nil, nil } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 5165f5bf9..47cdbfcea 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -114,21 +114,30 @@ func (k Keeper) SendPacket( tunnel types.Tunnel, packet types.Packet, ) error { - // Process the tunnel based on the route type + var content types.PacketContentI + var err error + switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - err := k.HandleTSSPacket(ctx, r, packet) - if err != nil { - return err - } + content, err = k.HandleTSSPacket(ctx, r, packet) case *types.AxelarRoute: - err := k.HandleAxelarPacket(ctx, r, packet) - if err != nil { - return err - } + content, err = k.HandleAxelarPacket(ctx, r, packet) default: panic(fmt.Sprintf("unknown route type: %T", r)) } + + if err != nil { + return err + } + + // set the packet content + err = packet.SetPacketContent(content) + if err != nil { + panic(fmt.Sprintf("failed to set packet content: %s", err)) + } + + // set the packet in the store + k.SetPacket(ctx, packet) return nil } diff --git a/x/tunnel/keeper/tss_packet_handler.go b/x/tunnel/keeper/tss_packet_handler.go index 5594b9040..ac6db5021 100644 --- a/x/tunnel/keeper/tss_packet_handler.go +++ b/x/tunnel/keeper/tss_packet_handler.go @@ -1,15 +1,17 @@ package keeper import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) // HandleTSSPacket handles TSS packet -func (k Keeper) HandleTSSPacket(ctx sdk.Context, route *types.TSSRoute, packet types.Packet) error { +func (k Keeper) HandleTSSPacket( + ctx sdk.Context, + route *types.TSSRoute, + packet types.Packet, +) (types.PacketContentI, error) { // TODO: Implement TSS packet handler logic // Sign TSS packet @@ -20,12 +22,6 @@ func (k Keeper) HandleTSSPacket(ctx sdk.Context, route *types.TSSRoute, packet t DestinationChainID: route.DestinationChainID, DestinationContractAddress: route.DestinationContractAddress, } - err := packet.SetPacketContent(&packetContent) - if err != nil { - panic(fmt.Sprintf("failed to set packet content: %s", err)) - } - // Save the signed TSS packet - k.SetPacket(ctx, packet) - return nil + return &packetContent, nil } diff --git a/x/tunnel/keeper/tss_packet_handler_test.go b/x/tunnel/keeper/tss_packet_handler_test.go index 237e6b83f..5573ba2f8 100644 --- a/x/tunnel/keeper/tss_packet_handler_test.go +++ b/x/tunnel/keeper/tss_packet_handler_test.go @@ -31,15 +31,11 @@ func TestHandleTSSPacket(t *testing.T) { ) // Handle the TSS packet - err := k.HandleTSSPacket(ctx, &route, packet) - require.NoError(t, err) - - // Retrieve the packet from the keeper - savedPacket, err := k.GetPacket(ctx, 1, 1) + content, err := k.HandleTSSPacket(ctx, &route, packet) require.NoError(t, err) // Assert the packet content - packetContent, ok := savedPacket.PacketContent.GetCachedValue().(*types.TSSPacketContent) + packetContent, ok := content.(*types.TSSPacketContent) require.True(t, ok) require.Equal(t, "chain-1", packetContent.DestinationChainID) require.Equal(t, "0x1234567890abcdef", packetContent.DestinationContractAddress) From 6ae192c85fea30eac7ccacf5b8267f785bf79f7a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 14:31:07 +0700 Subject: [PATCH 063/272] add comment --- x/tunnel/keeper/packet.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 47cdbfcea..37115ab0f 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -126,6 +126,7 @@ func (k Keeper) SendPacket( panic(fmt.Sprintf("unknown route type: %T", r)) } + // return error if failed to handle packet if err != nil { return err } From 82cecfae2c84d0af0d3b20cc38368de0b2e1c1b8 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 14:33:20 +0700 Subject: [PATCH 064/272] change func name --- x/tunnel/keeper/axelar_packet_handler.go | 4 ++-- x/tunnel/keeper/axelar_packet_handler_test.go | 2 +- x/tunnel/keeper/packet.go | 6 +++--- x/tunnel/keeper/{tss_packet_handler.go => tss_packet.go} | 4 ++-- .../{tss_packet_handler_test.go => tss_packet_test.go} | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) rename x/tunnel/keeper/{tss_packet_handler.go => tss_packet.go} (88%) rename x/tunnel/keeper/{tss_packet_handler_test.go => tss_packet_test.go} (89%) diff --git a/x/tunnel/keeper/axelar_packet_handler.go b/x/tunnel/keeper/axelar_packet_handler.go index db9fdafac..aa518e719 100644 --- a/x/tunnel/keeper/axelar_packet_handler.go +++ b/x/tunnel/keeper/axelar_packet_handler.go @@ -6,8 +6,8 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// HandleAxelarPacket handles Axelar packet -func (k Keeper) HandleAxelarPacket( +// SendAxelarPacket sends Axelar packet +func (k Keeper) SendAxelarPacket( ctx sdk.Context, route *types.AxelarRoute, packet types.Packet, diff --git a/x/tunnel/keeper/axelar_packet_handler_test.go b/x/tunnel/keeper/axelar_packet_handler_test.go index 9aa8165bc..71264af74 100644 --- a/x/tunnel/keeper/axelar_packet_handler_test.go +++ b/x/tunnel/keeper/axelar_packet_handler_test.go @@ -4,4 +4,4 @@ import ( "testing" ) -func TestHandleAxelarPacket(t *testing.T) {} +func TestSendAxelarPacket(t *testing.T) {} diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 37115ab0f..7fe8a0a2b 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -119,14 +119,14 @@ func (k Keeper) SendPacket( switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - content, err = k.HandleTSSPacket(ctx, r, packet) + content, err = k.SendTSSPacket(ctx, r, packet) case *types.AxelarRoute: - content, err = k.HandleAxelarPacket(ctx, r, packet) + content, err = k.SendAxelarPacket(ctx, r, packet) default: panic(fmt.Sprintf("unknown route type: %T", r)) } - // return error if failed to handle packet + // return error if failed to send packet if err != nil { return err } diff --git a/x/tunnel/keeper/tss_packet_handler.go b/x/tunnel/keeper/tss_packet.go similarity index 88% rename from x/tunnel/keeper/tss_packet_handler.go rename to x/tunnel/keeper/tss_packet.go index ac6db5021..585a8b6af 100644 --- a/x/tunnel/keeper/tss_packet_handler.go +++ b/x/tunnel/keeper/tss_packet.go @@ -6,8 +6,8 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// HandleTSSPacket handles TSS packet -func (k Keeper) HandleTSSPacket( +// SendTSSPacket sends TSS packet +func (k Keeper) SendTSSPacket( ctx sdk.Context, route *types.TSSRoute, packet types.Packet, diff --git a/x/tunnel/keeper/tss_packet_handler_test.go b/x/tunnel/keeper/tss_packet_test.go similarity index 89% rename from x/tunnel/keeper/tss_packet_handler_test.go rename to x/tunnel/keeper/tss_packet_test.go index 5573ba2f8..43d048ab8 100644 --- a/x/tunnel/keeper/tss_packet_handler_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -11,7 +11,7 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestHandleTSSPacket(t *testing.T) { +func TestSendTSSPacket(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper @@ -30,8 +30,8 @@ func TestHandleTSSPacket(t *testing.T) { time.Now().Unix(), ) - // Handle the TSS packet - content, err := k.HandleTSSPacket(ctx, &route, packet) + // Send the TSS packet + content, err := k.SendTSSPacket(ctx, &route, packet) require.NoError(t, err) // Assert the packet content From 78d19c39d9e55dba87b0c9a1eb9468796c457b91 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 14:36:29 +0700 Subject: [PATCH 065/272] remove unused --- x/tunnel/types/tunnel.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 4b2d11310..9acd9f072 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -67,13 +67,3 @@ func (t Tunnel) GetSignalInfoMap() map[string]SignalInfo { } return signalInfoMap } - -// FindIndex returns the index of the given tunnel ID in the active tunnel IDs. -func (a ActiveTunnelIDs) FindIndex(tunnelID uint64) int { - for i, v := range a.IDs { - if v == tunnelID { - return i - } - } - return -1 -} From 2e1a59af7d7bc0b521259587a29f97b54e0e80fd Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 14:37:27 +0700 Subject: [PATCH 066/272] remove unused interface func --- x/tunnel/types/route.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/tunnel/types/route.go b/x/tunnel/types/route.go index f0a222a89..4beb34357 100644 --- a/x/tunnel/types/route.go +++ b/x/tunnel/types/route.go @@ -7,5 +7,4 @@ type RouteI interface { proto.Message ValidateBasic() error - String() string } From d5e02e321716cea7f6b8212cfdd419d3bdbdca3f Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 2 Sep 2024 14:43:30 +0700 Subject: [PATCH 067/272] update name --- x/tunnel/types/signal.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 60a84940b..f0ce343c3 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -27,10 +27,10 @@ func NewSignalPricesInfo( } // UpdateSignalPrices updates the signal prices based on signal IDs -func (spsi *SignalPricesInfo) UpdateSignalPrices(signalPrices []SignalPrice) { - for _, sp := range signalPrices { - for i, spInfo := range spsi.SignalPrices { - if sp.SignalID == spInfo.SignalID { +func (spsi *SignalPricesInfo) UpdateSignalPrices(newSignalPrices []SignalPrice) { + for _, nsp := range newSignalPrices { + for i, sp := range spsi.SignalPrices { + if nsp.SignalID == sp.SignalID { spsi.SignalPrices[i] = sp break } From d0104a62ed70aba2dde78be30b1745ee14a13536 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 3 Sep 2024 11:22:13 +0700 Subject: [PATCH 068/272] fix review --- proto/tunnel/v1beta1/tunnel.proto | 6 - proto/tunnel/v1beta1/tx.proto | 10 +- x/tunnel/client/cli/util.go | 2 +- x/tunnel/keeper/packet.go | 2 +- x/tunnel/types/events.go | 1 + x/tunnel/types/msgs.go | 4 +- x/tunnel/types/tunnel.pb.go | 388 +++++---------------------- x/tunnel/types/tx.pb.go | 422 +++++++++++++++--------------- 8 files changed, 285 insertions(+), 550 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index ed9200ccc..cbdf22e33 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -100,12 +100,6 @@ message SignalPrice { int64 timestamp = 3; } -// PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered -message PendingTriggerTunnels { - // IDs is a list of tunnel IDs that are waiting to be triggered - repeated uint64 ids = 1 [(gogoproto.customname) = "IDs"]; -} - // Packet is the packet that tunnel produces message Packet { // tunnel_id is the tunnel ID diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index adb46b953..9c9e33bea 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -55,6 +55,11 @@ message MsgCreateTunnel { string creator = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } +// MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. +message MsgCreateTunnelResponse { + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; +} + // MsgEditTunnel is the transaction message to edit a tunnel. message MsgEditTunnel { option (cosmos.msg.v1.signer) = "creator"; @@ -73,11 +78,6 @@ message MsgEditTunnel { // MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. message MsgEditTunnelResponse {} -// MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. -message MsgCreateTunnelResponse { - uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; -} - // MsgActivateTunnel is the transaction message to activate a tunnel. message MsgActivateTunnel { option (cosmos.msg.v1.signer) = "creator"; diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index e075c0dfb..e6a33576e 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -25,7 +25,7 @@ func (sis SignalInfos) ToSignalInfos() []types.SignalInfo { for _, si := range sis.SignalInfos { signalInfo := types.SignalInfo{ SignalID: si.SignalID, - SoftDeviationBPS: 0, + SoftDeviationBPS: si.DeviationBPS, HardDeviationBPS: si.DeviationBPS, } signalInfos = append(signalInfos, signalInfo) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 7fe8a0a2b..ca9758a9c 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -123,7 +123,7 @@ func (k Keeper) SendPacket( case *types.AxelarRoute: content, err = k.SendAxelarPacket(ctx, r, packet) default: - panic(fmt.Sprintf("unknown route type: %T", r)) + return fmt.Errorf("no route found for tunnel ID: %d", tunnel.ID) } // return error if failed to send packet diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 2c92eb268..e74abc18b 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -10,6 +10,7 @@ const ( EventTypeManualTriggerTunnel = "manual_trigger_tunnel" EventTypeSignalInfoNotFound = "signal_info_not_found" EventTypeProducePacketFail = "produce_packet_fail" + EventTypeNoTunnelRoute = "no_tunnel_route" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 8ec0b4906..e3632995e 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -326,8 +326,8 @@ func (m MsgDeactivateTunnel) ValidateBasic() error { func NewMsgManualTriggerTunnel( tunnelID uint64, creator string, -) *MsgActivateTunnel { - return &MsgActivateTunnel{ +) *MsgManualTriggerTunnel { + return &MsgManualTriggerTunnel{ TunnelID: tunnelID, Creator: creator, } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index f4d4b5b91..048bcf233 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -502,52 +502,6 @@ func (m *SignalPrice) GetTimestamp() int64 { return 0 } -// PendingTriggerTunnels is the type for a list of tunnel IDs that are waiting to be triggered -type PendingTriggerTunnels struct { - // IDs is a list of tunnel IDs that are waiting to be triggered - IDs []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` -} - -func (m *PendingTriggerTunnels) Reset() { *m = PendingTriggerTunnels{} } -func (m *PendingTriggerTunnels) String() string { return proto.CompactTextString(m) } -func (*PendingTriggerTunnels) ProtoMessage() {} -func (*PendingTriggerTunnels) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{7} -} -func (m *PendingTriggerTunnels) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PendingTriggerTunnels) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PendingTriggerTunnels.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 *PendingTriggerTunnels) XXX_Merge(src proto.Message) { - xxx_messageInfo_PendingTriggerTunnels.Merge(m, src) -} -func (m *PendingTriggerTunnels) XXX_Size() int { - return m.Size() -} -func (m *PendingTriggerTunnels) XXX_DiscardUnknown() { - xxx_messageInfo_PendingTriggerTunnels.DiscardUnknown(m) -} - -var xxx_messageInfo_PendingTriggerTunnels proto.InternalMessageInfo - -func (m *PendingTriggerTunnels) GetIDs() []uint64 { - if m != nil { - return m.IDs - } - return nil -} - // Packet is the packet that tunnel produces type Packet struct { // tunnel_id is the tunnel ID @@ -566,7 +520,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{8} + return fileDescriptor_b5270a56045f1d8a, []int{7} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -644,7 +598,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{9} + return fileDescriptor_b5270a56045f1d8a, []int{8} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -708,7 +662,7 @@ func (m *AxelarPacketContent) Reset() { *m = AxelarPacketContent{} } func (m *AxelarPacketContent) String() string { return proto.CompactTextString(m) } func (*AxelarPacketContent) ProtoMessage() {} func (*AxelarPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{10} + return fileDescriptor_b5270a56045f1d8a, []int{9} } func (m *AxelarPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -766,7 +720,6 @@ func init() { proto.RegisterType((*ActiveTunnelIDs)(nil), "tunnel.v1beta1.ActiveTunnelIDs") proto.RegisterType((*SignalPricesInfo)(nil), "tunnel.v1beta1.SignalPricesInfo") proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") - proto.RegisterType((*PendingTriggerTunnels)(nil), "tunnel.v1beta1.PendingTriggerTunnels") proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") proto.RegisterType((*TSSPacketContent)(nil), "tunnel.v1beta1.TSSPacketContent") proto.RegisterType((*AxelarPacketContent)(nil), "tunnel.v1beta1.AxelarPacketContent") @@ -775,68 +728,67 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 973 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0xc5, - 0x1b, 0xce, 0xda, 0x8e, 0x63, 0xbf, 0x4e, 0xf3, 0x8b, 0xe6, 0xe7, 0xb6, 0xdb, 0xa4, 0x78, 0x2d, - 0x9f, 0xcc, 0x21, 0xbb, 0xd4, 0x40, 0x0f, 0x39, 0x91, 0x8d, 0x55, 0x75, 0x85, 0x10, 0x61, 0xed, - 0x13, 0x97, 0xd5, 0x7a, 0x77, 0xbc, 0x19, 0x70, 0x66, 0x96, 0x9d, 0x71, 0xd4, 0x1c, 0xf9, 0x06, - 0x7c, 0x02, 0x84, 0x90, 0x90, 0xf8, 0x00, 0xb9, 0x72, 0x42, 0x48, 0x55, 0x4f, 0x15, 0x27, 0x4e, - 0x16, 0xda, 0x1c, 0xe0, 0x33, 0x70, 0x42, 0x3b, 0x33, 0x6b, 0xc7, 0xa1, 0xa5, 0x14, 0x71, 0xe8, - 0x6d, 0xdf, 0xf7, 0x79, 0xff, 0xcd, 0xf3, 0x3e, 0xe3, 0x31, 0xec, 0x8b, 0x39, 0xa5, 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x7d, 0x0d, 0xf4, 0xb2, 0x46, 0x22, 0x23, 0x34, - 0x91, 0x69, 0x27, 0x45, 0x24, 0x3a, 0x86, 0xed, 0x72, 0x43, 0x74, 0xca, 0xb8, 0x59, 0xef, 0x56, - 0xfb, 0xad, 0xc1, 0x9e, 0xbd, 0x7e, 0x17, 0xed, 0xd5, 0x4e, 0xdd, 0xda, 0xd3, 0x85, 0xb5, 0xe1, - 0xb7, 0xf8, 0xd2, 0xc3, 0xd1, 0x1e, 0x34, 0x08, 0x15, 0x38, 0x3b, 0x0f, 0x67, 0xe6, 0x96, 0xe4, - 0x61, 0x69, 0xa3, 0x7d, 0x68, 0x12, 0x1e, 0x84, 0x91, 0x20, 0xe7, 0xd8, 0x6c, 0x74, 0x8d, 0x7e, - 0xc3, 0x6f, 0x10, 0x7e, 0x24, 0x6d, 0xf4, 0x16, 0x40, 0x94, 0xe1, 0x50, 0xe0, 0x38, 0x08, 0x85, - 0xd9, 0xec, 0x1a, 0xfd, 0xaa, 0xdf, 0xd4, 0x9e, 0x23, 0x81, 0x06, 0xb0, 0x25, 0x0d, 0x96, 0x99, - 0xf0, 0x8a, 0x13, 0x95, 0x81, 0x7a, 0x7f, 0x03, 0xf8, 0x9f, 0x6a, 0xa1, 0x96, 0xe8, 0x0d, 0x39, - 0xba, 0x07, 0x55, 0x12, 0x73, 0xd3, 0xe8, 0x56, 0xfb, 0x35, 0x77, 0x2b, 0x5f, 0x58, 0x55, 0x6f, - 0xc8, 0xfd, 0xc2, 0xa7, 0x73, 0x7e, 0x34, 0x60, 0x57, 0x9d, 0xf3, 0x24, 0x23, 0x11, 0xe6, 0xa5, - 0x82, 0x15, 0x15, 0xc1, 0x52, 0x04, 0x52, 0xc1, 0x65, 0x5d, 0xbf, 0xa1, 0x60, 0x2f, 0x46, 0x8f, - 0xe0, 0x96, 0xa6, 0x32, 0x95, 0xf9, 0x66, 0x45, 0x72, 0xb9, 0xff, 0x62, 0x2e, 0x65, 0x0f, 0x4d, - 0xa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8, 0x97, 0xc0, 0x39, 0x1f, 0x38, 0x4f, 0xa4, 0x5f, - 0x70, 0xee, 0x14, 0xbf, 0x23, 0xdc, 0x5e, 0x66, 0xfb, 0x4d, 0x5d, 0xde, 0x8b, 0x5f, 0xfa, 0x8c, - 0x54, 0xfe, 0xf3, 0x67, 0xa4, 0xfa, 0xca, 0x67, 0xe4, 0x05, 0x74, 0xf6, 0x7e, 0x33, 0xe0, 0xff, - 0xea, 0xd9, 0x5b, 0xe7, 0xe8, 0x1d, 0xd8, 0x26, 0x93, 0x28, 0xf8, 0x62, 0x8e, 0xe7, 0x78, 0xc5, - 0xd2, 0x4e, 0xbe, 0xb0, 0xc0, 0x73, 0x8f, 0x3f, 0x29, 0xdc, 0xde, 0xd0, 0x07, 0x32, 0x89, 0xd4, - 0xf7, 0x1b, 0x7f, 0x52, 0xf7, 0xa3, 0xef, 0xf3, 0x8e, 0xf1, 0x34, 0xef, 0x18, 0xcf, 0xf3, 0x8e, - 0xf1, 0x6b, 0xde, 0x31, 0xbe, 0xba, 0xea, 0x6c, 0x3c, 0xbf, 0xea, 0x6c, 0xfc, 0x72, 0xd5, 0xd9, - 0xf8, 0xd4, 0xf9, 0x07, 0xeb, 0xd6, 0x7f, 0xad, 0xe4, 0xb6, 0x27, 0x75, 0x19, 0xf1, 0xee, 0x9f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x63, 0xcc, 0x57, 0x71, 0x09, 0x00, 0x00, + // 953 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x8f, 0xdb, 0x44, + 0x14, 0x5f, 0xc7, 0x49, 0x36, 0x79, 0xd9, 0x86, 0xd5, 0x10, 0x5a, 0x37, 0x5b, 0xe2, 0x28, 0xa7, + 0x70, 0x58, 0x9b, 0x06, 0xe8, 0x61, 0x4f, 0xc4, 0x89, 0xaa, 0x5a, 0x08, 0xb1, 0x38, 0x39, 0x71, + 0xb1, 0x1c, 0x7b, 0x92, 0x35, 0x64, 0x3d, 0xc6, 0x33, 0x89, 0x9a, 0x23, 0xdf, 0x80, 0x4f, 0x80, + 0x10, 0x12, 0x12, 0x1f, 0x60, 0xaf, 0x9c, 0x10, 0x52, 0xd5, 0x53, 0xc5, 0x89, 0x53, 0x84, 0xbc, + 0x07, 0xf8, 0x0c, 0x9c, 0x90, 0x67, 0xc6, 0xc9, 0x26, 0xb4, 0x2a, 0x45, 0x3d, 0xf4, 0x96, 0xf7, + 0x7e, 0xef, 0xdf, 0xfc, 0xde, 0x6f, 0x3c, 0x81, 0x13, 0xb6, 0x88, 0x22, 0x3c, 0x37, 0x97, 0xf7, + 0x27, 0x98, 0x79, 0xf7, 0x4d, 0x61, 0x1a, 0x71, 0x42, 0x18, 0x41, 0x75, 0x69, 0x49, 0xb0, 0xd9, + 0x98, 0x91, 0x19, 0xe1, 0x90, 0x99, 0xfd, 0x12, 0x51, 0xcd, 0xbb, 0x33, 0x42, 0x66, 0x73, 0x6c, + 0x72, 0x6b, 0xb2, 0x98, 0x9a, 0x5e, 0xb4, 0xca, 0x21, 0x9f, 0xd0, 0x4b, 0x42, 0x5d, 0x91, 0x23, + 0x8c, 0x1c, 0x9a, 0x62, 0x1c, 0xd0, 0x4d, 0x5f, 0x6e, 0x09, 0xa8, 0xf3, 0x83, 0x02, 0x95, 0xf1, + 0x68, 0xe4, 0x90, 0x05, 0xc3, 0xe8, 0x11, 0x34, 0x02, 0x4c, 0x59, 0x18, 0x79, 0x2c, 0x24, 0x91, + 0xeb, 0x5f, 0x78, 0x61, 0xe4, 0x86, 0x81, 0xa6, 0xb4, 0x95, 0x6e, 0xd5, 0xba, 0x9d, 0xae, 0x75, + 0x34, 0xdc, 0xe2, 0x83, 0x0c, 0xb6, 0x87, 0x0e, 0x0a, 0xf6, 0x7d, 0x01, 0xfa, 0x18, 0xee, 0xed, + 0x54, 0x22, 0x11, 0x4b, 0x3c, 0x9f, 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x18, 0x50, 0x4d, 0x69, 0xab, 0xdd, 0xa2, 0x75, 0x98, 0xae, 0x75, 0xd5, 0x1e, 0x52, 0x27, + 0xf3, 0xc9, 0x9c, 0x5f, 0x14, 0x38, 0x16, 0xe7, 0x3c, 0x4f, 0x42, 0x1f, 0xd3, 0x5c, 0xc1, 0x82, + 0x0a, 0x77, 0x23, 0x02, 0xae, 0xe0, 0xbc, 0xae, 0x53, 0x11, 0xb0, 0x1d, 0xa0, 0x87, 0x70, 0x4b, + 0x52, 0x19, 0xf3, 0x7c, 0xad, 0xc0, 0xb9, 0x3c, 0x79, 0x3e, 0x97, 0xbc, 0x87, 0x24, 0x53, 0xae, + 0x40, 0xb4, 0x45, 0x0f, 0xe0, 0xce, 0xdc, 0xa3, 0xcc, 0xcd, 0x29, 0x74, 0x59, 0x78, 0x89, 0x29, + 0xf3, 0x2e, 0x63, 0xae, 0x24, 0xd5, 0x79, 0x27, 0x83, 0x6d, 0x89, 0x8e, 0x73, 0x50, 0x9e, 0x22, + 0x81, 0xda, 0x8d, 0x06, 0xaf, 0x72, 0x03, 0x1b, 0x50, 0xe2, 0x83, 0x4b, 0x29, 0x0b, 0x03, 0xdd, + 0x83, 0xea, 0x7e, 0xff, 0xad, 0x43, 0xf6, 0xfc, 0xa6, 0x00, 0xe5, 0x73, 0xcf, 0xff, 0x0a, 0xb3, + 0x57, 0xe1, 0xab, 0x01, 0x25, 0x7e, 0x5b, 0xf2, 0x7e, 0xdc, 0xf8, 0x37, 0x8b, 0xea, 0xff, 0x63, + 0xf1, 0x33, 0xa8, 0xc7, 0x7c, 0x24, 0xfe, 0x49, 0xc3, 0x11, 0xe3, 0x57, 0xe9, 0x45, 0xd7, 0x10, + 0x3d, 0xbd, 0x3a, 0xad, 0x8b, 0x23, 0x0c, 0x44, 0xb8, 0xed, 0xdc, 0x8a, 0x6f, 0xda, 0x7b, 0x5a, + 0x2d, 0xed, 0x69, 0xb5, 0xf3, 0x5d, 0x01, 0x8e, 0xc7, 0x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ool { @@ -1073,35 +1025,6 @@ func (this *SignalPrice) Equal(that interface{}) bool { } return true } -func (this *PendingTriggerTunnels) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PendingTriggerTunnels) - if !ok { - that2, ok := that.(PendingTriggerTunnels) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.IDs) != len(that1.IDs) { - return false - } - for i := range this.IDs { - if this.IDs[i] != that1.IDs[i] { - return false - } - } - return true -} func (this *Packet) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1543,47 +1466,6 @@ func (m *SignalPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PendingTriggerTunnels) 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 *PendingTriggerTunnels) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PendingTriggerTunnels) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.IDs) > 0 { - dAtA5 := make([]byte, len(m.IDs)*10) - var j4 int - for _, num := range m.IDs { - for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j4++ - } - dAtA5[j4] = uint8(num) - j4++ - } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintTunnel(dAtA, i, uint64(j4)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *Packet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1897,22 +1779,6 @@ func (m *SignalPrice) Size() (n int) { return n } -func (m *PendingTriggerTunnels) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.IDs) > 0 { - l = 0 - for _, e := range m.IDs { - l += sovTunnel(uint64(e)) - } - n += 1 + sovTunnel(uint64(l)) + l - } - return n -} - func (m *Packet) Size() (n int) { if m == nil { return 0 @@ -3002,132 +2868,6 @@ func (m *SignalPrice) Unmarshal(dAtA []byte) error { } return nil } -func (m *PendingTriggerTunnels) 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 ErrIntOverflowTunnel - } - 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: PendingTriggerTunnels: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PendingTriggerTunnels: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IDs = append(m.IDs, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.IDs) == 0 { - m.IDs = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IDs = append(m.IDs, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field IDs", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTunnel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Packet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index e01e13f13..824460da7 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -126,6 +126,51 @@ func (m *MsgCreateTunnel) GetCreator() string { return "" } +// MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. +type MsgCreateTunnelResponse struct { + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` +} + +func (m *MsgCreateTunnelResponse) Reset() { *m = MsgCreateTunnelResponse{} } +func (m *MsgCreateTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateTunnelResponse) ProtoMessage() {} +func (*MsgCreateTunnelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{1} +} +func (m *MsgCreateTunnelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateTunnelResponse.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 *MsgCreateTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateTunnelResponse.Merge(m, src) +} +func (m *MsgCreateTunnelResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateTunnelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateTunnelResponse proto.InternalMessageInfo + +func (m *MsgCreateTunnelResponse) GetTunnelID() uint64 { + if m != nil { + return m.TunnelID + } + return 0 +} + // MsgEditTunnel is the transaction message to edit a tunnel. type MsgEditTunnel struct { // tunnel_id is the ID of the tunnel to edit. @@ -142,7 +187,7 @@ func (m *MsgEditTunnel) Reset() { *m = MsgEditTunnel{} } func (m *MsgEditTunnel) String() string { return proto.CompactTextString(m) } func (*MsgEditTunnel) ProtoMessage() {} func (*MsgEditTunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{1} + return fileDescriptor_747f2bf21e50fad9, []int{2} } func (m *MsgEditTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -207,7 +252,7 @@ func (m *MsgEditTunnelResponse) Reset() { *m = MsgEditTunnelResponse{} } func (m *MsgEditTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgEditTunnelResponse) ProtoMessage() {} func (*MsgEditTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{2} + return fileDescriptor_747f2bf21e50fad9, []int{3} } func (m *MsgEditTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -236,51 +281,6 @@ func (m *MsgEditTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEditTunnelResponse proto.InternalMessageInfo -// MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. -type MsgCreateTunnelResponse struct { - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` -} - -func (m *MsgCreateTunnelResponse) Reset() { *m = MsgCreateTunnelResponse{} } -func (m *MsgCreateTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateTunnelResponse) ProtoMessage() {} -func (*MsgCreateTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{3} -} -func (m *MsgCreateTunnelResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateTunnelResponse.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 *MsgCreateTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateTunnelResponse.Merge(m, src) -} -func (m *MsgCreateTunnelResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateTunnelResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateTunnelResponse proto.InternalMessageInfo - -func (m *MsgCreateTunnelResponse) GetTunnelID() uint64 { - if m != nil { - return m.TunnelID - } - return 0 -} - // MsgActivateTunnel is the transaction message to activate a tunnel. type MsgActivateTunnel struct { // tunnel_id is the ID of the tunnel to activate. @@ -651,9 +651,9 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateTunnel)(nil), "tunnel.v1beta1.MsgCreateTunnel") + proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") proto.RegisterType((*MsgEditTunnel)(nil), "tunnel.v1beta1.MsgEditTunnel") proto.RegisterType((*MsgEditTunnelResponse)(nil), "tunnel.v1beta1.MsgEditTunnelResponse") - proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") proto.RegisterType((*MsgActivateTunnel)(nil), "tunnel.v1beta1.MsgActivateTunnel") proto.RegisterType((*MsgActivateTunnelResponse)(nil), "tunnel.v1beta1.MsgActivateTunnelResponse") proto.RegisterType((*MsgDeactivateTunnel)(nil), "tunnel.v1beta1.MsgDeactivateTunnel") @@ -667,62 +667,62 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 867 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x9b, 0xb4, 0x9b, 0x4c, 0x42, 0x61, 0xbd, 0xa1, 0x71, 0x5c, 0xd5, 0x09, 0x46, 0xcb, + // 869 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0x9b, 0xb4, 0x9b, 0x4c, 0x42, 0x61, 0xbd, 0xa1, 0x71, 0x5c, 0xd5, 0x09, 0x46, 0xcb, 0xa6, 0xbb, 0xaa, 0x4d, 0xc3, 0xc2, 0x81, 0x5b, 0xd3, 0x82, 0x94, 0x43, 0x24, 0xe4, 0x2d, 0xd2, 0x8a, 0x03, 0xd1, 0x24, 0x9e, 0x4c, 0x2d, 0x92, 0x99, 0xc8, 0x33, 0x89, 0x36, 0x57, 0x8e, 0x9c, - 0xf8, 0x03, 0x1c, 0x10, 0x07, 0xa4, 0x3d, 0xed, 0x61, 0x7f, 0x01, 0xa7, 0x15, 0xa7, 0x15, 0x27, - 0x4e, 0x05, 0xa5, 0x87, 0xfe, 0x03, 0xce, 0xc8, 0x9e, 0x89, 0x9d, 0xb8, 0xa6, 0x4d, 0x85, 0xd4, - 0x4b, 0xec, 0x99, 0xef, 0x7b, 0x33, 0xdf, 0xf7, 0xde, 0x3c, 0x4f, 0x40, 0x85, 0x4f, 0x08, 0x41, - 0x43, 0x7b, 0x7a, 0xd8, 0x43, 0x1c, 0x1e, 0xda, 0xfc, 0x85, 0x35, 0xf6, 0x29, 0xa7, 0xea, 0xb6, - 0x00, 0x2c, 0x09, 0xe8, 0x55, 0x4c, 0x29, 0x1e, 0x22, 0x3b, 0x44, 0x7b, 0x93, 0x81, 0x0d, 0xc9, - 0x4c, 0x50, 0xf5, 0x32, 0xa6, 0x98, 0x86, 0xaf, 0x76, 0xf0, 0x26, 0x67, 0x77, 0x13, 0x2b, 0x8f, - 0xa1, 0x0f, 0x47, 0x4c, 0x82, 0xd5, 0x3e, 0x65, 0x23, 0xca, 0xba, 0x22, 0x4a, 0x0c, 0x24, 0x64, - 0x88, 0x91, 0xdd, 0x83, 0x0c, 0x45, 0xc1, 0x7d, 0xea, 0x11, 0x89, 0x57, 0x24, 0x3e, 0x62, 0xd8, - 0x9e, 0x1e, 0x06, 0x0f, 0x09, 0xdc, 0x87, 0x23, 0x8f, 0x50, 0x3b, 0xfc, 0xfd, 0x0f, 0x0d, 0xd2, - 0x93, 0xd4, 0x30, 0x40, 0xc8, 0x65, 0x11, 0x16, 0x8e, 0x04, 0x64, 0xfe, 0x92, 0x05, 0xef, 0x76, - 0x18, 0x3e, 0xf6, 0x11, 0xe4, 0xe8, 0x34, 0x0c, 0x52, 0x8f, 0x41, 0x89, 0x79, 0x98, 0xc0, 0x61, - 0xd7, 0x23, 0x03, 0xca, 0x34, 0xa5, 0x9e, 0x6d, 0x14, 0x9b, 0xba, 0xb5, 0x9a, 0x27, 0xeb, 0x59, - 0xc8, 0x69, 0x93, 0x01, 0x6d, 0xe5, 0xde, 0x9c, 0xd7, 0x32, 0x4e, 0x91, 0x45, 0x33, 0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, 0xe0, 0x47, 0x02, 0xf7, 0xe1, 0xc8, 0x23, 0xd4, 0x0e, 0xff, 0xfe, 0x87, 0x06, 0x99, + 0x93, 0xd4, 0x30, 0x40, 0xc8, 0x65, 0x11, 0x16, 0xae, 0x04, 0x64, 0xfe, 0x92, 0x05, 0xef, 0x76, + 0x18, 0x3e, 0xf6, 0x11, 0xe4, 0xe8, 0x34, 0x74, 0x52, 0x8f, 0x41, 0x89, 0x79, 0x98, 0xc0, 0x61, + 0xd7, 0x23, 0x03, 0xca, 0x34, 0xa5, 0x9e, 0x6d, 0x14, 0x9b, 0xba, 0xb5, 0x5a, 0x27, 0xeb, 0x59, + 0xc8, 0x69, 0x93, 0x01, 0x6d, 0xe5, 0xde, 0x5c, 0xd4, 0x32, 0x4e, 0x91, 0x45, 0x16, 0xa6, 0xea, + 0x20, 0xef, 0x11, 0x8e, 0xfc, 0x29, 0x1c, 0x6a, 0x1b, 0x75, 0xa5, 0x91, 0x73, 0xa2, 0xb5, 0xfa, + 0x29, 0xd8, 0xf4, 0xe9, 0x84, 0x23, 0x2d, 0x5b, 0x57, 0x1a, 0xc5, 0x66, 0xd9, 0x12, 0x15, 0xb7, + 0x16, 0x15, 0xb7, 0x8e, 0xc8, 0xac, 0x55, 0xf8, 0xfd, 0xf5, 0xc1, 0xa6, 0x13, 0xd0, 0x1c, 0xc1, + 0x56, 0x9f, 0x82, 0x42, 0x20, 0xbd, 0xcb, 0x67, 0x63, 0xa4, 0xe5, 0xea, 0x4a, 0x63, 0xbb, 0x59, + 0xb1, 0x44, 0x32, 0x0b, 0x4d, 0x5f, 0x22, 0xe4, 0x9e, 0xce, 0xc6, 0xc8, 0xc9, 0x0f, 0xe4, 0x97, + 0x8a, 0xc0, 0x3d, 0x17, 0x8d, 0x29, 0xf3, 0xb8, 0xb6, 0x19, 0x26, 0x52, 0xb5, 0x64, 0x17, 0x82, + 0xba, 0x47, 0x9e, 0xc7, 0xd4, 0x23, 0xad, 0x8f, 0x83, 0x3c, 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0x8a, 0xe3, 0x2a, 0x45, 0xdf, 0xbf, 0x95, 0x12, + 0xc5, 0x77, 0xc1, 0x7b, 0xd7, 0x0e, 0xda, 0x87, 0x29, 0xee, 0x49, 0x92, 0xfe, 0x64, 0x0d, 0x52, + 0xb4, 0xcb, 0x08, 0x3c, 0x48, 0x3b, 0x0b, 0x1f, 0xa5, 0xc4, 0x48, 0xe1, 0xe9, 0xd6, 0x7a, 0xbc, + 0x68, 0xbb, 0xe7, 0xa0, 0xb4, 0x32, 0xae, 0x69, 0x2d, 0x5e, 0x26, 0xa4, 0xb6, 0x38, 0x6d, 0x88, + 0x5a, 0xed, 0x37, 0x73, 0x43, 0x39, 0x9f, 0x1b, 0xca, 0xdf, 0x73, 0x43, 0xf9, 0xf1, 0xd2, 0xc8, + 0x9c, 0x5f, 0x1a, 0x99, 0x3f, 0x2f, 0x8d, 0xcc, 0x37, 0xf6, 0xd2, 0xd3, 0xda, 0x83, 0xc4, 0x0d, + 0xdf, 0xfc, 0x3e, 0x1d, 0xda, 0xfd, 0x33, 0xe8, 0x11, 0x7b, 0xda, 0xb4, 0x5f, 0xc8, 0x7f, 0x5e, + 0xc4, 0x3b, 0xdb, 0xdb, 0x0a, 0x19, 0x9f, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xef, 0x25, 0x23, + 0x70, 0xc0, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1077,6 +1077,34 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgCreateTunnelResponse) 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 *MsgCreateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *MsgEditTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1154,34 +1182,6 @@ func (m *MsgEditTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgCreateTunnelResponse) 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 *MsgCreateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TunnelID != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *MsgActivateTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1465,6 +1465,18 @@ func (m *MsgCreateTunnel) Size() (n int) { return n } +func (m *MsgCreateTunnelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTx(uint64(m.TunnelID)) + } + return n +} + func (m *MsgEditTunnel) Size() (n int) { if m == nil { return 0 @@ -1499,18 +1511,6 @@ func (m *MsgEditTunnelResponse) Size() (n int) { return n } -func (m *MsgCreateTunnelResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TunnelID != 0 { - n += 1 + sovTx(uint64(m.TunnelID)) - } - return n -} - func (m *MsgActivateTunnel) Size() (n int) { if m == nil { return 0 @@ -1840,6 +1840,75 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCreateTunnelResponse) 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: MsgCreateTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgEditTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2044,75 +2113,6 @@ func (m *MsgEditTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateTunnelResponse) 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: MsgCreateTunnelResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) - } - m.TunnelID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TunnelID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 *MsgActivateTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From b13e9f23da41e5bba2da7129cda5d0ba0f85d894 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 3 Sep 2024 13:44:13 +0700 Subject: [PATCH 069/272] fix review --- proto/tunnel/v1beta1/genesis.proto | 4 +- x/tunnel/client/cli/query.go | 5 +- x/tunnel/genesis.go | 22 +++- x/tunnel/keeper/msg_server.go | 8 +- x/tunnel/keeper/packet.go | 34 +++++-- x/tunnel/types/genesis.go | 4 +- x/tunnel/types/genesis.pb.go | 157 ++++------------------------- 7 files changed, 69 insertions(+), 165 deletions(-) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index 8c0e0a1ad..3ecba9a3d 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -15,8 +15,6 @@ message GenesisState { uint64 tunnel_count = 2; // tunnels is the list of tunnels. repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; - // active_tunnel_ids is the list of active tunnel IDs. - repeated uint64 active_tunnel_ids = 4 [(gogoproto.customname) = "ActiveTunnelIDs"]; // signal_prices_infos is the signal prices info. - repeated SignalPricesInfo signal_prices_infos = 5 [(gogoproto.nullable) = false]; + repeated SignalPricesInfo signal_prices_infos = 4 [(gogoproto.nullable) = false]; } diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index 8867bc2a5..c84468519 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -1,7 +1,6 @@ package cli import ( - "context" "strconv" "github.com/cosmos/cosmos-sdk/client" @@ -53,7 +52,7 @@ func GetQueryCmdTunnel() *cobra.Command { return err } - res, err := queryClient.Tunnel(context.Background(), &types.QueryTunnelRequest{ + res, err := queryClient.Tunnel(cmd.Context(), &types.QueryTunnelRequest{ TunnelId: tunnelID, }) if err != nil { @@ -102,7 +101,7 @@ func GetQueryCmdTunnels() *cobra.Command { statusFilter = types.TUNNEL_STATUS_FILTER_INACTIVE } - res, err := queryClient.Tunnels(context.Background(), &types.QueryTunnelsRequest{ + res, err := queryClient.Tunnels(cmd.Context(), &types.QueryTunnelsRequest{ IsActive: statusFilter, Pagination: pageReq, }) diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 0ce41b2a4..d1c08d0c1 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -31,6 +31,17 @@ func ValidateGenesis(data *types.GenesisState) error { } } + // validate the signal prices infos + for _, signalPricesInfo := range data.SignalPricesInfos { + if signalPricesInfo.TunnelID == 0 { + return types.ErrInvalidGenesis.Wrapf( + "TunnelID %d cannot be 0 or greater than the TunnelCount %d", + signalPricesInfo.TunnelID, + data.TunnelCount, + ) + } + } + return data.Params.Validate() } @@ -53,13 +64,19 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { // set the tunnel count k.SetTunnelCount(ctx, data.TunnelCount) + // create the active tunnel IDs + activeTunnelIDs := make([]uint64, data.TunnelCount) + // set the tunnels - for _, tunnel := range data.Tunnels { + for i, tunnel := range data.Tunnels { + if tunnel.IsActive { + activeTunnelIDs[i] = tunnel.ID + } k.SetTunnel(ctx, tunnel) } // set the active tunnel IDs - k.SetActiveTunnelIDs(ctx, data.ActiveTunnelIDs) + k.SetActiveTunnelIDs(ctx, activeTunnelIDs) // set the signal prices infos for _, signalPricesInfo := range data.SignalPricesInfos { @@ -73,7 +90,6 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { Params: k.GetParams(ctx), TunnelCount: k.GetTunnelCount(ctx), Tunnels: k.GetTunnels(ctx), - ActiveTunnelIDs: k.MustGetActiveTunnelIDs(ctx), SignalPricesInfos: k.GetSignalPricesInfos(ctx), } } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index db586b22b..2da5544dc 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -197,14 +197,8 @@ func (ms msgServer) ManualTriggerTunnel( ) } - // Get signal prices info - signalPricesInfo, err := ms.Keeper.GetSignalPricesInfo(ctx, tunnel.ID) - if err != nil { - return nil, err - } - // Produce packet with trigger all signals - err = ms.Keeper.ProducePacket(ctx, tunnel, signalPricesInfo, true) + err = ms.Keeper.ProducePacket(ctx, tunnel.ID, true) if err != nil { return nil, err } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index ca9758a9c..77905c204 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -2,8 +2,8 @@ package keeper import ( "fmt" - "math" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" @@ -51,7 +51,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+signalPricesInfo.LastIntervalTimestamp // produce packet - err := k.ProducePacket(ctx, tunnel, signalPricesInfo, intervalTrigger) + err := k.ProducePacket(ctx, id, intervalTrigger) if err != nil { // emit send packet fail event ctx.EventManager().EmitEvent(sdk.NewEvent( @@ -68,16 +68,22 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // ProducePacket generates a packet and sends it to the destination route func (k Keeper) ProducePacket( ctx sdk.Context, - tunnel types.Tunnel, - signalPricesInfo types.SignalPricesInfo, + tunnelID uint64, triggerAll bool, ) error { unixNow := ctx.BlockTime().Unix() + // get tunnel and signal prices info + tunnel := k.MustGetTunnel(ctx, tunnelID) + signalPricesInfo := k.MustGetSignalPricesInfo(ctx, tunnelID) + // TODO: feeds module needs to be implemented get prices that can use latestPrices := k.feedsKeeper.GetPrices(ctx) latestPricesMap := createLatestPricesMap(latestPrices) + // check if the interval has passed + intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+signalPricesInfo.LastIntervalTimestamp + // generate new signal prices nsps := GenerateSignalPrices( ctx, @@ -85,7 +91,7 @@ func (k Keeper) ProducePacket( latestPricesMap, tunnel.GetSignalInfoMap(), signalPricesInfo.SignalPrices, - triggerAll, + triggerAll || intervalTrigger, ) if len(nsps) > 0 { err := k.SendPacket(ctx, tunnel, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow)) @@ -95,7 +101,7 @@ func (k Keeper) ProducePacket( // update signal prices info signalPricesInfo.UpdateSignalPrices(nsps) - if triggerAll { + if triggerAll || intervalTrigger { signalPricesInfo.LastIntervalTimestamp = unixNow } k.SetSignalPricesInfo(ctx, signalPricesInfo) @@ -168,7 +174,12 @@ func GenerateSignalPrices( } // if triggerAll is true or the deviation exceeds the threshold, add the signal price info to the list - if triggerAll || deviationExceedsThreshold(sp.Price, latestPrice.Price, signalInfo.HardDeviationBPS) { + if triggerAll || + deviationExceedsThreshold( + sdk.NewIntFromUint64(sp.Price), + sdk.NewIntFromUint64(latestPrice.Price), + sdk.NewIntFromUint64(signalInfo.HardDeviationBPS), + ) { sps = append( sps, types.NewSignalPrice( @@ -183,12 +194,13 @@ func GenerateSignalPrices( } // deviationExceedsThreshold checks if the deviation between the old price and the new price exceeds the threshold -func deviationExceedsThreshold(oldPrice, newPrice uint64, thresholdBPS uint64) bool { +func deviationExceedsThreshold(oldPrice, newPrice, thresholdBPS sdkmath.Int) bool { // if the deviation is greater than the hard deviation, add the signal price info to the list // soft deviation is the feature to be implemented in the future - deviation := math.Abs(float64(newPrice-oldPrice)) / float64(oldPrice) - deviationInBPS := uint64(deviation * 10000) - return deviationInBPS >= thresholdBPS + deviation := newPrice.Sub(oldPrice).Abs().Quo(oldPrice) + + deviationInBPS := deviation.MulRaw(10000) + return deviationInBPS.GTE(thresholdBPS) } // createLatestPricesMap creates a map of latest prices with signal ID as the key diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 96176e493..f177b0043 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -5,19 +5,17 @@ func NewGenesisState( params Params, tunnelCount uint64, tunnels []Tunnel, - activeTunnelIDs []uint64, signalPricesInfos []SignalPricesInfo, ) *GenesisState { return &GenesisState{ Params: params, TunnelCount: tunnelCount, Tunnels: tunnels, - ActiveTunnelIDs: activeTunnelIDs, SignalPricesInfos: signalPricesInfos, } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []uint64{}, []SignalPricesInfo{}) + return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []SignalPricesInfo{}) } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 7ace324a2..fad6bed19 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -31,10 +31,8 @@ type GenesisState struct { TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` // tunnels is the list of tunnels. Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` - // active_tunnel_ids is the list of active tunnel IDs. - ActiveTunnelIDs []uint64 `protobuf:"varint,4,rep,packed,name=active_tunnel_ids,json=activeTunnelIds,proto3" json:"active_tunnel_ids,omitempty"` // signal_prices_infos is the signal prices info. - SignalPricesInfos []SignalPricesInfo `protobuf:"bytes,5,rep,name=signal_prices_infos,json=signalPricesInfos,proto3" json:"signal_prices_infos"` + SignalPricesInfos []SignalPricesInfo `protobuf:"bytes,4,rep,name=signal_prices_infos,json=signalPricesInfos,proto3" json:"signal_prices_infos"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -91,13 +89,6 @@ func (m *GenesisState) GetTunnels() []Tunnel { return nil } -func (m *GenesisState) GetActiveTunnelIDs() []uint64 { - if m != nil { - return m.ActiveTunnelIDs - } - return nil -} - func (m *GenesisState) GetSignalPricesInfos() []SignalPricesInfo { if m != nil { return m.SignalPricesInfos @@ -112,29 +103,26 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4e, 0xc2, 0x40, - 0x14, 0x45, 0x5b, 0xa8, 0x98, 0x0c, 0x44, 0x42, 0x31, 0xa6, 0x41, 0x53, 0xaa, 0x2b, 0x56, 0x9d, - 0x80, 0xc6, 0xad, 0x11, 0x4d, 0x0c, 0x3b, 0x02, 0xc6, 0x85, 0x9b, 0x66, 0x5a, 0x86, 0x32, 0x09, - 0xcc, 0x34, 0xbc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, 0xaa, 0x03, 0x4b, 0x39, 0x99, 0x46, 0xd9, - 0x9c, 0x25, 0x14, 0x22, 0xc6, 0xc7, 0x02, 0xbc, 0x03, 0x55, 0x22, 0xd8, 0x2f, 0x31, 0x54, 0x68, - 0x5f, 0x91, 0x3d, 0x3e, 0x16, 0xa6, 0x4e, 0x0d, 0xf6, 0x74, 0xe8, 0xf6, 0x56, 0xb9, 0x6f, 0xaf, - 0x73, 0xdf, 0xfe, 0xcc, 0x7d, 0xfb, 0x6d, 0xeb, 0x5b, 0xeb, 0xad, 0x6f, 0x7d, 0x6c, 0x7d, 0xeb, - 0x19, 0xa7, 0x4c, 0x4e, 0x16, 0x71, 0x98, 0x88, 0x19, 0x8e, 0x09, 0x1f, 0xa9, 0x5f, 0x9d, 0x88, - 0x29, 0x4e, 0x26, 0x84, 0x71, 0xbc, 0xec, 0xe0, 0x17, 0xf3, 0x0a, 0x58, 0xbe, 0x66, 0x14, 0xe2, - 0x92, 0x22, 0x2e, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x33, 0x13, 0x0d, 0x0c, 0x02, 0x00, - 0x00, + // 299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xfb, 0x30, + 0x1c, 0xc7, 0x9b, 0xff, 0xca, 0xfe, 0x90, 0x0d, 0xc1, 0x2a, 0x52, 0xa6, 0xc4, 0xea, 0x69, 0xa7, + 0x86, 0x4d, 0xf1, 0x01, 0xe6, 0x41, 0x76, 0x1b, 0x9b, 0x78, 0xf0, 0x52, 0xd2, 0x9a, 0x65, 0x81, + 0x2e, 0x29, 0x4d, 0x3a, 0xf4, 0x2d, 0x7c, 0xac, 0x1d, 0x77, 0xf4, 0x24, 0xd2, 0x3e, 0x84, 0x57, + 0x59, 0x12, 0x0f, 0x16, 0xbd, 0xe5, 0xf7, 0xfd, 0x7e, 0xf2, 0x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71, 0x26, 0xd7, 0x38, 0x25, 0xe2, 0xc9, 0x6c, 0x2a, 0x93, 0x39, 0xce, 0x56, 0x84, 0x0b, 0xbc, + 0x19, 0xe3, 0x67, 0xb7, 0x44, 0xac, 0x5f, 0x0a, 0xaa, 0xd2, 0xae, 0x21, 0xae, 0xbe, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xb0, 0x15, 0x9d, 0x41, 0xcb, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -168,27 +156,9 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } - if len(m.ActiveTunnelIDs) > 0 { - dAtA2 := make([]byte, len(m.ActiveTunnelIDs)*10) - var j1 int - for _, num := range m.ActiveTunnelIDs { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintGenesis(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x22 - } if len(m.Tunnels) > 0 { for iNdEx := len(m.Tunnels) - 1; iNdEx >= 0; iNdEx-- { { @@ -249,13 +219,6 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.ActiveTunnelIDs) > 0 { - l = 0 - for _, e := range m.ActiveTunnelIDs { - l += sovGenesis(uint64(e)) - } - n += 1 + sovGenesis(uint64(l)) + l - } if len(m.SignalPricesInfos) > 0 { for _, e := range m.SignalPricesInfos { l = e.Size() @@ -387,82 +350,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ActiveTunnelIDs = append(m.ActiveTunnelIDs, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.ActiveTunnelIDs) == 0 { - m.ActiveTunnelIDs = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ActiveTunnelIDs = append(m.ActiveTunnelIDs, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveTunnelIDs", wireType) - } - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SignalPricesInfos", wireType) } From 3c182dd980a6a6cdc53c1b2c379de82d64ea0ab5 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 3 Sep 2024 15:12:00 +0700 Subject: [PATCH 070/272] reduce code --- x/tunnel/keeper/msg_server.go | 2 ++ x/tunnel/keeper/packet.go | 13 +++---------- x/tunnel/types/params.go | 4 ++-- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 2da5544dc..1ad3aed80 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -128,6 +128,8 @@ func (ms msgServer) ActivateTunnel( return nil, err } + // TODO: check deposit with params, transfer deposit to module account + if req.Creator != tunnel.Creator { return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 77905c204..3189be3e8 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -44,20 +44,13 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // check for active tunnels for _, id := range ids { - tunnel := k.MustGetTunnel(ctx, id) - signalPricesInfo := k.MustGetSignalPricesInfo(ctx, tunnel.ID) - - // check if the interval has passed - intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+signalPricesInfo.LastIntervalTimestamp - // produce packet - err := k.ProducePacket(ctx, id, intervalTrigger) + err := k.ProducePacket(ctx, id, false) if err != nil { // emit send packet fail event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeProducePacketFail, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), - sdk.NewAttribute(types.AttributeKeyRoute, fmt.Sprintf("%v", tunnel.Route)), + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", id)), sdk.NewAttribute(types.AttributeKeyReason, err.Error()), )) continue @@ -96,7 +89,7 @@ func (k Keeper) ProducePacket( if len(nsps) > 0 { err := k.SendPacket(ctx, tunnel, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow)) if err != nil { - return err + return fmt.Errorf("route %s failed to send packet: %w", tunnel.Route.TypeUrl, err) } // update signal prices info diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 7e4bff1d6..73e919e5c 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -10,9 +10,9 @@ import ( var ( DefaultMinInterval = uint64(1) - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("band", 1000000)) DefaultMaxSignals = uint64(100) - DefaultBaseFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) + DefaultBaseFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) ) // NewParams creates a new Params instance From 71c28565328df31162deb2a505a2b278ae27be60 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 4 Sep 2024 14:06:28 +0700 Subject: [PATCH 071/272] update params --- proto/tunnel/v1beta1/params.proto | 2 +- x/tunnel/keeper/keeper.go | 9 ++++ x/tunnel/types/params.go | 24 +++++------ x/tunnel/types/params.pb.go | 72 +++++++++++++++---------------- 4 files changed, 58 insertions(+), 49 deletions(-) diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto index 078a53395..ddf47ea3a 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/tunnel/v1beta1/params.proto @@ -19,6 +19,6 @@ message Params { // max_signals defines the maximum number of signals allowed per tunnel. uint64 max_signals = 3; // base_fee is the base fee for each tunnel - repeated cosmos.base.v1beta1.Coin base_fee = 4 + repeated cosmos.base.v1beta1.Coin base_packet_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index ddc74b524..13a80a47a 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -71,6 +71,15 @@ func (k Keeper) SetModuleAccount(ctx sdk.Context, acc authtypes.ModuleAccountI) k.authKeeper.SetModuleAccount(ctx, acc) } +// DeductBaseFee deducts the base fee from fee payer's account. +func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) error { + basePacketFee := k.GetParams(ctx).BasePacketFee + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, basePacketFee); err != nil { + return err + } + return nil +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 73e919e5c..0841c5b7c 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -9,10 +9,10 @@ import ( ) var ( - DefaultMinInterval = uint64(1) - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("band", 1000000)) - DefaultMaxSignals = uint64(100) - DefaultBaseFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) + DefaultMinInterval = uint64(1) + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("band", 1000000)) + DefaultMaxSignals = uint64(100) + DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) ) // NewParams creates a new Params instance @@ -20,13 +20,13 @@ func NewParams( minDeposit sdk.Coins, minInterval uint64, maxSignals uint64, - baseFee sdk.Coins, + basePacketFee sdk.Coins, ) Params { return Params{ - MinDeposit: minDeposit, - MinInterval: minInterval, - MaxSignals: maxSignals, - BaseFee: baseFee, + MinDeposit: minDeposit, + MinInterval: minInterval, + MaxSignals: maxSignals, + BasePacketFee: basePacketFee, } } @@ -36,7 +36,7 @@ func DefaultParams() Params { DefaultMinDeposit, DefaultMinInterval, DefaultMaxSignals, - DefaultBaseFee, + DefaultBasePacketFee, ) } @@ -58,8 +58,8 @@ func (p Params) Validate() error { } // Validate BaseFee - if !p.BaseFee.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf(p.BaseFee.String()) + if !p.BasePacketFee.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf(p.BasePacketFee.String()) } return nil diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 61b9862a7..76df5389c 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -34,7 +34,7 @@ type Params struct { // max_signals defines the maximum number of signals allowed per tunnel. MaxSignals uint64 `protobuf:"varint,3,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` // base_fee is the base fee for each tunnel - BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` + BasePacketFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_packet_fee,json=basePacketFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_packet_fee"` } func (m *Params) Reset() { *m = Params{} } @@ -90,9 +90,9 @@ func (m *Params) GetMaxSignals() uint64 { return 0 } -func (m *Params) GetBaseFee() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *Params) GetBasePacketFee() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.BaseFee + return m.BasePacketFee } return nil } @@ -104,28 +104,28 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/params.proto", fileDescriptor_a7b5eedd244355eb) } var fileDescriptor_a7b5eedd244355eb = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xb1, 0x4e, 0x02, 0x31, - 0x1c, 0xc6, 0xaf, 0x40, 0x90, 0x14, 0xe3, 0x70, 0x71, 0x38, 0x31, 0xe9, 0xa1, 0x13, 0x8b, 0xad, - 0xe0, 0xe6, 0x88, 0xc6, 0x84, 0xcd, 0xe0, 0xe6, 0x42, 0x7a, 0x47, 0x39, 0x1a, 0xaf, 0xed, 0x85, - 0x16, 0x82, 0x6f, 0xe1, 0xe8, 0xc8, 0x6c, 0x7c, 0x10, 0x46, 0x46, 0x27, 0x35, 0xb0, 0xf8, 0x18, - 0xa6, 0xed, 0x69, 0x7c, 0x00, 0xa7, 0x36, 0xff, 0xef, 0xeb, 0xef, 0xfb, 0xd2,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ab, 0x18, 0xf4, 0x07, 0xeb, 0x2d, 0x02, 0x9b, 0x2d, 0x02, 0x9f, 0x5b, - 0x04, 0x9e, 0x76, 0x28, 0xd8, 0xec, 0x50, 0xf0, 0xb6, 0x43, 0xc1, 0x3d, 0xf9, 0x83, 0x4d, 0xa8, - 0x1c, 0xbb, 0xef, 0x4d, 0x55, 0x4e, 0xd2, 0x29, 0xe5, 0x92, 0x2c, 0x7a, 0x64, 0x49, 0xca, 0x75, - 0xba, 0x8c, 0xa4, 0xee, 0x1c, 0x17, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x09, 0x5d, 0x1b, 0xe4, - 0xe5, 0x01, 0x00, 0x00, + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x31, 0x4e, 0xf3, 0x30, + 0x1c, 0xc5, 0x93, 0xb6, 0xaa, 0x3e, 0xb9, 0x1f, 0x20, 0x45, 0x0c, 0xa1, 0x48, 0x4e, 0x61, 0xea, + 0x42, 0x4c, 0xcb, 0xc6, 0x58, 0x10, 0x52, 0xb7, 0xaa, 0x6c, 0x2c, 0x91, 0xe3, 0x9a, 0xd4, 0x6a, + 0x6c, 0x47, 0xb5, 0x5b, 0x95, 0x5b, 0x30, 0x32, 0x76, 0xe6, 0x06, 0xdc, 0xa0, 0x63, 0x47, 0x26, + 0x40, 0xcd, 0xc2, 0x31, 0x90, 0xed, 0x80, 0x38, 0x00, 0x93, 0xad, 0xff, 0x7b, 0xfe, 0xbd, 0x27, + 0xff, 0xc1, 0xb1, 0x5e, 0x08, 0x41, 0x73, 0xb4, 0xec, 0xa5, 0x54, 0xe3, 0x1e, 0x2a, 0xf0, 0x1c, + 0x73, 0x15, 0x17, 0x73, 0xa9, 0x65, 0xb0, 0xef, 0xc4, 0xb8, 0x12, 0xdb, 0x87, 0x99, 0xcc, 0xa4, + 0x95, 0x90, 0xb9, 0x39, 0x57,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0x62, 0xff, 0x9a, 0xc8, + 0x1c, 0x91, 0x29, 0x66, 0x02, 0x2d, 0xfb, 0x68, 0x85, 0xaa, 0xdd, 0xda, 0xa4, 0xb4, 0x69, 0x1d, + 0x17, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x54, 0xc7, 0x3d, 0xf2, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -161,11 +161,11 @@ func (this *Params) Equal(that interface{}) bool { if this.MaxSignals != that1.MaxSignals { return false } - if len(this.BaseFee) != len(that1.BaseFee) { + if len(this.BasePacketFee) != len(that1.BasePacketFee) { return false } - for i := range this.BaseFee { - if !this.BaseFee[i].Equal(&that1.BaseFee[i]) { + for i := range this.BasePacketFee { + if !this.BasePacketFee[i].Equal(&that1.BasePacketFee[i]) { return false } } @@ -191,10 +191,10 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.BaseFee) > 0 { - for iNdEx := len(m.BaseFee) - 1; iNdEx >= 0; iNdEx-- { + if len(m.BasePacketFee) > 0 { + for iNdEx := len(m.BasePacketFee) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.BaseFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.BasePacketFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -261,8 +261,8 @@ func (m *Params) Size() (n int) { if m.MaxSignals != 0 { n += 1 + sovParams(uint64(m.MaxSignals)) } - if len(m.BaseFee) > 0 { - for _, e := range m.BaseFee { + if len(m.BasePacketFee) > 0 { + for _, e := range m.BasePacketFee { l = e.Size() n += 1 + l + sovParams(uint64(l)) } @@ -379,7 +379,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BasePacketFee", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -406,8 +406,8 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BaseFee = append(m.BaseFee, types.Coin{}) - if err := m.BaseFee[len(m.BaseFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.BasePacketFee = append(m.BasePacketFee, types.Coin{}) + if err := m.BasePacketFee[len(m.BasePacketFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From 9002847ea8412a73048ca414c6433c91fa1a2045 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 4 Sep 2024 15:45:25 +0700 Subject: [PATCH 072/272] fix review --- x/tunnel/genesis.go | 13 ++------- x/tunnel/keeper/msg_server.go | 6 +++- x/tunnel/keeper/packet.go | 13 +++++---- x/tunnel/keeper/tunnel.go | 54 +++++++++++------------------------ x/tunnel/types/keys.go | 6 +++- x/tunnel/types/signal.go | 16 +++++++---- 6 files changed, 46 insertions(+), 62 deletions(-) diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index d1c08d0c1..41eea0e22 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -64,20 +64,11 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { // set the tunnel count k.SetTunnelCount(ctx, data.TunnelCount) - // create the active tunnel IDs - activeTunnelIDs := make([]uint64, data.TunnelCount) - // set the tunnels - for i, tunnel := range data.Tunnels { - if tunnel.IsActive { - activeTunnelIDs[i] = tunnel.ID - } - k.SetTunnel(ctx, tunnel) + for _, tunnel := range data.Tunnels { + k.ActiveTunnelID(ctx, tunnel.ID) } - // set the active tunnel IDs - k.SetActiveTunnelIDs(ctx, activeTunnelIDs) - // set the signal prices infos for _, signalPricesInfo := range data.SignalPricesInfos { k.SetSignalPricesInfo(ctx, signalPricesInfo) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 1ad3aed80..662e7f983 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -199,8 +199,12 @@ func (ms msgServer) ManualTriggerTunnel( ) } + // TODO: feeds module needs to be implemented get prices that can use + latestPrices := ms.Keeper.feedsKeeper.GetPrices(ctx) + latestPricesMap := createLatestPricesMap(latestPrices) + // Produce packet with trigger all signals - err = ms.Keeper.ProducePacket(ctx, tunnel.ID, true) + err = ms.Keeper.ProducePacket(ctx, tunnel.ID, latestPricesMap, true) if err != nil { return nil, err } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 3189be3e8..39b8858c3 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -40,12 +40,16 @@ func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) ty // ProduceActiveTunnelPackets generates packets and sends packets to the destination route for all active tunnels func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // get active tunnel IDs - ids := k.MustGetActiveTunnelIDs(ctx) + ids := k.GetActiveTunnelIDs(ctx) + + // TODO: feeds module needs to be implemented get prices that can use + latestPrices := k.feedsKeeper.GetPrices(ctx) + latestPricesMap := createLatestPricesMap(latestPrices) // check for active tunnels for _, id := range ids { // produce packet - err := k.ProducePacket(ctx, id, false) + err := k.ProducePacket(ctx, id, latestPricesMap, false) if err != nil { // emit send packet fail event ctx.EventManager().EmitEvent(sdk.NewEvent( @@ -62,6 +66,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { func (k Keeper) ProducePacket( ctx sdk.Context, tunnelID uint64, + latestPricesMap map[string]feedstypes.Price, triggerAll bool, ) error { unixNow := ctx.BlockTime().Unix() @@ -70,10 +75,6 @@ func (k Keeper) ProducePacket( tunnel := k.MustGetTunnel(ctx, tunnelID) signalPricesInfo := k.MustGetSignalPricesInfo(ctx, tunnelID) - // TODO: feeds module needs to be implemented get prices that can use - latestPrices := k.feedsKeeper.GetPrices(ctx) - latestPricesMap := createLatestPricesMap(latestPrices) - // check if the interval has passed intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+signalPricesInfo.LastIntervalTimestamp diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index a2d322548..4e02fbe5c 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -131,27 +131,25 @@ func (k Keeper) GetTunnels(ctx sdk.Context) []types.Tunnel { return tunnels } -// SetActiveTunnelIDs sets the active tunnel IDs in the store -func (k Keeper) SetActiveTunnelIDs(ctx sdk.Context, ids []uint64) { - ctx.KVStore(k.storeKey).Set(types.ActiveTunnelIDsStoreKey, k.cdc.MustMarshal(&types.ActiveTunnelIDs{IDs: ids})) +// ActiveTunnelID sets the active tunnel ID in the store +func (k Keeper) ActiveTunnelID(ctx sdk.Context, tunnelID uint64) { + ctx.KVStore(k.storeKey).Set(types.ActiveTunnelIDStoreKey(tunnelID), []byte{0x01}) } -// GetActiveTunnelIDs retrieves the active tunnel IDs from the store -func (k Keeper) GetActiveTunnelIDs(ctx sdk.Context) ([]uint64, error) { - bz := ctx.KVStore(k.storeKey).Get(types.ActiveTunnelIDsStoreKey) - if bz == nil { - return []uint64{}, types.ErrActiveTunnelIDsNotFound - } - var activeTunnelIDs types.ActiveTunnelIDs - k.cdc.MustUnmarshal(bz, &activeTunnelIDs) - return activeTunnelIDs.IDs, nil +// DeactivateTunnelID deactivates the tunnel ID in the store +func (k Keeper) DeactivateTunnelID(ctx sdk.Context, tunnelID uint64) { + ctx.KVStore(k.storeKey).Delete(types.ActiveTunnelIDStoreKey(tunnelID)) } -// MustGetActiveTunnelIDs retrieves the active tunnel IDs from the store and panics if the IDs do not exist -func (k Keeper) MustGetActiveTunnelIDs(ctx sdk.Context) []uint64 { - ids, err := k.GetActiveTunnelIDs(ctx) - if err != nil { - panic(err) +// GetActiveTunnelIDs retrieves the active tunnel IDs from the store +func (k Keeper) GetActiveTunnelIDs(ctx sdk.Context) []uint64 { + var ids []uint64 + iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.ActiveTunnelIDStoreKeyPrefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + id := sdk.BigEndianToUint64(iterator.Key()[1:]) + ids = append(ids, id) } return ids } @@ -172,13 +170,7 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { tunnel.IsActive = true // Add the tunnel ID to the active tunnel IDs - activeTunnelIDs, err := k.GetActiveTunnelIDs(ctx) - if err != nil { - return err - } - - activeTunnelIDs = append(activeTunnelIDs, tunnelID) - k.SetActiveTunnelIDs(ctx, activeTunnelIDs) + k.ActiveTunnelID(ctx, tunnelID) // Set the last interval timestamp to the current block time k.SetTunnel(ctx, tunnel) @@ -200,19 +192,7 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { tunnel.IsActive = false // Remove the tunnel ID from the active tunnel IDs - activeTunnelIDs, err := k.GetActiveTunnelIDs(ctx) - if err != nil { - return err - } - - // Remove the tunnel ID from the active tunnel IDs - for i, activeID := range activeTunnelIDs { - if activeID == tunnelID { - activeTunnelIDs = append(activeTunnelIDs[:i], activeTunnelIDs[i+1:]...) - break - } - } - k.SetActiveTunnelIDs(ctx, activeTunnelIDs) + k.DeactivateTunnelID(ctx, tunnelID) // Set the last interval timestamp to the current block time k.SetTunnel(ctx, tunnel) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index c8feebcaa..754efebe2 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -28,7 +28,7 @@ const ( var ( TunnelCountStoreKey = []byte{0x00} - ActiveTunnelIDsStoreKey = []byte{0x01} + ActiveTunnelIDStoreKeyPrefix = []byte{0x01} TunnelStoreKeyPrefix = []byte{0x10} @@ -43,6 +43,10 @@ func TunnelStoreKey(tunnelID uint64) []byte { return append(TunnelStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } +func ActiveTunnelIDStoreKey(tunnelID uint64) []byte { + return append(ActiveTunnelIDStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) +} + func TunnelPacketsStoreKey(tunnelID uint64) []byte { return append(PacketStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index f0ce343c3..5ffcf2367 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -28,12 +28,16 @@ func NewSignalPricesInfo( // UpdateSignalPrices updates the signal prices based on signal IDs func (spsi *SignalPricesInfo) UpdateSignalPrices(newSignalPrices []SignalPrice) { - for _, nsp := range newSignalPrices { - for i, sp := range spsi.SignalPrices { - if nsp.SignalID == sp.SignalID { - spsi.SignalPrices[i] = sp - break - } + // create a map of new signal prices + newSpMap := make(map[string]SignalPrice) + for _, sp := range newSignalPrices { + newSpMap[sp.SignalID] = sp + } + + // update signal prices + for i, sp := range spsi.SignalPrices { + if newSp, ok := newSpMap[sp.SignalID]; ok { + spsi.SignalPrices[i] = newSp } } } From 2e6edb4461570713ca678104bfdcd15e87045efc Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 4 Sep 2024 15:51:11 +0700 Subject: [PATCH 073/272] update tunnel state --- x/tunnel/genesis.go | 5 +++++ x/tunnel/genesis_test.go | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 41eea0e22..e4781ff4b 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -64,6 +64,11 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { // set the tunnel count k.SetTunnelCount(ctx, data.TunnelCount) + // set tunnels + for _, tunnel := range data.Tunnels { + k.SetTunnel(ctx, tunnel) + } + // set the tunnels for _, tunnel := range data.Tunnels { k.ActiveTunnelID(ctx, tunnel.ID) diff --git a/x/tunnel/genesis_test.go b/x/tunnel/genesis_test.go index b0ba09326..95ff945f2 100644 --- a/x/tunnel/genesis_test.go +++ b/x/tunnel/genesis_test.go @@ -1,6 +1,7 @@ package tunnel_test import ( + "fmt" "testing" sdk "github.com/cosmos/cosmos-sdk/types" @@ -80,6 +81,9 @@ func TestInitExportGenesis(t *testing.T) { // Export the genesis state exportedGenesisState := tunnel.ExportGenesis(ctx, k) + fmt.Printf("genesisState: %v\n", genesisState) + fmt.Printf("exportedGenesisState: %v\n", exportedGenesisState) + // Verify the exported state matches the initialized state require.Equal(t, genesisState, exportedGenesisState) } From b996288442b8da9c67baf45024a3d80b19842b4e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 4 Sep 2024 17:24:39 +0700 Subject: [PATCH 074/272] add refund --- x/tunnel/keeper/keeper.go | 16 ++++++++++++++++ x/tunnel/keeper/packet.go | 11 +++++++++++ x/tunnel/keeper/tunnel.go | 18 ++++++++---------- x/tunnel/types/errors.go | 2 -- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index 13a80a47a..29d526cbd 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -80,6 +80,22 @@ func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) er return nil } +// RefundBaseFee refunds the base fee to fee payer's account. +func (k Keeper) RefundBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) error { + basePacketFee := k.GetParams(ctx).BasePacketFee + if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, feePayer, basePacketFee); err != nil { + return err + } + return nil +} + +// MustRefundBaseFee refunds the base fee to fee payer's account. +func (k Keeper) MustRefundBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) { + if err := k.RefundBasePacketFee(ctx, feePayer); err != nil { + panic(fmt.Sprintf("failed to refund base packet fee: %s", err)) + } +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 39b8858c3..15ee54230 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -75,6 +75,14 @@ func (k Keeper) ProducePacket( tunnel := k.MustGetTunnel(ctx, tunnelID) signalPricesInfo := k.MustGetSignalPricesInfo(ctx, tunnelID) + // deduct base packet fee from the fee payer + err := k.DeductBasePacketFee(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) + if err != nil { + // deactivate tunnel if failed to deduct base packet fee + k.MustDeactivateTunnel(ctx, tunnelID) + return fmt.Errorf("failed to deduct base packet fee: %w", err) + } + // check if the interval has passed intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+signalPricesInfo.LastIntervalTimestamp @@ -90,6 +98,9 @@ func (k Keeper) ProducePacket( if len(nsps) > 0 { err := k.SendPacket(ctx, tunnel, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow)) if err != nil { + // refund base packet fee if failed to send packet + k.MustRefundBasePacketFee(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) + return fmt.Errorf("route %s failed to send packet: %w", tunnel.Route.TypeUrl, err) } diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 4e02fbe5c..b43fdbaa1 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -161,11 +161,6 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { return err } - // Check if the tunnel is already active - if tunnel.IsActive { - return types.ErrTunnelAlreadyActive - } - // Activate the tunnel tunnel.IsActive = true @@ -184,11 +179,6 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { return err } - // Check if the tunnel is already inactive - if !tunnel.IsActive { - return types.ErrTunnelNotActive - } - tunnel.IsActive = false // Remove the tunnel ID from the active tunnel IDs @@ -198,3 +188,11 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { k.SetTunnel(ctx, tunnel) return nil } + +// MustDeactivateTunnel deactivates a tunnel and panics if the tunnel does not exist +func (k Keeper) MustDeactivateTunnel(ctx sdk.Context, tunnelID uint64) { + err := k.DeactivateTunnel(ctx, tunnelID) + if err != nil { + panic(err) + } +} diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 39bedb027..5e5f880bf 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -17,6 +17,4 @@ var ( ErrNoPacketContent = errorsmod.Register(ModuleName, 10, "no packet content") ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 11, "invalid creator of tunnel") ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 12, "account already exist") - ErrTunnelAlreadyActive = errorsmod.Register(ModuleName, 13, "tunnel already active") - ErrTunnelNotActive = errorsmod.Register(ModuleName, 14, "tunnel not active") ) From d438e95c4fdb3efeee69f444bf68ed01e63663ca Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 4 Sep 2024 17:26:45 +0700 Subject: [PATCH 075/272] remove ids --- proto/tunnel/v1beta1/tunnel.proto | 8 - x/tunnel/types/tunnel.pb.go | 387 +++++------------------------- 2 files changed, 63 insertions(+), 332 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index cbdf22e33..548f736a4 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -68,14 +68,6 @@ message Tunnel { string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// ActiveTunnelIDs is the type for a list of active tunnel IDs -message ActiveTunnelIDs { - option (gogoproto.equal) = true; - - // IDs is the list of active tunnel IDs - repeated uint64 ids = 1 [(gogoproto.customname) = "IDs"]; -} - // SignalPrices is the type for a list of signal prices with the last interval timestamp message SignalPricesInfo { option (gogoproto.equal) = true; diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 048bcf233..f7121246d 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -328,52 +328,6 @@ func (m *Tunnel) GetCreator() string { return "" } -// ActiveTunnelIDs is the type for a list of active tunnel IDs -type ActiveTunnelIDs struct { - // IDs is the list of active tunnel IDs - IDs []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` -} - -func (m *ActiveTunnelIDs) Reset() { *m = ActiveTunnelIDs{} } -func (m *ActiveTunnelIDs) String() string { return proto.CompactTextString(m) } -func (*ActiveTunnelIDs) ProtoMessage() {} -func (*ActiveTunnelIDs) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{4} -} -func (m *ActiveTunnelIDs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActiveTunnelIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActiveTunnelIDs.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 *ActiveTunnelIDs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActiveTunnelIDs.Merge(m, src) -} -func (m *ActiveTunnelIDs) XXX_Size() int { - return m.Size() -} -func (m *ActiveTunnelIDs) XXX_DiscardUnknown() { - xxx_messageInfo_ActiveTunnelIDs.DiscardUnknown(m) -} - -var xxx_messageInfo_ActiveTunnelIDs proto.InternalMessageInfo - -func (m *ActiveTunnelIDs) GetIDs() []uint64 { - if m != nil { - return m.IDs - } - return nil -} - // SignalPrices is the type for a list of signal prices with the last interval timestamp type SignalPricesInfo struct { // tunnel_id is the tunnel ID @@ -388,7 +342,7 @@ func (m *SignalPricesInfo) Reset() { *m = SignalPricesInfo{} } func (m *SignalPricesInfo) String() string { return proto.CompactTextString(m) } func (*SignalPricesInfo) ProtoMessage() {} func (*SignalPricesInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{5} + return fileDescriptor_b5270a56045f1d8a, []int{4} } func (m *SignalPricesInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -452,7 +406,7 @@ func (m *SignalPrice) Reset() { *m = SignalPrice{} } func (m *SignalPrice) String() string { return proto.CompactTextString(m) } func (*SignalPrice) ProtoMessage() {} func (*SignalPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{6} + return fileDescriptor_b5270a56045f1d8a, []int{5} } func (m *SignalPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -520,7 +474,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{7} + return fileDescriptor_b5270a56045f1d8a, []int{6} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -598,7 +552,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{8} + return fileDescriptor_b5270a56045f1d8a, []int{7} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +616,7 @@ func (m *AxelarPacketContent) Reset() { *m = AxelarPacketContent{} } func (m *AxelarPacketContent) String() string { return proto.CompactTextString(m) } func (*AxelarPacketContent) ProtoMessage() {} func (*AxelarPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{9} + return fileDescriptor_b5270a56045f1d8a, []int{8} } func (m *AxelarPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -717,7 +671,6 @@ func init() { proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") - proto.RegisterType((*ActiveTunnelIDs)(nil), "tunnel.v1beta1.ActiveTunnelIDs") proto.RegisterType((*SignalPricesInfo)(nil), "tunnel.v1beta1.SignalPricesInfo") proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") @@ -728,67 +681,65 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 953 bytes of a gzipped FileDescriptorProto + // 924 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x5f, 0xc7, 0x49, 0x36, 0x79, 0xd9, 0x86, 0xd5, 0x10, 0x5a, 0x37, 0x5b, 0xe2, 0x28, 0xa7, - 0x70, 0x58, 0x9b, 0x06, 0xe8, 0x61, 0x4f, 0xc4, 0x89, 0xaa, 0x5a, 0x08, 0xb1, 0x38, 0x39, 0x71, - 0xb1, 0x1c, 0x7b, 0x92, 0x35, 0x64, 0x3d, 0xc6, 0x33, 0x89, 0x9a, 0x23, 0xdf, 0x80, 0x4f, 0x80, - 0x10, 0x12, 0x12, 0x1f, 0x60, 0xaf, 0x9c, 0x10, 0x52, 0xd5, 0x53, 0xc5, 0x89, 0x53, 0x84, 0xbc, - 0x07, 0xf8, 0x0c, 0x9c, 0x90, 0x67, 0xc6, 0xc9, 0x26, 0xb4, 0x2a, 0x45, 0x3d, 0xf4, 0x96, 0xf7, - 0x7e, 0xef, 0xdf, 0xfc, 0xde, 0x6f, 0x3c, 0x81, 0x13, 0xb6, 0x88, 0x22, 0x3c, 0x37, 0x97, 0xf7, - 0x27, 0x98, 0x79, 0xf7, 0x4d, 0x61, 0x1a, 0x71, 0x42, 0x18, 0x41, 0x75, 0x69, 0x49, 0xb0, 0xd9, - 0x98, 0x91, 0x19, 0xe1, 0x90, 0x99, 0xfd, 0x12, 0x51, 0xcd, 0xbb, 0x33, 0x42, 0x66, 0x73, 0x6c, - 0x72, 0x6b, 0xb2, 0x98, 0x9a, 0x5e, 0xb4, 0xca, 0x21, 0x9f, 0xd0, 0x4b, 0x42, 0x5d, 0x91, 0x23, - 0x8c, 0x1c, 0x9a, 0x62, 0x1c, 0xd0, 0x4d, 0x5f, 0x6e, 0x09, 0xa8, 0xf3, 0x83, 0x02, 0x95, 0xf1, - 0x68, 0xe4, 0x90, 0x05, 0xc3, 0xe8, 0x11, 0x34, 0x02, 0x4c, 0x59, 0x18, 0x79, 0x2c, 0x24, 0x91, - 0xeb, 0x5f, 0x78, 0x61, 0xe4, 0x86, 0x81, 0xa6, 0xb4, 0x95, 0x6e, 0xd5, 0xba, 0x9d, 0xae, 0x75, - 0x34, 0xdc, 0xe2, 0x83, 0x0c, 0xb6, 0x87, 0x0e, 0x0a, 0xf6, 0x7d, 0x01, 0xfa, 0x18, 0xee, 0xed, - 0x54, 0x22, 0x11, 0x4b, 0x3c, 0x9f, 0xb9, 0x5e, 0x10, 0x24, 0x98, 0x52, 0xad, 0x90, 0x55, 0x74, - 0x9a, 0x37, 0x33, 0x65, 0x48, 0x5f, 0x44, 0x9c, 0xc1, 0xd3, 0xab, 0xd3, 0x32, 0x1f, 0xcb, 0xee, - 0xfc, 0xa8, 0x40, 0xad, 0xff, 0x18, 0xcf, 0xbd, 0xe4, 0xcd, 0x9e, 0xf3, 0x57, 0x05, 0x60, 0x14, - 0xce, 0x22, 0x6f, 0x6e, 0x47, 0x53, 0x82, 0xde, 0x83, 0x2a, 0xe5, 0xd6, 0x76, 0xb6, 0xa3, 0x74, - 0xad, 0x57, 0x64, 0xc8, 0xd0, 0xa9, 0x08, 0xd8, 0x0e, 0x90,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, 0x00, 0x0c, + 0xa3, 0x29, 0xc5, 0x33, 0x97, 0x4e, 0x18, 0x7a, 0x0f, 0x2a, 0x5c, 0x5a, 0x9b, 0xde, 0x0e, 0xd3, + 0x95, 0x55, 0xd6, 0x21, 0x03, 0xaf, 0xac, 0x60, 0x37, 0x44, 0x3d, 0x40, 0x9c, 0x4d, 0x84, 0x1f, + 0x92, 0x45, 0xa4, 0x5a, 0x19, 0xc7, 0xaa, 0xfa, 0x7e, 0xaf, 0x96, 0xae, 0xac, 0xe3, 0x21, 0x9b, + 0x88, 0x41, 0x0e, 0xf6, 0xce, 0x87, 0xde, 0x31, 0xdf, 0xf2, 0xc4, 0x3c, 0xcb, 0x71, 0x81, 0x93, + 0x70, 0x27, 0x47, 0x71, 0x93, 0xe3, 0x11, 0x4e, 0xc2, 0xed, 0x1c, 0x17, 0x5b, 0x9e, 0x98, 0x9f, + 0xed, 0xff, 0xf5, 0xbd, 0x65, 0xb4, 0x7e, 0x2e, 0x42, 0x69, 0x24, 0xe5, 0x88, 0xee, 0x40, 0x41, + 0x37, 0xbf, 0xdf, 0x2b, 0xa5, 0x2b, 0xab, 0xe0, 0x0e, 0xbc, 0x42, 0x14, 0x22, 0x0b, 0xaa, 0x94, + 0xd1, 0x80, 0xf8, 0x01, 0x9b, 0x53, 0xa1, 0x3a, 0xf5, 0x40, 0xba, 0xfa, 0x99, 0x07, 0x3d, 0x80, + 0x83, 0x24, 0x63, 0x45, 0x36, 0x50, 0xed, 0xd4, 0x6c, 0xa5, 0x5c, 0x3b, 0x57, 0xae, 0xdd, 0xa5, + 0xcb, 0xde, 0x0d, 0xf2, 0x3c, 0x15, 0x8e, 0x3e, 0x84, 0x4a, 0xa6, 0x4f, 0x5f, 0x2c, 0x63, 0x62, + 0xee, 0x37, 0x8d, 0xf6, 0x51, 0xe7, 0xae, 0xad, 0x14, 0xab, 0xf5, 0x6b, 0x3f, 0x24, 0x24, 0x1c, + 0x2d, 0x63, 0xe2, 0x95, 0x27, 0xf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fe, 0xbc, 0x17, 0x5f, 0xfa, 0xbc, 0x3f, 0x87, 0xce, 0xd6, 0x9f, 0x06, 0xbc, 0xa5, 0x7e, + 0x8e, 0xb6, 0x39, 0x7a, 0x1f, 0x0e, 0xa3, 0x71, 0xe0, 0x7f, 0x3d, 0x27, 0x73, 0xb2, 0x61, 0xe9, + 0x28, 0x5d, 0x59, 0xe0, 0xf6, 0xfa, 0x9f, 0x67, 0x6e, 0x77, 0xe0, 0x41, 0x34, 0x0e, 0xd4, 0xf7, + 0x1b, 0x7f, 0xd3, 0xde, 0xa7, 0x3f, 0xa5, 0x0d, 0xe3, 0x49, 0xda, 0x30, 0x9e, 0xa5, 0x0d, 0xe3, + 0x8f, 0xb4, 0x61, 0x7c, 0x7b, 0xdd, 0xd8, 0x7b, 0x76, 0xdd, 0xd8, 0xfb, 0xfd, 0xba, 0xb1, 0xf7, + 0x85, 0xf3, 0x1f, 0xc6, 0xad, 0xff, 0xf2, 0xc8, 0x69, 0x8f, 0x4b, 0x32, 0xe2, 0x83, 0x7f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xf4, 0xf0, 0x51, 0x52, 0x09, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -931,35 +882,6 @@ func (this *Tunnel) Equal(that interface{}) bool { } return true } -func (this *ActiveTunnelIDs) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ActiveTunnelIDs) - if !ok { - that2, ok := that.(ActiveTunnelIDs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.IDs) != len(that1.IDs) { - return false - } - for i := range this.IDs { - if this.IDs[i] != that1.IDs[i] { - return false - } - } - return true -} func (this *SignalPricesInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1338,47 +1260,6 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ActiveTunnelIDs) 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 *ActiveTunnelIDs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActiveTunnelIDs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.IDs) > 0 { - dAtA3 := make([]byte, len(m.IDs)*10) - var j2 int - for _, num := range m.IDs { - for num >= 1<<7 { - dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j2++ - } - dAtA3[j2] = uint8(num) - j2++ - } - i -= j2 - copy(dAtA[i:], dAtA3[:j2]) - i = encodeVarintTunnel(dAtA, i, uint64(j2)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *SignalPricesInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1723,22 +1604,6 @@ func (m *Tunnel) Size() (n int) { return n } -func (m *ActiveTunnelIDs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.IDs) > 0 { - l = 0 - for _, e := range m.IDs { - l += sovTunnel(uint64(e)) - } - n += 1 + sovTunnel(uint64(l)) + l - } - return n -} - func (m *SignalPricesInfo) Size() (n int) { if m == nil { return 0 @@ -2500,132 +2365,6 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *ActiveTunnelIDs) 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 ErrIntOverflowTunnel - } - 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: ActiveTunnelIDs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActiveTunnelIDs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IDs = append(m.IDs, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.IDs) == 0 { - m.IDs = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IDs = append(m.IDs, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field IDs", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTunnel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *SignalPricesInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 3e41429860a64df4ba14548bb088c4a6424e29d7 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 5 Sep 2024 11:15:31 +0700 Subject: [PATCH 076/272] fix review --- x/tunnel/keeper/tunnel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index b43fdbaa1..5113e170c 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -37,7 +37,7 @@ func (k Keeper) AddTunnel( // Create a new tunnel tunnel := types.NewTunnel( - id, + newID, 0, route, feedType, From 03ebf6f1f7f50f18e4b14fc1eebf6e8c9980cea9 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 5 Sep 2024 17:52:39 +0700 Subject: [PATCH 077/272] remove interval in signal price --- proto/tunnel/v1beta1/tunnel.proto | 2 - x/tunnel/keeper/packet.go | 3 +- x/tunnel/keeper/tunnel.go | 4 +- x/tunnel/types/signal.go | 6 +- x/tunnel/types/tunnel.pb.go | 155 +++++++++++------------------- 5 files changed, 63 insertions(+), 107 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 548f736a4..96f7a3fb8 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -88,8 +88,6 @@ message SignalPrice { string signal_id = 1 [(gogoproto.customname) = "SignalID"]; // price is the price of the signal uint64 price = 2; - // timestamp is the timestamp of the signal - int64 timestamp = 3; } // Packet is the packet that tunnel produces diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 15ee54230..e1df3592f 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -167,7 +167,7 @@ func GenerateSignalPrices( latestPrice, exists := latestPricesMap[sp.SignalID] // TODO: remove check PriceStatusAvailable when feeds module is implemented if !exists || latestPrice.PriceStatus != feedstypes.PriceStatusAvailable { - sps = append(sps, types.NewSignalPrice(sp.SignalID, 0, 0)) + sps = append(sps, types.NewSignalPrice(sp.SignalID, 0)) continue } @@ -190,7 +190,6 @@ func GenerateSignalPrices( types.NewSignalPrice( sp.SignalID, latestPrice.Price, - latestPrice.Timestamp, ), ) } diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 5113e170c..89058b189 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -31,7 +31,7 @@ func (k Keeper) AddTunnel( // Set the signal prices info var signalPrices []types.SignalPrice for _, si := range signalInfos { - signalPrices = append(signalPrices, types.NewSignalPrice(si.SignalID, 0, 0)) + signalPrices = append(signalPrices, types.NewSignalPrice(si.SignalID, 0)) } k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(newID, signalPrices, 0)) @@ -74,7 +74,7 @@ func (k Keeper) EditTunnel( // Edit the signal prices info var signalPrices []types.SignalPrice for _, sp := range signalInfos { - signalPrices = append(signalPrices, types.NewSignalPrice(sp.SignalID, 0, 0)) + signalPrices = append(signalPrices, types.NewSignalPrice(sp.SignalID, 0)) } k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(tunnelID, signalPrices, 0)) diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 5ffcf2367..5a8a8b229 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -46,11 +46,9 @@ func (spsi *SignalPricesInfo) UpdateSignalPrices(newSignalPrices []SignalPrice) func NewSignalPrice( signalID string, price uint64, - timestamp int64, ) SignalPrice { return SignalPrice{ - SignalID: signalID, - Price: price, - Timestamp: timestamp, + SignalID: signalID, + Price: price, } } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index f7121246d..cea49401d 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -398,8 +398,6 @@ type SignalPrice struct { SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` // price is the price of the signal Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` - // timestamp is the timestamp of the signal - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } func (m *SignalPrice) Reset() { *m = SignalPrice{} } @@ -449,13 +447,6 @@ func (m *SignalPrice) GetPrice() uint64 { return 0 } -func (m *SignalPrice) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - // Packet is the packet that tunnel produces type Packet struct { // tunnel_id is the tunnel ID @@ -681,65 +672,65 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 924 bytes of a gzipped FileDescriptorProto + // 916 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x5f, 0x27, 0xbb, 0x69, 0xf2, 0xb2, 0x5d, 0xad, 0x86, 0xd0, 0x9a, 0x6c, 0x89, 0xa3, 0x9c, - 0xc2, 0x61, 0x6d, 0x1a, 0xa0, 0x87, 0x3d, 0x91, 0x3f, 0xaa, 0x6a, 0x21, 0xc4, 0xe2, 0xe4, 0xc4, - 0xc5, 0x9a, 0xd8, 0x93, 0xac, 0x21, 0x3b, 0x63, 0x3c, 0x93, 0xa8, 0x39, 0xf2, 0x0d, 0xf8, 0x04, - 0x08, 0x21, 0x21, 0xf1, 0x01, 0xf6, 0xca, 0x09, 0x21, 0x55, 0x3d, 0x55, 0x9c, 0x38, 0x45, 0xc8, - 0x7b, 0x80, 0xcf, 0xc0, 0x09, 0x79, 0x66, 0x9c, 0x6c, 0x42, 0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x45, + 0x74, 0x41, 0xb8, 0xc0, 0x17, 0xb1, 0x74, 0x45, 0xd1, 0x7b, 0x33, 0x83, 0x5d, 0x8d, 0x4e, 0x72, + 0x50, 0x9f, 0x62, 0x02, 0xb5, 0x6b, 0x1b, 0xbc, 0xca, 0x6d, 0x6a, 0x40, 0x49, 0x12, 0xd7, 0xb6, + 0x54, 0x81, 0xee, 0xfa, 0x75, 0x01, 0xca, 0x67, 0x38, 0xf8, 0x92, 0x88, 0x57, 0x51, 0xa4, 0x01, + 0x25, 0xe9, 0xed, 0xbc, 0xa3, 0x0c, 0xfe, 0xa9, 0x53, 0xf1, 0xbf, 0xe9, 0xf4, 0x29, 0xd4, 0x63, + 0x49, 0x49, 0x3e, 0x40, 0x84, 0x0a, 0x69, 0xfc, 0x17, 0x5d, 0x1a, 0xf4, 0xf4, 0xf2, 0xa4, 0xae, + 0x8e, 0x30, 0x54, 0xe5, 0xae, 0x77, 0x27, 0xbe, 0x1e, 0xdf, 0x70, 0x56, 0xe9, 0x86, 0xb3, 0x3a, + 0xdf, 0x16, 0xe0, 0x68, 0x32, 0x1e, 0xef, 0xf5, 0x40, 0x5f, 0x00, 0x64, 0xa4, 0x22, 0x3a, 0xdf, + 0xc9, 0xf1, 0x71, 0xba, 0xb1, 0xaa, 0x63, 0x95, 0x75, 0x47, 0x7f, 0x6d, 0xac, 0xd3, 0x79, 0x24, + 0xce, 0x97, 0x53, 0x3b, 0x60, 0x17, 0xce, 0x14, 0xd3, 0x50, 0x12, 0x0b, 0xd8, 0xc2, 0x91, 0x6f, + 0xb0, 0xb3, 0xea, 0x39, 0x8f, 0x65, 0x5e, 0x70, 0xee, 0x64, 0x37, 0x98, 0xdb, 0xdb, 0xd5, 0x5e, + 0x55, 0xb7, 0x77, 0xc3, 0x17, 0x3e, 0xe0, 0x85, 0xff, 0xfd, 0x01, 0x2f, 0xbe, 0xf4, 0x01, 0x7f, + 0x8e, 0x9c, 0x9d, 0x3f, 0x0c, 0x78, 0x43, 0xfd, 0xe0, 0xec, 0x6b, 0xf4, 0x1e, 0xdc, 0x8e, 0xa6, + 0x81, 0xff, 0xd5, 0x92, 0x2c, 0xc9, 0x4e, 0xa5, 0x7a, 0xba, 0xb1, 0xc0, 0x1d, 0x0c, 0x3f, 0xcb, + 0xd2, 0xee, 0xc8, 0x83, 0x68, 0x1a, 0xa8, 0xef, 0xd7, 0xfe, 0xa4, 0x83, 0x4f, 0x7e, 0x4c, 0x5b, + 0xc6, 0x93, 0xb4, 0x65, 0x3c, 0x4b, 0x5b, 0xc6, 0xef, 0x69, 0xcb, 0xf8, 0xe6, 0xaa, 0x75, 0xf0, + 0xec, 0xaa, 0x75, 0xf0, 0xdb, 0x55, 0xeb, 0xe0, 0x73, 0xe7, 0x5f, 0x8c, 0x5b, 0xff, 0xa9, 0x91, + 0xd3, 0x9e, 0x96, 0x65, 0xc5, 0xfb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x71, 0xb0, 0x0d, + 0xeb, 0x08, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -942,9 +933,6 @@ func (this *SignalPrice) Equal(that interface{}) bool { if this.Price != that1.Price { return false } - if this.Timestamp != that1.Timestamp { - return false - } return true } func (this *Packet) Equal(that interface{}) bool { @@ -1327,11 +1315,6 @@ func (m *SignalPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Timestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x18 - } if m.Price != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.Price)) i-- @@ -1638,9 +1621,6 @@ func (m *SignalPrice) Size() (n int) { if m.Price != 0 { n += 1 + sovTunnel(uint64(m.Price)) } - if m.Timestamp != 0 { - n += 1 + sovTunnel(uint64(m.Timestamp)) - } return n } @@ -2567,25 +2547,6 @@ func (m *SignalPrice) Unmarshal(dAtA []byte) error { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTunnel(dAtA[iNdEx:]) From 01c31f935c39450a8f7cc2876577a28eab253bb8 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 9 Sep 2024 14:36:38 +0700 Subject: [PATCH 078/272] fix review --- proto/tunnel/v1beta1/params.proto | 2 +- proto/tunnel/v1beta1/tunnel.proto | 4 ++-- x/tunnel/keeper/msg_server.go | 2 -- x/tunnel/keeper/packet.go | 18 +++++++++--------- x/tunnel/keeper/tunnel.go | 4 ++-- x/tunnel/types/errors.go | 15 +++++++-------- x/tunnel/types/keys.go | 8 ++++---- x/tunnel/types/msgs.go | 6 +++--- x/tunnel/types/params.pb.go | 2 +- x/tunnel/types/tunnel.go | 2 +- x/tunnel/types/tunnel.pb.go | 4 ++-- 11 files changed, 32 insertions(+), 35 deletions(-) diff --git a/proto/tunnel/v1beta1/params.proto b/proto/tunnel/v1beta1/params.proto index ddf47ea3a..0d3eccae2 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/tunnel/v1beta1/params.proto @@ -18,7 +18,7 @@ message Params { uint64 min_interval = 2; // max_signals defines the maximum number of signals allowed per tunnel. uint64 max_signals = 3; - // base_fee is the base fee for each tunnel + // base_packet_fee is the base fee for each packet repeated cosmos.base.v1beta1.Coin base_packet_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 96f7a3fb8..42384fb82 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -10,7 +10,7 @@ import "feeds/v1beta1/feeds.proto"; option go_package = "github.com/bandprotocol/chain/v2/x/tunnel/types"; option (gogoproto.equal_all) = true; -// Route is the type for a route +// TSSRoute is the type for a TSS route message TSSRoute { option (cosmos_proto.implements_interface) = "RouteI"; @@ -68,7 +68,7 @@ message Tunnel { string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// SignalPrices is the type for a list of signal prices with the last interval timestamp +// SignalPricesInfo is the type for signal prices that tunnel produces message SignalPricesInfo { option (gogoproto.equal) = true; diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 662e7f983..cc4f23750 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -128,8 +128,6 @@ func (ms msgServer) ActivateTunnel( return nil, err } - // TODO: check deposit with params, transfer deposit to module account - if req.Creator != tunnel.Creator { return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index e1df3592f..5013dc887 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -75,14 +75,6 @@ func (k Keeper) ProducePacket( tunnel := k.MustGetTunnel(ctx, tunnelID) signalPricesInfo := k.MustGetSignalPricesInfo(ctx, tunnelID) - // deduct base packet fee from the fee payer - err := k.DeductBasePacketFee(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) - if err != nil { - // deactivate tunnel if failed to deduct base packet fee - k.MustDeactivateTunnel(ctx, tunnelID) - return fmt.Errorf("failed to deduct base packet fee: %w", err) - } - // check if the interval has passed intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+signalPricesInfo.LastIntervalTimestamp @@ -96,7 +88,15 @@ func (k Keeper) ProducePacket( triggerAll || intervalTrigger, ) if len(nsps) > 0 { - err := k.SendPacket(ctx, tunnel, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow)) + // deduct base packet fee from the fee payer + err := k.DeductBasePacketFee(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) + if err != nil { + // deactivate tunnel if failed to deduct base packet fee + k.MustDeactivateTunnel(ctx, tunnelID) + return fmt.Errorf("failed to deduct base packet fee: %w", err) + } + + err = k.SendPacket(ctx, tunnel, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow)) if err != nil { // refund base packet fee if failed to send packet k.MustRefundBasePacketFee(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 89058b189..e66a4dc86 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -6,7 +6,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - feedsTypes "github.com/bandprotocol/chain/v2/x/feeds/types" + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -14,7 +14,7 @@ import ( func (k Keeper) AddTunnel( ctx sdk.Context, route *codectypes.Any, - feedType feedsTypes.FeedType, + feedType feedstypes.FeedType, signalInfos []types.SignalInfo, interval uint64, creator string, diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 5e5f880bf..938d17958 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -9,12 +9,11 @@ var ( ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") ErrMinIntervalExceeded = errorsmod.Register(ModuleName, 4, "min interval exceeded") - ErrMaxTunnelChannels = errorsmod.Register(ModuleName, 5, "max tunnel channels") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 6, "tunnel not found") - ErrActiveTunnelIDsNotFound = errorsmod.Register(ModuleName, 7, "active tunnel IDs not found") - ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 8, "signal prices info not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 9, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 10, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 11, "invalid creator of tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 12, "account already exist") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") + ErrActiveTunnelIDsNotFound = errorsmod.Register(ModuleName, 6, "active tunnel IDs not found") + ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 7, "signal prices info not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 8, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 9, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 10, "invalid creator of tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") ) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 754efebe2..1246f8b17 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -28,13 +28,13 @@ const ( var ( TunnelCountStoreKey = []byte{0x00} - ActiveTunnelIDStoreKeyPrefix = []byte{0x01} + ActiveTunnelIDStoreKeyPrefix = []byte{0x10} - TunnelStoreKeyPrefix = []byte{0x10} + TunnelStoreKeyPrefix = []byte{0x11} - PacketStoreKeyPrefix = []byte{0x11} + PacketStoreKeyPrefix = []byte{0x12} - SignalPricesInfoStoreKeyPrefix = []byte{0x12} + SignalPricesInfoStoreKeyPrefix = []byte{0x13} ParamsKey = []byte{0x90} ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index e3632995e..ff0b44834 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -6,14 +6,14 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) var ( - _, _, _, _ sdk.Msg = &MsgUpdateParams{}, &MsgCreateTunnel{}, &MsgActivateTunnel{}, &MsgManualTriggerTunnel{} - _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} + _, _, _, _, _ sdk.Msg = &MsgUpdateParams{}, &MsgCreateTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{} + _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) // NewMsgUpdateParams creates a new MsgUpdateParams instance. diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 76df5389c..793470731 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -33,7 +33,7 @@ type Params struct { MinInterval uint64 `protobuf:"varint,2,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` // max_signals defines the maximum number of signals allowed per tunnel. MaxSignals uint64 `protobuf:"varint,3,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` - // base_fee is the base fee for each tunnel + // base_packet_fee is the base fee for each packet BasePacketFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_packet_fee,json=basePacketFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_packet_fee"` } diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 9acd9f072..867947a22 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/gogoproto/proto" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index cea49401d..d176ea0b3 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -27,7 +27,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Route is the type for a route +// TSSRoute is the type for a TSS route type TSSRoute struct { // destination_chain_id is the destination chain ID DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` @@ -328,7 +328,7 @@ func (m *Tunnel) GetCreator() string { return "" } -// SignalPrices is the type for a list of signal prices with the last interval timestamp +// SignalPricesInfo is the type for signal prices that tunnel produces type SignalPricesInfo struct { // tunnel_id is the tunnel ID TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` From ed7506eca874392867d46bd69ed555c95b432c12 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Mon, 9 Sep 2024 14:27:27 +0700 Subject: [PATCH 079/272] fix logic produce packet --- x/tunnel/keeper/keeper.go | 16 ------- x/tunnel/keeper/msg_server.go | 32 +++++++------- x/tunnel/keeper/packet.go | 81 +++++++++++++++++++++-------------- x/tunnel/keeper/tunnel.go | 23 +++++++--- x/tunnel/types/errors.go | 2 + 5 files changed, 86 insertions(+), 68 deletions(-) diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index 29d526cbd..13a80a47a 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -80,22 +80,6 @@ func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) er return nil } -// RefundBaseFee refunds the base fee to fee payer's account. -func (k Keeper) RefundBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) error { - basePacketFee := k.GetParams(ctx).BasePacketFee - if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, feePayer, basePacketFee); err != nil { - return err - } - return nil -} - -// MustRefundBaseFee refunds the base fee to fee payer's account. -func (k Keeper) MustRefundBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) { - if err := k.RefundBasePacketFee(ctx, feePayer); err != nil { - panic(fmt.Sprintf("failed to refund base packet fee: %s", err)) - } -} - // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index cc4f23750..366eef5bd 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + sdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -137,13 +138,6 @@ func (ms msgServer) ActivateTunnel( return nil, err } - // Emit an event - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeActivateTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), - sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", true)), - )) - return &types.MsgActivateTunnelResponse{}, nil } @@ -168,13 +162,6 @@ func (ms msgServer) DeactivateTunnel( return nil, err } - // Emit an event - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeDeactivateTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), - sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", false)), - )) - return &types.MsgDeactivateTunnelResponse{}, nil } @@ -196,17 +183,32 @@ func (ms msgServer) ManualTriggerTunnel( req.TunnelID, ) } + if !tunnel.IsActive { + return nil, types.ErrInactiveTunnel.Wrapf("tunnelID %d", req.TunnelID) + } // TODO: feeds module needs to be implemented get prices that can use latestPrices := ms.Keeper.feedsKeeper.GetPrices(ctx) latestPricesMap := createLatestPricesMap(latestPrices) // Produce packet with trigger all signals - err = ms.Keeper.ProducePacket(ctx, tunnel.ID, latestPricesMap, true) + isCreated, err := ms.Keeper.ProducePacket(ctx, tunnel.ID, latestPricesMap, true) if err != nil { return nil, err } + // if new packet is created, deduct base packet fee from the fee payer, + if isCreated { + feePayer, err := sdk.AccAddressFromBech32(tunnel.FeePayer) + if err != nil { + return nil, err + } + + if err := ms.Keeper.DeductBasePacketFee(ctx, feePayer); err != nil { + return nil, sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", req.TunnelID) + } + } + // Emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeManualTriggerTunnel, diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 5013dc887..c0f1d16e0 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -3,9 +3,11 @@ package keeper import ( "fmt" + sdkerrors "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/bandprotocol/chain/v2/pkg/ctxcache" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -48,16 +50,38 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // check for active tunnels for _, id := range ids { - // produce packet - err := k.ProducePacket(ctx, id, latestPricesMap, false) - if err != nil { - // emit send packet fail event + producePacketFunc := func(ctx sdk.Context) error { + tunnel, err := k.GetTunnel(ctx, id) + if err != nil { + return err + } + + isCreated, err := k.ProducePacket(ctx, id, latestPricesMap, false) + if err != nil { + return err + } + + // return if no new packet is created + if !isCreated { + return nil + } + + // deduct base packet fee from the fee payer; deactivate tunnel if failed. + feePayerAddr := sdk.MustAccAddressFromBech32(tunnel.FeePayer) + if err := k.DeductBasePacketFee(ctx, feePayerAddr); err != nil { + return k.DeactivateTunnel(ctx, id) + } + + return nil + } + + // produce a packet. If error, emits an event. + if err := ctxcache.ApplyFuncIfNoError(ctx, producePacketFunc); err != nil { ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeProducePacketFail, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", id)), sdk.NewAttribute(types.AttributeKeyReason, err.Error()), )) - continue } } } @@ -68,7 +92,7 @@ func (k Keeper) ProducePacket( tunnelID uint64, latestPricesMap map[string]feedstypes.Price, triggerAll bool, -) error { +) (isCreated bool, err error) { unixNow := ctx.BlockTime().Unix() // get tunnel and signal prices info @@ -87,36 +111,29 @@ func (k Keeper) ProducePacket( signalPricesInfo.SignalPrices, triggerAll || intervalTrigger, ) - if len(nsps) > 0 { - // deduct base packet fee from the fee payer - err := k.DeductBasePacketFee(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) - if err != nil { - // deactivate tunnel if failed to deduct base packet fee - k.MustDeactivateTunnel(ctx, tunnelID) - return fmt.Errorf("failed to deduct base packet fee: %w", err) - } - - err = k.SendPacket(ctx, tunnel, types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow)) - if err != nil { - // refund base packet fee if failed to send packet - k.MustRefundBasePacketFee(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) - return fmt.Errorf("route %s failed to send packet: %w", tunnel.Route.TypeUrl, err) - } + // return if no new signal prices + if len(nsps) == 0 { + return false, nil + } - // update signal prices info - signalPricesInfo.UpdateSignalPrices(nsps) - if triggerAll || intervalTrigger { - signalPricesInfo.LastIntervalTimestamp = unixNow - } - k.SetSignalPricesInfo(ctx, signalPricesInfo) + newPacket := types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow) + if err := k.SendPacket(ctx, tunnel, newPacket); err != nil { + return false, sdkerrors.Wrapf(err, "route %s failed to send packet", tunnel.Route.TypeUrl) + } - // update tunnel nonce count - tunnel.NonceCount++ - k.SetTunnel(ctx, tunnel) + // update signal prices info + signalPricesInfo.UpdateSignalPrices(nsps) + if triggerAll || intervalTrigger { + signalPricesInfo.LastIntervalTimestamp = unixNow } + k.SetSignalPricesInfo(ctx, signalPricesInfo) - return nil + // update tunnel nonce count + tunnel.NonceCount++ + k.SetTunnel(ctx, tunnel) + + return true, nil } // SendPacket sends a packet to the destination route @@ -134,7 +151,7 @@ func (k Keeper) SendPacket( case *types.AxelarRoute: content, err = k.SendAxelarPacket(ctx, r, packet) default: - return fmt.Errorf("no route found for tunnel ID: %d", tunnel.ID) + return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } // return error if failed to send packet diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index e66a4dc86..c38e62dd9 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -161,14 +161,20 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { return err } - // Activate the tunnel - tunnel.IsActive = true - // Add the tunnel ID to the active tunnel IDs k.ActiveTunnelID(ctx, tunnelID) // Set the last interval timestamp to the current block time + tunnel.IsActive = true k.SetTunnel(ctx, tunnel) + + // Emit an event + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeActivateTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", true)), + )) + return nil } @@ -179,13 +185,20 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { return err } - tunnel.IsActive = false - // Remove the tunnel ID from the active tunnel IDs k.DeactivateTunnelID(ctx, tunnelID) // Set the last interval timestamp to the current block time + tunnel.IsActive = false k.SetTunnel(ctx, tunnel) + + // emit and event. + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeDeactivateTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), + )) + return nil } diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 938d17958..d46bb62eb 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -16,4 +16,6 @@ var ( ErrNoPacketContent = errorsmod.Register(ModuleName, 9, "no packet content") ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 10, "invalid creator of tunnel") ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") + ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") + ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") ) From 41ec81a915790e88b915ee1a5c39b1a062344354 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Mon, 9 Sep 2024 16:28:16 +0700 Subject: [PATCH 080/272] fix produce active tunnel --- x/tunnel/keeper/packet.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index c0f1d16e0..f9c0cda29 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -50,33 +50,35 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // check for active tunnels for _, id := range ids { + isErrNoPacketCreated := false producePacketFunc := func(ctx sdk.Context) error { tunnel, err := k.GetTunnel(ctx, id) if err != nil { return err } + // deduct base packet fee from the fee payer; deactivate tunnel if failed. + feePayerAddr := sdk.MustAccAddressFromBech32(tunnel.FeePayer) + if err := k.DeductBasePacketFee(ctx, feePayerAddr); err != nil { + return k.DeactivateTunnel(ctx, id) + } + + // Produce and send a packet, if no packet is created, return error so that + // fee is reverted. isCreated, err := k.ProducePacket(ctx, id, latestPricesMap, false) if err != nil { return err } - - // return if no new packet is created if !isCreated { - return nil - } - - // deduct base packet fee from the fee payer; deactivate tunnel if failed. - feePayerAddr := sdk.MustAccAddressFromBech32(tunnel.FeePayer) - if err := k.DeductBasePacketFee(ctx, feePayerAddr); err != nil { - return k.DeactivateTunnel(ctx, id) + isErrNoPacketCreated = true + return fmt.Errorf("no packet is created for tunnel %d", id) } return nil } // produce a packet. If error, emits an event. - if err := ctxcache.ApplyFuncIfNoError(ctx, producePacketFunc); err != nil { + if err := ctxcache.ApplyFuncIfNoError(ctx, producePacketFunc); err != nil && !isErrNoPacketCreated { ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeProducePacketFail, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", id)), From c5ea6bdffb4ddf384157c49910d378889f691dd8 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 10 Sep 2024 16:41:40 +0700 Subject: [PATCH 081/272] init tunnel deposit --- proto/tunnel/v1beta1/tunnel.proto | 32 +- proto/tunnel/v1beta1/tx.proto | 30 +- x/tunnel/client/cli/tx.go | 6 +- x/tunnel/keeper/deposit.go | 46 +++ x/tunnel/keeper/tunnel.go | 1 + x/tunnel/types/errors.go | 2 + x/tunnel/types/msgs.go | 24 +- x/tunnel/types/tunnel.go | 23 +- x/tunnel/types/tunnel.pb.go | 557 ++++++++++++++++++++++++----- x/tunnel/types/tx.pb.go | 575 ++++++++++++++++++++++++++---- 10 files changed, 1109 insertions(+), 187 deletions(-) create mode 100644 x/tunnel/keeper/deposit.go diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 42384fb82..de047b460 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -1,9 +1,11 @@ syntax = "proto3"; package tunnel.v1beta1; +import "amino/amino.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; import "feeds/v1beta1/feeds.proto"; @@ -42,6 +44,22 @@ message SignalInfo { uint64 hard_deviation_bps = 3 [(gogoproto.customname) = "HardDeviationBPS"]; } +// Deposit defines an amount deposited by an account address to the tunnel. +message Deposit { + option (gogoproto.equal) = true; + + // tunnel_id defines the unique id of the tunnel. + uint64 tunnel_id = 1; + // depositor defines the deposit addresses from the proposals. + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount to be deposited by depositor. + repeated cosmos.base.v1beta1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; +} + // Tunnel is the type for a tunnel message Tunnel { option (gogoproto.equal) = true; @@ -60,12 +78,18 @@ message Tunnel { repeated SignalInfo signal_infos = 6 [(gogoproto.nullable) = false]; // interval is the interval for delivering the signal prices uint64 interval = 7; + // total_deposit is the total deposit on the tunnel. + repeated cosmos.base.v1beta1.Coin total_deposit = 8 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; // is_active is the flag to indicate if the tunnel is active - bool is_active = 8; + bool is_active = 9; // created_at is the timestamp when the tunnel is created - int64 created_at = 9; + int64 created_at = 10; // creator is the address of the creator - string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string creator = 11 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // SignalPricesInfo is the type for signal prices that tunnel produces diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 9c9e33bea..9eba5bad0 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -31,6 +31,9 @@ service Msg { // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. rpc ManualTriggerTunnel(MsgManualTriggerTunnel) returns (MsgManualTriggerTunnelResponse); + // Deposit is a RPC method to submit a deposit to an existing tunnel. + rpc Deposit(MsgDeposit) returns (MsgDepositResponse); + // UpdateParams is a RPC method to update parameters rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } @@ -48,9 +51,12 @@ message MsgCreateTunnel { google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; // feed_type is the type of feed data. feeds.v1beta1.FeedType feed_type = 4; - // deposit is the deposit required to create a tunnel. - repeated cosmos.base.v1beta1.Coin deposit = 5 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // initial_deposit is the deposit value that must be paid at tunnel creation. + repeated cosmos.base.v1beta1.Coin initial_deposit = 5 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; // creator is the address of the creator. string creator = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } @@ -120,6 +126,24 @@ message MsgManualTriggerTunnel { // MsgManualTriggerTunnelResponse is the response type for the Msg/ManualTrigger RPC method. message MsgManualTriggerTunnelResponse {} +// MsgDeposit defines a message to submit a deposit to an existing tunnel. +message MsgDeposit { + option (cosmos.msg.v1.signer) = "depositor"; + option (amino.name) = "tunnel/MsgDeposit"; + + // tunnel_id defines the unique id of the tunnel. + uint64 tunnel_id = 1 [(gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; + + // depositor defines the deposit addresses from the tunnel. + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // amount to be deposited by depositor. + repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgDepositResponse defines the Msg/Deposit response type. +message MsgDepositResponse {} + // MsgUpdateParams is the transaction message to update parameters. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 3f8ef6656..60ccf249e 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -33,7 +33,7 @@ func GetTxCmd() *cobra.Command { func GetTxCmdCreateTSSTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "create-tss-tunnel [feed-type] [destination-chain-id] [destination-contract-address] [deposit] [signalInfos-json-file]", + Use: "create-tss-tunnel [feed-type] [destination-chain-id] [destination-contract-address] [initial-deposit] [signalInfos-json-file]", Short: "Create a new TSS tunnel", Args: cobra.ExactArgs(5), RunE: func(cmd *cobra.Command, args []string) error { @@ -47,7 +47,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - deposit, err := sdk.ParseCoinsNormalized(args[3]) + initialDeposit, err := sdk.ParseCoinsNormalized(args[3]) if err != nil { return err } @@ -68,7 +68,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { feedstypes.FeedType(feedType), args[1], args[2], - deposit, + initialDeposit, clientCtx.GetFromAddress(), ) if err != nil { diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go new file mode 100644 index 000000000..5caebcdad --- /dev/null +++ b/x/tunnel/keeper/deposit.go @@ -0,0 +1,46 @@ +package keeper + +import ( + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// Deposit creates a new deposit for the tunnel module. +func (k Keeper) validateInitialDeposit(ctx sdk.Context, params types.Params, initialDeposit sdk.Coins) error { + if !initialDeposit.IsValid() || initialDeposit.IsAnyNegative() { + return errors.Wrap(sdkerrors.ErrInvalidCoins, initialDeposit.String()) + } + + minDepositCoins := k.GetParams(ctx).MinDeposit + if !initialDeposit.IsAllGTE(minDepositCoins) { + return errors.Wrapf(types.ErrMinDepositTooSmall, "was (%s), need (%s)", initialDeposit, minDepositCoins) + } + + return nil +} + +// validateDepositDenom validates if the deposit denom is accepted by the tunnel module. +func (k Keeper) validateDepositDenom(params types.Params, depositAmount sdk.Coins) error { + denoms := make([]string, 0, len(params.MinDeposit)) + acceptedDenoms := make(map[string]bool, len(params.MinDeposit)) + for _, coin := range params.MinDeposit { + acceptedDenoms[coin.Denom] = true + denoms = append(denoms, coin.Denom) + } + + for _, coin := range depositAmount { + if _, ok := acceptedDenoms[coin.Denom]; !ok { + return errors.Wrapf( + types.ErrInvalidDepositDenom, + "deposited %s, but gov accepts only the following denom(s): %v", + depositAmount, + denoms, + ) + } + } + + return nil +} diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index c38e62dd9..40fdf2bd4 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -44,6 +44,7 @@ func (k Keeper) AddTunnel( acc.String(), signalInfos, interval, + sdk.NewCoins(), false, ctx.BlockTime().Unix(), creator, diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index d46bb62eb..c05fe5707 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -18,4 +18,6 @@ var ( ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") + ErrMinDepositTooSmall = errorsmod.Register(ModuleName, 14, "min deposit too small") + ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index ff0b44834..f3c07e569 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -61,7 +61,7 @@ func NewMsgCreateTunnel( interval uint64, route RouteI, feedType feedstypes.FeedType, - deposit sdk.Coins, + initialDeposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { msg, ok := route.(proto.Message) @@ -74,12 +74,12 @@ func NewMsgCreateTunnel( } return &MsgCreateTunnel{ - SignalInfos: signalInfos, - Interval: interval, - Route: any, - FeedType: feedType, - Deposit: deposit, - Creator: creator.String(), + SignalInfos: signalInfos, + Interval: interval, + Route: any, + FeedType: feedType, + InitialDeposit: initialDeposit, + Creator: creator.String(), }, nil } @@ -90,14 +90,14 @@ func NewMsgCreateTSSTunnel( feedType feedstypes.FeedType, destinationChainID string, destinationContractAddress string, - deposit sdk.Coins, + initialDeposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { r := &TSSRoute{ DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } - m, err := NewMsgCreateTunnel(signalInfos, interval, r, feedType, deposit, creator) + m, err := NewMsgCreateTunnel(signalInfos, interval, r, feedType, initialDeposit, creator) if err != nil { return nil, err } @@ -161,9 +161,9 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } - // minimum deposit must be positive - if !m.Deposit.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf("invalid deposit: %s", m.Deposit) + // initialDeposit deposit must be positive + if !m.InitialDeposit.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf("invalid deposit: %s", m.InitialDeposit) } // signalIDs must be unique diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 867947a22..e25570e1a 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/proto" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" @@ -20,21 +21,23 @@ func NewTunnel( feePayer string, signalInfos []SignalInfo, interval uint64, + totalDeposit []sdk.Coin, isActive bool, createdAt int64, creator string, ) Tunnel { return Tunnel{ - ID: id, - NonceCount: nonceCount, - Route: route, - FeedType: feedType, - FeePayer: feePayer, - SignalInfos: signalInfos, - Interval: interval, - IsActive: isActive, - CreatedAt: createdAt, - Creator: creator, + ID: id, + NonceCount: nonceCount, + Route: route, + FeedType: feedType, + FeePayer: feePayer, + SignalInfos: signalInfos, + Interval: interval, + TotalDeposit: totalDeposit, + IsActive: isActive, + CreatedAt: createdAt, + Creator: creator, } } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index d176ea0b3..fd5a825ff 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -6,9 +6,12 @@ package types import ( fmt "fmt" github_com_bandprotocol_chain_v2_x_bandtss_types "github.com/bandprotocol/chain/v2/x/bandtss/types" - types1 "github.com/bandprotocol/chain/v2/x/feeds/types" + types2 "github.com/bandprotocol/chain/v2/x/feeds/types" _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/codec/types" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -201,6 +204,70 @@ func (m *SignalInfo) GetHardDeviationBPS() uint64 { return 0 } +// Deposit defines an amount deposited by an account address to the tunnel. +type Deposit struct { + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // depositor defines the deposit addresses from the proposals. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` + // amount to be deposited by depositor. + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *Deposit) Reset() { *m = Deposit{} } +func (m *Deposit) String() string { return proto.CompactTextString(m) } +func (*Deposit) ProtoMessage() {} +func (*Deposit) Descriptor() ([]byte, []int) { + return fileDescriptor_b5270a56045f1d8a, []int{3} +} +func (m *Deposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Deposit.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 *Deposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_Deposit.Merge(m, src) +} +func (m *Deposit) XXX_Size() int { + return m.Size() +} +func (m *Deposit) XXX_DiscardUnknown() { + xxx_messageInfo_Deposit.DiscardUnknown(m) +} + +var xxx_messageInfo_Deposit proto.InternalMessageInfo + +func (m *Deposit) GetTunnelId() uint64 { + if m != nil { + return m.TunnelId + } + return 0 +} + +func (m *Deposit) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +func (m *Deposit) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + // Tunnel is the type for a tunnel type Tunnel struct { // id is the tunnel ID @@ -208,28 +275,30 @@ type Tunnel struct { // nonce_count is representing the number of packets sent NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` // route is the route for delivering the signal prices - Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + Route *types1.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // feed_type is the type of feed data - FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + FeedType types2.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` // fee_payer is the address of the fee payer FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` // signal_infos is the list of signal infos SignalInfos []SignalInfo `protobuf:"bytes,6,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` // interval is the interval for delivering the signal prices Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` + // total_deposit is the total deposit on the tunnel. + TotalDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,8,rep,name=total_deposit,json=totalDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_deposit"` // is_active is the flag to indicate if the tunnel is active - IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + IsActive bool `protobuf:"varint,9,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // created_at is the timestamp when the tunnel is created - CreatedAt int64 `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // creator is the address of the creator - Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` + Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"` } func (m *Tunnel) Reset() { *m = Tunnel{} } func (m *Tunnel) String() string { return proto.CompactTextString(m) } func (*Tunnel) ProtoMessage() {} func (*Tunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{3} + return fileDescriptor_b5270a56045f1d8a, []int{4} } func (m *Tunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,18 +341,18 @@ func (m *Tunnel) GetNonceCount() uint64 { return 0 } -func (m *Tunnel) GetRoute() *types.Any { +func (m *Tunnel) GetRoute() *types1.Any { if m != nil { return m.Route } return nil } -func (m *Tunnel) GetFeedType() types1.FeedType { +func (m *Tunnel) GetFeedType() types2.FeedType { if m != nil { return m.FeedType } - return types1.FEED_TYPE_UNSPECIFIED + return types2.FEED_TYPE_UNSPECIFIED } func (m *Tunnel) GetFeePayer() string { @@ -307,6 +376,13 @@ func (m *Tunnel) GetInterval() uint64 { return 0 } +func (m *Tunnel) GetTotalDeposit() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TotalDeposit + } + return nil +} + func (m *Tunnel) GetIsActive() bool { if m != nil { return m.IsActive @@ -342,7 +418,7 @@ func (m *SignalPricesInfo) Reset() { *m = SignalPricesInfo{} } func (m *SignalPricesInfo) String() string { return proto.CompactTextString(m) } func (*SignalPricesInfo) ProtoMessage() {} func (*SignalPricesInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{4} + return fileDescriptor_b5270a56045f1d8a, []int{5} } func (m *SignalPricesInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -404,7 +480,7 @@ func (m *SignalPrice) Reset() { *m = SignalPrice{} } func (m *SignalPrice) String() string { return proto.CompactTextString(m) } func (*SignalPrice) ProtoMessage() {} func (*SignalPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{5} + return fileDescriptor_b5270a56045f1d8a, []int{6} } func (m *SignalPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -456,7 +532,7 @@ type Packet struct { // signal_prices is the list of signal prices SignalPrices []SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` // packet_content is the content of the packet that implements PacketContentI - PacketContent *types.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + PacketContent *types1.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` // created_at is the timestamp when the packet is created CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } @@ -465,7 +541,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{6} + return fileDescriptor_b5270a56045f1d8a, []int{7} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -515,7 +591,7 @@ func (m *Packet) GetSignalPrices() []SignalPrice { return nil } -func (m *Packet) GetPacketContent() *types.Any { +func (m *Packet) GetPacketContent() *types1.Any { if m != nil { return m.PacketContent } @@ -543,7 +619,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{7} + return fileDescriptor_b5270a56045f1d8a, []int{8} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -607,7 +683,7 @@ func (m *AxelarPacketContent) Reset() { *m = AxelarPacketContent{} } func (m *AxelarPacketContent) String() string { return proto.CompactTextString(m) } func (*AxelarPacketContent) ProtoMessage() {} func (*AxelarPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{8} + return fileDescriptor_b5270a56045f1d8a, []int{9} } func (m *AxelarPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -661,6 +737,7 @@ func init() { proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") + proto.RegisterType((*Deposit)(nil), "tunnel.v1beta1.Deposit") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") proto.RegisterType((*SignalPricesInfo)(nil), "tunnel.v1beta1.SignalPricesInfo") proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") @@ -672,65 +749,72 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 916 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x5f, 0x27, 0x9b, 0x34, 0x79, 0x69, 0xa3, 0xd5, 0x10, 0x5a, 0x93, 0x85, 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0xaa, 0x63, 0x95, 0x75, 0x47, 0x7f, 0x6d, 0xac, 0xd3, 0x79, 0x24, - 0xce, 0x97, 0x53, 0x3b, 0x60, 0x17, 0xce, 0x14, 0xd3, 0x50, 0x12, 0x0b, 0xd8, 0xc2, 0x91, 0x6f, - 0xb0, 0xb3, 0xea, 0x39, 0x8f, 0x65, 0x5e, 0x70, 0xee, 0x64, 0x37, 0x98, 0xdb, 0xdb, 0xd5, 0x5e, - 0x55, 0xb7, 0x77, 0xc3, 0x17, 0x3e, 0xe0, 0x85, 0xff, 0xfd, 0x01, 0x2f, 0xbe, 0xf4, 0x01, 0x7f, - 0x8e, 0x9c, 0x9d, 0x3f, 0x0c, 0x78, 0x43, 0xfd, 0xe0, 0xec, 0x6b, 0xf4, 0x1e, 0xdc, 0x8e, 0xa6, - 0x81, 0xff, 0xd5, 0x92, 0x2c, 0xc9, 0x4e, 0xa5, 0x7a, 0xba, 0xb1, 0xc0, 0x1d, 0x0c, 0x3f, 0xcb, - 0xd2, 0xee, 0xc8, 0x83, 0x68, 0x1a, 0xa8, 0xef, 0xd7, 0xfe, 0xa4, 0x83, 0x4f, 0x7e, 0x4c, 0x5b, - 0xc6, 0x93, 0xb4, 0x65, 0x3c, 0x4b, 0x5b, 0xc6, 0xef, 0x69, 0xcb, 0xf8, 0xe6, 0xaa, 0x75, 0xf0, - 0xec, 0xaa, 0x75, 0xf0, 0xdb, 0x55, 0xeb, 0xe0, 0x73, 0xe7, 0x5f, 0x8c, 0x5b, 0xff, 0xa9, 0x91, - 0xd3, 0x9e, 0x96, 0x65, 0xc5, 0xfb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x71, 0xb0, 0x0d, - 0xeb, 0x08, 0x00, 0x00, + // 1040 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xda, 0x8e, 0x63, 0x3f, 0x27, 0x51, 0xbe, 0xf3, 0x35, 0xed, 0x36, 0x01, 0x6f, 0x94, + 0x93, 0x41, 0x8a, 0x97, 0x06, 0x9a, 0x43, 0x4e, 0x64, 0x6d, 0x55, 0x5d, 0x21, 0x44, 0x58, 0xfb, + 0xc4, 0x65, 0x35, 0xde, 0x1d, 0x3b, 0x43, 0xed, 0x99, 0x65, 0x67, 0x1c, 0x35, 0x47, 0xfe, 0x03, + 0xfe, 0x02, 0x84, 0x90, 0x90, 0x2a, 0x4e, 0x1c, 0xf2, 0x1f, 0x20, 0xa4, 0xaa, 0x07, 0x54, 0x71, + 0xe2, 0x64, 0x90, 0x73, 0x28, 0x7f, 0x03, 0x27, 0xb4, 0x33, 0xb3, 0xb1, 0x1d, 0x5a, 0x85, 0x22, + 0x90, 0x7a, 0x49, 0xf6, 0xfd, 0x9c, 0xf7, 0x3e, 0xef, 0x7d, 0x66, 0x0c, 0x3b, 0x72, 0xc2, 0x18, + 0x19, 0xb9, 0x67, 0x77, 0xfb, 0x44, 0xe2, 0xbb, 0xae, 0x16, 0x5b, 0x49, 0xca, 0x25, 0x47, 0x9b, + 0x46, 0x32, 0xc6, 0xed, 0xff, 0xe1, 0x31, 0x65, 0xdc, 0x55, 0x7f, 0xb5, 0xcb, 0x76, 0x23, 0xe2, + 0x62, 0xcc, 0x85, 0xdb, 0xc7, 0x82, 0x5c, 0x25, 0x89, 0x38, 0x65, 0xc6, 0x7e, 0x47, 0xdb, 0x43, + 0x25, 0xb9, 0x5a, 0x30, 0xa6, 0xfa, 0x90, 0x0f, 0xb9, 0xd6, 0x67, 0x5f, 0x79, 0xc0, 0x90, 0xf3, + 0xe1, 0x88, 0xb8, 0x4a, 0xea, 0x4f, 0x06, 0x2e, 0x66, 0xe7, 0xb9, 0x69, 0x40, 0x48, 0x2c, 0xae, + 0x4e, 0x51, 0x92, 0x36, 0xed, 0x7d, 0x63, 0x41, 0xa5, 0xd7, 0xed, 0x06, 0x7c, 0x22, 0x09, 0x7a, + 0x00, 0xf5, 0x98, 0x08, 0x49, 0x19, 0x96, 0x94, 0xb3, 0x30, 0x3a, 0xc5, 0x94, 0x85, 0x34, 0xb6, + 0xad, 0x5d, 0xab, 0x59, 0xf5, 0x6e, 0xcd, 0xa6, 0x0e, 0xea, 0xcc, 0xed, 0xed, 0xcc, 0xec, 0x77, + 0x02, 0x14, 0x5f, 0xd7, 0xc5, 0xe8, 0x03, 0x78, 0x73, 0x29, 0x13, 0x67, 0x32, 0xc5, 0x91, 0x0c, + 0x71, 0x1c, 0xa7, 0x44, 0x08, 0xbb, 0x90, 0x65, 0x0c, 0xb6, 0x17, 0x23, 0x8d, 0xcb, 0xb1, 0xf6, + 0x38, 0x82, 0xa7, 0x17, 0xfb, 0x65, 0x55, 0x96, 0xbf, 0xf7, 0xad, 0x05, 0xb5, 0xe3, 0x47, 0x64, + 0x84, 0xd3, 0xd7, 0xbb, 0xce, 0x1f, 0x2d, 0x80, 0x2e, 0x1d, 0x32, 0x3c, 0xf2, 0xd9, 0x80, 0xa3, + 0xb7, 0xa1, 0x2a, 0x94, 0x34, 0xaf, 0x6d, 0x7d, 0x36, 0x75, 0x2a, 0xc6, 0xa5, 0x13, 0x54, 0xb4, + 0xd9, 0x8f, 0x91, 0x07, 0x48, 0xf0, 0x81, 0x0c, 0x63, 0x72, 0x46, 0x75, 0x29, 0xfd, 0x44, 0x9f, + 0x5e, 0xf2, 0xea, 0xb3, 0xa9, 0xb3, 0xd5, 0xe5, 0x03, 0xd9, 0xc9, 0x8d, 0xde, 0x49, 0x37, 0xd8, + 0x12, 0x4b, 0x9a, 0x44, 0x64, 0x39, 0x4e, 0x71, 0x1a, 0x5f, 0xcb, 0x51, 0x9c, 0xe7, 0x78, 0x80, + 0xd3, 0x78, 0x39, 0xc7, 0xe9, 0x92, 0x26, 0x11, 0x47, 0xa5, 0xdf, 0xbf, 0x76, 0xac, 0xbd, 0x9f, + 0x2c, 0x58, 0xeb, 0x90, 0x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xde, 0xf8, 0x10, 0xbe, 0x00, 0xce, 0xbd, 0xe7, + 0x16, 0xfc, 0x5f, 0x3f, 0xdc, 0xcb, 0x18, 0xbd, 0x0b, 0xeb, 0xb4, 0x1f, 0x85, 0x9f, 0x4f, 0xc8, + 0x84, 0xcc, 0x51, 0xda, 0x9c, 0x4d, 0x1d, 0xf0, 0xbd, 0xf6, 0x27, 0x99, 0xda, 0xef, 0x04, 0x40, + 0xfb, 0x91, 0xfe, 0x7e, 0xed, 0x3b, 0xf5, 0x3e, 0x7a, 0x3c, 0x6b, 0x58, 0x4f, 0x66, 0x0d, 0xeb, + 0xd9, 0xac, 0x61, 0xfd, 0x36, 0x6b, 0x58, 0x5f, 0x5e, 0x36, 0x56, 0x9e, 0x5d, 0x36, 0x56, 0x7e, + 0xb9, 0x6c, 0xac, 0x7c, 0xea, 0xfe, 0x8d, 0x71, 0x9b, 0xdf, 0x93, 0x6a, 0xda, 0xfd, 0xb2, 0xf2, + 0x78, 0xef, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xed, 0x79, 0x32, 0x55, 0x66, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -817,6 +901,41 @@ func (this *SignalInfo) Equal(that interface{}) bool { } return true } +func (this *Deposit) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Deposit) + if !ok { + that2, ok := that.(Deposit) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.TunnelId != that1.TunnelId { + return false + } + if this.Depositor != that1.Depositor { + return false + } + if len(this.Amount) != len(that1.Amount) { + return false + } + for i := range this.Amount { + if !this.Amount[i].Equal(&that1.Amount[i]) { + return false + } + } + return true +} func (this *Tunnel) Equal(that interface{}) bool { if that == nil { return this == nil @@ -862,6 +981,14 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.Interval != that1.Interval { return false } + if len(this.TotalDeposit) != len(that1.TotalDeposit) { + return false + } + for i := range this.TotalDeposit { + if !this.TotalDeposit[i].Equal(&that1.TotalDeposit[i]) { + return false + } + } if this.IsActive != that1.IsActive { return false } @@ -1150,6 +1277,55 @@ func (m *SignalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Deposit) 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 *Deposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTunnel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x12 + } + if m.TunnelId != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *Tunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1175,12 +1351,12 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Creator) i = encodeVarintTunnel(dAtA, i, uint64(len(m.Creator))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x5a } if m.CreatedAt != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) i-- - dAtA[i] = 0x48 + dAtA[i] = 0x50 } if m.IsActive { i-- @@ -1190,7 +1366,21 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x40 + dAtA[i] = 0x48 + } + if len(m.TotalDeposit) > 0 { + for iNdEx := len(m.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTunnel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } } if m.Interval != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.Interval)) @@ -1542,6 +1732,28 @@ func (m *SignalInfo) Size() (n int) { return n } +func (m *Deposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelId != 0 { + n += 1 + sovTunnel(uint64(m.TunnelId)) + } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTunnel(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + return n +} + func (m *Tunnel) Size() (n int) { if m == nil { return 0 @@ -1574,6 +1786,12 @@ func (m *Tunnel) Size() (n int) { if m.Interval != 0 { n += 1 + sovTunnel(uint64(m.Interval)) } + if len(m.TotalDeposit) > 0 { + for _, e := range m.TotalDeposit { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } if m.IsActive { n += 2 } @@ -2046,6 +2264,141 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { } return nil } +func (m *Deposit) 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 ErrIntOverflowTunnel + } + 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: Deposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + m.TunnelId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + 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 ErrInvalidLengthTunnel + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTunnel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTunnel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Tunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2143,7 +2496,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Route == nil { - m.Route = &types.Any{} + m.Route = &types1.Any{} } if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2163,7 +2516,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FeedType |= types1.FeedType(b&0x7F) << shift + m.FeedType |= types2.FeedType(b&0x7F) << shift if b < 0x80 { break } @@ -2254,6 +2607,40 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } } case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalDeposit = append(m.TotalDeposit, types.Coin{}) + if err := m.TotalDeposit[len(m.TotalDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) } @@ -2273,7 +2660,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } } m.IsActive = bool(v != 0) - case 9: + case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -2292,7 +2679,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { break } } - case 10: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } @@ -2699,7 +3086,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.PacketContent == nil { - m.PacketContent = &types.Any{} + m.PacketContent = &types1.Any{} } if err := m.PacketContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 824460da7..2c23227eb 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -45,8 +45,8 @@ type MsgCreateTunnel struct { Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // feed_type is the type of feed data. FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` - // deposit is the deposit required to create a tunnel. - Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` + // initial_deposit is the deposit value that must be paid at tunnel creation. + InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit"` // creator is the address of the creator. Creator string `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` } @@ -112,9 +112,9 @@ func (m *MsgCreateTunnel) GetFeedType() types1.FeedType { return types1.FEED_TYPE_UNSPECIFIED } -func (m *MsgCreateTunnel) GetDeposit() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgCreateTunnel) GetInitialDeposit() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Deposit + return m.InitialDeposit } return nil } @@ -557,6 +557,107 @@ func (m *MsgManualTriggerTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgManualTriggerTunnelResponse proto.InternalMessageInfo +// MsgDeposit defines a message to submit a deposit to an existing tunnel. +type MsgDeposit struct { + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` + // depositor defines the deposit addresses from the tunnel. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` + // amount to be deposited by depositor. + Amount []types2.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount"` +} + +func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } +func (m *MsgDeposit) String() string { return proto.CompactTextString(m) } +func (*MsgDeposit) ProtoMessage() {} +func (*MsgDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{10} +} +func (m *MsgDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeposit.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 *MsgDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeposit.Merge(m, src) +} +func (m *MsgDeposit) XXX_Size() int { + return m.Size() +} +func (m *MsgDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo + +func (m *MsgDeposit) GetTunnelId() uint64 { + if m != nil { + return m.TunnelId + } + return 0 +} + +func (m *MsgDeposit) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +func (m *MsgDeposit) GetAmount() []types2.Coin { + if m != nil { + return m.Amount + } + return nil +} + +// MsgDepositResponse defines the Msg/Deposit response type. +type MsgDepositResponse struct { +} + +func (m *MsgDepositResponse) Reset() { *m = MsgDepositResponse{} } +func (m *MsgDepositResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositResponse) ProtoMessage() {} +func (*MsgDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{11} +} +func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDepositResponse.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 *MsgDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositResponse.Merge(m, src) +} +func (m *MsgDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo + // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { // authority is the address of the governance account. @@ -569,7 +670,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{10} + return fileDescriptor_747f2bf21e50fad9, []int{12} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -620,7 +721,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{11} + return fileDescriptor_747f2bf21e50fad9, []int{13} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -660,6 +761,8 @@ func init() { proto.RegisterType((*MsgDeactivateTunnelResponse)(nil), "tunnel.v1beta1.MsgDeactivateTunnelResponse") proto.RegisterType((*MsgManualTriggerTunnel)(nil), "tunnel.v1beta1.MsgManualTriggerTunnel") proto.RegisterType((*MsgManualTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgManualTriggerTunnelResponse") + proto.RegisterType((*MsgDeposit)(nil), "tunnel.v1beta1.MsgDeposit") + proto.RegisterType((*MsgDepositResponse)(nil), "tunnel.v1beta1.MsgDepositResponse") proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") } @@ -667,62 +770,68 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 869 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x9b, 0xb4, 0x9b, 0x4c, 0x42, 0x61, 0xbd, 0xa1, 0x71, 0x5c, 0xd5, 0x09, 0x46, 0xcb, - 0xa6, 0xbb, 0xaa, 0x4d, 0xc3, 0xc2, 0x81, 0x5b, 0xd3, 0x82, 0x94, 0x43, 0x24, 0xe4, 0x2d, 0xd2, - 0x8a, 0x03, 0xd1, 0x24, 0x9e, 0x4c, 0x2d, 0x92, 0x99, 0xc8, 0x33, 0x89, 0x36, 0x57, 0x8e, 0x9c, - 0xf8, 0x02, 0x1c, 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 0x6d, 0x88, - 0x5a, 0xed, 0x37, 0x73, 0x43, 0x39, 0x9f, 0x1b, 0xca, 0xdf, 0x73, 0x43, 0xf9, 0xf1, 0xd2, 0xc8, - 0x9c, 0x5f, 0x1a, 0x99, 0x3f, 0x2f, 0x8d, 0xcc, 0x37, 0xf6, 0xd2, 0xd3, 0xda, 0x83, 0xc4, 0x0d, - 0xdf, 0xfc, 0x3e, 0x1d, 0xda, 0xfd, 0x33, 0xe8, 0x11, 0x7b, 0xda, 0xb4, 0x5f, 0xc8, 0x7f, 0x5e, - 0xc4, 0x3b, 0xdb, 0xdb, 0x0a, 0x19, 0x9f, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xef, 0x25, 0x23, - 0x70, 0xc0, 0x09, 0x00, 0x00, + // 971 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xc6, 0x49, 0x1a, 0x4f, 0x42, 0x4a, 0xb6, 0x26, 0x5e, 0x6f, 0x14, 0xdb, 0x2c, 0x94, + 0x3a, 0xa9, 0xb2, 0xab, 0x98, 0x96, 0x43, 0xc5, 0x25, 0x4e, 0x40, 0xf2, 0xc1, 0x12, 0xda, 0x06, + 0xa9, 0xe2, 0x80, 0x35, 0xf6, 0x8e, 0x37, 0x23, 0xec, 0x19, 0x6b, 0x67, 0x6c, 0xd5, 0x57, 0x8e, + 0x48, 0x48, 0xfc, 0x01, 0x0e, 0x9c, 0x40, 0x3d, 0xe5, 0x50, 0x89, 0xbf, 0x50, 0x71, 0xaa, 0x38, + 0xc1, 0x25, 0xa0, 0xe4, 0x10, 0x89, 0x1f, 0xc0, 0x19, 0xed, 0xcc, 0x78, 0x77, 0xbd, 0xd9, 0x36, + 0x46, 0x95, 0x7a, 0xb1, 0x77, 0xde, 0xfb, 0xde, 0x9b, 0xef, 0x7b, 0x33, 0xf3, 0x66, 0x40, 0x91, + 0x8f, 0x08, 0x41, 0x7d, 0x67, 0x7c, 0xd0, 0x41, 0x1c, 0x1e, 0x38, 0xfc, 0xa9, 0x3d, 0x0c, 0x28, + 0xa7, 0xfa, 0x86, 0x74, 0xd8, 0xca, 0x61, 0x96, 0x7c, 0x4a, 0xfd, 0x3e, 0x72, 0x84, 0xb7, 0x33, + 0xea, 0x39, 0x90, 0x4c, 0x24, 0xd4, 0x2c, 0xf8, 0xd4, 0xa7, 0xe2, 0xd3, 0x09, 0xbf, 0x94, 0x75, + 0x3b, 0x95, 0x79, 0x08, 0x03, 0x38, 0x60, 0xca, 0x59, 0xea, 0x52, 0x36, 0xa0, 0xac, 0x2d, 0xa3, + 0xe4, 0x40, 0xb9, 0xca, 0x72, 0xe4, 0x74, 0x20, 0x43, 0x51, 0x70, 0x97, 0x62, 0xa2, 0xfc, 0x45, + 0xe5, 0x1f, 0x30, 0xdf, 0x19, 0x1f, 0x84, 0x7f, 0xca, 0xb1, 0x09, 0x07, 0x98, 0x50, 0x47, 0xfc, + 0xbe, 0x82, 0x83, 0xd2, 0xa4, 0x38, 0xf4, 0x10, 0xf2, 0x58, 0xe4, 0x13, 0x23, 0xe9, 0xb2, 0x7e, + 0xcd, 0x81, 0xdb, 0x2d, 0xe6, 0x1f, 0x05, 0x08, 0x72, 0x74, 0x22, 0x82, 0xf4, 0x23, 0xb0, 0xce, + 0xb0, 0x4f, 0x60, 0xbf, 0x8d, 0x49, 0x8f, 0x32, 0x43, 0xab, 0xe6, 0x6a, 0x6b, 0x75, 0xd3, 0x9e, + 0xad, 0x93, 0xfd, 0x58, 0x60, 0x9a, 0xa4, 0x47, 0x1b, 0x4b, 0x2f, 0xce, 0x2b, 0x0b, 0xee, 0x1a, + 0x8b, 0x2c, 0x4c, 0x37, 0xc1, 0x2a, 0x26, 0x1c, 0x05, 0x63, 0xd8, 0x37, 0x16, 0xab, 0x5a, 0x6d, + 0xc9, 0x8d, 0xc6, 0xfa, 0x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, 0x24, 0xca, 0xef, 0x81, 0x77, 0xaf, 0xb5, 0x96, 0x0f, 0x32, 0xc2, 0xd3, 0x20, + 0xf3, 0xfe, 0x1c, 0xa0, 0x68, 0x96, 0x01, 0xb8, 0x93, 0x75, 0xfa, 0x3f, 0xca, 0xc8, 0x91, 0x81, + 0x33, 0xed, 0xf9, 0x70, 0xd1, 0x74, 0x4d, 0x70, 0x6b, 0x7a, 0x40, 0xcd, 0x4c, 0x9a, 0xc2, 0x67, + 0x5a, 0xaf, 0xf6, 0x45, 0xa9, 0x9e, 0x80, 0xf5, 0x99, 0x9d, 0x9f, 0xb5, 0x5b, 0x92, 0x80, 0xcc, + 0xdd, 0x92, 0xb5, 0x1f, 0x1b, 0xcd, 0x17, 0x17, 0x65, 0xed, 0xe5, 0x45, 0x59, 0xfb, 0xfb, 0xa2, + 0xac, 0xfd, 0x70, 0x59, 0x5e, 0x78, 0x79, 0x59, 0x5e, 0xf8, 0xe3, 0xb2, 0xbc, 0xf0, 0x95, 0x93, + 0x78, 0xa3, 0x74, 0x20, 0xf1, 0xc4, 0x23, 0xaa, 0x4b, 0xfb, 0x4e, 0xf7, 0x14, 0x62, 0xe2, 0x8c, + 0xeb, 0xce, 0x53, 0xf5, 0x1a, 0x94, 0x0f, 0x96, 0xce, 0x8a, 0x40, 0x7c, 0xfc, 0x5f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x46, 0xc7, 0x44, 0x1c, 0x11, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -747,6 +856,8 @@ type MsgClient interface { DeactivateTunnel(ctx context.Context, in *MsgDeactivateTunnel, opts ...grpc.CallOption) (*MsgDeactivateTunnelResponse, error) // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) + // Deposit is a RPC method to submit a deposit to an existing tunnel. + Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -804,6 +915,15 @@ func (c *msgClient) ManualTriggerTunnel(ctx context.Context, in *MsgManualTrigge return out, nil } +func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { + out := new(MsgDepositResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/Deposit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/UpdateParams", in, out, opts...) @@ -825,6 +945,8 @@ type MsgServer interface { DeactivateTunnel(context.Context, *MsgDeactivateTunnel) (*MsgDeactivateTunnelResponse, error) // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. ManualTriggerTunnel(context.Context, *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) + // Deposit is a RPC method to submit a deposit to an existing tunnel. + Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } @@ -848,6 +970,9 @@ func (*UnimplementedMsgServer) DeactivateTunnel(ctx context.Context, req *MsgDea func (*UnimplementedMsgServer) ManualTriggerTunnel(ctx context.Context, req *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ManualTriggerTunnel not implemented") } +func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") +} func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } @@ -946,6 +1071,24 @@ func _Msg_ManualTriggerTunnel_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeposit) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Deposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Msg/Deposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -988,6 +1131,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ManualTriggerTunnel", Handler: _Msg_ManualTriggerTunnel_Handler, }, + { + MethodName: "Deposit", + Handler: _Msg_Deposit_Handler, + }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, @@ -1024,10 +1171,10 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if len(m.Deposit) > 0 { - for iNdEx := len(m.Deposit) - 1; iNdEx >= 0; iNdEx-- { + if len(m.InitialDeposit) > 0 { + for iNdEx := len(m.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Deposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.InitialDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1356,6 +1503,78 @@ func (m *MsgManualTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *MsgDeposit) 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 *MsgDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintTx(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x12 + } + if m.TunnelId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgDepositResponse) 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 *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1452,8 +1671,8 @@ func (m *MsgCreateTunnel) Size() (n int) { if m.FeedType != 0 { n += 1 + sovTx(uint64(m.FeedType)) } - if len(m.Deposit) > 0 { - for _, e := range m.Deposit { + if len(m.InitialDeposit) > 0 { + for _, e := range m.InitialDeposit { l = e.Size() n += 1 + l + sovTx(uint64(l)) } @@ -1586,6 +1805,37 @@ func (m *MsgManualTriggerTunnelResponse) Size() (n int) { return n } +func (m *MsgDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelId != 0 { + n += 1 + sovTx(uint64(m.TunnelId)) + } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgUpdateParams) Size() (n int) { if m == nil { return 0 @@ -1755,7 +2005,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { } case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1782,8 +2032,8 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Deposit = append(m.Deposit, types2.Coin{}) - if err := m.Deposit[len(m.Deposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.InitialDeposit = append(m.InitialDeposit, types2.Coin{}) + if err := m.InitialDeposit[len(m.InitialDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2566,6 +2816,191 @@ func (m *MsgManualTriggerTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgDeposit) 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: MsgDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + m.TunnelId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 + } + m.Amount = append(m.Amount, types2.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *MsgDepositResponse) 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: MsgDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 12add29578e4678f588fddec4a5227aa25c89eca Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 10 Sep 2024 19:23:09 +0700 Subject: [PATCH 082/272] merge master-tss into master-tunnel --- pkg/tickmath/tickmath.go | 188 ++++++++ .../tickmath/tickmath_test.go | 18 +- proto/feeds/v1beta1/feeds.proto | 24 +- proto/feeds/v1beta1/params.proto | 5 +- proto/restake/v1beta1/genesis.proto | 4 +- proto/restake/v1beta1/query.proto | 50 +-- proto/restake/v1beta1/tx.proto | 2 +- proto/restake/v1beta1/types.proto | 54 +-- x/feeds/README.md | 50 ++- x/feeds/client/cli/tx.go | 12 +- x/feeds/keeper/genesis_test.go | 2 +- x/feeds/keeper/keeper_feeds_price_data.go | 6 +- .../keeper/keeper_feeds_price_data_test.go | 72 ++-- x/feeds/keeper/keeper_price.go | 10 +- x/feeds/keeper/keeper_test.go | 5 + x/feeds/testutil/mock_expected_keepers.go | 14 + x/feeds/tss_handler.go | 22 +- x/feeds/types/errors.go | 2 +- x/feeds/types/expected_keepers.go | 1 + x/feeds/types/feed_test.go | 4 +- x/feeds/types/feeds.pb.go | 192 ++++----- x/feeds/types/msgs_test.go | 2 +- x/feeds/types/params.go | 20 +- x/feeds/types/params.pb.go | 128 ++++-- x/feeds/types/price.go | 189 +-------- x/feeds/types/signature_order.go | 8 +- x/restake/client/cli/query.go | 38 +- x/restake/client/cli/tx.go | 6 +- x/restake/keeper/genesis.go | 12 +- x/restake/keeper/genesis_test.go | 6 +- x/restake/keeper/grpc_query.go | 48 +-- x/restake/keeper/grpc_query_test.go | 114 ++--- x/restake/keeper/hooks.go | 41 +- x/restake/keeper/hooks_test.go | 89 ++++ x/restake/keeper/keeper_key.go | 201 --------- x/restake/keeper/keeper_lock.go | 116 ++--- x/restake/keeper/keeper_lock_test.go | 158 +++---- x/restake/keeper/keeper_test.go | 371 ++++++++-------- x/restake/keeper/keeper_vault.go | 201 +++++++++ ...eeper_key_test.go => keeper_vault_test.go} | 214 +++++----- x/restake/keeper/msg_server.go | 14 +- x/restake/keeper/msg_server_test.go | 22 +- x/restake/types/constructor.go | 50 +++ x/restake/types/errors.go | 20 +- x/restake/types/events.go | 16 +- x/restake/types/expected_keepers.go | 2 +- x/restake/types/genesis.go | 40 +- x/restake/types/genesis.pb.go | 48 +-- x/restake/types/genesis_test.go | 52 +-- x/restake/types/keys.go | 57 ++- x/restake/types/keys_test.go | 52 ++- x/restake/types/msgs_test.go | 24 +- x/restake/types/query.pb.go | 400 +++++++++--------- x/restake/types/query.pb.gw.go | 62 +-- x/restake/types/tx.pb.go | 2 +- x/restake/types/types.pb.go | 269 ++++++------ 56 files changed, 2064 insertions(+), 1765 deletions(-) create mode 100644 pkg/tickmath/tickmath.go rename x/feeds/types/price_test.go => pkg/tickmath/tickmath_test.go (92%) create mode 100644 x/restake/keeper/hooks_test.go delete mode 100644 x/restake/keeper/keeper_key.go create mode 100644 x/restake/keeper/keeper_vault.go rename x/restake/keeper/{keeper_key_test.go => keeper_vault_test.go} (51%) create mode 100644 x/restake/types/constructor.go diff --git a/pkg/tickmath/tickmath.go b/pkg/tickmath/tickmath.go new file mode 100644 index 000000000..96459494d --- /dev/null +++ b/pkg/tickmath/tickmath.go @@ -0,0 +1,188 @@ +package tickmath + +import ( + "errors" + "fmt" + "math/big" +) + +const ( + MaxTick int64 = 262143 // Equivalent to 2**18 - 1 + MinTick int64 = -MaxTick // Equivalent to -2**18 + 1 + Offset int64 = 262144 // Equivalent to 2**18 +) + +var ( + priceX96AtBinaryTicks = getPricesX96AtBinaryTicks() + + maxUint192, _ = new(big.Int).SetString("ffffffffffffffffffffffffffffffffffffffffffffffff", 16) + maxUint96, _ = new(big.Int).SetString("ffffffffffffffffffffffff", 16) + maxUint64, _ = new(big.Int).SetString("ffffffffffffffff", 16) + q96, _ = new(big.Int).SetString("1000000000000000000000000", 16) + zero = new(big.Int).SetUint64(0) + one = new(big.Int).SetUint64(1) + billion = new(big.Int).SetUint64(1000000000) +) + +// TickToPrice converts the tick to price with 10^9 precision. It will return an error +// if the tick is out of range or the tick is so large that cannot be converted to uint64. +// NOTE: the result is rounded up to the nearest integer, this is aligned with the UniswapV3 calculation. +func TickToPrice(tick int64) (uint64, error) { + priceX96, err := tickToPriceX96(tick) + if err != nil { + return 0, err + } + + // round up the price and convert to uint64 + // we round up in the division so PriceX1E9ToTick of the output price is always consistent + // var price *big.Int + price := new(big.Int).Div(priceX96, q96) + if price.Cmp(zero) <= 0 { + return 0, fmt.Errorf("price out of range") + } + + if new(big.Int).Rem(priceX96, q96).Cmp(zero) > 0 { + priceNextTickX96 := new(big.Int).Div(new(big.Int).Mul(priceX96, big.NewInt(10001)), big.NewInt(10000)) + priceNextTick := new(big.Int).Div(priceNextTickX96, q96) + + if priceNextTick.Cmp(price) > 0 { + price = new(big.Int).Add(price, one) + } + } + + if price.Cmp(maxUint64) > 0 { + return 0, fmt.Errorf("price out of range") + } + return price.Uint64(), nil +} + +// PriceToTick converts the price to tick, it will return the nearest tick that yields +// less than or equal to the given price. +// ref: https://en.wikipedia.org/wiki/Binary_logarithm#Iterative_approximation +func PriceToTick(price uint64) (uint64, error) { + if price == 0 { + return 0, errors.New("price must be greater than 0") + } + + // find the most significant bit (msb) of the log2(price); + msb := uint64(0) + p := price + bits := []uint64{4294967295, 65535, 255, 15, 3, 1} + for i, bit := range bits { + if p > bit { + n := uint64(1 << (len(bits) - i - 1)) + msb += n + p >>= n + } + } + + // find the remaining r = price / 2^msb and shift significant bits to 2^31; + r := uint64(0) + if msb >= 32 { + r = price >> (msb - 31) + } else { + r = price << (31 - msb) + } + + // approximate log2(r) using iterations of base-2 logarithm with 16-bit precision; + log2 := int64(msb) << 16 + for i := 0; i < 16; i++ { + r = (r * r) >> 31 + f := r >> 32 + log2 |= int64(f) << (15 - i) + r >>= f + } + + // convert to tick value; + // tick = (log2 - log2(10^9) *2^16) * (1/log2(1.0001))/(2^16/2^32) + log1p0001 := (log2 - 1959352) * 454283648 + tick := log1p0001 >> 32 + if tick > MaxTick || tick < MinTick { + return 0, fmt.Errorf("tick out of range") + } + + // the result will differ by 1 tick if the price is not exactly at the tick value; + // it will return the largest tick whose price are less than or equal to the given price. + // NOTE: cannot use the previous result divided by 1.0001 as the fraction has been reduced. + expectPriceX96 := new(big.Int).Mul(new(big.Int).SetUint64(price), q96) + for i := int64(1); i >= 0; i-- { + t := tick + i + pX96, err := tickToPriceX96(t) + if err == nil && pX96.Cmp(expectPriceX96) <= 0 { + return uint64(t + Offset), nil + } + } + + return uint64(tick - 1 + Offset), nil +} + +// mulShift multiplies two big.Int and shifts the result to the right by 96 bits. +// It returns a new big.Int object. +func mulShift(val *big.Int, mulBy *big.Int) *big.Int { + return new(big.Int).Rsh(new(big.Int).Mul(val, mulBy), 96) +} + +// tickToPriceX96 converts the tick to price in x96 (2^96) * 10^9 format. +func tickToPriceX96(tick int64) (*big.Int, error) { + if tick > MaxTick || tick < MinTick { + return nil, fmt.Errorf("tick out of range") + } + + absTick := tick + if tick < 0 { + absTick = -tick + } + + // multiply the price ratio at each binary tick + priceX96 := new(big.Int).Set(q96) + for i, pX96 := range priceX96AtBinaryTicks { + if absTick&(1< 0 { + priceX96 = new(big.Int).Div(maxUint192, priceX96) + } + + priceX96 = new(big.Int).Mul(priceX96, billion) + + return priceX96, nil +} + +// getPricesX96AtBinaryTicks returns the prices at each binary tick in x96 format. +// the prices are in the term of 1.0001^-(2^i) * 2^96. +func getPricesX96AtBinaryTicks() []*big.Int { + x96Hexes := []string{ + "fff97272373d413259a46990", + "fff2e50f5f656932ef12357c", + "ffe5caca7e10e4e61c3624ea", + "ffcb9843d60f6159c9db5883", + "ff973b41fa98c081472e6896", + "ff2ea16466c96a3843ec78b3", + "fe5dee046a99a2a811c461f1", + "fcbe86c7900a88aedcffc83b", + "f987a7253ac413176f2b074c", + "f3392b0822b70005940c7a39", + "e7159475a2c29b7443b29c7f", + "d097f3bdfd2022b8845ad8f7", + "a9f746462d870fdf8a65dc1f", + "70d869a156d2a1b890bb3df6", + "31be135f97d08fd981231505", + "9aa508b5b7a84e1c677de54", + "5d6af8dedb81196699c329", + "2216e584f5fa1ea92604", + } + + prices := make([]*big.Int, 0, len(x96Hexes)) + for _, x96Hex := range x96Hexes { + p, ok := new(big.Int).SetString(x96Hex, 16) + if !ok { + panic("failed to parse hex string") + } + prices = append(prices, p) + } + + return prices +} diff --git a/x/feeds/types/price_test.go b/pkg/tickmath/tickmath_test.go similarity index 92% rename from x/feeds/types/price_test.go rename to pkg/tickmath/tickmath_test.go index 72ab67ccc..6625591b1 100644 --- a/x/feeds/types/price_test.go +++ b/pkg/tickmath/tickmath_test.go @@ -1,4 +1,4 @@ -package types_test +package tickmath_test import ( "fmt" @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/bandprotocol/chain/v2/x/feeds/types" + "github.com/bandprotocol/chain/v2/pkg/tickmath" ) // PriceToTick converts the price to tick @@ -22,11 +22,11 @@ func PriceToTickUsingLog(priceX1E9 uint64) (uint64, error) { } tick := int64(math.Floor(math.Log(price) / math.Log(float64(1.0001)))) - if tick > types.MaxTick || tick < types.MinTick { + if tick > tickmath.MaxTick || tick < tickmath.MinTick { return 0, fmt.Errorf("tick out of range") } - return uint64(tick + types.Offset), nil + return uint64(tick + tickmath.Offset), nil } func TestTickToPrice(t *testing.T) { @@ -95,7 +95,7 @@ func TestTickToPrice(t *testing.T) { for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { - result, err := types.TickToPrice(tc.tick) + result, err := tickmath.TickToPrice(tc.tick) require.Equal(t, tc.err, err) require.Equal(t, tc.result, result) }) @@ -105,7 +105,7 @@ func TestTickToPrice(t *testing.T) { func TestSmallPriceToTick(t *testing.T) { for i := 0; i <= 1000; i++ { price := uint64(i) - tick, err := types.PriceToTick(price) + tick, err := tickmath.PriceToTick(price) tickLog, errLog := PriceToTickUsingLog(price) if errLog != nil { require.Equal(t, err, errLog, fmt.Sprintf("price: %d", price)) @@ -191,7 +191,7 @@ func TestPriceToTick(t *testing.T) { for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { - result, err := types.PriceToTick(tc.price) + result, err := tickmath.PriceToTick(tc.price) require.Equal(t, tc.err, err) require.Equal(t, tc.result, result) @@ -216,7 +216,7 @@ func TestPriceToTickRandomly(t *testing.T) { for i := 0; i < 1000; i++ { price := rng.Uint64() - tick, err := types.PriceToTick(price) + tick, err := tickmath.PriceToTick(price) tickLog, errLog := PriceToTickUsingLog(price) if errLog != nil { require.Equal(t, errLog, err, fmt.Sprintf("price: %d", price)) @@ -229,7 +229,7 @@ func TestPriceToTickRandomly(t *testing.T) { for i := 0; i < 1000; i++ { price := rng.Uint64() % 1000000 - tick, err := types.PriceToTick(price) + tick, err := tickmath.PriceToTick(price) tickLog, errLog := PriceToTickUsingLog(price) if errLog != nil { require.Equal(t, errLog, err, fmt.Sprintf("price: %d", price)) diff --git a/proto/feeds/v1beta1/feeds.proto b/proto/feeds/v1beta1/feeds.proto index b86b4dba3..109d3e7e0 100644 --- a/proto/feeds/v1beta1/feeds.proto +++ b/proto/feeds/v1beta1/feeds.proto @@ -193,27 +193,27 @@ message FeedsPriceData { uint64 timestamp = 2; } -// FeedType is a structure that defines the type of feed. -enum FeedType { +// Encoder is an enumerator that defines the mode of encoding message in tss module. +enum Encoder { option (gogoproto.goproto_enum_prefix) = false; - // FEED_TYPE_UNSPECIFIED is an unspecified feed type. - FEED_TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "FEED_TYPE_UNSPECIFIED"]; + // ENCODER_UNSPECIFIED is an unspecified encoder mode. + ENCODER_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ENCODER_UNSPECIFIED"]; - // FEED_TYPE_FIXED_POINT_ABI is a fixed-point price feed type (price * 10^9). - FEED_TYPE_FIXED_POINT_ABI = 1 [(gogoproto.enumvalue_customname) = "FEED_TYPE_FIXED_POINT_ABI"]; + // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). + ENCODER_FIXED_POINT_ABI = 1 [(gogoproto.enumvalue_customname) = "ENCODER_FIXED_POINT_ABI"]; - // FEED_TYPE_TICK_ABI is a tick feed type. - FEED_TYPE_TICK_ABI = 2 [(gogoproto.enumvalue_customname) = "FEED_TYPE_TICK_ABI"]; + // ENCODER_TICK_ABI is a tick abi encoder. + ENCODER_TICK_ABI = 2 [(gogoproto.enumvalue_customname) = "ENCODER_TICK_ABI"]; } -// FeedSignatureOrder defines a general signature order for feed data. +// FeedsSignatureOrder defines a general signature order for feed data. message FeedsSignatureOrder { option (gogoproto.goproto_getters) = false; - // SignalIDs is the list of signal ids that require signatures. + // signal_ids is the list of signal ids that require signatures. repeated string signal_ids = 1 [(gogoproto.customname) = "SignalIDs"]; - // FeedType is the type of feed. - FeedType feed_type = 2 [(gogoproto.customname) = "FeedType"]; + // encoder is the mode of encoding feeds signature order. + Encoder encoder = 2; } diff --git a/proto/feeds/v1beta1/params.proto b/proto/feeds/v1beta1/params.proto index a0e9c98ce..f873a30c0 100644 --- a/proto/feeds/v1beta1/params.proto +++ b/proto/feeds/v1beta1/params.proto @@ -47,6 +47,9 @@ message Params { // current_feeds_update_interval is the number of blocks after which the current feeds will be re-calculated. int64 current_feeds_update_interval = 11; + // price_quorum is the minimum percentage of power that needs to be reached for a price to be processed. + string price_quorum = 12; + // MaxSignalIDsPerSigning is the maximum number of signals allowed in a single tss signing request. - uint64 max_signal_ids_per_signing = 12 [(gogoproto.customname) = "MaxSignalIDsPerSigning"]; + uint64 max_signal_ids_per_signing = 13 [(gogoproto.customname) = "MaxSignalIDsPerSigning"]; } diff --git a/proto/restake/v1beta1/genesis.proto b/proto/restake/v1beta1/genesis.proto index e272b2732..511bfd24b 100644 --- a/proto/restake/v1beta1/genesis.proto +++ b/proto/restake/v1beta1/genesis.proto @@ -8,8 +8,8 @@ import "restake/v1beta1/types.proto"; // GenesisState represents the initial state of the blockchain. message GenesisState { - // keys is a list of keys in the module. - repeated Key keys = 1 [(gogoproto.nullable) = false]; + // vaults is a list of vaults in the module. + repeated Vault vaults = 1 [(gogoproto.nullable) = false]; // locks is a list of locks in the module. repeated Lock locks = 2 [(gogoproto.nullable) = false]; diff --git a/proto/restake/v1beta1/query.proto b/proto/restake/v1beta1/query.proto index 9caf8beb2..80e7ffb67 100644 --- a/proto/restake/v1beta1/query.proto +++ b/proto/restake/v1beta1/query.proto @@ -10,14 +10,14 @@ import "restake/v1beta1/types.proto"; // Query defines the gRPC querier service. service Query { - // Keys returns a list of keys. - rpc Keys(QueryKeysRequest) returns (QueryKeysResponse) { - option (google.api.http).get = "/restake/v1beta1/keys"; + // Vaults returns a list of vault. + rpc Vaults(QueryVaultsRequest) returns (QueryVaultsResponse) { + option (google.api.http).get = "/restake/v1beta1/vaults"; } - // Key returns a key information. - rpc Key(QueryKeyRequest) returns (QueryKeyResponse) { - option (google.api.http).get = "/restake/v1beta1/keys/{key}"; + // Vault returns a vault information. + rpc Vault(QueryVaultRequest) returns (QueryVaultResponse) { + option (google.api.http).get = "/restake/v1beta1/vaults/{key}"; } // Rewards returns rewards for a specific address. @@ -25,7 +25,7 @@ service Query { option (google.api.http).get = "/restake/v1beta1/stakers/{staker_address}/rewards"; } - // Reward returns a reward for a specific address and a key. + // Reward returns a reward for a specific address and a vault. rpc Reward(QueryRewardRequest) returns (QueryRewardResponse) { option (google.api.http).get = "/restake/v1beta1/stakers/{staker_address}/rewards/{key}"; } @@ -35,37 +35,37 @@ service Query { option (google.api.http).get = "/restake/v1beta1/stakers/{staker_address}/locks"; } - // Lock returns a lock information for a specific address and a key. + // Lock returns a lock information for a specific address and a vault. rpc Lock(QueryLockRequest) returns (QueryLockResponse) { option (google.api.http).get = "/restake/v1beta1/stakers/{staker_address}/locks/{key}"; } } -// QueryKeysRequest represents the request type for the Query/Keys RPC method. -message QueryKeysRequest { +// QueryVaultsRequest represents the request type for the Query/Vaults RPC method. +message QueryVaultsRequest { // pagination defines optional pagination parameters. cosmos.base.query.v1beta1.PageRequest pagination = 1; } -// QueryKeysResponse represents the response type for the Query/Keys RPC method. -message QueryKeysResponse { - // keys is a list of keys. - repeated Key keys = 1; +// QueryVaultsResponse represents the response type for the Query/Vaults RPC method. +message QueryVaultsResponse { + // vaults is a list of vaults. + repeated Vault vaults = 1; // pagination defines pagination parameters in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryKeyRequest represents the request type for the Query/Key RPC method. -message QueryKeyRequest { - // key is the name of the key that want to query. +// QueryVaultRequest represents the request type for the Query/Vault RPC method. +message QueryVaultRequest { + // key is the key of the vault that want to query. string key = 1; } -// QueryKeyResponse represents the response type for the Query/Key RPC method. -message QueryKeyResponse { - // key is a key information. - Key key = 1 [(gogoproto.nullable) = false]; +// QueryVaultResponse represents the response type for the Query/Vault RPC method. +message QueryVaultResponse { + // vault is a vault information. + Vault vault = 1 [(gogoproto.nullable) = false]; } // QueryRewardsRequest represents the request type for the Query/Rewards RPC method. @@ -91,13 +91,13 @@ message QueryRewardRequest { // staker_address is the target address to query reward. string staker_address = 1; - // key is the target key to query reward. + // key is the key of target vault to query reward. string key = 2; } // QueryRewardResponse represents the response type for the Query/Reward RPC method. message QueryRewardResponse { - // reward is the reward for the staker and the key. + // reward is the reward for the staker of the vault. Reward reward = 1 [(gogoproto.nullable) = false]; } @@ -124,12 +124,12 @@ message QueryLockRequest { // staker_address is the target address to query lock. string staker_address = 1; - // key is the target key to query reward. + // key is the key of target vault to query reward. string key = 2; } // QueryLockResponse represents the response type for the Query/Lock RPC method. message QueryLockResponse { - // lock is the lock of the staker and the key. + // lock is the lock of the staker and the vault. LockResponse lock = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/restake/v1beta1/tx.proto b/proto/restake/v1beta1/tx.proto index a326a1359..502dbcb88 100644 --- a/proto/restake/v1beta1/tx.proto +++ b/proto/restake/v1beta1/tx.proto @@ -21,7 +21,7 @@ message MsgClaimRewards { // staker_address is the address that will claim the rewards. string staker_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // key is the key that want to claim rewards from. + // key is the key of the vault that want to claim rewards from. string key = 2; } diff --git a/proto/restake/v1beta1/types.proto b/proto/restake/v1beta1/types.proto index 487099c6f..58dcfe965 100644 --- a/proto/restake/v1beta1/types.proto +++ b/proto/restake/v1beta1/types.proto @@ -8,36 +8,36 @@ import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; -// Key is used for tracking the status and rewards of the keys. -message Key { +// Vault is used for tracking the status and rewards of the vaults. +message Vault { option (gogoproto.equal) = true; - // name is the name of the key. - string name = 1; + // key is the key of the vault. + string key = 1; - // pool_address is the address that holds rewards for this key. - string pool_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // vault_address is the address that holds rewards for this vault. + string vault_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // is_active is the status of the key + // is_active is the status of the vault bool is_active = 3; - // reward_per_powers is a list of reward_per_power. - // new_reward_per_power = current_reward_per_power + (rewards / total_power) - repeated cosmos.base.v1beta1.DecCoin reward_per_powers = 4 [ + // rewards_per_power is rewards per power (DecCoins) + // new_rewards_per_power = current_rewards_per_power + (rewards / total_power) + repeated cosmos.base.v1beta1.DecCoin rewards_per_power = 4 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; - // total_power is the total locked power of the key. + // total_power is the total locked power of the vault. string total_power = 5 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; - // remainders is a list of the remainder amounts in the key. - // this field is used to track remainder amount from claimings in the key pool. + // remainders is the remainder amounts in the vault. + // this field is used to track remainder amount from claimings in the vault. repeated cosmos.base.v1beta1.DecCoin remainders = 6 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false, @@ -45,24 +45,24 @@ message Key { ]; } -// Lock is used to store lock information of each user on each key along with their reward information. +// Lock is used to store lock information of each user on each vault along with their reward information. message Lock { option (gogoproto.equal) = true; // staker_address is the owner's address of the staker. string staker_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // key is the key that this lock is locked to. + // key is the key of the vault that this lock is locked to. string key = 2; - // amount is the locked power amount. - string amount = 3 [ + // power is the number of locked power. + string power = 3 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; - // pos_reward_debts is a list of reward debt for each reward (only the positive side). + // pos_reward_debts is the positive part of reward debts. // Note: Coin and DecCoin can't have negative amounts. so, we split it into two numbers. repeated cosmos.base.v1beta1.DecCoin pos_reward_debts = 4 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", @@ -70,7 +70,7 @@ message Lock { (amino.dont_omitempty) = true ]; - // neg_reward_debts is a list of reward debt for each reward (only negative side). + // neg_reward_debts is the negative part of reward debts. repeated cosmos.base.v1beta1.DecCoin neg_reward_debts = 5 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false, @@ -78,14 +78,14 @@ message Lock { ]; } -// Reward is used as response of the query to show final rewards of the key for the user. +// Reward is used as response of the query to show final rewards of the vault for the user. message Reward { option (gogoproto.equal) = true; - // key is the key that this reward belongs to. + // key is the key of the vault that this reward belongs to. string key = 1; - // rewards is a list of reward. + // rewards is the total rewards repeated cosmos.base.v1beta1.DecCoin rewards = 2 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false, @@ -93,16 +93,16 @@ message Reward { ]; } -// LockResponse is used as response of the query to show the power amount -// that is locked by the key for the user. +// LockResponse is used as response of the query to show the power +// that is locked by the vault for the user. message LockResponse { option (gogoproto.equal) = true; - // key is the key that this lock belongs to. + // key is the key of the vault that this lock belongs to. string key = 1; - // amount is a the number of locked power. - string amount = 2 [ + // power is the number of locked power. + string power = 2 [ (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false diff --git a/x/feeds/README.md b/x/feeds/README.md index ba31f1431..b7094578a 100644 --- a/x/feeds/README.md +++ b/x/feeds/README.md @@ -162,41 +162,44 @@ message Params { option (gogoproto.equal) = true; // Use gogoproto.equal for proto3 message equality checks option (gogoproto.goproto_stringer) = false; // Disable stringer generation for better control - // Admin is the address of the admin that is allowed to perform operations on modules. + // admin is the address of the admin that is allowed to perform operations on modules. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // AllowableBlockTimeDiscrepancy is the allowed discrepancy (in seconds) between validator price timestamp and + // allowable_block_time_discrepancy is the allowed discrepancy (in seconds) between validator price timestamp and // block_time. int64 allowable_block_time_discrepancy = 2; - // GracePeriod is the time (in seconds) given for validators to adapt to changing in feed's interval. + // grace_period is the time (in seconds) given for validators to adapt to changing in feed's interval. int64 grace_period = 3; - // MinInterval is the minimum limit of every feeds' interval (in seconds). + // min_interval is the minimum limit of every feeds' interval (in seconds). // If the calculated interval is lower than this, it will be capped at this value. int64 min_interval = 4; - // MaxInterval is the maximum limit of every feeds' interval (in seconds). + // max_interval is the maximum limit of every feeds' interval (in seconds). // If the calculated interval of a feed is higher than this, it will not be capped at this value. int64 max_interval = 5; - // PowerStepThreshold is the amount of minimum power required to put feed in the current feeds list. + // power_step_threshold is the amount of minimum power required to put feed in the current feeds list. int64 power_step_threshold = 6; - // MaxCurrentFeeds is the maximum number of feeds supported at a time. + // max_current_feeds is the maximum number of feeds supported at a time. uint64 max_current_feeds = 7; - // CooldownTime represents the duration (in seconds) during which validators are prohibited from sending new prices. + // cooldown_time represents the duration (in seconds) during which validators are prohibited from sending new prices. int64 cooldown_time = 8; - // MinDeviationBasisPoint is the minimum limit of every feeds' deviation (in basis point). + // min_deviation_basis_point is the minimum limit of every feeds' deviation (in basis point). int64 min_deviation_basis_point = 9; - // MaxDeviationBasisPoint is the maximum limit of every feeds' deviation (in basis point). + // max_deviation_basis_point is the maximum limit of every feeds' deviation (in basis point). int64 max_deviation_basis_point = 10; - // CurrentFeedsUpdateInterval is the number of blocks after which the current feeds will be re-calculated. + // current_feeds_update_interval is the number of blocks after which the current feeds will be re-calculated. int64 current_feeds_update_interval = 11; + + // price_quorum is the minimum percentage of power that needs to be reached for a price to be processed. + uint64 price_quorum = 12; } ``` @@ -212,14 +215,15 @@ Batched Signals replace the previous Signals of the same delegator as a batch. Signals are registered, and their power is added to the SignalTotalPower of the same SignalID. ```protobuf -// MsgSubmitSignals is the transaction message to submit signals +// MsgSubmitSignals is the transaction message to submit signals. message MsgSubmitSignals { option (cosmos.msg.v1.signer) = "delegator"; option (amino.name) = "feeds/MsgSubmitSignals"; - // Delegator is the address of the delegator that want to submit signals + // delegator is the address of the delegator that wants to submit signals. string delegator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Signals is a list of submitted signal + + // signals is a list of submitted signals. repeated Signal signals = 2 [(gogoproto.nullable) = false]; } ``` @@ -242,13 +246,13 @@ message MsgSubmitSignalPrices { option (cosmos.msg.v1.signer) = "validator"; option (amino.name) = "feeds/MsgSubmitSignalPrices"; - // Validator is the address of the validator that is performing the operation. + // validator is the address of the validator that is performing the operation. string validator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Timestamp is the timestamp use as reference of the data. + // timestamp is the timestamp used as reference for the data. int64 timestamp = 2; - // Prices is a list of signal prices to submit. + // prices is a list of signal prices to submit. repeated SignalPrice prices = 3 [(gogoproto.nullable) = false]; } ``` @@ -268,15 +272,15 @@ Reference Source can be updated with the `MsgUpdateReferenceSourceConfig` messag Only the assigned admin can update the Reference Source. ```protobuf -// MsgUpdateReferenceSourceConfig is the transaction message to update reference source config's configuration. +// MsgUpdateReferenceSourceConfig is the transaction message to update reference price source's configuration. message MsgUpdateReferenceSourceConfig { - option (cosmos.msg.v1.signer) = "authority"; + option (cosmos.msg.v1.signer) = "admin"; option (amino.name) = "feeds/MsgUpdateReferenceSourceConfig"; - // Admin is the address of the admin that is performing the operation. + // admin is the address of the admin that is performing the operation. string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // ReferenceSourceConfig is the information of reference source config. + // reference_source_config is the information of reference price source. ReferenceSourceConfig reference_source_config = 2 [(gogoproto.nullable) = false]; } ``` @@ -297,10 +301,10 @@ message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; option (amino.name) = "feeds/MsgUpdateParams"; - // Authority is the address of the governance account. + // authority is the address of the governance account. string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Params is the x/feeds parameters to update. + // params is the x/feeds parameters to update. Params params = 2 [(gogoproto.nullable) = false]; } ``` diff --git a/x/feeds/client/cli/tx.go b/x/feeds/client/cli/tx.go index 364f5e0a4..eac08e00a 100644 --- a/x/feeds/client/cli/tx.go +++ b/x/feeds/client/cli/tx.go @@ -188,13 +188,13 @@ $ %s tx feeds update-reference-source-config 1.0.0 --from mykey // GetCmdRequestSignature implements the request signature handler. func GetCmdRequestSignature() *cobra.Command { return &cobra.Command{ - Use: "feeds-prices [signal_id1,signal_id2,...] [feeds-type]", - Short: "Request bandtss signature prices from list of signal id and feeds-type (1: default, 2: tick)", + Use: "feeds-prices [signal_id1,signal_id2,...] [encoder]", + Short: "Request bandtss signature prices from list of signal id and encoder (1: fixed-point abi, 2: tick abi)", Args: cobra.ExactArgs(2), Long: strings.TrimSpace( - fmt.Sprintf(`Request bandtss signature from list of signal id and feeds-type (1: default, 2: tick) + fmt.Sprintf(`Request bandtss signature from list of signal id and encoder (1: fixed-point abi, 2: tick abi) Example: -$ %s tx bandtss request-signature feeds-prices crypto_price.ethusd,crypto_price.usdtusd 1 --fee-limit 10uband +$ %s tx bandtss request-signature feeds-prices CS:ETH-USD,CS:USDT-USD 1 --fee-limit 10uband `, version.AppName, ), @@ -217,13 +217,13 @@ $ %s tx bandtss request-signature feeds-prices crypto_price.ethusd,crypto_price. signalIDs := strings.Split(args[0], ",") - feedsType, err := strconv.ParseInt(args[1], 10, 32) + encoder, err := strconv.ParseInt(args[1], 10, 32) if err != nil { return err } from := clientCtx.GetFromAddress() - content := types.NewFeedSignatureOrder(signalIDs, types.FeedType(feedsType)) + content := types.NewFeedSignatureOrder(signalIDs, types.Encoder(encoder)) msg, err := bandtsstypes.NewMsgRequestSignature(content, feeLimit, from) if err != nil { diff --git a/x/feeds/keeper/genesis_test.go b/x/feeds/keeper/genesis_test.go index 8169fb000..089c0518e 100644 --- a/x/feeds/keeper/genesis_test.go +++ b/x/feeds/keeper/genesis_test.go @@ -54,7 +54,7 @@ func (suite *KeeperTestSuite) TestExportGenesis() { func (suite *KeeperTestSuite) TestInitGenesis() { ctx := suite.ctx - params := types.NewParams("[NOT_SET]", 30, 30, 60, 3600, 1000_000_000, 100, 30, 5, 300, 28800, 10) + params := types.DefaultParams() delegatorSignals := []types.DelegatorSignals{ { diff --git a/x/feeds/keeper/keeper_feeds_price_data.go b/x/feeds/keeper/keeper_feeds_price_data.go index 8c4ad0d4d..bc1075f53 100644 --- a/x/feeds/keeper/keeper_feeds_price_data.go +++ b/x/feeds/keeper/keeper_feeds_price_data.go @@ -12,7 +12,7 @@ import ( func (k Keeper) GetFeedsPriceData( ctx sdk.Context, signalIDs []string, - ft types.FeedType, + encoder types.Encoder, ) (*types.FeedsPriceData, error) { feeds := make(map[string]types.Feed) sp := k.GetCurrentFeeds(ctx) @@ -28,8 +28,8 @@ func (k Keeper) GetFeedsPriceData( return nil, err } - // Check if the feed type is tick - if ft == types.FEED_TYPE_TICK_ABI { + // Check if the encoder mode is tick + if encoder == types.ENCODER_TICK_ABI { err := p.ToTick() if err != nil { return nil, err diff --git a/x/feeds/keeper/keeper_feeds_price_data_test.go b/x/feeds/keeper/keeper_feeds_price_data_test.go index 34c3c7ce3..9cbb5a994 100644 --- a/x/feeds/keeper/keeper_feeds_price_data_test.go +++ b/x/feeds/keeper/keeper_feeds_price_data_test.go @@ -12,36 +12,36 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { name string signalIDs []string setPrices []types.Price - feedType types.FeedType + encoder types.Encoder expectResult types.FeedsPriceData expectError error }{ { - name: "success case - default feed type", - signalIDs: []string{"crypto_price.atomusd", "crypto_price.bandusd"}, + name: "success case - fixed-point abi encoder", + signalIDs: []string{"CS:atom-usd", "CS:band-usd"}, setPrices: []types.Price{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, }, { - SignalID: "crypto_price.bandusd", + SignalID: "CS:band-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, }, }, - feedType: types.FEED_TYPE_FIXED_POINT_ABI, + encoder: types.ENCODER_FIXED_POINT_ABI, expectResult: types.FeedsPriceData{ SignalPrices: []types.SignalPrice{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 1e10, }, { - SignalID: "crypto_price.bandusd", + SignalID: "CS:band-usd", Price: 1e10, }, }, @@ -50,31 +50,31 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { expectError: nil, }, { - name: "success case - tick feed type", - signalIDs: []string{"crypto_price.atomusd", "crypto_price.bandusd"}, + name: "success case - tick abi encoder", + signalIDs: []string{"CS:atom-usd", "CS:band-usd"}, setPrices: []types.Price{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, }, { - SignalID: "crypto_price.bandusd", + SignalID: "CS:band-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, }, }, - feedType: types.FEED_TYPE_TICK_ABI, + encoder: types.ENCODER_TICK_ABI, expectResult: types.FeedsPriceData{ SignalPrices: []types.SignalPrice{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 285171, }, { - SignalID: "crypto_price.bandusd", + SignalID: "CS:band-usd", Price: 285171, }, }, @@ -84,41 +84,41 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { }, { name: "fail case - price not available", - signalIDs: []string{"crypto_price.atomusd", "crypto_price.bandusd"}, + signalIDs: []string{"CS:atom-usd", "CS:band-usd"}, setPrices: []types.Price{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusUnavailable, }, }, - feedType: types.FEED_TYPE_FIXED_POINT_ABI, + encoder: types.ENCODER_FIXED_POINT_ABI, expectResult: types.FeedsPriceData{}, - expectError: fmt.Errorf("crypto_price.atomusd: price not available"), + expectError: fmt.Errorf("CS:atom-usd: price not available"), }, { name: "fail case - price too old", - signalIDs: []string{"crypto_price.atomusd"}, + signalIDs: []string{"CS:atom-usd"}, setPrices: []types.Price{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix() - 1000, PriceStatus: types.PriceStatusAvailable, }, }, - feedType: types.FEED_TYPE_FIXED_POINT_ABI, + encoder: types.ENCODER_FIXED_POINT_ABI, expectResult: types.FeedsPriceData{}, - expectError: fmt.Errorf("crypto_price.atomusd: price too old"), + expectError: fmt.Errorf("CS:atom-usd: price too old"), }, { name: "fail case - price not found", - signalIDs: []string{"crypto_price.atomusdfake"}, + signalIDs: []string{"CS:atom-usdfake"}, setPrices: []types.Price{}, - feedType: types.FEED_TYPE_FIXED_POINT_ABI, + encoder: types.ENCODER_FIXED_POINT_ABI, expectResult: types.FeedsPriceData{}, - expectError: fmt.Errorf("failed to get price for signal id: crypto_price.atomusdfake: price not found"), + expectError: fmt.Errorf("failed to get price for signal id: CS:atom-usdfake: price not found"), }, } @@ -136,7 +136,7 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { suite.feedsKeeper.SetCurrentFeeds(suite.ctx, feeds) // Call the function under test - feedsPriceData, err := suite.feedsKeeper.GetFeedsPriceData(suite.ctx, tc.signalIDs, tc.feedType) + feedsPriceData, err := suite.feedsKeeper.GetFeedsPriceData(suite.ctx, tc.signalIDs, tc.encoder) // Check the result if tc.expectError != nil { @@ -164,18 +164,18 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData2() { { name: "valid prices", signalIDs: []string{ - "crypto_price.atomusd", - "crypto_price.bandusd", + "CS:atom-usd", + "CS:band-usd", }, setPrices: []types.Price{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, }, { - SignalID: "crypto_price.bandusd", + SignalID: "CS:band-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, @@ -186,11 +186,11 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData2() { { name: "price not available", signalIDs: []string{ - "crypto_price.atomusd", + "CS:atom-usd", }, setPrices: []types.Price{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusUnavailable, @@ -201,11 +201,11 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData2() { { name: "price too old", signalIDs: []string{ - "crypto_price.atomusd", + "CS:atom-usd", }, setPrices: []types.Price{ { - SignalID: "crypto_price.atomusd", + SignalID: "CS:atom-usd", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix() - 1000, PriceStatus: types.PriceStatusAvailable, @@ -232,7 +232,7 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData2() { _, err := suite.feedsKeeper.GetFeedsPriceData( suite.ctx, tc.signalIDs, - types.FEED_TYPE_FIXED_POINT_ABI, + types.ENCODER_FIXED_POINT_ABI, ) // Check the result diff --git a/x/feeds/keeper/keeper_price.go b/x/feeds/keeper/keeper_price.go index f132124af..c252e6ddd 100644 --- a/x/feeds/keeper/keeper_price.go +++ b/x/feeds/keeper/keeper_price.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -185,6 +186,9 @@ func (k Keeper) CalculatePrice( totalPower, availablePower, _, unsupportedPower := types.CalculatePricesPowers(priceFeedInfos) + totalBondedToken := sdkmath.LegacyNewDecFromInt(k.stakingKeeper.TotalBondedTokens(ctx)) + priceQuorum, _ := sdk.NewDecFromStr(k.GetParams(ctx).PriceQuorum) + // If more than half of the total have unsupported price status, it returns an unsupported price status. if unsupportedPower > totalPower/2 { return types.NewPrice( @@ -195,8 +199,10 @@ func (k Keeper) CalculatePrice( ), nil } - // If less than half of total have available price status, it returns an unavailable price status. - if availablePower < totalPower/2 { + // If the total power is less than price quorum percentage of the total bonded token + // or less than half of total have available price status, it will not be calculated. + if totalPower < totalBondedToken.Mul(priceQuorum).TruncateInt().Uint64() || availablePower < totalPower/2 { + // else, it returns an unavailable price status. return types.NewPrice( types.PriceStatusUnavailable, feed.SignalID, diff --git a/x/feeds/keeper/keeper_test.go b/x/feeds/keeper/keeper_test.go index 42ef9c840..a51f50600 100644 --- a/x/feeds/keeper/keeper_test.go +++ b/x/feeds/keeper/keeper_test.go @@ -121,6 +121,11 @@ func (suite *KeeperTestSuite) SetupTest() { } }). AnyTimes() + stakingKeeper.EXPECT(). + TotalBondedTokens(gomock.Any()). + Return(sdk.NewInt(11000)). + AnyTimes() + suite.stakingKeeper = stakingKeeper restakeKeeper := feedstestutil.NewMockRestakeKeeper(ctrl) diff --git a/x/feeds/testutil/mock_expected_keepers.go b/x/feeds/testutil/mock_expected_keepers.go index ac9b2eccf..f241a8087 100644 --- a/x/feeds/testutil/mock_expected_keepers.go +++ b/x/feeds/testutil/mock_expected_keepers.go @@ -158,6 +158,20 @@ func (mr *MockStakingKeeperMockRecorder) IterateBondedValidatorsByPower(ctx, fn return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateBondedValidatorsByPower", reflect.TypeOf((*MockStakingKeeper)(nil).IterateBondedValidatorsByPower), ctx, fn) } +// TotalBondedTokens mocks base method. +func (m *MockStakingKeeper) TotalBondedTokens(ctx types0.Context) math.Int { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "TotalBondedTokens", ctx) + ret0, _ := ret[0].(math.Int) + return ret0 +} + +// TotalBondedTokens indicates an expected call of TotalBondedTokens. +func (mr *MockStakingKeeperMockRecorder) TotalBondedTokens(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBondedTokens", reflect.TypeOf((*MockStakingKeeper)(nil).TotalBondedTokens), ctx) +} + // MockRestakeKeeper is a mock of RestakeKeeper interface. type MockRestakeKeeper struct { ctrl *gomock.Controller diff --git a/x/feeds/tss_handler.go b/x/feeds/tss_handler.go index a0fd53e10..74981f8b9 100644 --- a/x/feeds/tss_handler.go +++ b/x/feeds/tss_handler.go @@ -11,8 +11,8 @@ import ( ) var ( - FeedTypeFixedPointABIPrefix = tss.Hash([]byte("fixedPointABI"))[:4] - FeedTypeTickABIPrefix = tss.Hash([]byte("tickABI"))[:4] + EncoderFixedPointABIPrefix = tss.Hash([]byte("fixedPointABI"))[:4] + EncoderTickABIPrefix = tss.Hash([]byte("tickABI"))[:4] ) // NewSignatureOrderHandler creates a tss handler to handle feeds signature order @@ -28,7 +28,7 @@ func NewSignatureOrderHandler(k keeper.Keeper) tsstypes.Handler { } // Get feeds price data - fp, err := k.GetFeedsPriceData(ctx, c.SignalIDs, c.FeedType) + fp, err := k.GetFeedsPriceData(ctx, c.SignalIDs, c.Encoder) if err != nil { return nil, err } @@ -39,16 +39,16 @@ func NewSignatureOrderHandler(k keeper.Keeper) tsstypes.Handler { return nil, err } - // Append the prefix based on the feed type - switch c.FeedType { - case types.FEED_TYPE_FIXED_POINT_ABI: - return append(FeedTypeFixedPointABIPrefix, bz...), nil - case types.FEED_TYPE_TICK_ABI: - return append(FeedTypeTickABIPrefix, bz...), nil + // Append the prefix based on the encoder mode + switch c.Encoder { + case types.ENCODER_FIXED_POINT_ABI: + return append(EncoderFixedPointABIPrefix, bz...), nil + case types.ENCODER_TICK_ABI: + return append(EncoderTickABIPrefix, bz...), nil default: return nil, sdkerrors.ErrUnknownRequest.Wrapf( - "unrecognized feed type: %d", - c.FeedType, + "unrecognized encoder: %d", + c.Encoder, ) } default: diff --git a/x/feeds/types/errors.go b/x/feeds/types/errors.go index f8da7428c..a237f2d42 100644 --- a/x/feeds/types/errors.go +++ b/x/feeds/types/errors.go @@ -25,5 +25,5 @@ var ( ErrSubmittedSignalsTooLarge = errorsmod.Register(ModuleName, 18, "submitted signals list is too large") ErrDuplicateSignalID = errorsmod.Register(ModuleName, 19, "duplicate signal id") ErrInvalidSignalIDs = errorsmod.Register(ModuleName, 20, "invalid signal ids") - ErrInvalidFeedsType = errorsmod.Register(ModuleName, 21, "invalid feeds type") + ErrInvalidEncoder = errorsmod.Register(ModuleName, 21, "invalid encoder") ) diff --git a/x/feeds/types/expected_keepers.go b/x/feeds/types/expected_keepers.go index fd54853aa..446317e76 100644 --- a/x/feeds/types/expected_keepers.go +++ b/x/feeds/types/expected_keepers.go @@ -34,6 +34,7 @@ type StakingKeeper interface { ctx sdk.Context, fn func(index int64, validator stakingtypes.ValidatorI) (stop bool), ) + TotalBondedTokens(ctx sdk.Context) math.Int } // RestakeKeeper defines the expected restake keeper. diff --git a/x/feeds/types/feed_test.go b/x/feeds/types/feed_test.go index 64b72c607..abd8f9832 100644 --- a/x/feeds/types/feed_test.go +++ b/x/feeds/types/feed_test.go @@ -7,7 +7,7 @@ import ( ) func TestCalculateInterval(t *testing.T) { - params := NewParams("[NOT_SET]", 30, 30, 60, 3600, 1000_000_000, 100, 30, 50, 3000, 28800, 10) + params := DefaultParams() testCases := []struct { name string @@ -46,7 +46,7 @@ func TestCalculateInterval(t *testing.T) { } func TestCalculateDeviation(t *testing.T) { - params := NewParams("[NOT_SET]", 30, 30, 60, 3600, 1000_000_000, 100, 30, 50, 3000, 28800, 10) + params := DefaultParams() testCases := []struct { name string diff --git a/x/feeds/types/feeds.pb.go b/x/feeds/types/feeds.pb.go index 0674f2d12..587ed7a6c 100644 --- a/x/feeds/types/feeds.pb.go +++ b/x/feeds/types/feeds.pb.go @@ -60,35 +60,35 @@ func (PriceStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4b338829e148e6ea, []int{0} } -// FeedType is a structure that defines the type of feed. -type FeedType int32 +// Encoder is an enumerator that defines the mode of encoding message in tss module. +type Encoder int32 const ( - // FEED_TYPE_UNSPECIFIED is an unspecified feed type. - FEED_TYPE_UNSPECIFIED FeedType = 0 - // FEED_TYPE_FIXED_POINT_ABI is a fixed-point price feed type (price * 10^9). - FEED_TYPE_FIXED_POINT_ABI FeedType = 1 - // FEED_TYPE_TICK_ABI is a tick feed type. - FEED_TYPE_TICK_ABI FeedType = 2 + // ENCODER_UNSPECIFIED is an unspecified encoder mode. + ENCODER_UNSPECIFIED Encoder = 0 + // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). + ENCODER_FIXED_POINT_ABI Encoder = 1 + // ENCODER_TICK_ABI is a tick abi encoder. + ENCODER_TICK_ABI Encoder = 2 ) -var FeedType_name = map[int32]string{ - 0: "FEED_TYPE_UNSPECIFIED", - 1: "FEED_TYPE_FIXED_POINT_ABI", - 2: "FEED_TYPE_TICK_ABI", +var Encoder_name = map[int32]string{ + 0: "ENCODER_UNSPECIFIED", + 1: "ENCODER_FIXED_POINT_ABI", + 2: "ENCODER_TICK_ABI", } -var FeedType_value = map[string]int32{ - "FEED_TYPE_UNSPECIFIED": 0, - "FEED_TYPE_FIXED_POINT_ABI": 1, - "FEED_TYPE_TICK_ABI": 2, +var Encoder_value = map[string]int32{ + "ENCODER_UNSPECIFIED": 0, + "ENCODER_FIXED_POINT_ABI": 1, + "ENCODER_TICK_ABI": 2, } -func (x FeedType) String() string { - return proto.EnumName(FeedType_name, int32(x)) +func (x Encoder) String() string { + return proto.EnumName(Encoder_name, int32(x)) } -func (FeedType) EnumDescriptor() ([]byte, []int) { +func (Encoder) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4b338829e148e6ea, []int{1} } @@ -862,12 +862,12 @@ func (m *FeedsPriceData) GetTimestamp() uint64 { return 0 } -// FeedSignatureOrder defines a general signature order for feed data. +// FeedsSignatureOrder defines a general signature order for feed data. type FeedsSignatureOrder struct { - // SignalIDs is the list of signal ids that require signatures. + // signal_ids is the list of signal ids that require signatures. SignalIDs []string `protobuf:"bytes,1,rep,name=signal_ids,json=signalIds,proto3" json:"signal_ids,omitempty"` - // FeedType is the type of feed. - FeedType FeedType `protobuf:"varint,2,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + // encoder is the mode of encoding feeds signature order. + Encoder Encoder `protobuf:"varint,2,opt,name=encoder,proto3,enum=feeds.v1beta1.Encoder" json:"encoder,omitempty"` } func (m *FeedsSignatureOrder) Reset() { *m = FeedsSignatureOrder{} } @@ -905,7 +905,7 @@ var xxx_messageInfo_FeedsSignatureOrder proto.InternalMessageInfo func init() { proto.RegisterEnum("feeds.v1beta1.PriceStatus", PriceStatus_name, PriceStatus_value) - proto.RegisterEnum("feeds.v1beta1.FeedType", FeedType_name, FeedType_value) + proto.RegisterEnum("feeds.v1beta1.Encoder", Encoder_name, Encoder_value) proto.RegisterType((*Signal)(nil), "feeds.v1beta1.Signal") proto.RegisterType((*DelegatorSignals)(nil), "feeds.v1beta1.DelegatorSignals") proto.RegisterType((*Feed)(nil), "feeds.v1beta1.Feed") @@ -924,71 +924,71 @@ func init() { func init() { proto.RegisterFile("feeds/v1beta1/feeds.proto", fileDescriptor_4b338829e148e6ea) } var fileDescriptor_4b338829e148e6ea = []byte{ - // 1023 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xce, 0xa4, 0x69, 0xb7, 0x79, 0xed, 0x76, 0xb3, 0xd3, 0x1f, 0xb8, 0xd6, 0x6e, 0x12, 0xf6, - 0xb4, 0x54, 0x90, 0x68, 0xcb, 0x82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c, 0x39, 0xce, 0xa3, 0x57, 0xe3, 0x3c, 0xfa, 0x65, 0x9c, 0x47, 0x5f, 0x5f, 0xe7, - 0x53, 0xaf, 0xae, 0xf3, 0xa9, 0x9f, 0xaf, 0xf3, 0xa9, 0x4f, 0x4a, 0x3d, 0x26, 0xfa, 0xc3, 0x76, - 0xa9, 0xe3, 0x9e, 0x95, 0xdb, 0xc4, 0xb1, 0xe5, 0x1f, 0x56, 0xc7, 0x1d, 0x94, 0x3b, 0x7d, 0xc2, - 0x9c, 0xf2, 0x68, 0xb7, 0xfc, 0xb9, 0xfa, 0x77, 0x2b, 0x07, 0x6b, 0xc3, 0xdb, 0x4b, 0x32, 0xe0, - 0xed, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9d, 0xbe, 0x37, 0x61, 0xdf, 0x09, 0x00, 0x00, + // 1014 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x6f, 0xe3, 0x44, + 0x14, 0xcf, 0xa4, 0xe9, 0x47, 0x5e, 0xbb, 0xdd, 0xec, 0xf4, 0x63, 0x5d, 0xb3, 0x24, 0x61, 0x4f, + 0xa5, 0x82, 0x66, 0xb7, 0x7c, 0x68, 0xb5, 0x5a, 0x0e, 0xf9, 0xaa, 0x6a, 0x51, 0xb5, 0x91, 0x93, + 0x2e, 0x88, 0x8b, 0x35, 0xb1, 0xa7, 0xc9, 0x88, 0xd4, 0xb6, 0x3c, 0x93, 0xf0, 0xf5, 0x07, 0x50, + 0xf5, 0x84, 0xc4, 0xb9, 0xd2, 0x4a, 0x08, 0x21, 0xc1, 0x95, 0x3b, 0xd7, 0x3d, 0xae, 0x38, 0x71, + 0xaa, 0x50, 0x7a, 0xe1, 0x1f, 0x40, 0x5c, 0x91, 0x67, 0xec, 0x24, 0xce, 0xa6, 0x82, 0x03, 0x08, + 0x6e, 0x7e, 0xef, 0xf7, 0xfb, 0xcd, 0xfb, 0xbd, 0x97, 0xe7, 0x89, 0x61, 0xeb, 0x94, 0x52, 0x87, + 0x97, 0x06, 0x0f, 0xdb, 0x54, 0x90, 0x87, 0x25, 0x19, 0xed, 0xfa, 0x81, 0x27, 0x3c, 0x7c, 0x4b, + 0x05, 0x11, 0xa4, 0x6f, 0xd9, 0x1e, 0x3f, 0xf3, 0xb8, 0x25, 0xc1, 0x92, 0x0a, 0x14, 0x53, 0x5f, + 0xef, 0x78, 0x1d, 0x4f, 0xe5, 0xc3, 0x27, 0x95, 0xbd, 0xff, 0x04, 0x16, 0x9a, 0xac, 0xe3, 0x92, + 0x1e, 0xde, 0x84, 0x34, 0x73, 0x34, 0x54, 0x44, 0xdb, 0xd9, 0xca, 0xc2, 0xf0, 0xaa, 0x90, 0x36, + 0x6a, 0x66, 0x9a, 0x39, 0x78, 0x1d, 0xe6, 0x7d, 0xef, 0x13, 0x1a, 0x68, 0xe9, 0x22, 0xda, 0x9e, + 0x33, 0x55, 0xf0, 0x38, 0xf3, 0xdb, 0xb3, 0x02, 0xba, 0xff, 0x25, 0x82, 0x5c, 0x8d, 0xf6, 0x68, + 0x87, 0x08, 0x2f, 0x50, 0xe7, 0x70, 0xfc, 0x2e, 0x64, 0x9d, 0x38, 0x17, 0x9d, 0xa7, 0xfd, 0xfc, + 0xe3, 0x9b, 0xeb, 0x91, 0x9b, 0xb2, 0xe3, 0x04, 0x94, 0xf3, 0xa6, 0x08, 0x98, 0xdb, 0x31, 0xc7, + 0x54, 0xfc, 0x0e, 0x2c, 0x72, 0x75, 0x84, 0x96, 0x2e, 0xce, 0x6d, 0x2f, 0xef, 0x6d, 0xec, 0x26, + 0x9a, 0xdb, 0x55, 0x05, 0x2a, 0x99, 0xe7, 0x57, 0x85, 0x94, 0x19, 0x73, 0x23, 0x27, 0x0c, 0x32, + 0xfb, 0x94, 0x3a, 0xf8, 0x75, 0xc8, 0x2a, 0xc0, 0x1a, 0x35, 0xb3, 0x32, 0xbc, 0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*Signal) Equal(that interface{}) bool { @@ -1919,8 +1919,8 @@ func (m *FeedsSignatureOrder) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.FeedType != 0 { - i = encodeVarintFeeds(dAtA, i, uint64(m.FeedType)) + if m.Encoder != 0 { + i = encodeVarintFeeds(dAtA, i, uint64(m.Encoder)) i-- dAtA[i] = 0x10 } @@ -2201,8 +2201,8 @@ func (m *FeedsSignatureOrder) Size() (n int) { n += 1 + l + sovFeeds(uint64(l)) } } - if m.FeedType != 0 { - n += 1 + sovFeeds(uint64(m.FeedType)) + if m.Encoder != 0 { + n += 1 + sovFeeds(uint64(m.Encoder)) } return n } @@ -3778,9 +3778,9 @@ func (m *FeedsSignatureOrder) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) } - m.FeedType = 0 + m.Encoder = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowFeeds @@ -3790,7 +3790,7 @@ func (m *FeedsSignatureOrder) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FeedType |= FeedType(b&0x7F) << shift + m.Encoder |= Encoder(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/feeds/types/msgs_test.go b/x/feeds/types/msgs_test.go index d068dd5ef..d14ad45dc 100644 --- a/x/feeds/types/msgs_test.go +++ b/x/feeds/types/msgs_test.go @@ -105,7 +105,7 @@ func TestMsgUpdateParams_Type(t *testing.T) { func TestMsgUpdateParams_GetSignBytes(t *testing.T) { msg := NewMsgUpdateParams(ValidAuthority, ValidParams) - expected := "{\"type\":\"feeds/MsgUpdateParams\",\"value\":{\"authority\":\"cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8\",\"params\":{\"admin\":\"[NOT_SET]\",\"allowable_block_time_discrepancy\":\"60\",\"cooldown_time\":\"30\",\"current_feeds_update_interval\":\"28800\",\"grace_period\":\"30\",\"max_current_feeds\":\"300\",\"max_deviation_basis_point\":\"3000\",\"max_interval\":\"3600\",\"max_signal_ids_per_signing\":\"10\",\"min_deviation_basis_point\":\"50\",\"min_interval\":\"60\",\"power_step_threshold\":\"1000000000\"}}}" + expected := "{\"type\":\"feeds/MsgUpdateParams\",\"value\":{\"authority\":\"cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8\",\"params\":{\"admin\":\"[NOT_SET]\",\"allowable_block_time_discrepancy\":\"60\",\"cooldown_time\":\"30\",\"current_feeds_update_interval\":\"28800\",\"grace_period\":\"30\",\"max_current_feeds\":\"300\",\"max_deviation_basis_point\":\"3000\",\"max_interval\":\"3600\",\"max_signal_ids_per_signing\":\"10\",\"min_deviation_basis_point\":\"50\",\"min_interval\":\"60\",\"power_step_threshold\":\"1000000000\",\"price_quorum\":\"0.300000000000000000\"}}}" require.Equal(t, expected, string(msg.GetSignBytes())) } diff --git a/x/feeds/types/params.go b/x/feeds/types/params.go index 0d294de11..c57f524dc 100644 --- a/x/feeds/types/params.go +++ b/x/feeds/types/params.go @@ -1,10 +1,14 @@ package types import ( + "fmt" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "gopkg.in/yaml.v2" ) -const ( +var ( // Default values for Params DefaultAllowableBlockTimeDiscrepancy = int64(60) DefaultGracePeriod = int64(30) @@ -17,6 +21,7 @@ const ( DefaultMaxDeviationBasisPoint = int64(3000) // estimated from block time of 3 seconds, aims for 1 day update DefaultCurrentFeedsUpdateInterval = int64(28800) + DefaultPriceQuorum = sdk.NewDecWithPrec(30, 2) DefaultMaxSignalIDsPerSigning = uint64(10) ) @@ -33,6 +38,7 @@ func NewParams( minDeviationBasisPoint int64, maxDeviationBasisPoint int64, currentFeedsUpdateInterval int64, + priceQuorum string, maxSignalIDsPerSigning uint64, ) Params { return Params{ @@ -47,6 +53,7 @@ func NewParams( MinDeviationBasisPoint: minDeviationBasisPoint, MaxDeviationBasisPoint: maxDeviationBasisPoint, CurrentFeedsUpdateInterval: currentFeedsUpdateInterval, + PriceQuorum: priceQuorum, MaxSignalIDsPerSigning: maxSignalIDsPerSigning, } } @@ -65,6 +72,7 @@ func DefaultParams() Params { DefaultMinDeviationBasisPoint, DefaultMaxDeviationBasisPoint, DefaultCurrentFeedsUpdateInterval, + DefaultPriceQuorum.String(), DefaultMaxSignalIDsPerSigning, ) } @@ -96,6 +104,16 @@ func (p Params) Validate() error { return err } } + priceQuorum, err := sdk.NewDecFromStr(p.PriceQuorum) + if err != nil { + return fmt.Errorf("invalid price quorum string: %w", err) + } + if priceQuorum.IsNegative() { + return fmt.Errorf("price quorom cannot be negative: %s", p.PriceQuorum) + } + if priceQuorum.GT(math.LegacyOneDec()) { + return fmt.Errorf("price quorom too large: %s", p.PriceQuorum) + } return nil } diff --git a/x/feeds/types/params.pb.go b/x/feeds/types/params.pb.go index 098c0c7c4..d49808601 100644 --- a/x/feeds/types/params.pb.go +++ b/x/feeds/types/params.pb.go @@ -51,8 +51,10 @@ type Params struct { MaxDeviationBasisPoint int64 `protobuf:"varint,10,opt,name=max_deviation_basis_point,json=maxDeviationBasisPoint,proto3" json:"max_deviation_basis_point,omitempty"` // current_feeds_update_interval is the number of blocks after which the current feeds will be re-calculated. CurrentFeedsUpdateInterval int64 `protobuf:"varint,11,opt,name=current_feeds_update_interval,json=currentFeedsUpdateInterval,proto3" json:"current_feeds_update_interval,omitempty"` + // price_quorum is the minimum percentage of power that needs to be reached for a price to be processed. + PriceQuorum string `protobuf:"bytes,12,opt,name=price_quorum,json=priceQuorum,proto3" json:"price_quorum,omitempty"` // MaxSignalIDsPerSigning is the maximum number of signals allowed in a single tss signing request. - MaxSignalIDsPerSigning uint64 `protobuf:"varint,12,opt,name=max_signal_ids_per_signing,json=maxSignalIdsPerSigning,proto3" json:"max_signal_ids_per_signing,omitempty"` + MaxSignalIDsPerSigning uint64 `protobuf:"varint,13,opt,name=max_signal_ids_per_signing,json=maxSignalIdsPerSigning,proto3" json:"max_signal_ids_per_signing,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -164,6 +166,13 @@ func (m *Params) GetCurrentFeedsUpdateInterval() int64 { return 0 } +func (m *Params) GetPriceQuorum() string { + if m != nil { + return m.PriceQuorum + } + return "" +} + func (m *Params) GetMaxSignalIDsPerSigning() uint64 { if m != nil { return m.MaxSignalIDsPerSigning @@ -178,40 +187,41 @@ func init() { func init() { proto.RegisterFile("feeds/v1beta1/params.proto", fileDescriptor_bbfae8ad171874f3) } var fileDescriptor_bbfae8ad171874f3 = []byte{ - // 524 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0x63, 0xfa, 0x87, 0xf6, 0x9a, 0x0a, 0x61, 0x45, 0x95, 0x6b, 0xa9, 0x4e, 0x80, 0x25, - 0x42, 0x22, 0xa6, 0x30, 0xc1, 0xd6, 0x10, 0x01, 0x1d, 0x90, 0xa2, 0xa4, 0x30, 0xb0, 0x9c, 0xce, - 0x77, 0x87, 0x73, 0xc2, 0xbe, 0xb3, 0xee, 0x2e, 0x89, 0xfb, 0x0d, 0x18, 0x19, 0x19, 0xfb, 0x21, - 0xf8, 0x10, 0x8c, 0x15, 0x13, 0x13, 0x42, 0xc9, 0xc2, 0xc7, 0x40, 0xf7, 0xda, 0x49, 0x8a, 0x04, - 0x9b, 0xef, 0x79, 0x7e, 0xcf, 0x6b, 0xbf, 0x8f, 0x6d, 0x14, 0x7e, 0xe0, 0x9c, 0x99, 0x78, 0x76, - 0x9a, 0x70, 0x4b, 0x4e, 0xe3, 0x82, 0x68, 0x92, 0x9b, 0x5e, 0xa1, 0x95, 0x55, 0xfe, 0x21, 0x78, - 0xbd, 0xda, 0x0b, 0x5b, 0xa9, 0x4a, 0x15, 0x38, 0xb1, 0xbb, 0xaa, 0xa0, 0xf0, 0x98, 0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 0x44, 0xc8, 0x78, - 0xf6, 0x24, 0x2e, 0xe3, 0xea, 0x1f, 0xb1, 0x97, 0x05, 0x37, 0xc9, 0x2e, 0x00, 0x4f, 0xff, 0x04, - 0x00, 0x00, 0xff, 0xff, 0x95, 0x63, 0x41, 0x0b, 0x39, 0x03, 0x00, 0x00, + // 543 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x3f, 0x6f, 0x13, 0x31, + 0x18, 0xc6, 0x73, 0xf4, 0x0f, 0xad, 0xdb, 0x0a, 0x71, 0x8a, 0xaa, 0xeb, 0x49, 0xbd, 0x04, 0x58, + 0x22, 0x24, 0x72, 0x14, 0x26, 0xd8, 0x1a, 0x22, 0xa0, 0x03, 0x52, 0x48, 0x0a, 0x03, 0x8b, 0xe5, + 0xb3, 0xcd, 0xc5, 0xe2, 0xce, 0x3e, 0x6c, 0x27, 0xb9, 0x7e, 0x0b, 0x46, 0xc6, 0xee, 0xac, 0x7c, + 0x08, 0xc6, 0x8a, 0x89, 0x09, 0xa1, 0x64, 0xe1, 0x63, 0x20, 0xbf, 0x77, 0x69, 0x82, 0x04, 0x5b, + 0xfc, 0x3c, 0xbf, 0xe7, 0x95, 0xdf, 0x27, 0x3e, 0x14, 0xbe, 0xe7, 0x9c, 0x99, 0x78, 0x7a, 0x92, + 0x70, 0x4b, 0x4e, 0xe2, 0x82, 0x68, 0x92, 0x9b, 0x6e, 0xa1, 0x95, 0x55, 0xfe, 0x01, 0x78, 0xdd, + 0xda, 0x0b, 0x9b, 0xa9, 0x4a, 0x15, 0x38, 0xb1, 0xfb, 0x55, 0x41, 0xe1, 0x11, 0x55, 0x26, 0x57, + 0x06, 0x57, 0x46, 0x75, 0xa8, 0xac, 0xbb, 0x5f, 0xb6, 0xd0, 0xf6, 0x00, 0x06, 0xfa, 0x5d, 0xb4, + 0x45, 0x58, 0x2e, 0x64, 0xe0, 0xb5, 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84, 0x8c, 0xa7, 0x8f, 0xe2, 0x32, 0xae, 0x3e, 0x23, 0x7b, 0x51, 0x70, 0x93, 0x6c, 0x03, 0xf0, + 0xf8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x29, 0x2c, 0xa4, 0x5c, 0x03, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -266,6 +276,9 @@ func (this *Params) Equal(that interface{}) bool { if this.CurrentFeedsUpdateInterval != that1.CurrentFeedsUpdateInterval { return false } + if this.PriceQuorum != that1.PriceQuorum { + return false + } if this.MaxSignalIDsPerSigning != that1.MaxSignalIDsPerSigning { return false } @@ -294,7 +307,14 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.MaxSignalIDsPerSigning != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MaxSignalIDsPerSigning)) i-- - dAtA[i] = 0x60 + dAtA[i] = 0x68 + } + if len(m.PriceQuorum) > 0 { + i -= len(m.PriceQuorum) + copy(dAtA[i:], m.PriceQuorum) + i = encodeVarintParams(dAtA, i, uint64(len(m.PriceQuorum))) + i-- + dAtA[i] = 0x62 } if m.CurrentFeedsUpdateInterval != 0 { i = encodeVarintParams(dAtA, i, uint64(m.CurrentFeedsUpdateInterval)) @@ -407,6 +427,10 @@ func (m *Params) Size() (n int) { if m.CurrentFeedsUpdateInterval != 0 { n += 1 + sovParams(uint64(m.CurrentFeedsUpdateInterval)) } + l = len(m.PriceQuorum) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } if m.MaxSignalIDsPerSigning != 0 { n += 1 + sovParams(uint64(m.MaxSignalIDsPerSigning)) } @@ -671,6 +695,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceQuorum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PriceQuorum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MaxSignalIDsPerSigning", wireType) } diff --git a/x/feeds/types/price.go b/x/feeds/types/price.go index e3362cce3..a1e9d5a89 100644 --- a/x/feeds/types/price.go +++ b/x/feeds/types/price.go @@ -1,32 +1,10 @@ package types -import ( - "errors" - "fmt" - "math/big" -) - -const ( - MaxTick int64 = 262143 // Equivalent to 2**18 - 1 - MinTick int64 = -MaxTick // Equivalent to -2**18 + 1 - Offset int64 = 262144 // Equivalent to 2**18 -) - -var ( - priceX96AtBinaryTicks = getPricesX96AtBinaryTicks() - - maxUint192, _ = new(big.Int).SetString("ffffffffffffffffffffffffffffffffffffffffffffffff", 16) - maxUint96, _ = new(big.Int).SetString("ffffffffffffffffffffffff", 16) - maxUint64, _ = new(big.Int).SetString("ffffffffffffffff", 16) - q96, _ = new(big.Int).SetString("1000000000000000000000000", 16) - zero = new(big.Int).SetUint64(0) - one = new(big.Int).SetUint64(1) - billion = new(big.Int).SetUint64(1000000000) -) +import "github.com/bandprotocol/chain/v2/pkg/tickmath" // ToTick converts the price to tick func (p *Price) ToTick() error { - price, err := PriceToTick(p.Price) + price, err := tickmath.PriceToTick(p.Price) if err != nil { return err } @@ -35,169 +13,6 @@ func (p *Price) ToTick() error { return nil } -// TickToPrice converts the tick to price with 10^9 precision. It will return an error -// if the tick is out of range or the tick is so large that cannot be converted to uint64. -// NOTE: the result is rounded up to the nearest integer, this is aligned with the UniswapV3 calculation. -func TickToPrice(tick int64) (uint64, error) { - priceX96, err := tickToPriceX96(tick) - if err != nil { - return 0, err - } - - // round up the price and convert to uint64 - // we round up in the division so PriceX1E9ToTick of the output price is always consistent - // var price *big.Int - price := new(big.Int).Div(priceX96, q96) - if price.Cmp(zero) <= 0 { - return 0, fmt.Errorf("price out of range") - } - - if new(big.Int).Rem(priceX96, q96).Cmp(zero) > 0 { - priceNextTickX96 := new(big.Int).Div(new(big.Int).Mul(priceX96, big.NewInt(10001)), big.NewInt(10000)) - priceNextTick := new(big.Int).Div(priceNextTickX96, q96) - - if priceNextTick.Cmp(price) > 0 { - price = new(big.Int).Add(price, one) - } - } - - if price.Cmp(maxUint64) > 0 { - return 0, fmt.Errorf("price out of range") - } - return price.Uint64(), nil -} - -// PriceToTick converts the price to tick, it will return the nearest tick that yields -// less than or equal to the given price. -// ref: https://en.wikipedia.org/wiki/Binary_logarithm#Iterative_approximation -func PriceToTick(price uint64) (uint64, error) { - if price == 0 { - return 0, errors.New("price must be greater than 0") - } - - // find the most significant bit (msb) of the log2(price); - msb := uint64(0) - p := price - bits := []uint64{4294967295, 65535, 255, 15, 3, 1} - for i, bit := range bits { - if p > bit { - n := uint64(1 << (len(bits) - i - 1)) - msb += n - p >>= n - } - } - - // find the remaining r = price / 2^msb and shift significant bits to 2^31; - r := uint64(0) - if msb >= 32 { - r = price >> (msb - 31) - } else { - r = price << (31 - msb) - } - - // approximate log2(r) using iterations of base-2 logarithm with 16-bit precision; - log2 := int64(msb) << 16 - for i := 0; i < 16; i++ { - r = (r * r) >> 31 - f := r >> 32 - log2 |= int64(f) << (15 - i) - r >>= f - } - - // convert to tick value; - // tick = (log2 - log2(10^9) *2^16) * (1/log2(1.0001))/(2^16/2^32) - log1p0001 := (log2 - 1959352) * 454283648 - tick := log1p0001 >> 32 - if tick > MaxTick || tick < MinTick { - return 0, fmt.Errorf("tick out of range") - } - - // the result will differ by 1 tick if the price is not exactly at the tick value; - // it will return the largest tick whose price are less than or equal to the given price. - // NOTE: cannot use the previous result divided by 1.0001 as the fraction has been reduced. - expectPriceX96 := new(big.Int).Mul(new(big.Int).SetUint64(price), q96) - for i := int64(1); i >= 0; i-- { - t := tick + i - pX96, err := tickToPriceX96(t) - if err == nil && pX96.Cmp(expectPriceX96) <= 0 { - return uint64(t + Offset), nil - } - } - - return uint64(tick - 1 + Offset), nil -} - -// mulShift multiplies two big.Int and shifts the result to the right by 96 bits. -// It returns a new big.Int object. -func mulShift(val *big.Int, mulBy *big.Int) *big.Int { - return new(big.Int).Rsh(new(big.Int).Mul(val, mulBy), 96) -} - -// tickToPriceX96 converts the tick to price in x96 (2^96) * 10^9 format. -func tickToPriceX96(tick int64) (*big.Int, error) { - if tick > MaxTick || tick < MinTick { - return nil, fmt.Errorf("tick out of range") - } - - absTick := tick - if tick < 0 { - absTick = -tick - } - - // multiply the price ratio at each binary tick - priceX96 := new(big.Int).Set(q96) - for i, pX96 := range priceX96AtBinaryTicks { - if absTick&(1< 0 { - priceX96 = new(big.Int).Div(maxUint192, priceX96) - } - - priceX96 = new(big.Int).Mul(priceX96, billion) - - return priceX96, nil -} - -// getPricesX96AtBinaryTicks returns the prices at each binary tick in x96 format. -// the prices are in the term of 1.0001^-(2^i) * 2^96. -func getPricesX96AtBinaryTicks() []*big.Int { - x96Hexes := []string{ - "fff97272373d413259a46990", - "fff2e50f5f656932ef12357c", - "ffe5caca7e10e4e61c3624ea", - "ffcb9843d60f6159c9db5883", - "ff973b41fa98c081472e6896", - "ff2ea16466c96a3843ec78b3", - "fe5dee046a99a2a811c461f1", - "fcbe86c7900a88aedcffc83b", - "f987a7253ac413176f2b074c", - "f3392b0822b70005940c7a39", - "e7159475a2c29b7443b29c7f", - "d097f3bdfd2022b8845ad8f7", - "a9f746462d870fdf8a65dc1f", - "70d869a156d2a1b890bb3df6", - "31be135f97d08fd981231505", - "9aa508b5b7a84e1c677de54", - "5d6af8dedb81196699c329", - "2216e584f5fa1ea92604", - } - - prices := make([]*big.Int, 0, len(x96Hexes)) - for _, x96Hex := range x96Hexes { - p, ok := new(big.Int).SetString(x96Hex, 16) - if !ok { - panic("failed to parse hex string") - } - prices = append(prices, p) - } - - return prices -} - // NewPrice creates a new price instance func NewPrice( priceStatus PriceStatus, diff --git a/x/feeds/types/signature_order.go b/x/feeds/types/signature_order.go index 84f2b503d..db765b0cc 100644 --- a/x/feeds/types/signature_order.go +++ b/x/feeds/types/signature_order.go @@ -18,8 +18,8 @@ func init() { var _ tsstypes.Content = &FeedsSignatureOrder{} // NewFeedSignatureOrder returns a new FeedSignatureOrder object -func NewFeedSignatureOrder(signalIDs []string, feedType FeedType) *FeedsSignatureOrder { - return &FeedsSignatureOrder{signalIDs, feedType} +func NewFeedSignatureOrder(signalIDs []string, encoder Encoder) *FeedsSignatureOrder { + return &FeedsSignatureOrder{signalIDs, encoder} } // OrderRoute returns the order router key @@ -39,8 +39,8 @@ func (f *FeedsSignatureOrder) ValidateBasic() error { return ErrInvalidSignalIDs } - if f.FeedType == FEED_TYPE_UNSPECIFIED { - return ErrInvalidFeedsType + if f.Encoder == ENCODER_UNSPECIFIED { + return ErrInvalidEncoder } return nil diff --git a/x/restake/client/cli/query.go b/x/restake/client/cli/query.go index e30ef32bf..b0a6378d5 100644 --- a/x/restake/client/cli/query.go +++ b/x/restake/client/cli/query.go @@ -19,22 +19,22 @@ func GetQueryCmd() *cobra.Command { } queryCmd.AddCommand( - GetQueryCmdKeys(), - GetQueryCmdKey(), + GetQueryCmdVaults(), + GetQueryCmdVault(), GetQueryCmdRewards(), GetQueryCmdReward(), - GetQueryCmdLock(), GetQueryCmdLocks(), + GetQueryCmdLock(), ) return queryCmd } -// GetQueryCmdKeys implements the keys query command. -func GetQueryCmdKeys() *cobra.Command { +// GetQueryCmdVaults implements the vaults query command. +func GetQueryCmdVaults() *cobra.Command { cmd := &cobra.Command{ - Use: "keys", - Short: "shows all keys", + Use: "vaults", + Short: "shows all vaults", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -49,7 +49,7 @@ func GetQueryCmdKeys() *cobra.Command { return err } - res, err := queryClient.Keys(cmd.Context(), &types.QueryKeysRequest{Pagination: pageReq}) + res, err := queryClient.Vaults(cmd.Context(), &types.QueryVaultsRequest{Pagination: pageReq}) if err != nil { return err } @@ -58,17 +58,17 @@ func GetQueryCmdKeys() *cobra.Command { }, } - flags.AddPaginationFlagsToCmd(cmd, "keys") + flags.AddPaginationFlagsToCmd(cmd, "vaults") flags.AddQueryFlagsToCmd(cmd) return cmd } -// GetQueryCmdKey implements the key query command. -func GetQueryCmdKey() *cobra.Command { +// GetQueryCmdVault implements the vault query command. +func GetQueryCmdVault() *cobra.Command { cmd := &cobra.Command{ - Use: "key [name]", - Short: "shows information of the key", + Use: "vault [key]", + Short: "shows information of the vault", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -78,9 +78,9 @@ func GetQueryCmdKey() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Key( + res, err := queryClient.Vault( cmd.Context(), - &types.QueryKeyRequest{ + &types.QueryVaultRequest{ Key: args[0], }, ) @@ -137,8 +137,8 @@ func GetQueryCmdRewards() *cobra.Command { // GetQueryCmdReward implements the reward query command. func GetQueryCmdReward() *cobra.Command { cmd := &cobra.Command{ - Use: "reward [staker_address] [key_name]", - Short: "shows the reward of an staker address for the key", + Use: "reward [staker_address] [key]", + Short: "shows the reward of an staker address for the vault", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -205,8 +205,8 @@ func GetQueryCmdLocks() *cobra.Command { // GetQueryCmdLock implements the lock query command. func GetQueryCmdLock() *cobra.Command { cmd := &cobra.Command{ - Use: "lock [staker_address] [key_name]", - Short: "shows the lock of an staker address for the key", + Use: "lock [staker_address] [key]", + Short: "shows the lock of an staker address for the vault", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) diff --git a/x/restake/client/cli/tx.go b/x/restake/client/cli/tx.go index 9e4a6e958..38884f5c9 100644 --- a/x/restake/client/cli/tx.go +++ b/x/restake/client/cli/tx.go @@ -71,9 +71,9 @@ func GetTxCmdClaimRewards() *cobra.Command { } } - // claim all possible reward pools (>= 1 unit or key is deactivated) + // claim all possible reward pools (>= 1 unit or vault is deactivated) for _, reward := range rewards { - respKey, err := queryClient.Key(context.Background(), &types.QueryKeyRequest{ + respVault, err := queryClient.Vault(context.Background(), &types.QueryVaultRequest{ Key: reward.Key, }) if err != nil { @@ -81,7 +81,7 @@ func GetTxCmdClaimRewards() *cobra.Command { } finalReward, _ := reward.Rewards.TruncateDecimal() - if !finalReward.IsZero() || !respKey.Key.IsActive { + if !finalReward.IsZero() || !respVault.Vault.IsActive { args = append(args, reward.Key) } } diff --git a/x/restake/keeper/genesis.go b/x/restake/keeper/genesis.go index 6cc8ee7b5..b51a15f8e 100644 --- a/x/restake/keeper/genesis.go +++ b/x/restake/keeper/genesis.go @@ -8,8 +8,8 @@ import ( // InitGenesis initializes the module's state from a provided genesis state. func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) { - for _, key := range data.Keys { - k.SetKey(ctx, key) + for _, vault := range data.Vaults { + k.SetVault(ctx, vault) } for _, lock := range data.Locks { @@ -19,8 +19,8 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) { // ExportGenesis returns the module's exported genesis func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { - return &types.GenesisState{ - Keys: k.GetKeys(ctx), - Locks: k.GetLocks(ctx), - } + return types.NewGenesisState( + k.GetVaults(ctx), + k.GetLocks(ctx), + ) } diff --git a/x/restake/keeper/genesis_test.go b/x/restake/keeper/genesis_test.go index 43618088f..3212ad6aa 100644 --- a/x/restake/keeper/genesis_test.go +++ b/x/restake/keeper/genesis_test.go @@ -10,16 +10,16 @@ func (suite *KeeperTestSuite) TestExportGenesis() { exportGenesis := suite.restakeKeeper.ExportGenesis(ctx) - suite.Require().Equal(suite.validKeys, exportGenesis.Keys) + suite.Require().Equal(suite.validVaults, exportGenesis.Vaults) suite.Require().Equal(suite.validLocks, exportGenesis.Locks) } func (suite *KeeperTestSuite) TestInitGenesis() { ctx := suite.ctx - g := types.NewGenesisState(suite.validKeys, suite.validLocks) + g := types.NewGenesisState(suite.validVaults, suite.validLocks) suite.restakeKeeper.InitGenesis(suite.ctx, g) - suite.Require().Equal(suite.validKeys, suite.restakeKeeper.GetKeys(ctx)) + suite.Require().Equal(suite.validVaults, suite.restakeKeeper.GetVaults(ctx)) suite.Require().Equal(suite.validLocks, suite.restakeKeeper.GetLocks(ctx)) } diff --git a/x/restake/keeper/grpc_query.go b/x/restake/keeper/grpc_query.go index 893b4a209..368ac9e71 100644 --- a/x/restake/keeper/grpc_query.go +++ b/x/restake/keeper/grpc_query.go @@ -19,44 +19,44 @@ type Querier struct { var _ types.QueryServer = Querier{} -// Keys queries all keys with pagination. -func (k Querier) Keys( +// Vaults queries all vaults with pagination. +func (k Querier) Vaults( c context.Context, - req *types.QueryKeysRequest, -) (*types.QueryKeysResponse, error) { + req *types.QueryVaultsRequest, +) (*types.QueryVaultsResponse, error) { ctx := sdk.UnwrapSDKContext(c) - keyStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyStoreKeyPrefix) + vaultStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.VaultStoreKeyPrefix) - filteredKeys, pageRes, err := query.GenericFilteredPaginate( + filteredVaults, pageRes, err := query.GenericFilteredPaginate( k.cdc, - keyStore, + vaultStore, req.Pagination, - func(key []byte, v *types.Key) (*types.Key, error) { + func(key []byte, v *types.Vault) (*types.Vault, error) { return v, nil - }, func() *types.Key { - return &types.Key{} + }, func() *types.Vault { + return &types.Vault{} }) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryKeysResponse{Keys: filteredKeys, Pagination: pageRes}, nil + return &types.QueryVaultsResponse{Vaults: filteredVaults, Pagination: pageRes}, nil } -// Key queries info about a key. -func (k Querier) Key( +// Vault queries info about a vault. +func (k Querier) Vault( c context.Context, - req *types.QueryKeyRequest, -) (*types.QueryKeyResponse, error) { + req *types.QueryVaultRequest, +) (*types.QueryVaultResponse, error) { ctx := sdk.UnwrapSDKContext(c) - key, err := k.GetKey(ctx, req.Key) + vault, err := k.GetVault(ctx, req.Key) if err != nil { return nil, err } - return &types.QueryKeyResponse{Key: key}, nil + return &types.QueryVaultResponse{Vault: vault}, nil } // Rewards queries all rewards with pagination. @@ -131,13 +131,13 @@ func (k Querier) Locks( lockStore, req.Pagination, func(key []byte, s *types.Lock) (*types.LockResponse, error) { - if !k.IsActiveKey(ctx, s.Key) || s.Amount.IsZero() { + if !k.IsActiveVault(ctx, s.Key) || s.Power.IsZero() { return nil, nil } return &types.LockResponse{ - Key: s.Key, - Amount: s.Amount, + Key: s.Key, + Power: s.Power, }, nil }, func() *types.Lock { return &types.Lock{} @@ -161,9 +161,9 @@ func (k Querier) Lock( return nil, err } - isActive := k.IsActiveKey(ctx, req.Key) + isActive := k.IsActiveVault(ctx, req.Key) if !isActive { - return nil, types.ErrKeyNotActive + return nil, types.ErrVaultNotActive } lock, err := k.GetLock(ctx, addr, req.Key) @@ -173,8 +173,8 @@ func (k Querier) Lock( return &types.QueryLockResponse{ Lock: types.LockResponse{ - Key: lock.Key, - Amount: lock.Amount, + Key: lock.Key, + Power: lock.Power, }, }, nil } diff --git a/x/restake/keeper/grpc_query_test.go b/x/restake/keeper/grpc_query_test.go index b77c7ec65..c001c5517 100644 --- a/x/restake/keeper/grpc_query_test.go +++ b/x/restake/keeper/grpc_query_test.go @@ -11,19 +11,19 @@ import ( "github.com/bandprotocol/chain/v2/x/restake/types" ) -func (suite *KeeperTestSuite) TestQueryKeys() { +func (suite *KeeperTestSuite) TestQueryVaults() { ctx, queryClient := suite.ctx, suite.queryClient - var validKeys []*types.Key - for i, key := range suite.validKeys { - suite.restakeKeeper.SetKey(ctx, key) - validKeys = append(validKeys, &suite.validKeys[i]) + var validVaults []*types.Vault + for i, vault := range suite.validVaults { + suite.restakeKeeper.SetVault(ctx, vault) + validVaults = append(validVaults, &suite.validVaults[i]) } // query and check var ( - req *types.QueryKeysRequest - expRes *types.QueryKeysResponse + req *types.QueryVaultsRequest + expRes *types.QueryVaultsResponse ) testCases := []struct { @@ -32,11 +32,11 @@ func (suite *KeeperTestSuite) TestQueryKeys() { expPass bool }{ { - "all keys", + "all vaults", func() { - req = &types.QueryKeysRequest{} - expRes = &types.QueryKeysResponse{ - Keys: validKeys, + req = &types.QueryVaultsRequest{} + expRes = &types.QueryVaultsResponse{ + Vaults: validVaults, } }, true, @@ -44,11 +44,11 @@ func (suite *KeeperTestSuite) TestQueryKeys() { { "limit 1", func() { - req = &types.QueryKeysRequest{ + req = &types.QueryVaultsRequest{ Pagination: &query.PageRequest{Limit: 1}, } - expRes = &types.QueryKeysResponse{ - Keys: validKeys[:1], + expRes = &types.QueryVaultsResponse{ + Vaults: validVaults[:1], } }, true, @@ -59,11 +59,11 @@ func (suite *KeeperTestSuite) TestQueryKeys() { suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { testCase.malleate() - res, err := queryClient.Keys(context.Background(), req) + res, err := queryClient.Vaults(context.Background(), req) if testCase.expPass { suite.Require().NoError(err) - suite.Require().Equal(expRes.GetKeys(), res.GetKeys()) + suite.Require().Equal(expRes.GetVaults(), res.GetVaults()) } else { suite.Require().Error(err) suite.Require().Nil(expRes) @@ -72,23 +72,23 @@ func (suite *KeeperTestSuite) TestQueryKeys() { } } -func (suite *KeeperTestSuite) TestQueryKey() { +func (suite *KeeperTestSuite) TestQueryVault() { queryClient := suite.queryClient suite.setupState() // query and check - res, err := queryClient.Key(context.Background(), &types.QueryKeyRequest{ - Key: KeyWithRewards, + res, err := queryClient.Vault(context.Background(), &types.QueryVaultRequest{ + Key: VaultKeyWithRewards, }) suite.Require().NoError(err) - suite.Require().Equal(&types.QueryKeyResponse{ - Key: suite.validKeys[0], + suite.Require().Equal(&types.QueryVaultResponse{ + Vault: suite.validVaults[0], }, res) - res, err = queryClient.Key(context.Background(), &types.QueryKeyRequest{ - Key: InvalidKey, + res, err = queryClient.Vault(context.Background(), &types.QueryVaultRequest{ + Key: InvalidVaultKey, }) - suite.Require().ErrorContains(err, "key not found") + suite.Require().ErrorContains(err, "vault not found") suite.Require().Nil(res) } @@ -108,7 +108,7 @@ func (suite *KeeperTestSuite) TestQueryRewards() { expPass bool }{ { - "rewards of address1 - lock on multiple keys", + "rewards of address1 - lock on multiple vaults", func() { req = &types.QueryRewardsRequest{ StakerAddress: ValidAddress1.String(), @@ -116,15 +116,15 @@ func (suite *KeeperTestSuite) TestQueryRewards() { expRes = &types.QueryRewardsResponse{ Rewards: []*types.Reward{ { - Key: KeyWithRewards, + Key: VaultKeyWithRewards, Rewards: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1))), }, { - Key: KeyWithoutRewards, + Key: VaultKeyWithoutRewards, Rewards: nil, }, { - Key: InactiveKey, + Key: InactiveVaultKey, Rewards: nil, }, }, @@ -133,7 +133,7 @@ func (suite *KeeperTestSuite) TestQueryRewards() { true, }, { - "rewards of address2 - lock on one key", + "rewards of address2 - lock on one vault", func() { req = &types.QueryRewardsRequest{ StakerAddress: ValidAddress2.String(), @@ -141,7 +141,7 @@ func (suite *KeeperTestSuite) TestQueryRewards() { expRes = &types.QueryRewardsResponse{ Rewards: []*types.Reward{ { - Key: KeyWithRewards, + Key: VaultKeyWithRewards, Rewards: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1))), }, }, @@ -196,15 +196,15 @@ func (suite *KeeperTestSuite) TestQueryReward() { expPass bool }{ { - "reward of address1 on KeyWithRewards", + "reward of address1 on VaultKeyWithRewards", func() { req = &types.QueryRewardRequest{ StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, + Key: VaultKeyWithRewards, } expRes = &types.QueryRewardResponse{ Reward: types.Reward{ - Key: KeyWithRewards, + Key: VaultKeyWithRewards, Rewards: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1))), }, } @@ -212,15 +212,15 @@ func (suite *KeeperTestSuite) TestQueryReward() { true, }, { - "reward of address1 on InactiveKey", + "reward of address1 on InactiveVaultKey", func() { req = &types.QueryRewardRequest{ StakerAddress: ValidAddress1.String(), - Key: InactiveKey, + Key: InactiveVaultKey, } expRes = &types.QueryRewardResponse{ Reward: types.Reward{ - Key: InactiveKey, + Key: InactiveVaultKey, Rewards: nil, }, } @@ -228,15 +228,15 @@ func (suite *KeeperTestSuite) TestQueryReward() { true, }, { - "reward of address2 on KeyWithRewards", + "reward of address2 on VaultKeyWithRewards", func() { req = &types.QueryRewardRequest{ StakerAddress: ValidAddress2.String(), - Key: KeyWithRewards, + Key: VaultKeyWithRewards, } expRes = &types.QueryRewardResponse{ Reward: types.Reward{ - Key: KeyWithRewards, + Key: VaultKeyWithRewards, Rewards: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1))), }, } @@ -278,7 +278,7 @@ func (suite *KeeperTestSuite) TestQueryLocks() { expPass bool }{ { - "locks of address1 - lock on multiple keys", + "locks of address1 - lock on multiple vaults", func() { req = &types.QueryLocksRequest{ StakerAddress: ValidAddress1.String(), @@ -286,12 +286,12 @@ func (suite *KeeperTestSuite) TestQueryLocks() { expRes = &types.QueryLocksResponse{ Locks: []*types.LockResponse{ { - Key: KeyWithRewards, - Amount: sdkmath.NewInt(10), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(10), }, { - Key: KeyWithoutRewards, - Amount: sdkmath.NewInt(100), + Key: VaultKeyWithoutRewards, + Power: sdkmath.NewInt(100), }, }, } @@ -299,7 +299,7 @@ func (suite *KeeperTestSuite) TestQueryLocks() { true, }, { - "locks of address2 - lock on one key", + "locks of address2 - lock on one vault", func() { req = &types.QueryLocksRequest{ StakerAddress: ValidAddress2.String(), @@ -307,8 +307,8 @@ func (suite *KeeperTestSuite) TestQueryLocks() { expRes = &types.QueryLocksResponse{ Locks: []*types.LockResponse{ { - Key: KeyWithRewards, - Amount: sdkmath.NewInt(10), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(10), }, }, } @@ -362,43 +362,43 @@ func (suite *KeeperTestSuite) TestQueryLock() { expPass bool }{ { - "lock of address1 on KeyWithRewards", + "lock of address1 on VaultKeyWithRewards", func() { req = &types.QueryLockRequest{ StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, + Key: VaultKeyWithRewards, } expRes = &types.QueryLockResponse{ Lock: types.LockResponse{ - Key: KeyWithRewards, - Amount: sdk.NewInt(10), + Key: VaultKeyWithRewards, + Power: sdk.NewInt(10), }, } }, true, }, { - "lock of address1 on InactiveKey", + "lock of address1 on InactiveVaultKey", func() { req = &types.QueryLockRequest{ StakerAddress: ValidAddress1.String(), - Key: InactiveKey, + Key: InactiveVaultKey, } expRes = nil }, false, }, { - "lock of address2 on KeyWithRewards", + "lock of address2 on VaultKeyWithRewards", func() { req = &types.QueryLockRequest{ StakerAddress: ValidAddress2.String(), - Key: KeyWithRewards, + Key: VaultKeyWithRewards, } expRes = &types.QueryLockResponse{ Lock: types.LockResponse{ - Key: KeyWithRewards, - Amount: sdk.NewInt(10), + Key: VaultKeyWithRewards, + Power: sdk.NewInt(10), }, } }, diff --git a/x/restake/keeper/hooks.go b/x/restake/keeper/hooks.go index 0b12ec6fd..0d83c47b3 100644 --- a/x/restake/keeper/hooks.go +++ b/x/restake/keeper/hooks.go @@ -50,23 +50,27 @@ func (h Hooks) BeforeDelegationSharesModified(_ sdk.Context, _ sdk.AccAddress, _ func (h Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { delegated := h.k.stakingKeeper.GetDelegatorBonded(ctx, delAddr) - // remove power of removed delegation from total delegation - removedDelegation, found := h.k.stakingKeeper.GetDelegation(ctx, delAddr, valAddr) + // reduce power of removing delegation from total delegation + removingDelegation, found := h.k.stakingKeeper.GetDelegation(ctx, delAddr, valAddr) if found { - validatorAddr, err := sdk.ValAddressFromBech32(removedDelegation.ValidatorAddress) + validatorAddr, err := sdk.ValAddressFromBech32(removingDelegation.ValidatorAddress) if err != nil { panic(err) // shouldn't happen } validator, found := h.k.stakingKeeper.GetValidator(ctx, validatorAddr) if found { - shares := removedDelegation.Shares + shares := removingDelegation.Shares tokens := validator.TokensFromSharesTruncated(shares) delegated = delegated.Sub(tokens.RoundInt()) } } // check if it's able to unbond - return h.isAbleToUnbond(ctx, delAddr, delegated) + if !h.isAbleToUnbond(ctx, delAddr, delegated) { + return types.ErrUnableToUndelegate + } + + return nil } // check if after delegation is modified, the locked power is still less than total delegation @@ -75,7 +79,11 @@ func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, delegated := h.k.stakingKeeper.GetDelegatorBonded(ctx, delAddr) // check if it's able to unbond - return h.isAbleToUnbond(ctx, delAddr, delegated) + if !h.isAbleToUnbond(ctx, delAddr, delegated) { + return types.ErrUnableToUndelegate + } + + return nil } func (h Hooks) BeforeValidatorSlashed(_ sdk.Context, _ sdk.ValAddress, _ sdk.Dec) error { @@ -87,25 +95,18 @@ func (h Hooks) AfterUnbondingInitiated(_ sdk.Context, _ uint64) error { } // isAbleToUnbond checks if the new total delegation is still more than locked power in the module. -func (h Hooks) isAbleToUnbond(ctx sdk.Context, addr sdk.AccAddress, delegated sdkmath.Int) error { - iterator := sdk.KVStoreReversePrefixIterator(ctx.KVStore(h.k.storeKey), types.LocksByAmountIndexKey(addr)) +func (h Hooks) isAbleToUnbond(ctx sdk.Context, addr sdk.AccAddress, delegated sdkmath.Int) bool { + iterator := sdk.KVStoreReversePrefixIterator(ctx.KVStore(h.k.storeKey), types.LocksByPowerIndexKey(addr)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - keyName := string(iterator.Value()) - lock, err := h.k.GetLock(ctx, addr, keyName) - if err != nil { - panic(err) - } + key := string(iterator.Value()) + _, power := types.SplitLockByPowerIndexKey(iterator.Key()) - if h.k.IsActiveKey(ctx, keyName) { - if delegated.LT(lock.Amount) { - return types.ErrUnableToUndelegate - } - - return nil + if h.k.IsActiveVault(ctx, key) { + return delegated.GTE(power) } } - return nil + return true } diff --git a/x/restake/keeper/hooks_test.go b/x/restake/keeper/hooks_test.go new file mode 100644 index 000000000..b4e922dec --- /dev/null +++ b/x/restake/keeper/hooks_test.go @@ -0,0 +1,89 @@ +package keeper_test + +import ( + sdkmath "cosmossdk.io/math" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "go.uber.org/mock/gomock" +) + +func (suite *KeeperTestSuite) TestHooksAfterDelegationModified() { + ctx := suite.ctx + suite.setupState() + + // validator1 locked max at 100 power + + // change delegation to 100 -> success + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress1). + Return(sdkmath.NewInt(100)). + Times(1) + err := suite.stakingHooks.AfterDelegationModified(ctx, ValidAddress1, ValAddress) + suite.Require().NoError(err) + + // change delegation to 101 -> success + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress1). + Return(sdkmath.NewInt(101)). + Times(1) + err = suite.stakingHooks.AfterDelegationModified(ctx, ValidAddress1, ValAddress) + suite.Require().NoError(err) + + // change delegation to 99 -> failed + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress1). + Return(sdkmath.NewInt(99)). + Times(1) + err = suite.stakingHooks.AfterDelegationModified(ctx, ValidAddress1, ValAddress) + suite.Require().Error(err) +} + +func (suite *KeeperTestSuite) TestHooksBeforeDelegationRemoved() { + ctx := suite.ctx + suite.setupState() + + // validator1 locked max at 100 power + + // set current delegation power as 200 + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress1). + Return(sdkmath.NewInt(200)). + AnyTimes() + + // remove delegation 100 -> success (200 - 100 >= 100) + suite.stakingKeeper.EXPECT(). + GetDelegation(gomock.Any(), ValidAddress1, ValAddress). + Return(stakingtypes.Delegation{ + DelegatorAddress: ValidAddress1.String(), + ValidatorAddress: ValAddress.String(), + Shares: sdkmath.LegacyNewDec(10), + }, true). + Times(1) + suite.stakingKeeper.EXPECT(). + GetValidator(gomock.Any(), ValAddress). + Return(stakingtypes.Validator{ + Tokens: sdkmath.NewInt(1), + DelegatorShares: sdkmath.LegacyNewDec(1), + }, true). + Times(1) + err := suite.stakingHooks.BeforeDelegationRemoved(ctx, ValidAddress1, ValAddress) + suite.Require().NoError(err) + + // remove delegation 101 -> failed (200 - 101 < 100) + suite.stakingKeeper.EXPECT(). + GetDelegation(gomock.Any(), ValidAddress1, ValAddress). + Return(stakingtypes.Delegation{ + DelegatorAddress: ValidAddress1.String(), + ValidatorAddress: ValAddress.String(), + Shares: sdkmath.LegacyNewDec(101), + }, true). + Times(1) + suite.stakingKeeper.EXPECT(). + GetValidator(gomock.Any(), ValAddress). + Return(stakingtypes.Validator{ + Tokens: sdkmath.NewInt(1), + DelegatorShares: sdkmath.LegacyNewDec(1), + }, true). + Times(1) + err = suite.stakingHooks.BeforeDelegationRemoved(ctx, ValidAddress1, ValAddress) + suite.Require().Error(err) +} diff --git a/x/restake/keeper/keeper_key.go b/x/restake/keeper/keeper_key.go deleted file mode 100644 index 3892da653..000000000 --- a/x/restake/keeper/keeper_key.go +++ /dev/null @@ -1,201 +0,0 @@ -package keeper - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - "github.com/bandprotocol/chain/v2/x/restake/types" -) - -// GetOrCreateKey get the key object by using key name. If the key doesn't exist, it will initialize the new key. -func (k Keeper) GetOrCreateKey(ctx sdk.Context, keyName string) (types.Key, error) { - key, err := k.GetKey(ctx, keyName) - if err != nil { - keyAccAddr, err := k.createKeyAccount(ctx, keyName) - if err != nil { - return types.Key{}, err - } - - key = types.Key{ - Name: keyName, - PoolAddress: keyAccAddr.String(), - IsActive: true, - TotalPower: sdkmath.NewInt(0), - RewardPerPowers: sdk.NewDecCoins(), - Remainders: sdk.NewDecCoins(), - } - - k.SetKey(ctx, key) - } - - return key, nil -} - -// AddRewards adds rewards to the pool address and re-calculate `rewardPerPowers` and `remainders` of the key -func (k Keeper) AddRewards(ctx sdk.Context, sender sdk.AccAddress, keyName string, rewards sdk.Coins) error { - key, err := k.GetKey(ctx, keyName) - if err != nil { - return err - } - - if !key.IsActive { - return types.ErrKeyNotActive - } - - if key.TotalPower.IsZero() { - return types.ErrTotalPowerZero - } - - err = k.bankKeeper.SendCoins(ctx, sender, sdk.MustAccAddressFromBech32(key.PoolAddress), rewards) - if err != nil { - return err - } - - decRewards := sdk.NewDecCoinsFromCoins(rewards.Sort()...) - totalPower := sdkmath.LegacyNewDecFromInt(key.TotalPower) - rewardPerPowers := decRewards.QuoDecTruncate(totalPower) - truncatedRewards := decRewards.Sub(rewardPerPowers.MulDecTruncate(totalPower)) - - // add truncate part to remainder - // e.g. rewards = 1, totalPower = 3 -> rewardPerPower = 0.333333333333333 - // remainder = 1 - (0.333333333333333 * 3) - key.Remainders = key.Remainders.Add(truncatedRewards...) - key.RewardPerPowers = key.RewardPerPowers.Add(rewardPerPowers...) - k.SetKey(ctx, key) - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeAddRewards, - sdk.NewAttribute(types.AttributeKeyKey, keyName), - sdk.NewAttribute(sdk.AttributeKeyAmount, rewards.String()), - ), - ) - - return nil -} - -// IsActiveKey checks whether the key is active or not. -func (k Keeper) IsActiveKey(ctx sdk.Context, keyName string) bool { - key, err := k.GetKey(ctx, keyName) - if err != nil { - return false - } - - return key.IsActive -} - -// DeactivateKey deactivates the key. -func (k Keeper) DeactivateKey(ctx sdk.Context, keyName string) error { - key, err := k.GetKey(ctx, keyName) - if err != nil { - return err - } - - if !key.IsActive { - return types.ErrKeyAlreadyDeactivated - } - - key.IsActive = false - k.SetKey(ctx, key) - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeDeactivateKey, - sdk.NewAttribute(types.AttributeKeyKey, keyName), - ), - ) - - return nil -} - -// createKeyAccount creates a key account by using name and block hash. -func (k Keeper) createKeyAccount(ctx sdk.Context, key string) (sdk.AccAddress, error) { - header := ctx.BlockHeader() - - buf := []byte(key) - buf = append(buf, header.AppHash...) - buf = append(buf, header.DataHash...) - - moduleCred, err := authtypes.NewModuleCredential(types.ModuleName, []byte(types.KeyAccountsKey), buf) - if err != nil { - return nil, err - } - - keyAccAddr := sdk.AccAddress(moduleCred.Address()) - - // This should not happen - if acc := k.authKeeper.GetAccount(ctx, keyAccAddr); acc != nil { - return nil, types.ErrAccountAlreadyExist.Wrapf( - "existing account for newly generated key account address %s", - keyAccAddr.String(), - ) - } - - keyAcc, err := authtypes.NewBaseAccountWithPubKey(moduleCred) - if err != nil { - return nil, err - } - - k.authKeeper.NewAccount(ctx, keyAcc) - k.authKeeper.SetAccount(ctx, keyAcc) - - return keyAccAddr, nil -} - -// ------------------------------- -// store part -// ------------------------------- - -// GetKeysIterator gets iterator of key store. -func (k Keeper) GetKeysIterator(ctx sdk.Context) sdk.Iterator { - return sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.KeyStoreKeyPrefix) -} - -// GetKeys gets all keys in the store. -func (k Keeper) GetKeys(ctx sdk.Context) (keys []types.Key) { - iterator := k.GetKeysIterator(ctx) - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var key types.Key - k.cdc.MustUnmarshal(iterator.Value(), &key) - keys = append(keys, key) - } - - return keys -} - -// HasKey checks if key exists in the store. -func (k Keeper) HasKey(ctx sdk.Context, keyName string) bool { - return ctx.KVStore(k.storeKey).Has(types.KeyStoreKey(keyName)) -} - -// MustGetKey gets a key from store by name. -// Panics if can't get the key. -func (k Keeper) MustGetKey(ctx sdk.Context, keyName string) types.Key { - key, err := k.GetKey(ctx, keyName) - if err != nil { - panic(err) - } - - return key -} - -// GetKey gets a key from store by name. -func (k Keeper) GetKey(ctx sdk.Context, keyName string) (types.Key, error) { - bz := ctx.KVStore(k.storeKey).Get(types.KeyStoreKey(keyName)) - if bz == nil { - return types.Key{}, types.ErrKeyNotFound.Wrapf("failed to get key with name: %s", keyName) - } - - var key types.Key - k.cdc.MustUnmarshal(bz, &key) - - return key, nil -} - -// SetKey sets a key to the store. -func (k Keeper) SetKey(ctx sdk.Context, key types.Key) { - ctx.KVStore(k.storeKey).Set(types.KeyStoreKey(key.Name), k.cdc.MustMarshal(&key)) -} diff --git a/x/restake/keeper/keeper_lock.go b/x/restake/keeper/keeper_lock.go index e84d4d94e..1f37fa0da 100644 --- a/x/restake/keeper/keeper_lock.go +++ b/x/restake/keeper/keeper_lock.go @@ -7,100 +7,100 @@ import ( "github.com/bandprotocol/chain/v2/x/restake/types" ) -// SetLockedPower sets the new locked power amount of the address to the key -// This function will override the previous locked amount. -func (k Keeper) SetLockedPower(ctx sdk.Context, stakerAddr sdk.AccAddress, keyName string, amount sdkmath.Int) error { - if !amount.IsUint64() { - return types.ErrInvalidAmount +// SetLockedPower sets the new locked power of the address to the vault +// This function will override the previous locked power. +func (k Keeper) SetLockedPower(ctx sdk.Context, stakerAddr sdk.AccAddress, key string, power sdkmath.Int) error { + if !power.IsUint64() { + return types.ErrInvalidPower } - // check if delegation is not less than amount + // check if delegation is not less than power delegation := k.stakingKeeper.GetDelegatorBonded(ctx, stakerAddr) - if delegation.LT(amount) { + if delegation.LT(power) { return types.ErrDelegationNotEnough } - key, err := k.GetOrCreateKey(ctx, keyName) + vault, err := k.GetOrCreateVault(ctx, key) if err != nil { return err } - if !key.IsActive { - return types.ErrKeyNotActive + if !vault.IsActive { + return types.ErrVaultNotActive } // check if there is a lock before - lock, err := k.GetLock(ctx, stakerAddr, keyName) + lock, err := k.GetLock(ctx, stakerAddr, key) if err != nil { - lock = types.Lock{ - StakerAddress: stakerAddr.String(), - Key: keyName, - Amount: sdkmath.NewInt(0), - PosRewardDebts: sdk.NewDecCoins(), - NegRewardDebts: sdk.NewDecCoins(), - } + lock = types.NewLock( + stakerAddr.String(), + key, + sdkmath.NewInt(0), + sdk.NewDecCoins(), + sdk.NewDecCoins(), + ) } - diffAmount := amount.Sub(lock.Amount) + diffPower := power.Sub(lock.Power) - key.TotalPower = key.TotalPower.Add(diffAmount) - k.SetKey(ctx, key) + vault.TotalPower = vault.TotalPower.Add(diffPower) + k.SetVault(ctx, vault) - additionalDebts := key.RewardPerPowers.MulDecTruncate(sdkmath.LegacyNewDecFromInt(diffAmount.Abs())) - if diffAmount.IsPositive() { + additionalDebts := vault.RewardsPerPower.MulDecTruncate(sdkmath.LegacyNewDecFromInt(diffPower.Abs())) + if diffPower.IsPositive() { lock.PosRewardDebts = lock.PosRewardDebts.Add(additionalDebts...) } else { lock.NegRewardDebts = lock.NegRewardDebts.Add(additionalDebts...) } - lock.Amount = amount + lock.Power = power k.SetLock(ctx, lock) ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeLockPower, sdk.NewAttribute(types.AttributeKeyStaker, stakerAddr.String()), - sdk.NewAttribute(types.AttributeKeyKey, keyName), - sdk.NewAttribute(sdk.AttributeKeyAmount, amount.String()), + sdk.NewAttribute(types.AttributeKeyKey, key), + sdk.NewAttribute(types.AttributeKeyPower, power.String()), ), ) return nil } -// GetLockedPower returns locked power of the address to the key. -func (k Keeper) GetLockedPower(ctx sdk.Context, stakerAddr sdk.AccAddress, keyName string) (sdkmath.Int, error) { - key, err := k.GetKey(ctx, keyName) +// GetLockedPower returns locked power of the address to the vault. +func (k Keeper) GetLockedPower(ctx sdk.Context, stakerAddr sdk.AccAddress, key string) (sdkmath.Int, error) { + vault, err := k.GetVault(ctx, key) if err != nil { - return sdkmath.Int{}, types.ErrKeyNotFound + return sdkmath.Int{}, types.ErrVaultNotFound } - if !key.IsActive { - return sdkmath.Int{}, types.ErrKeyNotActive + if !vault.IsActive { + return sdkmath.Int{}, types.ErrVaultNotActive } - lock, err := k.GetLock(ctx, stakerAddr, keyName) + lock, err := k.GetLock(ctx, stakerAddr, key) if err != nil { return sdkmath.Int{}, types.ErrLockNotFound } - return lock.Amount, nil + return lock.Power, nil } // getAccumulatedRewards gets the accumulatedRewards of a lock if they lock since beginning. func (k Keeper) getAccumulatedRewards(ctx sdk.Context, lock types.Lock) sdk.DecCoins { - key := k.MustGetKey(ctx, lock.Key) + vault := k.MustGetVault(ctx, lock.Key) - return key.RewardPerPowers.MulDecTruncate(sdkmath.LegacyNewDecFromInt(lock.Amount)) + return vault.RewardsPerPower.MulDecTruncate(sdkmath.LegacyNewDecFromInt(lock.Power)) } // getReward gets the reward of a lock by using accumulated rewards and reward debts. func (k Keeper) getReward(ctx sdk.Context, lock types.Lock) types.Reward { totalRewards := k.getAccumulatedRewards(ctx, lock) - return types.Reward{ - Key: lock.Key, - Rewards: totalRewards.Add(lock.NegRewardDebts...).Sub(lock.PosRewardDebts), - } + return types.NewReward( + lock.Key, + totalRewards.Add(lock.NegRewardDebts...).Sub(lock.PosRewardDebts), + ) } // ------------------------------- @@ -146,18 +146,18 @@ func (k Keeper) GetLocks(ctx sdk.Context) (locks []types.Lock) { } // HasLock checks if lock exists in the store. -func (k Keeper) HasLock(ctx sdk.Context, addr sdk.AccAddress, keyName string) bool { - return ctx.KVStore(k.storeKey).Has(types.LockStoreKey(addr, keyName)) +func (k Keeper) HasLock(ctx sdk.Context, addr sdk.AccAddress, key string) bool { + return ctx.KVStore(k.storeKey).Has(types.LockStoreKey(addr, key)) } -// GetLock gets a lock from store by address and key name. -func (k Keeper) GetLock(ctx sdk.Context, addr sdk.AccAddress, keyName string) (types.Lock, error) { - bz := ctx.KVStore(k.storeKey).Get(types.LockStoreKey(addr, keyName)) +// GetLock gets a lock from store by address and key. +func (k Keeper) GetLock(ctx sdk.Context, addr sdk.AccAddress, key string) (types.Lock, error) { + bz := ctx.KVStore(k.storeKey).Get(types.LockStoreKey(addr, key)) if bz == nil { return types.Lock{}, types.ErrLockNotFound.Wrapf( - "failed to get lock of %s with key name: %s", + "failed to get lock of %s with key: %s", addr.String(), - keyName, + key, ) } @@ -173,25 +173,25 @@ func (k Keeper) SetLock(ctx sdk.Context, lock types.Lock) { k.DeleteLock(ctx, addr, lock.Key) ctx.KVStore(k.storeKey).Set(types.LockStoreKey(addr, lock.Key), k.cdc.MustMarshal(&lock)) - k.setLockByAmount(ctx, lock) + k.setLockByPower(ctx, lock) } // DeleteLock deletes a lock from the store. -func (k Keeper) DeleteLock(ctx sdk.Context, addr sdk.AccAddress, keyName string) { - lock, err := k.GetLock(ctx, addr, keyName) +func (k Keeper) DeleteLock(ctx sdk.Context, addr sdk.AccAddress, key string) { + lock, err := k.GetLock(ctx, addr, key) if err != nil { return } - ctx.KVStore(k.storeKey).Delete(types.LockStoreKey(addr, keyName)) - k.deleteLockByAmount(ctx, lock) + ctx.KVStore(k.storeKey).Delete(types.LockStoreKey(addr, key)) + k.deleteLockByPower(ctx, lock) } -// setLockByAmount sets a lock by amount to the store. -func (k Keeper) setLockByAmount(ctx sdk.Context, lock types.Lock) { - ctx.KVStore(k.storeKey).Set(types.LockByAmountIndexKey(lock), []byte(lock.Key)) +// setLockByPower sets a lock by power to the store. +func (k Keeper) setLockByPower(ctx sdk.Context, lock types.Lock) { + ctx.KVStore(k.storeKey).Set(types.LockByPowerIndexKey(lock), []byte(lock.Key)) } -// deleteLockByAmount deletes a lock by amount from the store. -func (k Keeper) deleteLockByAmount(ctx sdk.Context, lock types.Lock) { - ctx.KVStore(k.storeKey).Delete(types.LockByAmountIndexKey(lock)) +// deleteLockByPower deletes a lock by power from the store. +func (k Keeper) deleteLockByPower(ctx sdk.Context, lock types.Lock) { + ctx.KVStore(k.storeKey).Delete(types.LockByPowerIndexKey(lock)) } diff --git a/x/restake/keeper/keeper_lock_test.go b/x/restake/keeper/keeper_lock_test.go index 4ed8d909e..62c976541 100644 --- a/x/restake/keeper/keeper_lock_test.go +++ b/x/restake/keeper/keeper_lock_test.go @@ -5,6 +5,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + "go.uber.org/mock/gomock" "github.com/bandprotocol/chain/v2/x/restake/types" ) @@ -13,23 +14,32 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { ctx := suite.ctx suite.setupState() - // error case - amount is not uint64 - err := suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, KeyWithRewards, sdkmath.NewInt(-5)) + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress1). + Return(sdkmath.NewInt(1e18)). + Times(1) + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress3). + Return(sdkmath.NewInt(10)). + Times(1) + + // error case - power is not uint64 + err := suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, VaultKeyWithRewards, sdkmath.NewInt(-5)) suite.Require().Error(err) // error case - lock more than delegation - err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress3, KeyWithRewards, sdkmath.NewInt(30)) + err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress3, VaultKeyWithRewards, sdkmath.NewInt(30)) suite.Require().Error(err) - // error case - key is deactivated - err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, InactiveKey, sdkmath.NewInt(10)) + // error case - vault is deactivated + err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, InactiveVaultKey, sdkmath.NewInt(10)) suite.Require().Error(err) // success cases var ( - preKey types.Key - preLock *types.Lock - amount sdkmath.Int + preVault types.Vault + preLock *types.Lock + power sdkmath.Int ) testCases := []struct { @@ -41,24 +51,24 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { { "success case - no previous lock with empty rewards", func() { - preKey = types.Key{ - Name: KeyWithoutRewards, - PoolAddress: KeyWithoutRewardsPoolAddress.String(), + preVault = types.Vault{ + Key: VaultKeyWithoutRewards, + VaultAddress: VaultWithoutRewardsAddress.String(), IsActive: true, - RewardPerPowers: nil, + RewardsPerPower: nil, TotalPower: sdkmath.NewInt(100), Remainders: nil, } preLock = nil - amount = sdkmath.NewInt(100) + power = sdkmath.NewInt(100) }, sdkmath.NewInt(200), types.Lock{ StakerAddress: ValidAddress1.String(), - Key: KeyWithoutRewards, - Amount: sdkmath.NewInt(100), + Key: VaultKeyWithoutRewards, + Power: sdkmath.NewInt(100), PosRewardDebts: nil, NegRewardDebts: nil, }, @@ -66,30 +76,30 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { { "success case - have previous lock with empty rewards", func() { - preKey = types.Key{ - Name: KeyWithoutRewards, - PoolAddress: KeyWithoutRewardsPoolAddress.String(), + preVault = types.Vault{ + Key: VaultKeyWithoutRewards, + VaultAddress: VaultWithoutRewardsAddress.String(), IsActive: true, - RewardPerPowers: nil, + RewardsPerPower: nil, TotalPower: sdkmath.NewInt(100), Remainders: nil, } preLock = &types.Lock{ StakerAddress: ValidAddress1.String(), - Key: KeyWithoutRewards, - Amount: sdkmath.NewInt(10), + Key: VaultKeyWithoutRewards, + Power: sdkmath.NewInt(10), PosRewardDebts: nil, NegRewardDebts: nil, } - amount = sdkmath.NewInt(100) + power = sdkmath.NewInt(100) }, sdkmath.NewInt(190), types.Lock{ StakerAddress: ValidAddress1.String(), - Key: KeyWithoutRewards, - Amount: sdkmath.NewInt(100), + Key: VaultKeyWithoutRewards, + Power: sdkmath.NewInt(100), PosRewardDebts: nil, NegRewardDebts: nil, }, @@ -97,11 +107,11 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { { "success case - no previous lock with rewards", func() { - preKey = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + preVault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 3)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 2)), ), @@ -111,13 +121,13 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { preLock = nil - amount = sdkmath.NewInt(100) + power = sdkmath.NewInt(100) }, sdkmath.NewInt(200), types.Lock{ StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, - Amount: sdkmath.NewInt(100), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(100), PosRewardDebts: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 1)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 0)), @@ -128,11 +138,11 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { { "success case - have previous lock with rewards - lock more", func() { - preKey = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + preVault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 3)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 2)), ), @@ -142,19 +152,19 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { preLock = &types.Lock{ StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, - Amount: sdkmath.NewInt(100), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(100), PosRewardDebts: nil, NegRewardDebts: nil, } - amount = sdkmath.NewInt(1000) + power = sdkmath.NewInt(1000) }, sdkmath.NewInt(1000), types.Lock{ StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, - Amount: sdkmath.NewInt(1000), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(1000), PosRewardDebts: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(9, 1)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(9, 0)), @@ -165,11 +175,11 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { { "success case - have previous lock with rewards - lock less", func() { - preKey = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + preVault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 3)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 2)), ), @@ -179,19 +189,19 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { preLock = &types.Lock{ StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, - Amount: sdkmath.NewInt(1000), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(1000), PosRewardDebts: nil, NegRewardDebts: nil, } - amount = sdkmath.NewInt(100) + power = sdkmath.NewInt(100) }, sdkmath.NewInt(100), types.Lock{ StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, - Amount: sdkmath.NewInt(100), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(100), PosRewardDebts: nil, NegRewardDebts: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(9, 1)), @@ -203,11 +213,17 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { for _, testCase := range testCases { suite.Run(fmt.Sprintf("Case %s", testCase.name), func() { - suite.resetState() + suite.SetupTest() ctx = suite.ctx + + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress1). + Return(sdkmath.NewInt(1e18)). + Times(1) + testCase.malleate() - suite.restakeKeeper.SetKey(ctx, preKey) + suite.restakeKeeper.SetVault(ctx, preVault) if preLock != nil { suite.restakeKeeper.SetLock(ctx, *preLock) @@ -216,16 +232,16 @@ func (suite *KeeperTestSuite) TestSetLockedPower() { err = suite.restakeKeeper.SetLockedPower( ctx, ValidAddress1, - preKey.Name, - amount, + preVault.Key, + power, ) suite.Require().NoError(err) - key, err := suite.restakeKeeper.GetKey(ctx, preKey.Name) + vault, err := suite.restakeKeeper.GetVault(ctx, preVault.Key) suite.Require().NoError(err) - suite.Require().Equal(testCase.expTotalPower, key.TotalPower) + suite.Require().Equal(testCase.expTotalPower, vault.TotalPower) - lock, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, preKey.Name) + lock, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, preVault.Key) suite.Require().NoError(err) suite.Require().Equal(testCase.expLock, lock) }) @@ -236,20 +252,20 @@ func (suite *KeeperTestSuite) TestGetLockedPower() { ctx := suite.ctx suite.setupState() - // error case - no key - _, err := suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, InvalidKey) + // error case - no vault + _, err := suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, InvalidVaultKey) suite.Require().Error(err) - // error case - key is deactivated - _, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, InactiveKey) + // error case - vault is deactivated + _, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, InactiveVaultKey) suite.Require().Error(err) // error case - no lock - _, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress2, KeyWithoutRewards) + _, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress2, VaultKeyWithoutRewards) suite.Require().Error(err) // success case - power, err := suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, KeyWithRewards) + power, err := suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, VaultKeyWithRewards) suite.Require().NoError(err) suite.Require().Equal(sdkmath.NewInt(10), power) } @@ -272,13 +288,13 @@ func (suite *KeeperTestSuite) TestGetSetLock() { suite.Require().NoError(err) suite.Require().Equal(expLock, lock) - // get lock by amount - keyName := ctx.KVStore(suite.storeKey).Get(types.LockByAmountIndexKey(lock)) - suite.Require().Equal(expLock.Key, string(keyName)) + // get lock by power + key := ctx.KVStore(suite.storeKey).Get(types.LockByPowerIndexKey(lock)) + suite.Require().Equal(expLock.Key, string(key)) } // has - has := suite.restakeKeeper.HasLock(ctx, ValidAddress1, "nonKey") + has := suite.restakeKeeper.HasLock(ctx, ValidAddress1, "nonVault") suite.Require().False(has) // get @@ -307,8 +323,8 @@ func (suite *KeeperTestSuite) TestGetSetLock() { _, err := suite.restakeKeeper.GetLock(ctx, acc, expLock.Key) suite.Require().Error(err) - // get lock by amount - has = ctx.KVStore(suite.storeKey).Has(types.LockByAmountIndexKey(expLock)) + // get lock by Power + has = ctx.KVStore(suite.storeKey).Has(types.LockByPowerIndexKey(expLock)) suite.Require().False(has) } } diff --git a/x/restake/keeper/keeper_test.go b/x/restake/keeper/keeper_test.go index 4c62ff8ab..33e601c7a 100644 --- a/x/restake/keeper/keeper_test.go +++ b/x/restake/keeper/keeper_test.go @@ -11,6 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/suite" "go.uber.org/mock/gomock" @@ -20,28 +21,27 @@ import ( ) var ( - // delegate power - // - 1e18 -> address 1,2 - // - 10 -> address 3 ValidAddress1 = sdk.AccAddress("1000000001") ValidAddress2 = sdk.AccAddress("1000000002") ValidAddress3 = sdk.AccAddress("1000000003") - KeyWithRewards = "0_key_with_rewards" - KeyWithoutRewards = "1_key_without_rewards" - KeyWithoutLocks = "2_key_without_locks" - InactiveKey = "3_inactive_key" - InvalidKey = "invalid_key" - ValidKey = "valid_key" + VaultKeyWithRewards = "0_key_with_rewards" + VaultKeyWithoutRewards = "1_key_without_rewards" + VaultKeyWithoutLocks = "2_key_without_locks" + InactiveVaultKey = "3_inactive_key" + InvalidVaultKey = "invalid_key" + ValidVaultKey = "valid_key" - KeyWithRewardsPoolAddress = sdk.AccAddress("2000000001") - KeyWithoutRewardsPoolAddress = sdk.AccAddress("2000000002") - KeyWithoutLocksPoolAddress = sdk.AccAddress("2000000003") - InactiveKeyPoolAddress = sdk.AccAddress("2000000004") + VaultWithRewardsAddress = sdk.AccAddress("2000000001") + VaultWithoutRewardsAddress = sdk.AccAddress("2000000002") + VaultWithoutLocksAddress = sdk.AccAddress("2000000003") + InactiveVaultAddress = sdk.AccAddress("2000000004") - ValidKeyPoolAddress = "cosmos1jyea6nm7dhrfr8j4v2ethyfv4vvv2rcaz6a0sptfun7797g59vjsm53vhf" + ValidVaultAddress = "cosmos142hwqg2wwnverkcteaa5pn2lpkwp7e0ya2q84v4wdd7cffvfpeeq0zf2n6" RewarderAddress = sdk.AccAddress("3000000001") + + ValAddress = sdk.ValAddress("4000000001") ) type KeeperTestSuite struct { @@ -54,11 +54,13 @@ type KeeperTestSuite struct { bankKeeper *restaketestutil.MockBankKeeper stakingKeeper *restaketestutil.MockStakingKeeper + stakingHooks stakingtypes.StakingHooks + queryClient types.QueryClient msgServer types.MsgServer - validKeys []types.Key - validLocks []types.Lock + validVaults []types.Vault + validLocks []types.Lock } func TestKeeperTestSuite(t *testing.T) { @@ -66,37 +68,37 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) SetupTest() { - suite.validKeys = []types.Key{ + suite.validVaults = []types.Vault{ { - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), IsActive: true, TotalPower: sdkmath.NewInt(20), - RewardPerPowers: sdk.NewDecCoins(sdk.NewDecCoinFromDec("uband", sdkmath.LegacyNewDecWithPrec(1, 1))), + RewardsPerPower: sdk.NewDecCoins(sdk.NewDecCoinFromDec("uband", sdkmath.LegacyNewDecWithPrec(1, 1))), Remainders: nil, }, { - Name: KeyWithoutRewards, - PoolAddress: KeyWithoutRewardsPoolAddress.String(), + Key: VaultKeyWithoutRewards, + VaultAddress: VaultWithoutRewardsAddress.String(), IsActive: true, TotalPower: sdkmath.NewInt(100), - RewardPerPowers: nil, + RewardsPerPower: nil, Remainders: nil, }, { - Name: KeyWithoutLocks, - PoolAddress: KeyWithoutLocksPoolAddress.String(), + Key: VaultKeyWithoutLocks, + VaultAddress: VaultWithoutLocksAddress.String(), IsActive: true, TotalPower: sdkmath.NewInt(0), - RewardPerPowers: nil, + RewardsPerPower: nil, Remainders: nil, }, { - Name: InactiveKey, - PoolAddress: InactiveKeyPoolAddress.String(), + Key: InactiveVaultKey, + VaultAddress: InactiveVaultAddress.String(), IsActive: false, TotalPower: sdkmath.NewInt(100), - RewardPerPowers: nil, + RewardsPerPower: nil, Remainders: nil, }, } @@ -104,38 +106,34 @@ func (suite *KeeperTestSuite) SetupTest() { suite.validLocks = []types.Lock{ { StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, - Amount: sdkmath.NewInt(10), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(10), PosRewardDebts: nil, NegRewardDebts: nil, }, { StakerAddress: ValidAddress1.String(), - Key: KeyWithoutRewards, - Amount: sdkmath.NewInt(100), + Key: VaultKeyWithoutRewards, + Power: sdkmath.NewInt(100), PosRewardDebts: nil, NegRewardDebts: nil, }, { StakerAddress: ValidAddress1.String(), - Key: InactiveKey, - Amount: sdkmath.NewInt(50), + Key: InactiveVaultKey, + Power: sdkmath.NewInt(50), PosRewardDebts: nil, NegRewardDebts: nil, }, { StakerAddress: ValidAddress2.String(), - Key: KeyWithRewards, - Amount: sdkmath.NewInt(10), + Key: VaultKeyWithRewards, + Power: sdkmath.NewInt(10), PosRewardDebts: nil, NegRewardDebts: nil, }, } - suite.resetState() -} - -func (suite *KeeperTestSuite) resetState() { key := sdk.NewKVStoreKey(types.StoreKey) suite.storeKey = key testCtx := testutil.DefaultContextWithDB(suite.T(), key, sdk.NewTransientStoreKey("transient_test")) @@ -167,18 +165,6 @@ func (suite *KeeperTestSuite) resetState() { suite.bankKeeper = bankKeeper stakingKeeper := restaketestutil.NewMockStakingKeeper(ctrl) - stakingKeeper.EXPECT(). - GetDelegatorBonded(gomock.Any(), ValidAddress1). - Return(sdkmath.NewInt(1e18)). - AnyTimes() - stakingKeeper.EXPECT(). - GetDelegatorBonded(gomock.Any(), ValidAddress2). - Return(sdkmath.NewInt(1e18)). - AnyTimes() - stakingKeeper.EXPECT(). - GetDelegatorBonded(gomock.Any(), ValidAddress3). - Return(sdkmath.NewInt(10)). - AnyTimes() suite.stakingKeeper = stakingKeeper suite.restakeKeeper = keeper.NewKeeper( @@ -190,6 +176,8 @@ func (suite *KeeperTestSuite) resetState() { ) suite.restakeKeeper.InitGenesis(suite.ctx, types.DefaultGenesisState()) + suite.stakingHooks = suite.restakeKeeper.Hooks() + queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, encCfg.InterfaceRegistry) queryServer := keeper.Querier{ Keeper: &suite.restakeKeeper, @@ -203,8 +191,8 @@ func (suite *KeeperTestSuite) resetState() { } func (suite *KeeperTestSuite) setupState() { - for _, key := range suite.validKeys { - suite.restakeKeeper.SetKey(suite.ctx, key) + for _, vault := range suite.validVaults { + suite.restakeKeeper.SetVault(suite.ctx, vault) } for _, lock := range suite.validLocks { @@ -213,53 +201,50 @@ func (suite *KeeperTestSuite) setupState() { } func (suite *KeeperTestSuite) TestScenarios() { - ctx := suite.ctx - suite.setupState() - testCases := []struct { name string - check func() + check func(sdk.Context) }{ { name: "1 account", - check: func() { + check: func(ctx sdk.Context) { // pre check - _, err := suite.restakeKeeper.GetKey(ctx, ValidKey) + _, err := suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().Error(err) - _, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + _, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().Error(err) // -------------------------- // address1 locks on key1 333 powers // -------------------------- - err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, ValidKey, sdkmath.NewInt(333)) + err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, ValidVaultKey, sdkmath.NewInt(333)) suite.Require().NoError(err) // post check // - total of key must be changed. // - lock of the user must be created. - power, err := suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidKey) + power, err := suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(sdkmath.NewInt(333), power) - key, err := suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err := suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, IsActive: true, - RewardPerPowers: nil, + RewardsPerPower: nil, TotalPower: sdk.NewInt(333), Remainders: nil, - }, key) + }, vault) - lock, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + lock, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress1.String(), - Key: ValidKey, - Amount: sdk.NewInt(333), + Key: ValidVaultKey, + Power: sdk.NewInt(333), PosRewardDebts: nil, NegRewardDebts: nil, }, lock) @@ -267,7 +252,7 @@ func (suite *KeeperTestSuite) TestScenarios() { // -------------------------- // rewards in 1 aaaa, 1000 bbbb // -------------------------- - err = suite.restakeKeeper.AddRewards(ctx, RewarderAddress, ValidKey, sdk.NewCoins( + err = suite.restakeKeeper.AddRewards(ctx, RewarderAddress, ValidVaultKey, sdk.NewCoins( sdk.NewCoin("aaaa", sdkmath.NewInt(1)), sdk.NewCoin("bbbb", sdkmath.NewInt(1000)), )) @@ -276,13 +261,13 @@ func (suite *KeeperTestSuite) TestScenarios() { // post check // - reward per powers must be changed. // - remainders must be calculated. - key, err = suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err = suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("0.003003003003003003")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("3.003003003003003003")), ), @@ -291,29 +276,29 @@ func (suite *KeeperTestSuite) TestScenarios() { sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 18)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 18)), ), - }, key) + }, vault) // -------------------------- // address1 locks on key1 100 powers (override) // -------------------------- - err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, ValidKey, sdkmath.NewInt(100)) + err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, ValidVaultKey, sdkmath.NewInt(100)) suite.Require().NoError(err) // post check // - locked power must be changed. // - total power of key must be changed. // - neg reward debts must be changed. - power, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidKey) + power, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(sdkmath.NewInt(100), power) - key, err = suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err = suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("0.003003003003003003")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("3.003003003003003003")), ), @@ -322,14 +307,14 @@ func (suite *KeeperTestSuite) TestScenarios() { sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 18)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 18)), ), - }, key) + }, vault) - lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress1.String(), - Key: ValidKey, - Amount: sdk.NewInt(100), + Key: ValidVaultKey, + Power: sdk.NewInt(100), PosRewardDebts: nil, NegRewardDebts: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("0.699699699699699699")), @@ -340,24 +325,24 @@ func (suite *KeeperTestSuite) TestScenarios() { // -------------------------- // address1 locks on key1 2000 powers (override) // -------------------------- - err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, ValidKey, sdkmath.NewInt(2000)) + err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, ValidVaultKey, sdkmath.NewInt(2000)) suite.Require().NoError(err) // post check // - locked power must be changed. // - total power of key must be changed. // - pos reward debts must be changed. - power, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidKey) + power, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(sdkmath.NewInt(2000), power) - key, err = suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err = suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("0.003003003003003003")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("3.003003003003003003")), ), @@ -366,14 +351,14 @@ func (suite *KeeperTestSuite) TestScenarios() { sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 18)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 18)), ), - }, key) + }, vault) - lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress1.String(), - Key: ValidKey, - Amount: sdk.NewInt(2000), + Key: ValidVaultKey, + Power: sdk.NewInt(2000), PosRewardDebts: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("5.705705705705705700")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("5705.705705705705705700")), @@ -390,22 +375,22 @@ func (suite *KeeperTestSuite) TestScenarios() { // rewards needs to be transfer from pool address to user suite.bankKeeper.EXPECT(). - SendCoins(gomock.Any(), sdk.MustAccAddressFromBech32(ValidKeyPoolAddress), ValidAddress1, sdk.NewCoins( + SendCoins(gomock.Any(), sdk.MustAccAddressFromBech32(ValidVaultAddress), ValidAddress1, sdk.NewCoins( sdk.NewCoin("bbbb", sdkmath.NewInt(999)), )). Times(1) - _, err = suite.msgServer.ClaimRewards(ctx, types.NewMsgClaimRewards(ValidAddress1, ValidKey)) + _, err = suite.msgServer.ClaimRewards(ctx, types.NewMsgClaimRewards(ValidAddress1, ValidVaultKey)) suite.Require().NoError(err) // post check // - reward debts need to be updated. - lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress1.String(), - Key: ValidKey, - Amount: sdk.NewInt(2000), + Key: ValidVaultKey, + Power: sdk.NewInt(2000), PosRewardDebts: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("6.006006006006006000")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("6006.006006006006006000")), @@ -419,18 +404,18 @@ func (suite *KeeperTestSuite) TestScenarios() { // -------------------------- // deactivate keys // -------------------------- - err = suite.restakeKeeper.DeactivateKey(ctx, ValidKey) + err = suite.restakeKeeper.DeactivateVault(ctx, ValidVaultKey) suite.Require().NoError(err) // post check // - status of key must be inactive - key, err = suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err = suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, - IsActive: false, - RewardPerPowers: sdk.NewDecCoins( + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, + IsActive: false, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("0.003003003003003003")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("3.003003003003003003")), ), @@ -439,27 +424,27 @@ func (suite *KeeperTestSuite) TestScenarios() { sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 18)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 18)), ), - }, key) + }, vault) // -------------------------- - // claim rewards after key is inactive + // claim rewards after vault is inactive // -------------------------- - _, err = suite.msgServer.ClaimRewards(ctx, types.NewMsgClaimRewards(ValidAddress1, ValidKey)) + _, err = suite.msgServer.ClaimRewards(ctx, types.NewMsgClaimRewards(ValidAddress1, ValidVaultKey)) suite.Require().NoError(err) // post check // - lock must be deleted // - remainders must be 1 - _, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + _, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().Error(err) - key, err = suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err = suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, - IsActive: false, - RewardPerPowers: sdk.NewDecCoins( + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, + IsActive: false, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("0.003003003003003003")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("3.003003003003003003")), ), @@ -468,20 +453,20 @@ func (suite *KeeperTestSuite) TestScenarios() { sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 0)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 0)), ), - }, key) + }, vault) }, }, { name: "2 accounts", - check: func() { + check: func(ctx sdk.Context) { // pre check - _, err := suite.restakeKeeper.GetKey(ctx, ValidKey) + _, err := suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().Error(err) - _, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + _, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().Error(err) - _, err = suite.restakeKeeper.GetLock(ctx, ValidAddress2, ValidKey) + _, err = suite.restakeKeeper.GetLock(ctx, ValidAddress2, ValidVaultKey) suite.Require().Error(err) // -------------------------- @@ -493,7 +478,7 @@ func (suite *KeeperTestSuite) TestScenarios() { err = suite.restakeKeeper.SetLockedPower( ctx, ValidAddress1, - ValidKey, + ValidVaultKey, val18, ) suite.Require().NoError(err) @@ -501,27 +486,27 @@ func (suite *KeeperTestSuite) TestScenarios() { // post check // - total of key must be changed. // - lock of the user1 must be created. - power, err := suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidKey) + power, err := suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(val18, power) - key, err := suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err := suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: "cosmos1jyea6nm7dhrfr8j4v2ethyfv4vvv2rcaz6a0sptfun7797g59vjsm53vhf", + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, IsActive: true, - RewardPerPowers: nil, + RewardsPerPower: nil, TotalPower: val18, Remainders: nil, - }, key) + }, vault) - lock, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + lock, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress1.String(), - Key: ValidKey, - Amount: val18, + Key: ValidVaultKey, + Power: val18, PosRewardDebts: nil, NegRewardDebts: nil, }, lock) @@ -535,7 +520,7 @@ func (suite *KeeperTestSuite) TestScenarios() { err = suite.restakeKeeper.SetLockedPower( ctx, ValidAddress2, - ValidKey, + ValidVaultKey, sdk.NewInt(1), ) suite.Require().NoError(err) @@ -543,27 +528,27 @@ func (suite *KeeperTestSuite) TestScenarios() { // post check // - total of key must be changed. // - lock of the user1 must be created. - power, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress2, ValidKey) + power, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress2, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(sdk.NewInt(1), power) - key, err = suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err = suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, IsActive: true, - RewardPerPowers: nil, + RewardsPerPower: nil, TotalPower: val18Plus1, Remainders: nil, - }, key) + }, vault) - lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress2, ValidKey) + lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress2, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress2.String(), - Key: ValidKey, - Amount: sdk.NewInt(1), + Key: ValidVaultKey, + Power: sdk.NewInt(1), PosRewardDebts: nil, NegRewardDebts: nil, }, lock) @@ -571,7 +556,7 @@ func (suite *KeeperTestSuite) TestScenarios() { // -------------------------- // rewards in 1 aaaa, 1e18 bbbb // -------------------------- - err = suite.restakeKeeper.AddRewards(ctx, RewarderAddress, ValidKey, sdk.NewCoins( + err = suite.restakeKeeper.AddRewards(ctx, RewarderAddress, ValidVaultKey, sdk.NewCoins( sdk.NewCoin("aaaa", sdkmath.NewInt(1)), sdk.NewCoin("bbbb", val18), )) @@ -580,13 +565,13 @@ func (suite *KeeperTestSuite) TestScenarios() { // post check // - reward per powers must be changed. // - remainders must have "aaaa" as too much power for 1aaaa - key, err = suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err = suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("0.999999999999999999")), ), TotalPower: val18Plus1, @@ -594,29 +579,29 @@ func (suite *KeeperTestSuite) TestScenarios() { sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("1")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("0.000000000000000001")), ), - }, key) + }, vault) // -------------------------- // address1 locks on key1 0 powers (override, remove all locked power) // -------------------------- - err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, ValidKey, sdkmath.NewInt(0)) + err = suite.restakeKeeper.SetLockedPower(ctx, ValidAddress1, ValidVaultKey, sdkmath.NewInt(0)) suite.Require().NoError(err) // post check // - total power of key must be changed. // - locked power must be changed. // - neg reward debts must be changed. - power, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidKey) + power, err = suite.restakeKeeper.GetLockedPower(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(sdkmath.NewInt(0), power) - key, err = suite.restakeKeeper.GetKey(ctx, ValidKey) + vault, err = suite.restakeKeeper.GetVault(ctx, ValidVaultKey) suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: ValidKey, - PoolAddress: ValidKeyPoolAddress, - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + suite.Require().Equal(types.Vault{ + Key: ValidVaultKey, + VaultAddress: ValidVaultAddress, + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("0.999999999999999999")), ), TotalPower: sdk.NewInt(1), @@ -624,14 +609,14 @@ func (suite *KeeperTestSuite) TestScenarios() { sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyMustNewDecFromStr("1")), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("0.000000000000000001")), ), - }, key) + }, vault) - lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress1.String(), - Key: ValidKey, - Amount: sdk.NewInt(0), + Key: ValidVaultKey, + Power: sdk.NewInt(0), PosRewardDebts: nil, NegRewardDebts: sdk.NewDecCoins( sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyMustNewDecFromStr("999999999999999999")), @@ -644,22 +629,22 @@ func (suite *KeeperTestSuite) TestScenarios() { // rewards needs to be transfer from pool address to address1 suite.bankKeeper.EXPECT(). - SendCoins(gomock.Any(), sdk.MustAccAddressFromBech32(ValidKeyPoolAddress), ValidAddress1, sdk.NewCoins( + SendCoins(gomock.Any(), sdk.MustAccAddressFromBech32(ValidVaultAddress), ValidAddress1, sdk.NewCoins( sdk.NewCoin("bbbb", sdk.NewInt(999999999999999999)), )). Times(1) - _, err = suite.msgServer.ClaimRewards(ctx, types.NewMsgClaimRewards(ValidAddress1, ValidKey)) + _, err = suite.msgServer.ClaimRewards(ctx, types.NewMsgClaimRewards(ValidAddress1, ValidVaultKey)) suite.Require().NoError(err) // post check // - reward debts need to be updated. - lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidKey) + lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress1, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress1.String(), - Key: ValidKey, - Amount: sdk.NewInt(0), + Key: ValidVaultKey, + Power: sdk.NewInt(0), PosRewardDebts: nil, NegRewardDebts: nil, }, lock) @@ -667,17 +652,17 @@ func (suite *KeeperTestSuite) TestScenarios() { // -------------------------- // address2 claim rewards // -------------------------- - _, err = suite.msgServer.ClaimRewards(ctx, types.NewMsgClaimRewards(ValidAddress2, ValidKey)) + _, err = suite.msgServer.ClaimRewards(ctx, types.NewMsgClaimRewards(ValidAddress2, ValidVaultKey)) suite.Require().NoError(err) // post check // - nothing change as reward isn't enough - lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress2, ValidKey) + lock, err = suite.restakeKeeper.GetLock(ctx, ValidAddress2, ValidVaultKey) suite.Require().NoError(err) suite.Require().Equal(types.Lock{ StakerAddress: ValidAddress2.String(), - Key: ValidKey, - Amount: sdk.NewInt(1), + Key: ValidVaultKey, + Power: sdk.NewInt(1), PosRewardDebts: nil, NegRewardDebts: nil, }, lock) @@ -687,9 +672,23 @@ func (suite *KeeperTestSuite) TestScenarios() { for _, tc := range testCases { suite.Run(tc.name, func() { - suite.resetState() - ctx = suite.ctx - tc.check() + suite.SetupTest() + + // setup delegator bond + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress1). + Return(sdkmath.NewInt(1e18)). + AnyTimes() + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress2). + Return(sdkmath.NewInt(1e18)). + AnyTimes() + suite.stakingKeeper.EXPECT(). + GetDelegatorBonded(gomock.Any(), ValidAddress3). + Return(sdkmath.NewInt(10)). + AnyTimes() + + tc.check(suite.ctx) }) } } diff --git a/x/restake/keeper/keeper_vault.go b/x/restake/keeper/keeper_vault.go new file mode 100644 index 000000000..e04be6b32 --- /dev/null +++ b/x/restake/keeper/keeper_vault.go @@ -0,0 +1,201 @@ +package keeper + +import ( + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + "github.com/bandprotocol/chain/v2/x/restake/types" +) + +// GetOrCreateVault get the vault object by using key. If the vault doesn't exist, it will initialize the new vault. +func (k Keeper) GetOrCreateVault(ctx sdk.Context, key string) (types.Vault, error) { + vault, err := k.GetVault(ctx, key) + if err != nil { + vaultAccAddr, err := k.createVaultAccount(ctx, key) + if err != nil { + return types.Vault{}, err + } + + vault = types.NewVault( + key, + vaultAccAddr.String(), + true, + sdk.NewDecCoins(), + sdkmath.NewInt(0), + sdk.NewDecCoins(), + ) + + k.SetVault(ctx, vault) + } + + return vault, nil +} + +// AddRewards adds rewards to the pool address and re-calculate `RewardsPerPower` and `remainders` of the vault +func (k Keeper) AddRewards(ctx sdk.Context, sender sdk.AccAddress, key string, rewards sdk.Coins) error { + vault, err := k.GetVault(ctx, key) + if err != nil { + return err + } + + if !vault.IsActive { + return types.ErrVaultNotActive + } + + if vault.TotalPower.IsZero() { + return types.ErrTotalPowerZero + } + + err = k.bankKeeper.SendCoins(ctx, sender, sdk.MustAccAddressFromBech32(vault.VaultAddress), rewards) + if err != nil { + return err + } + + decRewards := sdk.NewDecCoinsFromCoins(rewards.Sort()...) + totalPower := sdkmath.LegacyNewDecFromInt(vault.TotalPower) + RewardsPerPower := decRewards.QuoDecTruncate(totalPower) + truncatedRewards := decRewards.Sub(RewardsPerPower.MulDecTruncate(totalPower)) + + // add truncate part to remainder + // e.g. rewards = 1, totalPower = 3 -> rewardsPerPower = 0.333333333333333 + // remainder = 1 - (0.333333333333333 * 3) + vault.Remainders = vault.Remainders.Add(truncatedRewards...) + vault.RewardsPerPower = vault.RewardsPerPower.Add(RewardsPerPower...) + k.SetVault(ctx, vault) + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeAddRewards, + sdk.NewAttribute(types.AttributeKeyKey, key), + sdk.NewAttribute(types.AttributeKeyRewards, rewards.String()), + ), + ) + + return nil +} + +// IsActiveVault checks whether the vault is active or not. +func (k Keeper) IsActiveVault(ctx sdk.Context, key string) bool { + vault, err := k.GetVault(ctx, key) + if err != nil { + return false + } + + return vault.IsActive +} + +// DeactivateVault deactivates the vault. +func (k Keeper) DeactivateVault(ctx sdk.Context, key string) error { + vault, err := k.GetVault(ctx, key) + if err != nil { + return err + } + + if !vault.IsActive { + return types.ErrVaultAlreadyDeactivated + } + + vault.IsActive = false + k.SetVault(ctx, vault) + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeDeactivateVault, + sdk.NewAttribute(types.AttributeKeyKey, key), + ), + ) + + return nil +} + +// createVaultAccount creates a vault account by using name and block hash. +func (k Keeper) createVaultAccount(ctx sdk.Context, key string) (sdk.AccAddress, error) { + header := ctx.BlockHeader() + + buf := []byte(key) + buf = append(buf, header.AppHash...) + buf = append(buf, header.DataHash...) + + moduleCred, err := authtypes.NewModuleCredential(types.ModuleName, []byte(types.VaultAccountsKey), buf) + if err != nil { + return nil, err + } + + vaultAccAddr := sdk.AccAddress(moduleCred.Address()) + + // This should not happen + if acc := k.authKeeper.GetAccount(ctx, vaultAccAddr); acc != nil { + return nil, types.ErrAccountAlreadyExist.Wrapf( + "existing account for newly generated vault account address %s", + vaultAccAddr.String(), + ) + } + + vaultAcc, err := authtypes.NewBaseAccountWithPubKey(moduleCred) + if err != nil { + return nil, err + } + + k.authKeeper.NewAccount(ctx, vaultAcc) + k.authKeeper.SetAccount(ctx, vaultAcc) + + return vaultAccAddr, nil +} + +// ------------------------------- +// store part +// ------------------------------- + +// GetVaultsIterator gets iterator of vault store. +func (k Keeper) GetVaultsIterator(ctx sdk.Context) sdk.Iterator { + return sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.VaultStoreKeyPrefix) +} + +// GetVaults gets all vaults in the store. +func (k Keeper) GetVaults(ctx sdk.Context) (vaults []types.Vault) { + iterator := k.GetVaultsIterator(ctx) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var vault types.Vault + k.cdc.MustUnmarshal(iterator.Value(), &vault) + vaults = append(vaults, vault) + } + + return vaults +} + +// HasVault checks if vault exists in the store. +func (k Keeper) HasVault(ctx sdk.Context, vaultName string) bool { + return ctx.KVStore(k.storeKey).Has(types.VaultStoreKey(vaultName)) +} + +// MustGetVault gets a vault from store by name. +// Panics if can't get the vault. +func (k Keeper) MustGetVault(ctx sdk.Context, key string) types.Vault { + vault, err := k.GetVault(ctx, key) + if err != nil { + panic(err) + } + + return vault +} + +// GetVault gets a vault from store by key. +func (k Keeper) GetVault(ctx sdk.Context, key string) (types.Vault, error) { + bz := ctx.KVStore(k.storeKey).Get(types.VaultStoreKey(key)) + if bz == nil { + return types.Vault{}, types.ErrVaultNotFound.Wrapf("failed to get vault with name: %s", key) + } + + var vault types.Vault + k.cdc.MustUnmarshal(bz, &vault) + + return vault, nil +} + +// SetVault sets a vault to the store. +func (k Keeper) SetVault(ctx sdk.Context, vault types.Vault) { + ctx.KVStore(k.storeKey).Set(types.VaultStoreKey(vault.Key), k.cdc.MustMarshal(&vault)) +} diff --git a/x/restake/keeper/keeper_key_test.go b/x/restake/keeper/keeper_vault_test.go similarity index 51% rename from x/restake/keeper/keeper_key_test.go rename to x/restake/keeper/keeper_vault_test.go index 2475d0d58..29f1c7abd 100644 --- a/x/restake/keeper/keeper_key_test.go +++ b/x/restake/keeper/keeper_vault_test.go @@ -9,48 +9,48 @@ import ( "github.com/bandprotocol/chain/v2/x/restake/types" ) -func (suite *KeeperTestSuite) TestGetOrCreateKey() { +func (suite *KeeperTestSuite) TestGetOrCreateVault() { ctx := suite.ctx suite.setupState() - // already existed keys - for _, expKey := range suite.validKeys { - key, err := suite.restakeKeeper.GetOrCreateKey(ctx, expKey.Name) + // already existed vaults + for _, expVault := range suite.validVaults { + vault, err := suite.restakeKeeper.GetOrCreateVault(ctx, expVault.Key) suite.Require().NoError(err) - suite.Require().Equal(expKey, key) + suite.Require().Equal(expVault, vault) } - // new key - key, err := suite.restakeKeeper.GetOrCreateKey(ctx, "newKey") + // new vault + vault, err := suite.restakeKeeper.GetOrCreateVault(ctx, "newVault") suite.Require().NoError(err) - suite.Require().Equal(types.Key{ - Name: "newKey", - PoolAddress: "cosmos1x9lj2q3l80xfljcuuw89grm6jw96txayk9z8m0q4g658xe789dxszl8a6s", + suite.Require().Equal(types.Vault{ + Key: "newVault", + VaultAddress: "cosmos19p78qeezm3l7pycx3mjrs5dq0p5znwddndsrkvgt7ewq3qg7vf6q3rr6gl", IsActive: true, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(0), Remainders: sdk.NewDecCoins(), - }, key) + }, vault) } func (suite *KeeperTestSuite) TestAddRewards() { ctx := suite.ctx suite.setupState() - // error case - no key + // error case - no vault err := suite.restakeKeeper.AddRewards( ctx, RewarderAddress, - InvalidKey, + InvalidVaultKey, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), ) suite.Require().Error(err) - // error case - key is deactivated + // error case - vault is deactivated err = suite.restakeKeeper.AddRewards( ctx, RewarderAddress, - InactiveKey, + InactiveVaultKey, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), ) suite.Require().Error(err) @@ -59,30 +59,30 @@ func (suite *KeeperTestSuite) TestAddRewards() { err = suite.restakeKeeper.AddRewards( ctx, RewarderAddress, - KeyWithoutLocks, + VaultKeyWithoutLocks, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), ) suite.Require().Error(err) // success cases var ( - key types.Key + vault types.Vault rewards sdk.Coins ) testCases := []struct { name string malleate func() - expKey types.Key + expVault types.Vault }{ { "success case - 1 coin", func() { - key = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), + vault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), IsActive: true, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(100), Remainders: sdk.NewDecCoins(), } @@ -90,11 +90,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { sdk.NewCoin("aaaa", sdkmath.NewInt(1)), ) }, - types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 2)), ), TotalPower: sdkmath.NewInt(100), @@ -104,11 +104,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { { "success case - 2 coin same amount", func() { - key = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), + vault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), IsActive: true, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(100), Remainders: sdk.NewDecCoins(), } @@ -117,11 +117,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { sdk.NewCoin("bbbb", sdkmath.NewInt(1)), ) }, - types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 2)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 2)), ), @@ -132,11 +132,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { { "success case - 2 coin diff amount", func() { - key = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), + vault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), IsActive: true, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(100), Remainders: sdk.NewDecCoins(), } @@ -145,11 +145,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { sdk.NewCoin("bbbb", sdkmath.NewInt(1)), ) }, - types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(5, 2)), sdk.NewDecCoinFromDec("bbbb", sdkmath.LegacyNewDecWithPrec(1, 2)), ), @@ -160,11 +160,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { { "success case - small reward, big total power", func() { - key = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), + vault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), IsActive: true, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(1e18), Remainders: sdk.NewDecCoins(), } @@ -172,11 +172,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { sdk.NewCoin("aaaa", sdkmath.NewInt(1)), ) }, - types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdkmath.LegacyNewDecWithPrec(1, 18)), ), TotalPower: sdkmath.NewInt(1e18), @@ -186,11 +186,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { { "success case - big reward, small total power", func() { - key = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), + vault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), IsActive: true, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(1), Remainders: sdk.NewDecCoins(), } @@ -198,11 +198,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { sdk.NewCoin("aaaa", sdkmath.NewInt(1e18)), ) }, - types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoin("aaaa", sdkmath.NewInt(1e18)), ), TotalPower: sdkmath.NewInt(1), @@ -212,11 +212,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { { "success case - have remainder", func() { - key = types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), + vault = types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), IsActive: true, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(3), Remainders: sdk.NewDecCoins(), } @@ -224,11 +224,11 @@ func (suite *KeeperTestSuite) TestAddRewards() { sdk.NewCoin("aaaa", sdkmath.NewInt(1)), ) }, - types.Key{ - Name: KeyWithRewards, - PoolAddress: KeyWithRewardsPoolAddress.String(), - IsActive: true, - RewardPerPowers: sdk.NewDecCoins( + types.Vault{ + Key: VaultKeyWithRewards, + VaultAddress: VaultWithRewardsAddress.String(), + IsActive: true, + RewardsPerPower: sdk.NewDecCoins( sdk.NewDecCoinFromDec("aaaa", sdk.MustNewDecFromStr("0.333333333333333333")), ), TotalPower: sdkmath.NewInt(3), @@ -241,96 +241,96 @@ func (suite *KeeperTestSuite) TestAddRewards() { for _, testCase := range testCases { suite.Run(fmt.Sprintf("Case %s", testCase.name), func() { - suite.resetState() + suite.SetupTest() ctx = suite.ctx testCase.malleate() - suite.restakeKeeper.SetKey(ctx, key) + suite.restakeKeeper.SetVault(ctx, vault) err = suite.restakeKeeper.AddRewards( ctx, RewarderAddress, - key.Name, + vault.Key, rewards, ) suite.Require().NoError(err) - key, err := suite.restakeKeeper.GetKey(ctx, key.Name) + vault, err := suite.restakeKeeper.GetVault(ctx, vault.Key) suite.Require().NoError(err) - suite.Require().Equal(testCase.expKey, key) + suite.Require().Equal(testCase.expVault, vault) }) } } -func (suite *KeeperTestSuite) TestIsActiveKey() { +func (suite *KeeperTestSuite) TestIsActiveVault() { ctx := suite.ctx suite.setupState() - // case - valid key - for _, expKey := range suite.validKeys { - isActive := suite.restakeKeeper.IsActiveKey(ctx, expKey.Name) - suite.Require().Equal(expKey.IsActive, isActive) + // case - valid vault + for _, expVault := range suite.validVaults { + isActive := suite.restakeKeeper.IsActiveVault(ctx, expVault.Key) + suite.Require().Equal(expVault.IsActive, isActive) } - // case - no key - isActive := suite.restakeKeeper.IsActiveKey(ctx, InvalidKey) + // case - no vault + isActive := suite.restakeKeeper.IsActiveVault(ctx, InvalidVaultKey) suite.Require().Equal(false, isActive) } -func (suite *KeeperTestSuite) TestDeactivateKey() { +func (suite *KeeperTestSuite) TestDeactivateVault() { ctx := suite.ctx suite.setupState() - // error case - no key - err := suite.restakeKeeper.DeactivateKey(ctx, InvalidKey) + // error case - no vault + err := suite.restakeKeeper.DeactivateVault(ctx, InvalidVaultKey) suite.Require().Error(err) - // error case - key is deactivated - err = suite.restakeKeeper.DeactivateKey(ctx, InactiveKey) + // error case - vault is deactivated + err = suite.restakeKeeper.DeactivateVault(ctx, InactiveVaultKey) suite.Require().Error(err) // success case - err = suite.restakeKeeper.DeactivateKey(ctx, KeyWithRewards) + err = suite.restakeKeeper.DeactivateVault(ctx, VaultKeyWithRewards) suite.Require().NoError(err) - key, err := suite.restakeKeeper.GetKey(ctx, KeyWithRewards) + vault, err := suite.restakeKeeper.GetVault(ctx, VaultKeyWithRewards) suite.Require().NoError(err) - suite.Require().Equal(false, key.IsActive) + suite.Require().Equal(false, vault.IsActive) } -func (suite *KeeperTestSuite) TestGetSetKey() { +func (suite *KeeperTestSuite) TestGetSetVault() { ctx := suite.ctx // set - expectedKeys := suite.validKeys - for _, expKey := range expectedKeys { - suite.restakeKeeper.SetKey(ctx, expKey) + expectedVaults := suite.validVaults + for _, expVault := range expectedVaults { + suite.restakeKeeper.SetVault(ctx, expVault) // has - has := suite.restakeKeeper.HasKey(ctx, expKey.Name) + has := suite.restakeKeeper.HasVault(ctx, expVault.Key) suite.Require().True(has) // get - key, err := suite.restakeKeeper.GetKey(ctx, expKey.Name) + vault, err := suite.restakeKeeper.GetVault(ctx, expVault.Key) suite.Require().NoError(err) - suite.Require().Equal(expKey, key) + suite.Require().Equal(expVault, vault) // must get - key = suite.restakeKeeper.MustGetKey(ctx, expKey.Name) - suite.Require().Equal(expKey, key) + vault = suite.restakeKeeper.MustGetVault(ctx, expVault.Key) + suite.Require().Equal(expVault, vault) } // has - has := suite.restakeKeeper.HasKey(ctx, "nonKey") + has := suite.restakeKeeper.HasVault(ctx, "nonVault") suite.Require().False(has) // get - keys := suite.restakeKeeper.GetKeys(ctx) - suite.Require().Equal(expectedKeys, keys) + vaults := suite.restakeKeeper.GetVaults(ctx) + suite.Require().Equal(expectedVaults, vaults) - _, err := suite.restakeKeeper.GetKey(ctx, "nonKey") + _, err := suite.restakeKeeper.GetVault(ctx, "nonVault") suite.Require().Error(err) // must get suite.Require().Panics(func() { - _ = suite.restakeKeeper.MustGetKey(ctx, "nonKey") + _ = suite.restakeKeeper.MustGetVault(ctx, "nonVault") }) } diff --git a/x/restake/keeper/msg_server.go b/x/restake/keeper/msg_server.go index 1f3a29e55..aae4670e4 100644 --- a/x/restake/keeper/msg_server.go +++ b/x/restake/keeper/msg_server.go @@ -32,7 +32,7 @@ func (k msgServer) ClaimRewards( return nil, err } - key, err := k.GetKey(ctx, msg.Key) + vault, err := k.GetVault(ctx, msg.Key) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func (k msgServer) ClaimRewards( lock.NegRewardDebts = remainders k.SetLock(ctx, lock) - err = k.bankKeeper.SendCoins(ctx, sdk.MustAccAddressFromBech32(key.PoolAddress), addr, finalRewards) + err = k.bankKeeper.SendCoins(ctx, sdk.MustAccAddressFromBech32(vault.VaultAddress), addr, finalRewards) if err != nil { return nil, err } @@ -60,16 +60,16 @@ func (k msgServer) ClaimRewards( types.EventTypeClaimRewards, sdk.NewAttribute(types.AttributeKeyStaker, msg.StakerAddress), sdk.NewAttribute(types.AttributeKeyKey, lock.Key), - sdk.NewAttribute(sdk.AttributeKeyAmount, finalRewards.String()), + sdk.NewAttribute(types.AttributeKeyRewards, finalRewards.String()), ), ) } - if !key.IsActive { - k.DeleteLock(ctx, addr, key.Name) + if !vault.IsActive { + k.DeleteLock(ctx, addr, vault.Key) - key.Remainders = key.Remainders.Add(remainders...) - k.SetKey(ctx, key) + vault.Remainders = vault.Remainders.Add(remainders...) + k.SetVault(ctx, vault) } return &types.MsgClaimRewardsResponse{}, nil diff --git a/x/restake/keeper/msg_server_test.go b/x/restake/keeper/msg_server_test.go index 7fc375c66..fea6a7ac7 100644 --- a/x/restake/keeper/msg_server_test.go +++ b/x/restake/keeper/msg_server_test.go @@ -21,13 +21,13 @@ func (suite *KeeperTestSuite) TestMsgClaimRewards() { postCheck func() }{ { - name: "no key", + name: "no vault", input: &types.MsgClaimRewards{ StakerAddress: ValidAddress1.String(), - Key: InvalidKey, + Key: InvalidVaultKey, }, expErr: true, - expErrMsg: "key not found", + expErrMsg: "vault not found", preCheck: func() {}, postCheck: func() {}, }, @@ -35,7 +35,7 @@ func (suite *KeeperTestSuite) TestMsgClaimRewards() { name: "no lock", input: &types.MsgClaimRewards{ StakerAddress: ValidAddress2.String(), - Key: KeyWithoutRewards, + Key: VaultKeyWithoutRewards, }, expErr: true, expErrMsg: "lock not found", @@ -43,38 +43,38 @@ func (suite *KeeperTestSuite) TestMsgClaimRewards() { postCheck: func() {}, }, { - name: "success - active key", + name: "success - active vault", input: &types.MsgClaimRewards{ StakerAddress: ValidAddress1.String(), - Key: KeyWithRewards, + Key: VaultKeyWithRewards, }, expErr: false, expErrMsg: "", preCheck: func() { suite.bankKeeper.EXPECT(). - SendCoins(gomock.Any(), KeyWithRewardsPoolAddress, ValidAddress1, sdk.NewCoins( + SendCoins(gomock.Any(), VaultWithRewardsAddress, ValidAddress1, sdk.NewCoins( sdk.NewCoin("uband", sdk.NewInt(1)), )). Times(1) }, postCheck: func() { - lock, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, KeyWithRewards) + lock, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, VaultKeyWithRewards) suite.Require().NoError(err) suite.Require().Equal(sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1))), lock.PosRewardDebts) suite.Require().Equal(sdk.DecCoins(nil), lock.NegRewardDebts) }, }, { - name: "success - inactive key", + name: "success - inactive vault", input: &types.MsgClaimRewards{ StakerAddress: ValidAddress1.String(), - Key: InactiveKey, + Key: InactiveVaultKey, }, expErr: false, expErrMsg: "", preCheck: func() {}, postCheck: func() { - _, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, InactiveKey) + _, err := suite.restakeKeeper.GetLock(ctx, ValidAddress1, InactiveVaultKey) suite.Require().Error(err) }, }, diff --git a/x/restake/types/constructor.go b/x/restake/types/constructor.go new file mode 100644 index 000000000..b28d69d7f --- /dev/null +++ b/x/restake/types/constructor.go @@ -0,0 +1,50 @@ +package types + +import ( + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func NewVault( + key string, + vaultAddr string, + isActive bool, + rewardsPerPower sdk.DecCoins, + totalPower sdkmath.Int, + remainders sdk.DecCoins, +) Vault { + return Vault{ + Key: key, + VaultAddress: vaultAddr, + IsActive: isActive, + RewardsPerPower: rewardsPerPower, + TotalPower: totalPower, + Remainders: remainders, + } +} + +func NewLock( + stakerAddr string, + key string, + power sdkmath.Int, + posRewardDebts sdk.DecCoins, + negRewardDebts sdk.DecCoins, +) Lock { + return Lock{ + StakerAddress: stakerAddr, + Key: key, + Power: power, + PosRewardDebts: posRewardDebts, + NegRewardDebts: negRewardDebts, + } +} + +func NewReward( + key string, + rewards sdk.DecCoins, +) Reward { + return Reward{ + Key: key, + Rewards: rewards, + } +} diff --git a/x/restake/types/errors.go b/x/restake/types/errors.go index 9b1e91791..396197be0 100644 --- a/x/restake/types/errors.go +++ b/x/restake/types/errors.go @@ -6,14 +6,14 @@ import ( // x/restake module sentinel errors var ( - ErrUnableToUndelegate = errorsmod.Register(ModuleName, 2, "unable to undelegate") - ErrKeyNotFound = errorsmod.Register(ModuleName, 3, "key not found") - ErrKeyNotActive = errorsmod.Register(ModuleName, 4, "key not active") - ErrKeyAlreadyDeactivated = errorsmod.Register(ModuleName, 5, "key already deactivated") - ErrLockNotFound = errorsmod.Register(ModuleName, 6, "lock not found") - ErrDelegationNotEnough = errorsmod.Register(ModuleName, 7, "delegation not enough") - ErrInvalidAmount = errorsmod.Register(ModuleName, 8, "invalid amount") - ErrTotalPowerZero = errorsmod.Register(ModuleName, 9, "total power is zero") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") - ErrInvalidLength = errorsmod.Register(ModuleName, 11, "invalid length") + ErrUnableToUndelegate = errorsmod.Register(ModuleName, 2, "unable to undelegate") + ErrVaultNotFound = errorsmod.Register(ModuleName, 3, "vault not found") + ErrVaultNotActive = errorsmod.Register(ModuleName, 4, "vault not active") + ErrVaultAlreadyDeactivated = errorsmod.Register(ModuleName, 5, "vault already deactivated") + ErrLockNotFound = errorsmod.Register(ModuleName, 6, "lock not found") + ErrDelegationNotEnough = errorsmod.Register(ModuleName, 7, "delegation not enough") + ErrInvalidPower = errorsmod.Register(ModuleName, 8, "invalid power") + ErrTotalPowerZero = errorsmod.Register(ModuleName, 9, "total power is zero") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") + ErrInvalidLength = errorsmod.Register(ModuleName, 11, "invalid length") ) diff --git a/x/restake/types/events.go b/x/restake/types/events.go index 654013b30..528b1f17c 100644 --- a/x/restake/types/events.go +++ b/x/restake/types/events.go @@ -2,12 +2,14 @@ package types // restake module event types const ( - EventTypeClaimRewards = "claim_rewards" - EventTypeUnlockPower = "unlock_power" - EventTypeLockPower = "lock_power" - EventTypeAddRewards = "add_rewards" - EventTypeDeactivateKey = "deactivate_key" + EventTypeClaimRewards = "claim_rewards" + EventTypeUnlockPower = "unlock_power" + EventTypeLockPower = "lock_power" + EventTypeAddRewards = "add_rewards" + EventTypeDeactivateVault = "deactivate_vault" - AttributeKeyStaker = "staker" - AttributeKeyKey = "key" + AttributeKeyStaker = "staker" + AttributeKeyKey = "key" + AttributeKeyRewards = "rewards" + AttributeKeyPower = "power" ) diff --git a/x/restake/types/expected_keepers.go b/x/restake/types/expected_keepers.go index abd23a3c2..db565cebf 100644 --- a/x/restake/types/expected_keepers.go +++ b/x/restake/types/expected_keepers.go @@ -7,7 +7,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// AccountKeeper defines the expected account keeper (noalias) +// AccountKeeper defines the expected account keeper type AccountKeeper interface { NewAccount(ctx sdk.Context, acc authtypes.AccountI) authtypes.AccountI GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI diff --git a/x/restake/types/genesis.go b/x/restake/types/genesis.go index 440d99519..4fcf1883e 100644 --- a/x/restake/types/genesis.go +++ b/x/restake/types/genesis.go @@ -1,55 +1,55 @@ package types import ( - fmt "fmt" + "fmt" sdkmath "cosmossdk.io/math" ) // NewGenesisState creates a new GenesisState instanc e -func NewGenesisState(keys []Key, locks []Lock) *GenesisState { +func NewGenesisState(vaults []Vault, locks []Lock) *GenesisState { return &GenesisState{ - Keys: keys, - Locks: locks, + Vaults: vaults, + Locks: locks, } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return &GenesisState{ - Keys: []Key{}, - Locks: []Lock{}, - } + return NewGenesisState( + []Vault{}, + []Lock{}, + ) } // Validate performs basic validation of genesis data returning an // error for any failed validation criteria. func (gs GenesisState) Validate() error { - seenKeys := make(map[string]bool) + seenVaults := make(map[string]bool) totalPowers := make(map[string]sdkmath.Int) for _, lock := range gs.Locks { - _, ok := totalPowers[lock.Key] + total, ok := totalPowers[lock.Key] if !ok { - totalPowers[lock.Key] = sdkmath.NewInt(0) + total = sdkmath.NewInt(0) } - totalPowers[lock.Key] = totalPowers[lock.Key].Add(lock.Amount) + totalPowers[lock.Key] = total.Add(lock.Power) } - for _, key := range gs.Keys { - if seenKeys[key.Name] { - return fmt.Errorf("duplicate key for name %s", key.Name) + for _, vault := range gs.Vaults { + if seenVaults[vault.Key] { + return fmt.Errorf("duplicate vault for name %s", vault.Key) } - seenKeys[key.Name] = true + seenVaults[vault.Key] = true - // if key is active, total power must be equal. - if key.IsActive && !key.TotalPower.Equal(totalPowers[key.Name]) { + // if vault is active, total power must be equal. + if vault.IsActive && !vault.TotalPower.Equal(totalPowers[vault.Key]) { return fmt.Errorf( "genesis total_power is incorrect, expected %v, got %v", - key.TotalPower, - totalPowers[key.Name], + vault.TotalPower, + totalPowers[vault.Key], ) } } diff --git a/x/restake/types/genesis.pb.go b/x/restake/types/genesis.pb.go index e27159ce5..3bdc11a49 100644 --- a/x/restake/types/genesis.pb.go +++ b/x/restake/types/genesis.pb.go @@ -25,8 +25,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState represents the initial state of the blockchain. type GenesisState struct { - // keys is a list of keys in the module. - Keys []Key `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys"` + // vaults is a list of vaults in the module. + Vaults []Vault `protobuf:"bytes,1,rep,name=vaults,proto3" json:"vaults"` // locks is a list of locks in the module. Locks []Lock `protobuf:"bytes,2,rep,name=locks,proto3" json:"locks"` } @@ -64,9 +64,9 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetKeys() []Key { +func (m *GenesisState) GetVaults() []Vault { if m != nil { - return m.Keys + return m.Vaults } return nil } @@ -85,22 +85,22 @@ func init() { func init() { proto.RegisterFile("restake/v1beta1/genesis.proto", fileDescriptor_aa4e43bd57768571) } var fileDescriptor_aa4e43bd57768571 = []byte{ - // 225 bytes of a gzipped FileDescriptorProto + // 227 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x4a, 0x2d, 0x2e, 0x49, 0xcc, 0x4e, 0xd5, 0x2f, 0x33, 0x4c,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, 0xd8, - 0xc0, 0x4a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x37, 0xda, 0x1e, 0x96, 0x2a, 0x01, 0x00, - 0x00, + 0x29, 0x25, 0x95, 0x05, 0xa9, 0x50, 0x33, 0x94, 0xca, 0xb9, 0x78, 0xdc, 0x21, 0x86, 0x06, 0x97, + 0x24, 0x96, 0xa4, 0x0a, 0x99, 0x70, 0xb1, 0x95, 0x25, 0x96, 0xe6, 0x94, 0x14, 0x4b, 0x30, 0x2a, + 0x30, 0x6b, 0x70, 0x1b, 0x89, 0xe9, 0xa1, 0x59, 0xa2, 0x17, 0x06, 0x92, 0x76, 0x62, 0x39, 0x71, + 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0x56, 0xc8, 0x90, 0x8b, 0x35, 0x27, 0x3f, 0x39, 0xbb, 0x58, 0x82, + 0x09, 0xac, 0x49, 0x14, 0x43, 0x93, 0x4f, 0x7e, 0x72, 0x36, 0x54, 0x0f, 0x44, 0xa5, 0x93, 0xd7, + 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, + 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa4, 0x67, 0x96, 0x64, 0x94, + 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x27, 0x25, 0xe6, 0xa5, 0x80, 0x1d, 0x9a, 0x9c, 0x9f, 0xa3, + 0x9f, 0x9c, 0x91, 0x98, 0x99, 0xa7, 0x5f, 0x66, 0xa4, 0x5f, 0xa1, 0x0f, 0xf3, 0x12, 0xd8, 0x2b, + 0x49, 0x6c, 0x60, 0x25, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x9a, 0x19, 0xd4, 0x30, + 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -137,10 +137,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Vaults) > 0 { + for iNdEx := len(m.Vaults) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Keys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Vaults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -171,8 +171,8 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - if len(m.Keys) > 0 { - for _, e := range m.Keys { + if len(m.Vaults) > 0 { + for _, e := range m.Vaults { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } @@ -223,7 +223,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vaults", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -250,8 +250,8 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Keys = append(m.Keys, Key{}) - if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Vaults = append(m.Vaults, Vault{}) + if err := m.Vaults[len(m.Vaults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/restake/types/genesis_test.go b/x/restake/types/genesis_test.go index 7b2d33a6a..77ed4c008 100644 --- a/x/restake/types/genesis_test.go +++ b/x/restake/types/genesis_test.go @@ -17,20 +17,20 @@ func TestGenesisStateValidate(t *testing.T) { { "valid genesisState - empty", GenesisState{ - Keys: []Key{}, - Locks: []Lock{}, + Vaults: []Vault{}, + Locks: []Lock{}, }, false, }, { "valid genesisState - normal", GenesisState{ - Keys: []Key{ + Vaults: []Vault{ { - Name: "key", - PoolAddress: "pool_address", + Key: "key", + VaultAddress: "vault_address", IsActive: true, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(10), Remainders: sdk.NewDecCoins(), }, @@ -39,14 +39,14 @@ func TestGenesisStateValidate(t *testing.T) { { StakerAddress: "address1", Key: "key", - Amount: sdkmath.NewInt(4), + Power: sdkmath.NewInt(4), PosRewardDebts: sdk.NewDecCoins(), NegRewardDebts: sdk.NewDecCoins(), }, { StakerAddress: "address2", Key: "key", - Amount: sdkmath.NewInt(6), + Power: sdkmath.NewInt(6), PosRewardDebts: sdk.NewDecCoins(), NegRewardDebts: sdk.NewDecCoins(), }, @@ -55,14 +55,14 @@ func TestGenesisStateValidate(t *testing.T) { false, }, { - "valid genesisState - diff total power on inactive key", + "valid genesisState - diff total power on inactive vault", GenesisState{ - Keys: []Key{ + Vaults: []Vault{ { - Name: "key", - PoolAddress: "pool_address", + Key: "key", + VaultAddress: "vault_address", IsActive: false, - RewardPerPowers: sdk.NewDecCoins(), + RewardsPerPower: sdk.NewDecCoins(), TotalPower: sdkmath.NewInt(20), Remainders: sdk.NewDecCoins(), }, @@ -71,14 +71,14 @@ func TestGenesisStateValidate(t *testing.T) { { StakerAddress: "address1", Key: "key", - Amount: sdkmath.NewInt(4), + Power: sdkmath.NewInt(4), PosRewardDebts: sdk.NewDecCoins(), NegRewardDebts: sdk.NewDecCoins(), }, { StakerAddress: "address2", Key: "key", - Amount: sdkmath.NewInt(6), + Power: sdkmath.NewInt(6), PosRewardDebts: sdk.NewDecCoins(), NegRewardDebts: sdk.NewDecCoins(), }, @@ -87,14 +87,14 @@ func TestGenesisStateValidate(t *testing.T) { false, }, { - "invalid genesisState - duplicate key name", + "invalid genesisState - duplicate vault name", GenesisState{ - Keys: []Key{ + Vaults: []Vault{ { - Name: "test", + Key: "test", }, { - Name: "test", + Key: "test", }, }, Locks: []Lock{}, @@ -102,23 +102,23 @@ func TestGenesisStateValidate(t *testing.T) { true, }, { - "invalid genesisState - diff total power on active key", + "invalid genesisState - diff total power on active vault", GenesisState{ - Keys: []Key{ + Vaults: []Vault{ { - Name: "test", + Key: "test", TotalPower: sdkmath.NewInt(5), IsActive: true, }, }, Locks: []Lock{ { - Key: "test", - Amount: sdkmath.NewInt(4), + Key: "test", + Power: sdkmath.NewInt(4), }, { - Key: "test", - Amount: sdkmath.NewInt(6), + Key: "test", + Power: sdkmath.NewInt(6), }, }, }, diff --git a/x/restake/types/keys.go b/x/restake/types/keys.go index 0c7ea9711..820af0e91 100644 --- a/x/restake/types/keys.go +++ b/x/restake/types/keys.go @@ -3,8 +3,10 @@ package types import ( "encoding/binary" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" + "github.com/cosmos/cosmos-sdk/types/kv" ) const ( @@ -20,22 +22,20 @@ const ( // QuerierRoute is the querier route for the restake module QuerierRoute = ModuleName - // KeyAccountKey is the key used when generating a module address for the key - KeyAccountsKey = "key-accounts" + // VaultAccountsKey is the key used when generating a module address for the vault + VaultAccountsKey = "vault-accounts" ) var ( - GlobalStoreKeyPrefix = []byte{0x00} + VaultStoreKeyPrefix = []byte{0x00} + LockStoreKeyPrefix = []byte{0x01} - KeyStoreKeyPrefix = []byte{0x01} - LockStoreKeyPrefix = []byte{0x02} - - LocksByAmountIndexKeyPrefix = []byte{0x10} + LocksByPowerIndexKeyPrefix = []byte{0x80} ) -// KeyStoreKey returns the key to retrieve a specific key from the store. -func KeyStoreKey(keyName string) []byte { - return append(KeyStoreKeyPrefix, []byte(keyName)...) +// VaultStoreKey returns the key to retrieve a specific vault from the store. +func VaultStoreKey(key string) []byte { + return append(VaultStoreKeyPrefix, []byte(key)...) } // LocksByAddressStoreKey returns the key to retrieve all locks of an address from the store. @@ -44,23 +44,38 @@ func LocksByAddressStoreKey(addr sdk.AccAddress) []byte { } // LockStoreKey returns the key to retrieve a lock of an address and the key from the store. -func LockStoreKey(addr sdk.AccAddress, keyName string) []byte { - return append(LocksByAddressStoreKey(addr), []byte(keyName)...) +func LockStoreKey(addr sdk.AccAddress, key string) []byte { + return append(LocksByAddressStoreKey(addr), []byte(key)...) } -// LocksByAmountIndexKey returns the key to retrieve all locks of an address ordering by locked amount from the store. -func LocksByAmountIndexKey(addr sdk.AccAddress) []byte { - return append(LocksByAmountIndexKeyPrefix, address.MustLengthPrefix(addr)...) +// LocksByPowerIndexKey returns the key to retrieve all locks of an address ordering by locked power from the store. +func LocksByPowerIndexKey(addr sdk.AccAddress) []byte { + return append(LocksByPowerIndexKeyPrefix, address.MustLengthPrefix(addr)...) } -// LockByAmountIndexKey returns the key to retrieve a lock by amount from the store. -func LockByAmountIndexKey(lock Lock) []byte { +// LockByPowerIndexKey returns the key to retrieve a lock by power from the store. +func LockByPowerIndexKey(lock Lock) []byte { address := sdk.MustAccAddressFromBech32(lock.StakerAddress) - amountBytes := make([]byte, 8) - binary.BigEndian.PutUint64(amountBytes, lock.Amount.Uint64()) + powerBytes := make([]byte, 8) + binary.BigEndian.PutUint64(powerBytes, lock.Power.Uint64()) - // key is of format prefix || addrLen || address || amountBytes || keyBytes - bz := append(LocksByAmountIndexKey(address), amountBytes...) + // the format of key is prefix || addrLen || address || powerBytes || keyBytes + bz := append(LocksByPowerIndexKey(address), powerBytes...) return append(bz, []byte(lock.Key)...) } + +// SplitLockByPowerIndexKey split the LockByPowerIndexKey and returns the address and power +func SplitLockByPowerIndexKey(key []byte) (addr sdk.AccAddress, power sdkmath.Int) { + // the format of key is prefix || addrLen || address || powerBytes || keyBytes + kv.AssertKeyAtLeastLength(key, 2) + addrLen := int(key[1]) + + kv.AssertKeyAtLeastLength(key, 2+addrLen) + addr = sdk.AccAddress(key[2 : 2+addrLen]) + + kv.AssertKeyAtLeastLength(key, 2+addrLen+8) + power = sdkmath.NewIntFromUint64(binary.BigEndian.Uint64(key[2+addrLen : 2+addrLen+8])) + + return +} diff --git a/x/restake/types/keys_test.go b/x/restake/types/keys_test.go index 6409f5acd..8ff69e609 100644 --- a/x/restake/types/keys_test.go +++ b/x/restake/types/keys_test.go @@ -9,11 +9,11 @@ import ( "github.com/stretchr/testify/require" ) -func TestKeyStoreKey(t *testing.T) { - keyName := "keyName" - expect, err := hex.DecodeString("01" + hex.EncodeToString([]byte(keyName))) +func TestVaultStoreKey(t *testing.T) { + key := "key" + expect, err := hex.DecodeString("00" + hex.EncodeToString([]byte(key))) require.NoError(t, err) - require.Equal(t, expect, KeyStoreKey(keyName)) + require.Equal(t, expect, VaultStoreKey(key)) } func TestLocksByAddressStoreKey(t *testing.T) { @@ -21,35 +21,35 @@ func TestLocksByAddressStoreKey(t *testing.T) { acc, err := sdk.AccAddressFromHexUnsafe(hexAddress) require.NoError(t, err) - expect, err := hex.DecodeString("02" + "14" + hexAddress) + expect, err := hex.DecodeString("01" + "14" + hexAddress) require.NoError(t, err) require.Equal(t, expect, LocksByAddressStoreKey(acc)) } func TestLockStoreKey(t *testing.T) { - keyName := "keyName" + key := "key" hexAddress := "b80f2a5df7d5710b15622d1a9f1e3830ded5bda8" acc, err := sdk.AccAddressFromHexUnsafe(hexAddress) require.NoError(t, err) - expect, err := hex.DecodeString("02" + "14" + hexAddress + hex.EncodeToString([]byte(keyName))) + expect, err := hex.DecodeString("01" + "14" + hexAddress + hex.EncodeToString([]byte(key))) require.NoError(t, err) - require.Equal(t, expect, LockStoreKey(acc, keyName)) + require.Equal(t, expect, LockStoreKey(acc, key)) } -func TestLocksByAmountIndexKey(t *testing.T) { +func TestLocksByPowerIndexKey(t *testing.T) { hexAddress := "b80f2a5df7d5710b15622d1a9f1e3830ded5bda8" acc, err := sdk.AccAddressFromHexUnsafe(hexAddress) require.NoError(t, err) - expect, err := hex.DecodeString("10" + "14" + hexAddress) + expect, err := hex.DecodeString("80" + "14" + hexAddress) require.NoError(t, err) - require.Equal(t, expect, LocksByAmountIndexKey(acc)) + require.Equal(t, expect, LocksByPowerIndexKey(acc)) } -func TestLockByAmountIndexKey(t *testing.T) { - keyName := "keyName" +func TestLockByPowerIndexKey(t *testing.T) { + key := "key" hexAddress := "b80f2a5df7d5710b15622d1a9f1e3830ded5bda8" acc, err := sdk.AccAddressFromHexUnsafe(hexAddress) @@ -57,15 +57,33 @@ func TestLockByAmountIndexKey(t *testing.T) { lock := Lock{ StakerAddress: acc.String(), - Key: keyName, - Amount: sdkmath.NewInt(100), + Key: key, + Power: sdkmath.NewInt(100), PosRewardDebts: sdk.NewDecCoins(), NegRewardDebts: sdk.NewDecCoins(), } expect, err := hex.DecodeString( - "10" + "14" + hexAddress + "0000000000000064" + hex.EncodeToString([]byte(keyName)), + "80" + "14" + hexAddress + "0000000000000064" + hex.EncodeToString([]byte(key)), ) require.NoError(t, err) - require.Equal(t, expect, LockByAmountIndexKey(lock)) + require.Equal(t, expect, LockByPowerIndexKey(lock)) +} + +func TestSplitLockByPowerIndexKey(t *testing.T) { + key := "key" + + hexAddress := "b80f2a5df7d5710b15622d1a9f1e3830ded5bda8" + expAddr, err := sdk.AccAddressFromHexUnsafe(hexAddress) + expPower := sdkmath.NewInt(100) + require.NoError(t, err) + + indexKey, err := hex.DecodeString( + "80" + "14" + hexAddress + "0000000000000064" + hex.EncodeToString([]byte(key)), + ) + require.NoError(t, err) + + addr, power := SplitLockByPowerIndexKey(indexKey) + require.Equal(t, expAddr, addr) + require.Equal(t, expPower, power) } diff --git a/x/restake/types/msgs_test.go b/x/restake/types/msgs_test.go index 7a1ebcb09..81ac93c34 100644 --- a/x/restake/types/msgs_test.go +++ b/x/restake/types/msgs_test.go @@ -9,10 +9,10 @@ import ( var ( ValidAddress = "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8" - ValidKey = "restake" + ValidVault = "restake" InvalidAddress = "" - InvalidKey = "" + InvalidVault = "" ) // ==================================== @@ -21,33 +21,33 @@ var ( func TestNewMsgClaimRewards(t *testing.T) { acc := sdk.MustAccAddressFromBech32(ValidAddress) - msg := NewMsgClaimRewards(acc, ValidKey) + msg := NewMsgClaimRewards(acc, ValidVault) require.Equal(t, ValidAddress, msg.StakerAddress) - require.Equal(t, ValidKey, msg.Key) + require.Equal(t, ValidVault, msg.Key) } func TestMsgClaimRewards_Route(t *testing.T) { acc := sdk.MustAccAddressFromBech32(ValidAddress) - msg := NewMsgClaimRewards(acc, ValidKey) + msg := NewMsgClaimRewards(acc, ValidVault) require.Equal(t, "/restake.v1beta1.MsgClaimRewards", msg.Route()) } func TestMsgClaimRewards_Type(t *testing.T) { acc := sdk.MustAccAddressFromBech32(ValidAddress) - msg := NewMsgClaimRewards(acc, ValidKey) + msg := NewMsgClaimRewards(acc, ValidVault) require.Equal(t, "/restake.v1beta1.MsgClaimRewards", msg.Type()) } func TestMsgClaimRewards_GetSignBytes(t *testing.T) { acc := sdk.MustAccAddressFromBech32(ValidAddress) - msg := NewMsgClaimRewards(acc, ValidKey) + msg := NewMsgClaimRewards(acc, ValidVault) expected := `{"type":"restake/MsgClaimRewards","value":{"key":"restake","staker_address":"cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8"}}` require.Equal(t, expected, string(msg.GetSignBytes())) } func TestMsgClaimRewards_GetSigners(t *testing.T) { acc := sdk.MustAccAddressFromBech32(ValidAddress) - msg := NewMsgClaimRewards(acc, ValidKey) + msg := NewMsgClaimRewards(acc, ValidVault) signers := msg.GetSigners() require.Equal(t, 1, len(signers)) @@ -58,17 +58,17 @@ func TestMsgClaimRewards_ValidateBasic(t *testing.T) { acc := sdk.MustAccAddressFromBech32(ValidAddress) // valid address - msg := NewMsgClaimRewards(acc, ValidKey) + msg := NewMsgClaimRewards(acc, ValidVault) err := msg.ValidateBasic() require.NoError(t, err) // invalid address - msg = NewMsgClaimRewards([]byte(InvalidAddress), ValidKey) + msg = NewMsgClaimRewards([]byte(InvalidAddress), ValidVault) err = msg.ValidateBasic() require.Error(t, err) - // invalid key - msg = NewMsgClaimRewards(acc, InvalidKey) + // invalid vault + msg = NewMsgClaimRewards(acc, InvalidVault) err = msg.ValidateBasic() require.Error(t, err) } diff --git a/x/restake/types/query.pb.go b/x/restake/types/query.pb.go index 921e7ab10..d5d1d9998 100644 --- a/x/restake/types/query.pb.go +++ b/x/restake/types/query.pb.go @@ -30,24 +30,24 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryKeysRequest represents the request type for the Query/Keys RPC method. -type QueryKeysRequest struct { +// QueryVaultsRequest represents the request type for the Query/Vaults RPC method. +type QueryVaultsRequest struct { // pagination defines optional pagination parameters. Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryKeysRequest) Reset() { *m = QueryKeysRequest{} } -func (m *QueryKeysRequest) String() string { return proto.CompactTextString(m) } -func (*QueryKeysRequest) ProtoMessage() {} -func (*QueryKeysRequest) Descriptor() ([]byte, []int) { +func (m *QueryVaultsRequest) Reset() { *m = QueryVaultsRequest{} } +func (m *QueryVaultsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryVaultsRequest) ProtoMessage() {} +func (*QueryVaultsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0a9e24db325d090c, []int{0} } -func (m *QueryKeysRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryVaultsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryVaultsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryKeysRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryVaultsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -57,45 +57,45 @@ func (m *QueryKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *QueryKeysRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryKeysRequest.Merge(m, src) +func (m *QueryVaultsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVaultsRequest.Merge(m, src) } -func (m *QueryKeysRequest) XXX_Size() int { +func (m *QueryVaultsRequest) XXX_Size() int { return m.Size() } -func (m *QueryKeysRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryKeysRequest.DiscardUnknown(m) +func (m *QueryVaultsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVaultsRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryKeysRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryVaultsRequest proto.InternalMessageInfo -func (m *QueryKeysRequest) GetPagination() *query.PageRequest { +func (m *QueryVaultsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryKeysResponse represents the response type for the Query/Keys RPC method. -type QueryKeysResponse struct { - // keys is a list of keys. - Keys []*Key `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` +// QueryVaultsResponse represents the response type for the Query/Vaults RPC method. +type QueryVaultsResponse struct { + // vaults is a list of vaults. + Vaults []*Vault `protobuf:"bytes,1,rep,name=vaults,proto3" json:"vaults,omitempty"` // pagination defines pagination parameters in the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryKeysResponse) Reset() { *m = QueryKeysResponse{} } -func (m *QueryKeysResponse) String() string { return proto.CompactTextString(m) } -func (*QueryKeysResponse) ProtoMessage() {} -func (*QueryKeysResponse) Descriptor() ([]byte, []int) { +func (m *QueryVaultsResponse) Reset() { *m = QueryVaultsResponse{} } +func (m *QueryVaultsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVaultsResponse) ProtoMessage() {} +func (*QueryVaultsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0a9e24db325d090c, []int{1} } -func (m *QueryKeysResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryVaultsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryVaultsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryKeysResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryVaultsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -105,50 +105,50 @@ func (m *QueryKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *QueryKeysResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryKeysResponse.Merge(m, src) +func (m *QueryVaultsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVaultsResponse.Merge(m, src) } -func (m *QueryKeysResponse) XXX_Size() int { +func (m *QueryVaultsResponse) XXX_Size() int { return m.Size() } -func (m *QueryKeysResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryKeysResponse.DiscardUnknown(m) +func (m *QueryVaultsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVaultsResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryKeysResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryVaultsResponse proto.InternalMessageInfo -func (m *QueryKeysResponse) GetKeys() []*Key { +func (m *QueryVaultsResponse) GetVaults() []*Vault { if m != nil { - return m.Keys + return m.Vaults } return nil } -func (m *QueryKeysResponse) GetPagination() *query.PageResponse { +func (m *QueryVaultsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } -// QueryKeyRequest represents the request type for the Query/Key RPC method. -type QueryKeyRequest struct { - // key is the name of the key that want to query. +// QueryVaultRequest represents the request type for the Query/Vault RPC method. +type QueryVaultRequest struct { + // key is the key of the vault that want to query. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *QueryKeyRequest) Reset() { *m = QueryKeyRequest{} } -func (m *QueryKeyRequest) String() string { return proto.CompactTextString(m) } -func (*QueryKeyRequest) ProtoMessage() {} -func (*QueryKeyRequest) Descriptor() ([]byte, []int) { +func (m *QueryVaultRequest) Reset() { *m = QueryVaultRequest{} } +func (m *QueryVaultRequest) String() string { return proto.CompactTextString(m) } +func (*QueryVaultRequest) ProtoMessage() {} +func (*QueryVaultRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0a9e24db325d090c, []int{2} } -func (m *QueryKeyRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryVaultRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryVaultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryKeyRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryVaultRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -158,43 +158,43 @@ func (m *QueryKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *QueryKeyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryKeyRequest.Merge(m, src) +func (m *QueryVaultRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVaultRequest.Merge(m, src) } -func (m *QueryKeyRequest) XXX_Size() int { +func (m *QueryVaultRequest) XXX_Size() int { return m.Size() } -func (m *QueryKeyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryKeyRequest.DiscardUnknown(m) +func (m *QueryVaultRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVaultRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryKeyRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryVaultRequest proto.InternalMessageInfo -func (m *QueryKeyRequest) GetKey() string { +func (m *QueryVaultRequest) GetKey() string { if m != nil { return m.Key } return "" } -// QueryKeyResponse represents the response type for the Query/Key RPC method. -type QueryKeyResponse struct { - // key is a key information. - Key Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key"` +// QueryVaultResponse represents the response type for the Query/Vault RPC method. +type QueryVaultResponse struct { + // vault is a vault information. + Vault Vault `protobuf:"bytes,1,opt,name=vault,proto3" json:"vault"` } -func (m *QueryKeyResponse) Reset() { *m = QueryKeyResponse{} } -func (m *QueryKeyResponse) String() string { return proto.CompactTextString(m) } -func (*QueryKeyResponse) ProtoMessage() {} -func (*QueryKeyResponse) Descriptor() ([]byte, []int) { +func (m *QueryVaultResponse) Reset() { *m = QueryVaultResponse{} } +func (m *QueryVaultResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVaultResponse) ProtoMessage() {} +func (*QueryVaultResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0a9e24db325d090c, []int{3} } -func (m *QueryKeyResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryVaultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryKeyResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryVaultResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -204,23 +204,23 @@ func (m *QueryKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *QueryKeyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryKeyResponse.Merge(m, src) +func (m *QueryVaultResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVaultResponse.Merge(m, src) } -func (m *QueryKeyResponse) XXX_Size() int { +func (m *QueryVaultResponse) XXX_Size() int { return m.Size() } -func (m *QueryKeyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryKeyResponse.DiscardUnknown(m) +func (m *QueryVaultResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVaultResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryKeyResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryVaultResponse proto.InternalMessageInfo -func (m *QueryKeyResponse) GetKey() Key { +func (m *QueryVaultResponse) GetVault() Vault { if m != nil { - return m.Key + return m.Vault } - return Key{} + return Vault{} } // QueryRewardsRequest represents the request type for the Query/Rewards RPC method. @@ -337,7 +337,7 @@ func (m *QueryRewardsResponse) GetPagination() *query.PageResponse { type QueryRewardRequest struct { // staker_address is the target address to query reward. StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - // key is the target key to query reward. + // key is the key of target vault to query reward. Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } @@ -390,7 +390,7 @@ func (m *QueryRewardRequest) GetKey() string { // QueryRewardResponse represents the response type for the Query/Reward RPC method. type QueryRewardResponse struct { - // reward is the reward for the staker and the key. + // reward is the reward for the staker of the vault. Reward Reward `protobuf:"bytes,1,opt,name=reward,proto3" json:"reward"` } @@ -548,7 +548,7 @@ func (m *QueryLocksResponse) GetPagination() *query.PageResponse { type QueryLockRequest struct { // staker_address is the target address to query lock. StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - // key is the target key to query reward. + // key is the key of target vault to query reward. Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } @@ -601,7 +601,7 @@ func (m *QueryLockRequest) GetKey() string { // QueryLockResponse represents the response type for the Query/Lock RPC method. type QueryLockResponse struct { - // lock is the lock of the staker and the key. + // lock is the lock of the staker and the vault. Lock LockResponse `protobuf:"bytes,1,opt,name=lock,proto3" json:"lock"` } @@ -646,10 +646,10 @@ func (m *QueryLockResponse) GetLock() LockResponse { } func init() { - proto.RegisterType((*QueryKeysRequest)(nil), "restake.v1beta1.QueryKeysRequest") - proto.RegisterType((*QueryKeysResponse)(nil), "restake.v1beta1.QueryKeysResponse") - proto.RegisterType((*QueryKeyRequest)(nil), "restake.v1beta1.QueryKeyRequest") - proto.RegisterType((*QueryKeyResponse)(nil), "restake.v1beta1.QueryKeyResponse") + proto.RegisterType((*QueryVaultsRequest)(nil), "restake.v1beta1.QueryVaultsRequest") + proto.RegisterType((*QueryVaultsResponse)(nil), "restake.v1beta1.QueryVaultsResponse") + proto.RegisterType((*QueryVaultRequest)(nil), "restake.v1beta1.QueryVaultRequest") + proto.RegisterType((*QueryVaultResponse)(nil), "restake.v1beta1.QueryVaultResponse") proto.RegisterType((*QueryRewardsRequest)(nil), "restake.v1beta1.QueryRewardsRequest") proto.RegisterType((*QueryRewardsResponse)(nil), "restake.v1beta1.QueryRewardsResponse") proto.RegisterType((*QueryRewardRequest)(nil), "restake.v1beta1.QueryRewardRequest") @@ -665,49 +665,49 @@ func init() { proto.RegisterFile("restake/v1beta1/query.proto", fileDescriptor_0 var fileDescriptor_0a9e24db325d090c = []byte{ // 702 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4f, 0x4f, 0x13, 0x4f, - 0x18, 0xee, 0x94, 0x52, 0xf2, 0x1b, 0xf2, 0x13, 0x18, 0x31, 0x90, 0x22, 0x15, 0xb6, 0xa0, 0xc4, - 0x98, 0x1d, 0x5b, 0x42, 0x1a, 0x0e, 0x46, 0xe5, 0xa0, 0x89, 0xc5, 0x44, 0x7b, 0xe4, 0x62, 0xa6, - 0xed, 0x64, 0x69, 0x5a, 0x76, 0xca, 0xce, 0x82, 0x6e, 0x08, 0x17, 0x62, 0x4c, 0x4c, 0x3c, 0xf8, - 0xef, 0x63, 0xf8, 0x41, 0x38, 0x92, 0x78, 0xf1, 0x64, 0x0c, 0xf8, 0x41, 0xcc, 0xce, 0xbc, 0xbb, - 0xdd, 0x6d, 0xe9, 0x62, 0x95, 0xc4, 0x5b, 0x33, 0xf3, 0xbc, 0xcf, 0xf3, 0xbc, 0xef, 0x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 0x1d, 0x51, 0xaa, 0xcf, 0x8b, 0x7a, 0x51, 0x41, 0x96, + 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x2e, 0x45, 0xb6, 0x0c, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -722,17 +722,17 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Keys returns a list of keys. - Keys(ctx context.Context, in *QueryKeysRequest, opts ...grpc.CallOption) (*QueryKeysResponse, error) - // Key returns a key information. - Key(ctx context.Context, in *QueryKeyRequest, opts ...grpc.CallOption) (*QueryKeyResponse, error) + // Vaults returns a list of vault. + Vaults(ctx context.Context, in *QueryVaultsRequest, opts ...grpc.CallOption) (*QueryVaultsResponse, error) + // Vault returns a vault information. + Vault(ctx context.Context, in *QueryVaultRequest, opts ...grpc.CallOption) (*QueryVaultResponse, error) // Rewards returns rewards for a specific address. Rewards(ctx context.Context, in *QueryRewardsRequest, opts ...grpc.CallOption) (*QueryRewardsResponse, error) - // Reward returns a reward for a specific address and a key. + // Reward returns a reward for a specific address and a vault. Reward(ctx context.Context, in *QueryRewardRequest, opts ...grpc.CallOption) (*QueryRewardResponse, error) // Locks returns all lock information for a specific address. Locks(ctx context.Context, in *QueryLocksRequest, opts ...grpc.CallOption) (*QueryLocksResponse, error) - // Lock returns a lock information for a specific address and a key. + // Lock returns a lock information for a specific address and a vault. Lock(ctx context.Context, in *QueryLockRequest, opts ...grpc.CallOption) (*QueryLockResponse, error) } @@ -744,18 +744,18 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) Keys(ctx context.Context, in *QueryKeysRequest, opts ...grpc.CallOption) (*QueryKeysResponse, error) { - out := new(QueryKeysResponse) - err := c.cc.Invoke(ctx, "/restake.v1beta1.Query/Keys", in, out, opts...) +func (c *queryClient) Vaults(ctx context.Context, in *QueryVaultsRequest, opts ...grpc.CallOption) (*QueryVaultsResponse, error) { + out := new(QueryVaultsResponse) + err := c.cc.Invoke(ctx, "/restake.v1beta1.Query/Vaults", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) Key(ctx context.Context, in *QueryKeyRequest, opts ...grpc.CallOption) (*QueryKeyResponse, error) { - out := new(QueryKeyResponse) - err := c.cc.Invoke(ctx, "/restake.v1beta1.Query/Key", in, out, opts...) +func (c *queryClient) Vault(ctx context.Context, in *QueryVaultRequest, opts ...grpc.CallOption) (*QueryVaultResponse, error) { + out := new(QueryVaultResponse) + err := c.cc.Invoke(ctx, "/restake.v1beta1.Query/Vault", in, out, opts...) if err != nil { return nil, err } @@ -800,17 +800,17 @@ func (c *queryClient) Lock(ctx context.Context, in *QueryLockRequest, opts ...gr // QueryServer is the server API for Query service. type QueryServer interface { - // Keys returns a list of keys. - Keys(context.Context, *QueryKeysRequest) (*QueryKeysResponse, error) - // Key returns a key information. - Key(context.Context, *QueryKeyRequest) (*QueryKeyResponse, error) + // Vaults returns a list of vault. + Vaults(context.Context, *QueryVaultsRequest) (*QueryVaultsResponse, error) + // Vault returns a vault information. + Vault(context.Context, *QueryVaultRequest) (*QueryVaultResponse, error) // Rewards returns rewards for a specific address. Rewards(context.Context, *QueryRewardsRequest) (*QueryRewardsResponse, error) - // Reward returns a reward for a specific address and a key. + // Reward returns a reward for a specific address and a vault. Reward(context.Context, *QueryRewardRequest) (*QueryRewardResponse, error) // Locks returns all lock information for a specific address. Locks(context.Context, *QueryLocksRequest) (*QueryLocksResponse, error) - // Lock returns a lock information for a specific address and a key. + // Lock returns a lock information for a specific address and a vault. Lock(context.Context, *QueryLockRequest) (*QueryLockResponse, error) } @@ -818,11 +818,11 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Keys(ctx context.Context, req *QueryKeysRequest) (*QueryKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Keys not implemented") +func (*UnimplementedQueryServer) Vaults(ctx context.Context, req *QueryVaultsRequest) (*QueryVaultsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vaults not implemented") } -func (*UnimplementedQueryServer) Key(ctx context.Context, req *QueryKeyRequest) (*QueryKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Key not implemented") +func (*UnimplementedQueryServer) Vault(ctx context.Context, req *QueryVaultRequest) (*QueryVaultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vault not implemented") } func (*UnimplementedQueryServer) Rewards(ctx context.Context, req *QueryRewardsRequest) (*QueryRewardsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Rewards not implemented") @@ -841,38 +841,38 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } -func _Query_Keys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryKeysRequest) +func _Query_Vaults_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVaultsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).Keys(ctx, in) + return srv.(QueryServer).Vaults(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/restake.v1beta1.Query/Keys", + FullMethod: "/restake.v1beta1.Query/Vaults", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Keys(ctx, req.(*QueryKeysRequest)) + return srv.(QueryServer).Vaults(ctx, req.(*QueryVaultsRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_Key_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryKeyRequest) +func _Query_Vault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVaultRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).Key(ctx, in) + return srv.(QueryServer).Vault(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/restake.v1beta1.Query/Key", + FullMethod: "/restake.v1beta1.Query/Vault", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Key(ctx, req.(*QueryKeyRequest)) + return srv.(QueryServer).Vault(ctx, req.(*QueryVaultRequest)) } return interceptor(ctx, in, info, handler) } @@ -954,12 +954,12 @@ var _Query_serviceDesc = grpc.ServiceDesc{ HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Keys", - Handler: _Query_Keys_Handler, + MethodName: "Vaults", + Handler: _Query_Vaults_Handler, }, { - MethodName: "Key", - Handler: _Query_Key_Handler, + MethodName: "Vault", + Handler: _Query_Vault_Handler, }, { MethodName: "Rewards", @@ -982,7 +982,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "restake/v1beta1/query.proto", } -func (m *QueryKeysRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryVaultsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -992,12 +992,12 @@ func (m *QueryKeysRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryKeysRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryVaultsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryVaultsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1017,7 +1017,7 @@ func (m *QueryKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryKeysResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryVaultsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1027,12 +1027,12 @@ func (m *QueryKeysResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryKeysResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryVaultsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryVaultsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1049,10 +1049,10 @@ func (m *QueryKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Keys) > 0 { - for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Vaults) > 0 { + for iNdEx := len(m.Vaults) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Keys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Vaults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1066,7 +1066,7 @@ func (m *QueryKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryKeyRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryVaultRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1076,12 +1076,12 @@ func (m *QueryKeyRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryKeyRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryVaultRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryVaultRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1096,7 +1096,7 @@ func (m *QueryKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryKeyResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryVaultResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1106,18 +1106,18 @@ func (m *QueryKeyResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryKeyResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryVaultResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.Key.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Vault.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1462,7 +1462,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryKeysRequest) Size() (n int) { +func (m *QueryVaultsRequest) Size() (n int) { if m == nil { return 0 } @@ -1475,14 +1475,14 @@ func (m *QueryKeysRequest) Size() (n int) { return n } -func (m *QueryKeysResponse) Size() (n int) { +func (m *QueryVaultsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Keys) > 0 { - for _, e := range m.Keys { + if len(m.Vaults) > 0 { + for _, e := range m.Vaults { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -1494,7 +1494,7 @@ func (m *QueryKeysResponse) Size() (n int) { return n } -func (m *QueryKeyRequest) Size() (n int) { +func (m *QueryVaultRequest) Size() (n int) { if m == nil { return 0 } @@ -1507,13 +1507,13 @@ func (m *QueryKeyRequest) Size() (n int) { return n } -func (m *QueryKeyResponse) Size() (n int) { +func (m *QueryVaultResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Key.Size() + l = m.Vault.Size() n += 1 + l + sovQuery(uint64(l)) return n } @@ -1652,7 +1652,7 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryKeysRequest) Unmarshal(dAtA []byte) error { +func (m *QueryVaultsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1675,10 +1675,10 @@ func (m *QueryKeysRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryKeysRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryVaultsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryVaultsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1738,7 +1738,7 @@ func (m *QueryKeysRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryKeysResponse) Unmarshal(dAtA []byte) error { +func (m *QueryVaultsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1761,15 +1761,15 @@ func (m *QueryKeysResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryKeysResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryVaultsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryVaultsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vaults", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1796,8 +1796,8 @@ func (m *QueryKeysResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Keys = append(m.Keys, &Key{}) - if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Vaults = append(m.Vaults, &Vault{}) + if err := m.Vaults[len(m.Vaults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1858,7 +1858,7 @@ func (m *QueryKeysResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryKeyRequest) Unmarshal(dAtA []byte) error { +func (m *QueryVaultRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1881,10 +1881,10 @@ func (m *QueryKeyRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryKeyRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryVaultRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryVaultRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1940,7 +1940,7 @@ func (m *QueryKeyRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryKeyResponse) Unmarshal(dAtA []byte) error { +func (m *QueryVaultResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1963,15 +1963,15 @@ func (m *QueryKeyResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryKeyResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryVaultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vault", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1998,7 +1998,7 @@ func (m *QueryKeyResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Vault.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/restake/types/query.pb.gw.go b/x/restake/types/query.pb.gw.go index 99d425f6e..7b4e20940 100644 --- a/x/restake/types/query.pb.gw.go +++ b/x/restake/types/query.pb.gw.go @@ -34,43 +34,43 @@ var _ = descriptor.ForMessage var _ = metadata.Join var ( - filter_Query_Keys_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_Vaults_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Query_Keys_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryKeysRequest +func request_Query_Vaults_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVaultsRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Keys_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Vaults_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Keys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Vaults(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_Keys_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryKeysRequest +func local_request_Query_Vaults_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVaultsRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Keys_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Vaults_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Keys(ctx, &protoReq) + msg, err := server.Vaults(ctx, &protoReq) return msg, metadata, err } -func request_Query_Key_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryKeyRequest +func request_Query_Vault_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVaultRequest var metadata runtime.ServerMetadata var ( @@ -91,13 +91,13 @@ func request_Query_Key_0(ctx context.Context, marshaler runtime.Marshaler, clien return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) } - msg, err := client.Key(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Vault(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_Key_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryKeyRequest +func local_request_Query_Vault_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVaultRequest var metadata runtime.ServerMetadata var ( @@ -118,7 +118,7 @@ func local_request_Query_Key_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) } - msg, err := server.Key(ctx, &protoReq) + msg, err := server.Vault(ctx, &protoReq) return msg, metadata, err } @@ -425,7 +425,7 @@ func local_request_Query_Lock_0(ctx context.Context, marshaler runtime.Marshaler // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_Keys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Vaults_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -436,7 +436,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Keys_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Vaults_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -444,11 +444,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Keys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Vaults_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Key_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Vault_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -459,7 +459,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Key_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Vault_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -467,7 +467,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Key_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Vault_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -604,7 +604,7 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_Keys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Vaults_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -613,18 +613,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Keys_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Vaults_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_Keys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Vaults_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Key_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Vault_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -633,14 +633,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Key_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Vault_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_Key_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Vault_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -728,9 +728,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Keys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"restake", "v1beta1", "keys"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Vaults_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"restake", "v1beta1", "vaults"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Key_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"restake", "v1beta1", "keys", "key"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Vault_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"restake", "v1beta1", "vaults", "key"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Rewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"restake", "v1beta1", "stakers", "staker_address", "rewards"}, "", runtime.AssumeColonVerbOpt(false))) @@ -742,9 +742,9 @@ var ( ) var ( - forward_Query_Keys_0 = runtime.ForwardResponseMessage + forward_Query_Vaults_0 = runtime.ForwardResponseMessage - forward_Query_Key_0 = runtime.ForwardResponseMessage + forward_Query_Vault_0 = runtime.ForwardResponseMessage forward_Query_Rewards_0 = runtime.ForwardResponseMessage diff --git a/x/restake/types/tx.pb.go b/x/restake/types/tx.pb.go index 09d130e0e..d3fcf688d 100644 --- a/x/restake/types/tx.pb.go +++ b/x/restake/types/tx.pb.go @@ -34,7 +34,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgClaimRewards struct { // staker_address is the address that will claim the rewards. StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - // key is the key that want to claim rewards from. + // key is the key of the vault that want to claim rewards from. Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } diff --git a/x/restake/types/types.pb.go b/x/restake/types/types.pb.go index 3dd5b4c8f..8d4f09d6d 100644 --- a/x/restake/types/types.pb.go +++ b/x/restake/types/types.pb.go @@ -27,36 +27,36 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Key is used for tracking the status and rewards of the keys. -type Key struct { - // name is the name of the key. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // pool_address is the address that holds rewards for this key. - PoolAddress string `protobuf:"bytes,2,opt,name=pool_address,json=poolAddress,proto3" json:"pool_address,omitempty"` - // is_active is the status of the key +// Vault is used for tracking the status and rewards of the vaults. +type Vault struct { + // key is the key of the vault. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // vault_address is the address that holds rewards for this vault. + VaultAddress string `protobuf:"bytes,2,opt,name=vault_address,json=vaultAddress,proto3" json:"vault_address,omitempty"` + // is_active is the status of the vault IsActive bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - // reward_per_powers is a list of reward_per_power. - // new_reward_per_power = current_reward_per_power + (rewards / total_power) - RewardPerPowers github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,4,rep,name=reward_per_powers,json=rewardPerPowers,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"reward_per_powers"` - // total_power is the total locked power of the key. + // rewards_per_power is rewards per power (DecCoins) + // new_rewards_per_power = current_rewards_per_power + (rewards / total_power) + RewardsPerPower github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,4,rep,name=rewards_per_power,json=rewardsPerPower,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards_per_power"` + // total_power is the total locked power of the vault. TotalPower github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=total_power,json=totalPower,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_power"` - // remainders is a list of the remainder amounts in the key. - // this field is used to track remainder amount from claimings in the key pool. + // remainders is the remainder amounts in the vault. + // this field is used to track remainder amount from claimings in the vault. Remainders github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,6,rep,name=remainders,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"remainders"` } -func (m *Key) Reset() { *m = Key{} } -func (m *Key) String() string { return proto.CompactTextString(m) } -func (*Key) ProtoMessage() {} -func (*Key) Descriptor() ([]byte, []int) { +func (m *Vault) Reset() { *m = Vault{} } +func (m *Vault) String() string { return proto.CompactTextString(m) } +func (*Vault) ProtoMessage() {} +func (*Vault) Descriptor() ([]byte, []int) { return fileDescriptor_be4ee20adc0c7118, []int{0} } -func (m *Key) XXX_Unmarshal(b []byte) error { +func (m *Vault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Vault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Key.Marshal(b, m, deterministic) + return xxx_messageInfo_Vault.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -66,65 +66,65 @@ func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Key) XXX_Merge(src proto.Message) { - xxx_messageInfo_Key.Merge(m, src) +func (m *Vault) XXX_Merge(src proto.Message) { + xxx_messageInfo_Vault.Merge(m, src) } -func (m *Key) XXX_Size() int { +func (m *Vault) XXX_Size() int { return m.Size() } -func (m *Key) XXX_DiscardUnknown() { - xxx_messageInfo_Key.DiscardUnknown(m) +func (m *Vault) XXX_DiscardUnknown() { + xxx_messageInfo_Vault.DiscardUnknown(m) } -var xxx_messageInfo_Key proto.InternalMessageInfo +var xxx_messageInfo_Vault proto.InternalMessageInfo -func (m *Key) GetName() string { +func (m *Vault) GetKey() string { if m != nil { - return m.Name + return m.Key } return "" } -func (m *Key) GetPoolAddress() string { +func (m *Vault) GetVaultAddress() string { if m != nil { - return m.PoolAddress + return m.VaultAddress } return "" } -func (m *Key) GetIsActive() bool { +func (m *Vault) GetIsActive() bool { if m != nil { return m.IsActive } return false } -func (m *Key) GetRewardPerPowers() github_com_cosmos_cosmos_sdk_types.DecCoins { +func (m *Vault) GetRewardsPerPower() github_com_cosmos_cosmos_sdk_types.DecCoins { if m != nil { - return m.RewardPerPowers + return m.RewardsPerPower } return nil } -func (m *Key) GetRemainders() github_com_cosmos_cosmos_sdk_types.DecCoins { +func (m *Vault) GetRemainders() github_com_cosmos_cosmos_sdk_types.DecCoins { if m != nil { return m.Remainders } return nil } -// Lock is used to store lock information of each user on each key along with their reward information. +// Lock is used to store lock information of each user on each vault along with their reward information. type Lock struct { // staker_address is the owner's address of the staker. StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - // key is the key that this lock is locked to. + // key is the key of the vault that this lock is locked to. Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // amount is the locked power amount. - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` - // pos_reward_debts is a list of reward debt for each reward (only the positive side). + // power is the number of locked power. + Power github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=power,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"power"` + // pos_reward_debts is the positive part of reward debts. // Note: Coin and DecCoin can't have negative amounts. so, we split it into two numbers. PosRewardDebts github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,4,rep,name=pos_reward_debts,json=posRewardDebts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"pos_reward_debts"` - // neg_reward_debts is a list of reward debt for each reward (only negative side). + // neg_reward_debts is the negative part of reward debts. NegRewardDebts github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,5,rep,name=neg_reward_debts,json=negRewardDebts,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"neg_reward_debts"` } @@ -189,11 +189,11 @@ func (m *Lock) GetNegRewardDebts() github_com_cosmos_cosmos_sdk_types.DecCoins { return nil } -// Reward is used as response of the query to show final rewards of the key for the user. +// Reward is used as response of the query to show final rewards of the vault for the user. type Reward struct { - // key is the key that this reward belongs to. + // key is the key of the vault that this reward belongs to. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // rewards is a list of reward. + // rewards is the total rewards Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` } @@ -244,13 +244,13 @@ func (m *Reward) GetRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { return nil } -// LockResponse is used as response of the query to show the power amount -// that is locked by the key for the user. +// LockResponse is used as response of the query to show the power +// that is locked by the vault for the user. type LockResponse struct { - // key is the key that this lock belongs to. + // key is the key of the vault that this lock belongs to. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // amount is a the number of locked power. - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` + // power is the number of locked power. + Power github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=power,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"power"` } func (m *LockResponse) Reset() { *m = LockResponse{} } @@ -294,7 +294,7 @@ func (m *LockResponse) GetKey() string { } func init() { - proto.RegisterType((*Key)(nil), "restake.v1beta1.Key") + proto.RegisterType((*Vault)(nil), "restake.v1beta1.Vault") proto.RegisterType((*Lock)(nil), "restake.v1beta1.Lock") proto.RegisterType((*Reward)(nil), "restake.v1beta1.Reward") proto.RegisterType((*LockResponse)(nil), "restake.v1beta1.LockResponse") @@ -303,53 +303,52 @@ func init() { func init() { proto.RegisterFile("restake/v1beta1/types.proto", fileDescriptor_be4ee20adc0c7118) } var fileDescriptor_be4ee20adc0c7118 = []byte{ - // 568 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x4d, 0x6b, 0x13, 0x41, - 0x18, 0xce, 0x74, 0xd3, 0xd8, 0x4e, 0x6b, 0x3f, 0x86, 0x1e, 0xd6, 0x56, 0x36, 0xa1, 0x07, 0x09, - 0x4a, 0xb2, 0xb6, 0x5e, 0x44, 0x05, 0x69, 0xec, 0xa5, 0xea, 0xa1, 0xac, 0x9e, 0x04, 0x59, 0x66, - 0x77, 0x87, 0xed, 0x92, 0xec, 0xcc, 0x32, 0x33, 0x4d, 0x0d, 0x78, 0x10, 0x7f, 0x81, 0xf8, 0x0b, - 0x3c, 0x8a, 0x27, 0x0f, 0xbd, 0xf9, 0x07, 0x7a, 0x2c, 0x05, 0x41, 0x3c, 0x54, 0x49, 0x0e, 0xfa, - 0x33, 0x64, 0x3e, 0xd6, 0x44, 0x10, 0x14, 0x34, 0x97, 0xdd, 0x99, 0x79, 0xde, 0x7d, 0x9e, 0xe7, - 0xfd, 0xd8, 0x81, 0x1b, 0x9c, 0x08, 0x89, 0xbb, 0xc4, 0xef, 0x6f, 0x45, 0x44, 0xe2, 0x2d, 0x5f, - 0x0e, 0x0a, 0x22, 0xda, 0x05, 0x67, 0x92, 0xa1, 0x65, 0x0b, 0xb6, 0x2d, 0xb8, 0xbe, 0x96, 0xb2, - 0x94, 0x69, 0xcc, 0x57, 0x2b, 0x13, 0xb6, 0xbe, 0x8a, 0xf3, 0x8c, 0x32, 0x5f, 0x3f, 0xed, 0xd1, - 0xa5, 0x98, 0x89, 0x9c, 0x89, 0xd0, 0xc4, 0x9a, 0x8d, 0x85, 0x3c, 0xb3, 0xf3, 0x23, 0x2c, 0xc6, - 0xaa, 0x31, 0xcb, 0xa8, 0xc1, 0x37, 0x3f, 0x3a, 0xd0, 0x79, 0x40, 0x06, 0x08, 0xc1, 0x2a, 0xc5, - 0x39, 0x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 0xf6, - 0x9f, 0xf9, 0xe5, 0xbd, 0xab, 0xb5, 0xa2, 0x9a, 0x0e, 0xb9, 0xf1, 0x23, 0x00, 0x00, 0xff, 0xff, - 0x0c, 0xa7, 0x96, 0xec, 0x8f, 0x05, 0x00, 0x00, + // 559 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x3f, 0x6f, 0x13, 0x31, + 0x1c, 0x8d, 0x73, 0x4d, 0x68, 0xdd, 0xff, 0xa7, 0x0e, 0x47, 0x8b, 0x2e, 0x51, 0x07, 0x14, 0x81, + 0x92, 0xa3, 0x65, 0x41, 0x08, 0x84, 0x1a, 0xba, 0x14, 0x31, 0x54, 0x87, 0xc4, 0x80, 0x84, 0x4e, + 0xbe, 0xbb, 0x9f, 0xae, 0x56, 0x12, 0xfb, 0x64, 0xbb, 0x29, 0x65, 0x42, 0x7c, 0x02, 0xc4, 0x27, + 0x60, 0x44, 0x4c, 0x0c, 0x5d, 0xf8, 0x06, 0x1d, 0xab, 0x2e, 0x20, 0x86, 0x82, 0x92, 0x01, 0x3e, + 0x06, 0x3a, 0xdb, 0x69, 0x83, 0x54, 0x09, 0x86, 0x66, 0x49, 0x6c, 0xbf, 0x5f, 0xde, 0x7b, 0xfe, + 0xfd, 0x5e, 0x8c, 0xd7, 0x04, 0x48, 0x45, 0x3a, 0x10, 0xf4, 0x37, 0x62, 0x50, 0x64, 0x23, 0x50, + 0x87, 0x39, 0xc8, 0x56, 0x2e, 0xb8, 0xe2, 0xee, 0xa2, 0x05, 0x5b, 0x16, 0x5c, 0x5d, 0xc9, 0x78, + 0xc6, 0x35, 0x16, 0x14, 0x2b, 0x53, 0xb6, 0xba, 0x4c, 0x7a, 0x94, 0xf1, 0x40, 0x7f, 0xda, 0xa3, + 0xeb, 0x09, 0x97, 0x3d, 0x2e, 0x23, 0x53, 0x6b, 0x36, 0x16, 0xf2, 0xcd, 0x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0x3c, 0x26, 0x2c, 0xd5, 0xcf, 0x5a, 0xc2, 0xbb, 0x41, + 0xb2, 0x47, 0x28, 0x0b, 0xfa, 0x9b, 0xc1, 0xab, 0x60, 0xf4, 0xea, 0x6a, 0xa9, 0xb8, 0xaa, 0x4b, + 0xee, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xda, 0xe2, 0x38, 0x8d, 0x05, 0x00, 0x00, } -func (this *Key) Equal(that interface{}) bool { +func (this *Vault) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Key) + that1, ok := that.(*Vault) if !ok { - that2, ok := that.(Key) + that2, ok := that.(Vault) if ok { that1 = &that2 } else { @@ -361,20 +360,20 @@ func (this *Key) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Name != that1.Name { + if this.Key != that1.Key { return false } - if this.PoolAddress != that1.PoolAddress { + if this.VaultAddress != that1.VaultAddress { return false } if this.IsActive != that1.IsActive { return false } - if len(this.RewardPerPowers) != len(that1.RewardPerPowers) { + if len(this.RewardsPerPower) != len(that1.RewardsPerPower) { return false } - for i := range this.RewardPerPowers { - if !this.RewardPerPowers[i].Equal(&that1.RewardPerPowers[i]) { + for i := range this.RewardsPerPower { + if !this.RewardsPerPower[i].Equal(&that1.RewardsPerPower[i]) { return false } } @@ -416,7 +415,7 @@ func (this *Lock) Equal(that interface{}) bool { if this.Key != that1.Key { return false } - if !this.Amount.Equal(that1.Amount) { + if !this.Power.Equal(that1.Power) { return false } if len(this.PosRewardDebts) != len(that1.PosRewardDebts) { @@ -491,12 +490,12 @@ func (this *LockResponse) Equal(that interface{}) bool { if this.Key != that1.Key { return false } - if !this.Amount.Equal(that1.Amount) { + if !this.Power.Equal(that1.Power) { return false } return true } -func (m *Key) Marshal() (dAtA []byte, err error) { +func (m *Vault) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -506,12 +505,12 @@ func (m *Key) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Key) MarshalTo(dAtA []byte) (int, error) { +func (m *Vault) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Key) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Vault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -540,10 +539,10 @@ func (m *Key) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x2a - if len(m.RewardPerPowers) > 0 { - for iNdEx := len(m.RewardPerPowers) - 1; iNdEx >= 0; iNdEx-- { + if len(m.RewardsPerPower) > 0 { + for iNdEx := len(m.RewardsPerPower) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.RewardPerPowers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.RewardsPerPower[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -564,17 +563,17 @@ func (m *Key) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if len(m.PoolAddress) > 0 { - i -= len(m.PoolAddress) - copy(dAtA[i:], m.PoolAddress) - i = encodeVarintTypes(dAtA, i, uint64(len(m.PoolAddress))) + if len(m.VaultAddress) > 0 { + i -= len(m.VaultAddress) + copy(dAtA[i:], m.VaultAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.VaultAddress))) i-- dAtA[i] = 0x12 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) i-- dAtA[i] = 0xa } @@ -630,9 +629,9 @@ func (m *Lock) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } { - size := m.Amount.Size() + size := m.Power.Size() i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.Power.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTypes(dAtA, i, uint64(size)) @@ -721,9 +720,9 @@ func (m *LockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l { - size := m.Amount.Size() + size := m.Power.Size() i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.Power.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTypes(dAtA, i, uint64(size)) @@ -751,25 +750,25 @@ func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Key) Size() (n int) { +func (m *Vault) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Name) + l = len(m.Key) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - l = len(m.PoolAddress) + l = len(m.VaultAddress) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if m.IsActive { n += 2 } - if len(m.RewardPerPowers) > 0 { - for _, e := range m.RewardPerPowers { + if len(m.RewardsPerPower) > 0 { + for _, e := range m.RewardsPerPower { l = e.Size() n += 1 + l + sovTypes(uint64(l)) } @@ -799,7 +798,7 @@ func (m *Lock) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - l = m.Amount.Size() + l = m.Power.Size() n += 1 + l + sovTypes(uint64(l)) if len(m.PosRewardDebts) > 0 { for _, e := range m.PosRewardDebts { @@ -845,7 +844,7 @@ func (m *LockResponse) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - l = m.Amount.Size() + l = m.Power.Size() n += 1 + l + sovTypes(uint64(l)) return n } @@ -856,7 +855,7 @@ func sovTypes(x uint64) (n int) { func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Key) Unmarshal(dAtA []byte) error { +func (m *Vault) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -879,15 +878,15 @@ func (m *Key) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Key: wiretype end group for non-group") + return fmt.Errorf("proto: Vault: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Key: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Vault: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -915,11 +914,11 @@ func (m *Key) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VaultAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -947,7 +946,7 @@ func (m *Key) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PoolAddress = string(dAtA[iNdEx:postIndex]) + m.VaultAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { @@ -971,7 +970,7 @@ func (m *Key) Unmarshal(dAtA []byte) error { m.IsActive = bool(v != 0) case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardPerPowers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RewardsPerPower", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -998,8 +997,8 @@ func (m *Key) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RewardPerPowers = append(m.RewardPerPowers, types.DecCoin{}) - if err := m.RewardPerPowers[len(m.RewardPerPowers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.RewardsPerPower = append(m.RewardsPerPower, types.DecCoin{}) + if err := m.RewardsPerPower[len(m.RewardsPerPower)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1187,7 +1186,7 @@ func (m *Lock) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1215,7 +1214,7 @@ func (m *Lock) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Power.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1487,7 +1486,7 @@ func (m *LockResponse) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1515,7 +1514,7 @@ func (m *LockResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Power.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From fb6bfdfdfc76893423d084a4891d4cebdac94760 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 10 Sep 2024 19:26:51 +0700 Subject: [PATCH 083/272] fix encoder --- proto/tunnel/v1beta1/tunnel.proto | 18 ++- proto/tunnel/v1beta1/tx.proto | 5 +- x/tunnel/client/cli/tx.go | 7 +- x/tunnel/keeper/msg_server.go | 4 +- x/tunnel/keeper/tunnel.go | 5 +- x/tunnel/types/events.go | 2 +- x/tunnel/types/msgs.go | 14 +-- x/tunnel/types/tunnel.go | 6 +- x/tunnel/types/tunnel.pb.go | 184 ++++++++++++++++++------------ x/tunnel/types/tx.pb.go | 138 +++++++++++----------- 10 files changed, 213 insertions(+), 170 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 42384fb82..1935b142f 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -52,8 +52,8 @@ message Tunnel { uint64 nonce_count = 2; // route is the route for delivering the signal prices google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; - // feed_type is the type of feed data - feeds.v1beta1.FeedType feed_type = 4; + // encoder is the mode of encoding price signal data. + Encoder encoder = 4; // fee_payer is the address of the fee payer string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // signal_infos is the list of signal infos @@ -130,3 +130,17 @@ message AxelarPacketContent { // destination_contract_address is the destination contract address string destination_contract_address = 3; } + +// Encoder is an enumerator that defines the mode of encoding message in tunnel module. +enum Encoder { + option (gogoproto.goproto_enum_prefix) = false; + + // ENCODER_UNSPECIFIED is an unspecified encoder mode. + ENCODER_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ENCODER_UNSPECIFIED"]; + + // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). + ENCODER_FIXED_POINT_ABI = 1 [(gogoproto.enumvalue_customname) = "ENCODER_FIXED_POINT_ABI"]; + + // ENCODER_TICK_ABI is a tick abi encoder. + ENCODER_TICK_ABI = 2 [(gogoproto.enumvalue_customname) = "ENCODER_TICK_ABI"]; +} diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 9c9e33bea..a64337aba 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -12,7 +12,6 @@ import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; import "tunnel/v1beta1/tunnel.proto"; -import "feeds/v1beta1/feeds.proto"; // Service definition for Msg. service Msg { @@ -46,8 +45,8 @@ message MsgCreateTunnel { uint64 interval = 2; // route is the route for delivering the signal prices google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; - // feed_type is the type of feed data. - feeds.v1beta1.FeedType feed_type = 4; + // encoder is the mode of encoding price signal data. + Encoder encoder = 4; // deposit is the deposit required to create a tunnel. repeated cosmos.base.v1beta1.Coin deposit = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 3f8ef6656..dd84bfcce 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -9,7 +9,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" - feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -33,7 +32,7 @@ func GetTxCmd() *cobra.Command { func GetTxCmdCreateTSSTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "create-tss-tunnel [feed-type] [destination-chain-id] [destination-contract-address] [deposit] [signalInfos-json-file]", + Use: "create-tss-tunnel [encoder] [destination-chain-id] [destination-contract-address] [deposit] [signalInfos-json-file]", Short: "Create a new TSS tunnel", Args: cobra.ExactArgs(5), RunE: func(cmd *cobra.Command, args []string) error { @@ -42,7 +41,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - feedType, err := strconv.ParseInt(args[0], 10, 32) + encoder, err := strconv.ParseInt(args[0], 10, 32) if err != nil { return err } @@ -65,7 +64,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { msg, err := types.NewMsgCreateTSSTunnel( signalInfos.ToSignalInfos(), interval, - feedstypes.FeedType(feedType), + types.Encoder(encoder), args[1], args[2], deposit, diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 366eef5bd..108fa1ff8 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -41,7 +41,7 @@ func (ms msgServer) CreateTunnel( } // Add a new tunnel - tunnel, err := ms.Keeper.AddTunnel(ctx, req.Route, req.FeedType, req.SignalInfos, req.Interval, req.Creator) + tunnel, err := ms.Keeper.AddTunnel(ctx, req.Route, req.Encoder, req.SignalInfos, req.Interval, req.Creator) if err != nil { return nil, err } @@ -52,7 +52,7 @@ func (ms msgServer) CreateTunnel( sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), sdk.NewAttribute(types.AttributeKeyRoute, tunnel.Route.String()), - sdk.NewAttribute(types.AttributeKeyFeedType, tunnel.FeedType.String()), + sdk.NewAttribute(types.AttributeKeyEncoder, tunnel.Encoder.String()), sdk.NewAttribute(types.AttributeKeyFeePayer, tunnel.FeePayer), sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), sdk.NewAttribute(types.AttributeKeyCreatedAt, fmt.Sprintf("%d", tunnel.CreatedAt)), diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index c38e62dd9..c1e93ae1b 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -6,7 +6,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -14,7 +13,7 @@ import ( func (k Keeper) AddTunnel( ctx sdk.Context, route *codectypes.Any, - feedType feedstypes.FeedType, + encoder types.Encoder, signalInfos []types.SignalInfo, interval uint64, creator string, @@ -40,7 +39,7 @@ func (k Keeper) AddTunnel( newID, 0, route, - feedType, + encoder, acc.String(), signalInfos, interval, diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index e74abc18b..bee59d4ef 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -17,7 +17,7 @@ const ( AttributeKeySignalID = "signal_id" AttributeKeyInterval = "interval" AttributeKeyRoute = "route" - AttributeKeyFeedType = "feed_type" + AttributeKeyEncoder = "encoder" AttributeKeyFeePayer = "fee_payer" AttributeKeySignalPriceInfos = "signal_price_infos" AttributeKeyIsActive = "is_active" diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index ff0b44834..75011d39a 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -7,8 +7,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/gogoproto/proto" - - feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) var ( @@ -60,7 +58,7 @@ func NewMsgCreateTunnel( signalInfos []SignalInfo, interval uint64, route RouteI, - feedType feedstypes.FeedType, + encoder Encoder, deposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { @@ -77,7 +75,7 @@ func NewMsgCreateTunnel( SignalInfos: signalInfos, Interval: interval, Route: any, - FeedType: feedType, + Encoder: encoder, Deposit: deposit, Creator: creator.String(), }, nil @@ -87,7 +85,7 @@ func NewMsgCreateTunnel( func NewMsgCreateTSSTunnel( signalInfos []SignalInfo, interval uint64, - feedType feedstypes.FeedType, + encoder Encoder, destinationChainID string, destinationContractAddress string, deposit sdk.Coins, @@ -97,7 +95,7 @@ func NewMsgCreateTSSTunnel( DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } - m, err := NewMsgCreateTunnel(signalInfos, interval, r, feedType, deposit, creator) + m, err := NewMsgCreateTunnel(signalInfos, interval, r, encoder, deposit, creator) if err != nil { return nil, err } @@ -109,7 +107,7 @@ func NewMsgCreateTSSTunnel( func NewMsgCreateAxelarTunnel( signalInfos []SignalInfo, interval uint64, - feedType feedstypes.FeedType, + encoder Encoder, destinationChainID string, destinationContractAddress string, deposit sdk.Coins, @@ -119,7 +117,7 @@ func NewMsgCreateAxelarTunnel( DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } - m, err := NewMsgCreateTunnel(signalInfos, interval, r, feedType, deposit, creator) + m, err := NewMsgCreateTunnel(signalInfos, interval, r, encoder, deposit, creator) if err != nil { return nil, err } diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 867947a22..88b1ffe3a 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -5,8 +5,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/gogoproto/proto" - - feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" ) var _ types.UnpackInterfacesMessage = Tunnel{} @@ -16,7 +14,7 @@ func NewTunnel( id uint64, nonceCount uint64, route *types.Any, - feedType feedstypes.FeedType, + encoder Encoder, feePayer string, signalInfos []SignalInfo, interval uint64, @@ -28,7 +26,7 @@ func NewTunnel( ID: id, NonceCount: nonceCount, Route: route, - FeedType: feedType, + Encoder: encoder, FeePayer: feePayer, SignalInfos: signalInfos, Interval: interval, diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index d176ea0b3..318497e27 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" github_com_bandprotocol_chain_v2_x_bandtss_types "github.com/bandprotocol/chain/v2/x/bandtss/types" - types1 "github.com/bandprotocol/chain/v2/x/feeds/types" + _ "github.com/bandprotocol/chain/v2/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -27,6 +27,38 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Encoder is an enumerator that defines the mode of encoding message in tunnel module. +type Encoder int32 + +const ( + // ENCODER_UNSPECIFIED is an unspecified encoder mode. + ENCODER_UNSPECIFIED Encoder = 0 + // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). + ENCODER_FIXED_POINT_ABI Encoder = 1 + // ENCODER_TICK_ABI is a tick abi encoder. + ENCODER_TICK_ABI Encoder = 2 +) + +var Encoder_name = map[int32]string{ + 0: "ENCODER_UNSPECIFIED", + 1: "ENCODER_FIXED_POINT_ABI", + 2: "ENCODER_TICK_ABI", +} + +var Encoder_value = map[string]int32{ + "ENCODER_UNSPECIFIED": 0, + "ENCODER_FIXED_POINT_ABI": 1, + "ENCODER_TICK_ABI": 2, +} + +func (x Encoder) String() string { + return proto.EnumName(Encoder_name, int32(x)) +} + +func (Encoder) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b5270a56045f1d8a, []int{0} +} + // TSSRoute is the type for a TSS route type TSSRoute struct { // destination_chain_id is the destination chain ID @@ -209,8 +241,8 @@ type Tunnel struct { NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` // route is the route for delivering the signal prices Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` - // feed_type is the type of feed data - FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + // encoder is the mode of encoding price signal data. + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` // fee_payer is the address of the fee payer FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` // signal_infos is the list of signal infos @@ -279,11 +311,11 @@ func (m *Tunnel) GetRoute() *types.Any { return nil } -func (m *Tunnel) GetFeedType() types1.FeedType { +func (m *Tunnel) GetEncoder() Encoder { if m != nil { - return m.FeedType + return m.Encoder } - return types1.FEED_TYPE_UNSPECIFIED + return ENCODER_UNSPECIFIED } func (m *Tunnel) GetFeePayer() string { @@ -658,6 +690,7 @@ func (m *AxelarPacketContent) GetDestinationContractAddress() string { } func init() { + proto.RegisterEnum("tunnel.v1beta1.Encoder", Encoder_name, Encoder_value) proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") @@ -672,65 +705,70 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 916 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x5f, 0x27, 0x9b, 0x34, 0x79, 0x69, 0xa3, 0xd5, 0x10, 0x5a, 0x93, 0x85, 0x38, 0xca, 0x29, - 0x1c, 0xd6, 0xa6, 0x01, 0x7a, 0xd8, 0x13, 0xf9, 0xa3, 0xaa, 0x16, 0x42, 0x2c, 0x4e, 0x4e, 0x5c, - 0xac, 0x89, 0x3d, 0xc9, 0x1a, 0xb2, 0x33, 0xc6, 0x33, 0x89, 0x9a, 0x23, 0xdf, 0x80, 0x4f, 0x80, - 0x10, 0x12, 0x12, 0x1f, 0x60, 0xaf, 0x9c, 0x10, 0x52, 0xd5, 0x53, 0xc5, 0x89, 0x53, 0x84, 0xbc, - 0x07, 0xf8, 0x0c, 0x9c, 0x90, 0x67, 0xc6, 0xc9, 0x66, 0x69, 0x55, 0x8a, 0x38, 0xf4, 0xe6, 0xf7, - 0x7e, 0x6f, 0xde, 0xfc, 0xe6, 0xf7, 0x7e, 0x33, 0x09, 0x1c, 0x8b, 0x25, 0xa5, 0x64, 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x4e, 0xa5, 0x7a, 0xba, 0xb1, 0xc0, 0x1d, 0x0c, 0x3f, 0xcb, - 0xd2, 0xee, 0xc8, 0x83, 0x68, 0x1a, 0xa8, 0xef, 0xd7, 0xfe, 0xa4, 0x83, 0x4f, 0x7e, 0x4c, 0x5b, - 0xc6, 0x93, 0xb4, 0x65, 0x3c, 0x4b, 0x5b, 0xc6, 0xef, 0x69, 0xcb, 0xf8, 0xe6, 0xaa, 0x75, 0xf0, - 0xec, 0xaa, 0x75, 0xf0, 0xdb, 0x55, 0xeb, 0xe0, 0x73, 0xe7, 0x5f, 0x8c, 0x5b, 0xff, 0xa9, 0x91, - 0xd3, 0x9e, 0x96, 0x65, 0xc5, 0xfb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x71, 0xb0, 0x0d, - 0xeb, 0x08, 0x00, 0x00, + // 1004 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0x93, 0x34, 0x4d, 0x5e, 0xba, 0x55, 0x34, 0x1b, 0xb6, 0x26, 0x85, 0x24, 0xea, 0xa9, + 0xac, 0xd4, 0x78, 0x5b, 0xc4, 0x0a, 0xf5, 0x44, 0x12, 0xa7, 0x5a, 0x6b, 0x45, 0x1b, 0xec, 0x20, + 0x21, 0x2e, 0x96, 0x63, 0x4f, 0x52, 0x43, 0x3a, 0x63, 0x3c, 0x93, 0x6a, 0x7b, 0xe4, 0x86, 0x7a, + 0xe2, 0x0f, 0x14, 0x21, 0x10, 0x82, 0x1f, 0xd0, 0x13, 0x57, 0x84, 0xb4, 0xda, 0xd3, 0x8a, 0x13, + 0xa7, 0x08, 0xb9, 0x07, 0xf8, 0x0d, 0x9c, 0x90, 0x67, 0xec, 0xa6, 0xe9, 0xb6, 0x5a, 0x16, 0x71, + 0xd8, 0x9b, 0xdf, 0xfb, 0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x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -845,7 +883,7 @@ func (this *Tunnel) Equal(that interface{}) bool { if !this.Route.Equal(that1.Route) { return false } - if this.FeedType != that1.FeedType { + if this.Encoder != that1.Encoder { return false } if this.FeePayer != that1.FeePayer { @@ -1218,8 +1256,8 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if m.FeedType != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.FeedType)) + if m.Encoder != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Encoder)) i-- dAtA[i] = 0x20 } @@ -1558,8 +1596,8 @@ func (m *Tunnel) Size() (n int) { l = m.Route.Size() n += 1 + l + sovTunnel(uint64(l)) } - if m.FeedType != 0 { - n += 1 + sovTunnel(uint64(m.FeedType)) + if m.Encoder != 0 { + n += 1 + sovTunnel(uint64(m.Encoder)) } l = len(m.FeePayer) if l > 0 { @@ -2151,9 +2189,9 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) } - m.FeedType = 0 + m.Encoder = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2163,7 +2201,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FeedType |= types1.FeedType(b&0x7F) << shift + m.Encoder |= Encoder(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 824460da7..2fb168068 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -6,11 +6,10 @@ package types import ( context "context" fmt "fmt" - types1 "github.com/bandprotocol/chain/v2/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types2 "github.com/cosmos/cosmos-sdk/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" @@ -43,8 +42,8 @@ type MsgCreateTunnel struct { Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` // route is the route for delivering the signal prices Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` - // feed_type is the type of feed data. - FeedType types1.FeedType `protobuf:"varint,4,opt,name=feed_type,json=feedType,proto3,enum=feeds.v1beta1.FeedType" json:"feed_type,omitempty"` + // encoder is the mode of encoding price signal data. + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` // deposit is the deposit required to create a tunnel. Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` // creator is the address of the creator. @@ -105,11 +104,11 @@ func (m *MsgCreateTunnel) GetRoute() *types.Any { return nil } -func (m *MsgCreateTunnel) GetFeedType() types1.FeedType { +func (m *MsgCreateTunnel) GetEncoder() Encoder { if m != nil { - return m.FeedType + return m.Encoder } - return types1.FEED_TYPE_UNSPECIFIED + return ENCODER_UNSPECIFIED } func (m *MsgCreateTunnel) GetDeposit() github_com_cosmos_cosmos_sdk_types.Coins { @@ -667,62 +666,61 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 869 bytes of a gzipped FileDescriptorProto + // 851 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f,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xc3, 0xe0, 0x47, 0x02, 0xf7, 0xe1, 0xc8, 0x23, 0xd4, 0x0e, 0xff, 0xfe, 0x87, 0x06, 0x99, - 0x93, 0xd4, 0x30, 0x40, 0xc8, 0x65, 0x11, 0x16, 0xae, 0x04, 0x64, 0xfe, 0x92, 0x05, 0xef, 0x76, - 0x18, 0x3e, 0xf6, 0x11, 0xe4, 0xe8, 0x34, 0x74, 0x52, 0x8f, 0x41, 0x89, 0x79, 0x98, 0xc0, 0x61, - 0xd7, 0x23, 0x03, 0xca, 0x34, 0xa5, 0x9e, 0x6d, 0x14, 0x9b, 0xba, 0xb5, 0x5a, 0x27, 0xeb, 0x59, - 0xc8, 0x69, 0x93, 0x01, 0x6d, 0xe5, 0xde, 0x5c, 0xd4, 0x32, 0x4e, 0x91, 0x45, 0x16, 0xa6, 0xea, - 0x20, 0xef, 0x11, 0x8e, 0xfc, 0x29, 0x1c, 0x6a, 0x1b, 0x75, 0xa5, 0x91, 0x73, 0xa2, 0xb5, 0xfa, - 0x29, 0xd8, 0xf4, 0xe9, 0x84, 0x23, 0x2d, 0x5b, 0x57, 0x1a, 0xc5, 0x66, 0xd9, 0x12, 0x15, 0xb7, - 0x16, 0x15, 0xb7, 0x8e, 0xc8, 0xac, 0x55, 0xf8, 0xfd, 0xf5, 0xc1, 0xa6, 0x13, 0xd0, 0x1c, 0xc1, - 0x56, 0x9f, 0x82, 0x42, 0x20, 0xbd, 0xcb, 0x67, 0x63, 0xa4, 0xe5, 0xea, 0x4a, 0x63, 0xbb, 0x59, - 0xb1, 0x44, 0x32, 0x0b, 0x4d, 0x5f, 0x22, 0xe4, 0x9e, 0xce, 0xc6, 0xc8, 0xc9, 0x0f, 0xe4, 0x97, - 0x8a, 0xc0, 0x3d, 0x17, 0x8d, 0x29, 0xf3, 0xb8, 0xb6, 0x19, 0x26, 0x52, 0xb5, 0x64, 0x17, 0x82, - 0xba, 0x47, 0x9e, 0xc7, 0xd4, 0x23, 0xad, 0x8f, 0x83, 0x3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0xfd, 0x04, 0x9c, 0x2a, 0x4e, 0x15, 0x27, 0x4e, + 0x05, 0xa5, 0x87, 0x7e, 0x03, 0xce, 0x28, 0xf6, 0xc4, 0x4e, 0xa6, 0xa6, 0x0d, 0x42, 0xea, 0x25, + 0xf6, 0xbc, 0xdf, 0xef, 0x3d, 0xff, 0xde, 0x9b, 0x37, 0x6f, 0x02, 0xca, 0x7c, 0x48, 0x08, 0xea, + 0xd9, 0xa3, 0x46, 0x17, 0x71, 0xd8, 0xb0, 0xf9, 0xa9, 0x35, 0x08, 0x28, 0xa7, 0xea, 0x66, 0x04, + 0x58, 0x02, 0xd0, 0x2b, 0x98, 0x52, 0xdc, 0x43, 0x76, 0x88, 0x76, 0x87, 0xc7, 0x36, 0x24, 0xe3, + 0x88, 0xaa, 0x97, 0x30, 0xc5, 0x34, 0x7c, 0xb5, 0xa7, 0x6f, 0xc2, 0xba, 0x2d, 0x45, 0x1e, 0xc0, + 0x00, 0xf6, 0x99, 0x00, 0x2b, 0x2e, 0x65, 0x7d, 0xca, 0x8e, 0x22, 0xaf, 0x68, 0x21, 0x20, 0x23, + 0x5a, 0xd9, 0x5d, 0xc8, 0x50, 0xec, 0xec, 0x52, 0x9f, 0x08, 0xbc, 0x2c, 0xf0, 0x3e, 0xc3, 0xf6, + 0xa8, 0x31, 0x7d, 0x08, 0xe0, 0x09, 0xec, 0xfb, 0x84, 0xda, 0xe1, 0xef, 0xbf, 0x68, 0x10, 0x39, + 0x85, 0xa0, 0xf9, 0x53, 0x16, 0xbc, 0xdb, 0x61, 0xf8, 0x20, 0x40, 0x90, 0xa3, 0x37, 0x21, 0xa2, + 0x1e, 0x80, 0x22, 0xf3, 0x31, 0x81, 0xbd, 0x23, 0x9f, 0x1c, 0x53, 0xa6, 0x29, 0xb5, 0x6c, 0xbd, + 0xd0, 0xd4, 0xad, 0xc5, 0x62, 0x58, 0xaf, 0x43, 0x4e, 0x9b, 0x1c, 0xd3, 0x56, 0xee, 0xf2, 0xba, + 0x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0x31, 0x32, 0x7f, 0xdc, 0x18, 0x99, 0xaf, 0xed, 0xb9, 0xab, 0xb5, 0x0b, 0x89, 0x17, 0x5e, 0xf8, + 0x2e, 0xed, 0xd9, 0xee, 0x09, 0xf4, 0x89, 0x3d, 0x6a, 0xda, 0xa7, 0xe2, 0xef, 0x49, 0x74, 0xcf, + 0x76, 0xd7, 0x42, 0xc6, 0x27, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x20, 0xb5, 0x69, 0xa2, + 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1038,8 +1036,8 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if m.FeedType != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.FeedType)) + if m.Encoder != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Encoder)) i-- dAtA[i] = 0x20 } @@ -1449,8 +1447,8 @@ func (m *MsgCreateTunnel) Size() (n int) { l = m.Route.Size() n += 1 + l + sovTx(uint64(l)) } - if m.FeedType != 0 { - n += 1 + sovTx(uint64(m.FeedType)) + if m.Encoder != 0 { + n += 1 + sovTx(uint64(m.Encoder)) } if len(m.Deposit) > 0 { for _, e := range m.Deposit { @@ -1736,9 +1734,9 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeedType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) } - m.FeedType = 0 + m.Encoder = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1748,7 +1746,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FeedType |= types1.FeedType(b&0x7F) << shift + m.Encoder |= Encoder(b&0x7F) << shift if b < 0x80 { break } @@ -1782,7 +1780,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Deposit = append(m.Deposit, types2.Coin{}) + m.Deposit = append(m.Deposit, types1.Coin{}) if err := m.Deposit[len(m.Deposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } From 9f2ac08d14e37d8b7fc0406f9573f9bdeeceff58 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 11 Sep 2024 13:33:32 +0700 Subject: [PATCH 084/272] use currentPrices from feed module --- x/tunnel/keeper/msg_server.go | 7 +++--- x/tunnel/keeper/packet.go | 28 ++++++++++------------ x/tunnel/testutil/mock_expected_keepers.go | 12 +++++----- x/tunnel/types/expected_keepers.go | 2 +- 4 files changed, 23 insertions(+), 26 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 108fa1ff8..a22f2c257 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -187,12 +187,11 @@ func (ms msgServer) ManualTriggerTunnel( return nil, types.ErrInactiveTunnel.Wrapf("tunnelID %d", req.TunnelID) } - // TODO: feeds module needs to be implemented get prices that can use - latestPrices := ms.Keeper.feedsKeeper.GetPrices(ctx) - latestPricesMap := createLatestPricesMap(latestPrices) + currentPrices := ms.Keeper.feedsKeeper.GetCurrentPrices(ctx) + currentPricesMap := createCurrentPricesMap(currentPrices) // Produce packet with trigger all signals - isCreated, err := ms.Keeper.ProducePacket(ctx, tunnel.ID, latestPricesMap, true) + isCreated, err := ms.Keeper.ProducePacket(ctx, tunnel.ID, currentPricesMap, true) if err != nil { return nil, err } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index f9c0cda29..a8cfe72ae 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -44,9 +44,8 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // get active tunnel IDs ids := k.GetActiveTunnelIDs(ctx) - // TODO: feeds module needs to be implemented get prices that can use - latestPrices := k.feedsKeeper.GetPrices(ctx) - latestPricesMap := createLatestPricesMap(latestPrices) + currentPrices := k.feedsKeeper.GetCurrentPrices(ctx) + currentPricesMap := createCurrentPricesMap(currentPrices) // check for active tunnels for _, id := range ids { @@ -65,7 +64,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // Produce and send a packet, if no packet is created, return error so that // fee is reverted. - isCreated, err := k.ProducePacket(ctx, id, latestPricesMap, false) + isCreated, err := k.ProducePacket(ctx, id, currentPricesMap, false) if err != nil { return err } @@ -92,7 +91,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { func (k Keeper) ProducePacket( ctx sdk.Context, tunnelID uint64, - latestPricesMap map[string]feedstypes.Price, + currentPricesMap map[string]feedstypes.Price, triggerAll bool, ) (isCreated bool, err error) { unixNow := ctx.BlockTime().Unix() @@ -108,7 +107,7 @@ func (k Keeper) ProducePacket( nsps := GenerateSignalPrices( ctx, tunnel.ID, - latestPricesMap, + currentPricesMap, tunnel.GetSignalInfoMap(), signalPricesInfo.SignalPrices, triggerAll || intervalTrigger, @@ -172,20 +171,19 @@ func (k Keeper) SendPacket( return nil } -// GenerateSignalPrices generates signal prices based on the latest prices and signal info +// GenerateSignalPrices generates signal prices based on the current prices and signal info func GenerateSignalPrices( ctx sdk.Context, tunnelID uint64, - latestPricesMap map[string]feedstypes.Price, + currentPricesMap map[string]feedstypes.Price, signalInfoMap map[string]types.SignalInfo, signalPrices []types.SignalPrice, triggerAll bool, ) []types.SignalPrice { var sps []types.SignalPrice for _, sp := range signalPrices { - latestPrice, exists := latestPricesMap[sp.SignalID] - // TODO: remove check PriceStatusAvailable when feeds module is implemented - if !exists || latestPrice.PriceStatus != feedstypes.PriceStatusAvailable { + currentPrice, exists := currentPricesMap[sp.SignalID] + if !exists || currentPrice.PriceStatus != feedstypes.PriceStatusAvailable { sps = append(sps, types.NewSignalPrice(sp.SignalID, 0)) continue } @@ -201,14 +199,14 @@ func GenerateSignalPrices( if triggerAll || deviationExceedsThreshold( sdk.NewIntFromUint64(sp.Price), - sdk.NewIntFromUint64(latestPrice.Price), + sdk.NewIntFromUint64(currentPrice.Price), sdk.NewIntFromUint64(signalInfo.HardDeviationBPS), ) { sps = append( sps, types.NewSignalPrice( sp.SignalID, - latestPrice.Price, + currentPrice.Price, ), ) } @@ -226,8 +224,8 @@ func deviationExceedsThreshold(oldPrice, newPrice, thresholdBPS sdkmath.Int) boo return deviationInBPS.GTE(thresholdBPS) } -// createLatestPricesMap creates a map of latest prices with signal ID as the key -func createLatestPricesMap(latestPrices []feedstypes.Price) map[string]feedstypes.Price { +// createCurrentPricesMap creates a map of current prices with signal ID as the key +func createCurrentPricesMap(latestPrices []feedstypes.Price) map[string]feedstypes.Price { latestPricesMap := make(map[string]feedstypes.Price, len(latestPrices)) for _, price := range latestPrices { latestPricesMap[price.SignalID] = price diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go index f41c36b07..db197ae57 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -237,18 +237,18 @@ func (m *MockFeedsKeeper) EXPECT() *MockFeedsKeeperMockRecorder { return m.recorder } -// GetPrices mocks base method. -func (m *MockFeedsKeeper) GetPrices(ctx types2.Context) []types0.Price { +// GetCurrentPrices mocks base method. +func (m *MockFeedsKeeper) GetCurrentPrices(ctx types2.Context) []types0.Price { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPrices", ctx) + ret := m.ctrl.Call(m, "GetCurrentPrices", ctx) ret0, _ := ret[0].([]types0.Price) return ret0 } -// GetPrices indicates an expected call of GetPrices. -func (mr *MockFeedsKeeperMockRecorder) GetPrices(ctx any) *gomock.Call { +// GetCurrentPrices indicates an expected call of GetCurrentPrices. +func (mr *MockFeedsKeeperMockRecorder) GetCurrentPrices(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetPrices), ctx) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetCurrentPrices), ctx) } // MockBandtssKeeper is a mock of BandtssKeeper interface. diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 942762c7e..ad87f07a4 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -40,7 +40,7 @@ type BankKeeper interface { } type FeedsKeeper interface { - GetPrices(ctx sdk.Context) (prices []feedstypes.Price) + GetCurrentPrices(ctx sdk.Context) (prices []feedstypes.Price) } type BandtssKeeper interface { From 3b2155c17ca5a4d992b3debeeb705509a2992242 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 11 Sep 2024 14:07:20 +0700 Subject: [PATCH 085/272] add total fee --- proto/tunnel/v1beta1/genesis.proto | 2 + proto/tunnel/v1beta1/tunnel.proto | 10 + x/tunnel/genesis.go | 10 + x/tunnel/genesis_test.go | 118 +++++++--- x/tunnel/keeper/keeper.go | 9 - x/tunnel/keeper/packet.go | 14 ++ x/tunnel/keeper/tunnel.go | 17 ++ x/tunnel/types/genesis.pb.go | 96 ++++++-- x/tunnel/types/keys.go | 2 + x/tunnel/types/tunnel.pb.go | 353 +++++++++++++++++++++++------ 10 files changed, 506 insertions(+), 125 deletions(-) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index 3ecba9a3d..ad2855328 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -17,4 +17,6 @@ message GenesisState { repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; // signal_prices_infos is the signal prices info. repeated SignalPricesInfo signal_prices_infos = 4 [(gogoproto.nullable) = false]; + // TotalFee represents the type for the total fee collected by the tunnel. + TotalFee total_fee = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 1935b142f..d75cd1616 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -4,6 +4,7 @@ package tunnel.v1beta1; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "feeds/v1beta1/feeds.proto"; @@ -90,6 +91,15 @@ message SignalPrice { uint64 price = 2; } +// TotalFee represents the type for the total fee collected by the tunnel. +message TotalFee { + option (gogoproto.equal) = true; + + // total_packet_fee is the total packet fee collected + repeated cosmos.base.v1beta1.Coin total_packet_fee = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + // Packet is the packet that tunnel produces message Packet { // tunnel_id is the tunnel ID diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index e4781ff4b..a96f67ed9 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -42,6 +42,12 @@ func ValidateGenesis(data *types.GenesisState) error { } } + // validate the total fee + err := data.TotalFee.TotalPacketFee.Validate() + if err != nil { + return err + } + return data.Params.Validate() } @@ -78,6 +84,9 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { for _, signalPricesInfo := range data.SignalPricesInfos { k.SetSignalPricesInfo(ctx, signalPricesInfo) } + + // set the total fee + k.SetTotalFee(ctx, data.TotalFee) } // ExportGenesis returns the module's exported genesis @@ -87,5 +96,6 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { TunnelCount: k.GetTunnelCount(ctx), Tunnels: k.GetTunnels(ctx), SignalPricesInfos: k.GetSignalPricesInfos(ctx), + TotalFee: k.GetTotalFee(ctx), } } diff --git a/x/tunnel/genesis_test.go b/x/tunnel/genesis_test.go index 95ff945f2..be1641a16 100644 --- a/x/tunnel/genesis_test.go +++ b/x/tunnel/genesis_test.go @@ -15,40 +15,88 @@ import ( ) func TestValidateGenesis(t *testing.T) { - // Create a valid genesis state - validGenesisState := &types.GenesisState{ - Params: types.DefaultParams(), - TunnelCount: 1, - Tunnels: []types.Tunnel{ - {ID: 1}, + tests := []struct { + name string + genesis *types.GenesisState + requireErr bool + }{ + { + name: "valid genesis state", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 1}, + {ID: 2}, + }, + TunnelCount: 2, + SignalPricesInfos: []types.SignalPricesInfo{ + {TunnelID: 1}, + {TunnelID: 2}, + }, + TotalFee: types.TotalFee{ + TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), + }, + Params: types.DefaultParams(), + }, + requireErr: false, }, - } - - // Test with valid genesis state - err := tunnel.ValidateGenesis(validGenesisState) - require.NoError(t, err) - - // Test with invalid tunnel count - invalidGenesisState := &types.GenesisState{ - Params: types.DefaultParams(), - TunnelCount: 2, - Tunnels: []types.Tunnel{ - {ID: 1}, + { + name: "invalid tunnel count", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + TunnelCount: 2, + }, + requireErr: true, + }, + { + name: "invalid tunnel ID", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 3}, + }, + TunnelCount: 2, + }, + requireErr: true, + }, + { + name: "invalid signal prices info", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + TunnelCount: 1, + SignalPricesInfos: []types.SignalPricesInfo{ + {TunnelID: 0}, + }, + }, + requireErr: true, + }, + { + name: "invalid total fee", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + TunnelCount: 1, + TotalFee: types.TotalFee{ + TotalPacketFee: sdk.Coins{}, // Invalid coin + }, + }, + requireErr: true, }, } - err = tunnel.ValidateGenesis(invalidGenesisState) - require.Error(t, err) - // Test with invalid tunnel IDs - invalidGenesisState = &types.GenesisState{ - Params: types.DefaultParams(), - TunnelCount: 1, - Tunnels: []types.Tunnel{ - {ID: 2}, - }, + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tunnel.ValidateGenesis(tt.genesis) + if tt.requireErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) } - err = tunnel.ValidateGenesis(invalidGenesisState) - require.Error(t, err) } func TestInitExportGenesis(t *testing.T) { @@ -73,6 +121,18 @@ func TestInitExportGenesis(t *testing.T) { Tunnels: []types.Tunnel{ {ID: 1}, }, + SignalPricesInfos: []types.SignalPricesInfo{ + { + TunnelID: 1, + SignalPrices: []types.SignalPrice{ + {SignalID: "ETH", Price: 5000}, + }, + LastIntervalTimestamp: 0, + }, + }, + TotalFee: types.TotalFee{ + TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), + }, } // Initialize the genesis state diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index 13a80a47a..ddc74b524 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -71,15 +71,6 @@ func (k Keeper) SetModuleAccount(ctx sdk.Context, acc authtypes.ModuleAccountI) k.authKeeper.SetModuleAccount(ctx, acc) } -// DeductBaseFee deducts the base fee from fee payer's account. -func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) error { - basePacketFee := k.GetParams(ctx).BasePacketFee - if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, basePacketFee); err != nil { - return err - } - return nil -} - // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index a8cfe72ae..cddba61cf 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -12,6 +12,20 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +// DeductBaseFee deducts the base fee from fee payer's account. +func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) error { + basePacketFee := k.GetParams(ctx).BasePacketFee + if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, basePacketFee); err != nil { + return err + } + + // update total fee + totalFee := k.GetTotalFee(ctx) + totalFee.TotalPacketFee.Add(basePacketFee...) + k.SetTotalFee(ctx, totalFee) + return nil +} + // SetPacket sets a packet in the store func (k Keeper) SetPacket(ctx sdk.Context, packet types.Packet) { ctx.KVStore(k.storeKey). diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index c1e93ae1b..d0132f7e5 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -208,3 +208,20 @@ func (k Keeper) MustDeactivateTunnel(ctx sdk.Context, tunnelID uint64) { panic(err) } } + +// SetTotalFee sets the total fee in the store +func (k Keeper) SetTotalFee(ctx sdk.Context, totalFee types.TotalFee) { + ctx.KVStore(k.storeKey).Set(types.TotalPacketFeeStoreKey, k.cdc.MustMarshal(&totalFee)) +} + +// GetTotalFee retrieves the total fee from the store +func (k Keeper) GetTotalFee(ctx sdk.Context) types.TotalFee { + bz := ctx.KVStore(k.storeKey).Get(types.TotalPacketFeeStoreKey) + if bz == nil { + return types.TotalFee{} + } + + var totalFee types.TotalFee + k.cdc.MustUnmarshal(bz, &totalFee) + return totalFee +} diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index fad6bed19..03afe872c 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -33,6 +33,8 @@ type GenesisState struct { Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` // signal_prices_infos is the signal prices info. SignalPricesInfos []SignalPricesInfo `protobuf:"bytes,4,rep,name=signal_prices_infos,json=signalPricesInfos,proto3" json:"signal_prices_infos"` + // TotalFee represents the type for the total fee collected by the tunnel. + TotalFee TotalFee `protobuf:"bytes,5,opt,name=total_fee,json=totalFee,proto3" json:"total_fee"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -96,6 +98,13 @@ func (m *GenesisState) GetSignalPricesInfos() []SignalPricesInfo { return nil } +func (m *GenesisState) GetTotalFee() TotalFee { + if m != nil { + return m.TotalFee + } + return TotalFee{} +} + func init() { proto.RegisterType((*GenesisState)(nil), "tunnel.v1beta1.GenesisState") } @@ -103,26 +112,28 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 299 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xfb, 0x30, - 0x1c, 0xc7, 0x9b, 0xff, 0xca, 0xfe, 0x90, 0x0d, 0xc1, 0x2a, 0x52, 0xa6, 0xc4, 0xea, 0x69, 0xa7, - 0x86, 0x4d, 0xf1, 0x01, 0xe6, 0x41, 0x76, 0x1b, 0x9b, 0x78, 0xf0, 0x52, 0xd2, 0x9a, 0x65, 0x81, - 0x2e, 0x29, 0x4d, 0x3a, 0xf4, 0x2d, 0x7c, 0xac, 0x1d, 0x77, 0xf4, 0x24, 0xd2, 0x3e, 0x84, 0x57, - 0x59, 0x12, 0x0f, 0x16, 0xbd, 0xe5, 0xf7, 0xfd, 0x7e, 0xf2, 0x49, 0xf8, 0xc1, 0x33, 0x5d, 0x09, - 0x41, 0x73, 0xbc, 0x19, 0xa5, 0x54, 0x93, 0x11, 0x66, 0x54, 0x50, 0xc5, 0x55, 0x5c, 0x94, 0x52, - 0xcb, 0xe0, 0xc0, 0xb6, 0xb1, 0x6b, 0x07, 0xc7, 0x4c, 0x32, 0x69, 0x2a, 0xbc, 0x3f, 0x59, 0x6a, - 0x70, 0xda, 0x72, 0x14, 0xa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 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x4e, 0x02, 0x31, + 0x18, 0xc7, 0xaf, 0x80, 0xa8, 0x85, 0x98, 0x58, 0x8d, 0x69, 0xd0, 0xd4, 0xd3, 0x89, 0xe9, 0x1a, + 0xd0, 0xb8, 0xb8, 0x69, 0xa2, 0x61, 0x23, 0x60, 0x1c, 0x5c, 0x2e, 0xbd, 0xb3, 0x1c, 0x4d, 0x8e, + 0xf6, 0x42, 0x0b, 0xd1, 0xb7, 0xf0, 0x61, 0x7c, 0x08, 0x46, 0x46, 0x27, 0x63, 0xe0, 0x45, 0x0c, + 0x6d, 0x19, 0x44, 0xdd, 0xfa, 0x7d, 0xff, 0x5f, 0x7f, 0xfd, 0xda, 0xc2, 0x13, 0x33, 0x91, 0x92, + 0xe7, 0x74, 0xda, 0x4a, 0xb8, 0x61, 0x2d, 0x9a, 0x71, 0xc9, 0xb5, 0xd0, 0x51, 0x31, 0x56, 0x46, + 0xa1, 0x3d, 0x97, 0x46, 0x3e, 0x6d, 0x1c, 0x66, 0x2a, 0x53, 0x36, 0xa2, 0xab, 0x95, 0xa3, 0x1a, + 0xc7, 0x1b, 0x8e, 0x82, 0x8d, 0xd9, 0x48, 0xff, 0x13, 0x7a, 0xa3, 0x0d, 0xcf, 0xdf, 0x4b, 0xb0, + 0x7e, 0xef, 0x4e, 0xec, 0x1b, 0x66, 0x38, 0xba, 0x84, 0x55, 0xb7, 0x1b, 0x83, 0x10, 0x34, 0x6b, + 0xed, 0xa3, 0xe8, 0xe7, 0x04, 0x51, 0xd7, 0xa6, 0x37, 0x95, 0xd9, 0xe7, 0x69, 0xd0, 0xf3, 0x2c, + 0x3a, 0x83, 0x75, 0x87, 0xc5, 0xa9, 0x9a, 0x48, 0x83, 0x4b, 0x21, 0x68, 0x56, 0x7a, 0x35, 0xd7, + 0xbb, 0x5d, 0xb5, 0xd0, 0x15, 0xdc, 0x76, 0xa5, 0xc6, 0xe5, 0xb0, 0xfc, 0x97, 0xf9, 0xc1, 0x96, + 0xde, 0xbc, 0x86, 0xd1, 0x23, 0x3c, 0xd0, 0x22, 0x93, 0x2c, 0x8f, 0x8b, 0xb1, 0x48, 0xb9, 0x8e, + 0x85, 0x1c, 0x28, 0x8d, 0x2b, 0xd6, 0x11, 0x6e, 0x3a, 0xfa, 0x16, 0xed, 0x5a, 0xb2, 0x23, 0x07, + 0xca, 0xdb, 0xf6, 0xf5, 0x46, 0x5f, 0xa3, 0x6b, 0xb8, 0x6b, 0x94, 0x61, 0x79, 0x3c, 0xe0, 0x1c, + 0x6f, 0xd9, 0xbb, 0xe2, 0x5f, 0x13, 0xad, 0x80, 0x3b, 0xce, 0xbd, 0x65, 0xc7, 0xac, 0xeb, 0xce, + 0x6c, 0x41, 0xc0, 0x7c, 0x41, 0xc0, 0xd7, 0x82, 0x80, 0xb7, 0x25, 0x09, 0xe6, 0x4b, 0x12, 0x7c, + 0x2c, 0x49, 0xf0, 0x44, 0x33, 0x61, 0x86, 0x93, 0x24, 0x4a, 0xd5, 0x88, 0x26, 0x4c, 0x3e, 0xdb, + 0x67, 0x4e, 0x55, 0x4e, 0xd3, 0x21, 0x13, 0x92, 0x4e, 0xdb, 0xf4, 0xc5, 0xff, 0x00, 0x35, 0xaf, + 0x05, 0xd7, 0x49, 0xd5, 0x12, 0x17, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xed, 0xd7, 0xd2, 0xa6, + 0x08, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -145,6 +156,16 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.TotalFee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a if len(m.SignalPricesInfos) > 0 { for iNdEx := len(m.SignalPricesInfos) - 1; iNdEx >= 0; iNdEx-- { { @@ -225,6 +246,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + l = m.TotalFee.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -383,6 +406,39 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 1246f8b17..932530503 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -28,6 +28,8 @@ const ( var ( TunnelCountStoreKey = []byte{0x00} + TotalPacketFeeStoreKey = []byte{0x01} + ActiveTunnelIDStoreKeyPrefix = []byte{0x10} TunnelStoreKeyPrefix = []byte{0x11} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 318497e27..f5709d9eb 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -9,6 +9,8 @@ import ( _ "github.com/bandprotocol/chain/v2/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -479,6 +481,52 @@ func (m *SignalPrice) GetPrice() uint64 { return 0 } +// TotalFee represents the type for the total fee collected by the tunnel. +type TotalFee struct { + // total_packet_fee is the total packet fee collected + TotalPacketFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=total_packet_fee,json=totalPacketFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_packet_fee"` +} + +func (m *TotalFee) Reset() { *m = TotalFee{} } +func (m *TotalFee) String() string { return proto.CompactTextString(m) } +func (*TotalFee) ProtoMessage() {} +func (*TotalFee) Descriptor() ([]byte, []int) { + return fileDescriptor_b5270a56045f1d8a, []int{6} +} +func (m *TotalFee) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TotalFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TotalFee.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 *TotalFee) XXX_Merge(src proto.Message) { + xxx_messageInfo_TotalFee.Merge(m, src) +} +func (m *TotalFee) XXX_Size() int { + return m.Size() +} +func (m *TotalFee) XXX_DiscardUnknown() { + xxx_messageInfo_TotalFee.DiscardUnknown(m) +} + +var xxx_messageInfo_TotalFee proto.InternalMessageInfo + +func (m *TotalFee) GetTotalPacketFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TotalPacketFee + } + return nil +} + // Packet is the packet that tunnel produces type Packet struct { // tunnel_id is the tunnel ID @@ -497,7 +545,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{6} + return fileDescriptor_b5270a56045f1d8a, []int{7} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -575,7 +623,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{7} + return fileDescriptor_b5270a56045f1d8a, []int{8} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +687,7 @@ func (m *AxelarPacketContent) Reset() { *m = AxelarPacketContent{} } func (m *AxelarPacketContent) String() string { return proto.CompactTextString(m) } func (*AxelarPacketContent) ProtoMessage() {} func (*AxelarPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{8} + return fileDescriptor_b5270a56045f1d8a, []int{9} } func (m *AxelarPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -697,6 +745,7 @@ func init() { proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") proto.RegisterType((*SignalPricesInfo)(nil), "tunnel.v1beta1.SignalPricesInfo") proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") + proto.RegisterType((*TotalFee)(nil), "tunnel.v1beta1.TotalFee") proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") proto.RegisterType((*TSSPacketContent)(nil), "tunnel.v1beta1.TSSPacketContent") proto.RegisterType((*AxelarPacketContent)(nil), "tunnel.v1beta1.AxelarPacketContent") @@ -705,70 +754,75 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 1004 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 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 0xda, 0xfa, 0xe9, 0x59, 0xf3, 0x36, 0x18, 0xdd, 0x87, 0x4a, 0x0a, - 0x0d, 0x8c, 0xee, 0x63, 0xb1, 0x24, 0x5b, 0xab, 0x9e, 0x9e, 0x35, 0x5f, 0xc8, 0xd7, 0xf2, 0x5f, - 0x7d, 0x5f, 0xcf, 0x74, 0x3e, 0xfc, 0x29, 0xaa, 0x2b, 0x4f, 0xa3, 0xba, 0xf2, 0x3c, 0xaa, 0x2b, - 0x7f, 0x44, 0x75, 0xe5, 0xeb, 0x8b, 0x7a, 0xe6, 0xf9, 0x45, 0x3d, 0xf3, 0xfb, 0x45, 0x3d, 0xf3, - 0xa9, 0xf6, 0x2f, 0x8c, 0x99, 0xfc, 0xf7, 0x12, 0xbe, 0x1c, 0x16, 0x44, 0xc5, 0xbb, 0xff, 0x04, - 0x00, 0x00, 0xff, 0xff, 0x1e, 0xf3, 0xba, 0xcf, 0x92, 0x09, 0x00, 0x00, + // 1083 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0xda, 0x8e, 0x63, 0x3f, 0xb7, 0x96, 0x35, 0xf5, 0xb7, 0xd9, 0x3a, 0x5f, 0x6c, 0x2b, + 0x27, 0x53, 0x29, 0x76, 0x12, 0x44, 0x85, 0x72, 0xc2, 0x6b, 0x3b, 0xea, 0xaa, 0x22, 0x31, 0x6b, + 0x23, 0x21, 0x2e, 0xab, 0xf5, 0xee, 0xd8, 0x59, 0xea, 0xcc, 0x98, 0x9d, 0x71, 0xd4, 0x1c, 0x39, + 0x81, 0x72, 0xe2, 0x1f, 0x08, 0x42, 0x20, 0x04, 0xe2, 0x9c, 0x13, 0x57, 0x84, 0x54, 0xf5, 0x54, + 0x71, 0xe2, 0x64, 0x90, 0x73, 0x80, 0xbf, 0x81, 0x13, 0xda, 0x99, 0x59, 0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b5, 0xe5, 0x93, 0x53, 0x6b, 0x4b, 0xd8, 0x8a, + 0xec, 0xd0, 0xdb, 0x90, 0x19, 0x60, 0x6c, 0x8f, 0x9d, 0x13, 0x1c, 0xe8, 0x2b, 0x82, 0x67, 0xfd, + 0x97, 0xf3, 0xcd, 0x82, 0x3a, 0x23, 0x6a, 0x52, 0x5d, 0x1e, 0xf8, 0x64, 0x68, 0xa5, 0x07, 0x18, + 0x77, 0x42, 0x4b, 0xd4, 0x84, 0x5b, 0xd1, 0x78, 0xc8, 0x80, 0x32, 0x3d, 0x55, 0x49, 0x54, 0xb3, + 0x3b, 0xc5, 0xab, 0xe9, 0x16, 0x03, 0x35, 0x92, 0x4f, 0xa7, 0xe5, 0x98, 0x95, 0x65, 0x73, 0x0d, + 0x43, 0x45, 0x48, 0xfb, 0x84, 0xe3, 0xe0, 0xd8, 0x19, 0xe9, 0xab, 0x82, 0x84, 0xb9, 0x8c, 0xd6, + 0x21, 0xe3, 0x33, 0xdb, 0x71, 0xb9, 0x7f, 0x8c, 0xf5, 0x74, 0x45, 0xab, 0xa6, 0xad, 0xb4, 0xcf, + 0x1a, 0x42, 0x46, 0x6f, 0x00, 0xb8, 0x01, 0x76, 0x38, 0xf6, 0x6c, 0x87, 0xeb, 0x99, 0x8a, 0x56, + 0x4d, 0x58, 0x19, 0xa5, 0x69, 0x70, 0xb4, 0x03, 0xab, 0x42, 0xa0, 0x81, 0x0e, 0x2f, 0xe9, 0x28, + 0x32, 0x54, 0xc3, 0xfb, 0x49, 0x83, 0xbc, 0xac, 0xb9, 0x13, 0xf8, 0x2e, 0x66, 0xd1, 0x2a, 0xca, + 0xb6, 0xec, 0xf9, 0x34, 0xc5, 0x2a, 0xca, 0x29, 0x87, 0xab, 0x28, 0x61, 0xd3, 0x43, 0x7b, 0x70, + 0x5b, 0xd1, 0x32, 0x16, 0xfe, 0x7a, 0x5c, 0xf0, 0xb2, 0x7e, 0x3d, 0x2f, 0x22, 0x87, 0x22, 0x46, + 0x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, 0xdd, 0x87, 0x7c, 0x04, 0xf5, 0xcc, + 0xe6, 0x23, 0xe1, 0x12, 0x2f, 0x16, 0x4e, 0xcf, 0x2a, 0x2f, 0xe8, 0x8b, 0xc9, 0xcf, 0xbf, 0x29, + 0xc5, 0x8c, 0xf7, 0xbe, 0x9f, 0x95, 0xb4, 0xa7, 0xb3, 0x92, 0xf6, 0x7c, 0x56, 0xd2, 0x7e, 0x9f, + 0x95, 0xb4, 0x2f, 0x2e, 0x4a, 0xb1, 0xe7, 0x17, 0xa5, 0xd8, 0xaf, 0x17, 0xa5, 0xd8, 0x47, 0xf5, + 0x7f, 0xb0, 0x98, 0xea, 0x5f, 0xa2, 0xd8, 0xcb, 0x7e, 0x4a, 0x58, 0xbc, 0xf5, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x26, 0x01, 0xd6, 0xf4, 0x3c, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -973,6 +1027,35 @@ func (this *SignalPrice) Equal(that interface{}) bool { } return true } +func (this *TotalFee) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TotalFee) + if !ok { + that2, ok := that.(TotalFee) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.TotalPacketFee) != len(that1.TotalPacketFee) { + return false + } + for i := range this.TotalPacketFee { + if !this.TotalPacketFee[i].Equal(&that1.TotalPacketFee[i]) { + return false + } + } + return true +} func (this *Packet) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1368,6 +1451,43 @@ func (m *SignalPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *TotalFee) 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 *TotalFee) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TotalFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TotalPacketFee) > 0 { + for iNdEx := len(m.TotalPacketFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalPacketFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTunnel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *Packet) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1662,6 +1782,21 @@ func (m *SignalPrice) Size() (n int) { return n } +func (m *TotalFee) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TotalPacketFee) > 0 { + for _, e := range m.TotalPacketFee { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + return n +} + func (m *Packet) Size() (n int) { if m == nil { return 0 @@ -2606,6 +2741,90 @@ func (m *SignalPrice) Unmarshal(dAtA []byte) error { } return nil } +func (m *TotalFee) 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 ErrIntOverflowTunnel + } + 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: TotalFee: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TotalFee: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalPacketFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TotalPacketFee = append(m.TotalPacketFee, types1.Coin{}) + if err := m.TotalPacketFee[len(m.TotalPacketFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTunnel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTunnel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Packet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From a6b4d95c0769258244a0ef28cd8243bd7574e01e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 11 Sep 2024 14:13:35 +0700 Subject: [PATCH 086/272] update total fees --- proto/tunnel/v1beta1/genesis.proto | 4 +- proto/tunnel/v1beta1/tunnel.proto | 4 +- x/tunnel/genesis.go | 10 +- x/tunnel/genesis_test.go | 6 +- x/tunnel/keeper/packet.go | 6 +- x/tunnel/keeper/tunnel.go | 12 +- x/tunnel/types/genesis.pb.go | 62 +++++----- x/tunnel/types/tunnel.pb.go | 190 ++++++++++++++--------------- 8 files changed, 147 insertions(+), 147 deletions(-) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index ad2855328..8e15aab76 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -17,6 +17,6 @@ message GenesisState { repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; // signal_prices_infos is the signal prices info. repeated SignalPricesInfo signal_prices_infos = 4 [(gogoproto.nullable) = false]; - // TotalFee represents the type for the total fee collected by the tunnel. - TotalFee total_fee = 5 [(gogoproto.nullable) = false]; + // TotalFees is the type for the total fees collected by the tunnel + TotalFees total_fees = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index d75cd1616..1f6fff5e7 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -91,8 +91,8 @@ message SignalPrice { uint64 price = 2; } -// TotalFee represents the type for the total fee collected by the tunnel. -message TotalFee { +// TotalFees is the type for the total fees collected by the tunnel +message TotalFees { option (gogoproto.equal) = true; // total_packet_fee is the total packet fee collected diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index a96f67ed9..101474638 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -42,8 +42,8 @@ func ValidateGenesis(data *types.GenesisState) error { } } - // validate the total fee - err := data.TotalFee.TotalPacketFee.Validate() + // validate the total fees + err := data.TotalFees.TotalPacketFee.Validate() if err != nil { return err } @@ -85,8 +85,8 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { k.SetSignalPricesInfo(ctx, signalPricesInfo) } - // set the total fee - k.SetTotalFee(ctx, data.TotalFee) + // set the total fees + k.SetTotalFees(ctx, data.TotalFees) } // ExportGenesis returns the module's exported genesis @@ -96,6 +96,6 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { TunnelCount: k.GetTunnelCount(ctx), Tunnels: k.GetTunnels(ctx), SignalPricesInfos: k.GetSignalPricesInfos(ctx), - TotalFee: k.GetTotalFee(ctx), + TotalFees: k.GetTotalFees(ctx), } } diff --git a/x/tunnel/genesis_test.go b/x/tunnel/genesis_test.go index be1641a16..d98246a84 100644 --- a/x/tunnel/genesis_test.go +++ b/x/tunnel/genesis_test.go @@ -32,7 +32,7 @@ func TestValidateGenesis(t *testing.T) { {TunnelID: 1}, {TunnelID: 2}, }, - TotalFee: types.TotalFee{ + TotalFees: types.TotalFees{ TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), }, Params: types.DefaultParams(), @@ -79,7 +79,7 @@ func TestValidateGenesis(t *testing.T) { {ID: 1}, }, TunnelCount: 1, - TotalFee: types.TotalFee{ + TotalFees: types.TotalFees{ TotalPacketFee: sdk.Coins{}, // Invalid coin }, }, @@ -130,7 +130,7 @@ func TestInitExportGenesis(t *testing.T) { LastIntervalTimestamp: 0, }, }, - TotalFee: types.TotalFee{ + TotalFees: types.TotalFees{ TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), }, } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index cddba61cf..e834654ee 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -19,10 +19,10 @@ func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) er return err } - // update total fee - totalFee := k.GetTotalFee(ctx) + // update total fees + totalFee := k.GetTotalFees(ctx) totalFee.TotalPacketFee.Add(basePacketFee...) - k.SetTotalFee(ctx, totalFee) + k.SetTotalFees(ctx, totalFee) return nil } diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index d0132f7e5..9271c1e0e 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -209,19 +209,19 @@ func (k Keeper) MustDeactivateTunnel(ctx sdk.Context, tunnelID uint64) { } } -// SetTotalFee sets the total fee in the store -func (k Keeper) SetTotalFee(ctx sdk.Context, totalFee types.TotalFee) { +// SetTotalFees sets the total fees in the store +func (k Keeper) SetTotalFees(ctx sdk.Context, totalFee types.TotalFees) { ctx.KVStore(k.storeKey).Set(types.TotalPacketFeeStoreKey, k.cdc.MustMarshal(&totalFee)) } -// GetTotalFee retrieves the total fee from the store -func (k Keeper) GetTotalFee(ctx sdk.Context) types.TotalFee { +// GetTotalFees retrieves the total fees from the store +func (k Keeper) GetTotalFees(ctx sdk.Context) types.TotalFees { bz := ctx.KVStore(k.storeKey).Get(types.TotalPacketFeeStoreKey) if bz == nil { - return types.TotalFee{} + return types.TotalFees{} } - var totalFee types.TotalFee + var totalFee types.TotalFees k.cdc.MustUnmarshal(bz, &totalFee) return totalFee } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 03afe872c..17c6d2f03 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -33,8 +33,8 @@ type GenesisState struct { Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` // signal_prices_infos is the signal prices info. SignalPricesInfos []SignalPricesInfo `protobuf:"bytes,4,rep,name=signal_prices_infos,json=signalPricesInfos,proto3" json:"signal_prices_infos"` - // TotalFee represents the type for the total fee collected by the tunnel. - TotalFee TotalFee `protobuf:"bytes,5,opt,name=total_fee,json=totalFee,proto3" json:"total_fee"` + // TotalFees is the type for the total fees collected by the tunnel + TotalFees TotalFees `protobuf:"bytes,5,opt,name=total_fees,json=totalFees,proto3" json:"total_fees"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -98,11 +98,11 @@ func (m *GenesisState) GetSignalPricesInfos() []SignalPricesInfo { return nil } -func (m *GenesisState) GetTotalFee() TotalFee { +func (m *GenesisState) GetTotalFees() TotalFees { if m != nil { - return m.TotalFee + return m.TotalFees } - return TotalFee{} + return TotalFees{} } func init() { @@ -112,28 +112,28 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x4e, 0x02, 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 0x3c, 0xd0, 0x22, 0x93, 0x2c, 0x8f, 0x8b, 0xb1, 0x48, 0xb9, 0x8e, - 0x85, 0x1c, 0x28, 0x8d, 0x2b, 0xd6, 0x11, 0x6e, 0x3a, 0xfa, 0x16, 0xed, 0x5a, 0xb2, 0x23, 0x07, - 0xca, 0xdb, 0xf6, 0xf5, 0x46, 0x5f, 0xa3, 0x6b, 0xb8, 0x6b, 0x94, 0x61, 0x79, 0x3c, 0xe0, 0x1c, - 0x6f, 0xd9, 0xbb, 0xe2, 0x5f, 0x13, 0xad, 0x80, 0x3b, 0xce, 0xbd, 0x65, 0xc7, 0xac, 0xeb, 0xce, - 0x6c, 0x41, 0xc0, 0x7c, 0x41, 0xc0, 0xd7, 0x82, 0x80, 0xb7, 0x25, 0x09, 0xe6, 0x4b, 0x12, 0x7c, - 0x2c, 0x49, 0xf0, 0x44, 0x33, 0x61, 0x86, 0x93, 0x24, 0x4a, 0xd5, 0x88, 0x26, 0x4c, 0x3e, 0xdb, - 0x67, 0x4e, 0x55, 0x4e, 0xd3, 0x21, 0x13, 0x92, 0x4e, 0xdb, 0xf4, 0xc5, 0xff, 0x00, 0x35, 0xaf, - 0x05, 0xd7, 0x49, 0xd5, 0x12, 0x17, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xed, 0xd7, 0xd2, 0xa6, - 0x08, 0x02, 0x00, 0x00, + // 328 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4e, 0xfa, 0x30, + 0x1c, 0xc7, 0x57, 0xe0, 0xcf, 0x3f, 0x16, 0x62, 0x62, 0x35, 0x66, 0xa2, 0xa9, 0xd3, 0x13, 0xa7, + 0x35, 0xa0, 0xf1, 0xe8, 0x41, 0x13, 0x0d, 0x37, 0x02, 0xc6, 0x83, 0x97, 0xa5, 0x9b, 0x65, 0x34, + 0x19, 0xed, 0x42, 0x0b, 0xd1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, 0x09, 0xa1, 0x96, 0x9a, 0x66, 0xd1, + 0x88, 0x31, 0xe5, 0xff, 0x33, 0xcb, 0x1e, 0xfc, 0x18, 0xa9, 0x20, 0x6e, 0x18, 0xdb, 0xec, 0xbb, + 0xa5, 0xbf, 0x82, 0xde, 0x62, 0x85, 0xc1, 0x72, 0x85, 0xc1, 0xc7, 0x0a, 0x83, 0x97, 0x35, 0xf6, + 0x96, 0x6b, 0xec, 0xbd, 0xad, 0xb1, 0xf7, 0x40, 0x52, 0xae, 0xc7, 0xb3, 0x38, 0x4c, 0xe4, 0x84, + 0xc4, 0x54, 0x3c, 0x9a, 0x3f, 0x9d, 0xc8, 0x8c, 0x24, 0x63, 0xca, 0x05, 0x99, 0x77, 0xc9, 0x93, + 0xbb, 0x04, 0xa2, 0x9f, 0x73, 0xa6, 0xe2, 0xba, 0x21, 0xce, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x91, 0xb9, 0xd4, 0x8c, 0x0b, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -157,7 +157,7 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l { - size, err := m.TotalFee.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.TotalFees.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -246,7 +246,7 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - l = m.TotalFee.Size() + l = m.TotalFees.Size() n += 1 + l + sovGenesis(uint64(l)) return n } @@ -408,7 +408,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalFee", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalFees", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -435,7 +435,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TotalFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TotalFees.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index f5709d9eb..9a110dbec 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -481,24 +481,24 @@ func (m *SignalPrice) GetPrice() uint64 { return 0 } -// TotalFee represents the type for the total fee collected by the tunnel. -type TotalFee struct { +// TotalFees is the type for the total fees collected by the tunnel +type TotalFees struct { // total_packet_fee is the total packet fee collected TotalPacketFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=total_packet_fee,json=totalPacketFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_packet_fee"` } -func (m *TotalFee) Reset() { *m = TotalFee{} } -func (m *TotalFee) String() string { return proto.CompactTextString(m) } -func (*TotalFee) ProtoMessage() {} -func (*TotalFee) Descriptor() ([]byte, []int) { +func (m *TotalFees) Reset() { *m = TotalFees{} } +func (m *TotalFees) String() string { return proto.CompactTextString(m) } +func (*TotalFees) ProtoMessage() {} +func (*TotalFees) Descriptor() ([]byte, []int) { return fileDescriptor_b5270a56045f1d8a, []int{6} } -func (m *TotalFee) XXX_Unmarshal(b []byte) error { +func (m *TotalFees) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TotalFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TotalFees) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TotalFee.Marshal(b, m, deterministic) + return xxx_messageInfo_TotalFees.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -508,19 +508,19 @@ func (m *TotalFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *TotalFee) XXX_Merge(src proto.Message) { - xxx_messageInfo_TotalFee.Merge(m, src) +func (m *TotalFees) XXX_Merge(src proto.Message) { + xxx_messageInfo_TotalFees.Merge(m, src) } -func (m *TotalFee) XXX_Size() int { +func (m *TotalFees) XXX_Size() int { return m.Size() } -func (m *TotalFee) XXX_DiscardUnknown() { - xxx_messageInfo_TotalFee.DiscardUnknown(m) +func (m *TotalFees) XXX_DiscardUnknown() { + xxx_messageInfo_TotalFees.DiscardUnknown(m) } -var xxx_messageInfo_TotalFee proto.InternalMessageInfo +var xxx_messageInfo_TotalFees proto.InternalMessageInfo -func (m *TotalFee) GetTotalPacketFee() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *TotalFees) GetTotalPacketFee() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TotalPacketFee } @@ -745,7 +745,7 @@ func init() { proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") proto.RegisterType((*SignalPricesInfo)(nil), "tunnel.v1beta1.SignalPricesInfo") proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") - proto.RegisterType((*TotalFee)(nil), "tunnel.v1beta1.TotalFee") + proto.RegisterType((*TotalFees)(nil), "tunnel.v1beta1.TotalFees") proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") proto.RegisterType((*TSSPacketContent)(nil), "tunnel.v1beta1.TSSPacketContent") proto.RegisterType((*AxelarPacketContent)(nil), "tunnel.v1beta1.AxelarPacketContent") @@ -755,74 +755,74 @@ func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b var fileDescriptor_b5270a56045f1d8a = []byte{ // 1083 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0xda, 0x8e, 0x63, 0x3f, 0xb7, 0x96, 0x35, 0xf5, 0xb7, 0xd9, 0x3a, 0x5f, 0x6c, 0x2b, - 0x27, 0x53, 0x29, 0x76, 0x12, 0x44, 0x85, 0x72, 0xc2, 0x6b, 0x3b, 0xea, 0xaa, 0x22, 0x31, 0x6b, - 0x23, 0x21, 0x2e, 0xab, 0xf5, 0xee, 0xd8, 0x59, 0xea, 0xcc, 0x98, 0x9d, 0x71, 0xd4, 0x1c, 0x39, - 0x81, 0x72, 0xe2, 0x1f, 0x08, 0x42, 0x20, 0x04, 0xe2, 0x9c, 0x13, 0x57, 0x84, 0x54, 0xf5, 0x54, - 0x71, 0xe2, 0x64, 0x90, 0x73, 0x80, 0xbf, 0x81, 0x13, 0xda, 0x99, 0x59, 0x3b, 0x4e, 0x13, 0x95, - 0x22, 0x0e, 0x3d, 0x79, 0xdf, 0xfb, 0xbc, 0x9f, 0x9f, 0xf7, 0x66, 0xc6, 0xb0, 0xce, 0x27, 0x84, - 0xe0, 0x51, 0xfd, 0x78, 0xbb, 0x8f, 0xb9, 0xb3, 0x5d, 0x97, 0x62, 0x6d, 0x1c, 0x50, 0x4e, 0x51, - 0x4e, 0x49, 0x0a, 0x2c, 0x16, 0x86, 0x74, 0x48, 0x05, 0x54, 0x0f, 0xbf, 0xa4, 0x55, 0xf1, 0xde, - 0x90, 0xd2, 0xe1, 0x08, 0xd7, 0x85, 0xd4, 0x9f, 0x0c, 0xea, 0x0e, 0x39, 0x89, 0x20, 0x97, 0xb2, - 0x23, 0xca, 0x6c, 0xe9, 0x23, 0x05, 0x05, 0x95, 0xa4, 0x54, 0xef, 0x3b, 0x0c, 0xcf, 0xb3, 0xbb, - 0xd4, 0x27, 0x91, 0xeb, 0x00, 0x63, 0x8f, 0xcd, 0x11, 0x21, 0x49, 0x68, 0xe3, 0x6b, 0x0d, 0xd2, - 0xbd, 0x6e, 0xd7, 0xa2, 0x13, 0x8e, 0xd1, 0x43, 0x28, 0x78, 0x98, 0x71, 0x9f, 0x38, 0xdc, 0xa7, - 0xc4, 0x76, 0x0f, 0x1d, 0x9f, 0x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 0x59, 0xc0, 0xca, 0x2a, 0xaa, 0x4d, 0x17, 0x2a, 0x55, + 0xbd, 0xac, 0x96, 0xdd, 0x01, 0x6f, 0x83, 0x67, 0xe8, 0xce, 0x60, 0xc5, 0xc7, 0xde, 0x22, 0x9f, + 0xfa, 0x0f, 0xb8, 0xaa, 0x5a, 0x55, 0xad, 0x7a, 0xf6, 0xa9, 0xd7, 0xaa, 0x52, 0x94, 0x53, 0xd4, + 0x53, 0x4f, 0xb4, 0xc2, 0x87, 0xf6, 0x6f, 0xe8, 0xa9, 0xda, 0x99, 0x59, 0x30, 0x8e, 0xad, 0x34, + 0x55, 0x0f, 0x39, 0xb1, 0xef, 0x7d, 0xde, 0xcf, 0xcf, 0x7b, 0x33, 0x03, 0xac, 0xf3, 0x09, 0x21, + 0x78, 0x54, 0x3f, 0xde, 0xee, 0x63, 0xee, 0x6c, 0xd7, 0xa5, 0x58, 0x1b, 0x07, 0x94, 0x53, 0x94, + 0x53, 0x92, 0x02, 0x8b, 0x85, 0x21, 0x1d, 0x52, 0x01, 0xd5, 0xc3, 0x2f, 0x69, 0x55, 0xbc, 0x37, + 0xa4, 0x74, 0x38, 0xc2, 0x75, 0x21, 0xf5, 0x27, 0x83, 0xba, 0x43, 0x4e, 0x22, 0xc8, 0xa5, 0xec, + 0x88, 0x32, 0x5b, 0xfa, 0x48, 0x41, 0x41, 0x25, 0x29, 0xd5, 0xfb, 0x0e, 0xc3, 0xf3, 0xec, 0x2e, + 0xf5, 0x49, 0xe4, 0x3a, 0xc0, 0xd8, 0x63, 0x73, 0x44, 0x48, 0x12, 0xda, 0xf8, 0x5a, 0x83, 0x74, + 0xaf, 0xdb, 0xb5, 0xe8, 0x84, 0x63, 0xf4, 0x10, 0x0a, 0x1e, 0x66, 0xdc, 0x27, 0x0e, 0xf7, 0x29, + 0xb1, 0xdd, 0x43, 0xc7, 0x27, 0xb6, 0xef, 0xe9, 0x5a, 0x45, 0xab, 0x66, 0x8c, 0xbb, 0xb3, 0x69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0xcd, 0x83, 0x56, 0xdb, 0xb2, 0x3f, 0xda, 0xef, + 0x76, 0xda, 0x4d, 0x73, 0xcf, 0x6c, 0xb7, 0xf2, 0xb1, 0xe2, 0xda, 0xe9, 0x59, 0xe5, 0x3a, 0x08, + 0xbd, 0x07, 0x6b, 0x91, 0x7a, 0xcf, 0xfc, 0xb8, 0xdd, 0xb2, 0x3b, 0x07, 0xe6, 0x7e, 0xcf, 0x6e, + 0x18, 0x66, 0x5e, 0x2b, 0xae, 0x9f, 0x9e, 0x55, 0x6e, 0x82, 0xd1, 0x7d, 0xc8, 0x47, 0x50, 0xcf, + 0x6c, 0x3e, 0x12, 0x2e, 0xf1, 0x62, 0xe1, 0xf4, 0xac, 0xf2, 0x92, 0xbe, 0x98, 0x7c, 0xfa, 0x4d, + 0x29, 0x66, 0x7c, 0xf0, 0xfd, 0xac, 0xa4, 0x3d, 0x9b, 0x95, 0xb4, 0x17, 0xb3, 0x92, 0xf6, 0xfb, + 0xac, 0xa4, 0x7d, 0x71, 0x51, 0x8a, 0xbd, 0xb8, 0x28, 0xc5, 0x7e, 0xbd, 0x28, 0xc5, 0x3e, 0xa9, + 0xff, 0x83, 0xc5, 0x54, 0x7f, 0x13, 0xc5, 0x5e, 0xf6, 0x53, 0xc2, 0xe2, 0x9d, 0xbf, 0x03, 0x00, + 0x00, 0xff, 0xff, 0xe5, 0x3e, 0x5c, 0x3a, 0x3d, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -1027,14 +1027,14 @@ func (this *SignalPrice) Equal(that interface{}) bool { } return true } -func (this *TotalFee) Equal(that interface{}) bool { +func (this *TotalFees) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*TotalFee) + that1, ok := that.(*TotalFees) if !ok { - that2, ok := that.(TotalFee) + that2, ok := that.(TotalFees) if ok { that1 = &that2 } else { @@ -1451,7 +1451,7 @@ func (m *SignalPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TotalFee) Marshal() (dAtA []byte, err error) { +func (m *TotalFees) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1461,12 +1461,12 @@ func (m *TotalFee) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TotalFee) MarshalTo(dAtA []byte) (int, error) { +func (m *TotalFees) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TotalFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TotalFees) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1782,7 +1782,7 @@ func (m *SignalPrice) Size() (n int) { return n } -func (m *TotalFee) Size() (n int) { +func (m *TotalFees) Size() (n int) { if m == nil { return 0 } @@ -2741,7 +2741,7 @@ func (m *SignalPrice) Unmarshal(dAtA []byte) error { } return nil } -func (m *TotalFee) Unmarshal(dAtA []byte) error { +func (m *TotalFees) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2764,10 +2764,10 @@ func (m *TotalFee) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TotalFee: wiretype end group for non-group") + return fmt.Errorf("proto: TotalFees: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TotalFee: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TotalFees: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: From fb555591938e224ffafe09f70fc645d2ab92cd3b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 12 Sep 2024 13:42:04 +0700 Subject: [PATCH 087/272] add msg deposit --- proto/tunnel/v1beta1/tx.proto | 6 +- x/tunnel/keeper/msg_server.go | 14 ++++ x/tunnel/types/msgs.go | 43 +++++++++++- x/tunnel/types/tx.pb.go | 126 +++++++++++++++++----------------- 4 files changed, 123 insertions(+), 66 deletions(-) diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index a2611707b..0813ffcef 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -137,7 +137,11 @@ message MsgDeposit { string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + repeated cosmos.base.v1beta1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; } // MsgDepositResponse defines the Msg/Deposit response type. diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index a22f2c257..9ea882fe5 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -217,6 +217,20 @@ func (ms msgServer) ManualTriggerTunnel( return &types.MsgManualTriggerTunnelResponse{}, nil } +// Deposit adds deposit to the tunnel. +func (ms msgServer) Deposit( + goCtx context.Context, + req *types.MsgDeposit, +) (*types.MsgDepositResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + + // if err := ms.Keeper.Deposit(ctx, req.Amount, req.Depositor); err != nil { + // return nil, err + // } + + return &types.MsgDepositResponse{}, nil +} + // UpdateParams updates the module params. func (ms msgServer) UpdateParams( goCtx context.Context, diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 7df3d55fd..602e0e84a 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -10,8 +10,8 @@ import ( ) var ( - _, _, _, _, _ sdk.Msg = &MsgUpdateParams{}, &MsgCreateTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{} - _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} + _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{}, &MsgDeposit{}, &MsgUpdateParams{} + _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) // NewMsgUpdateParams creates a new MsgUpdateParams instance. @@ -352,3 +352,42 @@ func (m MsgManualTriggerTunnel) ValidateBasic() error { return nil } + +// NewMsgDeposit creates a new MsgDeposit instance. +func NewMsgDeposit( + tunnelID uint64, + amount sdk.Coins, + depositor string, +) *MsgDeposit { + return &MsgDeposit{ + TunnelId: tunnelID, + Amount: amount, + Depositor: depositor, + } +} + +// Route Implements Msg. +func (m MsgDeposit) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgDeposit) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgDeposit) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Depositor)} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgDeposit) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Depositor); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) + } + + if !m.Amount.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf("invalid amount: %s", m.Amount) + } + + return nil +} diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index f86b02877..67382f7e6 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -563,7 +563,7 @@ type MsgDeposit struct { // depositor defines the deposit addresses from the tunnel. Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` // amount to be deposited by depositor. - Amount []types1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } @@ -613,7 +613,7 @@ func (m *MsgDeposit) GetDepositor() string { return "" } -func (m *MsgDeposit) GetAmount() []types1.Coin { +func (m *MsgDeposit) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } @@ -769,67 +769,67 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 952 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0xdb, 0x36, - 0x14, 0x8e, 0xe2, 0xfc, 0x32, 0x93, 0xa5, 0x8b, 0xea, 0xc5, 0xb2, 0x82, 0xd8, 0x9e, 0xb6, 0xae, - 0x4e, 0x8a, 0x48, 0x88, 0xb7, 0xee, 0x50, 0xec, 0x12, 0x27, 0x3d, 0xf8, 0x60, 0x60, 0x50, 0x3b, - 0xa0, 0xd8, 0x61, 0x01, 0x6d, 0x31, 0x0a, 0x31, 0x9b, 0x34, 0x44, 0xda, 0xa8, 0xaf, 0x3b, 0x0e, - 0x18, 0xb0, 0x7f, 0x60, 0x87, 0x9d, 0x36, 0xf4, 0x94, 0x43, 0xfe, 0x88, 0x62, 0xa7, 0x62, 0xa7, - 0xed, 0x92, 0x0d, 0xc9, 0x21, 0xc0, 0xfe, 0x80, 0x9d, 0x07, 0x91, 0xb4, 0x64, 0x33, 0x6a, 0xe3, - 0xa1, 0x40, 0x2f, 0xb6, 0xf8, 0xbe, 0xef, 0x91, 0xdf, 0xf7, 0x48, 0x3e, 0x09, 0x14, 0xf9, 0x80, - 0x10, 0xd4, 0xf5, 0x86, 0xfb, 0x6d, 0xc4, 0xe1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- 0x97, 0x2c, 0xd7, 0x04, 0xcb, 0xe3, 0x0b, 0x6a, 0x67, 0xca, 0x14, 0x98, 0xed, 0xbc, 0x1e, 0x4b, - 0xa6, 0x7a, 0x06, 0xd6, 0xa6, 0x4e, 0x7e, 0xd6, 0x69, 0x99, 0x24, 0x64, 0x9e, 0x96, 0xac, 0xf3, - 0xd8, 0x68, 0xbe, 0xbc, 0x2c, 0x1b, 0xaf, 0x2e, 0xcb, 0xc6, 0xdf, 0x97, 0x65, 0xe3, 0xc7, 0xab, - 0xf2, 0xdc, 0xab, 0xab, 0xf2, 0xdc, 0x1f, 0x57, 0xe5, 0xb9, 0xaf, 0xbd, 0x89, 0x6f, 0x94, 0x36, - 0x24, 0x81, 0xf8, 0x82, 0xea, 0xd0, 0xae, 0xd7, 0x39, 0x85, 0x98, 0x78, 0xc3, 0xba, 0xf7, 0x5c, - 0x7d, 0xef, 0xc9, 0x0f, 0x96, 0xf6, 0x92, 0x60, 0x7c, 0xfa, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x89, 0xa5, 0xa4, 0x5f, 0xf3, 0x0a, 0x00, 0x00, + // 946 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbf, 0x6f, 0x1b, 0x37, + 0x14, 0xf6, 0x59, 0xfe, 0x49, 0xbb, 0x4e, 0x7d, 0x51, 0xad, 0xd3, 0x19, 0x96, 0xd4, 0x6b, 0xd3, + 0xc8, 0x0e, 0x7c, 0x07, 0xab, 0x4d, 0x87, 0x6c, 0x96, 0x9d, 0x41, 0x83, 0x80, 0xe2, 0x92, 0x02, + 0x41, 0x87, 0x1a, 0x94, 0x8e, 0x3e, 0x13, 0x95, 0x48, 0xe1, 0x48, 0x09, 0xd1, 0x5a, 0xa0, 0x4b, + 0x81, 0x02, 0xfd, 0x07, 0x3a, 0x74, 0x6a, 0x91, 0xc9, 0x83, 0xff, 0x88, 0xa0, 0x53, 0xd0, 0xa9, + 0x93, 0x5b, 0xd8, 0x83, 0x81, 0xfe, 0x01, 0x9d, 0x8b, 0x23, 0xa9, 0x3b, 0x89, 0xba, 0x24, 0x2a, + 0x8a, 0x78, 0x91, 0xc4, 0xf7, 0x7d, 0x8f, 0xfc, 0xde, 0x47, 0xf2, 0x51, 0xa0, 0xc0, 0xfb, 0x84, + 0xa0, 0x8e, 0x37, 0x38, 0x68, 0x21, 0x0e, 0x0f, 0x3c, 0xfe, 0xdc, 0xed, 0x45, 0x94, 0x53, 0x73, + 0x43, 0x02, 0xae, 0x02, 0xec, 0x62, 0x48, 0x69, 0xd8, 0x41, 0x9e, 0x40, 0x5b, 0xfd, 0x53, 0x0f, + 0x92, 0xa1, 0xa4, 0xda, 0xf9, 0x90, 0x86, 0x54, 0xfc, 0xf4, 0xe2, 0x5f, 0x2a, 0xba, 0xad, 0xcd, + 0xdc, 0x83, 0x11, 0xec, 0x32, 0x05, 0x16, 0xdb, 0x94, 0x75, 0x29, 0x3b, 0x91, 0x59, 0x72, 0xa0, + 0xa0, 0x92, 0x1c, 0x79, 0x2d, 0xc8, 0x50, 0x92, 0xdc, 0xa6, 0x98, 0x28, 0xbc, 0xa0, 0xf0, 0x2e, + 0x0b, 0xbd, 0xc1, 0x41, 0xfc, 0xa5, 0x80, 0x4d, 0xd8, 0xc5, 0x84, 0x7a, 0xe2, 0xf3, 0x35, 0x1a, + 0x54, 0x4d, 0x02, 0x74, 0x2e, 0x72, 0xe0, 0x4e, 0x93, 0x85, 0x47, 0x11, 0x82, 0x1c, 0x3d, 0x15, + 0x88, 0x79, 0x04, 0xd6, 0x19, 0x0e, 0x09, 0xec, 0x9c, 0x60, 0x72, 0x4a, 0x99, 0x65, 0x54, 0x72, + 0xd5, 0xb5, 0x9a, 0xed, 0x4e, 0x9a, 0xe1, 0x3e, 0x11, 0x9c, 0x06, 0x39, 0xa5, 0xf5, 0x85, 0x97, + 0x97, 0xe5, 0x39, 0x7f, 0x8d, 0x25, 0x11, 0x66, 0xda, 0x60, 0x05, 0x13, 0x8e, 0xa2, 0x01, 0xec, + 0x58, 0xf3, 0x15, 0xa3, 0xba, 0xe0, 0x27, 0x63, 0xf3, 0x21, 0x58, 0x8c, 0x68, 0x9f, 0x23, 0x2b, + 0x57, 0x31, 0xaa, 0x6b, 0xb5, 0xbc, 0x2b, 0x6d, 0x75, 0x47, 0xb6, 0xba, 0x87, 0x64, 0x58, 0x5f, + 0xfd, 0xed, 0x62, 0x7f, 0xd1, 0x8f, 0x69, 0xbe, 0x64, 0x9b, 0x07, 0x60, 0x19, 0x91, 0x36, 0x0d, + 0x50, 0x64, 0x2d, 0x54, 0x8c, 0xea, 0x46, 0xad, 0xa0, 0x4b, 0x7a, 0x2c, 0x61, 0x7f, 0xc4, 0x33, + 0x87, 0xe0, 0x0e, 0x26, 0x98, 0x63, 0xd8, 0x39, 0x09, 0x50, 0x8f, 0x32, 0xcc, 0xad, 0x45, 0x51, + 0x4d, 0xd1, 0x55, 0x7e, 0xc7, 0x0e, 0x27, 0xf9, 0x47, 0x14, 0x93, 0xfa, 0xc3, 0xb8, 0x98, 0x17, + 0x7f, 0x96, 0xab, 0x21, 0xe6, 0x67, 0xfd, 0x96, 0xdb, 0xa6, 0x5d, 0xb5, 0x39, 0xea, 0x6b, 0x9f, + 0x05, 0xdf, 0x78, 0x7c, 0xd8, 0x43, 0x4c, 0x24, 0xb0, 0x5f, 0x6f, 0xce, 0xf7, 0x0c, 0x7f, 0x43, + 0x2d, 0x74, 0x2c, 0xd7, 0x31, 0x6b, 0x60, 0xb9, 0x1d, 0xbb, 0x4a, 0x23, 0x6b, 0xa9, 0x62, 0x54, + 0x57, 0xeb, 0xd6, 0xef, 0x17, 0xfb, 0x79, 0xb5, 0xea, 0x61, 0x10, 0x44, 0x88, 0xb1, 0x27, 0x3c, + 0xc2, 0x24, 0xf4, 0x47, 0xc4, 0x47, 0xf7, 0xbf, 0xbd, 0x39, 0xdf, 0x1b, 0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 0x6f, 0xa5, 0x24, 0xf3, 0x07, 0xe0, 0xfd, + 0xa9, 0x36, 0xf4, 0x51, 0x46, 0xba, 0x4e, 0xb2, 0x1f, 0xcc, 0x40, 0x4a, 0x56, 0xe9, 0x82, 0xbb, + 0x59, 0x9d, 0xe2, 0x93, 0x8c, 0x39, 0x32, 0x78, 0xb6, 0x3b, 0x1b, 0x2f, 0x59, 0xae, 0x01, 0x96, + 0x47, 0x97, 0xd9, 0xce, 0x94, 0x29, 0x30, 0xdb, 0x79, 0x3d, 0x96, 0x4c, 0xf5, 0x0c, 0xac, 0x4f, + 0x9c, 0xfc, 0xac, 0xd3, 0x32, 0x4e, 0xc8, 0x3c, 0x2d, 0x59, 0xe7, 0xb1, 0xde, 0x78, 0x79, 0x55, + 0x32, 0x5e, 0x5d, 0x95, 0x8c, 0xbf, 0xae, 0x4a, 0xc6, 0x8f, 0xd7, 0xa5, 0xb9, 0x57, 0xd7, 0xa5, + 0xb9, 0x3f, 0xae, 0x4b, 0x73, 0x5f, 0x79, 0x63, 0x97, 0xbc, 0x05, 0x49, 0x20, 0xfe, 0x6d, 0xb5, + 0x69, 0xc7, 0x6b, 0x9f, 0x41, 0x4c, 0xbc, 0x41, 0xcd, 0x7b, 0xae, 0xfe, 0x1b, 0xca, 0x1b, 0xdf, + 0x5a, 0x12, 0x8c, 0x4f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xa4, 0x3e, 0x22, 0x1f, 0x0b, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 4c2454e5c4fb5967f2a7b3cf2770210c6af98f9b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 12 Sep 2024 13:45:29 +0700 Subject: [PATCH 088/272] reorder msg --- x/tunnel/types/msgs.go | 84 +++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 75011d39a..4a2fb9581 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -10,50 +10,10 @@ import ( ) var ( - _, _, _, _, _ sdk.Msg = &MsgUpdateParams{}, &MsgCreateTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{} - _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} + _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{}, &MsgUpdateParams{} + _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) -// NewMsgUpdateParams creates a new MsgUpdateParams instance. -func NewMsgUpdateParams( - authority string, - params Params, -) *MsgUpdateParams { - return &MsgUpdateParams{ - Authority: authority, - Params: params, - } -} - -// Route Implements Msg. -func (m MsgUpdateParams) Route() string { return sdk.MsgTypeURL(&m) } - -// Type Implements Msg. -func (m MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&m) } - -// GetSignBytes implements the LegacyMsg interface. -func (m MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) -} - -// GetSigners returns the expected signers for the message. -func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Authority)} -} - -// ValidateBasic does a check on the provided data. -func (m *MsgUpdateParams) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) - } - - if err := m.Params.Validate(); err != nil { - return err - } - - return nil -} - func NewMsgCreateTunnel( signalInfos []SignalInfo, interval uint64, @@ -352,3 +312,43 @@ func (m MsgManualTriggerTunnel) ValidateBasic() error { return nil } + +// NewMsgUpdateParams creates a new MsgUpdateParams instance. +func NewMsgUpdateParams( + authority string, + params Params, +) *MsgUpdateParams { + return &MsgUpdateParams{ + Authority: authority, + Params: params, + } +} + +// Route Implements Msg. +func (m MsgUpdateParams) Route() string { return sdk.MsgTypeURL(&m) } + +// Type Implements Msg. +func (m MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Authority)} +} + +// ValidateBasic does a check on the provided data. +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) + } + + if err := m.Params.Validate(); err != nil { + return err + } + + return nil +} From 61ea71fc970c2e471f02cf850a09ec4b56c1d19a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 12 Sep 2024 13:50:00 +0700 Subject: [PATCH 089/272] . --- x/tunnel/types/msgs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 063b68345..d60c99238 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -363,6 +363,9 @@ func NewMsgUpdateParams( } } +// Route Implements Msg. +func (m MsgUpdateParams) Route() string { return sdk.MsgTypeURL(&m) } + // Type Implements Msg. func (m MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&m) } From 59e680e8ff223bfbbfff11c376dab9cd355dc03a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 12 Sep 2024 14:31:21 +0700 Subject: [PATCH 090/272] update add tunnel --- x/tunnel/keeper/msg_server.go | 27 +++++++++++++++++++++++---- x/tunnel/keeper/tunnel.go | 22 +++++++--------------- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index a22f2c257..0efb742e8 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -29,8 +29,6 @@ func (ms msgServer) CreateTunnel( ) (*types.MsgCreateTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - // TODO: check deposit with params, transfer deposit to module account - // validate signal infos and interval params := ms.Keeper.GetParams(ctx) if len(req.SignalInfos) > int(params.MaxSignals) { @@ -40,12 +38,33 @@ func (ms msgServer) CreateTunnel( return nil, types.ErrMinIntervalExceeded } - // Add a new tunnel - tunnel, err := ms.Keeper.AddTunnel(ctx, req.Route, req.Encoder, req.SignalInfos, req.Interval, req.Creator) + // Get the next tunnel ID + id := ms.Keeper.GetTunnelCount(ctx) + newID := id + 1 + + // Generate a new fee payer account + feePayer, err := ms.Keeper.GenerateAccount(ctx, fmt.Sprintf("%d", newID)) if err != nil { return nil, err } + // TODO: check deposit with params, transfer deposit to module account + + // Add a new tunnel + tunnel := ms.Keeper.AddTunnel( + ctx, + newID, + req.Route, + req.Encoder, + feePayer, + req.SignalInfos, + req.Interval, + req.Creator, + ) + + // Increment the tunnel count + ms.Keeper.SetTunnelCount(ctx, newID) + // Emit an event event := sdk.NewEvent( types.EventTypeCreateTunnel, diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 9271c1e0e..00eefdd30 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -12,35 +12,28 @@ import ( // AddTunnel adds a new tunnel func (k Keeper) AddTunnel( ctx sdk.Context, + tunnelID uint64, route *codectypes.Any, encoder types.Encoder, + feePayer sdk.AccAddress, signalInfos []types.SignalInfo, interval uint64, creator string, -) (types.Tunnel, error) { - id := k.GetTunnelCount(ctx) - newID := id + 1 - - // Generate a new tunnel account - acc, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", newID)) - if err != nil { - return types.Tunnel{}, err - } - +) types.Tunnel { // Set the signal prices info var signalPrices []types.SignalPrice for _, si := range signalInfos { signalPrices = append(signalPrices, types.NewSignalPrice(si.SignalID, 0)) } - k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(newID, signalPrices, 0)) + k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(tunnelID, signalPrices, 0)) // Create a new tunnel tunnel := types.NewTunnel( - newID, + tunnelID, 0, route, encoder, - acc.String(), + feePayer.String(), signalInfos, interval, false, @@ -48,9 +41,8 @@ func (k Keeper) AddTunnel( creator, ) k.SetTunnel(ctx, tunnel) - k.SetTunnelCount(ctx, tunnel.ID) - return tunnel, nil + return tunnel } // EditTunnel edits a tunnel From 7b0cd89686ef308941998733b0e6e7327104f18e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 12 Sep 2024 15:34:10 +0700 Subject: [PATCH 091/272] init deposit --- proto/tunnel/v1beta1/tunnel.proto | 2 +- x/tunnel/keeper/deposit.go | 98 ++++++++++++++--- x/tunnel/keeper/msg_server.go | 21 +++- x/tunnel/types/deposit.go | 12 +++ x/tunnel/types/errors.go | 2 + x/tunnel/types/keys.go | 10 ++ x/tunnel/types/tunnel.pb.go | 170 +++++++++++++++--------------- 7 files changed, 211 insertions(+), 104 deletions(-) create mode 100644 x/tunnel/types/deposit.go diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 9341f41e8..91825ed7c 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -49,7 +49,7 @@ message Deposit { option (gogoproto.equal) = true; // tunnel_id defines the unique id of the tunnel. - uint64 tunnel_id = 1; + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // depositor defines the deposit addresses from the proposals. string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // amount to be deposited by depositor. diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 5caebcdad..96ed51c72 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -3,27 +3,13 @@ package keeper import ( "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// Deposit creates a new deposit for the tunnel module. -func (k Keeper) validateInitialDeposit(ctx sdk.Context, params types.Params, initialDeposit sdk.Coins) error { - if !initialDeposit.IsValid() || initialDeposit.IsAnyNegative() { - return errors.Wrap(sdkerrors.ErrInvalidCoins, initialDeposit.String()) - } - - minDepositCoins := k.GetParams(ctx).MinDeposit - if !initialDeposit.IsAllGTE(minDepositCoins) { - return errors.Wrapf(types.ErrMinDepositTooSmall, "was (%s), need (%s)", initialDeposit, minDepositCoins) - } - - return nil -} - // validateDepositDenom validates if the deposit denom is accepted by the tunnel module. -func (k Keeper) validateDepositDenom(params types.Params, depositAmount sdk.Coins) error { +func (k Keeper) validateDepositDenom(ctx sdk.Context, depositAmount sdk.Coins) error { + params := k.GetParams(ctx) denoms := make([]string, 0, len(params.MinDeposit)) acceptedDenoms := make(map[string]bool, len(params.MinDeposit)) for _, coin := range params.MinDeposit { @@ -35,7 +21,7 @@ func (k Keeper) validateDepositDenom(params types.Params, depositAmount sdk.Coin if _, ok := acceptedDenoms[coin.Denom]; !ok { return errors.Wrapf( types.ErrInvalidDepositDenom, - "deposited %s, but gov accepts only the following denom(s): %v", + "deposited %s, but tunnel accepts only the following denom(s): %v", depositAmount, denoms, ) @@ -44,3 +30,81 @@ func (k Keeper) validateDepositDenom(params types.Params, depositAmount sdk.Coin return nil } + +// AddDeposit adds a deposit to a tunnel +func (k Keeper) AddDeposit( + ctx sdk.Context, + tunnelID uint64, + depositorAddr sdk.AccAddress, + depositAmount sdk.Coins, +) error { + tunnel, err := k.GetTunnel(ctx, tunnelID) + if err != nil { + return err + } + + if err := k.validateDepositDenom(ctx, depositAmount); err != nil { + return err + } + + // Transfer the deposit from the depositor to the tunnel module account + if err := k.bankKeeper.SendCoinsFromAccountToModule( + ctx, + depositorAddr, + types.ModuleName, + depositAmount, + ); err != nil { + return err + } + + // Update the depositor's deposit + deposit, found := k.GetDeposit(ctx, tunnelID, depositorAddr) + if !found { + deposit = types.NewDeposit(tunnelID, depositorAddr, depositAmount) + } else { + deposit.Amount = deposit.Amount.Add(depositAmount...) + } + k.SetDeposit(ctx, deposit) + + // Update the tunnel's total deposit + tunnel.TotalDeposit = tunnel.TotalDeposit.Add(depositAmount...) + k.SetTunnel(ctx, tunnel) + + return nil +} + +// SetDeposit sets a deposit in the store +func (k Keeper) SetDeposit(ctx sdk.Context, deposit types.Deposit) { + ctx.KVStore(k.storeKey). + Set(types.TunnelDepositStoreKey(deposit.TunnelID, sdk.MustAccAddressFromBech32(deposit.Depositor)), k.cdc.MustMarshal(&deposit)) +} + +// GetDeposit retrieves a deposit by its tunnel ID and depositor address +func (k Keeper) GetDeposit( + ctx sdk.Context, + tunnelID uint64, + depositorAddr sdk.AccAddress, +) (deposit types.Deposit, found bool) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelDepositStoreKey(tunnelID, depositorAddr)) + if bz == nil { + return types.Deposit{}, false + } + + k.cdc.MustUnmarshal(bz, &deposit) + return deposit, true +} + +// GetDeposits retrieves all deposits for a tunnel +func (k Keeper) GetDeposits(ctx sdk.Context, tunnelID uint64) []types.Deposit { + var deposits []types.Deposit + iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.TunnelDepositsStoreKey(tunnelID)) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var deposit types.Deposit + k.cdc.MustUnmarshal(iterator.Value(), &deposit) + deposits = append(deposits, deposit) + } + + return deposits +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 756c748ae..dcef0025f 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -48,7 +48,21 @@ func (ms msgServer) CreateTunnel( return nil, err } - // TODO: check deposit with params, transfer deposit to module account + creator, err := sdk.AccAddressFromBech32(req.Creator) + if err != nil { + return nil, err + } + + // Check if the creator has enough funds to deposit + balances := ms.bankKeeper.GetAllBalances(ctx, creator) + if balances.IsAllLT(req.InitialDeposit) { + return nil, sdkerrors.Wrapf( + types.ErrInsufficientFunds, + "creator %s has insufficient funds to deposit %s", + req.Creator, + req.InitialDeposit, + ) + } // Add a new tunnel tunnel := ms.Keeper.AddTunnel( @@ -62,6 +76,11 @@ func (ms msgServer) CreateTunnel( req.Creator, ) + // Deposit the initial deposit to the tunnel + if err := ms.Keeper.AddDeposit(ctx, newID, creator, req.InitialDeposit); err != nil { + return nil, err + } + // Increment the tunnel count ms.Keeper.SetTunnelCount(ctx, newID) diff --git a/x/tunnel/types/deposit.go b/x/tunnel/types/deposit.go new file mode 100644 index 000000000..3d2554e1c --- /dev/null +++ b/x/tunnel/types/deposit.go @@ -0,0 +1,12 @@ +package types + +import sdk "github.com/cosmos/cosmos-sdk/types" + +// Deposit represents a deposit from a user to a tunnel. +func NewDeposit(tunnelID uint64, depositor sdk.AccAddress, amount sdk.Coins) Deposit { + return Deposit{ + TunnelID: tunnelID, + Depositor: depositor.String(), + Amount: amount, + } +} diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index c05fe5707..0492d8f3a 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -20,4 +20,6 @@ var ( ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") ErrMinDepositTooSmall = errorsmod.Register(ModuleName, 14, "min deposit too small") ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") + ErrDepositNotFound = errorsmod.Register(ModuleName, 16, "deposit not found") + ErrInsufficientFunds = errorsmod.Register(ModuleName, 17, "insufficient funds") ) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 932530503..e5ac220df 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -38,6 +38,8 @@ var ( SignalPricesInfoStoreKeyPrefix = []byte{0x13} + DepositStoreKeyPrefix = []byte{0x14} + ParamsKey = []byte{0x90} ) @@ -60,3 +62,11 @@ func TunnelPacketStoreKey(tunnelID uint64, packetID uint64) []byte { func SignalPricesInfoStoreKey(tunnelID uint64) []byte { return append(SignalPricesInfoStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } + +func TunnelDepositsStoreKey(tunnelID uint64) []byte { + return append(DepositStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) +} + +func TunnelDepositStoreKey(tunnelID uint64, depositor sdk.AccAddress) []byte { + return append(TunnelDepositsStoreKey(tunnelID), depositor.Bytes()...) +} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 1d747da90..ddaeb2c7f 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -239,7 +239,7 @@ func (m *SignalInfo) GetHardDeviationBPS() uint64 { // Deposit defines an amount deposited by an account address to the tunnel. type Deposit struct { // tunnel_id defines the unique id of the tunnel. - TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // depositor defines the deposit addresses from the proposals. Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` // amount to be deposited by depositor. @@ -279,9 +279,9 @@ func (m *Deposit) XXX_DiscardUnknown() { var xxx_messageInfo_Deposit proto.InternalMessageInfo -func (m *Deposit) GetTunnelId() uint64 { +func (m *Deposit) GetTunnelID() uint64 { if m != nil { - return m.TunnelId + return m.TunnelID } return 0 } @@ -829,80 +829,80 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 1167 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0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e, 0x52, 0x79, 0xc5, - 0x5f, 0x4c, 0x3e, 0xfa, 0xa6, 0x14, 0xd3, 0x3f, 0x78, 0x3a, 0x2b, 0x29, 0xcf, 0x66, 0x25, 0xe5, - 0xc5, 0xac, 0xa4, 0xfc, 0x31, 0x2b, 0x29, 0x5f, 0x1c, 0x97, 0x62, 0x2f, 0x8e, 0x4b, 0xb1, 0xdf, - 0x8e, 0x4b, 0xb1, 0x4f, 0xb4, 0x7f, 0x20, 0x4c, 0xf9, 0x0b, 0x9c, 0xeb, 0xb2, 0x97, 0xe2, 0x11, - 0xef, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x50, 0x78, 0xc2, 0xe3, 0x98, 0x0b, 0x00, 0x00, + // 1164 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0xda, 0x8e, 0x63, 0x3f, 0xa7, 0x96, 0xbf, 0x53, 0x7f, 0x9b, 0xad, 0x03, 0xb6, 0x95, + 0x93, 0xa9, 0x14, 0x6f, 0x1b, 0xd4, 0x08, 0xe5, 0x84, 0x7f, 0x45, 0x5d, 0x55, 0x24, 0x66, 0x6d, + 0x24, 0xc4, 0x65, 0xb5, 0xde, 0x1d, 0x3b, 0x4b, 0xed, 0x1d, 0xb3, 0x33, 0x8e, 0x9a, 0x23, 0xb7, + 0x2a, 0x27, 0xfe, 0x81, 0x20, 0x04, 0x42, 0x54, 0x9c, 0x40, 0xca, 0x7f, 0x80, 0x90, 0xaa, 0x9e, + 0x2a, 0x4e, 0x1c, 0x90, 0x41, 0xce, 0xa1, 0xfc, 0x0d, 0x9c, 0xd0, 0xce, 0xcc, 0xda, 0x71, 0x9a, + 0x28, 0x0d, 0x02, 0xa9, 0x17, 0x7b, 0xdf, 0xfb, 0xbc, 0x79, 0x3f, 0x3e, 0xef, 0xbd, 0x9d, 0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1, 0xc0, 0xf2, 0xdf, 0xec, 0x3c, 0x7f, 0x56, 0x00, 0xda, 0x6e, 0xdf, + 0xb3, 0x06, 0xba, 0xd7, 0x23, 0xe8, 0x1d, 0x48, 0x51, 0x2e, 0xcd, 0x73, 0x5b, 0x99, 0x4e, 0x8a, + 0x49, 0x69, 0xd2, 0x30, 0x92, 0x02, 0xd6, 0x1d, 0x54, 0x03, 0x44, 0x49, 0x8f, 0x99, 0x0e, 0x3e, + 0x70, 0x45, 0x2a, 0xdd, 0x91, 0x88, 0x1e, 0xaf, 0xe5, 0xa6, 0x93, 0x62, 0xb6, 0x4d, 0x7a, 0xac, + 0x11, 0x82, 0xb5, 0x56, 0xdb, 0xc8, 0xd2, 0x05, 0xcd, 0x88, 0x06, 0x3e, 0xf6, 0x2d, 0xdf, 0x39, + 0xe7, 0x23, 0x36, 0xf7, 0xf1, 0xc0, 0xf2, 0x9d, 0x45, 0x1f, 0xfb, 0x0b, 0x9a, 0x11, 0xdd, 0x8e, + 0xff, 0xf9, 0x55, 0x51, 0x59, 0xff, 0x4d, 0x81, 0xe5, 0x06, 0x1e, 0x11, 0xea, 0xb2, 0xa0, 0x08, + 0x31, 0xcc, 0x61, 0x11, 0x71, 0x51, 0x44, 0x87, 0x2b, 0x83, 0x22, 0x04, 0xac, 0x3b, 0x68, 0x0b, + 0x52, 0x8e, 0x38, 0x45, 0x7c, 0xc1, 0x5c, 0x4d, 0xfd, 0xe5, 0x64, 0x23, 0x27, 0x87, 0x57, 0x32, + 0xd6, 0x66, 0xbe, 0xeb, 0xf5, 0x8d, 0xb9, 0x29, 0xda, 0x87, 0x84, 0x35, 0x24, 0x63, 0x8f, 0xa9, + 0xb1, 0x52, 0xac, 0x9c, 0xde, 0xbc, 0x5d, 0x91, 0x27, 0x82, 0xdd, 0x08, 0x77, 0xa8, 0x52, 0x27, + 0xae, 0x57, 0xbb, 0xff, 0x6c, 0x52, 0x8c, 0x7c, 0xff, 0x7b, 0xb1, 0xdc, 0x77, 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0x83, 0x11, 0x66, 0x0d, 0x4c, 0xd9, 0x49, 0x35, 0xf9, 0x1f, 0x75, 0x6f, 0x85, 0x87, 0x09, + 0x07, 0x72, 0x0d, 0x52, 0x2e, 0x35, 0x2d, 0x9b, 0xb9, 0x07, 0x58, 0x4d, 0x95, 0x94, 0x72, 0xd2, + 0x48, 0xba, 0xb4, 0xca, 0x65, 0xf4, 0x36, 0x80, 0xed, 0x63, 0x8b, 0x61, 0xc7, 0xb4, 0x98, 0x0a, + 0x25, 0xa5, 0x1c, 0x33, 0x52, 0x52, 0x53, 0x65, 0x68, 0x13, 0x96, 0xb9, 0x40, 0x7c, 0x35, 0x7d, + 0x05, 0x91, 0xa1, 0xa1, 0x9c, 0x99, 0x9f, 0x14, 0xc8, 0x0a, 0xaa, 0x5a, 0xbe, 0x6b, 0x63, 0x1a, + 0x2e, 0xf8, 0xeb, 0xee, 0xc6, 0x0e, 0xdc, 0x90, 0xdd, 0x18, 0xf1, 0xf3, 0x6a, 0x94, 0x93, 0xb5, + 0x76, 0x71, 0x3b, 0x78, 0x0c, 0xd9, 0x0f, 0xd9, 0x45, 0x11, 0x16, 0x6d, 0xc1, 0xea, 0xc0, 0xa2, + 0xcc, 0x0c, 0xbb, 0x60, 0x32, 0x77, 0x88, 0x29, 0xb3, 0x86, 0x23, 0x3e, 0x89, 0x31, 0xe3, 0xff, + 0x01, 0xac, 0x4b, 0xb4, 0x13, 0x82, 0xb2, 0x8a, 0x0e, 0xa4, 0xcf, 0x04, 0xb8, 0xce, 0x0b, 0x2a, + 0x07, 0x4b, 0x3c, 0x71, 0xb9, 0x0a, 0x42, 0x90, 0x5e, 0x9f, 0x28, 0x90, 0xea, 0x04, 0x2d, 0xda, + 0xc1, 0x98, 0xa2, 0x31, 0x64, 0xc5, 0x58, 0x8c, 0x2c, 0xfb, 0x11, 0x66, 0x66, 0x0f, 0x63, 0x55, + 0xb9, 0x6a, 0x32, 0xee, 0x5e, 0x77, 0x32, 0x8c, 0x0c, 0x0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, 0xdf, 0x29, + 0xb0, 0x2c, 0xef, 0x13, 0x74, 0x17, 0x6e, 0x36, 0x77, 0xeb, 0x7b, 0x8d, 0xa6, 0x61, 0x7e, 0xb4, + 0xdb, 0x6e, 0x35, 0xeb, 0xfa, 0x8e, 0xde, 0x6c, 0x64, 0x23, 0xf9, 0xd5, 0xa3, 0xe3, 0xd2, 0x45, + 0x10, 0x7a, 0x0f, 0x56, 0x43, 0xf5, 0x8e, 0xfe, 0x71, 0xb3, 0x61, 0xb6, 0xf6, 0xf4, 0xdd, 0x8e, + 0x59, 0xad, 0xe9, 0x59, 0x25, 0xbf, 0x76, 0x74, 0x5c, 0xba, 0x0c, 0x46, 0x77, 0x20, 0x1b, 0x42, + 0x1d, 0xbd, 0xfe, 0x90, 0x1f, 0x89, 0xe6, 0x73, 0x47, 0xc7, 0xa5, 0x57, 0xf4, 0xf9, 0xf8, 0x93, + 0x6f, 0x0a, 0x91, 0xda, 0x07, 0x4f, 0xa7, 0x05, 0xe5, 0xd9, 0xb4, 0xa0, 0xbc, 0x98, 0x16, 0x94, + 0x3f, 0xa6, 0x05, 0xe5, 0x8b, 0xd3, 0x42, 0xe4, 0xc5, 0x69, 0x21, 0xf2, 0xeb, 0x69, 0x21, 0xf2, + 0x89, 0xf6, 0x1a, 0x83, 0x29, 0xbf, 0xc7, 0xf9, 0x5c, 0x76, 0x13, 0xdc, 0xe2, 0xdd, 0xbf, 0x03, + 0x00, 0x00, 0xff, 0xff, 0xf7, 0x19, 0x60, 0xf5, 0xa6, 0x0b, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -1008,7 +1008,7 @@ func (this *Deposit) Equal(that interface{}) bool { } else if this == nil { return false } - if this.TunnelId != that1.TunnelId { + if this.TunnelID != that1.TunnelID { return false } if this.Depositor != that1.Depositor { @@ -1435,8 +1435,8 @@ func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.TunnelId != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelId)) + if m.TunnelID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) i-- dAtA[i] = 0x8 } @@ -1892,8 +1892,8 @@ func (m *Deposit) Size() (n int) { } var l int _ = l - if m.TunnelId != 0 { - n += 1 + sovTunnel(uint64(m.TunnelId)) + if m.TunnelID != 0 { + n += 1 + sovTunnel(uint64(m.TunnelID)) } l = len(m.Depositor) if l > 0 { @@ -2464,9 +2464,9 @@ func (m *Deposit) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) } - m.TunnelId = 0 + m.TunnelID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2476,7 +2476,7 @@ func (m *Deposit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TunnelId |= uint64(b&0x7F) << shift + m.TunnelID |= uint64(b&0x7F) << shift if b < 0x80 { break } From 7b3ea794dc12b1e61fc9be4b44e90d8aafd5b91f Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 12 Sep 2024 15:36:58 +0700 Subject: [PATCH 092/272] update add tunnel --- x/tunnel/keeper/msg_server.go | 20 ++++---------------- x/tunnel/keeper/tunnel.go | 23 +++++++++++++++++------ 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 0efb742e8..2df17e615 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -38,32 +38,20 @@ func (ms msgServer) CreateTunnel( return nil, types.ErrMinIntervalExceeded } - // Get the next tunnel ID - id := ms.Keeper.GetTunnelCount(ctx) - newID := id + 1 - - // Generate a new fee payer account - feePayer, err := ms.Keeper.GenerateAccount(ctx, fmt.Sprintf("%d", newID)) - if err != nil { - return nil, err - } - // TODO: check deposit with params, transfer deposit to module account // Add a new tunnel - tunnel := ms.Keeper.AddTunnel( + tunnel, err := ms.Keeper.AddTunnel( ctx, - newID, req.Route, req.Encoder, - feePayer, req.SignalInfos, req.Interval, req.Creator, ) - - // Increment the tunnel count - ms.Keeper.SetTunnelCount(ctx, newID) + if err != nil { + return nil, err + } // Emit an event event := sdk.NewEvent( diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 00eefdd30..730bc3d38 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -12,24 +12,32 @@ import ( // AddTunnel adds a new tunnel func (k Keeper) AddTunnel( ctx sdk.Context, - tunnelID uint64, route *codectypes.Any, encoder types.Encoder, - feePayer sdk.AccAddress, signalInfos []types.SignalInfo, interval uint64, creator string, -) types.Tunnel { +) (*types.Tunnel, error) { + // Get the next tunnel ID + id := k.GetTunnelCount(ctx) + newID := id + 1 + + // Generate a new fee payer account + feePayer, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", newID)) + if err != nil { + return nil, err + } + // Set the signal prices info var signalPrices []types.SignalPrice for _, si := range signalInfos { signalPrices = append(signalPrices, types.NewSignalPrice(si.SignalID, 0)) } - k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(tunnelID, signalPrices, 0)) + k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(newID, signalPrices, 0)) // Create a new tunnel tunnel := types.NewTunnel( - tunnelID, + newID, 0, route, encoder, @@ -42,7 +50,10 @@ func (k Keeper) AddTunnel( ) k.SetTunnel(ctx, tunnel) - return tunnel + // Increment the tunnel count + k.SetTunnelCount(ctx, newID) + + return &tunnel, nil } // EditTunnel edits a tunnel From d504618d4930738583ac8c72ca8584e30d5dadf9 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 12 Sep 2024 15:39:53 +0700 Subject: [PATCH 093/272] update param --- x/tunnel/keeper/tunnel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index ba20454b6..b09c1ed42 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -16,7 +16,7 @@ func (k Keeper) AddTunnel( encoder types.Encoder, signalInfos []types.SignalInfo, interval uint64, - creator string, + creator sdk.AccAddress, ) (*types.Tunnel, error) { // Get the next tunnel ID id := k.GetTunnelCount(ctx) @@ -47,7 +47,7 @@ func (k Keeper) AddTunnel( sdk.NewCoins(), false, ctx.BlockTime().Unix(), - creator, + creator.String(), ) k.SetTunnel(ctx, tunnel) From efd48760b422c3f86c6a4838aa8e0aed3f92b654 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 12 Sep 2024 15:43:34 +0700 Subject: [PATCH 094/272] update add deposit msg --- proto/tunnel/v1beta1/tx.proto | 3 +- x/tunnel/keeper/msg_server.go | 13 +++- x/tunnel/types/tx.pb.go | 142 +++++++++++++++++----------------- 3 files changed, 82 insertions(+), 76 deletions(-) diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 0813ffcef..13d59dbe1 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -131,7 +131,8 @@ message MsgDeposit { option (amino.name) = "tunnel/MsgDeposit"; // tunnel_id defines the unique id of the tunnel. - uint64 tunnel_id = 1 [(gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; + uint64 tunnel_id = 1 + [(gogoproto.customname) = "TunnelID", (gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; // depositor defines the deposit addresses from the tunnel. string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 60ce49f4e..015d1751b 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -248,11 +248,16 @@ func (ms msgServer) Deposit( goCtx context.Context, req *types.MsgDeposit, ) (*types.MsgDepositResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) + ctx := sdk.UnwrapSDKContext(goCtx) - // if err := ms.Keeper.Deposit(ctx, req.Amount, req.Depositor); err != nil { - // return nil, err - // } + depositor, err := sdk.AccAddressFromBech32(req.Depositor) + if err != nil { + return nil, err + } + + if err := ms.Keeper.AddDeposit(ctx, req.TunnelID, depositor, req.Amount); err != nil { + return nil, err + } return &types.MsgDepositResponse{}, nil } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 67382f7e6..51e151c5b 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -559,7 +559,7 @@ var xxx_messageInfo_MsgManualTriggerTunnelResponse proto.InternalMessageInfo // MsgDeposit defines a message to submit a deposit to an existing tunnel. type MsgDeposit struct { // tunnel_id defines the unique id of the tunnel. - TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` // depositor defines the deposit addresses from the tunnel. Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` // amount to be deposited by depositor. @@ -599,9 +599,9 @@ func (m *MsgDeposit) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo -func (m *MsgDeposit) GetTunnelId() uint64 { +func (m *MsgDeposit) GetTunnelID() uint64 { if m != nil { - return m.TunnelId + return m.TunnelID } return 0 } @@ -769,67 +769,67 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 946 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbf, 0x6f, 0x1b, 0x37, - 0x14, 0xf6, 0x59, 0xfe, 0x49, 0xbb, 0x4e, 0x7d, 0x51, 0xad, 0xd3, 0x19, 0x96, 0xd4, 0x6b, 0xd3, - 0xc8, 0x0e, 0x7c, 0x07, 0xab, 0x4d, 0x87, 0x6c, 0x96, 0x9d, 0x41, 0x83, 0x80, 0xe2, 0x92, 0x02, - 0x41, 0x87, 0x1a, 0x94, 0x8e, 0x3e, 0x13, 0x95, 0x48, 0xe1, 0x48, 0x09, 0xd1, 0x5a, 0xa0, 0x4b, - 0x81, 0x02, 0xfd, 0x07, 0x3a, 0x74, 0x6a, 0x91, 0xc9, 0x83, 0xff, 0x88, 0xa0, 0x53, 0xd0, 0xa9, - 0x93, 0x5b, 0xd8, 0x83, 0x81, 0xfe, 0x01, 0x9d, 0x8b, 0x23, 0xa9, 0x3b, 0x89, 0xba, 0x24, 0x2a, - 0x8a, 0x78, 0x91, 0xc4, 0xf7, 0x7d, 0x8f, 0xfc, 0xde, 0x47, 0xf2, 0x51, 0xa0, 0xc0, 0xfb, 0x84, - 0xa0, 0x8e, 0x37, 0x38, 0x68, 0x21, 0x0e, 0x0f, 0x3c, 0xfe, 0xdc, 0xed, 0x45, 0x94, 0x53, 0x73, - 0x43, 0x02, 0xae, 0x02, 0xec, 0x62, 0x48, 0x69, 0xd8, 0x41, 0x9e, 0x40, 0x5b, 0xfd, 0x53, 0x0f, - 0x92, 0xa1, 0xa4, 0xda, 0xf9, 0x90, 0x86, 0x54, 0xfc, 0xf4, 0xe2, 0x5f, 0x2a, 0xba, 0xad, 0xcd, - 0xdc, 0x83, 0x11, 0xec, 0x32, 0x05, 0x16, 0xdb, 0x94, 0x75, 0x29, 0x3b, 0x91, 0x59, 0x72, 0xa0, - 0xa0, 0x92, 0x1c, 0x79, 0x2d, 0xc8, 0x50, 0x92, 0xdc, 0xa6, 0x98, 0x28, 0xbc, 0xa0, 0xf0, 0x2e, - 0x0b, 0xbd, 0xc1, 0x41, 0xfc, 0xa5, 0x80, 0x4d, 0xd8, 0xc5, 0x84, 0x7a, 0xe2, 0xf3, 0x35, 0x1a, - 0x54, 0x4d, 0x02, 0x74, 0x2e, 0x72, 0xe0, 0x4e, 0x93, 0x85, 0x47, 0x11, 0x82, 0x1c, 0x3d, 0x15, - 0x88, 0x79, 0x04, 0xd6, 0x19, 0x0e, 0x09, 0xec, 0x9c, 0x60, 0x72, 0x4a, 0x99, 0x65, 0x54, 0x72, - 0xd5, 0xb5, 0x9a, 0xed, 0x4e, 0x9a, 0xe1, 0x3e, 0x11, 0x9c, 0x06, 0x39, 0xa5, 0xf5, 0x85, 0x97, - 0x97, 0xe5, 0x39, 0x7f, 0x8d, 0x25, 0x11, 0x66, 0xda, 0x60, 0x05, 0x13, 0x8e, 0xa2, 0x01, 0xec, - 0x58, 0xf3, 0x15, 0xa3, 0xba, 0xe0, 0x27, 0x63, 0xf3, 0x21, 0x58, 0x8c, 0x68, 0x9f, 0x23, 0x2b, - 0x57, 0x31, 0xaa, 0x6b, 0xb5, 0xbc, 0x2b, 0x6d, 0x75, 0x47, 0xb6, 0xba, 0x87, 0x64, 0x58, 0x5f, - 0xfd, 0xed, 0x62, 0x7f, 0xd1, 0x8f, 0x69, 0xbe, 0x64, 0x9b, 0x07, 0x60, 0x19, 0x91, 0x36, 0x0d, - 0x50, 0x64, 0x2d, 0x54, 0x8c, 0xea, 0x46, 0xad, 0xa0, 0x4b, 0x7a, 0x2c, 0x61, 0x7f, 0xc4, 0x33, - 0x87, 0xe0, 0x0e, 0x26, 0x98, 0x63, 0xd8, 0x39, 0x09, 0x50, 0x8f, 0x32, 0xcc, 0xad, 0x45, 0x51, - 0x4d, 0xd1, 0x55, 0x7e, 0xc7, 0x0e, 0x27, 0xf9, 0x47, 0x14, 0x93, 0xfa, 0xc3, 0xb8, 0x98, 0x17, - 0x7f, 0x96, 0xab, 0x21, 0xe6, 0x67, 0xfd, 0x96, 0xdb, 0xa6, 0x5d, 0xb5, 0x39, 0xea, 0x6b, 0x9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 0x8c, 0x4f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xa4, 0x3e, 0x22, 0x1f, 0x0b, - 0x00, 0x00, + // 949 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xae, 0x9b, 0xfe, 0x9c, 0x96, 0x2e, 0xf5, 0x86, 0xc6, 0x71, 0x55, 0x27, 0x18, 0x96, 0x4d, + 0xbb, 0xaa, 0xad, 0x06, 0x96, 0xc3, 0x72, 0x6a, 0xda, 0x3d, 0xe4, 0x10, 0x09, 0x79, 0x17, 0x69, + 0xc5, 0x81, 0x6a, 0x12, 0x4f, 0xdd, 0x11, 0xc9, 0x4c, 0xe4, 0x99, 0x44, 0x9b, 0x2b, 0x47, 0x24, + 0x24, 0xf8, 0x03, 0x38, 0x70, 0x02, 0xed, 0xa9, 0x87, 0xfe, 0x11, 0x2b, 0x4e, 0x2b, 0x4e, 0x9c, + 0x0a, 0x6a, 0x0f, 0x95, 0xf8, 0x03, 0x38, 0x23, 0xcf, 0x4c, 0x6c, 0xc7, 0xf1, 0xee, 0x06, 0x21, + 0x7a, 0x49, 0x32, 0xf3, 0x7d, 0xef, 0xcd, 0xf7, 0x3e, 0xbf, 0x79, 0x0e, 0x28, 0xf1, 0x01, 0x21, + 0xa8, 0xeb, 0x0e, 0x0f, 0xda, 0x88, 0xc3, 0x03, 0x97, 0x3f, 0x77, 0xfa, 0x21, 0xe5, 0x54, 0xdf, + 0x90, 0x80, 0xa3, 0x00, 0xb3, 0x1c, 0x50, 0x1a, 0x74, 0x91, 0x2b, 0xd0, 0xf6, 0xe0, 0xd4, 0x85, + 0x64, 0x24, 0xa9, 0x66, 0x31, 0xa0, 0x01, 0x15, 0x3f, 0xdd, 0xe8, 0x97, 0xda, 0xdd, 0xce, 0x64, + 0xee, 0xc3, 0x10, 0xf6, 0x98, 0x02, 0xcb, 0x1d, 0xca, 0x7a, 0x94, 0x9d, 0xc8, 0x28, 0xb9, 0x50, + 0x90, 0x25, 0x57, 0x6e, 0x1b, 0x32, 0x14, 0x07, 0x77, 0x28, 0x26, 0x0a, 0x2f, 0x29, 0xbc, 0xc7, + 0x02, 0x77, 0x78, 0x10, 0x7d, 0x29, 0x60, 0x13, 0xf6, 0x30, 0xa1, 0xae, 0xf8, 0x7c, 0x8d, 0x06, + 0x55, 0x93, 0x00, 0xed, 0x8b, 0x02, 0xb8, 0xd3, 0x62, 0xc1, 0x51, 0x88, 0x20, 0x47, 0x4f, 0x05, + 0xa2, 0x1f, 0x81, 0x75, 0x86, 0x03, 0x02, 0xbb, 0x27, 0x98, 0x9c, 0x52, 0x66, 0x68, 0xd5, 0x42, + 0x6d, 0xad, 0x6e, 0x3a, 0x93, 0x66, 0x38, 0x4f, 0x04, 0xa7, 0x49, 0x4e, 0x69, 0x63, 0xe1, 0xe5, + 0x65, 0x65, 0xce, 0x5b, 0x63, 0xf1, 0x0e, 0xd3, 0x4d, 0xb0, 0x82, 0x09, 0x47, 0xe1, 0x10, 0x76, + 0x8d, 0xf9, 0xaa, 0x56, 0x5b, 0xf0, 0xe2, 0xb5, 0xfe, 0x10, 0x2c, 0x86, 0x74, 0xc0, 0x91, 0x51, + 0xa8, 0x6a, 0xb5, 0xb5, 0x7a, 0xd1, 0x91, 0xb6, 0x3a, 0x63, 0x5b, 0x9d, 0x43, 0x32, 0x6a, 0xac, + 0xfe, 0x7a, 0xb1, 0xbf, 0xe8, 0x45, 0x34, 0x4f, 0xb2, 0xf5, 0x03, 0xb0, 0x8c, 0x48, 0x87, 0xfa, + 0x28, 0x34, 0x16, 0xaa, 0x5a, 0x6d, 0xa3, 0x5e, 0xca, 0x4a, 0x7a, 0x2c, 0x61, 0x6f, 0xcc, 0xd3, + 0x47, 0xe0, 0x0e, 0x26, 0x98, 0x63, 0xd8, 0x3d, 0xf1, 0x51, 0x9f, 0x32, 0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xd6, 0xdc, + 0xab, 0x6b, 0x6b, 0xee, 0xf7, 0x6b, 0x6b, 0xee, 0x4b, 0x37, 0x75, 0xc9, 0xdb, 0x90, 0xf8, 0xe2, + 0x9f, 0x57, 0x87, 0x76, 0xdd, 0xce, 0x19, 0xc4, 0xc4, 0x1d, 0xd6, 0xdd, 0xe7, 0xea, 0x7f, 0xa2, + 0xbc, 0xf1, 0xed, 0x25, 0xc1, 0xf8, 0xf8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x23, 0xbf, + 0xc5, 0x2b, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1542,8 +1542,8 @@ func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.TunnelId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.TunnelId)) + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) i-- dAtA[i] = 0x8 } @@ -1809,8 +1809,8 @@ func (m *MsgDeposit) Size() (n int) { } var l int _ = l - if m.TunnelId != 0 { - n += 1 + sovTx(uint64(m.TunnelId)) + if m.TunnelID != 0 { + n += 1 + sovTx(uint64(m.TunnelID)) } l = len(m.Depositor) if l > 0 { @@ -2845,9 +2845,9 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) } - m.TunnelId = 0 + m.TunnelID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2857,7 +2857,7 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TunnelId |= uint64(b&0x7F) << shift + m.TunnelID |= uint64(b&0x7F) << shift if b < 0x80 { break } From 6069486c34e2c5ee7956419843224e4f866e30ac Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 13 Sep 2024 14:52:49 +0700 Subject: [PATCH 095/272] add withdraw --- proto/tunnel/v1beta1/tx.proto | 38 +- x/tunnel/keeper/deposit.go | 54 +++ x/tunnel/keeper/msg_server.go | 36 +- x/tunnel/types/errors.go | 1 + x/tunnel/types/msgs.go | 61 ++- x/tunnel/types/tx.pb.go | 689 +++++++++++++++++++++++++++------- 6 files changed, 729 insertions(+), 150 deletions(-) diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 13d59dbe1..5abeb5834 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -30,8 +30,11 @@ service Msg { // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. rpc ManualTriggerTunnel(MsgManualTriggerTunnel) returns (MsgManualTriggerTunnelResponse); - // Deposit is a RPC method to submit a deposit to an existing tunnel. - rpc Deposit(MsgDeposit) returns (MsgDepositResponse); + // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. + rpc DepositTunnel(MsgDepositTunnel) returns (MsgDepositTunnelResponse); + + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + rpc WithdrawTunnel(MsgWithdrawTunnel) returns (MsgWithdrawTunnelResponse); // UpdateParams is a RPC method to update parameters rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); @@ -125,8 +128,8 @@ message MsgManualTriggerTunnel { // MsgManualTriggerTunnelResponse is the response type for the Msg/ManualTrigger RPC method. message MsgManualTriggerTunnelResponse {} -// MsgDeposit defines a message to submit a deposit to an existing tunnel. -message MsgDeposit { +// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. +message MsgDepositTunnel { option (cosmos.msg.v1.signer) = "depositor"; option (amino.name) = "tunnel/MsgDeposit"; @@ -145,8 +148,31 @@ message MsgDeposit { ]; } -// MsgDepositResponse defines the Msg/Deposit response type. -message MsgDepositResponse {} +// MsgDepositTunnelResponse defines the Msg/Deposit response type. +message MsgDepositTunnelResponse {} + +// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. +message MsgWithdrawTunnel { + option (cosmos.msg.v1.signer) = "withdrawer"; + option (amino.name) = "tunnel/MsgWithdrawTunnel"; + + // tunnel_id defines the unique id of the tunnel. + uint64 tunnel_id = 1 + [(gogoproto.customname) = "TunnelID", (gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; + + // amount to be withdrawn by withdrawer. + repeated cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; + + // withdrawer defines the withdraw addresses from the tunnel. + string withdrawer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. +message MsgWithdrawTunnelResponse {} // MsgUpdateParams is the transaction message to update parameters. message MsgUpdateParams { diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 96ed51c72..8e2aac030 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -79,6 +79,12 @@ func (k Keeper) SetDeposit(ctx sdk.Context, deposit types.Deposit) { Set(types.TunnelDepositStoreKey(deposit.TunnelID, sdk.MustAccAddressFromBech32(deposit.Depositor)), k.cdc.MustMarshal(&deposit)) } +// DeleteDeposit deletes a deposit from the store +func (k Keeper) DeleteDeposit(ctx sdk.Context, deposit types.Deposit) { + ctx.KVStore(k.storeKey). + Delete(types.TunnelDepositStoreKey(deposit.TunnelID, sdk.MustAccAddressFromBech32(deposit.Depositor))) +} + // GetDeposit retrieves a deposit by its tunnel ID and depositor address func (k Keeper) GetDeposit( ctx sdk.Context, @@ -108,3 +114,51 @@ func (k Keeper) GetDeposits(ctx sdk.Context, tunnelID uint64) []types.Deposit { return deposits } + +// WithdrawDeposit withdraws a deposit from a tunnel +func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coins, withdrawer sdk.AccAddress) error { + tunnel, err := k.GetTunnel(ctx, tunnelID) + if err != nil { + return err + } + + deposit, found := k.GetDeposit(ctx, tunnelID, withdrawer) + if !found { + return types.ErrDepositNotFound + } + + // Check if the withdrawer has enough deposit + if deposit.Amount.IsAllLT(amount) { + return types.ErrInsufficientDeposit + } + + // Transfer the deposit from the tunnel module account to the withdrawer + if err := k.bankKeeper.SendCoinsFromModuleToAccount( + ctx, + types.ModuleName, + withdrawer, + amount, + ); err != nil { + return err + } + + // Update the withdrawer's deposit + deposit.Amount = deposit.Amount.Sub(amount...) + if deposit.Amount.IsZero() { + k.DeleteDeposit(ctx, deposit) + } else { + k.SetDeposit(ctx, deposit) + } + + // Update the tunnel's total deposit + tunnel.TotalDeposit = tunnel.TotalDeposit.Sub(amount...) + k.SetTunnel(ctx, tunnel) + + // Deactivate the tunnel if the total deposit is less than the min deposit + minDeposit := k.GetParams(ctx).MinDeposit + if tunnel.TotalDeposit.IsAllLT(minDeposit) { + k.DeactivateTunnel(ctx, tunnelID) + } + + return nil +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 015d1751b..c702ecf4a 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -159,6 +159,12 @@ func (ms msgServer) ActivateTunnel( return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) } + // verify if the total deposit meets or exceeds the minimum required deposit + minDeposit := ms.Keeper.GetParams(ctx).MinDeposit + if tunnel.TotalDeposit.IsAllLT(minDeposit) { + return nil, types.ErrInsufficientDeposit + } + err = ms.Keeper.ActivateTunnel(ctx, req.TunnelID) if err != nil { return nil, err @@ -243,11 +249,11 @@ func (ms msgServer) ManualTriggerTunnel( return &types.MsgManualTriggerTunnelResponse{}, nil } -// Deposit adds deposit to the tunnel. -func (ms msgServer) Deposit( +// DepositTunnel adds deposit to the tunnel. +func (ms msgServer) DepositTunnel( goCtx context.Context, - req *types.MsgDeposit, -) (*types.MsgDepositResponse, error) { + req *types.MsgDepositTunnel, +) (*types.MsgDepositTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) depositor, err := sdk.AccAddressFromBech32(req.Depositor) @@ -259,7 +265,27 @@ func (ms msgServer) Deposit( return nil, err } - return &types.MsgDepositResponse{}, nil + return &types.MsgDepositTunnelResponse{}, nil +} + +// WithdrawTunnel withdraws deposit from the tunnel. +func (ms msgServer) WithdrawTunnel( + goCtx context.Context, + req *types.MsgWithdrawTunnel, +) (*types.MsgWithdrawTunnelResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + withdrawer, err := sdk.AccAddressFromBech32(req.Withdrawer) + if err != nil { + return nil, err + } + + // Withdraw the deposit from the tunnel + if err := ms.Keeper.WithdrawDeposit(ctx, req.TunnelID, req.Amount, withdrawer); err != nil { + return nil, err + } + + return &types.MsgWithdrawTunnelResponse{}, nil } // UpdateParams updates the module params. diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 0492d8f3a..2d9cfb541 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -22,4 +22,5 @@ var ( ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") ErrDepositNotFound = errorsmod.Register(ModuleName, 16, "deposit not found") ErrInsufficientFunds = errorsmod.Register(ModuleName, 17, "insufficient funds") + ErrInsufficientDeposit = errorsmod.Register(ModuleName, 18, "insufficient deposit") ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index d60c99238..de0bc5373 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -10,8 +10,8 @@ import ( ) var ( - _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{}, &MsgDeposit{}, &MsgUpdateParams{} - _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} + _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawTunnel{}, &MsgUpdateParams{} + _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) func NewMsgCreateTunnel( @@ -313,34 +313,34 @@ func (m MsgManualTriggerTunnel) ValidateBasic() error { return nil } -// NewMsgDeposit creates a new MsgDeposit instance. -func NewMsgDeposit( +// NewMsgDepositTunnel creates a new MsgDeposit instance. +func NewMsgDepositTunnel( tunnelID uint64, amount sdk.Coins, depositor string, -) *MsgDeposit { - return &MsgDeposit{ - TunnelId: tunnelID, +) *MsgDepositTunnel { + return &MsgDepositTunnel{ + TunnelID: tunnelID, Amount: amount, Depositor: depositor, } } // Route Implements Msg. -func (m MsgDeposit) Type() string { return sdk.MsgTypeURL(&m) } +func (m MsgDepositTunnel) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. -func (m MsgDeposit) GetSignBytes() []byte { +func (m MsgDepositTunnel) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. -func (m *MsgDeposit) GetSigners() []sdk.AccAddress { +func (m *MsgDepositTunnel) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Depositor)} } // ValidateBasic does a sanity check on the provided data -func (m MsgDeposit) ValidateBasic() error { +func (m MsgDepositTunnel) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Depositor); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } @@ -352,6 +352,45 @@ func (m MsgDeposit) ValidateBasic() error { return nil } +// NewMsgWithdrawTunnel creates a new MsgWithdraw instance. +func NewMsgWithdrawTunnel( + tunnelID uint64, + amount sdk.Coins, + withdrawer string, +) *MsgWithdrawTunnel { + return &MsgWithdrawTunnel{ + TunnelID: tunnelID, + Amount: amount, + Withdrawer: withdrawer, + } +} + +// Route Implements Msg. +func (m MsgWithdrawTunnel) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgWithdrawTunnel) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for the message. +func (m *MsgWithdrawTunnel) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Withdrawer)} +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgWithdrawTunnel) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Withdrawer); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) + } + + if !m.Amount.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf("invalid amount: %s", m.Amount) + } + + return nil +} + // NewMsgUpdateParams creates a new MsgUpdateParams instance. func NewMsgUpdateParams( authority string, diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 51e151c5b..7d6776429 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -556,8 +556,8 @@ func (m *MsgManualTriggerTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgManualTriggerTunnelResponse proto.InternalMessageInfo -// MsgDeposit defines a message to submit a deposit to an existing tunnel. -type MsgDeposit struct { +// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. +type MsgDepositTunnel struct { // tunnel_id defines the unique id of the tunnel. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` // depositor defines the deposit addresses from the tunnel. @@ -566,18 +566,18 @@ type MsgDeposit struct { Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } -func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } -func (m *MsgDeposit) String() string { return proto.CompactTextString(m) } -func (*MsgDeposit) ProtoMessage() {} -func (*MsgDeposit) Descriptor() ([]byte, []int) { +func (m *MsgDepositTunnel) Reset() { *m = MsgDepositTunnel{} } +func (m *MsgDepositTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgDepositTunnel) ProtoMessage() {} +func (*MsgDepositTunnel) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{10} } -func (m *MsgDeposit) XXX_Unmarshal(b []byte) error { +func (m *MsgDepositTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDepositTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDeposit.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDepositTunnel.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -587,55 +587,55 @@ func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *MsgDeposit) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeposit.Merge(m, src) +func (m *MsgDepositTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositTunnel.Merge(m, src) } -func (m *MsgDeposit) XXX_Size() int { +func (m *MsgDepositTunnel) XXX_Size() int { return m.Size() } -func (m *MsgDeposit) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeposit.DiscardUnknown(m) +func (m *MsgDepositTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositTunnel.DiscardUnknown(m) } -var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo +var xxx_messageInfo_MsgDepositTunnel proto.InternalMessageInfo -func (m *MsgDeposit) GetTunnelID() uint64 { +func (m *MsgDepositTunnel) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgDeposit) GetDepositor() string { +func (m *MsgDepositTunnel) GetDepositor() string { if m != nil { return m.Depositor } return "" } -func (m *MsgDeposit) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgDepositTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } return nil } -// MsgDepositResponse defines the Msg/Deposit response type. -type MsgDepositResponse struct { +// MsgDepositTunnelResponse defines the Msg/Deposit response type. +type MsgDepositTunnelResponse struct { } -func (m *MsgDepositResponse) Reset() { *m = MsgDepositResponse{} } -func (m *MsgDepositResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDepositResponse) ProtoMessage() {} -func (*MsgDepositResponse) Descriptor() ([]byte, []int) { +func (m *MsgDepositTunnelResponse) Reset() { *m = MsgDepositTunnelResponse{} } +func (m *MsgDepositTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositTunnelResponse) ProtoMessage() {} +func (*MsgDepositTunnelResponse) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{11} } -func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgDepositTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDepositTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDepositResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDepositTunnelResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -645,17 +645,118 @@ func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *MsgDepositResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDepositResponse.Merge(m, src) +func (m *MsgDepositTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositTunnelResponse.Merge(m, src) } -func (m *MsgDepositResponse) XXX_Size() int { +func (m *MsgDepositTunnelResponse) XXX_Size() int { return m.Size() } -func (m *MsgDepositResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDepositResponse.DiscardUnknown(m) +func (m *MsgDepositTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositTunnelResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgDepositTunnelResponse proto.InternalMessageInfo + +// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. +type MsgWithdrawTunnel struct { + // tunnel_id defines the unique id of the tunnel. + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` + // amount to be withdrawn by withdrawer. + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + // withdrawer defines the withdraw addresses from the tunnel. + Withdrawer string `protobuf:"bytes,3,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` +} + +func (m *MsgWithdrawTunnel) Reset() { *m = MsgWithdrawTunnel{} } +func (m *MsgWithdrawTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawTunnel) ProtoMessage() {} +func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{12} +} +func (m *MsgWithdrawTunnel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawTunnel.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 *MsgWithdrawTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawTunnel.Merge(m, src) +} +func (m *MsgWithdrawTunnel) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawTunnel.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawTunnel proto.InternalMessageInfo + +func (m *MsgWithdrawTunnel) GetTunnelID() uint64 { + if m != nil { + return m.TunnelID + } + return 0 +} + +func (m *MsgWithdrawTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +func (m *MsgWithdrawTunnel) GetWithdrawer() string { + if m != nil { + return m.Withdrawer + } + return "" +} + +// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. +type MsgWithdrawTunnelResponse struct { +} + +func (m *MsgWithdrawTunnelResponse) Reset() { *m = MsgWithdrawTunnelResponse{} } +func (m *MsgWithdrawTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawTunnelResponse) ProtoMessage() {} +func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_747f2bf21e50fad9, []int{13} +} +func (m *MsgWithdrawTunnelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawTunnelResponse.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 *MsgWithdrawTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawTunnelResponse.Merge(m, src) +} +func (m *MsgWithdrawTunnelResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawTunnelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawTunnelResponse proto.InternalMessageInfo // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { @@ -669,7 +770,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{12} + return fileDescriptor_747f2bf21e50fad9, []int{14} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -720,7 +821,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{13} + return fileDescriptor_747f2bf21e50fad9, []int{15} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -760,8 +861,10 @@ func init() { proto.RegisterType((*MsgDeactivateTunnelResponse)(nil), "tunnel.v1beta1.MsgDeactivateTunnelResponse") proto.RegisterType((*MsgManualTriggerTunnel)(nil), "tunnel.v1beta1.MsgManualTriggerTunnel") proto.RegisterType((*MsgManualTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgManualTriggerTunnelResponse") - proto.RegisterType((*MsgDeposit)(nil), "tunnel.v1beta1.MsgDeposit") - proto.RegisterType((*MsgDepositResponse)(nil), "tunnel.v1beta1.MsgDepositResponse") + proto.RegisterType((*MsgDepositTunnel)(nil), "tunnel.v1beta1.MsgDepositTunnel") + proto.RegisterType((*MsgDepositTunnelResponse)(nil), "tunnel.v1beta1.MsgDepositTunnelResponse") + proto.RegisterType((*MsgWithdrawTunnel)(nil), "tunnel.v1beta1.MsgWithdrawTunnel") + proto.RegisterType((*MsgWithdrawTunnelResponse)(nil), "tunnel.v1beta1.MsgWithdrawTunnelResponse") proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") } @@ -769,67 +872,71 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 949 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xae, 0x9b, 0xfe, 0x9c, 0x96, 0x2e, 0xf5, 0x86, 0xc6, 0x71, 0x55, 0x27, 0x18, 0x96, 0x4d, - 0xbb, 0xaa, 0xad, 0x06, 0x96, 0xc3, 0x72, 0x6a, 0xda, 0x3d, 0xe4, 0x10, 0x09, 0x79, 0x17, 0x69, - 0xc5, 0x81, 0x6a, 0x12, 0x4f, 0xdd, 0x11, 0xc9, 0x4c, 0xe4, 0x99, 0x44, 0x9b, 0x2b, 0x47, 0x24, - 0x24, 0xf8, 0x03, 0x38, 0x70, 0x02, 0xed, 0xa9, 0x87, 0xfe, 0x11, 0x2b, 0x4e, 0x2b, 0x4e, 0x9c, - 0x0a, 0x6a, 0x0f, 0x95, 0xf8, 0x03, 0x38, 0x23, 0xcf, 0x4c, 0x6c, 0xc7, 0xf1, 0xee, 0x06, 0x21, - 0x7a, 0x49, 0x32, 0xf3, 0x7d, 0xef, 0xcd, 0xf7, 0x3e, 0xbf, 0x79, 0x0e, 0x28, 0xf1, 0x01, 0x21, - 0xa8, 0xeb, 0x0e, 0x0f, 0xda, 0x88, 0xc3, 0x03, 0x97, 0x3f, 0x77, 0xfa, 0x21, 0xe5, 0x54, 0xdf, - 0x90, 0x80, 0xa3, 0x00, 0xb3, 0x1c, 0x50, 0x1a, 0x74, 0x91, 0x2b, 0xd0, 0xf6, 0xe0, 0xd4, 0x85, - 0x64, 0x24, 0xa9, 0x66, 0x31, 0xa0, 0x01, 0x15, 0x3f, 0xdd, 0xe8, 0x97, 0xda, 0xdd, 0xce, 0x64, - 0xee, 0xc3, 0x10, 0xf6, 0x98, 0x02, 0xcb, 0x1d, 0xca, 0x7a, 0x94, 0x9d, 0xc8, 0x28, 0xb9, 0x50, - 0x90, 0x25, 0x57, 0x6e, 0x1b, 0x32, 0x14, 0x07, 0x77, 0x28, 0x26, 0x0a, 0x2f, 0x29, 0xbc, 0xc7, - 0x02, 0x77, 0x78, 0x10, 0x7d, 0x29, 0x60, 0x13, 0xf6, 0x30, 0xa1, 0xae, 0xf8, 0x7c, 0x8d, 0x06, - 0x55, 0x93, 0x00, 0xed, 0x8b, 0x02, 0xb8, 0xd3, 0x62, 0xc1, 0x51, 0x88, 0x20, 0x47, 0x4f, 0x05, - 0xa2, 0x1f, 0x81, 0x75, 0x86, 0x03, 0x02, 0xbb, 0x27, 0x98, 0x9c, 0x52, 0x66, 0x68, 0xd5, 0x42, - 0x6d, 0xad, 0x6e, 0x3a, 0x93, 0x66, 0x38, 0x4f, 0x04, 0xa7, 0x49, 0x4e, 0x69, 0x63, 0xe1, 0xe5, - 0x65, 0x65, 0xce, 0x5b, 0x63, 0xf1, 0x0e, 0xd3, 0x4d, 0xb0, 0x82, 0x09, 0x47, 0xe1, 0x10, 0x76, - 0x8d, 0xf9, 0xaa, 0x56, 0x5b, 0xf0, 0xe2, 0xb5, 0xfe, 0x10, 0x2c, 0x86, 0x74, 0xc0, 0x91, 0x51, - 0xa8, 0x6a, 0xb5, 0xb5, 0x7a, 0xd1, 0x91, 0xb6, 0x3a, 0x63, 0x5b, 0x9d, 0x43, 0x32, 0x6a, 0xac, - 0xfe, 0x7a, 0xb1, 0xbf, 0xe8, 0x45, 0x34, 0x4f, 0xb2, 0xf5, 0x03, 0xb0, 0x8c, 0x48, 0x87, 0xfa, - 0x28, 0x34, 0x16, 0xaa, 0x5a, 0x6d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 0xa4, 0x09, 0xb9, 0xdd, 0x92, 0xd7, 0x8f, 0x8d, - 0xe6, 0xcb, 0x2b, 0x4b, 0x7b, 0x75, 0x65, 0x69, 0x7f, 0x5e, 0x59, 0xda, 0xf7, 0xd7, 0xd6, 0xdc, - 0xab, 0x6b, 0x6b, 0xee, 0xf7, 0x6b, 0x6b, 0xee, 0x4b, 0x37, 0x75, 0xc9, 0xdb, 0x90, 0xf8, 0xe2, - 0x9f, 0x57, 0x87, 0x76, 0xdd, 0xce, 0x19, 0xc4, 0xc4, 0x1d, 0xd6, 0xdd, 0xe7, 0xea, 0x7f, 0xa2, - 0xbc, 0xf1, 0xed, 0x25, 0xc1, 0xf8, 0xf8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x23, 0xbf, - 0xc5, 0x2b, 0x0b, 0x00, 0x00, + // 1019 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xda, 0x49, 0x9a, 0x4c, 0xd2, 0xb4, 0xd9, 0x86, 0x64, 0xb3, 0x51, 0x6c, 0xb3, 0x50, + 0xea, 0xa4, 0x64, 0x57, 0x31, 0x14, 0xa1, 0x70, 0x8a, 0x93, 0x1e, 0x72, 0xb0, 0x84, 0xb6, 0x45, + 0x20, 0x90, 0x88, 0xc6, 0xde, 0xc9, 0x7a, 0x84, 0x3d, 0x63, 0xed, 0x8c, 0xdd, 0xfa, 0xca, 0x91, + 0x13, 0x37, 0x4e, 0x1c, 0xe0, 0x02, 0xea, 0x29, 0x87, 0xfc, 0x11, 0x15, 0xa7, 0x8a, 0x13, 0xa7, + 0x80, 0x92, 0x43, 0x24, 0xfe, 0x00, 0xae, 0xa0, 0x9d, 0x1d, 0xef, 0x8f, 0xc9, 0x92, 0x18, 0xd1, + 0xf6, 0x62, 0xef, 0xbc, 0xf7, 0xbd,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xeb, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -854,8 +961,10 @@ type MsgClient interface { DeactivateTunnel(ctx context.Context, in *MsgDeactivateTunnel, opts ...grpc.CallOption) (*MsgDeactivateTunnelResponse, error) // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) - // Deposit is a RPC method to submit a deposit to an existing tunnel. - Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) + // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. + DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -913,9 +1022,18 @@ func (c *msgClient) ManualTriggerTunnel(ctx context.Context, in *MsgManualTrigge return out, nil } -func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { - out := new(MsgDepositResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/Deposit", in, out, opts...) +func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) { + out := new(MsgDepositTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/DepositTunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) { + out := new(MsgWithdrawTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/WithdrawTunnel", in, out, opts...) if err != nil { return nil, err } @@ -943,8 +1061,10 @@ type MsgServer interface { DeactivateTunnel(context.Context, *MsgDeactivateTunnel) (*MsgDeactivateTunnelResponse, error) // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. ManualTriggerTunnel(context.Context, *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) - // Deposit is a RPC method to submit a deposit to an existing tunnel. - Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) + // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. + DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } @@ -968,8 +1088,11 @@ func (*UnimplementedMsgServer) DeactivateTunnel(ctx context.Context, req *MsgDea func (*UnimplementedMsgServer) ManualTriggerTunnel(ctx context.Context, req *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ManualTriggerTunnel not implemented") } -func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") +func (*UnimplementedMsgServer) DepositTunnel(ctx context.Context, req *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositTunnel not implemented") +} +func (*UnimplementedMsgServer) WithdrawTunnel(ctx context.Context, req *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawTunnel not implemented") } func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") @@ -1069,20 +1192,38 @@ func _Msg_ManualTriggerTunnel_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeposit) +func _Msg_DepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DepositTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Msg/DepositTunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DepositTunnel(ctx, req.(*MsgDepositTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).Deposit(ctx, in) + return srv.(MsgServer).WithdrawTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/Deposit", + FullMethod: "/tunnel.v1beta1.Msg/WithdrawTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Deposit(ctx, req.(*MsgDeposit)) + return srv.(MsgServer).WithdrawTunnel(ctx, req.(*MsgWithdrawTunnel)) } return interceptor(ctx, in, info, handler) } @@ -1130,8 +1271,12 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_ManualTriggerTunnel_Handler, }, { - MethodName: "Deposit", - Handler: _Msg_Deposit_Handler, + MethodName: "DepositTunnel", + Handler: _Msg_DepositTunnel_Handler, + }, + { + MethodName: "WithdrawTunnel", + Handler: _Msg_WithdrawTunnel_Handler, }, { MethodName: "UpdateParams", @@ -1501,7 +1646,7 @@ func (m *MsgManualTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgDeposit) Marshal() (dAtA []byte, err error) { +func (m *MsgDepositTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1511,12 +1656,12 @@ func (m *MsgDeposit) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDepositTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDepositTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1550,7 +1695,7 @@ func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgDepositTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1560,12 +1705,84 @@ func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDepositTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDepositTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawTunnel) 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 *MsgWithdrawTunnel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Withdrawer) > 0 { + i -= len(m.Withdrawer) + copy(dAtA[i:], m.Withdrawer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Withdrawer))) + i-- + dAtA[i] = 0x1a + } + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.TunnelID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawTunnelResponse) 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 *MsgWithdrawTunnelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1803,7 +2020,7 @@ func (m *MsgManualTriggerTunnelResponse) Size() (n int) { return n } -func (m *MsgDeposit) Size() (n int) { +func (m *MsgDepositTunnel) Size() (n int) { if m == nil { return 0 } @@ -1825,7 +2042,38 @@ func (m *MsgDeposit) Size() (n int) { return n } -func (m *MsgDepositResponse) Size() (n int) { +func (m *MsgDepositTunnelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawTunnel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTx(uint64(m.TunnelID)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Withdrawer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgWithdrawTunnelResponse) Size() (n int) { if m == nil { return 0 } @@ -2814,7 +3062,7 @@ func (m *MsgManualTriggerTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeposit) Unmarshal(dAtA []byte) error { +func (m *MsgDepositTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2837,10 +3085,10 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeposit: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDepositTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDepositTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2949,7 +3197,192 @@ func (m *MsgDeposit) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDepositTunnelResponse) 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: MsgDepositTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDepositTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgWithdrawTunnel) 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: MsgWithdrawTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) + } + m.TunnelID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 + } + m.Amount = append(m.Amount, types1.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Withdrawer", 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.Withdrawer = 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 *MsgWithdrawTunnelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2972,10 +3405,10 @@ func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDepositResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From 25caa536f38b4b359185c04baffe355ab42ec1d5 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 13 Sep 2024 14:53:46 +0700 Subject: [PATCH 096/272] remove route --- x/tunnel/types/msgs.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 4a2fb9581..429ddf425 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -324,9 +324,6 @@ func NewMsgUpdateParams( } } -// Route Implements Msg. -func (m MsgUpdateParams) Route() string { return sdk.MsgTypeURL(&m) } - // Type Implements Msg. func (m MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&m) } From 6a9101c8a1b7b105ef81c5d5a518a2c8121f8f7e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 13 Sep 2024 16:15:58 +0700 Subject: [PATCH 097/272] add query --- proto/tunnel/v1beta1/query.proto | 40 + proto/tunnel/v1beta1/tx.proto | 24 +- x/tunnel/client/cli/query.go | 80 ++ x/tunnel/client/cli/tx.go | 64 ++ x/tunnel/keeper/deposit.go | 74 +- x/tunnel/keeper/deposit_test.go | 131 ++++ x/tunnel/keeper/grpc_query.go | 43 ++ x/tunnel/keeper/grpc_query_test.go | 78 ++ x/tunnel/keeper/msg_server.go | 10 +- x/tunnel/testutil/mock_keeper.go | 5 + x/tunnel/types/keys.go | 6 +- x/tunnel/types/msgs.go | 18 +- x/tunnel/types/params.go | 6 +- x/tunnel/types/query.pb.go | 1138 +++++++++++++++++++++++++--- x/tunnel/types/query.pb.gw.go | 242 ++++++ x/tunnel/types/tx.pb.go | 332 ++++---- 16 files changed, 1953 insertions(+), 338 deletions(-) create mode 100644 x/tunnel/keeper/deposit_test.go diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index f329f5a34..19f253c2d 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -26,6 +26,16 @@ service Query { option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}"; } + // Deposit queries single deposit information based tunnelID, depositAddr. + rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { + option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/deposits/{depositor}"; + } + + // Deposits queries all deposits of a single tunnel. + rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { + option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/deposits"; + } + // Packets is a RPC method that returns all packets of a tunnel. rpc Packets(QueryPacketsRequest) returns (QueryPacketsResponse) { option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/packets"; @@ -77,6 +87,36 @@ message QueryTunnelResponse { Tunnel tunnel = 1 [(gogoproto.nullable) = false]; } +// QueryDepositRequest is the request type for the Query/Deposit RPC method. +message QueryDepositRequest { + // tunnel_id is the ID of the tunnel to query. + uint64 tunnel_id = 1; + // depositor is the address of the depositor to query. + string depositor = 2; +} + +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +message QueryDepositResponse { + // deposit is the deposit with the given tunnel ID and depositor address. + Deposit deposit = 1 [(gogoproto.nullable) = false]; +} + +// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +message QueryDepositsRequest { + // tunnel_id is the ID of the tunnel to query deposits. + uint64 tunnel_id = 1; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +message QueryDepositsResponse { + // deposits is a list of deposits. + repeated Deposit deposits = 1; + // pagination defines an optional pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + // QueryPacketsRequest is the request type for the Query/Packets RPC method. message QueryPacketsRequest { // tunnel_id is the ID of the tunnel to query packets. diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 5abeb5834..9a0a45b2c 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -33,8 +33,8 @@ service Msg { // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. rpc DepositTunnel(MsgDepositTunnel) returns (MsgDepositTunnelResponse); - // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. - rpc WithdrawTunnel(MsgWithdrawTunnel) returns (MsgWithdrawTunnelResponse); + // WithdrawDepositTunnel is a RPC method to withdraw a deposit from an existing tunnel. + rpc WithdrawDepositTunnel(MsgWithdrawDepositTunnel) returns (MsgWithdrawDepositTunnelResponse); // UpdateParams is a RPC method to update parameters rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); @@ -131,30 +131,30 @@ message MsgManualTriggerTunnelResponse {} // MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. message MsgDepositTunnel { option (cosmos.msg.v1.signer) = "depositor"; - option (amino.name) = "tunnel/MsgDeposit"; + option (amino.name) = "tunnel/MsgDepositTunnel"; // tunnel_id defines the unique id of the tunnel. uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID", (gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; - // depositor defines the deposit addresses from the tunnel. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [ + repeated cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (amino.dont_omitempty) = true ]; + + // depositor defines the deposit addresses from the tunnel. + string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgDepositTunnelResponse defines the Msg/Deposit response type. message MsgDepositTunnelResponse {} -// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. -message MsgWithdrawTunnel { +// MsgWithdrawDepositTunnel is the transaction message to withdraw a deposit from an existing tunnel. +message MsgWithdrawDepositTunnel { option (cosmos.msg.v1.signer) = "withdrawer"; - option (amino.name) = "tunnel/MsgWithdrawTunnel"; + option (amino.name) = "tunnel/MsgWithdrawDepositTunnel"; // tunnel_id defines the unique id of the tunnel. uint64 tunnel_id = 1 @@ -171,8 +171,8 @@ message MsgWithdrawTunnel { string withdrawer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. -message MsgWithdrawTunnelResponse {} +// MsgWithdrawDepositTunnelResponse defines the Msg/Withdraw response type. +message MsgWithdrawDepositTunnelResponse {} // MsgUpdateParams is the transaction message to update parameters. message MsgUpdateParams { diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index c84468519..bfe799049 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -25,6 +25,8 @@ func GetQueryCmd() *cobra.Command { queryCmd.AddCommand( GetQueryCmdTunnels(), GetQueryCmdTunnel(), + GetQueryCmdDeposit(), + GetQueryCmdDeposits(), GetQueryCmdPackets(), GetQueryCmdPacket(), GetQueryCmdParams(), @@ -120,6 +122,84 @@ func GetQueryCmdTunnels() *cobra.Command { return cmd } +// GetQueryCmdDeposit implements the query deposit command. +func GetQueryCmdDeposit() *cobra.Command { + cmd := &cobra.Command{ + Use: "deposit [tunnel-id] [depositor]", + Short: "Query the deposit of a tunnel by tunnel id and depositor address", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + tunnelID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + res, err := queryClient.Deposit(cmd.Context(), &types.QueryDepositRequest{ + TunnelId: tunnelID, + Depositor: args[1], + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +// GetQueryCmdDeposits implements the query deposits command. +func GetQueryCmdDeposits() *cobra.Command { + cmd := &cobra.Command{ + Use: "deposits [tunnel-id]", + Short: "Query all deposits of a tunnel", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + tunnelID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + res, err := queryClient.Deposits(cmd.Context(), &types.QueryDepositsRequest{ + TunnelId: tunnelID, + Pagination: pageReq, + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, "packets") + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // GetQueryCmdPackets implements the query packets command. func GetQueryCmdPackets() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 223cd473e..5101b20d1 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -26,6 +26,8 @@ func GetTxCmd() *cobra.Command { txCmd.AddCommand(GetTxCmdActivateTunnel()) txCmd.AddCommand(GetTxCmdDeactivateTunnel()) txCmd.AddCommand(GetTxCmdManualTriggerTunnel()) + txCmd.AddCommand(GetTxCmdDepositTunnel()) + txCmd.AddCommand(GetTxCmdWithdrawDeposit()) return txCmd } @@ -135,6 +137,68 @@ func GetTxCmdDeactivateTunnel() *cobra.Command { return cmd } +func GetTxCmdDepositTunnel() *cobra.Command { + cmd := &cobra.Command{ + Use: "deposit-tunnel [tunnel-id] [amount]", + Short: "Deposit to a tunnel", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + amount, err := sdk.ParseCoinsNormalized(args[1]) + if err != nil { + return err + } + + msg := types.NewMsgDepositTunnel(id, amount, clientCtx.GetFromAddress().String()) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func GetTxCmdWithdrawDeposit() *cobra.Command { + cmd := &cobra.Command{ + Use: "withdraw-deposit [tunnel-id] [amount]", + Short: "Withdraw deposit from a tunnel", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + amount, err := sdk.ParseCoinsNormalized(args[1]) + if err != nil { + return err + } + + msg := types.NewMsgWithdrawDepositTunnel(id, amount, clientCtx.GetFromAddress().String()) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + func GetTxCmdManualTriggerTunnel() *cobra.Command { cmd := &cobra.Command{ Use: "manual-trigger-tunnel [tunnel-id]", diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 8e2aac030..9aa025996 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -1,36 +1,14 @@ package keeper import ( + "fmt" + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// validateDepositDenom validates if the deposit denom is accepted by the tunnel module. -func (k Keeper) validateDepositDenom(ctx sdk.Context, depositAmount sdk.Coins) error { - params := k.GetParams(ctx) - denoms := make([]string, 0, len(params.MinDeposit)) - acceptedDenoms := make(map[string]bool, len(params.MinDeposit)) - for _, coin := range params.MinDeposit { - acceptedDenoms[coin.Denom] = true - denoms = append(denoms, coin.Denom) - } - - for _, coin := range depositAmount { - if _, ok := acceptedDenoms[coin.Denom]; !ok { - return errors.Wrapf( - types.ErrInvalidDepositDenom, - "deposited %s, but tunnel accepts only the following denom(s): %v", - depositAmount, - denoms, - ) - } - } - - return nil -} - // AddDeposit adds a deposit to a tunnel func (k Keeper) AddDeposit( ctx sdk.Context, @@ -76,13 +54,7 @@ func (k Keeper) AddDeposit( // SetDeposit sets a deposit in the store func (k Keeper) SetDeposit(ctx sdk.Context, deposit types.Deposit) { ctx.KVStore(k.storeKey). - Set(types.TunnelDepositStoreKey(deposit.TunnelID, sdk.MustAccAddressFromBech32(deposit.Depositor)), k.cdc.MustMarshal(&deposit)) -} - -// DeleteDeposit deletes a deposit from the store -func (k Keeper) DeleteDeposit(ctx sdk.Context, deposit types.Deposit) { - ctx.KVStore(k.storeKey). - Delete(types.TunnelDepositStoreKey(deposit.TunnelID, sdk.MustAccAddressFromBech32(deposit.Depositor))) + Set(types.DepositStoreKey(deposit.TunnelID, sdk.MustAccAddressFromBech32(deposit.Depositor)), k.cdc.MustMarshal(&deposit)) } // GetDeposit retrieves a deposit by its tunnel ID and depositor address @@ -91,7 +63,7 @@ func (k Keeper) GetDeposit( tunnelID uint64, depositorAddr sdk.AccAddress, ) (deposit types.Deposit, found bool) { - bz := ctx.KVStore(k.storeKey).Get(types.TunnelDepositStoreKey(tunnelID, depositorAddr)) + bz := ctx.KVStore(k.storeKey).Get(types.DepositStoreKey(tunnelID, depositorAddr)) if bz == nil { return types.Deposit{}, false } @@ -103,7 +75,7 @@ func (k Keeper) GetDeposit( // GetDeposits retrieves all deposits for a tunnel func (k Keeper) GetDeposits(ctx sdk.Context, tunnelID uint64) []types.Deposit { var deposits []types.Deposit - iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.TunnelDepositsStoreKey(tunnelID)) + iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.DepositsStoreKey(tunnelID)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -115,6 +87,12 @@ func (k Keeper) GetDeposits(ctx sdk.Context, tunnelID uint64) []types.Deposit { return deposits } +// DeleteDeposit deletes a deposit from the store +func (k Keeper) DeleteDeposit(ctx sdk.Context, tunnelID uint64, depositorAddr sdk.AccAddress) { + ctx.KVStore(k.storeKey). + Delete(types.DepositStoreKey(tunnelID, depositorAddr)) +} + // WithdrawDeposit withdraws a deposit from a tunnel func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coins, withdrawer sdk.AccAddress) error { tunnel, err := k.GetTunnel(ctx, tunnelID) @@ -145,7 +123,7 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi // Update the withdrawer's deposit deposit.Amount = deposit.Amount.Sub(amount...) if deposit.Amount.IsZero() { - k.DeleteDeposit(ctx, deposit) + k.DeleteDeposit(ctx, tunnelID, withdrawer) } else { k.SetDeposit(ctx, deposit) } @@ -157,7 +135,33 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi // Deactivate the tunnel if the total deposit is less than the min deposit minDeposit := k.GetParams(ctx).MinDeposit if tunnel.TotalDeposit.IsAllLT(minDeposit) { - k.DeactivateTunnel(ctx, tunnelID) + k.MustDeactivateTunnel(ctx, tunnelID) + } + + return nil +} + +// validateDepositDenom validates if the deposit denom is accepted by the tunnel module. +func (k Keeper) validateDepositDenom(ctx sdk.Context, depositAmount sdk.Coins) error { + params := k.GetParams(ctx) + + fmt.Printf("params.MinDeposit: %v\n", params.MinDeposit) + denoms := make([]string, 0, len(params.MinDeposit)) + acceptedDenoms := make(map[string]bool, len(params.MinDeposit)) + for _, coin := range params.MinDeposit { + acceptedDenoms[coin.Denom] = true + denoms = append(denoms, coin.Denom) + } + + for _, coin := range depositAmount { + if _, ok := acceptedDenoms[coin.Denom]; !ok { + return errors.Wrapf( + types.ErrInvalidDepositDenom, + "deposited %s, but tunnel accepts only the following denom(s): %v", + depositAmount, + denoms, + ) + } } return nil diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go new file mode 100644 index 000000000..f2f509b0c --- /dev/null +++ b/x/tunnel/keeper/deposit_test.go @@ -0,0 +1,131 @@ +package keeper_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func TestAddDeposit(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + tunnelID := uint64(1) + depositorAddr := sdk.AccAddress([]byte("depositor")) + depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))) + + s.MockBankKeeper.EXPECT(). + SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount). + Return(nil).Times(1) + + // Add a tunnel + tunnel := types.Tunnel{ID: tunnelID, TotalDeposit: sdk.NewCoins()} + k.SetTunnel(ctx, tunnel) + + // Add deposit + err := k.AddDeposit(ctx, tunnelID, depositorAddr, depositAmount) + require.NoError(t, err) + + // Check deposit + deposit, found := k.GetDeposit(ctx, tunnelID, depositorAddr) + require.True(t, found) + require.Equal(t, depositAmount, deposit.Amount) + + // Check tunnel's total deposit + tunnel, err = k.GetTunnel(ctx, tunnelID) + require.NoError(t, err) + require.Equal(t, depositAmount, tunnel.TotalDeposit) +} + +func TestGetSetDeposit(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + tunnelID := uint64(1) + depositorAddr := sdk.AccAddress([]byte("depositor")) + depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))) + + // Set deposit + deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} + k.SetDeposit(ctx, deposit) + + // Get deposit + retrievedDeposit, found := k.GetDeposit(ctx, tunnelID, depositorAddr) + require.True(t, found) + require.Equal(t, deposit, retrievedDeposit) +} + +func TestGetDeposits(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + tunnelID := uint64(1) + depositorAddr := sdk.AccAddress([]byte("depositor")) + depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))) + + // Set deposit + deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} + k.SetDeposit(ctx, deposit) + + // Get deposits + deposits := k.GetDeposits(ctx, tunnelID) + require.Len(t, deposits, 1) + require.Equal(t, deposit, deposits[0]) +} + +func TestDeleteDeposit(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + tunnelID := uint64(1) + depositorAddr := sdk.AccAddress([]byte("depositor")) + depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))) + + // Set deposit + deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} + k.SetDeposit(ctx, deposit) + + // Delete deposit + k.DeleteDeposit(ctx, tunnelID, depositorAddr) + + // Check deposit + _, found := k.GetDeposit(ctx, tunnelID, depositorAddr) + require.False(t, found) +} + +func TestWithdrawDeposit(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + tunnelID := uint64(1) + depositorAddr := sdk.AccAddress([]byte("depositor")) + depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(1000))) + + s.MockBankKeeper.EXPECT(). + SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositorAddr, depositAmount). + Return(nil).Times(1) + + // Set a tunnel + tunnel := types.Tunnel{ID: tunnelID, TotalDeposit: depositAmount, IsActive: true} + k.SetTunnel(ctx, tunnel) + + // Set deposit + deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} + k.SetDeposit(ctx, deposit) + + // Withdraw deposit + err := k.WithdrawDeposit(ctx, tunnelID, depositAmount, depositorAddr) + require.NoError(t, err) + + // Check tunnel's total deposit + tunnel, err = k.GetTunnel(ctx, tunnelID) + require.NoError(t, err) + require.Equal(t, sdk.Coins(nil), tunnel.TotalDeposit) + + // Check is active + require.False(t, tunnel.IsActive) +} diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 98a49f4c7..6f8e7d480 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -68,6 +68,49 @@ func (q queryServer) Tunnel(c context.Context, req *types.QueryTunnelRequest) (* return &types.QueryTunnelResponse{Tunnel: tunnel}, nil } +// Deposit queries a deposit by its tunnel ID and depositor address. +func (q queryServer) Deposit(c context.Context, req *types.QueryDepositRequest) (*types.QueryDepositResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + depositor, err := sdk.AccAddressFromBech32(req.Depositor) + if err != nil { + return nil, err + } + + deposit, found := q.k.GetDeposit(ctx, req.TunnelId, depositor) + if !found { + return nil, types.ErrDepositNotFound + } + + return &types.QueryDepositResponse{Deposit: deposit}, nil +} + +// Deposits queries all deposits of the tunnel. +func (q queryServer) Deposits( + c context.Context, + req *types.QueryDepositsRequest, +) (*types.QueryDepositsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + var deposits []*types.Deposit + depositStore := prefix.NewStore(ctx.KVStore(q.k.storeKey), types.DepositsStoreKey(req.TunnelId)) + + pageRes, err := query.Paginate(depositStore, req.Pagination, func(key []byte, value []byte) error { + var deposit types.Deposit + if err := q.k.cdc.Unmarshal(value, &deposit); err != nil { + return err + } + + deposits = append(deposits, &deposit) + return nil + }) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryDepositsResponse{Deposits: deposits, Pagination: pageRes}, nil +} + // Packets queries all packets of the module. func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) (*types.QueryPacketsResponse, error) { ctx := sdk.UnwrapSDKContext(c) diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index 700eed34f..d21b2633a 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" "github.com/bandprotocol/chain/v2/x/tunnel/testutil" @@ -98,3 +99,80 @@ func TestGRPCQueryPacket(t *testing.T) { require.NotNil(t, res) require.Equal(t, packet1, *res.Packet) } + +func TestGRPCQueryDeposit(t *testing.T) { + s := testutil.NewTestSuite(t) + q := s.QueryServer + + // Set tunnel + tunnel := types.Tunnel{ + ID: 1, + NonceCount: 2, + } + r := types.TSSRoute{ + DestinationChainID: "1", + DestinationContractAddress: "0x123", + } + err := tunnel.SetRoute(&r) + require.NoError(t, err) + s.Keeper.SetTunnel(s.Ctx, tunnel) + + // Set deposit + deposit := types.Deposit{ + TunnelID: 1, + Depositor: sdk.AccAddress([]byte("depositor")).String(), + Amount: sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))), + } + s.Keeper.SetDeposit(s.Ctx, deposit) + + // Query deposit + resp, err := q.Deposit(s.Ctx, &types.QueryDepositRequest{ + TunnelId: 1, + Depositor: deposit.Depositor, + }) + require.NoError(t, err) + require.NotNil(t, resp) + require.Equal(t, deposit, resp.Deposit) +} + +func TestGRPCQueryDeposits(t *testing.T) { + s := testutil.NewTestSuite(t) + q := s.QueryServer + + // Set tunnel + tunnel := types.Tunnel{ + ID: 1, + NonceCount: 2, + } + r := types.TSSRoute{ + DestinationChainID: "1", + DestinationContractAddress: "0x123", + } + err := tunnel.SetRoute(&r) + require.NoError(t, err) + s.Keeper.SetTunnel(s.Ctx, tunnel) + + // Set deposits + deposit1 := types.Deposit{ + TunnelID: 1, + Depositor: sdk.AccAddress([]byte("depositor1")).String(), + Amount: sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))), + } + deposit2 := types.Deposit{ + TunnelID: 1, + Depositor: sdk.AccAddress([]byte("depositor2")).String(), + Amount: sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(110))), + } + s.Keeper.SetDeposit(s.Ctx, deposit1) + s.Keeper.SetDeposit(s.Ctx, deposit2) + + // Query deposits + resp, err := q.Deposits(s.Ctx, &types.QueryDepositsRequest{ + TunnelId: 1, + }) + require.NoError(t, err) + require.NotNil(t, resp) + require.Len(t, resp.Deposits, 2) + require.Equal(t, deposit1, *resp.Deposits[0]) + require.Equal(t, deposit2, *resp.Deposits[1]) +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index c702ecf4a..74148d208 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -268,11 +268,11 @@ func (ms msgServer) DepositTunnel( return &types.MsgDepositTunnelResponse{}, nil } -// WithdrawTunnel withdraws deposit from the tunnel. -func (ms msgServer) WithdrawTunnel( +// WithdrawDepositTunnel withdraws deposit from the tunnel. +func (ms msgServer) WithdrawDepositTunnel( goCtx context.Context, - req *types.MsgWithdrawTunnel, -) (*types.MsgWithdrawTunnelResponse, error) { + req *types.MsgWithdrawDepositTunnel, +) (*types.MsgWithdrawDepositTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) withdrawer, err := sdk.AccAddressFromBech32(req.Withdrawer) @@ -285,7 +285,7 @@ func (ms msgServer) WithdrawTunnel( return nil, err } - return &types.MsgWithdrawTunnelResponse{}, nil + return &types.MsgWithdrawDepositTunnelResponse{}, nil } // UpdateParams updates the module params. diff --git a/x/tunnel/testutil/mock_keeper.go b/x/tunnel/testutil/mock_keeper.go index ced606042..cf699267f 100644 --- a/x/tunnel/testutil/mock_keeper.go +++ b/x/tunnel/testutil/mock_keeper.go @@ -57,6 +57,11 @@ func NewTestSuite(t *testing.T) TestSuite { bandtssKeeper, authority.String(), ) + err := tunnelKeeper.SetParams(ctx, types.DefaultParams()) + if err != nil { + t.Fatal(err) + } + queryServer := keeper.NewQueryServer(tunnelKeeper) return TestSuite{ diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index e5ac220df..9253c85a3 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -63,10 +63,10 @@ func SignalPricesInfoStoreKey(tunnelID uint64) []byte { return append(SignalPricesInfoStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } -func TunnelDepositsStoreKey(tunnelID uint64) []byte { +func DepositsStoreKey(tunnelID uint64) []byte { return append(DepositStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } -func TunnelDepositStoreKey(tunnelID uint64, depositor sdk.AccAddress) []byte { - return append(TunnelDepositsStoreKey(tunnelID), depositor.Bytes()...) +func DepositStoreKey(tunnelID uint64, depositor sdk.AccAddress) []byte { + return append(DepositsStoreKey(tunnelID), depositor.Bytes()...) } diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 7c1c90649..975595f69 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -10,7 +10,7 @@ import ( ) var ( - _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawTunnel{}, &MsgUpdateParams{} + _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawDepositTunnel{}, &MsgUpdateParams{} _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) @@ -352,13 +352,13 @@ func (m MsgDepositTunnel) ValidateBasic() error { return nil } -// NewMsgWithdrawTunnel creates a new MsgWithdraw instance. -func NewMsgWithdrawTunnel( +// NewMsgWithdrawDepositTunnel creates a new MsgWithdraw instance. +func NewMsgWithdrawDepositTunnel( tunnelID uint64, amount sdk.Coins, withdrawer string, -) *MsgWithdrawTunnel { - return &MsgWithdrawTunnel{ +) *MsgWithdrawDepositTunnel { + return &MsgWithdrawDepositTunnel{ TunnelID: tunnelID, Amount: amount, Withdrawer: withdrawer, @@ -366,20 +366,20 @@ func NewMsgWithdrawTunnel( } // Route Implements Msg. -func (m MsgWithdrawTunnel) Type() string { return sdk.MsgTypeURL(&m) } +func (m MsgWithdrawDepositTunnel) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. -func (m MsgWithdrawTunnel) GetSignBytes() []byte { +func (m MsgWithdrawDepositTunnel) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. -func (m *MsgWithdrawTunnel) GetSigners() []sdk.AccAddress { +func (m *MsgWithdrawDepositTunnel) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Withdrawer)} } // ValidateBasic does a sanity check on the provided data -func (m MsgWithdrawTunnel) ValidateBasic() error { +func (m MsgWithdrawDepositTunnel) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Withdrawer); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 0841c5b7c..b770cfc8c 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -10,7 +10,7 @@ import ( var ( DefaultMinInterval = uint64(1) - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("band", 1000000)) + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("band", 1000)) DefaultMaxSignals = uint64(100) DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) ) @@ -43,8 +43,8 @@ func DefaultParams() Params { // Validate validates the set of params func (p Params) Validate() error { // Validate MinDeposit - if !p.MinDeposit.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf(p.MinDeposit.String()) + if minDeposit := sdk.Coins(p.MinDeposit); minDeposit.Empty() || !minDeposit.IsValid() { + return fmt.Errorf("invalid minimum deposit: %s", minDeposit) } // Validate MinInterval diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index fcba36ed8..fe2f643c7 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -264,6 +264,217 @@ func (m *QueryTunnelResponse) GetTunnel() Tunnel { return Tunnel{} } +// QueryDepositRequest is the request type for the Query/Deposit RPC method. +type QueryDepositRequest struct { + // tunnel_id is the ID of the tunnel to query. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // depositor is the address of the depositor to query. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` +} + +func (m *QueryDepositRequest) Reset() { *m = QueryDepositRequest{} } +func (m *QueryDepositRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDepositRequest) ProtoMessage() {} +func (*QueryDepositRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{4} +} +func (m *QueryDepositRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDepositRequest.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 *QueryDepositRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositRequest.Merge(m, src) +} +func (m *QueryDepositRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDepositRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDepositRequest proto.InternalMessageInfo + +func (m *QueryDepositRequest) GetTunnelId() uint64 { + if m != nil { + return m.TunnelId + } + return 0 +} + +func (m *QueryDepositRequest) GetDepositor() string { + if m != nil { + return m.Depositor + } + return "" +} + +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +type QueryDepositResponse struct { + // deposit is the deposit with the given tunnel ID and depositor address. + Deposit Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` +} + +func (m *QueryDepositResponse) Reset() { *m = QueryDepositResponse{} } +func (m *QueryDepositResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDepositResponse) ProtoMessage() {} +func (*QueryDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{5} +} +func (m *QueryDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDepositResponse.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 *QueryDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositResponse.Merge(m, src) +} +func (m *QueryDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDepositResponse proto.InternalMessageInfo + +func (m *QueryDepositResponse) GetDeposit() Deposit { + if m != nil { + return m.Deposit + } + return Deposit{} +} + +// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +type QueryDepositsRequest struct { + // tunnel_id is the ID of the tunnel to query deposits. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDepositsRequest) Reset() { *m = QueryDepositsRequest{} } +func (m *QueryDepositsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDepositsRequest) ProtoMessage() {} +func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{6} +} +func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDepositsRequest.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 *QueryDepositsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositsRequest.Merge(m, src) +} +func (m *QueryDepositsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDepositsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDepositsRequest proto.InternalMessageInfo + +func (m *QueryDepositsRequest) GetTunnelId() uint64 { + if m != nil { + return m.TunnelId + } + return 0 +} + +func (m *QueryDepositsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +type QueryDepositsResponse struct { + // deposits is a list of deposits. + Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"` + // pagination defines an optional pagination for the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryDepositsResponse) Reset() { *m = QueryDepositsResponse{} } +func (m *QueryDepositsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDepositsResponse) ProtoMessage() {} +func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_220124e1821d297e, []int{7} +} +func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDepositsResponse.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 *QueryDepositsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositsResponse.Merge(m, src) +} +func (m *QueryDepositsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDepositsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDepositsResponse proto.InternalMessageInfo + +func (m *QueryDepositsResponse) GetDeposits() []*Deposit { + if m != nil { + return m.Deposits + } + return nil +} + +func (m *QueryDepositsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + // QueryPacketsRequest is the request type for the Query/Packets RPC method. type QueryPacketsRequest struct { // tunnel_id is the ID of the tunnel to query packets. @@ -276,7 +487,7 @@ func (m *QueryPacketsRequest) Reset() { *m = QueryPacketsRequest{} } func (m *QueryPacketsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketsRequest) ProtoMessage() {} func (*QueryPacketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{4} + return fileDescriptor_220124e1821d297e, []int{8} } func (m *QueryPacketsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +542,7 @@ func (m *QueryPacketsResponse) Reset() { *m = QueryPacketsResponse{} } func (m *QueryPacketsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketsResponse) ProtoMessage() {} func (*QueryPacketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{5} + return fileDescriptor_220124e1821d297e, []int{9} } func (m *QueryPacketsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +597,7 @@ func (m *QueryPacketRequest) Reset() { *m = QueryPacketRequest{} } func (m *QueryPacketRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketRequest) ProtoMessage() {} func (*QueryPacketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{6} + return fileDescriptor_220124e1821d297e, []int{10} } func (m *QueryPacketRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -439,7 +650,7 @@ func (m *QueryPacketResponse) Reset() { *m = QueryPacketResponse{} } func (m *QueryPacketResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketResponse) ProtoMessage() {} func (*QueryPacketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{7} + return fileDescriptor_220124e1821d297e, []int{11} } func (m *QueryPacketResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -483,7 +694,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{8} + return fileDescriptor_220124e1821d297e, []int{12} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +733,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{9} + return fileDescriptor_220124e1821d297e, []int{13} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -564,6 +775,10 @@ func init() { proto.RegisterType((*QueryTunnelsResponse)(nil), "tunnel.v1beta1.QueryTunnelsResponse") proto.RegisterType((*QueryTunnelRequest)(nil), "tunnel.v1beta1.QueryTunnelRequest") proto.RegisterType((*QueryTunnelResponse)(nil), "tunnel.v1beta1.QueryTunnelResponse") + proto.RegisterType((*QueryDepositRequest)(nil), "tunnel.v1beta1.QueryDepositRequest") + proto.RegisterType((*QueryDepositResponse)(nil), "tunnel.v1beta1.QueryDepositResponse") + proto.RegisterType((*QueryDepositsRequest)(nil), "tunnel.v1beta1.QueryDepositsRequest") + proto.RegisterType((*QueryDepositsResponse)(nil), "tunnel.v1beta1.QueryDepositsResponse") proto.RegisterType((*QueryPacketsRequest)(nil), "tunnel.v1beta1.QueryPacketsRequest") proto.RegisterType((*QueryPacketsResponse)(nil), "tunnel.v1beta1.QueryPacketsResponse") proto.RegisterType((*QueryPacketRequest)(nil), "tunnel.v1beta1.QueryPacketRequest") @@ -575,53 +790,62 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 726 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xc1, 0x4f, 0x13, 0x4d, - 0x14, 0xef, 0xf2, 0x95, 0x02, 0x43, 0x42, 0xc8, 0x7c, 0x0d, 0x5f, 0xbf, 0x45, 0x97, 0xba, 0x45, - 0x25, 0x10, 0x77, 0xa4, 0xe8, 0xc9, 0x83, 0x01, 0x6c, 0x49, 0x23, 0x69, 0x70, 0x5b, 0x3c, 0x78, - 0x69, 0xa6, 0xcb, 0x64, 0xd9, 0x58, 0x76, 0x96, 0xce, 0x96, 0x88, 0x04, 0x0f, 0xc6, 0x83, 0x5e, - 0x88, 0xc6, 0xbb, 0x17, 0xff, 0x19, 0x8e, 0x24, 0x5e, 0x3c, 0x19, 0x03, 0xfe, 0x21, 0x66, 0x67, - 0x66, 0x97, 0x2e, 0xec, 0x56, 0x4c, 0xb8, 0x6d, 0xe7, 0xfd, 0xde, 0xfc, 0x7e, 0xbf, 0xf7, 0xe6, - 0xbd, 0x02, 0xd5, 0xef, 0xb9, 0x2e, 0xe9, 0xa0, 0xbd, 0xc5, 0x36, 0xf1, 0xf1, 0x22, 0xda, 0xed, - 0x91, 0xee, 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d, 0xf9, 0x78, 0xa6, 0x65, 0x4e, 0xce, 0xb4, 0xcc, 0xf7, - 0x33, 0x2d, 0xf3, 0x02, 0xd9, 0x8e, 0xbf, 0xdd, 0x6b, 0x1b, 0x16, 0xdd, 0x41, 0x6d, 0xec, 0x6e, - 0xf1, 0xff, 0x3f, 0x8b, 0x76, 0x90, 0xb5, 0x8d, 0x1d, 0x17, 0xed, 0x95, 0xd1, 0xab, 0x90, 0xd0, - 0xdf, 0xf7, 0x08, 0x6b, 0xe7, 0x38, 0x62, 0xe9, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x25, 0x5e, - 0xea, 0x41, 0xe9, 0x07, 0x00, 0x00, + // 871 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x4f, 0xe3, 0x46, + 0x14, 0xc7, 0x33, 0x34, 0xe4, 0xc7, 0x20, 0x21, 0x34, 0x4d, 0x21, 0x35, 0xd4, 0xa4, 0x0e, 0xb4, + 0x08, 0x5a, 0x4f, 0x49, 0xa8, 0x5a, 0xb5, 0x87, 0x96, 0x1f, 0x09, 0x8a, 0x8a, 0xd2, 0xd4, 0x09, + 0x3d, 0xf4, 0x12, 0x39, 0x89, 0x15, 0xac, 0x06, 0x8f, 0xc9, 0x38, 0xa8, 0x34, 0xa2, 0x87, 0xaa, + 0x87, 0xf6, 0xd0, 0xd5, 0xae, 0x56, 0xbb, 0xc7, 0xbd, 0xec, 0x1f, 0xb1, 0xff, 0x02, 0x47, 0xa4, + 0xbd, 0xec, 0x69, 0xb5, 0x82, 0xfd, 0x43, 0x56, 0x99, 0x19, 0x3b, 0x71, 0x88, 0x43, 0x90, 0xd0, + 0xde, 0x9c, 0x99, 0xef, 0x9b, 0xf7, 0x79, 0xcf, 0xf3, 0xbe, 0x0e, 0x94, 0x9c, 0x8e, 0x65, 0x19, + 0x2d, 0x7c, 0xba, 0x59, 0x33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 0x0c, 0xfe, 0xc3, + 0x4d, 0xe8, 0x9c, 0xd9, 0x06, 0xad, 0x45, 0x98, 0x22, 0xfb, 0x2e, 0x00, 0x00, 0xff, 0xff, 0x08, + 0xac, 0xe3, 0x24, 0xca, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -642,6 +866,10 @@ type QueryClient interface { Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) // Tunnel is a RPC method that returns a tunnel by its ID. Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) + // Deposit queries single deposit information based tunnelID, depositAddr. + Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) + // Deposits queries all deposits of a single tunnel. + Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) // Packets is a RPC method that returns all packets of a tunnel. Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) // Packet is a RPC method that returns a packet by its tunnel ID and nonce. @@ -683,6 +911,24 @@ func (c *queryClient) Tunnel(ctx context.Context, in *QueryTunnelRequest, opts . return out, nil } +func (c *queryClient) Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) { + out := new(QueryDepositResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Deposit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) { + out := new(QueryDepositsResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Deposits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) { out := new(QueryPacketsResponse) err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Packets", in, out, opts...) @@ -709,6 +955,10 @@ type QueryServer interface { Tunnels(context.Context, *QueryTunnelsRequest) (*QueryTunnelsResponse, error) // Tunnel is a RPC method that returns a tunnel by its ID. Tunnel(context.Context, *QueryTunnelRequest) (*QueryTunnelResponse, error) + // Deposit queries single deposit information based tunnelID, depositAddr. + Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) + // Deposits queries all deposits of a single tunnel. + Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) // Packets is a RPC method that returns all packets of a tunnel. Packets(context.Context, *QueryPacketsRequest) (*QueryPacketsResponse, error) // Packet is a RPC method that returns a packet by its tunnel ID and nonce. @@ -728,6 +978,12 @@ func (*UnimplementedQueryServer) Tunnels(ctx context.Context, req *QueryTunnelsR func (*UnimplementedQueryServer) Tunnel(ctx context.Context, req *QueryTunnelRequest) (*QueryTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Tunnel not implemented") } +func (*UnimplementedQueryServer) Deposit(ctx context.Context, req *QueryDepositRequest) (*QueryDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") +} +func (*UnimplementedQueryServer) Deposits(ctx context.Context, req *QueryDepositsRequest) (*QueryDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposits not implemented") +} func (*UnimplementedQueryServer) Packets(ctx context.Context, req *QueryPacketsRequest) (*QueryPacketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Packets not implemented") } @@ -793,6 +1049,42 @@ func _Query_Tunnel_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Query/Deposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deposit(ctx, req.(*QueryDepositRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Deposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Query/Deposits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deposits(ctx, req.(*QueryDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Packets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPacketsRequest) if err := dec(in); err != nil { @@ -845,6 +1137,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Tunnel", Handler: _Query_Tunnel_Handler, }, + { + MethodName: "Deposit", + Handler: _Query_Deposit_Handler, + }, + { + MethodName: "Deposits", + Handler: _Query_Deposits_Handler, + }, { MethodName: "Packets", Handler: _Query_Packets_Handler, @@ -1008,7 +1308,7 @@ func (m *QueryTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryPacketsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1018,25 +1318,20 @@ func (m *QueryPacketsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPacketsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Depositor))) i-- dAtA[i] = 0x12 } @@ -1048,7 +1343,7 @@ func (m *QueryPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryPacketsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1058,46 +1353,30 @@ func (m *QueryPacketsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPacketsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Packets) > 0 { - for iNdEx := len(m.Packets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Packets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryPacketRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1107,20 +1386,27 @@ func (m *QueryPacketRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPacketRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPacketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Nonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } if m.TunnelId != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.TunnelId)) @@ -1130,7 +1416,7 @@ func (m *QueryPacketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryPacketResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1140,19 +1426,19 @@ func (m *QueryPacketResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPacketResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPacketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Packet != nil { + if m.Pagination != nil { { - size, err := m.Packet.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1160,9 +1446,180 @@ func (m *QueryPacketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } - return len(dAtA) - i, nil + if len(m.Deposits) > 0 { + for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryPacketsRequest) 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 *QueryPacketsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.TunnelId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TunnelId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPacketsResponse) 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 *QueryPacketsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Packets) > 0 { + for iNdEx := len(m.Packets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Packets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryPacketRequest) 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 *QueryPacketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nonce != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) + i-- + dAtA[i] = 0x10 + } + if m.TunnelId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TunnelId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPacketResponse) 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 *QueryPacketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPacketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Packet != nil { + { + size, err := m.Packet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { @@ -1290,6 +1747,68 @@ func (m *QueryTunnelResponse) Size() (n int) { return n } +func (m *QueryDepositRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelId != 0 { + n += 1 + sovQuery(uint64(m.TunnelId)) + } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deposit.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryDepositsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelId != 0 { + n += 1 + sovQuery(uint64(m.TunnelId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryDepositsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deposits) > 0 { + for _, e := range m.Deposits { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryPacketsRequest) Size() (n int) { if m == nil { return 0 @@ -1756,6 +2275,415 @@ func (m *QueryTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryDepositRequest) 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 ErrIntOverflowQuery + } + 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: QueryDepositRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + m.TunnelId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Depositor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDepositResponse) 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 ErrIntOverflowQuery + } + 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: QueryDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDepositsRequest) 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 ErrIntOverflowQuery + } + 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: QueryDepositsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + m.TunnelId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDepositsResponse) 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 ErrIntOverflowQuery + } + 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: QueryDepositsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deposits = append(m.Deposits, &Deposit{}) + if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryPacketsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/tunnel/types/query.pb.gw.go b/x/tunnel/types/query.pb.gw.go index 36dbbecfa..38a8a287e 100644 --- a/x/tunnel/types/query.pb.gw.go +++ b/x/tunnel/types/query.pb.gw.go @@ -141,6 +141,154 @@ func local_request_Query_Tunnel_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + val, ok = pathParams["depositor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "depositor") + } + + protoReq.Depositor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "depositor", err) + } + + msg, err := client.Deposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Deposit_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + val, ok = pathParams["depositor"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "depositor") + } + + protoReq.Depositor, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "depositor", err) + } + + msg, err := server.Deposit(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_Deposits_0 = &utilities.DoubleArray{Encoding: map[string]int{"tunnel_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Deposits_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Deposits(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Deposits_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tunnel_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tunnel_id") + } + + protoReq.TunnelId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Deposits_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Deposits(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_Packets_0 = &utilities.DoubleArray{Encoding: map[string]int{"tunnel_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -364,6 +512,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Deposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Deposit_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Deposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Deposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Deposits_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Deposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Packets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -511,6 +705,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Deposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Deposit_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Deposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Deposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Deposits_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Deposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Packets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -561,6 +795,10 @@ var ( pattern_Query_Tunnel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Deposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "deposits", "depositor"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Deposits_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "deposits"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Packets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Packet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) @@ -573,6 +811,10 @@ var ( forward_Query_Tunnel_0 = runtime.ForwardResponseMessage + forward_Query_Deposit_0 = runtime.ForwardResponseMessage + + forward_Query_Deposits_0 = runtime.ForwardResponseMessage + forward_Query_Packets_0 = runtime.ForwardResponseMessage forward_Query_Packet_0 = runtime.ForwardResponseMessage diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 7d6776429..2ec63ac18 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -560,10 +560,10 @@ var xxx_messageInfo_MsgManualTriggerTunnelResponse proto.InternalMessageInfo type MsgDepositTunnel struct { // tunnel_id defines the unique id of the tunnel. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` - // depositor defines the deposit addresses from the tunnel. - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` // amount to be deposited by depositor. - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` + // depositor defines the deposit addresses from the tunnel. + Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"` } func (m *MsgDepositTunnel) Reset() { *m = MsgDepositTunnel{} } @@ -606,18 +606,18 @@ func (m *MsgDepositTunnel) GetTunnelID() uint64 { return 0 } -func (m *MsgDepositTunnel) GetDepositor() string { +func (m *MsgDepositTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Depositor + return m.Amount } - return "" + return nil } -func (m *MsgDepositTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgDepositTunnel) GetDepositor() string { if m != nil { - return m.Amount + return m.Depositor } - return nil + return "" } // MsgDepositTunnelResponse defines the Msg/Deposit response type. @@ -657,8 +657,8 @@ func (m *MsgDepositTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDepositTunnelResponse proto.InternalMessageInfo -// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. -type MsgWithdrawTunnel struct { +// MsgWithdrawDepositTunnel is the transaction message to withdraw a deposit from an existing tunnel. +type MsgWithdrawDepositTunnel struct { // tunnel_id defines the unique id of the tunnel. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` // amount to be withdrawn by withdrawer. @@ -667,18 +667,18 @@ type MsgWithdrawTunnel struct { Withdrawer string `protobuf:"bytes,3,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` } -func (m *MsgWithdrawTunnel) Reset() { *m = MsgWithdrawTunnel{} } -func (m *MsgWithdrawTunnel) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawTunnel) ProtoMessage() {} -func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawDepositTunnel) Reset() { *m = MsgWithdrawDepositTunnel{} } +func (m *MsgWithdrawDepositTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawDepositTunnel) ProtoMessage() {} +func (*MsgWithdrawDepositTunnel) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{12} } -func (m *MsgWithdrawTunnel) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawDepositTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawDepositTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawTunnel.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawDepositTunnel.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -688,55 +688,55 @@ func (m *MsgWithdrawTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *MsgWithdrawTunnel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawTunnel.Merge(m, src) +func (m *MsgWithdrawDepositTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawDepositTunnel.Merge(m, src) } -func (m *MsgWithdrawTunnel) XXX_Size() int { +func (m *MsgWithdrawDepositTunnel) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawTunnel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawTunnel.DiscardUnknown(m) +func (m *MsgWithdrawDepositTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawDepositTunnel.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawTunnel proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawDepositTunnel proto.InternalMessageInfo -func (m *MsgWithdrawTunnel) GetTunnelID() uint64 { +func (m *MsgWithdrawDepositTunnel) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgWithdrawTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgWithdrawDepositTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } return nil } -func (m *MsgWithdrawTunnel) GetWithdrawer() string { +func (m *MsgWithdrawDepositTunnel) GetWithdrawer() string { if m != nil { return m.Withdrawer } return "" } -// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. -type MsgWithdrawTunnelResponse struct { +// MsgWithdrawDepositTunnelResponse defines the Msg/Withdraw response type. +type MsgWithdrawDepositTunnelResponse struct { } -func (m *MsgWithdrawTunnelResponse) Reset() { *m = MsgWithdrawTunnelResponse{} } -func (m *MsgWithdrawTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawTunnelResponse) ProtoMessage() {} -func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawDepositTunnelResponse) Reset() { *m = MsgWithdrawDepositTunnelResponse{} } +func (m *MsgWithdrawDepositTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawDepositTunnelResponse) ProtoMessage() {} +func (*MsgWithdrawDepositTunnelResponse) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{13} } -func (m *MsgWithdrawTunnelResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawDepositTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawDepositTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawTunnelResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawDepositTunnelResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -746,17 +746,17 @@ func (m *MsgWithdrawTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgWithdrawTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawTunnelResponse.Merge(m, src) +func (m *MsgWithdrawDepositTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawDepositTunnelResponse.Merge(m, src) } -func (m *MsgWithdrawTunnelResponse) XXX_Size() int { +func (m *MsgWithdrawDepositTunnelResponse) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawTunnelResponse.DiscardUnknown(m) +func (m *MsgWithdrawDepositTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawDepositTunnelResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawTunnelResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawDepositTunnelResponse proto.InternalMessageInfo // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { @@ -863,8 +863,8 @@ func init() { proto.RegisterType((*MsgManualTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgManualTriggerTunnelResponse") proto.RegisterType((*MsgDepositTunnel)(nil), "tunnel.v1beta1.MsgDepositTunnel") proto.RegisterType((*MsgDepositTunnelResponse)(nil), "tunnel.v1beta1.MsgDepositTunnelResponse") - proto.RegisterType((*MsgWithdrawTunnel)(nil), "tunnel.v1beta1.MsgWithdrawTunnel") - proto.RegisterType((*MsgWithdrawTunnelResponse)(nil), "tunnel.v1beta1.MsgWithdrawTunnelResponse") + proto.RegisterType((*MsgWithdrawDepositTunnel)(nil), "tunnel.v1beta1.MsgWithdrawDepositTunnel") + proto.RegisterType((*MsgWithdrawDepositTunnelResponse)(nil), "tunnel.v1beta1.MsgWithdrawDepositTunnelResponse") proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") } @@ -873,70 +873,70 @@ func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2 var fileDescriptor_747f2bf21e50fad9 = []byte{ // 1019 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x49, 0x9a, 0x4c, 0xd2, 0xb4, 0xd9, 0x86, 0x64, 0xb3, 0x51, 0x6c, 0xb3, 0x50, - 0xea, 0xa4, 0x64, 0x57, 0x31, 0x14, 0xa1, 0x70, 0x8a, 0x93, 0x1e, 0x72, 0xb0, 0x84, 0xb6, 0x45, - 0x20, 0x90, 0x88, 0xc6, 0xde, 0xc9, 0x7a, 0x84, 0x3d, 0x63, 0xed, 0x8c, 0xdd, 0xfa, 0xca, 0x91, - 0x13, 0x37, 0x4e, 0x1c, 0xe0, 0x02, 0xea, 0x29, 0x87, 0xfc, 0x11, 0x15, 0xa7, 0x8a, 0x13, 0xa7, - 0x80, 0x92, 0x43, 0x24, 0xfe, 0x00, 0xae, 0xa0, 0x9d, 0x1d, 0xef, 0x8f, 0xc9, 0x92, 0x18, 0xd1, - 0xf6, 0x62, 0xef, 0xbc, 0xf7, 0xbd, 0x99, 0xf7, 0x7d, 0xf3, 0xe6, 0xcd, 0x80, 0x15, 0xde, 0x27, - 0x04, 0x75, 0x9c, 0xc1, 0x76, 0x13, 0x71, 0xb8, 0xed, 0xf0, 0xa7, 0x76, 0x2f, 0xa0, 0x9c, 0xea, - 0x0b, 0x91, 0xc3, 0x96, 0x0e, 0x73, 0xd5, 0xa7, 0xd4, 0xef, 0x20, 0x47, 0x78, 0x9b, 0xfd, 0x23, - 0x07, 0x92, 0x61, 0x04, 0x35, 0x97, 0x7c, 0xea, 0x53, 0xf1, 0xe9, 0x84, 0x5f, 0xd2, 0xba, 0xa6, - 0xcc, 0xdc, 0x83, 0x01, 0xec, 0x32, 0xe9, 0x5c, 0x6d, 0x51, 0xd6, 0xa5, 0xec, 0x30, 0x8a, 0x8a, - 0x06, 0xd2, 0x55, 0x8a, 0x46, 0x4e, 0x13, 0x32, 0x14, 0x07, 0xb7, 0x28, 0x26, 0xd2, 0xbf, 0x22, - 0xfd, 0x5d, 0xe6, 0x3b, 0x83, 0xed, 0xf0, 0x4f, 0x3a, 0x16, 0x61, 0x17, 0x13, 0xea, 0x88, 0xdf, - 0x7f, 0xc9, 0x41, 0x72, 0x12, 0x4e, 0xeb, 0xa4, 0x08, 0x6e, 0x35, 0x98, 0xbf, 0x17, 0x20, 0xc8, - 0xd1, 0x63, 0xe1, 0xd1, 0xf7, 0xc0, 0x3c, 0xc3, 0x3e, 0x81, 0x9d, 0x43, 0x4c, 0x8e, 0x28, 0x33, - 0xb4, 0x4a, 0xb1, 0x3a, 0x57, 0x33, 0xed, 0xac, 0x18, 0xf6, 0x23, 0x81, 0x39, 0x20, 0x47, 0xb4, - 0x3e, 0xf9, 0xfc, 0xb4, 0x3c, 0xe1, 0xce, 0xb1, 0xd8, 0xc2, 0x74, 0x13, 0xcc, 0x60, 0xc2, 0x51, - 0x30, 0x80, 0x1d, 0xa3, 0x50, 0xd1, 0xaa, 0x93, 0x6e, 0x3c, 0xd6, 0x1f, 0x80, 0xa9, 0x80, 0xf6, - 0x39, 0x32, 0x8a, 0x15, 0xad, 0x3a, 0x57, 0x5b, 0xb2, 0x23, 0x59, 0xed, 0x91, 0xac, 0xf6, 0x2e, - 0x19, 0xd6, 0x67, 0x7f, 0x39, 0xd9, 0x9a, 0x72, 0x43, 0x98, 0x1b, 0xa1, 0xf5, 0x6d, 0x70, 0x03, - 0x91, 0x16, 0xf5, 0x50, 0x60, 0x4c, 0x56, 0xb4, 0xea, 0x42, 0x6d, 0x45, 0x4d, 0xe9, 0x61, 0xe4, - 0x76, 0x47, 0x38, 0x7d, 0x08, 0x6e, 0x61, 0x82, 0x39, 0x86, 0x9d, 0x43, 0x0f, 0xf5, 0x28, 0xc3, - 0xdc, 0x98, 0x12, 0x6c, 0x56, 0x6d, 0xa9, 0x77, 0xa8, 0x70, 0x1c, 0xbf, 0x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, 0x45, 0x3b, 0x76, 0xab, 0x0d, 0x31, 0xb1, + 0x07, 0x35, 0xfb, 0xa5, 0xfc, 0xbf, 0x20, 0xec, 0x67, 0xcd, 0x82, 0x40, 0x3c, 0xfa, 0x27, 0x00, + 0x00, 0xff, 0xff, 0x3a, 0x61, 0xe8, 0x5e, 0x1b, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -963,8 +963,8 @@ type MsgClient interface { ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) - // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. - WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) + // WithdrawDepositTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawDepositTunnel(ctx context.Context, in *MsgWithdrawDepositTunnel, opts ...grpc.CallOption) (*MsgWithdrawDepositTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -1031,9 +1031,9 @@ func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opt return out, nil } -func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) { - out := new(MsgWithdrawTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/WithdrawTunnel", in, out, opts...) +func (c *msgClient) WithdrawDepositTunnel(ctx context.Context, in *MsgWithdrawDepositTunnel, opts ...grpc.CallOption) (*MsgWithdrawDepositTunnelResponse, error) { + out := new(MsgWithdrawDepositTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/WithdrawDepositTunnel", in, out, opts...) if err != nil { return nil, err } @@ -1063,8 +1063,8 @@ type MsgServer interface { ManualTriggerTunnel(context.Context, *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) - // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. - WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) + // WithdrawDepositTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawDepositTunnel(context.Context, *MsgWithdrawDepositTunnel) (*MsgWithdrawDepositTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } @@ -1091,8 +1091,8 @@ func (*UnimplementedMsgServer) ManualTriggerTunnel(ctx context.Context, req *Msg func (*UnimplementedMsgServer) DepositTunnel(ctx context.Context, req *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DepositTunnel not implemented") } -func (*UnimplementedMsgServer) WithdrawTunnel(ctx context.Context, req *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawTunnel not implemented") +func (*UnimplementedMsgServer) WithdrawDepositTunnel(ctx context.Context, req *MsgWithdrawDepositTunnel) (*MsgWithdrawDepositTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawDepositTunnel not implemented") } func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") @@ -1210,20 +1210,20 @@ func _Msg_DepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_WithdrawTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawTunnel) +func _Msg_WithdrawDepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawDepositTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).WithdrawTunnel(ctx, in) + return srv.(MsgServer).WithdrawDepositTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/WithdrawTunnel", + FullMethod: "/tunnel.v1beta1.Msg/WithdrawDepositTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).WithdrawTunnel(ctx, req.(*MsgWithdrawTunnel)) + return srv.(MsgServer).WithdrawDepositTunnel(ctx, req.(*MsgWithdrawDepositTunnel)) } return interceptor(ctx, in, info, handler) } @@ -1275,8 +1275,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_DepositTunnel_Handler, }, { - MethodName: "WithdrawTunnel", - Handler: _Msg_WithdrawTunnel_Handler, + MethodName: "WithdrawDepositTunnel", + Handler: _Msg_WithdrawDepositTunnel_Handler, }, { MethodName: "UpdateParams", @@ -1666,6 +1666,13 @@ func (m *MsgDepositTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintTx(dAtA, i, uint64(len(m.Depositor))) + i-- + dAtA[i] = 0x1a + } if len(m.Amount) > 0 { for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { { @@ -1677,16 +1684,9 @@ func (m *MsgDepositTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } - if len(m.Depositor) > 0 { - i -= len(m.Depositor) - copy(dAtA[i:], m.Depositor) - i = encodeVarintTx(dAtA, i, uint64(len(m.Depositor))) - i-- - dAtA[i] = 0x12 - } if m.TunnelID != 0 { i = encodeVarintTx(dAtA, i, uint64(m.TunnelID)) i-- @@ -1718,7 +1718,7 @@ func (m *MsgDepositTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgWithdrawTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawDepositTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1728,12 +1728,12 @@ func (m *MsgWithdrawTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgWithdrawTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawDepositTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawDepositTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1767,7 +1767,7 @@ func (m *MsgWithdrawTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgWithdrawTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawDepositTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1777,12 +1777,12 @@ func (m *MsgWithdrawTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgWithdrawTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawDepositTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawDepositTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2029,16 +2029,16 @@ func (m *MsgDepositTunnel) Size() (n int) { if m.TunnelID != 0 { n += 1 + sovTx(uint64(m.TunnelID)) } - l = len(m.Depositor) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } if len(m.Amount) > 0 { for _, e := range m.Amount { l = e.Size() n += 1 + l + sovTx(uint64(l)) } } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2051,7 +2051,7 @@ func (m *MsgDepositTunnelResponse) Size() (n int) { return n } -func (m *MsgWithdrawTunnel) Size() (n int) { +func (m *MsgWithdrawDepositTunnel) Size() (n int) { if m == nil { return 0 } @@ -2073,7 +2073,7 @@ func (m *MsgWithdrawTunnel) Size() (n int) { return n } -func (m *MsgWithdrawTunnelResponse) Size() (n int) { +func (m *MsgWithdrawDepositTunnelResponse) Size() (n int) { if m == nil { return 0 } @@ -3112,9 +3112,9 @@ func (m *MsgDepositTunnel) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3124,29 +3124,31 @@ func (m *MsgDepositTunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Depositor = string(dAtA[iNdEx:postIndex]) + m.Amount = append(m.Amount, types1.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3156,25 +3158,23 @@ func (m *MsgDepositTunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = append(m.Amount, types1.Coin{}) - if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3247,7 +3247,7 @@ func (m *MsgDepositTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawTunnel) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawDepositTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3270,10 +3270,10 @@ func (m *MsgWithdrawTunnel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawTunnel: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawDepositTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawDepositTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3382,7 +3382,7 @@ func (m *MsgWithdrawTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawDepositTunnelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3405,10 +3405,10 @@ func (m *MsgWithdrawTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawDepositTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawDepositTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From 64e91f01433a00a6bcf8f470be983e0b8a9347f0 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 13 Sep 2024 16:28:48 +0700 Subject: [PATCH 098/272] update error --- x/tunnel/types/params.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index b770cfc8c..160ecfbd3 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -4,7 +4,6 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "gopkg.in/yaml.v2" ) @@ -43,8 +42,8 @@ func DefaultParams() Params { // Validate validates the set of params func (p Params) Validate() error { // Validate MinDeposit - if minDeposit := sdk.Coins(p.MinDeposit); minDeposit.Empty() || !minDeposit.IsValid() { - return fmt.Errorf("invalid minimum deposit: %s", minDeposit) + if p.MinDeposit.Empty() || !p.MinDeposit.IsValid() { + return fmt.Errorf("invalid minimum deposit: %s", p.MinDeposit) } // Validate MinInterval @@ -59,7 +58,7 @@ func (p Params) Validate() error { // Validate BaseFee if !p.BasePacketFee.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf(p.BasePacketFee.String()) + return fmt.Errorf("invalid base packet fee: %s", p.BasePacketFee) } return nil From 8c3a529c328b0310cc6cc1093bca43d73612cffa Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 16 Sep 2024 17:47:44 +0700 Subject: [PATCH 099/272] update error wrapper --- x/tunnel/types/params.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 0841c5b7c..2e11442bd 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -44,7 +44,7 @@ func DefaultParams() Params { func (p Params) Validate() error { // Validate MinDeposit if !p.MinDeposit.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf(p.MinDeposit.String()) + return sdkerrors.ErrInvalidCoins.Wrapf("%s", p.MinDeposit.String()) } // Validate MinInterval @@ -59,7 +59,7 @@ func (p Params) Validate() error { // Validate BaseFee if !p.BasePacketFee.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf(p.BasePacketFee.String()) + return sdkerrors.ErrInvalidCoins.Wrapf("%s", p.BasePacketFee.String()) } return nil From dd025a3519baf36ce129fe72c867bb71037740b9 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 16 Sep 2024 23:44:23 +0700 Subject: [PATCH 100/272] fix review --- x/tunnel/client/cli/tx.go | 4 ++-- x/tunnel/keeper/deposit.go | 2 +- x/tunnel/types/deposit.go | 2 +- x/tunnel/types/errors.go | 9 ++++----- x/tunnel/types/keys.go | 7 +++++-- x/tunnel/types/params.go | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index e7028a27a..8db8669b2 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -27,7 +27,7 @@ func GetTxCmd() *cobra.Command { txCmd.AddCommand(GetTxCmdDeactivateTunnel()) txCmd.AddCommand(GetTxCmdManualTriggerTunnel()) txCmd.AddCommand(GetTxCmdDepositTunnel()) - txCmd.AddCommand(WithdrawDepositTunnel()) + txCmd.AddCommand(GetTxCmdWithdrawDepositTunnel()) return txCmd } @@ -168,7 +168,7 @@ func GetTxCmdDepositTunnel() *cobra.Command { return cmd } -func WithdrawDepositTunnel() *cobra.Command { +func GetTxCmdWithdrawDepositTunnel() *cobra.Command { cmd := &cobra.Command{ Use: "withdraw-deposit [tunnel-id] [amount]", Short: "Withdraw deposit from a tunnel", diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index dd2957e99..5a863eabd 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -104,7 +104,7 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi } // Check if the withdrawer has enough deposit - if deposit.Amount.IsAllLT(amount) { + if deposit.Amount.IsAllGTE(amount) { return types.ErrInsufficientDeposit } diff --git a/x/tunnel/types/deposit.go b/x/tunnel/types/deposit.go index 3d2554e1c..1fb37ef2b 100644 --- a/x/tunnel/types/deposit.go +++ b/x/tunnel/types/deposit.go @@ -2,7 +2,7 @@ package types import sdk "github.com/cosmos/cosmos-sdk/types" -// Deposit represents a deposit from a user to a tunnel. +// NewDeposit creates a new Deposit instance func NewDeposit(tunnelID uint64, depositor sdk.AccAddress, amount sdk.Coins) Deposit { return Deposit{ TunnelID: tunnelID, diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 2d9cfb541..3baa45d66 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -18,9 +18,8 @@ var ( ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") - ErrMinDepositTooSmall = errorsmod.Register(ModuleName, 14, "min deposit too small") - ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") - ErrDepositNotFound = errorsmod.Register(ModuleName, 16, "deposit not found") - ErrInsufficientFunds = errorsmod.Register(ModuleName, 17, "insufficient funds") - ErrInsufficientDeposit = errorsmod.Register(ModuleName, 18, "insufficient deposit") + ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 14, "invalid deposit denom") + ErrDepositNotFound = errorsmod.Register(ModuleName, 15, "deposit not found") + ErrInsufficientFunds = errorsmod.Register(ModuleName, 16, "insufficient funds") + ErrInsufficientDeposit = errorsmod.Register(ModuleName, 17, "insufficient deposit") ) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 9253c85a3..3174e673b 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -1,6 +1,9 @@ package types -import sdk "github.com/cosmos/cosmos-sdk/types" +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" +) const ( // ModuleName defines the module name @@ -68,5 +71,5 @@ func DepositsStoreKey(tunnelID uint64) []byte { } func DepositStoreKey(tunnelID uint64, depositor sdk.AccAddress) []byte { - return append(DepositsStoreKey(tunnelID), depositor.Bytes()...) + return append(DepositsStoreKey(tunnelID), address.MustLengthPrefix(depositor)...) } diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 160ecfbd3..df6d855d2 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -9,7 +9,7 @@ import ( var ( DefaultMinInterval = uint64(1) - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("band", 1000)) + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000)) DefaultMaxSignals = uint64(100) DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) ) From 8ade9878d79627ddcb36785430f09f8db14209a6 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 16 Sep 2024 23:47:09 +0700 Subject: [PATCH 101/272] update withdraw logic --- x/tunnel/keeper/deposit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 5a863eabd..5a7c7d883 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -104,7 +104,7 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi } // Check if the withdrawer has enough deposit - if deposit.Amount.IsAllGTE(amount) { + if !deposit.Amount.IsAllGTE(amount) { return types.ErrInsufficientDeposit } From d4a0abfbdf039278391a8a7d0fc3a27c5b5ad044 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 16 Sep 2024 23:51:56 +0700 Subject: [PATCH 102/272] fix test --- x/tunnel/keeper/deposit_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index f2f509b0c..5ed534273 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -16,7 +16,7 @@ func TestAddDeposit(t *testing.T) { tunnelID := uint64(1) depositorAddr := sdk.AccAddress([]byte("depositor")) - depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))) + depositAmount := sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))) s.MockBankKeeper.EXPECT(). SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount). From 2e24f7f4aae6cc8584b3e95bc0e5b99ec9d030f6 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 17 Sep 2024 11:44:50 +0700 Subject: [PATCH 103/272] update genesis --- x/tunnel/types/genesis.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index f177b0043..57143fde3 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -6,16 +6,18 @@ func NewGenesisState( tunnelCount uint64, tunnels []Tunnel, signalPricesInfos []SignalPricesInfo, + totalFees TotalFees, ) *GenesisState { return &GenesisState{ Params: params, TunnelCount: tunnelCount, Tunnels: tunnels, SignalPricesInfos: signalPricesInfos, + TotalFees: totalFees, } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []SignalPricesInfo{}) + return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []SignalPricesInfo{}, TotalFees{}) } From 7f3604f8bef87fa6c9fc9d15cf86e688186c08cf Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 17 Sep 2024 13:54:35 +0700 Subject: [PATCH 104/272] remove check deposit --- x/tunnel/keeper/msg_server.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 74148d208..a6680fd94 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -43,17 +43,6 @@ func (ms msgServer) CreateTunnel( return nil, err } - // Check if the creator has enough funds to deposit - balances := ms.bankKeeper.GetAllBalances(ctx, creator) - if balances.IsAllLT(req.InitialDeposit) { - return nil, sdkerrors.Wrapf( - types.ErrInsufficientFunds, - "creator %s has insufficient funds to deposit %s", - req.Creator, - req.InitialDeposit, - ) - } - // Add a new tunnel tunnel, err := ms.Keeper.AddTunnel( ctx, From c0a185dcb7e0c9fd85b993b4b7235d8388c53644 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 17 Sep 2024 14:30:51 +0700 Subject: [PATCH 105/272] update snake case --- proto/tunnel/v1beta1/genesis.proto | 2 +- proto/tunnel/v1beta1/query.proto | 2 +- x/tunnel/types/genesis.pb.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index 8e15aab76..415abacaa 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -17,6 +17,6 @@ message GenesisState { repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; // signal_prices_infos is the signal prices info. repeated SignalPricesInfo signal_prices_infos = 4 [(gogoproto.nullable) = false]; - // TotalFees is the type for the total fees collected by the tunnel + // total_fees is the type for the total fees collected by the tunnel TotalFees total_fees = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index f329f5a34..7c3a8ccb6 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -103,7 +103,7 @@ message QueryPacketRequest { // QueryPacketResponse is the response type for the Query/Packet RPC method. message QueryPacketResponse { - // Packet is the packet with the given tunnel ID and nonce. + // packet is the packet with the given tunnel ID and nonce. Packet packet = 1; } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 17c6d2f03..ac69b8cea 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -33,7 +33,7 @@ type GenesisState struct { Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` // signal_prices_infos is the signal prices info. SignalPricesInfos []SignalPricesInfo `protobuf:"bytes,4,rep,name=signal_prices_infos,json=signalPricesInfos,proto3" json:"signal_prices_infos"` - // TotalFees is the type for the total fees collected by the tunnel + // total_fees is the type for the total fees collected by the tunnel TotalFees TotalFees `protobuf:"bytes,5,opt,name=total_fees,json=totalFees,proto3" json:"total_fees"` } From 02888dba4d41cf63d94e283ac14fce5885ff5761 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 17 Sep 2024 16:02:18 +0700 Subject: [PATCH 106/272] fix review --- x/tunnel/client/cli/query.go | 84 +++++++++++++++++------------------ x/tunnel/keeper/msg_server.go | 28 +++++------- x/tunnel/keeper/tunnel.go | 13 ++++++ x/tunnel/types/errors.go | 2 + x/tunnel/types/msgs.go | 5 ++- x/tunnel/types/params.go | 2 +- 6 files changed, 73 insertions(+), 61 deletions(-) diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index c84468519..50cfa9466 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -23,22 +23,22 @@ func GetQueryCmd() *cobra.Command { } queryCmd.AddCommand( + GetQueryCmdParams(), GetQueryCmdTunnels(), GetQueryCmdTunnel(), GetQueryCmdPackets(), GetQueryCmdPacket(), - GetQueryCmdParams(), ) return queryCmd } -// GetQueryCmdTunnel implements the query tunnel command. -func GetQueryCmdTunnel() *cobra.Command { +// GetQueryCmdParams implements the query params command. +func GetQueryCmdParams() *cobra.Command { cmd := &cobra.Command{ - Use: "tunnel [tunnel-id]", - Short: "Query the tunnel by tunnel id", - Args: cobra.ExactArgs(1), + Use: "params", + Short: "Shows the parameters of the module", + Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -47,14 +47,7 @@ func GetQueryCmdTunnel() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - tunnelID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - res, err := queryClient.Tunnel(cmd.Context(), &types.QueryTunnelRequest{ - TunnelId: tunnelID, - }) + res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) if err != nil { return err } @@ -120,11 +113,11 @@ func GetQueryCmdTunnels() *cobra.Command { return cmd } -// GetQueryCmdPackets implements the query packets command. -func GetQueryCmdPackets() *cobra.Command { +// GetQueryCmdTunnel implements the query tunnel command. +func GetQueryCmdTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "packets [tunnel-id]", - Short: "Query the packets of a tunnel", + Use: "tunnel [tunnel-id]", + Short: "Query the tunnel by tunnel id", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -139,14 +132,8 @@ func GetQueryCmdPackets() *cobra.Command { return err } - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.Packets(cmd.Context(), &types.QueryPacketsRequest{ - TunnelId: tunnelID, - Pagination: pageReq, + res, err := queryClient.Tunnel(cmd.Context(), &types.QueryTunnelRequest{ + TunnelId: tunnelID, }) if err != nil { return err @@ -156,18 +143,17 @@ func GetQueryCmdPackets() *cobra.Command { }, } - flags.AddPaginationFlagsToCmd(cmd, "packets") flags.AddQueryFlagsToCmd(cmd) return cmd } -// GetQueryCmdPacket implements the query packet command. -func GetQueryCmdPacket() *cobra.Command { +// GetQueryCmdPackets implements the query packets command. +func GetQueryCmdPackets() *cobra.Command { cmd := &cobra.Command{ - Use: "packet [tunnel-id] [nonce]", - Short: "Query a packet by tunnel id and nonce", - Args: cobra.ExactArgs(2), + Use: "packets [tunnel-id]", + Short: "Query the packets of a tunnel", + Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -181,14 +167,14 @@ func GetQueryCmdPacket() *cobra.Command { return err } - nonce, err := strconv.ParseUint(args[1], 10, 64) + pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { return err } - res, err := queryClient.Packet(cmd.Context(), &types.QueryPacketRequest{ - TunnelId: tunnelID, - Nonce: nonce, + res, err := queryClient.Packets(cmd.Context(), &types.QueryPacketsRequest{ + TunnelId: tunnelID, + Pagination: pageReq, }) if err != nil { return err @@ -198,17 +184,18 @@ func GetQueryCmdPacket() *cobra.Command { }, } + flags.AddPaginationFlagsToCmd(cmd, "packets") flags.AddQueryFlagsToCmd(cmd) return cmd } -// GetQueryCmdParams implements the query params command. -func GetQueryCmdParams() *cobra.Command { +// GetQueryCmdPacket implements the query packet command. +func GetQueryCmdPacket() *cobra.Command { cmd := &cobra.Command{ - Use: "params", - Short: "Shows the parameters of the module", - Args: cobra.NoArgs, + Use: "packet [tunnel-id] [nonce]", + Short: "Query a packet by tunnel id and nonce", + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -217,7 +204,20 @@ func GetQueryCmdParams() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) + tunnelID, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + nonce, err := strconv.ParseUint(args[1], 10, 64) + if err != nil { + return err + } + + res, err := queryClient.Packet(cmd.Context(), &types.QueryPacketRequest{ + TunnelId: tunnelID, + Nonce: nonce, + }) if err != nil { return err } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 2df17e615..0254d78a3 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -107,20 +107,6 @@ func (ms msgServer) EditTunnel( return nil, err } - // Emit an event - event := sdk.NewEvent( - types.EventTypeEditTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), - sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), - sdk.NewAttribute(types.AttributeKeyCreator, req.Creator), - ) - for _, signalInfo := range req.SignalInfos { - event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeySignalPriceInfos, signalInfo.String()), - ) - } - ctx.EventManager().EmitEvent(event) - return &types.MsgEditTunnelResponse{}, nil } @@ -136,8 +122,14 @@ func (ms msgServer) ActivateTunnel( return nil, err } + // Check if the creator is the same if req.Creator != tunnel.Creator { - return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) + return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", req.Creator, req.TunnelID) + } + + // Check if the tunnel is already active + if tunnel.IsActive { + return nil, types.ErrAlreadyActive.Wrapf("tunnelID %d", req.TunnelID) } err = ms.Keeper.ActivateTunnel(ctx, req.TunnelID) @@ -161,7 +153,11 @@ func (ms msgServer) DeactivateTunnel( } if req.Creator != tunnel.Creator { - return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) + return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", req.Creator, req.TunnelID) + } + + if !tunnel.IsActive { + return nil, types.ErrAlreadyInactive.Wrapf("tunnelID %d", req.TunnelID) } err = ms.Keeper.DeactivateTunnel(ctx, req.TunnelID) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 730bc3d38..d35fbb03d 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -80,6 +80,19 @@ func (k Keeper) EditTunnel( } k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(tunnelID, signalPrices, 0)) + // Emit an event + event := sdk.NewEvent( + types.EventTypeEditTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), + ) + for _, signalInfo := range signalInfos { + event = event.AppendAttributes( + sdk.NewAttribute(types.AttributeKeySignalPriceInfos, signalInfo.String()), + ) + } + ctx.EventManager().EmitEvent(event) + return nil } diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index d46bb62eb..f91352e60 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -18,4 +18,6 @@ var ( ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") + ErrAlreadyActive = errorsmod.Register(ModuleName, 14, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 15, "already inactive") ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 429ddf425..e1c6a7394 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -14,6 +14,7 @@ var ( _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) +// NewMsgCreateTunnel creates a new MsgCreateTunnel instance. func NewMsgCreateTunnel( signalInfos []SignalInfo, interval uint64, @@ -41,7 +42,7 @@ func NewMsgCreateTunnel( }, nil } -// NewMsgCreateTunnel creates a new MsgCreateTunnel instance. +// NewMsgCreateTSSTunnel creates a new MsgCreateTunnel instance for TSS tunnel. func NewMsgCreateTSSTunnel( signalInfos []SignalInfo, interval uint64, @@ -63,7 +64,7 @@ func NewMsgCreateTSSTunnel( return m, nil } -// NewMsgCreateTunnel creates a new MsgCreateTunnel instance. +// NewMsgCreateAxelarTunnel creates a new MsgCreateTunnel instance for Axelar tunnel. func NewMsgCreateAxelarTunnel( signalInfos []SignalInfo, interval uint64, diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 2e11442bd..d85135c51 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -57,7 +57,7 @@ func (p Params) Validate() error { return err } - // Validate BaseFee + // Validate BasePacketFee if !p.BasePacketFee.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("%s", p.BasePacketFee.String()) } From 7272649984e320e9f0e76fb89f356d2905c2658b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 17 Sep 2024 17:50:10 +0700 Subject: [PATCH 107/272] rename --- proto/tunnel/v1beta1/genesis.proto | 4 +- proto/tunnel/v1beta1/tunnel.proto | 16 +- proto/tunnel/v1beta1/tx.proto | 50 +- scripts/tunnel/create_tunnel.sh | 2 +- ...gnal_infos.json => signal_deviations.json} | 2 +- x/tunnel/client/cli/tx.go | 30 +- x/tunnel/client/cli/util.go | 44 +- x/tunnel/client/cli/util_test.go | 26 +- x/tunnel/genesis.go | 24 +- x/tunnel/genesis_test.go | 8 +- x/tunnel/keeper/latest_signal_prices.go | 47 ++ x/tunnel/keeper/msg_server.go | 42 +- x/tunnel/keeper/packet.go | 22 +- x/tunnel/keeper/signal_prices_info.go | 47 -- x/tunnel/keeper/tunnel.go | 24 +- x/tunnel/types/codec.go | 14 +- x/tunnel/types/events.go | 18 +- x/tunnel/types/genesis.go | 14 +- x/tunnel/types/genesis.pb.go | 68 +-- x/tunnel/types/keys.go | 6 +- x/tunnel/types/msgs.go | 104 ++-- x/tunnel/types/query.pb.go | 2 +- x/tunnel/types/signal.go | 32 +- x/tunnel/types/tunnel.go | 34 +- x/tunnel/types/tunnel.pb.go | 306 +++++----- x/tunnel/types/tx.pb.go | 541 +++++++++--------- 26 files changed, 766 insertions(+), 761 deletions(-) rename scripts/tunnel/{signal_infos.json => signal_deviations.json} (87%) create mode 100644 x/tunnel/keeper/latest_signal_prices.go delete mode 100644 x/tunnel/keeper/signal_prices_info.go diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index 415abacaa..97e9f6d24 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -15,8 +15,8 @@ message GenesisState { uint64 tunnel_count = 2; // tunnels is the list of tunnels. repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; - // signal_prices_infos is the signal prices info. - repeated SignalPricesInfo signal_prices_infos = 4 [(gogoproto.nullable) = false]; + // latest_signal_prices_list is the list of latest signal prices. + repeated LatestSignalPrices latest_signal_prices_list = 4 [(gogoproto.nullable) = false]; // total_fees is the type for the total fees collected by the tunnel TotalFees total_fees = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 1f6fff5e7..582757cda 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -31,8 +31,8 @@ message AxelarRoute { string destination_contract_address = 2; } -// SignalInfo is the type for a signal info -message SignalInfo { +// SignalDeviation is the type for a signal with soft and hard deviation +message SignalDeviation { option (gogoproto.equal) = true; // signal_id is the signal ID @@ -57,8 +57,8 @@ message Tunnel { Encoder encoder = 4; // fee_payer is the address of the fee payer string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // signal_infos is the list of signal infos - repeated SignalInfo signal_infos = 6 [(gogoproto.nullable) = false]; + // signal_deviations is the list of signal deviations + repeated SignalDeviation signal_deviations = 6 [(gogoproto.nullable) = false]; // interval is the interval for delivering the signal prices uint64 interval = 7; // is_active is the flag to indicate if the tunnel is active @@ -69,16 +69,16 @@ message Tunnel { string creator = 10 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// SignalPricesInfo is the type for signal prices that tunnel produces -message SignalPricesInfo { +// LatestSignalPrices is the type for signal prices that tunnel produces +message LatestSignalPrices { option (gogoproto.equal) = true; // tunnel_id is the tunnel ID uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // signal_prices is the list of signal prices repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; - // last_interval_timestamp is the timestamp of the last time that the packet is sent - int64 last_interval_timestamp = 3; + // timestamp is the timestamp when the signal prices are produced + int64 timestamp = 3; } // SignalPrice is the type for a signal price diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index a64337aba..5dbe47c1a 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -21,14 +21,14 @@ service Msg { // EditTunnel is a RPC method to edit a tunnel. rpc EditTunnel(MsgEditTunnel) returns (MsgEditTunnelResponse); - // ActivateTunnel is a RPC method to activate a tunnel. - rpc ActivateTunnel(MsgActivateTunnel) returns (MsgActivateTunnelResponse); + // Activate is a RPC method to activate a tunnel. + rpc Activate(MsgActivate) returns (MsgActivateResponse); - // DeactivateTunnel is a RPC method to deactivate a tunnel. - rpc DeactivateTunnel(MsgDeactivateTunnel) returns (MsgDeactivateTunnelResponse); + // Deactivate is a RPC method to deactivate a tunnel. + rpc Deactivate(MsgDeactivate) returns (MsgDeactivateResponse); - // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. - rpc ManualTriggerTunnel(MsgManualTriggerTunnel) returns (MsgManualTriggerTunnelResponse); + // TriggerTunnel is a RPC method to manually trigger a tunnel. + rpc TriggerTunnel(MsgTriggerTunnel) returns (MsgTriggerTunnelResponse); // UpdateParams is a RPC method to update parameters rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); @@ -39,8 +39,8 @@ message MsgCreateTunnel { option (cosmos.msg.v1.signer) = "creator"; option (amino.name) = "tunnel/MsgCreateTunnel"; - // signal_infos is the list of signal infos. - repeated SignalInfo signal_infos = 1 [(gogoproto.nullable) = false]; + // signal_deviations is the list of signal deviations. + repeated SignalDeviation signal_deviations = 1 [(gogoproto.nullable) = false]; // interval is the interval for delivering the signal prices. uint64 interval = 2; // route is the route for delivering the signal prices @@ -66,8 +66,8 @@ message MsgEditTunnel { // tunnel_id is the ID of the tunnel to edit. uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - // signal_infos is the list of signal infos. - repeated SignalInfo signal_infos = 2 [(gogoproto.nullable) = false]; + // signal_deviations is the list of signal deviations. + repeated SignalDeviation signal_deviations = 2 [(gogoproto.nullable) = false]; // interval is the interval for delivering the signal prices. uint64 interval = 3; // creator is the address of the creator. @@ -77,10 +77,10 @@ message MsgEditTunnel { // MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. message MsgEditTunnelResponse {} -// MsgActivateTunnel is the transaction message to activate a tunnel. -message MsgActivateTunnel { +// Activate is the transaction message to activate a tunnel. +message MsgActivate { option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "tunnel/MsgActivateTunnel"; + option (amino.name) = "tunnel/MsgActivate"; // tunnel_id is the ID of the tunnel to activate. uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; @@ -88,13 +88,13 @@ message MsgActivateTunnel { string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgActivateTunnelResponse is the response type for the Msg/ActivateTunnel RPC method. -message MsgActivateTunnelResponse {} +// MsgActivateResponse is the response type for the Msg/Activate RPC method. +message MsgActivateResponse {} -// MsgDeactivateTunnel is the transaction message to deactivate a tunnel. -message MsgDeactivateTunnel { +// MsgDeactivate is the transaction message to deactivate a tunnel. +message MsgDeactivate { option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "tunnel/MsgDeactivateTunnel"; + option (amino.name) = "tunnel/MsgDeactivate"; // tunnel_id is the ID of the tunnel to deactivate. uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; @@ -102,13 +102,13 @@ message MsgDeactivateTunnel { string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgDeactivateTunnelResponse is the response type for the Msg/DeactivateTunnel RPC method. -message MsgDeactivateTunnelResponse {} +// MsgDeactivateTunnelResponse is the response type for the Msg/Deactivate RPC method. +message MsgDeactivateResponse {} -// MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. -message MsgManualTriggerTunnel { +// MsgTriggerTunnel is the transaction message to manually trigger a tunnel. +message MsgTriggerTunnel { option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "tunnel/MsgManualTriggerTunnel"; + option (amino.name) = "tunnel/MsgTriggerTunnel"; // tunnel_id is the ID of the tunnel to manually trigger. uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; @@ -116,8 +116,8 @@ message MsgManualTriggerTunnel { string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgManualTriggerTunnelResponse is the response type for the Msg/ManualTrigger RPC method. -message MsgManualTriggerTunnelResponse {} +// MsgTriggerTunnelResponse is the response type for the Msg/TriggerTunnel RPC method. +message MsgTriggerTunnelResponse {} // MsgUpdateParams is the transaction message to update parameters. message MsgUpdateParams { diff --git a/scripts/tunnel/create_tunnel.sh b/scripts/tunnel/create_tunnel.sh index 175d16531..b4b985013 100644 --- a/scripts/tunnel/create_tunnel.sh +++ b/scripts/tunnel/create_tunnel.sh @@ -1 +1 @@ -bandd tx tunnel create-tss-tunnel 1 evm-1 0x0001 1band ./scripts/tunnel/signal_infos.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain +bandd tx tunnel create-tss-tunnel 1 evm-1 0x0001 1band ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/signal_infos.json b/scripts/tunnel/signal_deviations.json similarity index 87% rename from scripts/tunnel/signal_infos.json rename to scripts/tunnel/signal_deviations.json index c62da697b..bd7287a9b 100644 --- a/scripts/tunnel/signal_infos.json +++ b/scripts/tunnel/signal_deviations.json @@ -1,5 +1,5 @@ { - "signal_infos": [ + "signal_deviations": [ { "signal_id": "BTC", "deviation_bps": 2000 diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index dd84bfcce..398bf5325 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -23,16 +23,16 @@ func GetTxCmd() *cobra.Command { } txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) - txCmd.AddCommand(GetTxCmdActivateTunnel()) - txCmd.AddCommand(GetTxCmdDeactivateTunnel()) - txCmd.AddCommand(GetTxCmdManualTriggerTunnel()) + txCmd.AddCommand(GetTxCmdActivate()) + txCmd.AddCommand(GetTxCmdDeactivate()) + txCmd.AddCommand(GetTxCmdTriggerTunnel()) return txCmd } func GetTxCmdCreateTSSTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "create-tss-tunnel [encoder] [destination-chain-id] [destination-contract-address] [deposit] [signalInfos-json-file]", + Use: "create-tss-tunnel [encoder] [destination-chain-id] [destination-contract-address] [deposit] [signalDeviations-json-file]", Short: "Create a new TSS tunnel", Args: cobra.ExactArgs(5), RunE: func(cmd *cobra.Command, args []string) error { @@ -51,7 +51,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - signalInfos, err := parseSignalInfos(args[4]) + signalDeviations, err := parseSignalDeviations(args[4]) if err != nil { return err } @@ -62,7 +62,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { } msg, err := types.NewMsgCreateTSSTunnel( - signalInfos.ToSignalInfos(), + signalDeviations.ToSignalDeviations(), interval, types.Encoder(encoder), args[1], @@ -83,9 +83,9 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return cmd } -func GetTxCmdActivateTunnel() *cobra.Command { +func GetTxCmdActivate() *cobra.Command { cmd := &cobra.Command{ - Use: "activate-tunnel [tunnel-id]", + Use: "activate [tunnel-id]", Short: "Activate a tunnel", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -99,7 +99,7 @@ func GetTxCmdActivateTunnel() *cobra.Command { return err } - msg := types.NewMsgActivateTunnel(id, clientCtx.GetFromAddress().String()) + msg := types.NewMsgActivate(id, clientCtx.GetFromAddress().String()) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -109,9 +109,9 @@ func GetTxCmdActivateTunnel() *cobra.Command { return cmd } -func GetTxCmdDeactivateTunnel() *cobra.Command { +func GetTxCmdDeactivate() *cobra.Command { cmd := &cobra.Command{ - Use: "deactivate-tunnel [tunnel-id]", + Use: "deactivate [tunnel-id]", Short: "Deactivate a tunnel", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -125,7 +125,7 @@ func GetTxCmdDeactivateTunnel() *cobra.Command { return err } - msg := types.NewMsgDeactivateTunnel(id, clientCtx.GetFromAddress().String()) + msg := types.NewMsgDeactivate(id, clientCtx.GetFromAddress().String()) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -135,9 +135,9 @@ func GetTxCmdDeactivateTunnel() *cobra.Command { return cmd } -func GetTxCmdManualTriggerTunnel() *cobra.Command { +func GetTxCmdTriggerTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "manual-trigger-tunnel [tunnel-id]", + Use: "trigger [tunnel-id]", Short: "Manual trigger a tunnel", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -151,7 +151,7 @@ func GetTxCmdManualTriggerTunnel() *cobra.Command { return err } - msg := types.NewMsgManualTriggerTunnel(tunnelID, clientCtx.GetFromAddress().String()) + msg := types.NewMsgTriggerTunnel(tunnelID, clientCtx.GetFromAddress().String()) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index e6a33576e..52fd90eee 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -7,48 +7,48 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// SignalInfos represents the signal infos in the file -type SignalInfos struct { - SignalInfos []SignalInfo `json:"signal_infos"` +// SignalDeviations represents the signal deviation in the file +type SignalDeviations struct { + SignalDeviations []SignalDeviation `json:"signal_deviations"` } -// SignalInfo represents the signal information without soft deviation, which may be implemented in the future. -type SignalInfo struct { +// SignalDeviation represents the signal information without soft deviation, which may be implemented in the future. +type SignalDeviation struct { SignalID string `json:"signal_id"` DeviationBPS uint64 `json:"deviation_bps"` } -// ToSignalInfos converts signal information to types.SignalInfo, excluding soft deviation. +// ToSignalDeviations converts signal information to types.SignalDeviation, excluding soft deviation. // Note: Soft deviation may be utilized in the future for deviation adjustments. -func (sis SignalInfos) ToSignalInfos() []types.SignalInfo { - var signalInfos []types.SignalInfo - for _, si := range sis.SignalInfos { - signalInfo := types.SignalInfo{ +func (sis SignalDeviations) ToSignalDeviations() []types.SignalDeviation { + var signalDeviations []types.SignalDeviation + for _, si := range sis.SignalDeviations { + signalDeviation := types.SignalDeviation{ SignalID: si.SignalID, SoftDeviationBPS: si.DeviationBPS, HardDeviationBPS: si.DeviationBPS, } - signalInfos = append(signalInfos, signalInfo) + signalDeviations = append(signalDeviations, signalDeviation) } - return signalInfos + return signalDeviations } -// parseSignalInfos parses the signal infos from the given file -func parseSignalInfos(signalInfosFile string) (SignalInfos, error) { - var signalInfos SignalInfos +// parseSignalDeviations parses the signal infos from the given file +func parseSignalDeviations(signalDeviationsFile string) (SignalDeviations, error) { + var signalDeviations SignalDeviations - if signalInfosFile == "" { - return SignalInfos{}, nil + if signalDeviationsFile == "" { + return SignalDeviations{}, nil } - contents, err := os.ReadFile(signalInfosFile) + contents, err := os.ReadFile(signalDeviationsFile) if err != nil { - return SignalInfos{}, err + return SignalDeviations{}, err } - if err := json.Unmarshal(contents, &signalInfos); err != nil { - return SignalInfos{}, err + if err := json.Unmarshal(contents, &signalDeviations); err != nil { + return SignalDeviations{}, err } - return signalInfos, nil + return signalDeviations, nil } diff --git a/x/tunnel/client/cli/util_test.go b/x/tunnel/client/cli/util_test.go index 68abd940e..3491f7b2a 100644 --- a/x/tunnel/client/cli/util_test.go +++ b/x/tunnel/client/cli/util_test.go @@ -8,45 +8,45 @@ import ( "github.com/stretchr/testify/require" ) -func TestParseSignalInfos(t *testing.T) { - // Test case for valid signal info - t.Run("valid signal info", func(t *testing.T) { +func TestParseSignalDeviations(t *testing.T) { + // Test case for valid signal deviation + t.Run("valid signal deviations", func(t *testing.T) { // Setup - signalInfos := []SignalInfo{ + signalDeviations := []SignalDeviation{ {SignalID: "BTC", DeviationBPS: 2000}, {SignalID: "ETH", DeviationBPS: 4000}, } - file, cleanup := createTempSignalInfoFile(signalInfos) + file, cleanup := createTempSignalDeviationFile(signalDeviations) defer cleanup() // Execute - result, err := parseSignalInfos(file) + result, err := parseSignalDeviations(file) // Verify require.NoError(t, err) - require.Equal(t, signalInfos, result.SignalInfos) + require.Equal(t, signalDeviations, result.SignalDeviations) }) // Test case for empty file path t.Run("empty file path", func(t *testing.T) { - result, err := parseSignalInfos("") + result, err := parseSignalDeviations("") require.NoError(t, err) - require.Equal(t, SignalInfos{}, result) + require.Equal(t, SignalDeviations{}, result) }) } // Helper function to create a temporary file with signal info JSON content -func createTempSignalInfoFile(signalInfos []SignalInfo) (string, func()) { - file, err := os.CreateTemp("", "signalInfos*.json") +func createTempSignalDeviationFile(signalDeviations []SignalDeviation) (string, func()) { + file, err := os.CreateTemp("", "signalDeviations*.json") if err != nil { panic(err) } filePath := file.Name() data := struct { - SignalInfos []SignalInfo `json:"signal_infos"` - }{SignalInfos: signalInfos} + SignalDeviations []SignalDeviation `json:"signal_deviations"` + }{SignalDeviations: signalDeviations} content, err := json.Marshal(data) if err != nil { diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 101474638..454273c6e 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -31,12 +31,12 @@ func ValidateGenesis(data *types.GenesisState) error { } } - // validate the signal prices infos - for _, signalPricesInfo := range data.SignalPricesInfos { - if signalPricesInfo.TunnelID == 0 { + // validate latest signal prices + for _, latestSignalPrices := range data.LatestSignalPricesList { + if latestSignalPrices.TunnelID == 0 { return types.ErrInvalidGenesis.Wrapf( "TunnelID %d cannot be 0 or greater than the TunnelCount %d", - signalPricesInfo.TunnelID, + latestSignalPrices.TunnelID, data.TunnelCount, ) } @@ -80,9 +80,9 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { k.ActiveTunnelID(ctx, tunnel.ID) } - // set the signal prices infos - for _, signalPricesInfo := range data.SignalPricesInfos { - k.SetSignalPricesInfo(ctx, signalPricesInfo) + // set the latest signal prices + for _, latestSignalPrices := range data.LatestSignalPricesList { + k.SetLatestSignalPrices(ctx, latestSignalPrices) } // set the total fees @@ -92,10 +92,10 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { // ExportGenesis returns the module's exported genesis func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { return &types.GenesisState{ - Params: k.GetParams(ctx), - TunnelCount: k.GetTunnelCount(ctx), - Tunnels: k.GetTunnels(ctx), - SignalPricesInfos: k.GetSignalPricesInfos(ctx), - TotalFees: k.GetTotalFees(ctx), + Params: k.GetParams(ctx), + TunnelCount: k.GetTunnelCount(ctx), + Tunnels: k.GetTunnels(ctx), + LatestSignalPricesList: k.GetAllLatestSignalPrices(ctx), + TotalFees: k.GetTotalFees(ctx), } } diff --git a/x/tunnel/genesis_test.go b/x/tunnel/genesis_test.go index d98246a84..bd08ee4c2 100644 --- a/x/tunnel/genesis_test.go +++ b/x/tunnel/genesis_test.go @@ -28,7 +28,7 @@ func TestValidateGenesis(t *testing.T) { {ID: 2}, }, TunnelCount: 2, - SignalPricesInfos: []types.SignalPricesInfo{ + LatestSignalPricesList: []types.LatestSignalPrices{ {TunnelID: 1}, {TunnelID: 2}, }, @@ -66,7 +66,7 @@ func TestValidateGenesis(t *testing.T) { {ID: 1}, }, TunnelCount: 1, - SignalPricesInfos: []types.SignalPricesInfo{ + LatestSignalPricesList: []types.LatestSignalPrices{ {TunnelID: 0}, }, }, @@ -121,13 +121,13 @@ func TestInitExportGenesis(t *testing.T) { Tunnels: []types.Tunnel{ {ID: 1}, }, - SignalPricesInfos: []types.SignalPricesInfo{ + LatestSignalPricesList: []types.LatestSignalPrices{ { TunnelID: 1, SignalPrices: []types.SignalPrice{ {SignalID: "ETH", Price: 5000}, }, - LastIntervalTimestamp: 0, + Timestamp: 0, }, }, TotalFees: types.TotalFees{ diff --git a/x/tunnel/keeper/latest_signal_prices.go b/x/tunnel/keeper/latest_signal_prices.go new file mode 100644 index 000000000..736163e96 --- /dev/null +++ b/x/tunnel/keeper/latest_signal_prices.go @@ -0,0 +1,47 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +// SetLatestSignalPrices sets the latest signal prices in the store +func (k Keeper) SetLatestSignalPrices(ctx sdk.Context, latestSignalPrices types.LatestSignalPrices) { + ctx.KVStore(k.storeKey). + Set(types.LatestSignalPricesStoreKey(latestSignalPrices.TunnelID), k.cdc.MustMarshal(&latestSignalPrices)) +} + +// GetLatestSignalPrices gets the latest signal prices from the store +func (k Keeper) GetLatestSignalPrices(ctx sdk.Context, tunnelID uint64) (types.LatestSignalPrices, error) { + bz := ctx.KVStore(k.storeKey).Get(types.LatestSignalPricesStoreKey(tunnelID)) + if bz == nil { + return types.LatestSignalPrices{}, types.ErrSignalPricesInfoNotFound.Wrapf("tunnelID: %d", tunnelID) + } + + var latestSignalPrices types.LatestSignalPrices + k.cdc.MustUnmarshal(bz, &latestSignalPrices) + return latestSignalPrices, nil +} + +// MustGetLatestSignalPrices retrieves the latest signal prices by its tunnel ID. Panics if the signal prices does not exist. +func (k Keeper) MustGetLatestSignalPrices(ctx sdk.Context, tunnelID uint64) types.LatestSignalPrices { + latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + if err != nil { + panic(err) + } + return latestSignalPrices +} + +// GetAllLatestSignalPrices gets all the latest signal prices from the store +func (k Keeper) GetAllLatestSignalPrices(ctx sdk.Context) []types.LatestSignalPrices { + var allLatestSignalPrices []types.LatestSignalPrices + iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.LatestSignalPricesStoreKeyPrefix) + defer iterator.Close() + for ; iterator.Valid(); iterator.Next() { + var latestSignalPrices types.LatestSignalPrices + k.cdc.MustUnmarshal(iterator.Value(), &latestSignalPrices) + allLatestSignalPrices = append(allLatestSignalPrices, latestSignalPrices) + } + return allLatestSignalPrices +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 0254d78a3..1ccd1f3af 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -31,7 +31,7 @@ func (ms msgServer) CreateTunnel( // validate signal infos and interval params := ms.Keeper.GetParams(ctx) - if len(req.SignalInfos) > int(params.MaxSignals) { + if len(req.SignalDeviations) > int(params.MaxSignals) { return nil, types.ErrMaxSignalsExceeded } if req.Interval < params.MinInterval { @@ -45,7 +45,7 @@ func (ms msgServer) CreateTunnel( ctx, req.Route, req.Encoder, - req.SignalInfos, + req.SignalDeviations, req.Interval, req.Creator, ) @@ -65,9 +65,9 @@ func (ms msgServer) CreateTunnel( sdk.NewAttribute(types.AttributeKeyCreatedAt, fmt.Sprintf("%d", tunnel.CreatedAt)), sdk.NewAttribute(types.AttributeKeyCreator, req.Creator), ) - for _, signalInfo := range req.SignalInfos { + for _, sd := range req.SignalDeviations { event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeySignalPriceInfos, signalInfo.String()), + sdk.NewAttribute(types.AttributeKeySignalPriceInfos, sd.String()), ) } ctx.EventManager().EmitEvent(event) @@ -86,7 +86,7 @@ func (ms msgServer) EditTunnel( // validate signal infos and interval params := ms.Keeper.GetParams(ctx) - if len(req.SignalInfos) > int(params.MaxSignals) { + if len(req.SignalDeviations) > int(params.MaxSignals) { return nil, types.ErrMaxSignalsExceeded } if req.Interval < params.MinInterval { @@ -102,7 +102,7 @@ func (ms msgServer) EditTunnel( return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) } - err = ms.Keeper.EditTunnel(ctx, req.TunnelID, req.SignalInfos, req.Interval) + err = ms.Keeper.EditTunnel(ctx, req.TunnelID, req.SignalDeviations, req.Interval) if err != nil { return nil, err } @@ -110,11 +110,11 @@ func (ms msgServer) EditTunnel( return &types.MsgEditTunnelResponse{}, nil } -// ActivateTunnel activates a tunnel. -func (ms msgServer) ActivateTunnel( +// Activate activates a tunnel. +func (ms msgServer) Activate( goCtx context.Context, - req *types.MsgActivateTunnel, -) (*types.MsgActivateTunnelResponse, error) { + req *types.MsgActivate, +) (*types.MsgActivateResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) @@ -137,14 +137,14 @@ func (ms msgServer) ActivateTunnel( return nil, err } - return &types.MsgActivateTunnelResponse{}, nil + return &types.MsgActivateResponse{}, nil } -// DeactivateTunnel deactivates a tunnel. -func (ms msgServer) DeactivateTunnel( +// Deactivate deactivates a tunnel. +func (ms msgServer) Deactivate( goCtx context.Context, - req *types.MsgDeactivateTunnel, -) (*types.MsgDeactivateTunnelResponse, error) { + req *types.MsgDeactivate, +) (*types.MsgDeactivateResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) @@ -165,14 +165,14 @@ func (ms msgServer) DeactivateTunnel( return nil, err } - return &types.MsgDeactivateTunnelResponse{}, nil + return &types.MsgDeactivateResponse{}, nil } -// ManualTriggerTunnel manually triggers a tunnel. -func (ms msgServer) ManualTriggerTunnel( +// TriggerTunnel manually triggers a tunnel. +func (ms msgServer) TriggerTunnel( goCtx context.Context, - req *types.MsgManualTriggerTunnel, -) (*types.MsgManualTriggerTunnelResponse, error) { + req *types.MsgTriggerTunnel, +) (*types.MsgTriggerTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) @@ -217,7 +217,7 @@ func (ms msgServer) ManualTriggerTunnel( sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), )) - return &types.MsgManualTriggerTunnelResponse{}, nil + return &types.MsgTriggerTunnelResponse{}, nil } // UpdateParams updates the module params. diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index e834654ee..4e9b41090 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -112,18 +112,18 @@ func (k Keeper) ProducePacket( // get tunnel and signal prices info tunnel := k.MustGetTunnel(ctx, tunnelID) - signalPricesInfo := k.MustGetSignalPricesInfo(ctx, tunnelID) + latestSignalPrices := k.MustGetLatestSignalPrices(ctx, tunnelID) // check if the interval has passed - intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+signalPricesInfo.LastIntervalTimestamp + intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+latestSignalPrices.Timestamp // generate new signal prices nsps := GenerateSignalPrices( ctx, tunnel.ID, currentPricesMap, - tunnel.GetSignalInfoMap(), - signalPricesInfo.SignalPrices, + tunnel.GetSignalDeviationMap(), + latestSignalPrices.SignalPrices, triggerAll || intervalTrigger, ) @@ -138,11 +138,11 @@ func (k Keeper) ProducePacket( } // update signal prices info - signalPricesInfo.UpdateSignalPrices(nsps) + latestSignalPrices.UpdateSignalPrices(nsps) if triggerAll || intervalTrigger { - signalPricesInfo.LastIntervalTimestamp = unixNow + latestSignalPrices.Timestamp = unixNow } - k.SetSignalPricesInfo(ctx, signalPricesInfo) + k.SetLatestSignalPrices(ctx, latestSignalPrices) // update tunnel nonce count tunnel.NonceCount++ @@ -190,7 +190,7 @@ func GenerateSignalPrices( ctx sdk.Context, tunnelID uint64, currentPricesMap map[string]feedstypes.Price, - signalInfoMap map[string]types.SignalInfo, + signalDeviationMap map[string]types.SignalDeviation, signalPrices []types.SignalPrice, triggerAll bool, ) []types.SignalPrice { @@ -202,8 +202,8 @@ func GenerateSignalPrices( continue } - // get signal info from signalInfoMap - signalInfo, exists := signalInfoMap[sp.SignalID] + // get signal info from signalDeviationMap + signalDeviation, exists := signalDeviationMap[sp.SignalID] if !exists { // panic if signal info not found for signal ID in the tunnel that should not happen panic(fmt.Sprintf("signal info not found for signal ID: %s", sp.SignalID)) @@ -214,7 +214,7 @@ func GenerateSignalPrices( deviationExceedsThreshold( sdk.NewIntFromUint64(sp.Price), sdk.NewIntFromUint64(currentPrice.Price), - sdk.NewIntFromUint64(signalInfo.HardDeviationBPS), + sdk.NewIntFromUint64(signalDeviation.HardDeviationBPS), ) { sps = append( sps, diff --git a/x/tunnel/keeper/signal_prices_info.go b/x/tunnel/keeper/signal_prices_info.go deleted file mode 100644 index 97b70ef22..000000000 --- a/x/tunnel/keeper/signal_prices_info.go +++ /dev/null @@ -1,47 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -// SetSignalPricesInfo sets the signal prices info in the store -func (k Keeper) SetSignalPricesInfo(ctx sdk.Context, signalPricesInfo types.SignalPricesInfo) { - ctx.KVStore(k.storeKey). - Set(types.SignalPricesInfoStoreKey(signalPricesInfo.TunnelID), k.cdc.MustMarshal(&signalPricesInfo)) -} - -// GetSignalPricesInfo gets the signal prices info from the store -func (k Keeper) GetSignalPricesInfo(ctx sdk.Context, tunnelID uint64) (types.SignalPricesInfo, error) { - bz := ctx.KVStore(k.storeKey).Get(types.SignalPricesInfoStoreKey(tunnelID)) - if bz == nil { - return types.SignalPricesInfo{}, types.ErrSignalPricesInfoNotFound.Wrapf("tunnelID: %d", tunnelID) - } - - var signalPricesInfo types.SignalPricesInfo - k.cdc.MustUnmarshal(bz, &signalPricesInfo) - return signalPricesInfo, nil -} - -// MustGetSignalPricesInfo gets the signal prices info from the store and panics if it does not exist -func (k Keeper) MustGetSignalPricesInfo(ctx sdk.Context, tunnelID uint64) types.SignalPricesInfo { - signalPricesInfo, err := k.GetSignalPricesInfo(ctx, tunnelID) - if err != nil { - panic(err) - } - return signalPricesInfo -} - -// GetSignalPricesInfos gets all signal prices infos from the store -func (k Keeper) GetSignalPricesInfos(ctx sdk.Context) []types.SignalPricesInfo { - var signalPricesInfos []types.SignalPricesInfo - iterator := sdk.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.SignalPricesInfoStoreKeyPrefix) - defer iterator.Close() - for ; iterator.Valid(); iterator.Next() { - var signalPricesInfo types.SignalPricesInfo - k.cdc.MustUnmarshal(iterator.Value(), &signalPricesInfo) - signalPricesInfos = append(signalPricesInfos, signalPricesInfo) - } - return signalPricesInfos -} diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index d35fbb03d..cc56e1fc3 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -14,7 +14,7 @@ func (k Keeper) AddTunnel( ctx sdk.Context, route *codectypes.Any, encoder types.Encoder, - signalInfos []types.SignalInfo, + signalDeviations []types.SignalDeviation, interval uint64, creator string, ) (*types.Tunnel, error) { @@ -30,10 +30,10 @@ func (k Keeper) AddTunnel( // Set the signal prices info var signalPrices []types.SignalPrice - for _, si := range signalInfos { - signalPrices = append(signalPrices, types.NewSignalPrice(si.SignalID, 0)) + for _, sd := range signalDeviations { + signalPrices = append(signalPrices, types.NewSignalPrice(sd.SignalID, 0)) } - k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(newID, signalPrices, 0)) + k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(newID, signalPrices, 0)) // Create a new tunnel tunnel := types.NewTunnel( @@ -42,7 +42,7 @@ func (k Keeper) AddTunnel( route, encoder, feePayer.String(), - signalInfos, + signalDeviations, interval, false, ctx.BlockTime().Unix(), @@ -60,7 +60,7 @@ func (k Keeper) AddTunnel( func (k Keeper) EditTunnel( ctx sdk.Context, tunnelID uint64, - signalInfos []types.SignalInfo, + signalDeviations []types.SignalDeviation, interval uint64, ) error { tunnel, err := k.GetTunnel(ctx, tunnelID) @@ -68,17 +68,17 @@ func (k Keeper) EditTunnel( return err } - // Edit the signal infos and interval - tunnel.SignalInfos = signalInfos + // Edit the tunnel + tunnel.SignalDeviations = signalDeviations tunnel.Interval = interval k.SetTunnel(ctx, tunnel) // Edit the signal prices info var signalPrices []types.SignalPrice - for _, sp := range signalInfos { + for _, sp := range signalDeviations { signalPrices = append(signalPrices, types.NewSignalPrice(sp.SignalID, 0)) } - k.SetSignalPricesInfo(ctx, types.NewSignalPricesInfo(tunnelID, signalPrices, 0)) + k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, signalPrices, 0)) // Emit an event event := sdk.NewEvent( @@ -86,9 +86,9 @@ func (k Keeper) EditTunnel( sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), ) - for _, signalInfo := range signalInfos { + for _, signalDeviation := range signalDeviations { event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeySignalPriceInfos, signalInfo.String()), + sdk.NewAttribute(types.AttributeKeySignalPriceInfos, signalDeviation.String()), ) } ctx.EventManager().EmitEvent(event) diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 11b3a91a6..77c5e2501 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -12,9 +12,12 @@ import ( // RegisterLegacyAminoCodec registers the necessary x/tunnel interfaces and concrete types // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "tunnel/MsgUpdateParams") legacy.RegisterAminoMsg(cdc, &MsgCreateTunnel{}, "tunnel/MsgCreateTunnel") - legacy.RegisterAminoMsg(cdc, &MsgActivateTunnel{}, "tunnel/MsgActivateTunnel") + legacy.RegisterAminoMsg(cdc, &MsgEditTunnel{}, "tunnel/MsgEditTunnel") + legacy.RegisterAminoMsg(cdc, &MsgActivate{}, "tunnel/MsgActivate") + legacy.RegisterAminoMsg(cdc, &MsgDeactivate{}, "tunnel/MsgDeactivate") + legacy.RegisterAminoMsg(cdc, &MsgTriggerTunnel{}, "tunnel/MsgTriggerTunnel") + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "tunnel/MsgUpdateParams") cdc.RegisterInterface((*RouteI)(nil), nil) cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) @@ -28,9 +31,12 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), - &MsgUpdateParams{}, &MsgCreateTunnel{}, - &MsgActivateTunnel{}, + &MsgEditTunnel{}, + &MsgActivate{}, + &MsgDeactivate{}, + &MsgTriggerTunnel{}, + &MsgUpdateParams{}, ) registry.RegisterInterface( diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index bee59d4ef..05ffe16b1 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,15 +2,15 @@ package types // events const ( - EventTypeUpdateParams = "update_params" - EventTypeCreateTunnel = "create_tunnel" - EventTypeEditTunnel = "edit_tunnel" - EventTypeActivateTunnel = "activate_tunnel" - EventTypeDeactivateTunnel = "deactivate_tunnel" - EventTypeManualTriggerTunnel = "manual_trigger_tunnel" - EventTypeSignalInfoNotFound = "signal_info_not_found" - EventTypeProducePacketFail = "produce_packet_fail" - EventTypeNoTunnelRoute = "no_tunnel_route" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeEditTunnel = "edit_tunnel" + EventTypeActivateTunnel = "activate_tunnel" + EventTypeDeactivateTunnel = "deactivate_tunnel" + EventTypeManualTriggerTunnel = "manual_trigger_tunnel" + EventTypeSignalDeviationNotFound = "signal_info_not_found" + EventTypeProducePacketFail = "produce_packet_fail" + EventTypeNoTunnelRoute = "no_tunnel_route" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 57143fde3..1fc5aa21e 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -5,19 +5,19 @@ func NewGenesisState( params Params, tunnelCount uint64, tunnels []Tunnel, - signalPricesInfos []SignalPricesInfo, + latestSignalPricesList []LatestSignalPrices, totalFees TotalFees, ) *GenesisState { return &GenesisState{ - Params: params, - TunnelCount: tunnelCount, - Tunnels: tunnels, - SignalPricesInfos: signalPricesInfos, - TotalFees: totalFees, + Params: params, + TunnelCount: tunnelCount, + Tunnels: tunnels, + LatestSignalPricesList: latestSignalPricesList, + TotalFees: totalFees, } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []SignalPricesInfo{}, TotalFees{}) + return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []LatestSignalPrices{}, TotalFees{}) } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index ac69b8cea..910a41ab6 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -31,8 +31,8 @@ type GenesisState struct { TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` // tunnels is the list of tunnels. Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` - // signal_prices_infos is the signal prices info. - SignalPricesInfos []SignalPricesInfo `protobuf:"bytes,4,rep,name=signal_prices_infos,json=signalPricesInfos,proto3" json:"signal_prices_infos"` + // latest_signal_prices_list is the list of latest signal prices. + LatestSignalPricesList []LatestSignalPrices `protobuf:"bytes,4,rep,name=latest_signal_prices_list,json=latestSignalPricesList,proto3" json:"latest_signal_prices_list"` // total_fees is the type for the total fees collected by the tunnel TotalFees TotalFees `protobuf:"bytes,5,opt,name=total_fees,json=totalFees,proto3" json:"total_fees"` } @@ -91,9 +91,9 @@ func (m *GenesisState) GetTunnels() []Tunnel { return nil } -func (m *GenesisState) GetSignalPricesInfos() []SignalPricesInfo { +func (m *GenesisState) GetLatestSignalPricesList() []LatestSignalPrices { if m != nil { - return m.SignalPricesInfos + return m.LatestSignalPricesList } return nil } @@ -112,28 +112,28 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 328 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4e, 0xfa, 0x30, - 0x1c, 0xc7, 0x57, 0xe0, 0xcf, 0x3f, 0x16, 0x62, 0x62, 0x35, 0x66, 0xa2, 0xa9, 0xd3, 0x13, 0xa7, - 0x35,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f2, 0x6b, 0xc6, 0x11, 0x94, 0x1d, 0x43, 0x83, 0xf6, 0x0d, - 0xd9, 0x13, 0x23, 0xe9, 0x6c, 0x3b, 0xaa, 0x94, 0x2b, 0x74, 0x09, 0xa1, 0x96, 0x9a, 0x66, 0xd1, - 0x88, 0x31, 0xe5, 0xff, 0x33, 0xcb, 0x1e, 0xfc, 0x18, 0xa9, 0x20, 0x6e, 0x18, 0xdb, 0xec, 0xbb, - 0xa5, 0xbf, 0x82, 0xde, 0x62, 0x85, 0xc1, 0x72, 0x85, 0xc1, 0xc7, 0x0a, 0x83, 0x97, 0x35, 0xf6, - 0x96, 0x6b, 0xec, 0xbd, 0xad, 0xb1, 0xf7, 0x40, 0x52, 0xae, 0xc7, 0xb3, 0x38, 0x4c, 0xe4, 0x84, - 0xc4, 0x54, 0x3c, 0x9a, 0x3f, 0x9d, 0xc8, 0x8c, 0x24, 0x63, 0xca, 0x05, 0x99, 0x77, 0xc9, 0x93, - 0xbb, 0x04, 0xa2, 0x9f, 0x73, 0xa6, 0xe2, 0xba, 0x21, 0xce, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x91, 0xb9, 0xd4, 0x8c, 0x0b, 0x02, 0x00, 0x00, + // 330 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0x4f, 0x02, 0x31, + 0x14, 0xc7, 0xef, 0x00, 0x31, 0x16, 0xe2, 0x70, 0x31, 0xe4, 0x40, 0x73, 0x22, 0x13, 0xd3, 0x35, + 0xa0, 0x71, 0x74, 0xd0, 0x44, 0x63, 0xc2, 0x40, 0xc0, 0xc9, 0xe5, 0xd2, 0xab, 0xf5, 0x68, 0x52, + 0xda, 0x0b, 0x7d, 0x10, 0xfd, 0x16, 0x7e, 0x28, 0x07, 0x46, 0x46, 0x27, 0x63, 0xe0, 0x8b, 0x18, + 0xda, 0x4a, 0x22, 0xe8, 0x76, 0xef, 0xfd, 0x7f, 0xef, 0x77, 0xaf, 0x2d, 0x3a, 0x81, 0xa9, 0x94, + 0x4c, 0xe0, 0x59, 0x27, 0x65, 0x40, 0x3a, 0x38, 0x63, 0x92, 0x69, 0xae, 0xe3, 0x7c, 0xa2, 0x40, + 0x05, 0x87, 0x36, 0x8d, 0x5d, 0xda, 0x38, 0xca, 0x54, 0xa6, 0x4c, 0x84, 0xd7, 0x5f, 0x96, 0x6a, + 0x1c, 0x6f, 0x39, 0x72, 0x32, 0x21, 0x63, 0xfd, 0x4f, 0xe8, 0x8c, 0x26, 0x6c, 0xbd, 0x17, 0x50, + 0xf5, 0xce, 0xfe, 0x71, 0x08, 0x04, 0x58, 0x70, 0x81, 0xca, 0x76, 0x3a, 0xf4, 0x9b, 0x7e, 0xbb, + 0xd2, 0xad, 0xc5, 0xbf, 0x37, 0x88, 0xfb, 0x26, 0xbd, 0x2e, 0xcd, 0x3f, 0x4f, 0xbd, 0x81, 0x63, + 0x83, 0x33, 0x54, 0xb5, 0x58, 0x42, 0xd5, 0x54, 0x42, 0x58, 0x68, 0xfa, 0xed, 0xd2, 0xa0, 0x62, + 0x7b, 0x37, 0xeb, 0x56, 0x70, 0x89, 0xf6, 0x6d, 0xa9, 0xc3, 0x62, 0xb3, 0xf8, 0x97, 0xf9, 0xc1, + 0x94, 0xce, 0xfc, 0x03, 0x07, 0x14, 0xd5, 0x05, 0x01, 0xa6, 0x21, 0xd1, 0x3c, 0x93, 0x44, 0x24, + 0xf9, 0x84, 0x53, 0xa6, 0x13, 0xc1, 0x35, 0x84, 0x25, 0x63, 0x6a, 0x6d, 0x9b, 0x7a, 0x66, 0x60, + 0x68, 0xf8, 0xbe, 0xc1, 0x9d, 0xb5, 0x26, 0x76, 0x92, 0x1e, 0xd7, 0x10, 0x5c, 0x21, 0x04, 0x0a, + 0x88, 0x48, 0x9e, 0x19, 0xd3, 0xe1, 0x9e, 0x39, 0x79, 0x7d, 0x67, 0xbf, 0x35, 0x71, 0xcb, 0x36, + 0xb2, 0x03, 0xd8, 0x34, 0xee, 0xe7, 0xcb, 0xc8, 0x5f, 0x2c, 0x23, 0xff, 0x6b, 0x19, 0xf9, 0x6f, + 0xab, 0xc8, 0x5b, 0xac, 0x22, 0xef, 0x63, 0x15, 0x79, 0x8f, 0x38, 0xe3, 0x30, 0x9a, 0xa6, 0x31, + 0x55, 0x63, 0x9c, 0x12, 0xf9, 0x64, 0xae, 0x9d, 0x2a, 0x81, 0xe9, 0x88, 0x70, 0x89, 0x67, 0x5d, + 0xfc, 0xe2, 0x5e, 0x04, 0xc3, 0x6b, 0xce, 0x74, 0x5a, 0x36, 0xc4, 0xf9, 0x77, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x62, 0xf3, 0x3f, 0xa4, 0x18, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -166,10 +166,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x2a - if len(m.SignalPricesInfos) > 0 { - for iNdEx := len(m.SignalPricesInfos) - 1; iNdEx >= 0; iNdEx-- { + if len(m.LatestSignalPricesList) > 0 { + for iNdEx := len(m.LatestSignalPricesList) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SignalPricesInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.LatestSignalPricesList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -240,8 +240,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.SignalPricesInfos) > 0 { - for _, e := range m.SignalPricesInfos { + if len(m.LatestSignalPricesList) > 0 { + for _, e := range m.LatestSignalPricesList { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } @@ -374,7 +374,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalPricesInfos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LatestSignalPricesList", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -401,8 +401,8 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPricesInfos = append(m.SignalPricesInfos, SignalPricesInfo{}) - if err := m.SignalPricesInfos[len(m.SignalPricesInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.LatestSignalPricesList = append(m.LatestSignalPricesList, LatestSignalPrices{}) + if err := m.LatestSignalPricesList[len(m.LatestSignalPricesList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 932530503..d26c21783 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -36,7 +36,7 @@ var ( PacketStoreKeyPrefix = []byte{0x12} - SignalPricesInfoStoreKeyPrefix = []byte{0x13} + LatestSignalPricesStoreKeyPrefix = []byte{0x13} ParamsKey = []byte{0x90} ) @@ -57,6 +57,6 @@ func TunnelPacketStoreKey(tunnelID uint64, packetID uint64) []byte { return append(TunnelPacketsStoreKey(tunnelID), sdk.Uint64ToBigEndian(packetID)...) } -func SignalPricesInfoStoreKey(tunnelID uint64) []byte { - return append(SignalPricesInfoStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) +func LatestSignalPricesStoreKey(tunnelID uint64) []byte { + return append(LatestSignalPricesStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index e1c6a7394..c149d5965 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -10,13 +10,13 @@ import ( ) var ( - _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivateTunnel{}, &MsgDeactivateTunnel{}, &MsgManualTriggerTunnel{}, &MsgUpdateParams{} + _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgUpdateParams{} _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) // NewMsgCreateTunnel creates a new MsgCreateTunnel instance. func NewMsgCreateTunnel( - signalInfos []SignalInfo, + signalDeviations []SignalDeviation, interval uint64, route RouteI, encoder Encoder, @@ -33,18 +33,18 @@ func NewMsgCreateTunnel( } return &MsgCreateTunnel{ - SignalInfos: signalInfos, - Interval: interval, - Route: any, - Encoder: encoder, - Deposit: deposit, - Creator: creator.String(), + SignalDeviations: signalDeviations, + Interval: interval, + Route: any, + Encoder: encoder, + Deposit: deposit, + Creator: creator.String(), }, nil } // NewMsgCreateTSSTunnel creates a new MsgCreateTunnel instance for TSS tunnel. func NewMsgCreateTSSTunnel( - signalInfos []SignalInfo, + signalDeviations []SignalDeviation, interval uint64, encoder Encoder, destinationChainID string, @@ -56,7 +56,7 @@ func NewMsgCreateTSSTunnel( DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } - m, err := NewMsgCreateTunnel(signalInfos, interval, r, encoder, deposit, creator) + m, err := NewMsgCreateTunnel(signalDeviations, interval, r, encoder, deposit, creator) if err != nil { return nil, err } @@ -66,7 +66,7 @@ func NewMsgCreateTSSTunnel( // NewMsgCreateAxelarTunnel creates a new MsgCreateTunnel instance for Axelar tunnel. func NewMsgCreateAxelarTunnel( - signalInfos []SignalInfo, + signalDeviations []SignalDeviation, interval uint64, encoder Encoder, destinationChainID string, @@ -78,7 +78,7 @@ func NewMsgCreateAxelarTunnel( DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } - m, err := NewMsgCreateTunnel(signalInfos, interval, r, encoder, deposit, creator) + m, err := NewMsgCreateTunnel(signalDeviations, interval, r, encoder, deposit, creator) if err != nil { return nil, err } @@ -106,9 +106,9 @@ func (m MsgCreateTunnel) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - // signalInfos must not be empty - if len(m.SignalInfos) == 0 { - return sdkerrors.ErrInvalidRequest.Wrapf("signal infos cannot be empty") + // signal deviations cannot be empty + if len(m.SignalDeviations) == 0 { + return sdkerrors.ErrInvalidRequest.Wrapf("signal deviations cannot be empty") } // route must be valid @@ -127,11 +127,11 @@ func (m MsgCreateTunnel) ValidateBasic() error { // signalIDs must be unique signalIDMap := make(map[string]bool) - for _, signalInfo := range m.SignalInfos { - if _, ok := signalIDMap[signalInfo.SignalID]; ok { - return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalInfo.SignalID) + for _, signalDeviation := range m.SignalDeviations { + if _, ok := signalIDMap[signalDeviation.SignalID]; ok { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalDeviation.SignalID) } - signalIDMap[signalInfo.SignalID] = true + signalIDMap[signalDeviation.SignalID] = true } return nil @@ -171,15 +171,15 @@ func (m MsgCreateTunnel) GetTunnelRoute() RouteI { // NewMsgEditTunnel creates a new MsgEditTunnel instance. func NewMsgEditTunnel( tunnelID uint64, - signalInfos []SignalInfo, + signalDeviations []SignalDeviation, interval uint64, creator string, ) *MsgEditTunnel { return &MsgEditTunnel{ - TunnelID: tunnelID, - SignalInfos: signalInfos, - Interval: interval, - Creator: creator, + TunnelID: tunnelID, + SignalDeviations: signalDeviations, + Interval: interval, + Creator: creator, } } @@ -205,42 +205,42 @@ func (m MsgEditTunnel) ValidateBasic() error { // signalIDs must be unique signalIDMap := make(map[string]bool) - for _, signalInfo := range m.SignalInfos { - if _, ok := signalIDMap[signalInfo.SignalID]; ok { - return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalInfo.SignalID) + for _, signalDeviation := range m.SignalDeviations { + if _, ok := signalIDMap[signalDeviation.SignalID]; ok { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalDeviation.SignalID) } - signalIDMap[signalInfo.SignalID] = true + signalIDMap[signalDeviation.SignalID] = true } return nil } -// NewMsgActivateTunnel creates a new MsgActivateTunnel instance. -func NewMsgActivateTunnel( +// NewMsgActivate creates a new MsgActivate instance. +func NewMsgActivate( tunnelID uint64, creator string, -) *MsgActivateTunnel { - return &MsgActivateTunnel{ +) *MsgActivate { + return &MsgActivate{ TunnelID: tunnelID, Creator: creator, } } // Route Implements Msg. -func (m MsgActivateTunnel) Type() string { return sdk.MsgTypeURL(&m) } +func (m MsgActivate) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. -func (m MsgActivateTunnel) GetSignBytes() []byte { +func (m MsgActivate) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. -func (m *MsgActivateTunnel) GetSigners() []sdk.AccAddress { +func (m *MsgActivate) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} } // ValidateBasic does a sanity check on the provided data -func (m MsgActivateTunnel) ValidateBasic() error { +func (m MsgActivate) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } @@ -248,32 +248,32 @@ func (m MsgActivateTunnel) ValidateBasic() error { return nil } -// NewMsgDeactivateTunnel creates a new MsgDeactivateTunnel instance. -func NewMsgDeactivateTunnel( +// NewMsgDeactivate creates a new MsgDeactivate instance. +func NewMsgDeactivate( tunnelID uint64, creator string, -) *MsgDeactivateTunnel { - return &MsgDeactivateTunnel{ +) *MsgDeactivate { + return &MsgDeactivate{ TunnelID: tunnelID, Creator: creator, } } // Route Implements Msg. -func (m MsgDeactivateTunnel) Type() string { return sdk.MsgTypeURL(&m) } +func (m MsgDeactivate) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. -func (m MsgDeactivateTunnel) GetSignBytes() []byte { +func (m MsgDeactivate) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. -func (m *MsgDeactivateTunnel) GetSigners() []sdk.AccAddress { +func (m *MsgDeactivate) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} } // ValidateBasic does a sanity check on the provided data -func (m MsgDeactivateTunnel) ValidateBasic() error { +func (m MsgDeactivate) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } @@ -281,32 +281,32 @@ func (m MsgDeactivateTunnel) ValidateBasic() error { return nil } -// NewMsgManualTriggerTunnel creates a new MsgManualTriggerTunnel instance. -func NewMsgManualTriggerTunnel( +// NewMsgTriggerTunnel creates a new MsgTriggerTunnel instance. +func NewMsgTriggerTunnel( tunnelID uint64, creator string, -) *MsgManualTriggerTunnel { - return &MsgManualTriggerTunnel{ +) *MsgTriggerTunnel { + return &MsgTriggerTunnel{ TunnelID: tunnelID, Creator: creator, } } // Route Implements Msg. -func (m MsgManualTriggerTunnel) Type() string { return sdk.MsgTypeURL(&m) } +func (m MsgTriggerTunnel) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. -func (m MsgManualTriggerTunnel) GetSignBytes() []byte { +func (m MsgTriggerTunnel) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. -func (m *MsgManualTriggerTunnel) GetSigners() []sdk.AccAddress { +func (m *MsgTriggerTunnel) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} } // ValidateBasic does a sanity check on the provided data -func (m MsgManualTriggerTunnel) ValidateBasic() error { +func (m MsgTriggerTunnel) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index fcba36ed8..e84e3b26f 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -431,7 +431,7 @@ func (m *QueryPacketRequest) GetNonce() uint64 { // QueryPacketResponse is the response type for the Query/Packet RPC method. type QueryPacketResponse struct { - // Packet is the packet with the given tunnel ID and nonce. + // packet is the packet with the given tunnel ID and nonce. Packet *Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` } diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 5a8a8b229..f530bc16f 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -1,33 +1,33 @@ package types -// NewSignalInfo creates a new SignalInfo instance. -func NewSignalInfo( +// NewSignalDeviation creates a new SignalDeviation instance. +func NewSignalDeviation( signalID string, softDeviationBPS uint64, hardDeviationBPS uint64, -) SignalInfo { - return SignalInfo{ +) SignalDeviation { + return SignalDeviation{ SignalID: signalID, SoftDeviationBPS: softDeviationBPS, HardDeviationBPS: hardDeviationBPS, } } -// NewSignalPricesInfo creates a new SignalPricesInfo instance. -func NewSignalPricesInfo( +// NewLatestSignalPrices creates a new LatestSignalPrices instance. +func NewLatestSignalPrices( tunnelID uint64, signalPrices []SignalPrice, - lastIntervalTimestamp int64, -) SignalPricesInfo { - return SignalPricesInfo{ - TunnelID: tunnelID, - SignalPrices: signalPrices, - LastIntervalTimestamp: lastIntervalTimestamp, + timestamp int64, +) LatestSignalPrices { + return LatestSignalPrices{ + TunnelID: tunnelID, + SignalPrices: signalPrices, + Timestamp: timestamp, } } -// UpdateSignalPrices updates the signal prices based on signal IDs -func (spsi *SignalPricesInfo) UpdateSignalPrices(newSignalPrices []SignalPrice) { +// UpdateSignalPrices updates the signal prices in the latest signal prices. +func (lsps *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { // create a map of new signal prices newSpMap := make(map[string]SignalPrice) for _, sp := range newSignalPrices { @@ -35,9 +35,9 @@ func (spsi *SignalPricesInfo) UpdateSignalPrices(newSignalPrices []SignalPrice) } // update signal prices - for i, sp := range spsi.SignalPrices { + for i, sp := range lsps.SignalPrices { if newSp, ok := newSpMap[sp.SignalID]; ok { - spsi.SignalPrices[i] = newSp + lsps.SignalPrices[i] = newSp } } } diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 88b1ffe3a..af675a5fd 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -16,23 +16,23 @@ func NewTunnel( route *types.Any, encoder Encoder, feePayer string, - signalInfos []SignalInfo, + signalDeviations []SignalDeviation, interval uint64, isActive bool, createdAt int64, creator string, ) Tunnel { return Tunnel{ - ID: id, - NonceCount: nonceCount, - Route: route, - Encoder: encoder, - FeePayer: feePayer, - SignalInfos: signalInfos, - Interval: interval, - IsActive: isActive, - CreatedAt: createdAt, - Creator: creator, + ID: id, + NonceCount: nonceCount, + Route: route, + Encoder: encoder, + FeePayer: feePayer, + SignalDeviations: signalDeviations, + Interval: interval, + IsActive: isActive, + CreatedAt: createdAt, + Creator: creator, } } @@ -57,11 +57,11 @@ func (t *Tunnel) SetRoute(route RouteI) error { return nil } -// GetSignalInfoMap returns the signal info map by signal ID from the tunnel. -func (t Tunnel) GetSignalInfoMap() map[string]SignalInfo { - signalInfoMap := make(map[string]SignalInfo, len(t.SignalInfos)) - for _, si := range t.SignalInfos { - signalInfoMap[si.SignalID] = si +// GetSignalDeviationMap returns the signal deviation map of the tunnel. +func (t Tunnel) GetSignalDeviationMap() map[string]SignalDeviation { + signalDeviationMap := make(map[string]SignalDeviation, len(t.SignalDeviations)) + for _, si := range t.SignalDeviations { + signalDeviationMap[si.SignalID] = si } - return signalInfoMap + return signalDeviationMap } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 9a110dbec..a4978950d 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -171,8 +171,8 @@ func (m *AxelarRoute) GetDestinationContractAddress() string { return "" } -// SignalInfo is the type for a signal info -type SignalInfo struct { +// SignalDeviation is the type for a signal with soft and hard deviation +type SignalDeviation struct { // signal_id is the signal ID SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` // soft_deviation_bps is the soft deviation in basis points @@ -181,18 +181,18 @@ type SignalInfo struct { HardDeviationBPS uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` } -func (m *SignalInfo) Reset() { *m = SignalInfo{} } -func (m *SignalInfo) String() string { return proto.CompactTextString(m) } -func (*SignalInfo) ProtoMessage() {} -func (*SignalInfo) Descriptor() ([]byte, []int) { +func (m *SignalDeviation) Reset() { *m = SignalDeviation{} } +func (m *SignalDeviation) String() string { return proto.CompactTextString(m) } +func (*SignalDeviation) ProtoMessage() {} +func (*SignalDeviation) Descriptor() ([]byte, []int) { return fileDescriptor_b5270a56045f1d8a, []int{2} } -func (m *SignalInfo) XXX_Unmarshal(b []byte) error { +func (m *SignalDeviation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SignalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SignalDeviation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SignalInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_SignalDeviation.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -202,33 +202,33 @@ func (m *SignalInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *SignalInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignalInfo.Merge(m, src) +func (m *SignalDeviation) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalDeviation.Merge(m, src) } -func (m *SignalInfo) XXX_Size() int { +func (m *SignalDeviation) XXX_Size() int { return m.Size() } -func (m *SignalInfo) XXX_DiscardUnknown() { - xxx_messageInfo_SignalInfo.DiscardUnknown(m) +func (m *SignalDeviation) XXX_DiscardUnknown() { + xxx_messageInfo_SignalDeviation.DiscardUnknown(m) } -var xxx_messageInfo_SignalInfo proto.InternalMessageInfo +var xxx_messageInfo_SignalDeviation proto.InternalMessageInfo -func (m *SignalInfo) GetSignalID() string { +func (m *SignalDeviation) GetSignalID() string { if m != nil { return m.SignalID } return "" } -func (m *SignalInfo) GetSoftDeviationBPS() uint64 { +func (m *SignalDeviation) GetSoftDeviationBPS() uint64 { if m != nil { return m.SoftDeviationBPS } return 0 } -func (m *SignalInfo) GetHardDeviationBPS() uint64 { +func (m *SignalDeviation) GetHardDeviationBPS() uint64 { if m != nil { return m.HardDeviationBPS } @@ -247,8 +247,8 @@ type Tunnel struct { Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` // fee_payer is the address of the fee payer FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` - // signal_infos is the list of signal infos - SignalInfos []SignalInfo `protobuf:"bytes,6,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` + // signal_deviations is the list of signal deviations + SignalDeviations []SignalDeviation `protobuf:"bytes,6,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations"` // interval is the interval for delivering the signal prices Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` // is_active is the flag to indicate if the tunnel is active @@ -327,9 +327,9 @@ func (m *Tunnel) GetFeePayer() string { return "" } -func (m *Tunnel) GetSignalInfos() []SignalInfo { +func (m *Tunnel) GetSignalDeviations() []SignalDeviation { if m != nil { - return m.SignalInfos + return m.SignalDeviations } return nil } @@ -362,28 +362,28 @@ func (m *Tunnel) GetCreator() string { return "" } -// SignalPricesInfo is the type for signal prices that tunnel produces -type SignalPricesInfo struct { +// LatestSignalPrices is the type for signal prices that tunnel produces +type LatestSignalPrices struct { // tunnel_id is the tunnel ID TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // signal_prices is the list of signal prices SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` - // last_interval_timestamp is the timestamp of the last time that the packet is sent - LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` + // timestamp is the timestamp when the signal prices are produced + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } -func (m *SignalPricesInfo) Reset() { *m = SignalPricesInfo{} } -func (m *SignalPricesInfo) String() string { return proto.CompactTextString(m) } -func (*SignalPricesInfo) ProtoMessage() {} -func (*SignalPricesInfo) Descriptor() ([]byte, []int) { +func (m *LatestSignalPrices) Reset() { *m = LatestSignalPrices{} } +func (m *LatestSignalPrices) String() string { return proto.CompactTextString(m) } +func (*LatestSignalPrices) ProtoMessage() {} +func (*LatestSignalPrices) Descriptor() ([]byte, []int) { return fileDescriptor_b5270a56045f1d8a, []int{4} } -func (m *SignalPricesInfo) XXX_Unmarshal(b []byte) error { +func (m *LatestSignalPrices) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SignalPricesInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LatestSignalPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SignalPricesInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_LatestSignalPrices.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -393,35 +393,35 @@ func (m *SignalPricesInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *SignalPricesInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignalPricesInfo.Merge(m, src) +func (m *LatestSignalPrices) XXX_Merge(src proto.Message) { + xxx_messageInfo_LatestSignalPrices.Merge(m, src) } -func (m *SignalPricesInfo) XXX_Size() int { +func (m *LatestSignalPrices) XXX_Size() int { return m.Size() } -func (m *SignalPricesInfo) XXX_DiscardUnknown() { - xxx_messageInfo_SignalPricesInfo.DiscardUnknown(m) +func (m *LatestSignalPrices) XXX_DiscardUnknown() { + xxx_messageInfo_LatestSignalPrices.DiscardUnknown(m) } -var xxx_messageInfo_SignalPricesInfo proto.InternalMessageInfo +var xxx_messageInfo_LatestSignalPrices proto.InternalMessageInfo -func (m *SignalPricesInfo) GetTunnelID() uint64 { +func (m *LatestSignalPrices) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *SignalPricesInfo) GetSignalPrices() []SignalPrice { +func (m *LatestSignalPrices) GetSignalPrices() []SignalPrice { if m != nil { return m.SignalPrices } return nil } -func (m *SignalPricesInfo) GetLastIntervalTimestamp() int64 { +func (m *LatestSignalPrices) GetTimestamp() int64 { if m != nil { - return m.LastIntervalTimestamp + return m.Timestamp } return 0 } @@ -741,9 +741,9 @@ func init() { proto.RegisterEnum("tunnel.v1beta1.Encoder", Encoder_name, Encoder_value) proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") - proto.RegisterType((*SignalInfo)(nil), "tunnel.v1beta1.SignalInfo") + proto.RegisterType((*SignalDeviation)(nil), "tunnel.v1beta1.SignalDeviation") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") - proto.RegisterType((*SignalPricesInfo)(nil), "tunnel.v1beta1.SignalPricesInfo") + proto.RegisterType((*LatestSignalPrices)(nil), "tunnel.v1beta1.LatestSignalPrices") proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") proto.RegisterType((*TotalFees)(nil), "tunnel.v1beta1.TotalFees") proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") @@ -754,75 +754,75 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 1083 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0x1a, 0xc7, - 0x17, 0x67, 0x01, 0x63, 0x78, 0x24, 0x08, 0x4d, 0xf8, 0xc6, 0x1b, 0xfc, 0x2d, 0x20, 0x9f, 0x68, - 0x24, 0x83, 0xed, 0xaa, 0x51, 0xe5, 0x53, 0x59, 0xc0, 0xca, 0x2a, 0xaa, 0x4d, 0x17, 0x2a, 0x55, - 0xbd, 0xac, 0x96, 0xdd, 0x01, 0x6f, 0x83, 0x67, 0xe8, 0xce, 0x60, 0xc5, 0xc7, 0xde, 0x22, 0x9f, - 0xfa, 0x0f, 0xb8, 0xaa, 0x5a, 0x55, 0xad, 0x7a, 0xf6, 0xa9, 0xd7, 0xaa, 0x52, 0x94, 0x53, 0xd4, - 0x53, 0x4f, 0xb4, 0xc2, 0x87, 0xf6, 0x6f, 0xe8, 0xa9, 0xda, 0x99, 0x59, 0x30, 0x8e, 0xad, 0x34, - 0x55, 0x0f, 0x39, 0xb1, 0xef, 0x7d, 0xde, 0xcf, 0xcf, 0x7b, 0x33, 0x03, 0xac, 0xf3, 0x09, 0x21, - 0x78, 0x54, 0x3f, 0xde, 0xee, 0x63, 0xee, 0x6c, 0xd7, 0xa5, 0x58, 0x1b, 0x07, 0x94, 0x53, 0x94, - 0x53, 0x92, 0x02, 0x8b, 0x85, 0x21, 0x1d, 0x52, 0x01, 0xd5, 0xc3, 0x2f, 0x69, 0x55, 0xbc, 0x37, - 0xa4, 0x74, 0x38, 0xc2, 0x75, 0x21, 0xf5, 0x27, 0x83, 0xba, 0x43, 0x4e, 0x22, 0xc8, 0xa5, 0xec, - 0x88, 0x32, 0x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00, - 0x00, 0xff, 0xff, 0xe5, 0x3e, 0x5c, 0x3a, 0x3d, 0x0a, 0x00, 0x00, + // 1074 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xda, 0x8e, 0x63, 0xbf, 0xb4, 0xc6, 0x4c, 0xad, 0x66, 0xeb, 0x14, 0xaf, 0x95, 0x93, + 0xa9, 0x14, 0x6f, 0x12, 0x04, 0x42, 0x39, 0xe1, 0xb5, 0x1d, 0x75, 0x55, 0x48, 0xcc, 0xda, 0x48, + 0x88, 0xcb, 0x6a, 0xbd, 0x3b, 0x76, 0x96, 0x3a, 0x3b, 0x66, 0x67, 0x1c, 0x35, 0x47, 0x6e, 0x55, + 0x4e, 0x7c, 0x81, 0x20, 0x04, 0x42, 0x20, 0xb8, 0xe6, 0x43, 0x94, 0x9c, 0x2a, 0x4e, 0x9c, 0x0c, + 0x72, 0x0e, 0xf0, 0x19, 0x38, 0xa1, 0x9d, 0x19, 0xff, 0x6d, 0xa2, 0x52, 0xc4, 0xa1, 0xa7, 0xf8, + 0xfd, 0x7e, 0xef, 0xbd, 0x79, 0xef, 0xf7, 0xde, 0xec, 0x04, 0x36, 0xd8, 0x30, 0x08, 0x70, 0x5f, + 0x3f, 0xd9, 0xe9, 0x60, 0xe6, 0xec, 0xe8, 0xc2, 0xac, 0x0c, 0x42, 0xc2, 0x08, 0xca, 0x4a, 0x4b, + 0x92, 0x85, 0x7c, 0x8f, 0xf4, 0x08, 0xa7, 0xf4, 0xe8, 0x97, 0xf0, 0x2a, 0xdc, 0xeb, 0x11, 0xd2, + 0xeb, 0x63, 0x9d, 0x5b, 0x9d, 0x61, 0x57, 0x77, 0x82, 0xd3, 0x09, 0xe5, 0x12, 0x7a, 0x4c, 0xa8, + 0x2d, 0x62, 0x84, 0x21, 0xa9, 0xa2, 0xb0, 0x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, 0xa1, + 0xb7, 0x94, 0x23, 0x31, 0xcb, 0xf1, 0xd0, 0x09, 0xbd, 0xc5, 0x1c, 0x47, 0x0b, 0xc8, 0x80, 0xee, + 0x25, 0xff, 0xfa, 0x46, 0x53, 0x36, 0x7f, 0x49, 0x40, 0xaa, 0xcd, 0x77, 0x16, 0xdd, 0x85, 0xb8, + 0x2c, 0x3e, 0x69, 0xa4, 0xc6, 0x23, 0x2d, 0x6e, 0xd6, 0xad, 0xb8, 0xef, 0x21, 0x0d, 0xd6, 0x02, + 0x12, 0xb8, 0xd8, 0x76, 0xc9, 0x30, 0x60, 0xa2, 0x52, 0x0b, 0x38, 0x54, 0x8b, 0x10, 0xf4, 0x1e, + 0xac, 0x84, 0x91, 0x34, 0xbc, 0x80, 0xb5, 0xdd, 0x7c, 0x45, 0xac, 0x77, 0x65, 0xb2, 0xde, 0x95, + 0x6a, 0x70, 0x6a, 0xcc, 0x29, 0x68, 0x09, 0x77, 0xb4, 0x03, 0xab, 0x38, 0x70, 0x89, 0x87, 0x43, + 0x35, 0x59, 0x52, 0xca, 0xd9, 0xdd, 0xf5, 0xca, 0xe2, 0xf5, 0xa9, 0x34, 0x04, 0x6d, 0x4d, 0xfc, + 0xd0, 0xbb, 0x90, 0xe9, 0x62, 0x6c, 0x0f, 0x9c, 0x53, 0x1c, 0xaa, 0x2b, 0x5c, 0x67, 0xf5, 0xd7, + 0x8b, 0xad, 0xbc, 0xbc, 0x28, 0x72, 0x5c, 0x2d, 0x16, 0xfa, 0x41, 0xcf, 0x4a, 0x77, 0x31, 0x6e, + 0x46, 0x9e, 0xc8, 0x82, 0x37, 0xe5, 0x78, 0xa6, 0x8a, 0x51, 0x35, 0x55, 0x4a, 0x94, 0xd7, 0x76, + 0xb5, 0xe5, 0x33, 0x97, 0x46, 0x6b, 0x24, 0x9f, 0x8d, 0xb4, 0x98, 0x95, 0xa3, 0x8b, 0x30, 0x45, + 0x05, 0x48, 0xfb, 0x01, 0xc3, 0xe1, 0x89,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0x86, 0x5b, 0x7e, 0xc7, 0xb5, 0xbf, 0x18, 0xe2, 0x21, 0x9e, 0xa9, 0x94, + 0x1d, 0x8f, 0x34, 0x30, 0x8d, 0xda, 0xc7, 0x11, 0x6c, 0xd6, 0x2d, 0xf0, 0x3b, 0xae, 0xf8, 0xfd, + 0xda, 0x77, 0xfa, 0xe0, 0x07, 0x05, 0x56, 0xe5, 0xf7, 0x1c, 0x6d, 0xc3, 0x9d, 0xc6, 0x41, 0xed, + 0xb0, 0xde, 0xb0, 0xec, 0x4f, 0x0e, 0x5a, 0xcd, 0x46, 0xcd, 0xdc, 0x37, 0x1b, 0xf5, 0x5c, 0xac, + 0xb0, 0x7e, 0x76, 0x5e, 0xba, 0x8e, 0x42, 0xef, 0xc3, 0xfa, 0x04, 0xde, 0x37, 0x3f, 0x6d, 0xd4, + 0xed, 0xe6, 0xa1, 0x79, 0xd0, 0xb6, 0xab, 0x86, 0x99, 0x53, 0x0a, 0x1b, 0x67, 0xe7, 0xa5, 0x9b, + 0x68, 0xf4, 0x00, 0x72, 0x13, 0xaa, 0x6d, 0xd6, 0x1e, 0xf1, 0x90, 0x78, 0x21, 0x7f, 0x76, 0x5e, + 0x7a, 0x01, 0x2f, 0x24, 0x9f, 0x7e, 0x57, 0x8c, 0x19, 0x1f, 0xfd, 0x38, 0x2e, 0x2a, 0xcf, 0xc6, + 0x45, 0xe5, 0xf9, 0xb8, 0xa8, 0xfc, 0x31, 0x2e, 0x2a, 0x5f, 0x5d, 0x15, 0x63, 0xcf, 0xaf, 0x8a, + 0xb1, 0xdf, 0xae, 0x8a, 0xb1, 0xcf, 0xf4, 0x7f, 0xb1, 0x98, 0xf2, 0x5f, 0x44, 0xbe, 0x97, 0x9d, + 0x14, 0xf7, 0x78, 0xe7, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x39, 0x63, 0x0d, 0x39, 0x0a, + 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -879,14 +879,14 @@ func (this *AxelarRoute) Equal(that interface{}) bool { } return true } -func (this *SignalInfo) Equal(that interface{}) bool { +func (this *SignalDeviation) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SignalInfo) + that1, ok := that.(*SignalDeviation) if !ok { - that2, ok := that.(SignalInfo) + that2, ok := that.(SignalDeviation) if ok { that1 = &that2 } else { @@ -943,11 +943,11 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.FeePayer != that1.FeePayer { return false } - if len(this.SignalInfos) != len(that1.SignalInfos) { + if len(this.SignalDeviations) != len(that1.SignalDeviations) { return false } - for i := range this.SignalInfos { - if !this.SignalInfos[i].Equal(&that1.SignalInfos[i]) { + for i := range this.SignalDeviations { + if !this.SignalDeviations[i].Equal(&that1.SignalDeviations[i]) { return false } } @@ -965,14 +965,14 @@ func (this *Tunnel) Equal(that interface{}) bool { } return true } -func (this *SignalPricesInfo) Equal(that interface{}) bool { +func (this *LatestSignalPrices) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*SignalPricesInfo) + that1, ok := that.(*LatestSignalPrices) if !ok { - that2, ok := that.(SignalPricesInfo) + that2, ok := that.(LatestSignalPrices) if ok { that1 = &that2 } else { @@ -995,7 +995,7 @@ func (this *SignalPricesInfo) Equal(that interface{}) bool { return false } } - if this.LastIntervalTimestamp != that1.LastIntervalTimestamp { + if this.Timestamp != that1.Timestamp { return false } return true @@ -1231,7 +1231,7 @@ func (m *AxelarRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SignalInfo) Marshal() (dAtA []byte, err error) { +func (m *SignalDeviation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1241,12 +1241,12 @@ func (m *SignalInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SignalInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *SignalDeviation) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SignalInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SignalDeviation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1318,10 +1318,10 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - if len(m.SignalInfos) > 0 { - for iNdEx := len(m.SignalInfos) - 1; iNdEx >= 0; iNdEx-- { + if len(m.SignalDeviations) > 0 { + for iNdEx := len(m.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SignalInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.SignalDeviations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1369,7 +1369,7 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SignalPricesInfo) Marshal() (dAtA []byte, err error) { +func (m *LatestSignalPrices) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1379,18 +1379,18 @@ func (m *SignalPricesInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SignalPricesInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *LatestSignalPrices) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SignalPricesInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *LatestSignalPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.LastIntervalTimestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.LastIntervalTimestamp)) + if m.Timestamp != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x18 } @@ -1681,7 +1681,7 @@ func (m *AxelarRoute) Size() (n int) { return n } -func (m *SignalInfo) Size() (n int) { +func (m *SignalDeviation) Size() (n int) { if m == nil { return 0 } @@ -1723,8 +1723,8 @@ func (m *Tunnel) Size() (n int) { if l > 0 { n += 1 + l + sovTunnel(uint64(l)) } - if len(m.SignalInfos) > 0 { - for _, e := range m.SignalInfos { + if len(m.SignalDeviations) > 0 { + for _, e := range m.SignalDeviations { l = e.Size() n += 1 + l + sovTunnel(uint64(l)) } @@ -1745,7 +1745,7 @@ func (m *Tunnel) Size() (n int) { return n } -func (m *SignalPricesInfo) Size() (n int) { +func (m *LatestSignalPrices) Size() (n int) { if m == nil { return 0 } @@ -1760,8 +1760,8 @@ func (m *SignalPricesInfo) Size() (n int) { n += 1 + l + sovTunnel(uint64(l)) } } - if m.LastIntervalTimestamp != 0 { - n += 1 + sovTunnel(uint64(m.LastIntervalTimestamp)) + if m.Timestamp != 0 { + n += 1 + sovTunnel(uint64(m.Timestamp)) } return n } @@ -2099,7 +2099,7 @@ func (m *AxelarRoute) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignalInfo) Unmarshal(dAtA []byte) error { +func (m *SignalDeviation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2122,10 +2122,10 @@ func (m *SignalInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignalInfo: wiretype end group for non-group") + return fmt.Errorf("proto: SignalDeviation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignalInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignalDeviation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2375,7 +2375,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalInfos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2402,8 +2402,8 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalInfos = append(m.SignalInfos, SignalInfo{}) - if err := m.SignalInfos[len(m.SignalInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SignalDeviations = append(m.SignalDeviations, SignalDeviation{}) + if err := m.SignalDeviations[len(m.SignalDeviations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2518,7 +2518,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignalPricesInfo) Unmarshal(dAtA []byte) error { +func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2541,10 +2541,10 @@ func (m *SignalPricesInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SignalPricesInfo: wiretype end group for non-group") + return fmt.Errorf("proto: LatestSignalPrices: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SignalPricesInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LatestSignalPrices: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2602,9 +2602,9 @@ func (m *SignalPricesInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastIntervalTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } - m.LastIntervalTimestamp = 0 + m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2614,7 +2614,7 @@ func (m *SignalPricesInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastIntervalTimestamp |= int64(b&0x7F) << shift + m.Timestamp |= int64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 2fb168068..52919f0c3 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -36,8 +36,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateTunnel is the transaction message to create a new tunnel. type MsgCreateTunnel struct { - // signal_infos is the list of signal infos. - SignalInfos []SignalInfo `protobuf:"bytes,1,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` + // signal_deviations is the list of signal deviations. + SignalDeviations []SignalDeviation `protobuf:"bytes,1,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations"` // interval is the interval for delivering the signal prices. Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` // route is the route for delivering the signal prices @@ -83,9 +83,9 @@ func (m *MsgCreateTunnel) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateTunnel proto.InternalMessageInfo -func (m *MsgCreateTunnel) GetSignalInfos() []SignalInfo { +func (m *MsgCreateTunnel) GetSignalDeviations() []SignalDeviation { if m != nil { - return m.SignalInfos + return m.SignalDeviations } return nil } @@ -174,8 +174,8 @@ func (m *MsgCreateTunnelResponse) GetTunnelID() uint64 { type MsgEditTunnel struct { // tunnel_id is the ID of the tunnel to edit. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // signal_infos is the list of signal infos. - SignalInfos []SignalInfo `protobuf:"bytes,2,rep,name=signal_infos,json=signalInfos,proto3" json:"signal_infos"` + // signal_deviations is the list of signal deviations. + SignalDeviations []SignalDeviation `protobuf:"bytes,2,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations"` // interval is the interval for delivering the signal prices. Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` // creator is the address of the creator. @@ -222,9 +222,9 @@ func (m *MsgEditTunnel) GetTunnelID() uint64 { return 0 } -func (m *MsgEditTunnel) GetSignalInfos() []SignalInfo { +func (m *MsgEditTunnel) GetSignalDeviations() []SignalDeviation { if m != nil { - return m.SignalInfos + return m.SignalDeviations } return nil } @@ -280,26 +280,26 @@ func (m *MsgEditTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEditTunnelResponse proto.InternalMessageInfo -// MsgActivateTunnel is the transaction message to activate a tunnel. -type MsgActivateTunnel struct { +// Activate is the transaction message to activate a tunnel. +type MsgActivate struct { // tunnel_id is the ID of the tunnel to activate. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // creator is the address of the creator. Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } -func (m *MsgActivateTunnel) Reset() { *m = MsgActivateTunnel{} } -func (m *MsgActivateTunnel) String() string { return proto.CompactTextString(m) } -func (*MsgActivateTunnel) ProtoMessage() {} -func (*MsgActivateTunnel) Descriptor() ([]byte, []int) { +func (m *MsgActivate) Reset() { *m = MsgActivate{} } +func (m *MsgActivate) String() string { return proto.CompactTextString(m) } +func (*MsgActivate) ProtoMessage() {} +func (*MsgActivate) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{4} } -func (m *MsgActivateTunnel) XXX_Unmarshal(b []byte) error { +func (m *MsgActivate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgActivateTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgActivate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgActivateTunnel.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgActivate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -309,48 +309,48 @@ func (m *MsgActivateTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *MsgActivateTunnel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgActivateTunnel.Merge(m, src) +func (m *MsgActivate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgActivate.Merge(m, src) } -func (m *MsgActivateTunnel) XXX_Size() int { +func (m *MsgActivate) XXX_Size() int { return m.Size() } -func (m *MsgActivateTunnel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgActivateTunnel.DiscardUnknown(m) +func (m *MsgActivate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgActivate.DiscardUnknown(m) } -var xxx_messageInfo_MsgActivateTunnel proto.InternalMessageInfo +var xxx_messageInfo_MsgActivate proto.InternalMessageInfo -func (m *MsgActivateTunnel) GetTunnelID() uint64 { +func (m *MsgActivate) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgActivateTunnel) GetCreator() string { +func (m *MsgActivate) GetCreator() string { if m != nil { return m.Creator } return "" } -// MsgActivateTunnelResponse is the response type for the Msg/ActivateTunnel RPC method. -type MsgActivateTunnelResponse struct { +// MsgActivateResponse is the response type for the Msg/Activate RPC method. +type MsgActivateResponse struct { } -func (m *MsgActivateTunnelResponse) Reset() { *m = MsgActivateTunnelResponse{} } -func (m *MsgActivateTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgActivateTunnelResponse) ProtoMessage() {} -func (*MsgActivateTunnelResponse) Descriptor() ([]byte, []int) { +func (m *MsgActivateResponse) Reset() { *m = MsgActivateResponse{} } +func (m *MsgActivateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgActivateResponse) ProtoMessage() {} +func (*MsgActivateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{5} } -func (m *MsgActivateTunnelResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgActivateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgActivateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgActivateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgActivateTunnelResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgActivateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -360,38 +360,38 @@ func (m *MsgActivateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgActivateTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgActivateTunnelResponse.Merge(m, src) +func (m *MsgActivateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgActivateResponse.Merge(m, src) } -func (m *MsgActivateTunnelResponse) XXX_Size() int { +func (m *MsgActivateResponse) XXX_Size() int { return m.Size() } -func (m *MsgActivateTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgActivateTunnelResponse.DiscardUnknown(m) +func (m *MsgActivateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgActivateResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgActivateTunnelResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgActivateResponse proto.InternalMessageInfo -// MsgDeactivateTunnel is the transaction message to deactivate a tunnel. -type MsgDeactivateTunnel struct { +// MsgDeactivate is the transaction message to deactivate a tunnel. +type MsgDeactivate struct { // tunnel_id is the ID of the tunnel to deactivate. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // creator is the address of the creator. Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } -func (m *MsgDeactivateTunnel) Reset() { *m = MsgDeactivateTunnel{} } -func (m *MsgDeactivateTunnel) String() string { return proto.CompactTextString(m) } -func (*MsgDeactivateTunnel) ProtoMessage() {} -func (*MsgDeactivateTunnel) Descriptor() ([]byte, []int) { +func (m *MsgDeactivate) Reset() { *m = MsgDeactivate{} } +func (m *MsgDeactivate) String() string { return proto.CompactTextString(m) } +func (*MsgDeactivate) ProtoMessage() {} +func (*MsgDeactivate) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{6} } -func (m *MsgDeactivateTunnel) XXX_Unmarshal(b []byte) error { +func (m *MsgDeactivate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDeactivateTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDeactivate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDeactivateTunnel.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDeactivate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -401,48 +401,48 @@ func (m *MsgDeactivateTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *MsgDeactivateTunnel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeactivateTunnel.Merge(m, src) +func (m *MsgDeactivate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeactivate.Merge(m, src) } -func (m *MsgDeactivateTunnel) XXX_Size() int { +func (m *MsgDeactivate) XXX_Size() int { return m.Size() } -func (m *MsgDeactivateTunnel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeactivateTunnel.DiscardUnknown(m) +func (m *MsgDeactivate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeactivate.DiscardUnknown(m) } -var xxx_messageInfo_MsgDeactivateTunnel proto.InternalMessageInfo +var xxx_messageInfo_MsgDeactivate proto.InternalMessageInfo -func (m *MsgDeactivateTunnel) GetTunnelID() uint64 { +func (m *MsgDeactivate) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgDeactivateTunnel) GetCreator() string { +func (m *MsgDeactivate) GetCreator() string { if m != nil { return m.Creator } return "" } -// MsgDeactivateTunnelResponse is the response type for the Msg/DeactivateTunnel RPC method. -type MsgDeactivateTunnelResponse struct { +// MsgDeactivateTunnelResponse is the response type for the Msg/Deactivate RPC method. +type MsgDeactivateResponse struct { } -func (m *MsgDeactivateTunnelResponse) Reset() { *m = MsgDeactivateTunnelResponse{} } -func (m *MsgDeactivateTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDeactivateTunnelResponse) ProtoMessage() {} -func (*MsgDeactivateTunnelResponse) Descriptor() ([]byte, []int) { +func (m *MsgDeactivateResponse) Reset() { *m = MsgDeactivateResponse{} } +func (m *MsgDeactivateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeactivateResponse) ProtoMessage() {} +func (*MsgDeactivateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{7} } -func (m *MsgDeactivateTunnelResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgDeactivateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDeactivateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDeactivateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDeactivateTunnelResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDeactivateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -452,38 +452,38 @@ func (m *MsgDeactivateTunnelResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *MsgDeactivateTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeactivateTunnelResponse.Merge(m, src) +func (m *MsgDeactivateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeactivateResponse.Merge(m, src) } -func (m *MsgDeactivateTunnelResponse) XXX_Size() int { +func (m *MsgDeactivateResponse) XXX_Size() int { return m.Size() } -func (m *MsgDeactivateTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeactivateTunnelResponse.DiscardUnknown(m) +func (m *MsgDeactivateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeactivateResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgDeactivateTunnelResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgDeactivateResponse proto.InternalMessageInfo -// MsgManualTriggerTunnel is the transaction message to manually trigger a tunnel. -type MsgManualTriggerTunnel struct { +// MsgTriggerTunnel is the transaction message to manually trigger a tunnel. +type MsgTriggerTunnel struct { // tunnel_id is the ID of the tunnel to manually trigger. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // creator is the address of the creator. Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } -func (m *MsgManualTriggerTunnel) Reset() { *m = MsgManualTriggerTunnel{} } -func (m *MsgManualTriggerTunnel) String() string { return proto.CompactTextString(m) } -func (*MsgManualTriggerTunnel) ProtoMessage() {} -func (*MsgManualTriggerTunnel) Descriptor() ([]byte, []int) { +func (m *MsgTriggerTunnel) Reset() { *m = MsgTriggerTunnel{} } +func (m *MsgTriggerTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgTriggerTunnel) ProtoMessage() {} +func (*MsgTriggerTunnel) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{8} } -func (m *MsgManualTriggerTunnel) XXX_Unmarshal(b []byte) error { +func (m *MsgTriggerTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgManualTriggerTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgTriggerTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgManualTriggerTunnel.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgTriggerTunnel.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -493,48 +493,48 @@ func (m *MsgManualTriggerTunnel) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *MsgManualTriggerTunnel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgManualTriggerTunnel.Merge(m, src) +func (m *MsgTriggerTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTriggerTunnel.Merge(m, src) } -func (m *MsgManualTriggerTunnel) XXX_Size() int { +func (m *MsgTriggerTunnel) XXX_Size() int { return m.Size() } -func (m *MsgManualTriggerTunnel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgManualTriggerTunnel.DiscardUnknown(m) +func (m *MsgTriggerTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTriggerTunnel.DiscardUnknown(m) } -var xxx_messageInfo_MsgManualTriggerTunnel proto.InternalMessageInfo +var xxx_messageInfo_MsgTriggerTunnel proto.InternalMessageInfo -func (m *MsgManualTriggerTunnel) GetTunnelID() uint64 { +func (m *MsgTriggerTunnel) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgManualTriggerTunnel) GetCreator() string { +func (m *MsgTriggerTunnel) GetCreator() string { if m != nil { return m.Creator } return "" } -// MsgManualTriggerTunnelResponse is the response type for the Msg/ManualTrigger RPC method. -type MsgManualTriggerTunnelResponse struct { +// MsgTriggerTunnelResponse is the response type for the Msg/TriggerTunnel RPC method. +type MsgTriggerTunnelResponse struct { } -func (m *MsgManualTriggerTunnelResponse) Reset() { *m = MsgManualTriggerTunnelResponse{} } -func (m *MsgManualTriggerTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgManualTriggerTunnelResponse) ProtoMessage() {} -func (*MsgManualTriggerTunnelResponse) Descriptor() ([]byte, []int) { +func (m *MsgTriggerTunnelResponse) Reset() { *m = MsgTriggerTunnelResponse{} } +func (m *MsgTriggerTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTriggerTunnelResponse) ProtoMessage() {} +func (*MsgTriggerTunnelResponse) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{9} } -func (m *MsgManualTriggerTunnelResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgTriggerTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgManualTriggerTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgTriggerTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgManualTriggerTunnelResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgTriggerTunnelResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -544,17 +544,17 @@ func (m *MsgManualTriggerTunnelResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *MsgManualTriggerTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgManualTriggerTunnelResponse.Merge(m, src) +func (m *MsgTriggerTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTriggerTunnelResponse.Merge(m, src) } -func (m *MsgManualTriggerTunnelResponse) XXX_Size() int { +func (m *MsgTriggerTunnelResponse) XXX_Size() int { return m.Size() } -func (m *MsgManualTriggerTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgManualTriggerTunnelResponse.DiscardUnknown(m) +func (m *MsgTriggerTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTriggerTunnelResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgManualTriggerTunnelResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgTriggerTunnelResponse proto.InternalMessageInfo // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { @@ -653,12 +653,12 @@ func init() { proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") proto.RegisterType((*MsgEditTunnel)(nil), "tunnel.v1beta1.MsgEditTunnel") proto.RegisterType((*MsgEditTunnelResponse)(nil), "tunnel.v1beta1.MsgEditTunnelResponse") - proto.RegisterType((*MsgActivateTunnel)(nil), "tunnel.v1beta1.MsgActivateTunnel") - proto.RegisterType((*MsgActivateTunnelResponse)(nil), "tunnel.v1beta1.MsgActivateTunnelResponse") - proto.RegisterType((*MsgDeactivateTunnel)(nil), "tunnel.v1beta1.MsgDeactivateTunnel") - proto.RegisterType((*MsgDeactivateTunnelResponse)(nil), "tunnel.v1beta1.MsgDeactivateTunnelResponse") - proto.RegisterType((*MsgManualTriggerTunnel)(nil), "tunnel.v1beta1.MsgManualTriggerTunnel") - proto.RegisterType((*MsgManualTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgManualTriggerTunnelResponse") + proto.RegisterType((*MsgActivate)(nil), "tunnel.v1beta1.MsgActivate") + proto.RegisterType((*MsgActivateResponse)(nil), "tunnel.v1beta1.MsgActivateResponse") + proto.RegisterType((*MsgDeactivate)(nil), "tunnel.v1beta1.MsgDeactivate") + proto.RegisterType((*MsgDeactivateResponse)(nil), "tunnel.v1beta1.MsgDeactivateResponse") + proto.RegisterType((*MsgTriggerTunnel)(nil), "tunnel.v1beta1.MsgTriggerTunnel") + proto.RegisterType((*MsgTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgTriggerTunnelResponse") proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") } @@ -666,61 +666,60 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 851 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x9b, 0xf4, 0x4f, 0x26, 0xa1, 0xb0, 0xde, 0xd0, 0x38, 0xae, 0xea, 0x04, 0xa3, 0x65, - 0xd3, 0x5d, 0xd5, 0x26, 0xe1, 0xcf, 0x81, 0x5b, 0xd3, 0xee, 0x21, 0x87, 0x48, 0xc8, 0xbb, 0x48, - 0x2b, 0x0e, 0x54, 0x13, 0x7b, 0x3a, 0xb5, 0x48, 0x66, 0x22, 0xcf, 0x24, 0x6a, 0xae, 0x1c, 0x39, - 0xf1, 0x05, 0x90, 0xe0, 0x84, 0xd4, 0x53, 0x0f, 0xfd, 0x04, 0x9c, 0x2a, 0x4e, 0x15, 0x27, 0x4e, - 0x05, 0xa5, 0x87, 0x7e, 0x03, 0xce, 0x28, 0xf6, 0xc4, 0x4e, 0xa6, 0xa6, 0x0d, 0x42, 0xea, 0x25, - 0xf6, 0xbc, 0xdf, 0xef, 0x3d, 0xff, 0xde, 0x9b, 0x37, 0x6f, 0x02, 0xca, 0x7c, 0x48, 0x08, 0xea, - 0xd9, 0xa3, 0x46, 0x17, 0x71, 0xd8, 0xb0, 0xf9, 0xa9, 0x35, 0x08, 0x28, 0xa7, 0xea, 0x66, 0x04, - 0x58, 0x02, 0xd0, 0x2b, 0x98, 0x52, 0xdc, 0x43, 0x76, 0x88, 0x76, 0x87, 0xc7, 0x36, 0x24, 0xe3, - 0x88, 0xaa, 0x97, 0x30, 0xc5, 0x34, 0x7c, 0xb5, 0xa7, 0x6f, 0xc2, 0xba, 0x2d, 0x45, 0x1e, 0xc0, - 0x00, 0xf6, 0x99, 0x00, 0x2b, 0x2e, 0x65, 0x7d, 0xca, 0x8e, 0x22, 0xaf, 0x68, 0x21, 0x20, 0x23, - 0x5a, 0xd9, 0x5d, 0xc8, 0x50, 0xec, 0xec, 0x52, 0x9f, 0x08, 0xbc, 0x2c, 0xf0, 0x3e, 0xc3, 0xf6, - 0xa8, 0x31, 0x7d, 0x08, 0xe0, 0x09, 0xec, 0xfb, 0x84, 0xda, 0xe1, 0xef, 0xbf, 0x68, 0x10, 0x39, - 0x85, 0xa0, 0xf9, 0x53, 0x16, 0xbc, 0x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52, 0x62, 0xa4, 0xf0, 0x74, 0x6b, 0x39, 0x5e, 0xfc, 0xb9, - 0xb7, 0xa0, 0xb8, 0xd0, 0xae, 0x69, 0x5b, 0x3c, 0x4f, 0x48, 0xdd, 0xe2, 0xb4, 0x26, 0x6a, 0xb5, - 0x2f, 0x27, 0x86, 0x72, 0x35, 0x31, 0x94, 0xbf, 0x26, 0x86, 0xf2, 0xc3, 0x8d, 0x91, 0xb9, 0xba, - 0x31, 0x32, 0x7f, 0xdc, 0x18, 0x99, 0xaf, 0xed, 0xb9, 0xab, 0xb5, 0x0b, 0x89, 0x17, 0x5e, 0xf8, - 0x2e, 0xed, 0xd9, 0xee, 0x09, 0xf4, 0x89, 0x3d, 0x6a, 0xda, 0xa7, 0xe2, 0xef, 0x49, 0x74, 0xcf, - 0x76, 0xd7, 0x42, 0xc6, 0x27, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x20, 0xb5, 0x69, 0xa2, - 0x09, 0x00, 0x00, + // 839 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, + 0x14, 0x16, 0x25, 0xd9, 0x96, 0x4e, 0x4e, 0x9a, 0xb0, 0x4a, 0x44, 0x31, 0xa8, 0x24, 0x30, 0x08, + 0xc2, 0x04, 0x30, 0x59, 0xa9, 0x3f, 0x86, 0x6c, 0x56, 0x94, 0xc1, 0x40, 0x05, 0x14, 0x4c, 0x0a, + 0x04, 0xed, 0x60, 0x9c, 0xc8, 0x2b, 0x7d, 0xa8, 0xc4, 0x13, 0x78, 0x27, 0x21, 0x5a, 0x0b, 0x74, + 0x29, 0x3a, 0xb4, 0x43, 0xa7, 0xfe, 0x07, 0x59, 0x9a, 0xc1, 0x7f, 0x84, 0xd1, 0xc9, 0xe8, 0xd4, + 0xc9, 0x2d, 0xe4, 0xc1, 0xff, 0x46, 0xc1, 0x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 0xfc, + 0xa0, 0x08, 0x9f, 0xc2, 0xc9, 0x36, 0x67, 0x7c, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, + 0x7a, 0xf2, 0x55, 0x54, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -739,12 +738,12 @@ type MsgClient interface { CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) // EditTunnel is a RPC method to edit a tunnel. EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) - // ActivateTunnel is a RPC method to activate a tunnel. - ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, opts ...grpc.CallOption) (*MsgActivateTunnelResponse, error) - // DeactivateTunnel is a RPC method to deactivate a tunnel. - DeactivateTunnel(ctx context.Context, in *MsgDeactivateTunnel, opts ...grpc.CallOption) (*MsgDeactivateTunnelResponse, error) - // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. - ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) + // Activate is a RPC method to activate a tunnel. + Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) + // Deactivate is a RPC method to deactivate a tunnel. + Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) + // TriggerTunnel is a RPC method to manually trigger a tunnel. + TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -775,27 +774,27 @@ func (c *msgClient) EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...g return out, nil } -func (c *msgClient) ActivateTunnel(ctx context.Context, in *MsgActivateTunnel, opts ...grpc.CallOption) (*MsgActivateTunnelResponse, error) { - out := new(MsgActivateTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/ActivateTunnel", in, out, opts...) +func (c *msgClient) Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) { + out := new(MsgActivateResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/Activate", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) DeactivateTunnel(ctx context.Context, in *MsgDeactivateTunnel, opts ...grpc.CallOption) (*MsgDeactivateTunnelResponse, error) { - out := new(MsgDeactivateTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/DeactivateTunnel", in, out, opts...) +func (c *msgClient) Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) { + out := new(MsgDeactivateResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/Deactivate", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) ManualTriggerTunnel(ctx context.Context, in *MsgManualTriggerTunnel, opts ...grpc.CallOption) (*MsgManualTriggerTunnelResponse, error) { - out := new(MsgManualTriggerTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/ManualTriggerTunnel", in, out, opts...) +func (c *msgClient) TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) { + out := new(MsgTriggerTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/TriggerTunnel", in, out, opts...) if err != nil { return nil, err } @@ -817,12 +816,12 @@ type MsgServer interface { CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) // EditTunnel is a RPC method to edit a tunnel. EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) - // ActivateTunnel is a RPC method to activate a tunnel. - ActivateTunnel(context.Context, *MsgActivateTunnel) (*MsgActivateTunnelResponse, error) - // DeactivateTunnel is a RPC method to deactivate a tunnel. - DeactivateTunnel(context.Context, *MsgDeactivateTunnel) (*MsgDeactivateTunnelResponse, error) - // ManualTriggerTunnel is a RPC method to manually trigger a tunnel. - ManualTriggerTunnel(context.Context, *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) + // Activate is a RPC method to activate a tunnel. + Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) + // Deactivate is a RPC method to deactivate a tunnel. + Deactivate(context.Context, *MsgDeactivate) (*MsgDeactivateResponse, error) + // TriggerTunnel is a RPC method to manually trigger a tunnel. + TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } @@ -837,14 +836,14 @@ func (*UnimplementedMsgServer) CreateTunnel(ctx context.Context, req *MsgCreateT func (*UnimplementedMsgServer) EditTunnel(ctx context.Context, req *MsgEditTunnel) (*MsgEditTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EditTunnel not implemented") } -func (*UnimplementedMsgServer) ActivateTunnel(ctx context.Context, req *MsgActivateTunnel) (*MsgActivateTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ActivateTunnel not implemented") +func (*UnimplementedMsgServer) Activate(ctx context.Context, req *MsgActivate) (*MsgActivateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") } -func (*UnimplementedMsgServer) DeactivateTunnel(ctx context.Context, req *MsgDeactivateTunnel) (*MsgDeactivateTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeactivateTunnel not implemented") +func (*UnimplementedMsgServer) Deactivate(ctx context.Context, req *MsgDeactivate) (*MsgDeactivateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deactivate not implemented") } -func (*UnimplementedMsgServer) ManualTriggerTunnel(ctx context.Context, req *MsgManualTriggerTunnel) (*MsgManualTriggerTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ManualTriggerTunnel not implemented") +func (*UnimplementedMsgServer) TriggerTunnel(ctx context.Context, req *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TriggerTunnel not implemented") } func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") @@ -890,56 +889,56 @@ func _Msg_EditTunnel_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Msg_ActivateTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgActivateTunnel) +func _Msg_Activate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgActivate) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ActivateTunnel(ctx, in) + return srv.(MsgServer).Activate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/ActivateTunnel", + FullMethod: "/tunnel.v1beta1.Msg/Activate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ActivateTunnel(ctx, req.(*MsgActivateTunnel)) + return srv.(MsgServer).Activate(ctx, req.(*MsgActivate)) } return interceptor(ctx, in, info, handler) } -func _Msg_DeactivateTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeactivateTunnel) +func _Msg_Deactivate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeactivate) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).DeactivateTunnel(ctx, in) + return srv.(MsgServer).Deactivate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/DeactivateTunnel", + FullMethod: "/tunnel.v1beta1.Msg/Deactivate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeactivateTunnel(ctx, req.(*MsgDeactivateTunnel)) + return srv.(MsgServer).Deactivate(ctx, req.(*MsgDeactivate)) } return interceptor(ctx, in, info, handler) } -func _Msg_ManualTriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgManualTriggerTunnel) +func _Msg_TriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTriggerTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ManualTriggerTunnel(ctx, in) + return srv.(MsgServer).TriggerTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/ManualTriggerTunnel", + FullMethod: "/tunnel.v1beta1.Msg/TriggerTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ManualTriggerTunnel(ctx, req.(*MsgManualTriggerTunnel)) + return srv.(MsgServer).TriggerTunnel(ctx, req.(*MsgTriggerTunnel)) } return interceptor(ctx, in, info, handler) } @@ -975,16 +974,16 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_EditTunnel_Handler, }, { - MethodName: "ActivateTunnel", - Handler: _Msg_ActivateTunnel_Handler, + MethodName: "Activate", + Handler: _Msg_Activate_Handler, }, { - MethodName: "DeactivateTunnel", - Handler: _Msg_DeactivateTunnel_Handler, + MethodName: "Deactivate", + Handler: _Msg_Deactivate_Handler, }, { - MethodName: "ManualTriggerTunnel", - Handler: _Msg_ManualTriggerTunnel_Handler, + MethodName: "TriggerTunnel", + Handler: _Msg_TriggerTunnel_Handler, }, { MethodName: "UpdateParams", @@ -1058,10 +1057,10 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if len(m.SignalInfos) > 0 { - for iNdEx := len(m.SignalInfos) - 1; iNdEx >= 0; iNdEx-- { + if len(m.SignalDeviations) > 0 { + for iNdEx := len(m.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SignalInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.SignalDeviations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1135,10 +1134,10 @@ func (m *MsgEditTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if len(m.SignalInfos) > 0 { - for iNdEx := len(m.SignalInfos) - 1; iNdEx >= 0; iNdEx-- { + if len(m.SignalDeviations) > 0 { + for iNdEx := len(m.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SignalInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.SignalDeviations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1180,7 +1179,7 @@ func (m *MsgEditTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgActivateTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgActivate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1190,12 +1189,12 @@ func (m *MsgActivateTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgActivateTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgActivate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgActivateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgActivate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1215,7 +1214,7 @@ func (m *MsgActivateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgActivateTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgActivateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1225,12 +1224,12 @@ func (m *MsgActivateTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgActivateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgActivateResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgActivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgActivateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1238,7 +1237,7 @@ func (m *MsgActivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *MsgDeactivateTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgDeactivate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1248,12 +1247,12 @@ func (m *MsgDeactivateTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDeactivateTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDeactivate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDeactivateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDeactivate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1273,7 +1272,7 @@ func (m *MsgDeactivateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgDeactivateTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgDeactivateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1283,12 +1282,12 @@ func (m *MsgDeactivateTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDeactivateTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDeactivateResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDeactivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDeactivateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1296,7 +1295,7 @@ func (m *MsgDeactivateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *MsgManualTriggerTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgTriggerTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1306,12 +1305,12 @@ func (m *MsgManualTriggerTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgManualTriggerTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgTriggerTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgManualTriggerTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgTriggerTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1331,7 +1330,7 @@ func (m *MsgManualTriggerTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgManualTriggerTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgTriggerTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1341,12 +1340,12 @@ func (m *MsgManualTriggerTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgManualTriggerTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgTriggerTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgManualTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1434,8 +1433,8 @@ func (m *MsgCreateTunnel) Size() (n int) { } var l int _ = l - if len(m.SignalInfos) > 0 { - for _, e := range m.SignalInfos { + if len(m.SignalDeviations) > 0 { + for _, e := range m.SignalDeviations { l = e.Size() n += 1 + l + sovTx(uint64(l)) } @@ -1484,8 +1483,8 @@ func (m *MsgEditTunnel) Size() (n int) { if m.TunnelID != 0 { n += 1 + sovTx(uint64(m.TunnelID)) } - if len(m.SignalInfos) > 0 { - for _, e := range m.SignalInfos { + if len(m.SignalDeviations) > 0 { + for _, e := range m.SignalDeviations { l = e.Size() n += 1 + l + sovTx(uint64(l)) } @@ -1509,7 +1508,7 @@ func (m *MsgEditTunnelResponse) Size() (n int) { return n } -func (m *MsgActivateTunnel) Size() (n int) { +func (m *MsgActivate) Size() (n int) { if m == nil { return 0 } @@ -1525,7 +1524,7 @@ func (m *MsgActivateTunnel) Size() (n int) { return n } -func (m *MsgActivateTunnelResponse) Size() (n int) { +func (m *MsgActivateResponse) Size() (n int) { if m == nil { return 0 } @@ -1534,7 +1533,7 @@ func (m *MsgActivateTunnelResponse) Size() (n int) { return n } -func (m *MsgDeactivateTunnel) Size() (n int) { +func (m *MsgDeactivate) Size() (n int) { if m == nil { return 0 } @@ -1550,7 +1549,7 @@ func (m *MsgDeactivateTunnel) Size() (n int) { return n } -func (m *MsgDeactivateTunnelResponse) Size() (n int) { +func (m *MsgDeactivateResponse) Size() (n int) { if m == nil { return 0 } @@ -1559,7 +1558,7 @@ func (m *MsgDeactivateTunnelResponse) Size() (n int) { return n } -func (m *MsgManualTriggerTunnel) Size() (n int) { +func (m *MsgTriggerTunnel) Size() (n int) { if m == nil { return 0 } @@ -1575,7 +1574,7 @@ func (m *MsgManualTriggerTunnel) Size() (n int) { return n } -func (m *MsgManualTriggerTunnelResponse) Size() (n int) { +func (m *MsgTriggerTunnelResponse) Size() (n int) { if m == nil { return 0 } @@ -1645,7 +1644,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalInfos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1672,8 +1671,8 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalInfos = append(m.SignalInfos, SignalInfo{}) - if err := m.SignalInfos[len(m.SignalInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SignalDeviations = append(m.SignalDeviations, SignalDeviation{}) + if err := m.SignalDeviations[len(m.SignalDeviations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1957,7 +1956,7 @@ func (m *MsgEditTunnel) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalInfos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1984,8 +1983,8 @@ func (m *MsgEditTunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalInfos = append(m.SignalInfos, SignalInfo{}) - if err := m.SignalInfos[len(m.SignalInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.SignalDeviations = append(m.SignalDeviations, SignalDeviation{}) + if err := m.SignalDeviations[len(m.SignalDeviations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2111,7 +2110,7 @@ func (m *MsgEditTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgActivateTunnel) Unmarshal(dAtA []byte) error { +func (m *MsgActivate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2134,10 +2133,10 @@ func (m *MsgActivateTunnel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgActivateTunnel: wiretype end group for non-group") + return fmt.Errorf("proto: MsgActivate: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgActivateTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgActivate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2212,7 +2211,7 @@ func (m *MsgActivateTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgActivateTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgActivateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2235,10 +2234,10 @@ func (m *MsgActivateTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgActivateTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgActivateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgActivateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgActivateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2262,7 +2261,7 @@ func (m *MsgActivateTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeactivateTunnel) Unmarshal(dAtA []byte) error { +func (m *MsgDeactivate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2285,10 +2284,10 @@ func (m *MsgDeactivateTunnel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeactivateTunnel: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeactivate: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeactivateTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeactivate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2363,7 +2362,7 @@ func (m *MsgDeactivateTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeactivateTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDeactivateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2386,10 +2385,10 @@ func (m *MsgDeactivateTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeactivateTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeactivateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeactivateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeactivateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2413,7 +2412,7 @@ func (m *MsgDeactivateTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgManualTriggerTunnel) Unmarshal(dAtA []byte) error { +func (m *MsgTriggerTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2436,10 +2435,10 @@ func (m *MsgManualTriggerTunnel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgManualTriggerTunnel: wiretype end group for non-group") + return fmt.Errorf("proto: MsgTriggerTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgManualTriggerTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgTriggerTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2514,7 +2513,7 @@ func (m *MsgManualTriggerTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgManualTriggerTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgTriggerTunnelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2537,10 +2536,10 @@ func (m *MsgManualTriggerTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgManualTriggerTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgTriggerTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgManualTriggerTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgTriggerTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From 3fdace8e0a77a476782ddbb1f46e9822ca493cb8 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 17 Sep 2024 18:01:24 +0700 Subject: [PATCH 108/272] fix review --- x/tunnel/genesis.go | 11 ++++------- x/tunnel/keeper/packet.go | 3 +-- x/tunnel/testutil/mock_expected_keepers.go | 14 -------------- x/tunnel/types/errors.go | 19 +++++++++---------- x/tunnel/types/expected_keepers.go | 1 - x/tunnel/types/msgs.go | 18 ++++++++++++++++++ x/tunnel/types/params.go | 2 +- 7 files changed, 33 insertions(+), 35 deletions(-) diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 454273c6e..cdaafbfb3 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -43,8 +43,7 @@ func ValidateGenesis(data *types.GenesisState) error { } // validate the total fees - err := data.TotalFees.TotalPacketFee.Validate() - if err != nil { + if err := data.TotalFees.TotalPacketFee.Validate(); err != nil { return err } @@ -73,11 +72,9 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { // set tunnels for _, tunnel := range data.Tunnels { k.SetTunnel(ctx, tunnel) - } - - // set the tunnels - for _, tunnel := range data.Tunnels { - k.ActiveTunnelID(ctx, tunnel.ID) + if tunnel.IsActive { + k.ActiveTunnelID(ctx, tunnel.ID) + } } // set the latest signal prices diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 4e9b41090..40876e979 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -175,8 +175,7 @@ func (k Keeper) SendPacket( } // set the packet content - err = packet.SetPacketContent(content) - if err != nil { + if err := packet.SetPacketContent(content); err != nil { panic(fmt.Sprintf("failed to set packet content: %s", err)) } diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go index db197ae57..ac6d98592 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -200,20 +200,6 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderMo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } -// SendCoinsFromModuleToModule mocks base method. -func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types2.Context, senderModule, recipientModule string, amt types2.Coins) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCoinsFromModuleToModule", ctx, senderModule, recipientModule, amt) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule. -func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderModule, recipientModule, amt any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToModule), ctx, senderModule, recipientModule, amt) -} - // MockFeedsKeeper is a mock of FeedsKeeper interface. type MockFeedsKeeper struct { ctrl *gomock.Controller diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index f91352e60..998b1c675 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -10,14 +10,13 @@ var ( ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") ErrMinIntervalExceeded = errorsmod.Register(ModuleName, 4, "min interval exceeded") ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") - ErrActiveTunnelIDsNotFound = errorsmod.Register(ModuleName, 6, "active tunnel IDs not found") - ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 7, "signal prices info not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 8, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 9, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 10, "invalid creator of tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") - ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") - ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") - ErrAlreadyActive = errorsmod.Register(ModuleName, 14, "already active") - ErrAlreadyInactive = errorsmod.Register(ModuleName, 15, "already inactive") + ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 6, "signal prices info not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 8, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") + ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") + ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") + ErrAlreadyActive = errorsmod.Register(ModuleName, 13, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 14, "already inactive") ) diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index ad87f07a4..df567f462 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -36,7 +36,6 @@ type BankKeeper interface { recipientModule string, amt sdk.Coins, ) error - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error } type FeedsKeeper interface { diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index c149d5965..ae68fd334 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -131,6 +131,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { if _, ok := signalIDMap[signalDeviation.SignalID]; ok { return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalDeviation.SignalID) } + signalIDMap[signalDeviation.SignalID] = true } @@ -212,6 +213,11 @@ func (m MsgEditTunnel) ValidateBasic() error { signalIDMap[signalDeviation.SignalID] = true } + err := validateUniqueSignalIDs(m.SignalDeviations) + if err != nil { + return err + } + return nil } @@ -350,3 +356,15 @@ func (m *MsgUpdateParams) ValidateBasic() error { return nil } + +// validateUniqueSignalIDs checks if the SignalIDs in the given slice are unique +func validateUniqueSignalIDs(signalDeviations []SignalDeviation) error { + signalIDMap := make(map[string]bool) + for _, signalDeviation := range signalDeviations { + if _, ok := signalIDMap[signalDeviation.SignalID]; ok { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalDeviation.SignalID) + } + signalIDMap[signalDeviation.SignalID] = true + } + return nil +} diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index d85135c51..4a7de25f7 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -10,7 +10,7 @@ import ( var ( DefaultMinInterval = uint64(1) - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("band", 1000000)) + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) DefaultMaxSignals = uint64(100) DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) ) From c0433f8a29f05fa3372c8f3ee0a22df65896c605 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 14:10:11 +0700 Subject: [PATCH 109/272] update validate --- x/tunnel/types/msgs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index e468c5f97..ed7d8d88e 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -352,7 +352,7 @@ func (m MsgDepositTunnel) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - if !m.Amount.IsValid() { + if !m.Amount.IsValid() || m.Amount.IsAllPositive() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid amount: %s", m.Amount) } @@ -391,7 +391,7 @@ func (m MsgWithdrawDepositTunnel) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - if !m.Amount.IsValid() { + if !m.Amount.IsValid() || m.Amount.IsAllPositive() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid amount: %s", m.Amount) } From e7af15801b269f4e536382e8bbd6fc341adfd759 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 14:11:57 +0700 Subject: [PATCH 110/272] update validate init deposit --- x/tunnel/types/msgs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index ae68fd334..398278dbb 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -121,7 +121,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { } // minimum deposit must be positive - if !m.Deposit.IsValid() { + if !m.Deposit.IsValid() || m.Deposit.IsAllPositive() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid deposit: %s", m.Deposit) } From db7e59c84b8a7f0fb8a55884140031badb23e075 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 14:31:12 +0700 Subject: [PATCH 111/272] fix pr --- proto/tunnel/v1beta1/query.proto | 4 +- x/tunnel/client/cli/query.go | 4 +- x/tunnel/genesis.go | 2 +- x/tunnel/keeper/grpc_query.go | 2 +- x/tunnel/keeper/msg_server.go | 4 +- x/tunnel/types/errors.go | 2 +- x/tunnel/types/genesis.go | 10 +++ x/tunnel/types/params.go | 12 ---- x/tunnel/types/query.pb.go | 116 +++++++++++++++---------------- 9 files changed, 77 insertions(+), 79 deletions(-) diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index 7c3a8ccb6..73f9f4bf1 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -51,8 +51,8 @@ enum TunnelStatusFilter { // QueryTunnelsRequest is the request type for the Query/Tunnel RPC method. message QueryTunnelsRequest { - // is_active is a flag to filter active tunnels. - TunnelStatusFilter is_active = 1; + // status_filter is a flag to filter tunnels by status. + TunnelStatusFilter status_filter = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index 50cfa9466..c7e96db25 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -95,8 +95,8 @@ func GetQueryCmdTunnels() *cobra.Command { } res, err := queryClient.Tunnels(cmd.Context(), &types.QueryTunnelsRequest{ - IsActive: statusFilter, - Pagination: pageReq, + StatusFilter: statusFilter, + Pagination: pageReq, }) if err != nil { return err diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index cdaafbfb3..4a24cfa81 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -43,7 +43,7 @@ func ValidateGenesis(data *types.GenesisState) error { } // validate the total fees - if err := data.TotalFees.TotalPacketFee.Validate(); err != nil { + if err := data.TotalFees.Validate(); err != nil { return err } diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 98a49f4c7..873e9dda6 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -31,7 +31,7 @@ func (q queryServer) Tunnels(c context.Context, req *types.QueryTunnelsRequest) req.Pagination, func(key []byte, t *types.Tunnel) (*types.Tunnel, error) { // Filter by status - switch req.IsActive { + switch req.StatusFilter { case types.TUNNEL_STATUS_FILTER_UNSPECIFIED: return t, nil case types.TUNNEL_STATUS_FILTER_ACTIVE: diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 1ccd1f3af..64bc37e9f 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -35,7 +35,7 @@ func (ms msgServer) CreateTunnel( return nil, types.ErrMaxSignalsExceeded } if req.Interval < params.MinInterval { - return nil, types.ErrMinIntervalExceeded + return nil, types.ErrIntervalTooShort } // TODO: check deposit with params, transfer deposit to module account @@ -90,7 +90,7 @@ func (ms msgServer) EditTunnel( return nil, types.ErrMaxSignalsExceeded } if req.Interval < params.MinInterval { - return nil, types.ErrMinIntervalExceeded + return nil, types.ErrIntervalTooShort } tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 998b1c675..58ff98db1 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -8,7 +8,7 @@ import ( var ( ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") - ErrMinIntervalExceeded = errorsmod.Register(ModuleName, 4, "min interval exceeded") + ErrIntervalTooShort = errorsmod.Register(ModuleName, 4, "interval too short") ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 6, "signal prices info not found") ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 1fc5aa21e..d3b0d5638 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -1,5 +1,7 @@ package types +import fmt "fmt" + // NewGenesisState creates a new GenesisState instanc e func NewGenesisState( params Params, @@ -21,3 +23,11 @@ func NewGenesisState( func DefaultGenesisState() *GenesisState { return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []LatestSignalPrices{}, TotalFees{}) } + +// Validate validates the total fees +func (tf TotalFees) Validate() error { + if !tf.TotalPacketFee.IsValid() { + return fmt.Errorf("invalid total packet fee: %s", tf.TotalPacketFee) + } + return nil +} diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 4a7de25f7..9cbbdbbe5 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -71,18 +71,6 @@ func (p Params) String() string { return string(out) } -// validateBasisPoint validates if a given number is a valid basis point (0 to 10000). -func validateBasisPoint(name string, bp uint64) error { - if err := validateUint64(name, false)(bp); err != nil { - return err - } - - if bp > 10000 { - return fmt.Errorf("invalid basis point: must be between 0 and 10000") - } - return nil -} - // validateUint64 validates if a given number is a valid uint64. func validateUint64(name string, positiveOnly bool) func(interface{}) error { return func(i interface{}) error { diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index e84e3b26f..6532ba0bf 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -64,8 +64,8 @@ func (TunnelStatusFilter) EnumDescriptor() ([]byte, []int) { // QueryTunnelsRequest is the request type for the Query/Tunnel RPC method. type QueryTunnelsRequest struct { - // is_active is a flag to filter active tunnels. - IsActive TunnelStatusFilter `protobuf:"varint,1,opt,name=is_active,json=isActive,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"is_active,omitempty"` + // status_filter is a flag to filter tunnels by status. + StatusFilter TunnelStatusFilter `protobuf:"varint,1,opt,name=status_filter,json=statusFilter,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"status_filter,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -103,9 +103,9 @@ func (m *QueryTunnelsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryTunnelsRequest proto.InternalMessageInfo -func (m *QueryTunnelsRequest) GetIsActive() TunnelStatusFilter { +func (m *QueryTunnelsRequest) GetStatusFilter() TunnelStatusFilter { if m != nil { - return m.IsActive + return m.StatusFilter } return TUNNEL_STATUS_FILTER_UNSPECIFIED } @@ -575,53 +575,53 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 726 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xc1, 0x4f, 0x13, 0x4d, - 0x14, 0xef, 0xf2, 0x95, 0x02, 0x43, 0x42, 0xc8, 0x7c, 0x0d, 0x5f, 0xbf, 0x45, 0x97, 0xba, 0x45, - 0x25, 0x10, 0x77, 0xa4, 0xe8, 0xc9, 0x83, 0x01, 0x6c, 0x49, 0x23, 0x69, 0x70, 0x5b, 0x3c, 0x78, - 0x69, 0xa6, 0xcb, 0x64, 0xd9, 0x58, 0x76, 0x96, 0xce, 0x96, 0x88, 0x04, 0x0f, 0xc6, 0x83, 0x5e, - 0x88, 0xc6, 0xbb, 0x17, 0xff, 0x19, 0x8e, 0x24, 0x5e, 0x3c, 0x19, 0x03, 0xfe, 0x21, 0x66, 0x67, - 0x66, 0x97, 0x2e, 0xec, 0x56, 0x4c, 0xb8, 0x6d, 0xe7, 0xfd, 0xde, 0xfc, 0x7e, 0xbf, 0xf7, 0xe6, - 0xbd, 0x02, 0xd5, 0xef, 0xb9, 0x2e, 0xe9, 0xa0, 0xbd, 0xc5, 0x36, 0xf1, 0xf1, 0x22, 0xda, 0xed, - 0x91, 0xee, 0xbe, 0xe1, 0x75, 0xa9, 0x4f, 0xe1, 0x84, 0x88, 0x19, 0x32, 0xa6, 0xe6, 0x6d, 0x6a, - 0x53, 0x1e, 0x42, 0xc1, 0x97, 0x40, 0xa9, 0xf3, 0x16, 0x65, 0x3b, 0x94, 0xa1, 0x36, 0x66, 0x44, - 0xa4, 0x47, 0x97, 0x79, 0xd8, 0x76, 0x5c, 0xec, 0x3b, 0xd4, 0x95, 0xd8, 0x1b, 0x36, 0xa5, 0x76, - 0x87, 0x20, 0xec, 0x39, 0x08, 0xbb, 0x2e, 0xf5, 0x79, 0x90, 0xc9, 0xe8, 0xf4, 0x05, 0x2d, 0x1e, - 0xee, 0xe2, 0x9d, 0xb4, 0xa0, 0xd4, 0xc6, 0x83, 0xfa, 0x17, 0x05, 0xfc, 0xfb, 0x2c, 0xa0, 0x6e, - 0xf2, 0x53, 0x66, 0x92, 0xdd, 0x1e, 0x61, 0x3e, 0x7c, 0x0c, 0xc6, 0x1c, 0xd6, 0xc2, 0x96, 0xef, - 0xec, 0x91, 0x82, 0x52, 0x54, 0xe6, 0x26, 0xca, 0xba, 0x11, 0x77, 0x65, 0x88, 0x94,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0a, 0x27, 0x3a, 0x88, 0x5e, - 0xf2, 0x21, 0xfc, 0xa0, 0x80, 0x11, 0x39, 0x7c, 0x30, 0xad, 0x8e, 0xfd, 0x7b, 0x21, 0xc5, 0xf7, - 0x85, 0xf9, 0xd5, 0x97, 0xb8, 0x86, 0x7b, 0x70, 0xe1, 0x0a, 0x1a, 0x50, 0x38, 0xc2, 0x47, 0x4a, - 0xd0, 0xf6, 0xe0, 0x3b, 0xb5, 0xed, 0x7d, 0x23, 0xa9, 0x96, 0x06, 0x62, 0xa4, 0x90, 0x47, 0x5c, - 0xc8, 0x43, 0xb8, 0xf4, 0x17, 0x42, 0xd0, 0x01, 0x1f, 0xe0, 0xc3, 0x95, 0xda, 0xf1, 0xa9, 0xa6, - 0x9c, 0x9c, 0x6a, 0xca, 0xcf, 0x53, 0x4d, 0xf9, 0x78, 0xa6, 0x65, 0x4e, 0xce, 0xb4, 0xcc, 0xf7, - 0x33, 0x2d, 0xf3, 0x02, 0xd9, 0x8e, 0xbf, 0xdd, 0x6b, 0x1b, 0x16, 0xdd, 0x41, 0x6d, 0xec, 0x6e, - 0xf1, 0xff, 0x3f, 0x8b, 0x76, 0x90, 0xb5, 0x8d, 0x1d, 0x17, 0xed, 0x95, 0xd1, 0xab, 0x90, 0xd0, - 0xdf, 0xf7, 0x08, 0x6b, 0xe7, 0x38, 0x62, 0xe9, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x25, 0x5e, - 0xea, 0x41, 0xe9, 0x07, 0x00, 0x00, + // 723 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x4f, 0x13, 0x4d, + 0x18, 0xee, 0xf2, 0x95, 0xf2, 0x7d, 0xc3, 0x27, 0x21, 0x63, 0x83, 0x75, 0xd1, 0xa5, 0x6e, 0x51, + 0x09, 0xc4, 0x1d, 0x29, 0x7a, 0xf2, 0x04, 0xd8, 0x92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0x7a, 0xc9, 0xfb, 0xf0, + 0x83, 0x02, 0x46, 0xe4, 0xf0, 0xc1, 0xb4, 0x3a, 0xf6, 0xef, 0x85, 0x14, 0xdf, 0x67, 0xe6, 0x57, + 0x5f, 0xe0, 0x1a, 0xee, 0xc1, 0xb9, 0x0b, 0x68, 0x40, 0xe1, 0x08, 0x1f, 0x28, 0x41, 0xdb, 0x83, + 0xdf, 0xa9, 0x6d, 0xef, 0x1b, 0x49, 0xb5, 0x34, 0x10, 0x23, 0x85, 0x3c, 0xe2, 0x42, 0x1e, 0xc2, + 0x85, 0xbf, 0x10, 0x82, 0xf6, 0xf8, 0x00, 0xef, 0x2f, 0x99, 0x87, 0xc7, 0x9a, 0x72, 0x74, 0xac, + 0x29, 0x3f, 0x8f, 0x35, 0xe5, 0xe3, 0x89, 0x96, 0x39, 0x3a, 0xd1, 0x32, 0xdf, 0x4f, 0xb4, 0xcc, + 0x73, 0x64, 0x3b, 0xfe, 0x66, 0xaf, 0x65, 0xb4, 0xe9, 0x16, 0x6a, 0x61, 0x77, 0x83, 0xff, 0x0f, + 0xb6, 0x69, 0x07, 0xb5, 0x37, 0xb1, 0xe3, 0xa2, 0x9d, 0x32, 0x7a, 0x15, 0x12, 0xfa, 0xbb, 0x1e, + 0x61, 0xad, 0x1c, 0x47, 0x2c, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x76, 0xfb, 0x18, 0xf1, 0xf1, + 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -890,8 +890,8 @@ func (m *QueryTunnelsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if m.IsActive != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.IsActive)) + if m.StatusFilter != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.StatusFilter)) i-- dAtA[i] = 0x8 } @@ -1238,8 +1238,8 @@ func (m *QueryTunnelsRequest) Size() (n int) { } var l int _ = l - if m.IsActive != 0 { - n += 1 + sovQuery(uint64(m.IsActive)) + if m.StatusFilter != 0 { + n += 1 + sovQuery(uint64(m.StatusFilter)) } if m.Pagination != nil { l = m.Pagination.Size() @@ -1410,9 +1410,9 @@ func (m *QueryTunnelsRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StatusFilter", wireType) } - m.IsActive = 0 + m.StatusFilter = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1422,7 +1422,7 @@ func (m *QueryTunnelsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.IsActive |= TunnelStatusFilter(b&0x7F) << shift + m.StatusFilter |= TunnelStatusFilter(b&0x7F) << shift if b < 0x80 { break } From af9048a8cfbfb82995ea0c468c1278a92fb46270 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 14:58:09 +0700 Subject: [PATCH 112/272] update checking logic --- x/tunnel/keeper/deposit.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 5a7c7d883..e3d0dcda3 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -1,7 +1,6 @@ package keeper import ( - "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" @@ -132,7 +131,7 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi // Deactivate the tunnel if the total deposit is less than the min deposit minDeposit := k.GetParams(ctx).MinDeposit - if tunnel.TotalDeposit.IsAllLT(minDeposit) { + if !tunnel.TotalDeposit.IsAllGTE(minDeposit) { k.MustDeactivateTunnel(ctx, tunnelID) } @@ -152,8 +151,7 @@ func (k Keeper) validateDepositDenom(ctx sdk.Context, depositAmount sdk.Coins) e for _, coin := range depositAmount { if _, ok := acceptedDenoms[coin.Denom]; !ok { - return errors.Wrapf( - types.ErrInvalidDepositDenom, + return types.ErrInvalidDepositDenom.Wrapf( "deposited %s, but tunnel accepts only the following denom(s): %v", depositAmount, denoms, From d3eda5982f021ceae48821163fed6d9640dc7dd7 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 14:59:44 +0700 Subject: [PATCH 113/272] remove err --- x/tunnel/types/errors.go | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index b03d1eed5..9341b4457 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -10,18 +10,17 @@ var ( ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") ErrIntervalTooShort = errorsmod.Register(ModuleName, 4, "interval too short") ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") - ErrActiveTunnelIDsNotFound = errorsmod.Register(ModuleName, 6, "active tunnel IDs not found") - ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 7, "signal prices info not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 8, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 9, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 10, "invalid creator of tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") - ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") - ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") - ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 14, "invalid deposit denom") - ErrDepositNotFound = errorsmod.Register(ModuleName, 15, "deposit not found") - ErrInsufficientFunds = errorsmod.Register(ModuleName, 16, "insufficient funds") - ErrInsufficientDeposit = errorsmod.Register(ModuleName, 17, "insufficient deposit") - ErrAlreadyActive = errorsmod.Register(ModuleName, 18, "already active") - ErrAlreadyInactive = errorsmod.Register(ModuleName, 19, "already inactive") + ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 6, "signal prices info not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 8, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") + ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") + ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") + ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 13, "invalid deposit denom") + ErrDepositNotFound = errorsmod.Register(ModuleName, 14, "deposit not found") + ErrInsufficientFunds = errorsmod.Register(ModuleName, 15, "insufficient funds") + ErrInsufficientDeposit = errorsmod.Register(ModuleName, 16, "insufficient deposit") + ErrAlreadyActive = errorsmod.Register(ModuleName, 17, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 18, "already inactive") ) From 592b9e79fa1e3312d74ffc90400889e5f00e731e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 15:23:49 +0700 Subject: [PATCH 114/272] update is all --- x/tunnel/keeper/msg_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 0f17a0b5b..78e0914af 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -142,7 +142,7 @@ func (ms msgServer) Activate( // verify if the total deposit meets or exceeds the minimum required deposit minDeposit := ms.Keeper.GetParams(ctx).MinDeposit - if tunnel.TotalDeposit.IsAllLT(minDeposit) { + if !tunnel.TotalDeposit.IsAllGTE(minDeposit) { return nil, types.ErrInsufficientDeposit } From a4df90bb101e2ffc202b1cf2110bf97aee187d70 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 15:34:02 +0700 Subject: [PATCH 115/272] fix review --- proto/tunnel/v1beta1/tx.proto | 14 +- x/tunnel/client/cli/query.go | 2 +- x/tunnel/client/cli/tx.go | 10 +- x/tunnel/keeper/msg_server.go | 10 +- x/tunnel/types/codec.go | 4 + x/tunnel/types/msgs.go | 20 +-- x/tunnel/types/tx.pb.go | 258 +++++++++++++++++----------------- 7 files changed, 161 insertions(+), 157 deletions(-) diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 87b270ba6..0d10f744d 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -33,8 +33,8 @@ service Msg { // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. rpc DepositTunnel(MsgDepositTunnel) returns (MsgDepositTunnelResponse); - // WithdrawDepositTunnel is a RPC method to withdraw a deposit from an existing tunnel. - rpc WithdrawDepositTunnel(MsgWithdrawDepositTunnel) returns (MsgWithdrawDepositTunnelResponse); + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + rpc WithdrawTunnel(MsgWithdrawTunnel) returns (MsgWithdrawTunnelResponse); // UpdateParams is a RPC method to update parameters rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); @@ -151,10 +151,10 @@ message MsgDepositTunnel { // MsgDepositTunnelResponse defines the Msg/Deposit response type. message MsgDepositTunnelResponse {} -// MsgWithdrawDepositTunnel is the transaction message to withdraw a deposit from an existing tunnel. -message MsgWithdrawDepositTunnel { +// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. +message MsgWithdrawTunnel { option (cosmos.msg.v1.signer) = "withdrawer"; - option (amino.name) = "tunnel/MsgWithdrawDepositTunnel"; + option (amino.name) = "tunnel/MsgWithdrawTunnel"; // tunnel_id defines the unique id of the tunnel. uint64 tunnel_id = 1 @@ -171,8 +171,8 @@ message MsgWithdrawDepositTunnel { string withdrawer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgWithdrawDepositTunnelResponse defines the Msg/Withdraw response type. -message MsgWithdrawDepositTunnelResponse {} +// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. +message MsgWithdrawTunnelResponse {} // MsgUpdateParams is the transaction message to update parameters. message MsgUpdateParams { diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index 2bec1b2ae..3b0164044 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -26,8 +26,8 @@ func GetQueryCmd() *cobra.Command { GetQueryCmdParams(), GetQueryCmdTunnels(), GetQueryCmdTunnel(), - GetQueryCmdDeposit(), GetQueryCmdDeposits(), + GetQueryCmdDeposit(), GetQueryCmdPackets(), GetQueryCmdPacket(), ) diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 437070f92..0a254f83a 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -23,11 +23,11 @@ func GetTxCmd() *cobra.Command { } txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) - txCmd.AddCommand(GetTxCmdDepositTunnel()) - txCmd.AddCommand(GetTxCmdWithdrawDepositTunnel()) txCmd.AddCommand(GetTxCmdActivate()) txCmd.AddCommand(GetTxCmdDeactivate()) txCmd.AddCommand(GetTxCmdTriggerTunnel()) + txCmd.AddCommand(GetTxCmdDepositTunnel()) + txCmd.AddCommand(GetTxCmdWithdrawTunnel()) return txCmd } @@ -116,9 +116,9 @@ func GetTxCmdDepositTunnel() *cobra.Command { return cmd } -func GetTxCmdWithdrawDepositTunnel() *cobra.Command { +func GetTxCmdWithdrawTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "withdraw-deposit [tunnel-id] [amount]", + Use: "withdraw [tunnel-id] [amount]", Short: "Withdraw deposit from a tunnel", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -137,7 +137,7 @@ func GetTxCmdWithdrawDepositTunnel() *cobra.Command { return err } - msg := types.NewMsgWithdrawDepositTunnel(id, amount, clientCtx.GetFromAddress().String()) + msg := types.NewMsgWithdrawTunnel(id, amount, clientCtx.GetFromAddress().String()) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 78e0914af..427d035d1 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -253,11 +253,11 @@ func (ms msgServer) DepositTunnel( return &types.MsgDepositTunnelResponse{}, nil } -// WithdrawDepositTunnel withdraws deposit from the tunnel. -func (ms msgServer) WithdrawDepositTunnel( +// WithdrawTunnel withdraws deposit from the tunnel. +func (ms msgServer) WithdrawTunnel( goCtx context.Context, - req *types.MsgWithdrawDepositTunnel, -) (*types.MsgWithdrawDepositTunnelResponse, error) { + req *types.MsgWithdrawTunnel, +) (*types.MsgWithdrawTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) withdrawer, err := sdk.AccAddressFromBech32(req.Withdrawer) @@ -270,7 +270,7 @@ func (ms msgServer) WithdrawDepositTunnel( return nil, err } - return &types.MsgWithdrawDepositTunnelResponse{}, nil + return &types.MsgWithdrawTunnelResponse{}, nil } // UpdateParams updates the module params. diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 77c5e2501..a45e5ddc0 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -17,6 +17,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgActivate{}, "tunnel/MsgActivate") legacy.RegisterAminoMsg(cdc, &MsgDeactivate{}, "tunnel/MsgDeactivate") legacy.RegisterAminoMsg(cdc, &MsgTriggerTunnel{}, "tunnel/MsgTriggerTunnel") + legacy.RegisterAminoMsg(cdc, &MsgDepositTunnel{}, "tunnel/MsgDepositTunnel") + legacy.RegisterAminoMsg(cdc, &MsgWithdrawTunnel{}, "tunnel/MsgWithdrawTunnel") legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "tunnel/MsgUpdateParams") cdc.RegisterInterface((*RouteI)(nil), nil) @@ -36,6 +38,8 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, + &MsgDepositTunnel{}, + &MsgWithdrawTunnel{}, &MsgUpdateParams{}, ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index baa674e21..5819b8eb6 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -10,7 +10,7 @@ import ( ) var ( - _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawDepositTunnel{}, &MsgUpdateParams{} + _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawTunnel{}, &MsgUpdateParams{} _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) @@ -121,7 +121,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { } // initialDeposit deposit must be positive - if !m.InitialDeposit.IsValid() || m.InitialDeposit.IsAllPositive() { + if !m.InitialDeposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) } @@ -359,13 +359,13 @@ func (m MsgDepositTunnel) ValidateBasic() error { return nil } -// NewMsgWithdrawDepositTunnel creates a new MsgWithdraw instance. -func NewMsgWithdrawDepositTunnel( +// NewMsgWithdrawTunnel creates a new MsgWithdrawTunnel instance. +func NewMsgWithdrawTunnel( tunnelID uint64, amount sdk.Coins, withdrawer string, -) *MsgWithdrawDepositTunnel { - return &MsgWithdrawDepositTunnel{ +) *MsgWithdrawTunnel { + return &MsgWithdrawTunnel{ TunnelID: tunnelID, Amount: amount, Withdrawer: withdrawer, @@ -373,20 +373,20 @@ func NewMsgWithdrawDepositTunnel( } // Route Implements Msg. -func (m MsgWithdrawDepositTunnel) Type() string { return sdk.MsgTypeURL(&m) } +func (m MsgWithdrawTunnel) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. -func (m MsgWithdrawDepositTunnel) GetSignBytes() []byte { +func (m MsgWithdrawTunnel) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. -func (m *MsgWithdrawDepositTunnel) GetSigners() []sdk.AccAddress { +func (m *MsgWithdrawTunnel) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Withdrawer)} } // ValidateBasic does a sanity check on the provided data -func (m MsgWithdrawDepositTunnel) ValidateBasic() error { +func (m MsgWithdrawTunnel) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Withdrawer); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 79beeda08..1cdad3eb8 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -657,8 +657,8 @@ func (m *MsgDepositTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDepositTunnelResponse proto.InternalMessageInfo -// MsgWithdrawDepositTunnel is the transaction message to withdraw a deposit from an existing tunnel. -type MsgWithdrawDepositTunnel struct { +// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. +type MsgWithdrawTunnel struct { // tunnel_id defines the unique id of the tunnel. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` // amount to be withdrawn by withdrawer. @@ -667,18 +667,18 @@ type MsgWithdrawDepositTunnel struct { Withdrawer string `protobuf:"bytes,3,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` } -func (m *MsgWithdrawDepositTunnel) Reset() { *m = MsgWithdrawDepositTunnel{} } -func (m *MsgWithdrawDepositTunnel) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawDepositTunnel) ProtoMessage() {} -func (*MsgWithdrawDepositTunnel) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawTunnel) Reset() { *m = MsgWithdrawTunnel{} } +func (m *MsgWithdrawTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawTunnel) ProtoMessage() {} +func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{12} } -func (m *MsgWithdrawDepositTunnel) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawDepositTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawDepositTunnel.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawTunnel.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -688,55 +688,55 @@ func (m *MsgWithdrawDepositTunnel) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgWithdrawDepositTunnel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawDepositTunnel.Merge(m, src) +func (m *MsgWithdrawTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawTunnel.Merge(m, src) } -func (m *MsgWithdrawDepositTunnel) XXX_Size() int { +func (m *MsgWithdrawTunnel) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawDepositTunnel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawDepositTunnel.DiscardUnknown(m) +func (m *MsgWithdrawTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawTunnel.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawDepositTunnel proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawTunnel proto.InternalMessageInfo -func (m *MsgWithdrawDepositTunnel) GetTunnelID() uint64 { +func (m *MsgWithdrawTunnel) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgWithdrawDepositTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgWithdrawTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } return nil } -func (m *MsgWithdrawDepositTunnel) GetWithdrawer() string { +func (m *MsgWithdrawTunnel) GetWithdrawer() string { if m != nil { return m.Withdrawer } return "" } -// MsgWithdrawDepositTunnelResponse defines the Msg/Withdraw response type. -type MsgWithdrawDepositTunnelResponse struct { +// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. +type MsgWithdrawTunnelResponse struct { } -func (m *MsgWithdrawDepositTunnelResponse) Reset() { *m = MsgWithdrawDepositTunnelResponse{} } -func (m *MsgWithdrawDepositTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawDepositTunnelResponse) ProtoMessage() {} -func (*MsgWithdrawDepositTunnelResponse) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawTunnelResponse) Reset() { *m = MsgWithdrawTunnelResponse{} } +func (m *MsgWithdrawTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawTunnelResponse) ProtoMessage() {} +func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{13} } -func (m *MsgWithdrawDepositTunnelResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawDepositTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawDepositTunnelResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawTunnelResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -746,17 +746,17 @@ func (m *MsgWithdrawDepositTunnelResponse) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *MsgWithdrawDepositTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawDepositTunnelResponse.Merge(m, src) +func (m *MsgWithdrawTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawTunnelResponse.Merge(m, src) } -func (m *MsgWithdrawDepositTunnelResponse) XXX_Size() int { +func (m *MsgWithdrawTunnelResponse) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawDepositTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawDepositTunnelResponse.DiscardUnknown(m) +func (m *MsgWithdrawTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawTunnelResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawDepositTunnelResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawTunnelResponse proto.InternalMessageInfo // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { @@ -863,8 +863,8 @@ func init() { proto.RegisterType((*MsgTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgTriggerTunnelResponse") proto.RegisterType((*MsgDepositTunnel)(nil), "tunnel.v1beta1.MsgDepositTunnel") proto.RegisterType((*MsgDepositTunnelResponse)(nil), "tunnel.v1beta1.MsgDepositTunnelResponse") - proto.RegisterType((*MsgWithdrawDepositTunnel)(nil), "tunnel.v1beta1.MsgWithdrawDepositTunnel") - proto.RegisterType((*MsgWithdrawDepositTunnelResponse)(nil), "tunnel.v1beta1.MsgWithdrawDepositTunnelResponse") + proto.RegisterType((*MsgWithdrawTunnel)(nil), "tunnel.v1beta1.MsgWithdrawTunnel") + proto.RegisterType((*MsgWithdrawTunnelResponse)(nil), "tunnel.v1beta1.MsgWithdrawTunnelResponse") proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") } @@ -872,70 +872,70 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 996 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xbf, 0x6f, 0x1b, 0x37, - 0x14, 0xf6, 0x49, 0xb6, 0x63, 0xd3, 0x8e, 0x93, 0x5c, 0xed, 0xe8, 0x7c, 0x41, 0x25, 0xe1, 0x82, - 0x20, 0x8a, 0x01, 0xdf, 0xd5, 0x4a, 0x53, 0x14, 0xee, 0x64, 0x45, 0x19, 0x0c, 0x54, 0x40, 0x71, - 0x49, 0xd1, 0xa0, 0x1d, 0x0c, 0x4a, 0xc7, 0x9e, 0x88, 0x4a, 0xa4, 0x70, 0xa4, 0x94, 0x68, 0x2d, - 0xd0, 0xa5, 0x53, 0x3b, 0x74, 0x2a, 0xba, 0x17, 0x99, 0x3c, 0xe4, 0x3f, 0xe8, 0x12, 0x74, 0x0a, - 0x3a, 0x75, 0x72, 0x0b, 0x7b, 0x30, 0xd0, 0xbf, 0xa2, 0x38, 0x1e, 0xef, 0xa7, 0x19, 0xd9, 0x29, - 0x8c, 0x02, 0x59, 0x6c, 0xf1, 0x7d, 0xdf, 0xe3, 0x7d, 0xfc, 0xf8, 0xf8, 0x48, 0x50, 0xe1, 0x63, - 0x42, 0xd0, 0xc0, 0x99, 0xec, 0x74, 0x11, 0x87, 0x3b, 0x0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 0x52, 0x62, 0xd0, 0xbc, 0x3d, 0x03, 0xcc, 0x2a, 0xcc, 0x74, 0x71, 0x95, 0xc2, 0x14, 0x56, - 0x2a, 0x3c, 0xdb, 0x6c, 0xf5, 0xaf, 0xc0, 0xd5, 0x7c, 0xa3, 0xad, 0x2b, 0xf2, 0x72, 0x0c, 0xb3, - 0x71, 0x1e, 0x23, 0x3b, 0x79, 0xfe, 0x1c, 0xd7, 0x95, 0xa2, 0x32, 0x0c, 0xe5, 0xe4, 0xca, 0xca, - 0xd6, 0x19, 0xd8, 0x50, 0x37, 0x0b, 0xd5, 0x14, 0x4a, 0xa6, 0xf9, 0xc1, 0x45, 0x99, 0xc9, 0x47, - 0x9f, 0x82, 0xd5, 0xdc, 0x51, 0x52, 0x95, 0x5f, 0x96, 0xa0, 0x2c, 0x3f, 0x55, 0x81, 0xb7, 0xf6, - 0x5f, 0x1d, 0x57, 0xb5, 0xd7, 0xc7, 0x55, 0xed, 0xef, 0xe3, 0xaa, 0xf6, 0xc3, 0x49, 0x75, 0xee, - 0xf5, 0x49, 0x75, 0xee, 0xcf, 0x93, 0xea, 0xdc, 0x97, 0x4e, 0xa6, 0x19, 0x75, 0x21, 0xf1, 0xc4, - 0x63, 0xb8, 0x47, 0x07, 0x4e, 0xaf, 0x0f, 0x31, 0x71, 0x26, 0x4d, 0xe7, 0xb9, 0x7c, 0xc9, 0x47, - 0x9d, 0xa9, 0xbb, 0x28, 0x18, 0xf7, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x61, 0x30, 0xd7, 0x9d, - 0xcd, 0x0c, 0x00, 0x00, + // 1002 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xda, 0x49, 0x9a, 0x4c, 0xd2, 0xb4, 0x59, 0xd2, 0x7a, 0xbd, 0x11, 0xb6, 0xd9, 0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 0xa6, 0xfc, 0x75, 0x52, + 0x53, 0xbe, 0x3d, 0xad, 0xcd, 0xbd, 0x38, 0xad, 0xcd, 0xfd, 0x71, 0x5a, 0x9b, 0xfb, 0xd4, 0x4a, + 0x75, 0x9a, 0x1e, 0x24, 0xae, 0x78, 0xe2, 0x3a, 0x74, 0x60, 0x39, 0x7d, 0x88, 0x89, 0x35, 0x69, + 0x59, 0x4f, 0xe4, 0xfb, 0x3c, 0x6c, 0x3b, 0xbd, 0x45, 0xc1, 0x78, 0xe7, 0x9f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x94, 0xfb, 0x7e, 0xee, 0xa3, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -962,8 +962,8 @@ type MsgClient interface { TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) - // WithdrawDepositTunnel is a RPC method to withdraw a deposit from an existing tunnel. - WithdrawDepositTunnel(ctx context.Context, in *MsgWithdrawDepositTunnel, opts ...grpc.CallOption) (*MsgWithdrawDepositTunnelResponse, error) + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -1030,9 +1030,9 @@ func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opt return out, nil } -func (c *msgClient) WithdrawDepositTunnel(ctx context.Context, in *MsgWithdrawDepositTunnel, opts ...grpc.CallOption) (*MsgWithdrawDepositTunnelResponse, error) { - out := new(MsgWithdrawDepositTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/WithdrawDepositTunnel", in, out, opts...) +func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) { + out := new(MsgWithdrawTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/WithdrawTunnel", in, out, opts...) if err != nil { return nil, err } @@ -1062,8 +1062,8 @@ type MsgServer interface { TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) - // WithdrawDepositTunnel is a RPC method to withdraw a deposit from an existing tunnel. - WithdrawDepositTunnel(context.Context, *MsgWithdrawDepositTunnel) (*MsgWithdrawDepositTunnelResponse, error) + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } @@ -1090,8 +1090,8 @@ func (*UnimplementedMsgServer) TriggerTunnel(ctx context.Context, req *MsgTrigge func (*UnimplementedMsgServer) DepositTunnel(ctx context.Context, req *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DepositTunnel not implemented") } -func (*UnimplementedMsgServer) WithdrawDepositTunnel(ctx context.Context, req *MsgWithdrawDepositTunnel) (*MsgWithdrawDepositTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawDepositTunnel not implemented") +func (*UnimplementedMsgServer) WithdrawTunnel(ctx context.Context, req *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawTunnel not implemented") } func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") @@ -1209,20 +1209,20 @@ func _Msg_DepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_WithdrawDepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawDepositTunnel) +func _Msg_WithdrawTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).WithdrawDepositTunnel(ctx, in) + return srv.(MsgServer).WithdrawTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/WithdrawDepositTunnel", + FullMethod: "/tunnel.v1beta1.Msg/WithdrawTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).WithdrawDepositTunnel(ctx, req.(*MsgWithdrawDepositTunnel)) + return srv.(MsgServer).WithdrawTunnel(ctx, req.(*MsgWithdrawTunnel)) } return interceptor(ctx, in, info, handler) } @@ -1274,8 +1274,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_DepositTunnel_Handler, }, { - MethodName: "WithdrawDepositTunnel", - Handler: _Msg_WithdrawDepositTunnel_Handler, + MethodName: "WithdrawTunnel", + Handler: _Msg_WithdrawTunnel_Handler, }, { MethodName: "UpdateParams", @@ -1717,7 +1717,7 @@ func (m *MsgDepositTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgWithdrawDepositTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1727,12 +1727,12 @@ func (m *MsgWithdrawDepositTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgWithdrawDepositTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawDepositTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1766,7 +1766,7 @@ func (m *MsgWithdrawDepositTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgWithdrawDepositTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1776,12 +1776,12 @@ func (m *MsgWithdrawDepositTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgWithdrawDepositTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawDepositTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2050,7 +2050,7 @@ func (m *MsgDepositTunnelResponse) Size() (n int) { return n } -func (m *MsgWithdrawDepositTunnel) Size() (n int) { +func (m *MsgWithdrawTunnel) Size() (n int) { if m == nil { return 0 } @@ -2072,7 +2072,7 @@ func (m *MsgWithdrawDepositTunnel) Size() (n int) { return n } -func (m *MsgWithdrawDepositTunnelResponse) Size() (n int) { +func (m *MsgWithdrawTunnelResponse) Size() (n int) { if m == nil { return 0 } @@ -3246,7 +3246,7 @@ func (m *MsgDepositTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawDepositTunnel) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3269,10 +3269,10 @@ func (m *MsgWithdrawDepositTunnel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawDepositTunnel: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawDepositTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3381,7 +3381,7 @@ func (m *MsgWithdrawDepositTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawDepositTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawTunnelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3404,10 +3404,10 @@ func (m *MsgWithdrawDepositTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawDepositTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawDepositTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From dfda8545257f1e41a5d75e9292f94889da7a2a18 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 15:34:53 +0700 Subject: [PATCH 116/272] fix --- x/tunnel/types/msgs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 5819b8eb6..3d213c411 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -352,7 +352,7 @@ func (m MsgDepositTunnel) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - if !m.Amount.IsValid() || m.Amount.IsAllPositive() { + if !m.Amount.IsValid() || !m.Amount.IsAllPositive() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid amount: %s", m.Amount) } @@ -391,7 +391,7 @@ func (m MsgWithdrawTunnel) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - if !m.Amount.IsValid() || m.Amount.IsAllPositive() { + if !m.Amount.IsValid() || !m.Amount.IsAllPositive() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid amount: %s", m.Amount) } From 64eed2349562d911d22e5642f361b6082319b261 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 15:54:20 +0700 Subject: [PATCH 117/272] fix review --- x/tunnel/genesis.go | 4 ++-- x/tunnel/keeper/packet.go | 5 +++++ x/tunnel/types/events.go | 17 +++++++---------- x/tunnel/types/genesis.go | 2 +- x/tunnel/types/msgs.go | 24 +++++------------------- 5 files changed, 20 insertions(+), 32 deletions(-) diff --git a/x/tunnel/genesis.go b/x/tunnel/genesis.go index 4a24cfa81..62d42bd51 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/genesis.go @@ -33,7 +33,7 @@ func ValidateGenesis(data *types.GenesisState) error { // validate latest signal prices for _, latestSignalPrices := range data.LatestSignalPricesList { - if latestSignalPrices.TunnelID == 0 { + if latestSignalPrices.TunnelID == 0 || latestSignalPrices.TunnelID > data.TunnelCount { return types.ErrInvalidGenesis.Wrapf( "TunnelID %d cannot be 0 or greater than the TunnelCount %d", latestSignalPrices.TunnelID, @@ -44,7 +44,7 @@ func ValidateGenesis(data *types.GenesisState) error { // validate the total fees if err := data.TotalFees.Validate(); err != nil { - return err + return types.ErrInvalidGenesis.Wrapf("total fees: %s", err.Error()) } return data.Params.Validate() diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 40876e979..9abe3cafc 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -229,6 +229,11 @@ func GenerateSignalPrices( // deviationExceedsThreshold checks if the deviation between the old price and the new price exceeds the threshold func deviationExceedsThreshold(oldPrice, newPrice, thresholdBPS sdkmath.Int) bool { + // if the old price is zero, always add the signal price info to the list + if oldPrice.IsZero() { + return true + } + // if the deviation is greater than the hard deviation, add the signal price info to the list // soft deviation is the feature to be implemented in the future deviation := newPrice.Sub(oldPrice).Abs().Quo(oldPrice) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 05ffe16b1..ba8b4e378 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,19 +2,16 @@ package types // events const ( - EventTypeUpdateParams = "update_params" - EventTypeCreateTunnel = "create_tunnel" - EventTypeEditTunnel = "edit_tunnel" - EventTypeActivateTunnel = "activate_tunnel" - EventTypeDeactivateTunnel = "deactivate_tunnel" - EventTypeManualTriggerTunnel = "manual_trigger_tunnel" - EventTypeSignalDeviationNotFound = "signal_info_not_found" - EventTypeProducePacketFail = "produce_packet_fail" - EventTypeNoTunnelRoute = "no_tunnel_route" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeEditTunnel = "edit_tunnel" + EventTypeActivateTunnel = "activate_tunnel" + EventTypeDeactivateTunnel = "deactivate_tunnel" + EventTypeManualTriggerTunnel = "manual_trigger_tunnel" + EventTypeProducePacketFail = "produce_packet_fail" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" - AttributeKeySignalID = "signal_id" AttributeKeyInterval = "interval" AttributeKeyRoute = "route" AttributeKeyEncoder = "encoder" diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index d3b0d5638..c377e7914 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -1,6 +1,6 @@ package types -import fmt "fmt" +import "fmt" // NewGenesisState creates a new GenesisState instanc e func NewGenesisState( diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 398278dbb..680ba8ea7 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -120,19 +120,14 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } - // minimum deposit must be positive - if !m.Deposit.IsValid() || m.Deposit.IsAllPositive() { + // deposit must be valid + if !m.Deposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid deposit: %s", m.Deposit) } - // signalIDs must be unique - signalIDMap := make(map[string]bool) - for _, signalDeviation := range m.SignalDeviations { - if _, ok := signalIDMap[signalDeviation.SignalID]; ok { - return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalDeviation.SignalID) - } - - signalIDMap[signalDeviation.SignalID] = true + err := validateUniqueSignalIDs(m.SignalDeviations) + if err != nil { + return err } return nil @@ -204,15 +199,6 @@ func (m MsgEditTunnel) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - // signalIDs must be unique - signalIDMap := make(map[string]bool) - for _, signalDeviation := range m.SignalDeviations { - if _, ok := signalIDMap[signalDeviation.SignalID]; ok { - return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalDeviation.SignalID) - } - signalIDMap[signalDeviation.SignalID] = true - } - err := validateUniqueSignalIDs(m.SignalDeviations) if err != nil { return err From f16fea020f47e6fd2a2d4d09f41b1b4a4bbb57fc Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 17:56:50 +0700 Subject: [PATCH 118/272] add test --- x/tunnel/keeper/latest_signal_prices_test.go | 61 +++ x/tunnel/keeper/packet.go | 6 +- x/tunnel/keeper/packet_test.go | 107 ++++- x/tunnel/keeper/tunnel_test.go | 424 +++++++++++-------- 4 files changed, 414 insertions(+), 184 deletions(-) create mode 100644 x/tunnel/keeper/latest_signal_prices_test.go diff --git a/x/tunnel/keeper/latest_signal_prices_test.go b/x/tunnel/keeper/latest_signal_prices_test.go new file mode 100644 index 000000000..7bc9bb147 --- /dev/null +++ b/x/tunnel/keeper/latest_signal_prices_test.go @@ -0,0 +1,61 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func TestGetSetLatestSignalPrices(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define test data + tunnelID := uint64(1) + latestSignalPrices := types.LatestSignalPrices{ + TunnelID: tunnelID, + SignalPrices: []types.SignalPrice{ + {SignalID: "BTC", Price: 50000}, + }, + } + + // Set the latest signal prices + k.SetLatestSignalPrices(ctx, latestSignalPrices) + + // Get the latest signal prices + retrievedSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + require.NoError(t, err) + require.Equal(t, latestSignalPrices, retrievedSignalPrices) +} + +func TestGetAllLatestSignalPrices(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define test data + latestSignalPrices1 := types.LatestSignalPrices{ + TunnelID: 1, + SignalPrices: []types.SignalPrice{ + {SignalID: "BTC", Price: 50000}, + }, + } + latestSignalPrices2 := types.LatestSignalPrices{ + TunnelID: 2, + SignalPrices: []types.SignalPrice{ + {SignalID: "ETH", Price: 3000}, + }, + } + + // Set the latest signal prices + k.SetLatestSignalPrices(ctx, latestSignalPrices1) + k.SetLatestSignalPrices(ctx, latestSignalPrices2) + + // Get all latest signal prices + allLatestSignalPrices := k.GetAllLatestSignalPrices(ctx) + require.Len(t, allLatestSignalPrices, 2) + require.Contains(t, allLatestSignalPrices, latestSignalPrices1) + require.Contains(t, allLatestSignalPrices, latestSignalPrices2) +} diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 9abe3cafc..8d662645c 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -20,9 +20,9 @@ func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) er } // update total fees - totalFee := k.GetTotalFees(ctx) - totalFee.TotalPacketFee.Add(basePacketFee...) - k.SetTotalFees(ctx, totalFee) + totalFees := k.GetTotalFees(ctx) + totalFees.TotalPacketFee = totalFees.TotalPacketFee.Add(basePacketFee...) + k.SetTotalFees(ctx, totalFees) return nil } diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 0981bbb81..6e9ffc422 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -3,12 +3,43 @@ package keeper_test import ( "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +func TestDeductBasePacketFee(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define test data + feePayer := sdk.AccAddress([]byte("fee_payer_address")) + basePacketFee := sdk.Coins{sdk.NewInt64Coin("uband", 100)} + + defaultParams := types.DefaultParams() + defaultParams.BasePacketFee = basePacketFee + + err := k.SetParams(ctx, defaultParams) + require.NoError(t, err) + + // Mock bankKeeper to simulate coin transfer + s.MockBankKeeper.EXPECT(). + SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, basePacketFee). + Return(nil) + + // Call the DeductBasePacketFee function + err = k.DeductBasePacketFee(ctx, feePayer) + require.NoError(t, err) + + // Validate the total fees are updated + totalFee := k.GetTotalFees(ctx) + require.Equal(t, basePacketFee, totalFee.TotalPacketFee) +} + func TestGetSetPacket(t *testing.T) { s := testutil.NewTestSuite(t) ctx := s.Ctx @@ -26,22 +57,74 @@ func TestGetSetPacket(t *testing.T) { require.Equal(t, packet, storedPacket) } -func TestMustGetPacket(t *testing.T) { +func TestProduceActiveTunnelPackets(t *testing.T) { s := testutil.NewTestSuite(t) - ctx := s.Ctx - k := s.Keeper + ctx, k := s.Ctx, s.Keeper - packet := types.Packet{ - TunnelID: 1, - Nonce: 1, + // Define test data + tunnelID := uint64(1) + currentPricesMap := map[string]feedstypes.Price{ + "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + } + feePayer := sdk.AccAddress([]byte("fee_payer_address")) + tunnel := types.Tunnel{ + ID: 1, + FeePayer: feePayer.String(), + IsActive: true, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, + }, + CreatedAt: ctx.BlockTime().Unix(), } + route := &types.TSSRoute{ + DestinationChainID: "0x", + DestinationContractAddress: "0x", + } + err := tunnel.SetRoute(route) + require.NoError(t, err) - k.SetPacket(ctx, packet) + // Set the tunnel + k.SetTunnel(ctx, tunnel) + err = k.ActivateTunnel(ctx, tunnelID) + require.NoError(t, err) + k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 0}, + }, 0)) - storedPacket := k.MustGetPacket(ctx, packet.TunnelID, packet.Nonce) - require.Equal(t, packet, storedPacket) + // Call the ProduceActiveTunnelPackets function + isCreated, err := k.ProducePacket(ctx, tunnelID, currentPricesMap, false) + require.NoError(t, err) + require.True(t, isCreated) +} + +func TestGenerateSignalPrices(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx := s.Ctx + + // Define test data + tunnelID := uint64(1) + currentPricesMap := map[string]feedstypes.Price{ + "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + } + triggerAll := true + tunnel := types.Tunnel{ + ID: 1, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, + }, + } + latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 0}, + }, 0) - require.Panics(t, func() { - k.MustGetPacket(ctx, packet.TunnelID, 999) - }) + // Call the GenerateSignalPrices function + nsps := keeper.GenerateSignalPrices( + ctx, + tunnel.ID, + currentPricesMap, + tunnel.GetSignalDeviationMap(), + latestSignalPrices.SignalPrices, + triggerAll, + ) + require.Len(t, nsps, 1) } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 17a186b8f..c10f79a29 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -3,12 +3,133 @@ package keeper_test import ( "testing" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +func TestAddTunnel(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define test data + route := &codectypes.Any{} + signalDeviations := []types.SignalDeviation{ + {SignalID: "BTC"}, + {SignalID: "ETH"}, + } + interval := uint64(10) + creator := sdk.AccAddress([]byte("creator_address")).String() + + s.MockAccountKeeper.EXPECT(). + GetAccount(ctx, gomock.Any()). + Return(nil).Times(1) + s.MockAccountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + + // Call the AddTunnel function + tunnel, err := k.AddTunnel(ctx, route, types.ENCODER_FIXED_POINT_ABI, signalDeviations, interval, creator) + require.NoError(t, err) + + // Define the expected tunnel + expectedTunnel := types.Tunnel{ + ID: 1, + Route: route, + Encoder: types.ENCODER_FIXED_POINT_ABI, + FeePayer: "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", + Creator: creator, + Interval: interval, + SignalDeviations: signalDeviations, + IsActive: false, + CreatedAt: ctx.BlockTime().Unix(), + } + + // Define the expected latest signal prices + expectedSignalPrices := types.LatestSignalPrices{ + TunnelID: 1, + SignalPrices: []types.SignalPrice{ + {SignalID: "BTC", Price: 0}, + {SignalID: "ETH", Price: 0}, + }, + Timestamp: 0, + } + + // Validate the results + require.Equal(t, expectedTunnel, *tunnel) + + // Check the tunnel count + tunnelCount := k.GetTunnelCount(ctx) + require.Equal(t, uint64(1), tunnelCount) + + // Check the latest signal prices + latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnel.ID) + require.NoError(t, err) + require.Equal(t, expectedSignalPrices, latestSignalPrices) +} + +func TestEditTunnel(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define initial test data + initialRoute := &codectypes.Any{} + initialEncoder := types.ENCODER_FIXED_POINT_ABI + initialSignalDeviations := []types.SignalDeviation{ + {SignalID: "BTC"}, + {SignalID: "ETH"}, + } + initialInterval := uint64(10) + creator := sdk.AccAddress([]byte("creator_address")).String() + + s.MockAccountKeeper.EXPECT(). + GetAccount(ctx, gomock.Any()). + Return(nil).Times(1) + s.MockAccountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + + // Add an initial tunnel + initialTunnel, err := k.AddTunnel( + ctx, + initialRoute, + initialEncoder, + initialSignalDeviations, + initialInterval, + creator, + ) + require.NoError(t, err) + + // Define new test data for editing the tunnel + newSignalDeviations := []types.SignalDeviation{ + {SignalID: "BTC"}, + {SignalID: "ETH"}, + } + newInterval := uint64(20) + + // Call the EditTunnel function + err = k.EditTunnel(ctx, initialTunnel.ID, newSignalDeviations, newInterval) + require.NoError(t, err) + + // Validate the edited tunnel + editedTunnel, err := k.GetTunnel(ctx, initialTunnel.ID) + require.NoError(t, err) + require.Equal(t, newSignalDeviations, editedTunnel.SignalDeviations) + require.Equal(t, newInterval, editedTunnel.Interval) + + // Check the latest signal prices + latestSignalPrices, err := k.GetLatestSignalPrices(ctx, editedTunnel.ID) + require.NoError(t, err) + require.Equal(t, editedTunnel.ID, latestSignalPrices.TunnelID) + require.Len(t, latestSignalPrices.SignalPrices, len(newSignalDeviations)) + for i, sp := range latestSignalPrices.SignalPrices { + require.Equal(t, newSignalDeviations[i].SignalID, sp.SignalID) + require.Equal(t, uint64(0), sp.Price) + } +} + func TestGetSetTunnel(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper @@ -46,172 +167,137 @@ func TestGetTunnels(t *testing.T) { require.Len(s.T(), tunnels, 1, "expected 1 tunnel to be retrieved") } -// func TestGenerateSignalPriceInfos(t *testing.T) { -// s := testutil.NewTestSuite(t) -// ctx := s.Ctx - -// signalPriceInfos := []types.SignalPriceInfo{ -// {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000}, -// {SignalID: "signal2", SoftDeviationBPS: 0, HardDeviationBPS: 1000}, -// } - -// latestPricesMap := map[string]feedstypes.Price{ -// "signal1": {Price: 1000, Timestamp: time.Now().Unix(), PriceStatus: feedstypes.PriceStatusAvailable}, -// "signal2": {Price: 2000, Timestamp: time.Now().Unix(), PriceStatus: feedstypes.PriceStatusUnavailable}, -// } - -// tunnelID := uint64(1) -// expected := []types.SignalPriceInfo{ -// { -// SignalID: "signal1", -// SoftDeviationBPS: 0, -// HardDeviationBPS: 1000, -// Price: 1000, -// Timestamp: latestPricesMap["signal1"].Timestamp, -// }, -// {SignalID: "signal2", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, -// } - -// result := keeper.GenerateSignalPriceInfos(ctx, signalPriceInfos, latestPricesMap, tunnelID) - -// require.Equal(t, expected, result) -// } - -// func TestGenerateSignalPriceInfosBasedOnDeviation(t *testing.T) { -// s := testutil.NewTestSuite(t) -// ctx := s.Ctx - -// // Define test cases -// testCases := []struct { -// name string -// signalPriceInfos []types.SignalPriceInfo -// latestPricesMap map[string]feedstypes.Price -// tunnelID uint64 -// expectedResults []types.SignalPriceInfo -// }{ -// { -// name: "All prices available and within deviation", -// signalPriceInfos: []types.SignalPriceInfo{ -// {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, -// {SignalID: "signal2", Price: 200, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, -// }, -// latestPricesMap: map[string]feedstypes.Price{ -// "signal1": { -// SignalID: "signal1", -// Price: 109, -// PriceStatus: feedstypes.PriceStatusAvailable, -// Timestamp: 1234567890, -// }, -// "signal2": { -// SignalID: "signal2", -// Price: 205, -// PriceStatus: feedstypes.PriceStatusAvailable, -// Timestamp: 1234567891, -// }, -// }, -// tunnelID: 1, -// expectedResults: []types.SignalPriceInfo{}, -// }, -// { -// name: "Price not available", -// signalPriceInfos: []types.SignalPriceInfo{ -// {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, -// }, -// latestPricesMap: map[string]feedstypes.Price{ -// "signal1": { -// SignalID: "signal1", -// Price: 0, -// PriceStatus: feedstypes.PriceStatusUnavailable, -// Timestamp: 1234567890, -// }, -// }, -// tunnelID: 1, -// expectedResults: []types.SignalPriceInfo{ -// {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, -// }, -// }, -// { -// name: "Price exceeds hard deviation", -// signalPriceInfos: []types.SignalPriceInfo{ -// {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, -// }, -// latestPricesMap: map[string]feedstypes.Price{ -// "signal1": { -// SignalID: "signal1", -// Price: 150, -// PriceStatus: feedstypes.PriceStatusAvailable, -// Timestamp: 1234567890, -// }, -// }, -// tunnelID: 1, -// expectedResults: []types.SignalPriceInfo{ -// { -// SignalID: "signal1", -// SoftDeviationBPS: 0, -// HardDeviationBPS: 1000, -// Price: 150, -// Timestamp: 1234567890, -// }, -// }, -// }, -// { -// name: "Signal ID not found", -// signalPriceInfos: []types.SignalPriceInfo{ -// {SignalID: "signal1", Price: 100, SoftDeviationBPS: 0, HardDeviationBPS: 1000}, -// }, -// latestPricesMap: map[string]feedstypes.Price{}, -// tunnelID: 1, -// expectedResults: []types.SignalPriceInfo{ -// {SignalID: "signal1", SoftDeviationBPS: 0, HardDeviationBPS: 1000, Price: 0, Timestamp: 0}, -// }, -// }, -// } - -// for _, tc := range testCases { -// t.Run(tc.name, func(t *testing.T) { -// // Call the GenerateSignalPriceInfosBasedOnDeviation method -// nsps := keeper.GenerateSignalPriceInfosBasedOnDeviation( -// ctx, -// tc.signalPriceInfos, -// tc.latestPricesMap, -// tc.tunnelID, -// ) - -// // Verify the results -// require.Equal(t, len(tc.expectedResults), len(nsps)) -// for i, expected := range tc.expectedResults { -// require.Equal(t, expected.SignalID, nsps[i].SignalID) -// require.Equal(t, expected.Price, nsps[i].Price) -// require.Equal(t, expected.Timestamp, nsps[i].Timestamp) -// } -// }) -// } -// } - -// func TestCreateLatestPricesMap(t *testing.T) { -// // Create test data -// latestPrices := []feedstypes.Price{ -// { -// SignalID: "signal1", -// Price: 100, -// PriceStatus: feedstypes.PriceStatusAvailable, -// Timestamp: 1234567890, -// }, -// { -// SignalID: "signal2", -// Price: 200, -// PriceStatus: feedstypes.PriceStatusAvailable, -// Timestamp: 1234567891, -// }, -// } - -// // Call the createLatestPricesMap method -// latestPricesMap := keeper.CreateLatestPricesMap(latestPrices) - -// // Verify the results -// require.Equal(t, 2, len(latestPricesMap)) -// require.Contains(t, latestPricesMap, "signal1") -// require.Contains(t, latestPricesMap, "signal2") -// require.Equal(t, latestPrices[0], latestPricesMap["signal1"]) -// require.Equal(t, latestPrices[1], latestPricesMap["signal2"]) -// } +func TestGetSetTunnelCount(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Set a new tunnel count + newCount := uint64(5) + k.SetTunnelCount(ctx, newCount) + + // Get the tunnel count and verify it + retrievedCount := k.GetTunnelCount(ctx) + require.Equal(t, newCount, retrievedCount, "retrieved tunnel count should match the set value") +} + +func TestGetActiveTunnelIDs(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define active tunnel IDs + activeTunnelIDs := []uint64{1, 2, 3} + + // Add active tunnel IDs to the store + for _, id := range activeTunnelIDs { + k.ActiveTunnelID(ctx, id) + } + + // Call the GetActiveTunnelIDs function + retrievedIDs := k.GetActiveTunnelIDs(ctx) + + // Validate the results + require.Equal( + t, + activeTunnelIDs, + retrievedIDs, + "retrieved active tunnel IDs should match the expected values", + ) +} + +func TestActivateTunnel(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define test data + tunnelID := uint64(1) + route := &codectypes.Any{} // Replace with actual route data + encoder := types.ENCODER_FIXED_POINT_ABI // Replace with actual encoder data + signalDeviations := []types.SignalDeviation{ + {SignalID: "BTC"}, + {SignalID: "ETH"}, + } + interval := uint64(10) + creator := sdk.AccAddress([]byte("creator_address")).String() + + // Add a tunnel to the store + tunnel := types.Tunnel{ + ID: tunnelID, + Route: route, + Encoder: encoder, + SignalDeviations: signalDeviations, + Interval: interval, + Creator: creator, + IsActive: false, + CreatedAt: ctx.BlockTime().Unix(), + } + k.SetTunnel(ctx, tunnel) + + // Call the ActivateTunnel function + err := k.ActivateTunnel(ctx, tunnelID) + require.NoError(t, err) + + // Validate the tunnel is activated + activatedTunnel, err := k.GetTunnel(ctx, tunnelID) + require.NoError(t, err) + require.True(t, activatedTunnel.IsActive, "tunnel should be active") + + // Validate the active tunnel ID is stored + activeTunnelIDs := k.GetActiveTunnelIDs(ctx) + require.Contains(t, activeTunnelIDs, tunnelID, "active tunnel IDs should contain the activated tunnel ID") +} + +func TestDeactivateTunnel(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define test data + tunnelID := uint64(1) + route := &codectypes.Any{} // Replace with actual route data + encoder := types.ENCODER_FIXED_POINT_ABI // Replace with actual encoder data + signalDeviations := []types.SignalDeviation{ + {SignalID: "BTC"}, + {SignalID: "ETH"}, + } + interval := uint64(10) + creator := sdk.AccAddress([]byte("creator_address")).String() + + // Add a tunnel to the store + tunnel := types.Tunnel{ + ID: tunnelID, + Route: route, + Encoder: encoder, + SignalDeviations: signalDeviations, + Interval: interval, + Creator: creator, + IsActive: true, + CreatedAt: ctx.BlockTime().Unix(), + } + k.SetTunnel(ctx, tunnel) + + // Call the DeactivateTunnel function + err := k.DeactivateTunnel(ctx, tunnelID) + require.NoError(t, err) + + // Validate the tunnel is deactivated + deactivatedTunnel, err := k.GetTunnel(ctx, tunnelID) + require.NoError(t, err) + require.False(t, deactivatedTunnel.IsActive, "tunnel should be inactive") + + // Validate the active tunnel ID is removed + activeTunnelIDs := k.GetActiveTunnelIDs(ctx) + require.NotContains(t, activeTunnelIDs, tunnelID, "active tunnel IDs should not contain the deactivated tunnel ID") +} + +func TestGetSetTotalFees(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + totalFees := types.TotalFees{TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100)))} + + // Set the total fees in the keeper + k.SetTotalFees(ctx, totalFees) + + // Get the total fees and verify it + retrievedFees := k.GetTotalFees(ctx) + require.Equal(t, totalFees, retrievedFees, "retrieved total fees should match the set value") +} From 7a483c95cedb189080cf1349ba34287498d36c64 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 18 Sep 2024 18:06:00 +0700 Subject: [PATCH 119/272] remove --- x/tunnel/types/errors.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 9341b4457..888853610 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -19,8 +19,7 @@ var ( ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 13, "invalid deposit denom") ErrDepositNotFound = errorsmod.Register(ModuleName, 14, "deposit not found") - ErrInsufficientFunds = errorsmod.Register(ModuleName, 15, "insufficient funds") - ErrInsufficientDeposit = errorsmod.Register(ModuleName, 16, "insufficient deposit") - ErrAlreadyActive = errorsmod.Register(ModuleName, 17, "already active") - ErrAlreadyInactive = errorsmod.Register(ModuleName, 18, "already inactive") + ErrInsufficientDeposit = errorsmod.Register(ModuleName, 15, "insufficient deposit") + ErrAlreadyActive = errorsmod.Register(ModuleName, 16, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 17, "already inactive") ) From e33b74c6019e9796308e16050e7b87feeea7632c Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 19 Sep 2024 00:26:29 +0700 Subject: [PATCH 120/272] fix test --- x/tunnel/keeper/tunnel_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 4388fff4b..d0d7a1f15 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -46,6 +46,7 @@ func TestAddTunnel(t *testing.T) { SignalDeviations: signalDeviations, IsActive: false, CreatedAt: ctx.BlockTime().Unix(), + TotalDeposit: sdk.NewCoins(), } // Define the expected latest signal prices From e7e05b9836576bff75b477a4492e93616944e28f Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 19 Sep 2024 02:07:54 +0700 Subject: [PATCH 121/272] fix packet logic --- x/tunnel/keeper/msg_server.go | 16 +--------- x/tunnel/keeper/packet.go | 53 ++++++++++++++-------------------- x/tunnel/keeper/packet_test.go | 9 ++++-- 3 files changed, 29 insertions(+), 49 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 64bc37e9f..b8f3a561c 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -4,7 +4,6 @@ import ( "context" "fmt" - sdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -194,23 +193,10 @@ func (ms msgServer) TriggerTunnel( currentPricesMap := createCurrentPricesMap(currentPrices) // Produce packet with trigger all signals - isCreated, err := ms.Keeper.ProducePacket(ctx, tunnel.ID, currentPricesMap, true) - if err != nil { + if err := ms.Keeper.ProducePacket(ctx, tunnel.ID, currentPricesMap, true); err != nil { return nil, err } - // if new packet is created, deduct base packet fee from the fee payer, - if isCreated { - feePayer, err := sdk.AccAddressFromBech32(tunnel.FeePayer) - if err != nil { - return nil, err - } - - if err := ms.Keeper.DeductBasePacketFee(ctx, feePayer); err != nil { - return nil, sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", req.TunnelID) - } - } - // Emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeManualTriggerTunnel, diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 8d662645c..1030b519b 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -63,35 +63,22 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // check for active tunnels for _, id := range ids { - isErrNoPacketCreated := false + tunnel := k.MustGetTunnel(ctx, id) + balances := k.bankKeeper.GetAllBalances(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) + basePacketFee := k.GetParams(ctx).BasePacketFee + + // deactivate tunnel if the fee payer does not have enough balance. + if !balances.IsAllGTE(basePacketFee) { + k.MustDeactivateTunnel(ctx, id) + continue + } + producePacketFunc := func(ctx sdk.Context) error { - tunnel, err := k.GetTunnel(ctx, id) - if err != nil { - return err - } - - // deduct base packet fee from the fee payer; deactivate tunnel if failed. - feePayerAddr := sdk.MustAccAddressFromBech32(tunnel.FeePayer) - if err := k.DeductBasePacketFee(ctx, feePayerAddr); err != nil { - return k.DeactivateTunnel(ctx, id) - } - - // Produce and send a packet, if no packet is created, return error so that - // fee is reverted. - isCreated, err := k.ProducePacket(ctx, id, currentPricesMap, false) - if err != nil { - return err - } - if !isCreated { - isErrNoPacketCreated = true - return fmt.Errorf("no packet is created for tunnel %d", id) - } - - return nil + return k.ProducePacket(ctx, id, currentPricesMap, false) } // produce a packet. If error, emits an event. - if err := ctxcache.ApplyFuncIfNoError(ctx, producePacketFunc); err != nil && !isErrNoPacketCreated { + if err := ctxcache.ApplyFuncIfNoError(ctx, producePacketFunc); err != nil { ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeProducePacketFail, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", id)), @@ -107,7 +94,7 @@ func (k Keeper) ProducePacket( tunnelID uint64, currentPricesMap map[string]feedstypes.Price, triggerAll bool, -) (isCreated bool, err error) { +) error { unixNow := ctx.BlockTime().Unix() // get tunnel and signal prices info @@ -120,7 +107,6 @@ func (k Keeper) ProducePacket( // generate new signal prices nsps := GenerateSignalPrices( ctx, - tunnel.ID, currentPricesMap, tunnel.GetSignalDeviationMap(), latestSignalPrices.SignalPrices, @@ -129,12 +115,18 @@ func (k Keeper) ProducePacket( // return if no new signal prices if len(nsps) == 0 { - return false, nil + return nil + } + + // deduct base packet fee from the fee payer, + feePayer := sdk.MustAccAddressFromBech32(tunnel.FeePayer) + if err := k.DeductBasePacketFee(ctx, feePayer); err != nil { + return sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) } newPacket := types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow) if err := k.SendPacket(ctx, tunnel, newPacket); err != nil { - return false, sdkerrors.Wrapf(err, "route %s failed to send packet", tunnel.Route.TypeUrl) + return sdkerrors.Wrapf(err, "route %s failed to send packet", tunnel.Route.TypeUrl) } // update signal prices info @@ -148,7 +140,7 @@ func (k Keeper) ProducePacket( tunnel.NonceCount++ k.SetTunnel(ctx, tunnel) - return true, nil + return nil } // SendPacket sends a packet to the destination route @@ -187,7 +179,6 @@ func (k Keeper) SendPacket( // GenerateSignalPrices generates signal prices based on the current prices and signal info func GenerateSignalPrices( ctx sdk.Context, - tunnelID uint64, currentPricesMap map[string]feedstypes.Price, signalDeviationMap map[string]types.SignalDeviation, signalPrices []types.SignalPrice, diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 6e9ffc422..2a994c5c1 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -83,6 +83,11 @@ func TestProduceActiveTunnelPackets(t *testing.T) { err := tunnel.SetRoute(route) require.NoError(t, err) + // Mock bankKeeper to simulate coin transfer + s.MockBankKeeper.EXPECT(). + SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, nil). + Return(nil) + // Set the tunnel k.SetTunnel(ctx, tunnel) err = k.ActivateTunnel(ctx, tunnelID) @@ -92,9 +97,8 @@ func TestProduceActiveTunnelPackets(t *testing.T) { }, 0)) // Call the ProduceActiveTunnelPackets function - isCreated, err := k.ProducePacket(ctx, tunnelID, currentPricesMap, false) + err = k.ProducePacket(ctx, tunnelID, currentPricesMap, false) require.NoError(t, err) - require.True(t, isCreated) } func TestGenerateSignalPrices(t *testing.T) { @@ -120,7 +124,6 @@ func TestGenerateSignalPrices(t *testing.T) { // Call the GenerateSignalPrices function nsps := keeper.GenerateSignalPrices( ctx, - tunnel.ID, currentPricesMap, tunnel.GetSignalDeviationMap(), latestSignalPrices.SignalPrices, From dab0c8ceb022d3c25b8a52384de895e1fb1b3475 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 19 Sep 2024 09:07:12 +0700 Subject: [PATCH 122/272] add test --- x/tunnel/keeper/packet_test.go | 117 ++++++++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 2a994c5c1..6dc069fb5 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/keeper" @@ -57,7 +58,7 @@ func TestGetSetPacket(t *testing.T) { require.Equal(t, packet, storedPacket) } -func TestProduceActiveTunnelPackets(t *testing.T) { +func TestProducePacket(t *testing.T) { s := testutil.NewTestSuite(t) ctx, k := s.Ctx, s.Keeper @@ -101,6 +102,120 @@ func TestProduceActiveTunnelPackets(t *testing.T) { require.NoError(t, err) } +func TestProduceActiveTunnelPackets(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define test data + tunnelID := uint64(1) + feePayer := sdk.AccAddress([]byte("fee_payer_address")) + tunnel := types.Tunnel{ + ID: 1, + FeePayer: feePayer.String(), + IsActive: true, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, + }, + CreatedAt: ctx.BlockTime().Unix(), + } + route := &types.TSSRoute{ + DestinationChainID: "0x", + DestinationContractAddress: "0x", + } + err := tunnel.SetRoute(route) + require.NoError(t, err) + + // set params + defaultParams := types.DefaultParams() + err = k.SetParams(ctx, defaultParams) + require.NoError(t, err) + + // Set the tunnel + k.SetTunnel(ctx, tunnel) + err = k.ActivateTunnel(ctx, tunnelID) + require.NoError(t, err) + k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 0}, + }, 0)) + + // Mock bankKeeper & FeedsKeeper + s.MockFeedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ + {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + }) + s.MockBankKeeper.EXPECT().GetAllBalances(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) + s.MockBankKeeper.EXPECT(). + SendCoinsFromAccountToModule(gomock.Any(), feePayer, types.ModuleName, types.DefaultBasePacketFee). + Return(nil) + + // Call the ProduceActiveTunnelPackets function + k.ProduceActiveTunnelPackets(ctx) + + // Validate the tunnel is Inactive & no packet is Created + newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) + require.NoError(t, err) + require.True(t, newTunnelInfo.IsActive) + require.Equal(t, newTunnelInfo.NonceCount, uint64(1)) + + activeTunnels := k.GetActiveTunnelIDs(ctx) + require.Equal(t, []uint64{1}, activeTunnels) +} + +func TestProduceActiveTunnelPacketsNotEnoughMoney(t *testing.T) { + s := testutil.NewTestSuite(t) + ctx, k := s.Ctx, s.Keeper + + // Define test data + tunnelID := uint64(1) + feePayer := sdk.AccAddress([]byte("fee_payer_address")) + tunnel := types.Tunnel{ + ID: 1, + FeePayer: feePayer.String(), + IsActive: true, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, + }, + CreatedAt: ctx.BlockTime().Unix(), + } + route := &types.TSSRoute{ + DestinationChainID: "0x", + DestinationContractAddress: "0x", + } + err := tunnel.SetRoute(route) + require.NoError(t, err) + + // set params + defaultParams := types.DefaultParams() + err = k.SetParams(ctx, defaultParams) + require.NoError(t, err) + + // Set the tunnel + k.SetTunnel(ctx, tunnel) + err = k.ActivateTunnel(ctx, tunnelID) + require.NoError(t, err) + k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 0}, + }, 0)) + + // Mock bankKeeper & FeedsKeeper + s.MockFeedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ + {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + }) + s.MockBankKeeper.EXPECT().GetAllBalances(gomock.Any(), feePayer). + Return(sdk.Coins{sdk.NewInt64Coin("uband", 1)}) + + // Call the ProduceActiveTunnelPackets function + k.ProduceActiveTunnelPackets(ctx) + + // Validate the tunnel is Inactive & no packet is Created + newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) + require.NoError(t, err) + require.False(t, newTunnelInfo.IsActive) + require.Equal(t, newTunnelInfo.NonceCount, uint64(0)) + + activeTunnels := k.GetActiveTunnelIDs(ctx) + require.Len(t, activeTunnels, 0) +} + func TestGenerateSignalPrices(t *testing.T) { s := testutil.NewTestSuite(t) ctx := s.Ctx From 21379010b132c1d1899a138526f9f9ca61c2df00 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 19 Sep 2024 13:32:28 +0700 Subject: [PATCH 123/272] fix check balance --- x/tunnel/keeper/packet.go | 2 +- x/tunnel/keeper/packet_test.go | 4 ++-- x/tunnel/testutil/mock_expected_keepers.go | 14 ++++++++++++++ x/tunnel/types/expected_keepers.go | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 1030b519b..d9435e11b 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -64,7 +64,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // check for active tunnels for _, id := range ids { tunnel := k.MustGetTunnel(ctx, id) - balances := k.bankKeeper.GetAllBalances(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) + balances := k.bankKeeper.SpendableCoins(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) basePacketFee := k.GetParams(ctx).BasePacketFee // deactivate tunnel if the fee payer does not have enough balance. diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 6dc069fb5..f1fc03b51 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -142,7 +142,7 @@ func TestProduceActiveTunnelPackets(t *testing.T) { s.MockFeedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) - s.MockBankKeeper.EXPECT().GetAllBalances(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) + s.MockBankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) s.MockBankKeeper.EXPECT(). SendCoinsFromAccountToModule(gomock.Any(), feePayer, types.ModuleName, types.DefaultBasePacketFee). Return(nil) @@ -200,7 +200,7 @@ func TestProduceActiveTunnelPacketsNotEnoughMoney(t *testing.T) { s.MockFeedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) - s.MockBankKeeper.EXPECT().GetAllBalances(gomock.Any(), feePayer). + s.MockBankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer). Return(sdk.Coins{sdk.NewInt64Coin("uband", 1)}) // Call the ProduceActiveTunnelPackets function diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go index ac6d98592..cd480e019 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -200,6 +200,20 @@ func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderMo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromModuleToAccount", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromModuleToAccount), ctx, senderModule, recipientAddr, amt) } +// SpendableCoins mocks base method. +func (m *MockBankKeeper) SpendableCoins(ctx types2.Context, addr types2.AccAddress) types2.Coins { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) + ret0, _ := ret[0].(types2.Coins) + return ret0 +} + +// SpendableCoins indicates an expected call of SpendableCoins. +func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) +} + // MockFeedsKeeper is a mock of FeedsKeeper interface. type MockFeedsKeeper struct { ctrl *gomock.Controller diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index df567f462..80a29b00d 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -23,6 +23,7 @@ type AccountKeeper interface { type BankKeeper interface { GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromModuleToAccount( ctx sdk.Context, From 920dc0a43145f131beb4e8f061afd0c7007f78b3 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 19 Sep 2024 17:25:03 +0700 Subject: [PATCH 124/272] refactor test suite --- x/tunnel/keeper/account_test.go | 22 +- x/tunnel/{ => keeper}/genesis.go | 32 +- x/tunnel/{ => keeper}/genesis_test.go | 81 ++- x/tunnel/keeper/grpc_query_test.go | 96 ++-- x/tunnel/keeper/keeper_test.go | 120 +++++ x/tunnel/keeper/latest_signal_prices_test.go | 25 +- x/tunnel/keeper/msg_server.go | 6 +- x/tunnel/keeper/msg_server_test.go | 501 +++++++++++++++++++ x/tunnel/keeper/packet_test.go | 122 +++-- x/tunnel/keeper/tss_packet_test.go | 19 +- x/tunnel/keeper/tunnel_test.go | 125 ++--- x/tunnel/module.go | 6 +- x/tunnel/testutil/mock_keeper.go | 77 --- x/tunnel/types/errors.go | 4 +- 14 files changed, 897 insertions(+), 339 deletions(-) rename x/tunnel/{ => keeper}/genesis.go (73%) rename x/tunnel/{ => keeper}/genesis_test.go (55%) create mode 100644 x/tunnel/keeper/keeper_test.go create mode 100644 x/tunnel/keeper/msg_server_test.go delete mode 100644 x/tunnel/testutil/mock_keeper.go diff --git a/x/tunnel/keeper/account_test.go b/x/tunnel/keeper/account_test.go index 08db96e73..5ac2e14c9 100644 --- a/x/tunnel/keeper/account_test.go +++ b/x/tunnel/keeper/account_test.go @@ -2,30 +2,24 @@ package keeper_test import ( "fmt" - "testing" - "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" ) -func TestGenerateAccount(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestGenerateAccount() { + ctx, k := s.ctx, s.keeper tunnelID := uint64(1) - s.MockAccountKeeper.EXPECT(). + s.accountKeeper.EXPECT(). GetAccount(ctx, gomock.Any()). Return(nil).Times(1) - s.MockAccountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) - s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) addr, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", tunnelID)) - require.NoError(s.T(), err, "expected no error generating account") - require.NotNil(s.T(), addr, "expected generated address to be non-nil") - require.Equal( - s.T(), + s.Require().NoError(err, "expected no error generating account") + s.Require().NotNil(addr, "expected generated address to be non-nil") + s.Require().Equal( "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", addr.String(), "expected generated address to match", diff --git a/x/tunnel/genesis.go b/x/tunnel/keeper/genesis.go similarity index 73% rename from x/tunnel/genesis.go rename to x/tunnel/keeper/genesis.go index 62d42bd51..3a9258bd9 100644 --- a/x/tunnel/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -1,11 +1,10 @@ -package tunnel +package keeper import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/bandprotocol/chain/v2/x/tunnel/keeper" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -13,45 +12,38 @@ import ( func ValidateGenesis(data *types.GenesisState) error { // validate the tunnel count if uint64(len(data.Tunnels)) != data.TunnelCount { - return types.ErrInvalidGenesis.Wrapf( - "TunnelCount: %d, actual tunnels: %d", - data.TunnelCount, - len(data.Tunnels), - ) + return types.ErrInvalidGenesis.Wrapf("length of tunnels does not match tunnel count") } // validate the tunnel IDs for _, tunnel := range data.Tunnels { if tunnel.ID > data.TunnelCount { - return types.ErrInvalidGenesis.Wrapf( - "TunnelID %d is greater than the TunnelCount %d", - tunnel.ID, - data.TunnelCount, - ) + return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in tunnels") } } + // validate the latest signal prices count + if len(data.LatestSignalPricesList) != int(data.TunnelCount) { + return types.ErrInvalidGenesis.Wrapf("length of latest signal prices does not match tunnel count") + } + // validate latest signal prices for _, latestSignalPrices := range data.LatestSignalPricesList { if latestSignalPrices.TunnelID == 0 || latestSignalPrices.TunnelID > data.TunnelCount { - return types.ErrInvalidGenesis.Wrapf( - "TunnelID %d cannot be 0 or greater than the TunnelCount %d", - latestSignalPrices.TunnelID, - data.TunnelCount, - ) + return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in latest signal prices") } } // validate the total fees if err := data.TotalFees.Validate(); err != nil { - return types.ErrInvalidGenesis.Wrapf("total fees: %s", err.Error()) + return types.ErrInvalidGenesis.Wrapf("invalid total fees: %s", err.Error()) } return data.Params.Validate() } // InitGenesis initializes the module's state from a provided genesis state. -func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { +func InitGenesis(ctx sdk.Context, k *Keeper, data *types.GenesisState) { if err := k.SetParams(ctx, data.Params); err != nil { panic(err) } @@ -87,7 +79,7 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, data *types.GenesisState) { } // ExportGenesis returns the module's exported genesis -func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *types.GenesisState { +func ExportGenesis(ctx sdk.Context, k *Keeper) *types.GenesisState { return &types.GenesisState{ Params: k.GetParams(ctx), TunnelCount: k.GetTunnelCount(ctx), diff --git a/x/tunnel/genesis_test.go b/x/tunnel/keeper/genesis_test.go similarity index 55% rename from x/tunnel/genesis_test.go rename to x/tunnel/keeper/genesis_test.go index bd08ee4c2..384175527 100644 --- a/x/tunnel/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -1,7 +1,6 @@ -package tunnel_test +package keeper_test import ( - "fmt" "testing" sdk "github.com/cosmos/cosmos-sdk/types" @@ -9,8 +8,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "github.com/bandprotocol/chain/v2/x/tunnel" - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -19,6 +17,7 @@ func TestValidateGenesis(t *testing.T) { name string genesis *types.GenesisState requireErr bool + errMsg string }{ { name: "valid genesis state", @@ -40,7 +39,7 @@ func TestValidateGenesis(t *testing.T) { requireErr: false, }, { - name: "invalid tunnel count", + name: "length of tunnels does not match tunnel count", genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 1}, @@ -48,19 +47,36 @@ func TestValidateGenesis(t *testing.T) { TunnelCount: 2, }, requireErr: true, + errMsg: "length of tunnels does not match tunnel count", }, { - name: "invalid tunnel ID", + name: "tunnel ID greater than tunnel count", genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 3}, }, - TunnelCount: 2, + TunnelCount: 1, + }, + requireErr: true, + errMsg: "tunnel count mismatch", + }, + { + name: "latest signal prices does not match tunnel count", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + TunnelCount: 1, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1}, + {TunnelID: 2}, + }, }, requireErr: true, + errMsg: "latest signal prices does not match tunnel count", }, { - name: "invalid signal prices info", + name: "tunnel count mismatch in latest signal prices", genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 1}, @@ -71,6 +87,21 @@ func TestValidateGenesis(t *testing.T) { }, }, requireErr: true, + errMsg: "tunnel count mismatch", + }, + { + name: "tunnel id is zero in latest signal prices", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + TunnelCount: 1, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 0}, + }, + }, + requireErr: true, + errMsg: "tunnel count mismatch", }, { name: "invalid total fee", @@ -79,19 +110,26 @@ func TestValidateGenesis(t *testing.T) { {ID: 1}, }, TunnelCount: 1, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1}, + }, TotalFees: types.TotalFees{ - TotalPacketFee: sdk.Coins{}, // Invalid coin + TotalPacketFee: sdk.Coins{ + {Denom: "uband", Amount: sdk.NewInt(-100)}, + }, // Invalid coin }, }, requireErr: true, + errMsg: "invalid total fees", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := tunnel.ValidateGenesis(tt.genesis) + err := keeper.ValidateGenesis(tt.genesis) if tt.requireErr { require.Error(t, err) + require.Contains(t, err.Error(), tt.errMsg) } else { require.NoError(t, err) } @@ -99,20 +137,18 @@ func TestValidateGenesis(t *testing.T) { } } -func TestInitExportGenesis(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestInitExportGenesis() { + ctx, k := s.ctx, s.keeper - // Mock the account keeper - s.MockAccountKeeper.EXPECT(). + s.accountKeeper.EXPECT(). GetModuleAccount(ctx, gomock.Any()). Return(authtypes.AccountI(&authtypes.ModuleAccount{ BaseAccount: &authtypes.BaseAccount{Address: "test"}, })). AnyTimes() - s.MockAccountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(sdk.AccAddress{}).AnyTimes() - s.MockAccountKeeper.EXPECT().SetModuleAccount(ctx, gomock.Any()).AnyTimes() - s.MockBankKeeper.EXPECT().GetAllBalances(ctx, gomock.Any()).Return(sdk.Coins{}).AnyTimes() + s.accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(sdk.AccAddress{}).AnyTimes() + s.accountKeeper.EXPECT().SetModuleAccount(ctx, gomock.Any()).AnyTimes() + s.bankKeeper.EXPECT().GetAllBalances(ctx, gomock.Any()).Return(sdk.Coins{}).AnyTimes() // Create a valid genesis state genesisState := &types.GenesisState{ @@ -136,14 +172,11 @@ func TestInitExportGenesis(t *testing.T) { } // Initialize the genesis state - tunnel.InitGenesis(ctx, k, genesisState) + keeper.InitGenesis(ctx, k, genesisState) // Export the genesis state - exportedGenesisState := tunnel.ExportGenesis(ctx, k) - - fmt.Printf("genesisState: %v\n", genesisState) - fmt.Printf("exportedGenesisState: %v\n", exportedGenesisState) + exportedGenesisState := keeper.ExportGenesis(ctx, k) // Verify the exported state matches the initialized state - require.Equal(t, genesisState, exportedGenesisState) + s.Require().Equal(genesisState, exportedGenesisState) } diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index 700eed34f..54232c046 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -1,17 +1,51 @@ package keeper_test import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestGRPCQueryPackets(t *testing.T) { - s := testutil.NewTestSuite(t) - q := s.QueryServer +func (s *KeeperTestSuite) TestGRPCQueryTunnels() { + ctx, k, q := s.ctx, s.keeper, s.queryServer + + // Set tunnels + tunnel1 := types.Tunnel{ + ID: 1, + } + tunnel2 := types.Tunnel{ + ID: 2, + } + k.SetTunnel(ctx, tunnel1) + k.SetTunnel(ctx, tunnel2) + + // Query tunnels + resp, err := q.Tunnels(ctx, &types.QueryTunnelsRequest{}) + s.Require().NoError(err) + s.Require().NotNil(resp) + s.Require().Len(resp.Tunnels, 2) + s.Require().Equal(tunnel1, *resp.Tunnels[0]) + s.Require().Equal(tunnel2, *resp.Tunnels[1]) +} + +func (s *KeeperTestSuite) TestGRPCQueryTunnel() { + ctx, k, q := s.ctx, s.keeper, s.queryServer + + // Set tunnel + tunnel := types.Tunnel{ + ID: 1, + } + k.SetTunnel(ctx, tunnel) + + // Query tunnel + resp, err := q.Tunnel(ctx, &types.QueryTunnelRequest{ + TunnelId: 1, + }) + s.Require().NoError(err) + s.Require().NotNil(resp) + s.Require().Equal(tunnel, resp.Tunnel) +} + +func (s *KeeperTestSuite) TestGRPCQueryPackets() { + ctx, k, q := s.ctx, s.keeper, s.queryServer // Set tunnel tunnel := types.Tunnel{ @@ -23,8 +57,9 @@ func TestGRPCQueryPackets(t *testing.T) { DestinationContractAddress: "0x123", } err := tunnel.SetRoute(&r) - require.NoError(t, err) - s.Keeper.SetTunnel(s.Ctx, tunnel) + s.Require().NoError(err) + + k.SetTunnel(ctx, tunnel) // Set packets packet1 := types.Packet{ @@ -40,30 +75,29 @@ func TestGRPCQueryPackets(t *testing.T) { DestinationChainID: r.DestinationChainID, DestinationContractAddress: r.DestinationContractAddress, }) - require.NoError(t, err) + s.Require().NoError(err) err = packet2.SetPacketContent(&types.TSSPacketContent{ SigningID: 2, DestinationChainID: r.DestinationChainID, DestinationContractAddress: r.DestinationContractAddress, }) - require.NoError(t, err) - s.Keeper.SetPacket(s.Ctx, packet1) - s.Keeper.SetPacket(s.Ctx, packet2) + s.Require().NoError(err) + k.SetPacket(ctx, packet1) + k.SetPacket(ctx, packet2) // Query packets - resp, err := q.Packets(s.Ctx, &types.QueryPacketsRequest{ + resp, err := q.Packets(ctx, &types.QueryPacketsRequest{ TunnelId: 1, }) - require.NoError(t, err) - require.NotNil(t, resp) - require.Len(t, resp.Packets, 2) - require.Equal(t, packet1, *resp.Packets[0]) - require.Equal(t, packet2, *resp.Packets[1]) + s.Require().NoError(err) + s.Require().NotNil(resp) + s.Require().Len(resp.Packets, 2) + s.Require().Equal(packet1, *resp.Packets[0]) + s.Require().Equal(packet2, *resp.Packets[1]) } -func TestGRPCQueryPacket(t *testing.T) { - s := testutil.NewTestSuite(t) - q := s.QueryServer +func (s *KeeperTestSuite) TestGRPCQueryPacket() { + ctx, k, q := s.ctx, s.keeper, s.queryServer // set tunnel tunnel := types.Tunnel{ @@ -75,8 +109,8 @@ func TestGRPCQueryPacket(t *testing.T) { DestinationContractAddress: "0x123", } err := tunnel.SetRoute(&r) - require.NoError(t, err) - s.Keeper.SetTunnel(s.Ctx, tunnel) + s.Require().NoError(err) + k.SetTunnel(ctx, tunnel) packet1 := types.Packet{ TunnelID: 1, @@ -87,14 +121,14 @@ func TestGRPCQueryPacket(t *testing.T) { DestinationChainID: r.DestinationChainID, DestinationContractAddress: r.DestinationContractAddress, }) - require.NoError(t, err) - s.Keeper.SetPacket(s.Ctx, packet1) + s.Require().NoError(err) + k.SetPacket(ctx, packet1) - res, err := q.Packet(s.Ctx, &types.QueryPacketRequest{ + res, err := q.Packet(ctx, &types.QueryPacketRequest{ TunnelId: 1, Nonce: 1, }) - require.NoError(t, err) - require.NotNil(t, res) - require.Equal(t, packet1, *res.Packet) + s.Require().NoError(err) + s.Require().NotNil(res) + s.Require().Equal(packet1, *res.Packet) } diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go new file mode 100644 index 000000000..57ea14551 --- /dev/null +++ b/x/tunnel/keeper/keeper_test.go @@ -0,0 +1,120 @@ +package keeper_test + +import ( + "testing" + "time" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/stretchr/testify/suite" + "go.uber.org/mock/gomock" + + "github.com/bandprotocol/chain/v2/x/tunnel" + "github.com/bandprotocol/chain/v2/x/tunnel/keeper" + "github.com/bandprotocol/chain/v2/x/tunnel/testutil" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +type KeeperTestSuite struct { + suite.Suite + + keeper *keeper.Keeper + queryServer types.QueryServer + msgServer types.MsgServer + + accountKeeper *testutil.MockAccountKeeper + bankKeeper *testutil.MockBankKeeper + feedsKeeper *testutil.MockFeedsKeeper + bandtssKeeper *testutil.MockBandtssKeeper + + ctx sdk.Context + authority sdk.AccAddress +} + +func (s *KeeperTestSuite) SetupTest() { + s.reset() +} + +func (s *KeeperTestSuite) reset() { + ctrl := gomock.NewController(s.T()) + key := sdk.NewKVStoreKey(types.StoreKey) + testCtx := sdktestutil.DefaultContextWithDB(s.T(), key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(tunnel.AppModuleBasic{}) + + accountKeeper := testutil.NewMockAccountKeeper(ctrl) + bankKeeper := testutil.NewMockBankKeeper(ctrl) + feedsKeeper := testutil.NewMockFeedsKeeper(ctrl) + bandtssKeeper := testutil.NewMockBandtssKeeper(ctrl) + + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + + accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authority).AnyTimes() + + s.keeper = keeper.NewKeeper( + encCfg.Codec.(codec.BinaryCodec), + key, + accountKeeper, + bankKeeper, + feedsKeeper, + bandtssKeeper, + authority.String(), + ) + s.queryServer = keeper.NewQueryServer(s.keeper) + s.msgServer = keeper.NewMsgServerImpl(s.keeper) + s.accountKeeper = accountKeeper + s.bankKeeper = bankKeeper + s.feedsKeeper = feedsKeeper + s.bandtssKeeper = bandtssKeeper + s.ctx = testCtx.Ctx.WithBlockHeader(tmproto.Header{Time: time.Now().UTC()}) + s.authority = authority + + err := s.keeper.SetParams(s.ctx, types.DefaultParams()) + s.Require().NoError(err) +} + +func (s *KeeperTestSuite) AddSampleTunnel(isActive bool) { + s.accountKeeper.EXPECT(). + GetAccount(s.ctx, gomock.Any()). + Return(nil).Times(1) + s.accountKeeper.EXPECT().NewAccount(s.ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(s.ctx, gomock.Any()).Times(1) + + signalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 100, + HardDeviationBPS: 100, + }, + } + route := &types.TSSRoute{ + DestinationChainID: "chain-1", + DestinationContractAddress: "0x1234567890abcdef", + } + routeAny, err := codectypes.NewAnyWithValue(route) + s.Require().NoError(err) + + tunnel, err := s.keeper.AddTunnel( + s.ctx, + routeAny, + types.ENCODER_FIXED_POINT_ABI, + signalDeviations, + 10, + sdk.AccAddress([]byte("creator_address")).String(), + ) + s.Require().NoError(err) + + if isActive { + err := s.keeper.ActivateTunnel(s.ctx, tunnel.ID) + s.Require().NoError(err) + } +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} diff --git a/x/tunnel/keeper/latest_signal_prices_test.go b/x/tunnel/keeper/latest_signal_prices_test.go index 7bc9bb147..39d982f08 100644 --- a/x/tunnel/keeper/latest_signal_prices_test.go +++ b/x/tunnel/keeper/latest_signal_prices_test.go @@ -1,17 +1,11 @@ package keeper_test import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestGetSetLatestSignalPrices(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestGetSetLatestSignalPrices() { + ctx, k := s.ctx, s.keeper // Define test data tunnelID := uint64(1) @@ -27,13 +21,12 @@ func TestGetSetLatestSignalPrices(t *testing.T) { // Get the latest signal prices retrievedSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) - require.NoError(t, err) - require.Equal(t, latestSignalPrices, retrievedSignalPrices) + s.Require().NoError(err) + s.Require().Equal(latestSignalPrices, retrievedSignalPrices) } -func TestGetAllLatestSignalPrices(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestGetAllLatestSignalPrices() { + ctx, k := s.ctx, s.keeper // Define test data latestSignalPrices1 := types.LatestSignalPrices{ @@ -55,7 +48,7 @@ func TestGetAllLatestSignalPrices(t *testing.T) { // Get all latest signal prices allLatestSignalPrices := k.GetAllLatestSignalPrices(ctx) - require.Len(t, allLatestSignalPrices, 2) - require.Contains(t, allLatestSignalPrices, latestSignalPrices1) - require.Contains(t, allLatestSignalPrices, latestSignalPrices2) + s.Require().Len(allLatestSignalPrices, 2) + s.Require().Contains(allLatestSignalPrices, latestSignalPrices1) + s.Require().Contains(allLatestSignalPrices, latestSignalPrices2) } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index b8f3a561c..46663f7cb 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -34,7 +34,7 @@ func (ms msgServer) CreateTunnel( return nil, types.ErrMaxSignalsExceeded } if req.Interval < params.MinInterval { - return nil, types.ErrIntervalTooShort + return nil, types.ErrIntervalTooLow } // TODO: check deposit with params, transfer deposit to module account @@ -89,7 +89,7 @@ func (ms msgServer) EditTunnel( return nil, types.ErrMaxSignalsExceeded } if req.Interval < params.MinInterval { - return nil, types.ErrIntervalTooShort + return nil, types.ErrIntervalTooLow } tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) @@ -98,7 +98,7 @@ func (ms msgServer) EditTunnel( } if req.Creator != tunnel.Creator { - return nil, fmt.Errorf("creator %s is not the creator of tunnel %d", req.Creator, req.TunnelID) + return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", req.Creator, req.TunnelID) } err = ms.Keeper.EditTunnel(ctx, req.TunnelID, req.SignalDeviations, req.Interval) diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go new file mode 100644 index 000000000..eebd45979 --- /dev/null +++ b/x/tunnel/keeper/msg_server_test.go @@ -0,0 +1,501 @@ +package keeper_test + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "go.uber.org/mock/gomock" + + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func (s *KeeperTestSuite) TestMsgCreateTunnel() { + cases := map[string]struct { + preRun func() (*types.MsgCreateTunnel, error) + expErr bool + expErrMsg string + }{ + "max signal exceed": { + preRun: func() (*types.MsgCreateTunnel, error) { + params := types.DefaultParams() + params.MaxSignals = 1 + if err := s.keeper.SetParams(s.ctx, params); err != nil { + return nil, err + } + + signalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 100, + HardDeviationBPS: 100, + }, + { + SignalID: "ETH", + SoftDeviationBPS: 100, + HardDeviationBPS: 100, + }, + } + route := &types.TSSRoute{ + DestinationChainID: "chain-1", + DestinationContractAddress: "0x1234567890abcdef", + } + + return types.NewMsgCreateTunnel( + signalDeviations, + 10, + route, + types.ENCODER_FIXED_POINT_ABI, + sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), + sdk.AccAddress([]byte("creator_address")), + ) + }, + expErr: true, + expErrMsg: "max signals exceeded", + }, + "interval too low": { + preRun: func() (*types.MsgCreateTunnel, error) { + params := types.DefaultParams() + params.MinInterval = 5 + if err := s.keeper.SetParams(s.ctx, params); err != nil { + return nil, err + } + + signalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 100, + HardDeviationBPS: 100, + }, + } + route := &types.TSSRoute{ + DestinationChainID: "chain-1", + DestinationContractAddress: "0x1234567890abcdef", + } + + return types.NewMsgCreateTunnel( + signalDeviations, + 1, + route, + types.ENCODER_FIXED_POINT_ABI, + sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), + sdk.AccAddress([]byte("creator_address")), + ) + }, + expErr: true, + expErrMsg: "interval too low", + }, + "all good": { + preRun: func() (*types.MsgCreateTunnel, error) { + s.accountKeeper.EXPECT(). + GetAccount(s.ctx, gomock.Any()). + Return(nil).Times(1) + s.accountKeeper.EXPECT().NewAccount(s.ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(s.ctx, gomock.Any()).Times(1) + + signalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 100, + HardDeviationBPS: 100, + }, + } + route := &types.TSSRoute{ + DestinationChainID: "chain-1", + DestinationContractAddress: "0x1234567890abcdef", + } + + return types.NewMsgCreateTunnel( + signalDeviations, + 10, + route, + types.ENCODER_FIXED_POINT_ABI, + sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), + sdk.AccAddress([]byte("creator_address")), + ) + }, + expErr: false, + expErrMsg: "", + }, + } + + for name, tc := range cases { + s.Run(name, func() { + msg, err := tc.preRun() + s.Require().NoError(err) + res, err := s.msgServer.CreateTunnel(s.ctx, msg) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + s.Require().NotNil(res.TunnelID) + } + + s.reset() + }) + } +} + +func (s *KeeperTestSuite) TestMsgEditTunnel() { + cases := map[string]struct { + preRun func() *types.MsgEditTunnel + expErr bool + expErrMsg string + }{ + "max signal exceed": { + preRun: func() *types.MsgEditTunnel { + params := types.DefaultParams() + params.MaxSignals = 1 + err := s.keeper.SetParams(s.ctx, params) + s.Require().NoError(err) + + s.AddSampleTunnel(false) + + editedSignalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 200, + HardDeviationBPS: 200, + }, + { + SignalID: "ETH", + SoftDeviationBPS: 200, + HardDeviationBPS: 200, + }, + } + + return types.NewMsgEditTunnel( + 1, + editedSignalDeviations, + 10, + sdk.AccAddress([]byte("creator_address")).String(), + ) + }, + expErr: true, + expErrMsg: "max signals exceeded", + }, + "interval too low": { + preRun: func() *types.MsgEditTunnel { + params := types.DefaultParams() + params.MinInterval = 5 + err := s.keeper.SetParams(s.ctx, params) + s.Require().NoError(err) + + s.AddSampleTunnel(false) + + editedSignalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 200, + HardDeviationBPS: 200, + }, + } + + return types.NewMsgEditTunnel( + 1, + editedSignalDeviations, + 1, + sdk.AccAddress([]byte("creator_address")).String(), + ) + }, + expErr: true, + expErrMsg: "interval too low", + }, + "tunnel not found": { + preRun: func() *types.MsgEditTunnel { + return types.NewMsgEditTunnel( + 1, + []types.SignalDeviation{}, + 10, + sdk.AccAddress([]byte("creator_address")).String(), + ) + }, + expErr: true, + expErrMsg: "tunnel not found", + }, + "invalid creator of the tunnel": { + preRun: func() *types.MsgEditTunnel { + s.AddSampleTunnel(false) + + return types.NewMsgEditTunnel( + 1, + []types.SignalDeviation{}, + 10, + sdk.AccAddress([]byte("wrong_creator_address")).String(), + ) + }, + expErr: true, + expErrMsg: "invalid creator of the tunnel", + }, + "all good": { + preRun: func() *types.MsgEditTunnel { + s.AddSampleTunnel(false) + + editedSignalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 200, + HardDeviationBPS: 200, + }, + } + + return types.NewMsgEditTunnel( + 1, + editedSignalDeviations, + 10, + sdk.AccAddress([]byte("creator_address")).String(), + ) + }, + expErr: false, + expErrMsg: "", + }, + } + + for name, tc := range cases { + s.Run(name, func() { + msg := tc.preRun() + + _, err := s.msgServer.EditTunnel(s.ctx, msg) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + } + + s.reset() + }) + } +} + +func (s *KeeperTestSuite) TestMsgActivate() { + cases := map[string]struct { + preRun func() *types.MsgActivate + expErr bool + expErrMsg string + }{ + "tunnel not found": { + preRun: func() *types.MsgActivate { + return types.NewMsgActivate(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: true, + expErrMsg: "tunnel not found", + }, + "invalid creator of the tunnel": { + preRun: func() *types.MsgActivate { + s.AddSampleTunnel(false) + + return types.NewMsgActivate(1, sdk.AccAddress([]byte("wrong_creator_address")).String()) + }, + expErr: true, + expErrMsg: "invalid creator of the tunnel", + }, + "already active": { + preRun: func() *types.MsgActivate { + s.AddSampleTunnel(true) + + return types.NewMsgActivate(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: true, + expErrMsg: "already active", + }, + "all good": { + preRun: func() *types.MsgActivate { + s.AddSampleTunnel(false) + + return types.NewMsgActivate(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: false, + expErrMsg: "", + }, + } + + for name, tc := range cases { + s.Run(name, func() { + msg := tc.preRun() + + _, err := s.msgServer.Activate(s.ctx, msg) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + } + + s.reset() + }) + } +} + +func (s *KeeperTestSuite) TestMsgDeactivate() { + cases := map[string]struct { + preRun func() *types.MsgDeactivate + expErr bool + expErrMsg string + }{ + "tunnel not found": { + preRun: func() *types.MsgDeactivate { + return types.NewMsgDeactivate(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: true, + expErrMsg: "tunnel not found", + }, + "invalid creator of the tunnel": { + preRun: func() *types.MsgDeactivate { + s.AddSampleTunnel(true) + + return types.NewMsgDeactivate(1, sdk.AccAddress([]byte("wrong_creator_address")).String()) + }, + expErr: true, + expErrMsg: "invalid creator of the tunnel", + }, + "already inactive": { + preRun: func() *types.MsgDeactivate { + s.AddSampleTunnel(false) + + return types.NewMsgDeactivate(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: true, + expErrMsg: "already inactive", + }, + "all good": { + preRun: func() *types.MsgDeactivate { + s.AddSampleTunnel(true) + + return types.NewMsgDeactivate(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: false, + expErrMsg: "", + }, + } + + for name, tc := range cases { + s.Run(name, func() { + msg := tc.preRun() + + _, err := s.msgServer.Deactivate(s.ctx, msg) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + } + + s.reset() + }) + } +} + +func (s *KeeperTestSuite) TestMsgTriggerTunnel() { + cases := map[string]struct { + preRun func() *types.MsgTriggerTunnel + expErr bool + expErrMsg string + }{ + "tunnel not found": { + preRun: func() *types.MsgTriggerTunnel { + return types.NewMsgTriggerTunnel(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: true, + expErrMsg: "tunnel not found", + }, + "invalid creator of the tunnel": { + preRun: func() *types.MsgTriggerTunnel { + s.AddSampleTunnel(true) + + return types.NewMsgTriggerTunnel(1, sdk.AccAddress([]byte("wrong_creator_address")).String()) + }, + expErr: true, + expErrMsg: "invalid creator of the tunnel", + }, + "inactive tunnel": { + preRun: func() *types.MsgTriggerTunnel { + s.AddSampleTunnel(false) + + return types.NewMsgTriggerTunnel(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: true, + expErrMsg: "inactive tunnel", + }, + "all good": { + preRun: func() *types.MsgTriggerTunnel { + s.AddSampleTunnel(true) + + feePayer := sdk.MustAccAddressFromBech32( + "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", + ) + + s.feedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ + {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + }) + s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) + s.bankKeeper.EXPECT(). + SendCoinsFromAccountToModule(gomock.Any(), feePayer, types.ModuleName, types.DefaultBasePacketFee). + Return(nil) + + return types.NewMsgTriggerTunnel(1, sdk.AccAddress([]byte("creator_address")).String()) + }, + expErr: false, + expErrMsg: "", + }, + } + + for name, tc := range cases { + s.Run(name, func() { + msg := tc.preRun() + + _, err := s.msgServer.TriggerTunnel(s.ctx, msg) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + } + + s.reset() + }) + } +} + +func (s *KeeperTestSuite) TestMsgUpdateParams() { + params := types.DefaultParams() + + cases := map[string]struct { + preRun func() *types.MsgUpdateParams + expErr bool + expErrMsg string + }{ + "invalid authority": { + preRun: func() *types.MsgUpdateParams { + return types.NewMsgUpdateParams( + "invalid authority", + params, + ) + }, + expErr: true, + expErrMsg: "invalid authority", + }, + "all good": { + preRun: func() *types.MsgUpdateParams { + return types.NewMsgUpdateParams( + s.authority.String(), + params, + ) + }, + expErr: false, + expErrMsg: "", + }, + } + + for name, tc := range cases { + s.Run(name, func() { + _, err := s.msgServer.UpdateParams(s.ctx, tc.preRun()) + + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + } + }) + } +} diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index f1fc03b51..824b32e4e 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -1,21 +1,16 @@ package keeper_test import ( - "testing" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" "github.com/bandprotocol/chain/v2/x/tunnel/keeper" - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestDeductBasePacketFee(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestDeductBasePacketFee() { + ctx, k := s.ctx, s.keeper // Define test data feePayer := sdk.AccAddress([]byte("fee_payer_address")) @@ -25,26 +20,24 @@ func TestDeductBasePacketFee(t *testing.T) { defaultParams.BasePacketFee = basePacketFee err := k.SetParams(ctx, defaultParams) - require.NoError(t, err) + s.Require().NoError(err) // Mock bankKeeper to simulate coin transfer - s.MockBankKeeper.EXPECT(). + s.bankKeeper.EXPECT(). SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, basePacketFee). Return(nil) // Call the DeductBasePacketFee function err = k.DeductBasePacketFee(ctx, feePayer) - require.NoError(t, err) + s.Require().NoError(err) // Validate the total fees are updated totalFee := k.GetTotalFees(ctx) - require.Equal(t, basePacketFee, totalFee.TotalPacketFee) + s.Require().Equal(basePacketFee, totalFee.TotalPacketFee) } -func TestGetSetPacket(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx := s.Ctx - k := s.Keeper +func (s *KeeperTestSuite) TestGetSetPacket() { + ctx, k := s.ctx, s.keeper packet := types.Packet{ TunnelID: 1, @@ -54,13 +47,12 @@ func TestGetSetPacket(t *testing.T) { k.SetPacket(ctx, packet) storedPacket, err := k.GetPacket(ctx, packet.TunnelID, packet.Nonce) - require.NoError(t, err) - require.Equal(t, packet, storedPacket) + s.Require().NoError(err) + s.Require().Equal(packet, storedPacket) } -func TestProducePacket(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestProducePacket() { + ctx, k := s.ctx, s.keeper // Define test data tunnelID := uint64(1) @@ -81,30 +73,30 @@ func TestProducePacket(t *testing.T) { DestinationChainID: "0x", DestinationContractAddress: "0x", } - err := tunnel.SetRoute(route) - require.NoError(t, err) // Mock bankKeeper to simulate coin transfer - s.MockBankKeeper.EXPECT(). - SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, nil). + s.bankKeeper.EXPECT(). + SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(10)))). Return(nil) + err := tunnel.SetRoute(route) + s.Require().NoError(err) + // Set the tunnel k.SetTunnel(ctx, tunnel) err = k.ActivateTunnel(ctx, tunnelID) - require.NoError(t, err) + s.Require().NoError(err) k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ {SignalID: "BTC/USD", Price: 0}, }, 0)) // Call the ProduceActiveTunnelPackets function err = k.ProducePacket(ctx, tunnelID, currentPricesMap, false) - require.NoError(t, err) + s.Require().NoError(err) } -func TestProduceActiveTunnelPackets(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { + ctx, k := s.ctx, s.keeper // Define test data tunnelID := uint64(1) @@ -122,47 +114,46 @@ func TestProduceActiveTunnelPackets(t *testing.T) { DestinationChainID: "0x", DestinationContractAddress: "0x", } + + s.feedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ + {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + }) + s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) + s.bankKeeper.EXPECT(). + SendCoinsFromAccountToModule(gomock.Any(), feePayer, types.ModuleName, types.DefaultBasePacketFee). + Return(nil) + err := tunnel.SetRoute(route) - require.NoError(t, err) + s.Require().NoError(err) // set params defaultParams := types.DefaultParams() err = k.SetParams(ctx, defaultParams) - require.NoError(t, err) + s.Require().NoError(err) // Set the tunnel k.SetTunnel(ctx, tunnel) err = k.ActivateTunnel(ctx, tunnelID) - require.NoError(t, err) + s.Require().NoError(err) k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ {SignalID: "BTC/USD", Price: 0}, }, 0)) - // Mock bankKeeper & FeedsKeeper - s.MockFeedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ - {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - }) - s.MockBankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) - s.MockBankKeeper.EXPECT(). - SendCoinsFromAccountToModule(gomock.Any(), feePayer, types.ModuleName, types.DefaultBasePacketFee). - Return(nil) - // Call the ProduceActiveTunnelPackets function k.ProduceActiveTunnelPackets(ctx) // Validate the tunnel is Inactive & no packet is Created newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) - require.NoError(t, err) - require.True(t, newTunnelInfo.IsActive) - require.Equal(t, newTunnelInfo.NonceCount, uint64(1)) + s.Require().NoError(err) + s.Require().True(newTunnelInfo.IsActive) + s.Require().Equal(newTunnelInfo.NonceCount, uint64(1)) activeTunnels := k.GetActiveTunnelIDs(ctx) - require.Equal(t, []uint64{1}, activeTunnels) + s.Require().Equal([]uint64{1}, activeTunnels) } -func TestProduceActiveTunnelPacketsNotEnoughMoney(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { + ctx, k := s.ctx, s.keeper // Define test data tunnelID := uint64(1) @@ -180,45 +171,44 @@ func TestProduceActiveTunnelPacketsNotEnoughMoney(t *testing.T) { DestinationChainID: "0x", DestinationContractAddress: "0x", } + + s.feedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ + {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + }) + s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer). + Return(sdk.Coins{sdk.NewInt64Coin("uband", 1)}) + err := tunnel.SetRoute(route) - require.NoError(t, err) + s.Require().NoError(err) // set params defaultParams := types.DefaultParams() err = k.SetParams(ctx, defaultParams) - require.NoError(t, err) + s.Require().NoError(err) // Set the tunnel k.SetTunnel(ctx, tunnel) err = k.ActivateTunnel(ctx, tunnelID) - require.NoError(t, err) + s.Require().NoError(err) k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ {SignalID: "BTC/USD", Price: 0}, }, 0)) - // Mock bankKeeper & FeedsKeeper - s.MockFeedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ - {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - }) - s.MockBankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer). - Return(sdk.Coins{sdk.NewInt64Coin("uband", 1)}) - // Call the ProduceActiveTunnelPackets function k.ProduceActiveTunnelPackets(ctx) // Validate the tunnel is Inactive & no packet is Created newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) - require.NoError(t, err) - require.False(t, newTunnelInfo.IsActive) - require.Equal(t, newTunnelInfo.NonceCount, uint64(0)) + s.Require().NoError(err) + s.Require().False(newTunnelInfo.IsActive) + s.Require().Equal(newTunnelInfo.NonceCount, uint64(0)) activeTunnels := k.GetActiveTunnelIDs(ctx) - require.Len(t, activeTunnels, 0) + s.Require().Len(activeTunnels, 0) } -func TestGenerateSignalPrices(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx := s.Ctx +func (s *KeeperTestSuite) TestGenerateSignalPrices() { + ctx := s.ctx // Define test data tunnelID := uint64(1) @@ -244,5 +234,5 @@ func TestGenerateSignalPrices(t *testing.T) { latestSignalPrices.SignalPrices, triggerAll, ) - require.Len(t, nsps, 1) + s.Require().Len(nsps, 1) } diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index 43d048ab8..ded97ecbf 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -1,19 +1,14 @@ package keeper_test import ( - "testing" "time" - "github.com/stretchr/testify/require" - bandtsstypes "github.com/bandprotocol/chain/v2/x/bandtss/types" - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestSendTSSPacket(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestSendTSSPacket() { + ctx, k := s.ctx, s.keeper // Create a sample TSSRoute route := types.TSSRoute{ @@ -32,12 +27,12 @@ func TestSendTSSPacket(t *testing.T) { // Send the TSS packet content, err := k.SendTSSPacket(ctx, &route, packet) - require.NoError(t, err) + s.Require().NoError(err) // Assert the packet content packetContent, ok := content.(*types.TSSPacketContent) - require.True(t, ok) - require.Equal(t, "chain-1", packetContent.DestinationChainID) - require.Equal(t, "0x1234567890abcdef", packetContent.DestinationContractAddress) - require.Equal(t, bandtsstypes.SigningID(1), packetContent.SigningID) + s.Require().True(ok) + s.Require().Equal("chain-1", packetContent.DestinationChainID) + s.Require().Equal("0x1234567890abcdef", packetContent.DestinationContractAddress) + s.Require().Equal(bandtsstypes.SigningID(1), packetContent.SigningID) } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index c10f79a29..35d1a58c6 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -1,20 +1,15 @@ package keeper_test import ( - "testing" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "github.com/bandprotocol/chain/v2/x/tunnel/testutil" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -func TestAddTunnel(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestAddTunnel() { + ctx, k := s.ctx, s.keeper // Define test data route := &codectypes.Any{} @@ -25,15 +20,15 @@ func TestAddTunnel(t *testing.T) { interval := uint64(10) creator := sdk.AccAddress([]byte("creator_address")).String() - s.MockAccountKeeper.EXPECT(). + s.accountKeeper.EXPECT(). GetAccount(ctx, gomock.Any()). Return(nil).Times(1) - s.MockAccountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) - s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) // Call the AddTunnel function tunnel, err := k.AddTunnel(ctx, route, types.ENCODER_FIXED_POINT_ABI, signalDeviations, interval, creator) - require.NoError(t, err) + s.Require().NoError(err) // Define the expected tunnel expectedTunnel := types.Tunnel{ @@ -59,21 +54,20 @@ func TestAddTunnel(t *testing.T) { } // Validate the results - require.Equal(t, expectedTunnel, *tunnel) + s.Require().Equal(expectedTunnel, *tunnel) // Check the tunnel count tunnelCount := k.GetTunnelCount(ctx) - require.Equal(t, uint64(1), tunnelCount) + s.Require().Equal(uint64(1), tunnelCount) // Check the latest signal prices latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnel.ID) - require.NoError(t, err) - require.Equal(t, expectedSignalPrices, latestSignalPrices) + s.Require().NoError(err) + s.Require().Equal(expectedSignalPrices, latestSignalPrices) } -func TestEditTunnel(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestEditTunnel() { + ctx, k := s.ctx, s.keeper // Define initial test data initialRoute := &codectypes.Any{} @@ -85,11 +79,11 @@ func TestEditTunnel(t *testing.T) { initialInterval := uint64(10) creator := sdk.AccAddress([]byte("creator_address")).String() - s.MockAccountKeeper.EXPECT(). + s.accountKeeper.EXPECT(). GetAccount(ctx, gomock.Any()). Return(nil).Times(1) - s.MockAccountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) - s.MockAccountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) // Add an initial tunnel initialTunnel, err := k.AddTunnel( @@ -100,7 +94,7 @@ func TestEditTunnel(t *testing.T) { initialInterval, creator, ) - require.NoError(t, err) + s.Require().NoError(err) // Define new test data for editing the tunnel newSignalDeviations := []types.SignalDeviation{ @@ -111,28 +105,27 @@ func TestEditTunnel(t *testing.T) { // Call the EditTunnel function err = k.EditTunnel(ctx, initialTunnel.ID, newSignalDeviations, newInterval) - require.NoError(t, err) + s.Require().NoError(err) // Validate the edited tunnel editedTunnel, err := k.GetTunnel(ctx, initialTunnel.ID) - require.NoError(t, err) - require.Equal(t, newSignalDeviations, editedTunnel.SignalDeviations) - require.Equal(t, newInterval, editedTunnel.Interval) + s.Require().NoError(err) + s.Require().Equal(newSignalDeviations, editedTunnel.SignalDeviations) + s.Require().Equal(newInterval, editedTunnel.Interval) // Check the latest signal prices latestSignalPrices, err := k.GetLatestSignalPrices(ctx, editedTunnel.ID) - require.NoError(t, err) - require.Equal(t, editedTunnel.ID, latestSignalPrices.TunnelID) - require.Len(t, latestSignalPrices.SignalPrices, len(newSignalDeviations)) + s.Require().NoError(err) + s.Require().Equal(editedTunnel.ID, latestSignalPrices.TunnelID) + s.Require().Len(latestSignalPrices.SignalPrices, len(newSignalDeviations)) for i, sp := range latestSignalPrices.SignalPrices { - require.Equal(t, newSignalDeviations[i].SignalID, sp.SignalID) - require.Equal(t, uint64(0), sp.Price) + s.Require().Equal(newSignalDeviations[i].SignalID, sp.SignalID) + s.Require().Equal(uint64(0), sp.Price) } } -func TestGetSetTunnel(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestGetSetTunnel() { + ctx, k := s.ctx, s.keeper // Create a new tunnel instance tunnel := types.Tunnel{ID: 1} @@ -144,15 +137,14 @@ func TestGetSetTunnel(t *testing.T) { retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) // Assert no error occurred during retrieval - require.NoError(s.T(), err, "retrieving tunnel should not produce an error") + s.Require().NoError(err, "retrieving tunnel should not produce an error") // Assert the retrieved tunnel matches the one we set - require.Equal(s.T(), tunnel, retrievedTunnel, "the retrieved tunnel should match the original") + s.Require().Equal(tunnel, retrievedTunnel, "the retrieved tunnel should match the original") } -func TestGetTunnels(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestGetTunnels() { + ctx, k := s.ctx, s.keeper // Create a new tunnel instance tunnel := types.Tunnel{ID: 1} @@ -164,12 +156,11 @@ func TestGetTunnels(t *testing.T) { tunnels := k.GetTunnels(ctx) // Assert the number of tunnels is 1 - require.Len(s.T(), tunnels, 1, "expected 1 tunnel to be retrieved") + s.Require().Len(tunnels, 1, "expected 1 tunnel to be retrieved") } -func TestGetSetTunnelCount(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestGetSetTunnelCount() { + ctx, k := s.ctx, s.keeper // Set a new tunnel count newCount := uint64(5) @@ -177,12 +168,11 @@ func TestGetSetTunnelCount(t *testing.T) { // Get the tunnel count and verify it retrievedCount := k.GetTunnelCount(ctx) - require.Equal(t, newCount, retrievedCount, "retrieved tunnel count should match the set value") + s.Require().Equal(newCount, retrievedCount, "retrieved tunnel count should match the set value") } -func TestGetActiveTunnelIDs(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestGetActiveTunnelIDs() { + ctx, k := s.ctx, s.keeper // Define active tunnel IDs activeTunnelIDs := []uint64{1, 2, 3} @@ -196,17 +186,11 @@ func TestGetActiveTunnelIDs(t *testing.T) { retrievedIDs := k.GetActiveTunnelIDs(ctx) // Validate the results - require.Equal( - t, - activeTunnelIDs, - retrievedIDs, - "retrieved active tunnel IDs should match the expected values", - ) + s.Require().Equal(activeTunnelIDs, retrievedIDs, "retrieved active tunnel IDs should match the expected values") } -func TestActivateTunnel(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestActivateTunnel() { + ctx, k := s.ctx, s.keeper // Define test data tunnelID := uint64(1) @@ -234,21 +218,20 @@ func TestActivateTunnel(t *testing.T) { // Call the ActivateTunnel function err := k.ActivateTunnel(ctx, tunnelID) - require.NoError(t, err) + s.Require().NoError(err) // Validate the tunnel is activated activatedTunnel, err := k.GetTunnel(ctx, tunnelID) - require.NoError(t, err) - require.True(t, activatedTunnel.IsActive, "tunnel should be active") + s.Require().NoError(err) + s.Require().True(activatedTunnel.IsActive, "tunnel should be active") // Validate the active tunnel ID is stored activeTunnelIDs := k.GetActiveTunnelIDs(ctx) - require.Contains(t, activeTunnelIDs, tunnelID, "active tunnel IDs should contain the activated tunnel ID") + s.Require().Contains(activeTunnelIDs, tunnelID, "active tunnel IDs should contain the activated tunnel ID") } -func TestDeactivateTunnel(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestDeactivateTunnel() { + ctx, k := s.ctx, s.keeper // Define test data tunnelID := uint64(1) @@ -276,21 +259,21 @@ func TestDeactivateTunnel(t *testing.T) { // Call the DeactivateTunnel function err := k.DeactivateTunnel(ctx, tunnelID) - require.NoError(t, err) + s.Require().NoError(err) // Validate the tunnel is deactivated deactivatedTunnel, err := k.GetTunnel(ctx, tunnelID) - require.NoError(t, err) - require.False(t, deactivatedTunnel.IsActive, "tunnel should be inactive") + s.Require().NoError(err) + s.Require().False(deactivatedTunnel.IsActive, "tunnel should be inactive") // Validate the active tunnel ID is removed activeTunnelIDs := k.GetActiveTunnelIDs(ctx) - require.NotContains(t, activeTunnelIDs, tunnelID, "active tunnel IDs should not contain the deactivated tunnel ID") + s.Require(). + NotContains(activeTunnelIDs, tunnelID, "active tunnel IDs should not contain the deactivated tunnel ID") } -func TestGetSetTotalFees(t *testing.T) { - s := testutil.NewTestSuite(t) - ctx, k := s.Ctx, s.Keeper +func (s *KeeperTestSuite) TestGetSetTotalFees() { + ctx, k := s.ctx, s.keeper totalFees := types.TotalFees{TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100)))} @@ -299,5 +282,5 @@ func TestGetSetTotalFees(t *testing.T) { // Get the total fees and verify it retrievedFees := k.GetTotalFees(ctx) - require.Equal(t, totalFees, retrievedFees, "retrieved total fees should match the set value") + s.Require().Equal(totalFees, retrievedFees, "retrieved total fees should match the set value") } diff --git a/x/tunnel/module.go b/x/tunnel/module.go index 5969a4aef..8e4b360de 100644 --- a/x/tunnel/module.go +++ b/x/tunnel/module.go @@ -64,7 +64,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } - return ValidateGenesis(&genState) + return keeper.ValidateGenesis(&genState) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the tunnel module. @@ -130,7 +130,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - InitGenesis(ctx, am.keeper, &genesisState) + keeper.InitGenesis(ctx, am.keeper, &genesisState) return []abci.ValidatorUpdate{} } @@ -138,7 +138,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. // ExportGenesis returns the exported genesis state as raw bytes for the tunnel // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(ExportGenesis(ctx, am.keeper)) + return cdc.MustMarshalJSON(keeper.ExportGenesis(ctx, am.keeper)) } // ConsensusVersion implements AppModule/ConsensusVersion. diff --git a/x/tunnel/testutil/mock_keeper.go b/x/tunnel/testutil/mock_keeper.go deleted file mode 100644 index ced606042..000000000 --- a/x/tunnel/testutil/mock_keeper.go +++ /dev/null @@ -1,77 +0,0 @@ -package testutil - -import ( - "testing" - "time" - - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/codec" - sdktestutil "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "go.uber.org/mock/gomock" - - "github.com/bandprotocol/chain/v2/x/tunnel" - "github.com/bandprotocol/chain/v2/x/tunnel/keeper" - "github.com/bandprotocol/chain/v2/x/tunnel/types" -) - -// TestSuite is a struct that embeds a *testing.T and provides a setup for a mock keeper -type TestSuite struct { - t *testing.T - Keeper *keeper.Keeper - QueryServer types.QueryServer - - MockAccountKeeper *MockAccountKeeper - MockBankKeeper *MockBankKeeper - MockFeedsKeeper *MockFeedsKeeper - MockBandtssKeeper *MockBandtssKeeper - - Ctx sdk.Context - Authority sdk.AccAddress -} - -// NewTestSuite returns a new TestSuite object -func NewTestSuite(t *testing.T) TestSuite { - ctrl := gomock.NewController(t) - key := sdk.NewKVStoreKey(types.StoreKey) - testCtx := sdktestutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) - encCfg := moduletestutil.MakeTestEncodingConfig(tunnel.AppModuleBasic{}) - ctx := testCtx.Ctx.WithBlockHeader(tmproto.Header{Time: time.Now().UTC()}) - - accountKeeper := NewMockAccountKeeper(ctrl) - bankKeeper := NewMockBankKeeper(ctrl) - feedsKeeper := NewMockFeedsKeeper(ctrl) - bandtssKeeper := NewMockBandtssKeeper(ctrl) - - authority := authtypes.NewModuleAddress(govtypes.ModuleName) - accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authority).AnyTimes() - tunnelKeeper := keeper.NewKeeper( - encCfg.Codec.(codec.BinaryCodec), - key, - accountKeeper, - bankKeeper, - feedsKeeper, - bandtssKeeper, - authority.String(), - ) - queryServer := keeper.NewQueryServer(tunnelKeeper) - - return TestSuite{ - t: t, - Keeper: tunnelKeeper, - QueryServer: queryServer, - MockAccountKeeper: accountKeeper, - MockBankKeeper: bankKeeper, - MockFeedsKeeper: feedsKeeper, - MockBandtssKeeper: bandtssKeeper, - Ctx: ctx, - Authority: authority, - } -} - -func (s *TestSuite) T() *testing.T { - return s.t -} diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 58ff98db1..79085f163 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -8,12 +8,12 @@ import ( var ( ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") - ErrIntervalTooShort = errorsmod.Register(ModuleName, 4, "interval too short") + ErrIntervalTooLow = errorsmod.Register(ModuleName, 4, "interval too low") ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 6, "signal prices info not found") ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") ErrNoPacketContent = errorsmod.Register(ModuleName, 8, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of tunnel") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of the tunnel") ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") From 73dcc3cfbe07cac093b4f6431a773da01855e5c4 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 19 Sep 2024 17:30:32 +0700 Subject: [PATCH 125/272] add edit tunnel cli --- x/tunnel/client/cli/tx.go | 47 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 398bf5325..6ab26c06c 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -32,7 +32,7 @@ func GetTxCmd() *cobra.Command { func GetTxCmdCreateTSSTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "create-tss-tunnel [encoder] [destination-chain-id] [destination-contract-address] [deposit] [signalDeviations-json-file]", + Use: "create-tss-tunnel [encoder] [destination-chain-id] [destination-contract-address] [deposit] [interval] [signalDeviations-json-file]", Short: "Create a new TSS tunnel", Args: cobra.ExactArgs(5), RunE: func(cmd *cobra.Command, args []string) error { @@ -51,12 +51,12 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - signalDeviations, err := parseSignalDeviations(args[4]) + interval, err := strconv.ParseUint(args[4], 10, 64) if err != nil { return err } - interval, err := strconv.ParseUint(args[0], 10, 64) + signalDeviations, err := parseSignalDeviations(args[5]) if err != nil { return err } @@ -83,6 +83,47 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return cmd } +func GetTxCmdEditTunnel() *cobra.Command { + cmd := &cobra.Command{ + Use: "edit-tunnel [tunnel-id] [interval] [signalDeviations-json-file] ", + Short: "Edit an existing tunnel", + Args: cobra.ExactArgs(4), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + interval, err := strconv.ParseUint(args[1], 10, 64) + if err != nil { + return err + } + + signalDeviations, err := parseSignalDeviations(args[2]) + if err != nil { + return err + } + + msg := types.NewMsgEditTunnel( + id, + signalDeviations.ToSignalDeviations(), + interval, + clientCtx.GetFromAddress().String(), + ) + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + func GetTxCmdActivate() *cobra.Command { cmd := &cobra.Command{ Use: "activate [tunnel-id]", From 0507332b872b832020406d8323e58e75ca0f9a9b Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 19 Sep 2024 17:34:27 +0700 Subject: [PATCH 126/272] update script --- scripts/tunnel/create_tunnel.sh | 2 +- x/tunnel/client/cli/tx.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/tunnel/create_tunnel.sh b/scripts/tunnel/create_tunnel.sh index b4b985013..26c50342a 100644 --- a/scripts/tunnel/create_tunnel.sh +++ b/scripts/tunnel/create_tunnel.sh @@ -1 +1 @@ -bandd tx tunnel create-tss-tunnel 1 evm-1 0x0001 1band ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain +bandd tx tunnel create-tss-tunnel 1 evm-1 0x0001 1band 10 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 6ab26c06c..b57a834e3 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -34,7 +34,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { cmd := &cobra.Command{ Use: "create-tss-tunnel [encoder] [destination-chain-id] [destination-contract-address] [deposit] [interval] [signalDeviations-json-file]", Short: "Create a new TSS tunnel", - Args: cobra.ExactArgs(5), + Args: cobra.ExactArgs(6), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { @@ -87,7 +87,7 @@ func GetTxCmdEditTunnel() *cobra.Command { cmd := &cobra.Command{ Use: "edit-tunnel [tunnel-id] [interval] [signalDeviations-json-file] ", Short: "Edit an existing tunnel", - Args: cobra.ExactArgs(4), + Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { From 4910e4b3bd66032fe4c58ee721a287423c52ede6 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 14:40:56 +0700 Subject: [PATCH 127/272] add edit cli --- x/tunnel/client/cli/tx.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index b57a834e3..4a781ea73 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -23,6 +23,7 @@ func GetTxCmd() *cobra.Command { } txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) + txCmd.AddCommand(GetTxCmdEditTunnel()) txCmd.AddCommand(GetTxCmdActivate()) txCmd.AddCommand(GetTxCmdDeactivate()) txCmd.AddCommand(GetTxCmdTriggerTunnel()) From 2288d11ed8933d361ae6d1fb330947b7711890ba Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 14:52:46 +0700 Subject: [PATCH 128/272] clean up --- x/tunnel/keeper/msg_server_test.go | 9 +++---- x/tunnel/keeper/packet.go | 38 +++++++++++++++--------------- x/tunnel/types/expected_keepers.go | 1 - 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index eebd45979..68bc797a1 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -18,9 +18,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { preRun: func() (*types.MsgCreateTunnel, error) { params := types.DefaultParams() params.MaxSignals = 1 - if err := s.keeper.SetParams(s.ctx, params); err != nil { - return nil, err - } + s.Require().NoError(s.keeper.SetParams(s.ctx, params)) signalDeviations := []types.SignalDeviation{ { @@ -55,9 +53,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { preRun: func() (*types.MsgCreateTunnel, error) { params := types.DefaultParams() params.MinInterval = 5 - if err := s.keeper.SetParams(s.ctx, params); err != nil { - return nil, err - } + s.Require().NoError(s.keeper.SetParams(s.ctx, params)) signalDeviations := []types.SignalDeviation{ { @@ -121,6 +117,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { s.Run(name, func() { msg, err := tc.preRun() s.Require().NoError(err) + res, err := s.msgServer.CreateTunnel(s.ctx, msg) if tc.expErr { s.Require().Error(err) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index d9435e11b..203855ba7 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -19,7 +19,7 @@ func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) er return err } - // update total fees + // Update total fees totalFees := k.GetTotalFees(ctx) totalFees.TotalPacketFee = totalFees.TotalPacketFee.Add(basePacketFee...) k.SetTotalFees(ctx, totalFees) @@ -55,19 +55,19 @@ func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) ty // ProduceActiveTunnelPackets generates packets and sends packets to the destination route for all active tunnels func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { - // get active tunnel IDs + // Get active tunnel IDs ids := k.GetActiveTunnelIDs(ctx) currentPrices := k.feedsKeeper.GetCurrentPrices(ctx) currentPricesMap := createCurrentPricesMap(currentPrices) - // check for active tunnels + // Check for active tunnels for _, id := range ids { tunnel := k.MustGetTunnel(ctx, id) balances := k.bankKeeper.SpendableCoins(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) basePacketFee := k.GetParams(ctx).BasePacketFee - // deactivate tunnel if the fee payer does not have enough balance. + // Deactivate tunnel if the fee payer does not have enough balance. if !balances.IsAllGTE(basePacketFee) { k.MustDeactivateTunnel(ctx, id) continue @@ -77,7 +77,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { return k.ProducePacket(ctx, id, currentPricesMap, false) } - // produce a packet. If error, emits an event. + // Produce a packet. If error, emits an event. if err := ctxcache.ApplyFuncIfNoError(ctx, producePacketFunc); err != nil { ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeProducePacketFail, @@ -97,14 +97,14 @@ func (k Keeper) ProducePacket( ) error { unixNow := ctx.BlockTime().Unix() - // get tunnel and signal prices info + // Get tunnel and signal prices info tunnel := k.MustGetTunnel(ctx, tunnelID) latestSignalPrices := k.MustGetLatestSignalPrices(ctx, tunnelID) - // check if the interval has passed + // Check if the interval has passed intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+latestSignalPrices.Timestamp - // generate new signal prices + // Generate new signal prices nsps := GenerateSignalPrices( ctx, currentPricesMap, @@ -113,12 +113,12 @@ func (k Keeper) ProducePacket( triggerAll || intervalTrigger, ) - // return if no new signal prices + // Return if no new signal prices if len(nsps) == 0 { return nil } - // deduct base packet fee from the fee payer, + // Deduct base packet fee from the fee payer, feePayer := sdk.MustAccAddressFromBech32(tunnel.FeePayer) if err := k.DeductBasePacketFee(ctx, feePayer); err != nil { return sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) @@ -129,14 +129,14 @@ func (k Keeper) ProducePacket( return sdkerrors.Wrapf(err, "route %s failed to send packet", tunnel.Route.TypeUrl) } - // update signal prices info + // Update signal prices info latestSignalPrices.UpdateSignalPrices(nsps) if triggerAll || intervalTrigger { latestSignalPrices.Timestamp = unixNow } k.SetLatestSignalPrices(ctx, latestSignalPrices) - // update tunnel nonce count + // Update tunnel nonce count tunnel.NonceCount++ k.SetTunnel(ctx, tunnel) @@ -161,17 +161,17 @@ func (k Keeper) SendPacket( return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } - // return error if failed to send packet + // Return error if failed to send packet if err != nil { return err } - // set the packet content + // Set the packet content if err := packet.SetPacketContent(content); err != nil { panic(fmt.Sprintf("failed to set packet content: %s", err)) } - // set the packet in the store + // Set the packet in the store k.SetPacket(ctx, packet) return nil } @@ -192,14 +192,14 @@ func GenerateSignalPrices( continue } - // get signal info from signalDeviationMap + // Get signal info from signalDeviationMap signalDeviation, exists := signalDeviationMap[sp.SignalID] if !exists { - // panic if signal info not found for signal ID in the tunnel that should not happen + // Panic if signal info not found for signal ID in the tunnel that should not happen panic(fmt.Sprintf("signal info not found for signal ID: %s", sp.SignalID)) } - // if triggerAll is true or the deviation exceeds the threshold, add the signal price info to the list + // If triggerAll is true or the deviation exceeds the threshold, add the signal price info to the list if triggerAll || deviationExceedsThreshold( sdk.NewIntFromUint64(sp.Price), @@ -220,7 +220,7 @@ func GenerateSignalPrices( // deviationExceedsThreshold checks if the deviation between the old price and the new price exceeds the threshold func deviationExceedsThreshold(oldPrice, newPrice, thresholdBPS sdkmath.Int) bool { - // if the old price is zero, always add the signal price info to the list + // If the old price is zero, always add the signal price info to the list if oldPrice.IsZero() { return true } diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 80a29b00d..fa8c13316 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -15,7 +15,6 @@ type AccountKeeper interface { GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI SetModuleAccount(sdk.Context, authtypes.ModuleAccountI) - IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool)) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI NewAccount(ctx sdk.Context, account authtypes.AccountI) authtypes.AccountI SetAccount(ctx sdk.Context, account authtypes.AccountI) From 12985b0da88c0488e7d9cccbb7b9acb995fc3ccc Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 15:09:02 +0700 Subject: [PATCH 129/272] add test and update deposit --- x/tunnel/keeper/msg_server.go | 7 +++++-- x/tunnel/keeper/msg_server_test.go | 32 ++++++++++++++++++++++++++++++ x/tunnel/types/events.go | 1 + 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 5ab2bf0c8..54708f37c 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -56,8 +56,10 @@ func (ms msgServer) CreateTunnel( } // Deposit the initial deposit to the tunnel - if err := ms.Keeper.AddDeposit(ctx, tunnel.ID, creator, req.InitialDeposit); err != nil { - return nil, err + if req.InitialDeposit.IsAllPositive() { + if err := ms.Keeper.AddDeposit(ctx, tunnel.ID, creator, req.InitialDeposit); err != nil { + return nil, err + } } // Emit an event @@ -67,6 +69,7 @@ func (ms msgServer) CreateTunnel( sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), sdk.NewAttribute(types.AttributeKeyRoute, tunnel.Route.String()), sdk.NewAttribute(types.AttributeKeyEncoder, tunnel.Encoder.String()), + sdk.NewAttribute(types.AttributeKeyInitialDeposit, req.InitialDeposit.String()), sdk.NewAttribute(types.AttributeKeyFeePayer, tunnel.FeePayer), sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), sdk.NewAttribute(types.AttributeKeyCreatedAt, fmt.Sprintf("%d", tunnel.CreatedAt)), diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 4368342c8..d519136e4 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -79,6 +79,38 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { expErr: true, expErrMsg: "interval too low", }, + "all good without initial deposit": { + preRun: func() (*types.MsgCreateTunnel, error) { + s.accountKeeper.EXPECT(). + GetAccount(s.ctx, gomock.Any()). + Return(nil).Times(1) + s.accountKeeper.EXPECT().NewAccount(s.ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(s.ctx, gomock.Any()).Times(1) + + signalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 100, + HardDeviationBPS: 100, + }, + } + route := &types.TSSRoute{ + DestinationChainID: "chain-1", + DestinationContractAddress: "0x1234567890abcdef", + } + + return types.NewMsgCreateTunnel( + signalDeviations, + 10, + route, + types.ENCODER_FIXED_POINT_ABI, + sdk.NewCoins(), + sdk.AccAddress([]byte("creator_address")), + ) + }, + expErr: false, + expErrMsg: "", + }, "all good": { preRun: func() (*types.MsgCreateTunnel, error) { depositor := sdk.AccAddress([]byte("creator_address")) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index ba8b4e378..d4fcaec4b 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -15,6 +15,7 @@ const ( AttributeKeyInterval = "interval" AttributeKeyRoute = "route" AttributeKeyEncoder = "encoder" + AttributeKeyInitialDeposit = "initial_deposit" AttributeKeyFeePayer = "fee_payer" AttributeKeySignalPriceInfos = "signal_price_infos" AttributeKeyIsActive = "is_active" From 0b82e0612561c4a63643a7fb57f16e2779c4ee21 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 15:10:27 +0700 Subject: [PATCH 130/272] clean up test --- x/tunnel/keeper/msg_server_test.go | 58 +++++++++--------------------- 1 file changed, 17 insertions(+), 41 deletions(-) diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 68bc797a1..b70b10791 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -9,6 +9,23 @@ import ( ) func (s *KeeperTestSuite) TestMsgCreateTunnel() { + signalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 100, + HardDeviationBPS: 100, + }, + { + SignalID: "ETH", + SoftDeviationBPS: 100, + HardDeviationBPS: 100, + }, + } + route := &types.TSSRoute{ + DestinationChainID: "chain-1", + DestinationContractAddress: "0x1234567890abcdef", + } + cases := map[string]struct { preRun func() (*types.MsgCreateTunnel, error) expErr bool @@ -20,23 +37,6 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { params.MaxSignals = 1 s.Require().NoError(s.keeper.SetParams(s.ctx, params)) - signalDeviations := []types.SignalDeviation{ - { - SignalID: "BTC", - SoftDeviationBPS: 100, - HardDeviationBPS: 100, - }, - { - SignalID: "ETH", - SoftDeviationBPS: 100, - HardDeviationBPS: 100, - }, - } - route := &types.TSSRoute{ - DestinationChainID: "chain-1", - DestinationContractAddress: "0x1234567890abcdef", - } - return types.NewMsgCreateTunnel( signalDeviations, 10, @@ -55,18 +55,6 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { params.MinInterval = 5 s.Require().NoError(s.keeper.SetParams(s.ctx, params)) - signalDeviations := []types.SignalDeviation{ - { - SignalID: "BTC", - SoftDeviationBPS: 100, - HardDeviationBPS: 100, - }, - } - route := &types.TSSRoute{ - DestinationChainID: "chain-1", - DestinationContractAddress: "0x1234567890abcdef", - } - return types.NewMsgCreateTunnel( signalDeviations, 1, @@ -87,18 +75,6 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { s.accountKeeper.EXPECT().NewAccount(s.ctx, gomock.Any()).Times(1) s.accountKeeper.EXPECT().SetAccount(s.ctx, gomock.Any()).Times(1) - signalDeviations := []types.SignalDeviation{ - { - SignalID: "BTC", - SoftDeviationBPS: 100, - HardDeviationBPS: 100, - }, - } - route := &types.TSSRoute{ - DestinationChainID: "chain-1", - DestinationContractAddress: "0x1234567890abcdef", - } - return types.NewMsgCreateTunnel( signalDeviations, 10, From f17be17913147287207dca8a590f65ab08373b08 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 15:12:13 +0700 Subject: [PATCH 131/272] update mock gen --- x/tunnel/testutil/mock_expected_keepers.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go index cd480e019..45bb465f1 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -85,18 +85,6 @@ func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) } -// IterateAccounts mocks base method. -func (m *MockAccountKeeper) IterateAccounts(ctx types2.Context, process func(types3.AccountI) bool) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "IterateAccounts", ctx, process) -} - -// IterateAccounts indicates an expected call of IterateAccounts. -func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, process any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IterateAccounts", reflect.TypeOf((*MockAccountKeeper)(nil).IterateAccounts), ctx, process) -} - // NewAccount mocks base method. func (m *MockAccountKeeper) NewAccount(ctx types2.Context, account types3.AccountI) types3.AccountI { m.ctrl.T.Helper() From 9aae6c52c26152e845ace90d3dc2314463582b66 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 15:13:35 +0700 Subject: [PATCH 132/272] clean up --- x/tunnel/keeper/msg_server_test.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 7f9924dce..53a1c1970 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -101,18 +101,6 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { SendCoinsFromAccountToModule(s.ctx, depositor, types.ModuleName, depositAmount). Return(nil).Times(1) - signalDeviations := []types.SignalDeviation{ - { - SignalID: "BTC", - SoftDeviationBPS: 100, - HardDeviationBPS: 100, - }, - } - route := &types.TSSRoute{ - DestinationChainID: "chain-1", - DestinationContractAddress: "0x1234567890abcdef", - } - return types.NewMsgCreateTunnel( signalDeviations, 10, From d3f0c50f5193f156ece23601d6f47f2b6519ef2d Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 16:00:38 +0700 Subject: [PATCH 133/272] add sub command --- scripts/tunnel/create_tunnel.sh | 2 +- x/tunnel/client/cli/tx.go | 27 +++++++++++++++++++++------ x/tunnel/types/msgs.go | 4 ++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/scripts/tunnel/create_tunnel.sh b/scripts/tunnel/create_tunnel.sh index 26c50342a..d967fa737 100644 --- a/scripts/tunnel/create_tunnel.sh +++ b/scripts/tunnel/create_tunnel.sh @@ -1 +1 @@ -bandd tx tunnel create-tss-tunnel 1 evm-1 0x0001 1band 10 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain +bandd tx tunnel create tss evm-1 0x0001 1 1band 10 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 4a781ea73..4609b522b 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -22,7 +22,7 @@ func GetTxCmd() *cobra.Command { RunE: client.ValidateCmd, } - txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) + txCmd.AddCommand(GetTxCmdCreateTunnels()) txCmd.AddCommand(GetTxCmdEditTunnel()) txCmd.AddCommand(GetTxCmdActivate()) txCmd.AddCommand(GetTxCmdDeactivate()) @@ -31,9 +31,24 @@ func GetTxCmd() *cobra.Command { return txCmd } +func GetTxCmdCreateTunnels() *cobra.Command { + txCmd := &cobra.Command{ + Use: "create", + Short: "Create a new tunnel", + DisableFlagParsing: true, + RunE: client.ValidateCmd, + } + + txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) + + flags.AddTxFlagsToCmd(txCmd) + + return txCmd +} + func GetTxCmdCreateTSSTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "create-tss-tunnel [encoder] [destination-chain-id] [destination-contract-address] [deposit] [interval] [signalDeviations-json-file]", + Use: "tss [destination-chain-id] [destination-contract-address] [encoder] [deposit] [interval] [signalDeviations-json-file]", Short: "Create a new TSS tunnel", Args: cobra.ExactArgs(6), RunE: func(cmd *cobra.Command, args []string) error { @@ -42,7 +57,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - encoder, err := strconv.ParseInt(args[0], 10, 32) + encoder, err := strconv.ParseInt(args[2], 10, 32) if err != nil { return err } @@ -65,9 +80,9 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { msg, err := types.NewMsgCreateTSSTunnel( signalDeviations.ToSignalDeviations(), interval, - types.Encoder(encoder), + args[0], args[1], - args[2], + types.Encoder(encoder), deposit, clientCtx.GetFromAddress(), ) @@ -86,7 +101,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { func GetTxCmdEditTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "edit-tunnel [tunnel-id] [interval] [signalDeviations-json-file] ", + Use: "edit [tunnel-id] [interval] [signalDeviations-json-file] ", Short: "Edit an existing tunnel", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 680ba8ea7..14b16158b 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -46,9 +46,9 @@ func NewMsgCreateTunnel( func NewMsgCreateTSSTunnel( signalDeviations []SignalDeviation, interval uint64, - encoder Encoder, destinationChainID string, destinationContractAddress string, + encoder Encoder, deposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { @@ -68,9 +68,9 @@ func NewMsgCreateTSSTunnel( func NewMsgCreateAxelarTunnel( signalDeviations []SignalDeviation, interval uint64, - encoder Encoder, destinationChainID string, destinationContractAddress string, + encoder Encoder, deposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { From 4e8f6657ef118ee8bce48b57a5f090f8e27065f6 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 16:06:48 +0700 Subject: [PATCH 134/272] change to InitialDeposit --- proto/tunnel/v1beta1/tx.proto | 4 +- x/tunnel/client/cli/tx.go | 6 +- x/tunnel/types/msgs.go | 24 +++---- x/tunnel/types/tx.pb.go | 132 +++++++++++++++++----------------- 4 files changed, 83 insertions(+), 83 deletions(-) diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 5dbe47c1a..e36bdf3f9 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -47,8 +47,8 @@ message MsgCreateTunnel { google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; // encoder is the mode of encoding price signal data. Encoder encoder = 4; - // deposit is the deposit required to create a tunnel. - repeated cosmos.base.v1beta1.Coin deposit = 5 + // initial_deposit is the deposit value that must be paid at tunnel creation. + repeated cosmos.base.v1beta1.Coin initial_deposit = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // creator is the address of the creator. string creator = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 4609b522b..e1b3b88c7 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -48,7 +48,7 @@ func GetTxCmdCreateTunnels() *cobra.Command { func GetTxCmdCreateTSSTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "tss [destination-chain-id] [destination-contract-address] [encoder] [deposit] [interval] [signalDeviations-json-file]", + Use: "tss [destination-chain-id] [destination-contract-address] [encoder] [initial-deposit] [interval] [signalDeviations-json-file]", Short: "Create a new TSS tunnel", Args: cobra.ExactArgs(6), RunE: func(cmd *cobra.Command, args []string) error { @@ -62,7 +62,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return err } - deposit, err := sdk.ParseCoinsNormalized(args[3]) + initialDeposit, err := sdk.ParseCoinsNormalized(args[3]) if err != nil { return err } @@ -83,7 +83,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { args[0], args[1], types.Encoder(encoder), - deposit, + initialDeposit, clientCtx.GetFromAddress(), ) if err != nil { diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 14b16158b..965165aa5 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -20,7 +20,7 @@ func NewMsgCreateTunnel( interval uint64, route RouteI, encoder Encoder, - deposit sdk.Coins, + initialDeposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { msg, ok := route.(proto.Message) @@ -37,7 +37,7 @@ func NewMsgCreateTunnel( Interval: interval, Route: any, Encoder: encoder, - Deposit: deposit, + InitialDeposit: initialDeposit, Creator: creator.String(), }, nil } @@ -49,14 +49,14 @@ func NewMsgCreateTSSTunnel( destinationChainID string, destinationContractAddress string, encoder Encoder, - deposit sdk.Coins, + initialDeposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { r := &TSSRoute{ DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } - m, err := NewMsgCreateTunnel(signalDeviations, interval, r, encoder, deposit, creator) + m, err := NewMsgCreateTunnel(signalDeviations, interval, r, encoder, initialDeposit, creator) if err != nil { return nil, err } @@ -71,14 +71,14 @@ func NewMsgCreateAxelarTunnel( destinationChainID string, destinationContractAddress string, encoder Encoder, - deposit sdk.Coins, + initialDeposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { r := &TSSRoute{ DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } - m, err := NewMsgCreateTunnel(signalDeviations, interval, r, encoder, deposit, creator) + m, err := NewMsgCreateTunnel(signalDeviations, interval, r, encoder, initialDeposit, creator) if err != nil { return nil, err } @@ -101,17 +101,17 @@ func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { - // creator address must be valid + // Creator address must be valid if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - // signal deviations cannot be empty + // Signal deviations cannot be empty if len(m.SignalDeviations) == 0 { return sdkerrors.ErrInvalidRequest.Wrapf("signal deviations cannot be empty") } - // route must be valid + // Route must be valid r, ok := m.Route.GetCachedValue().(RouteI) if !ok { return sdkerrors.ErrPackAny.Wrapf("cannot unpack route") @@ -120,9 +120,9 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } - // deposit must be valid - if !m.Deposit.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf("invalid deposit: %s", m.Deposit) + // InitialDeposit must be valid + if !m.InitialDeposit.IsValid() { + return sdkerrors.ErrInvalidCoins.Wrapf("invalid deposit: %s", m.InitialDeposit) } err := validateUniqueSignalIDs(m.SignalDeviations) diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 52919f0c3..529674461 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -44,8 +44,8 @@ type MsgCreateTunnel struct { Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` - // deposit is the deposit required to create a tunnel. - Deposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"` + // initial_deposit is the deposit value that must be paid at tunnel creation. + InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit"` // creator is the address of the creator. Creator string `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` } @@ -111,9 +111,9 @@ func (m *MsgCreateTunnel) GetEncoder() Encoder { return ENCODER_UNSPECIFIED } -func (m *MsgCreateTunnel) GetDeposit() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgCreateTunnel) GetInitialDeposit() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Deposit + return m.InitialDeposit } return nil } @@ -666,60 +666,60 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 839 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, - 0x14, 0x16, 0x25, 0xd9, 0x96, 0x4e, 0x4e, 0x9a, 0xb0, 0x4a, 0x44, 0x31, 0xa8, 0x24, 0x30, 0x08, - 0xc2, 0x04, 0x30, 0x59, 0xa9, 0x3f, 0x86, 0x6c, 0x56, 0x94, 0xc1, 0x40, 0x05, 0x14, 0x4c, 0x0a, - 0x04, 0xed, 0x60, 0x9c, 0xc8, 0x2b, 0x7d, 0xa8, 0xc4, 0x13, 0x78, 0x27, 0x21, 0x5a, 0x0b, 0x74, - 0x29, 0x3a, 0xb4, 0x43, 0xa7, 0xfe, 0x07, 0x59, 0x9a, 0xc1, 0x7f, 0x84, 0xd1, 0xc9, 0xe8, 0xd4, - 0xc9, 0x2d, 0xe4, 0xc1, 0xff, 0x46, 0xc1, 0xe3, 0xf1, 0xa7, 0x59, 0xd9, 0x2e, 0x8a, 0x2e, 0x96, - 0xee, 0xbe, 0xef, 0x9d, 0xbf, 0xf7, 0xbd, 0x77, 0xef, 0x04, 0x5a, 0x6c, 0xe1, 0x79, 0x68, 0x6a, - 0x2e, 0xfb, 0x13, 0xc4, 0x60, 0xdf, 0x64, 0x6f, 0x8c, 0xb9, 0x4f, 0x18, 0x91, 0x6f, 0x87, 0x80, - 0x21, 0x00, 0xb5, 0xed, 0x12, 0xe2, 0x4e, 0x91, 0xc9, 0xd1, 0xc9, 0xe2, 0x6b, 0x13, 0x7a, 0xab, - 0x90, 0xaa, 0x36, 0x5d, 0xe2, 0x12, 0xfe, 0xd5, 0x0c, 0xbe, 0x89, 0xdd, 0x07, 0xb9, 0x93, 0xe7, - 0xd0, 0x87, 0x33, 0x2a, 0xc0, 0xb6, 0x4d, 0xe8, 0x8c, 0xd0, 0xc3, 0x30, 0x2a, 0x5c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, - 0x12, 0x81, 0xea, 0xc3, 0x0d, 0x60, 0x5a, 0x61, 0xea, 0xca, 0x14, 0x29, 0x4c, 0xe0, 0x42, 0x85, - 0x97, 0x3b, 0x5b, 0xfe, 0x0a, 0xdc, 0xca, 0x76, 0x75, 0xaf, 0x20, 0x2e, 0xc3, 0x50, 0xf5, 0xab, - 0x18, 0xf1, 0xe1, 0xaf, 0xc1, 0x6e, 0xa6, 0xf1, 0x8a, 0x8a, 0x95, 0x26, 0x14, 0x16, 0xab, 0xa8, - 0x1d, 0x86, 0x07, 0x27, 0xeb, 0x8e, 0x74, 0xba, 0xee, 0x48, 0x7f, 0xad, 0x3b, 0xd2, 0x8f, 0xe7, - 0x9d, 0xd2, 0xe9, 0x79, 0xa7, 0xf4, 0xc7, 0x79, 0xa7, 0xf4, 0xa5, 0x99, 0x7a, 0xfd, 0x26, 0xd0, - 0x73, 0xf8, 0x9b, 0x6c, 0x93, 0xa9, 0x69, 0x1f, 0x41, 0xec, 0x99, 0xcb, 0x81, 0xf9, 0x46, 0xfc, - 0xa0, 0x08, 0x9f, 0xc2, 0xc9, 0x36, 0x67, 0x7c, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, - 0x7a, 0xf2, 0x55, 0x54, 0x09, 0x00, 0x00, + // 846 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbf, 0x8f, 0xdb, 0x36, + 0x14, 0x3e, 0xd9, 0xbe, 0x8b, 0x4d, 0x5f, 0x2e, 0x89, 0xea, 0xc4, 0xb2, 0x82, 0xda, 0x86, 0x82, + 0x20, 0x4a, 0x80, 0x93, 0x6a, 0xf7, 0xc7, 0x90, 0xed, 0x1c, 0x67, 0x38, 0xa0, 0x06, 0x0a, 0x25, + 0x05, 0x82, 0x76, 0x38, 0xd0, 0x12, 0xab, 0x23, 0x6a, 0x93, 0x86, 0x48, 0x1b, 0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0x95, 0x9f, 0xce, 0xba, 0x3b, 0xaf, 0xce, 0xba, 0x3b, 0x7f, 0x9e, 0x75, + 0x77, 0xbe, 0xb2, 0x33, 0x97, 0xe0, 0x14, 0x12, 0x4f, 0x5c, 0xd1, 0x2e, 0x9d, 0xd9, 0xee, 0x29, + 0xc4, 0xc4, 0x5e, 0x0d, 0xed, 0xa7, 0xf2, 0xff, 0x45, 0x74, 0x23, 0x4e, 0xf7, 0x04, 0xe3, 0xe3, + 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x37, 0xe6, 0x38, 0x63, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1021,10 +1021,10 @@ func (m *MsgCreateTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if len(m.Deposit) > 0 { - for iNdEx := len(m.Deposit) - 1; iNdEx >= 0; iNdEx-- { + if len(m.InitialDeposit) > 0 { + for iNdEx := len(m.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Deposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.InitialDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1449,8 +1449,8 @@ func (m *MsgCreateTunnel) Size() (n int) { if m.Encoder != 0 { n += 1 + sovTx(uint64(m.Encoder)) } - if len(m.Deposit) > 0 { - for _, e := range m.Deposit { + if len(m.InitialDeposit) > 0 { + for _, e := range m.InitialDeposit { l = e.Size() n += 1 + l + sovTx(uint64(l)) } @@ -1752,7 +1752,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { } case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1779,8 +1779,8 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Deposit = append(m.Deposit, types1.Coin{}) - if err := m.Deposit[len(m.Deposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.InitialDeposit = append(m.InitialDeposit, types1.Coin{}) + if err := m.InitialDeposit[len(m.InitialDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From 0c4e6080aa8a90c5c78cfc4d35c4f65d73299cb8 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 16:16:27 +0700 Subject: [PATCH 135/272] update init deposit --- proto/tunnel/v1beta1/tx.proto | 7 ++- x/tunnel/types/tx.pb.go | 109 +++++++++++++++++----------------- 2 files changed, 60 insertions(+), 56 deletions(-) diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index e36bdf3f9..34e47b1f2 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -48,8 +48,11 @@ message MsgCreateTunnel { // encoder is the mode of encoding price signal data. Encoder encoder = 4; // initial_deposit is the deposit value that must be paid at tunnel creation. - repeated cosmos.base.v1beta1.Coin initial_deposit = 5 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin initial_deposit = 5 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; // creator is the address of the creator. string creator = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 529674461..ad3adda7f 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -666,60 +666,61 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 846 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbf, 0x8f, 0xdb, 0x36, - 0x14, 0x3e, 0xd9, 0xbe, 0x8b, 0x4d, 0x5f, 0x2e, 0x89, 0xea, 0xc4, 0xb2, 0x82, 0xda, 0x86, 0x82, - 0x20, 0x4a, 0x80, 0x93, 0x6a, 0xf7, 0xc7, 0x90, 0xed, 0x1c, 0x67, 0x38, 0xa0, 0x06, 0x0a, 0x25, - 0x05, 0x82, 0x76, 0x38, 0xd0, 0x12, 0xab, 0x23, 0x6a, 0x93, 0x86, 0x48, 0x1b, 0xf1, 0x5a, 0xa0, - 0x4b, 0xd1, 0xa1, 0x1d, 0x3a, 0xf5, 0x3f, 0xc8, 0x94, 0x21, 0x73, 0xe7, 0xa0, 0x53, 0xd0, 0xa9, - 0x53, 0x5a, 0xf8, 0x86, 0xfc, 0x1b, 0x85, 0x28, 0xea, 0x67, 0x54, 0xe7, 0xae, 0x28, 0xb2, 0x58, - 0x22, 0xbf, 0xef, 0x51, 0xdf, 0xfb, 0xf8, 0xf8, 0x68, 0xd0, 0xe6, 0x4b, 0x42, 0xd0, 0xcc, 0x5e, - 0x0d, 0xa6, 0x88, 0xc3, 0x81, 0xcd, 0x9f, 0x5a, 0x8b, 0x80, 0x72, 0xaa, 0x1e, 0x44, 0x80, 0x25, - 0x01, 0xbd, 0xe3, 0x53, 0xea, 0xcf, 0x90, 0x2d, 0xd0, 0xe9, 0xf2, 0x1b, 0x1b, 0x92, 0x75, 0x44, - 0xd5, 0x5b, 0x3e, 0xf5, 0xa9, 0x78, 0xb5, 0xc3, 0x37, 0x39, 0x7b, 0xb3, 0xb0, 0xf2, 0x02, 0x06, - 0x70, 0xce, 0x24, 0xd8, 0x71, 0x29, 0x9b, 0x53, 0x76, 0x12, 0x45, 0x45, 0x03, 0x09, 0x75, 0xa3, - 0x91, 0x3d, 0x85, 0x0c, 0x25,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0x90, 0x18, 0xd4, 0x6f, 0x6d, 0x01, 0xb3, 0x0a, 0x33, 0x47, - 0xa6, 0x4c, 0x61, 0x0a, 0x97, 0x2a, 0x7c, 0xbb, 0xb2, 0xd5, 0xaf, 0xc1, 0xe5, 0x7c, 0x55, 0xf7, - 0x4b, 0xe2, 0x72, 0x0c, 0xdd, 0x7c, 0x17, 0x23, 0x59, 0xfc, 0x09, 0xd8, 0xcf, 0x15, 0x5e, 0xd9, - 0x66, 0x65, 0x09, 0xa5, 0x9b, 0x55, 0x56, 0x0e, 0xa3, 0xe3, 0x97, 0x9b, 0xae, 0xf2, 0x6a, 0xd3, - 0x55, 0xfe, 0xde, 0x74, 0x95, 0x9f, 0xce, 0xba, 0x3b, 0xaf, 0xce, 0xba, 0x3b, 0x7f, 0x9e, 0x75, - 0x77, 0xbe, 0xb2, 0x33, 0x97, 0xe0, 0x14, 0x12, 0x4f, 0x5c, 0xd1, 0x2e, 0x9d, 0xd9, 0xee, 0x29, - 0xc4, 0xc4, 0x5e, 0x0d, 0xed, 0xa7, 0xf2, 0xff, 0x45, 0x74, 0x23, 0x4e, 0xf7, 0x04, 0xe3, 0xe3, - 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x37, 0xe6, 0x38, 0x63, 0x09, 0x00, 0x00, + // 853 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, + 0x14, 0x36, 0x2d, 0xd9, 0x91, 0x4e, 0x8e, 0x93, 0xb0, 0x4a, 0x44, 0x31, 0xa8, 0x24, 0x30, 0x08, + 0xc2, 0x18, 0x30, 0x09, 0xa9, 0x4d, 0x87, 0x6c, 0x56, 0x94, 0xc1, 0x40, 0x05, 0x14, 0x4c, 0x0a, + 0x04, 0xed, 0x60, 0x9c, 0xc8, 0x2b, 0x7d, 0xa8, 0x74, 0x27, 0xf0, 0x4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b, 0x75, 0x47, 0xf9, 0x6b, 0xdd, 0x51, 0x7e, 0x38, 0xef, 0x6c, + 0xbd, 0x3e, 0xef, 0x6c, 0xfd, 0x71, 0xde, 0xd9, 0xfa, 0xc2, 0xce, 0xdc, 0x84, 0x13, 0x48, 0x3c, + 0x71, 0x4f, 0xbb, 0x74, 0x6a, 0xbb, 0xa7, 0x10, 0x13, 0x7b, 0x39, 0xb0, 0x9f, 0xcb, 0x3f, 0x19, + 0xd1, 0xb5, 0x38, 0xd9, 0x15, 0x8c, 0x8f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x59, 0xac, 0x28, + 0x86, 0x68, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From effcbee2616f3ba880e0ffe217916ef0915a7383 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 16:17:55 +0700 Subject: [PATCH 136/272] update msg --- x/tunnel/types/msgs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 965165aa5..636dfa83c 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -122,7 +122,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { // InitialDeposit must be valid if !m.InitialDeposit.IsValid() { - return sdkerrors.ErrInvalidCoins.Wrapf("invalid deposit: %s", m.InitialDeposit) + return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) } err := validateUniqueSignalIDs(m.SignalDeviations) From 3babd85020abd9943051667a358068140069207a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 16:19:04 +0700 Subject: [PATCH 137/272] update comment --- x/tunnel/types/msgs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 636dfa83c..fc0b12dd3 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -120,7 +120,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } - // InitialDeposit must be valid + // initialDeposit deposit must be positive if !m.InitialDeposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) } From e32b1bfea4238bacf0f76589849c681b5e3df664 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 16:19:26 +0700 Subject: [PATCH 138/272] update comment --- x/tunnel/types/msgs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index fc0b12dd3..1ed8f47ec 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -120,7 +120,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } - // initialDeposit deposit must be positive + // InitialDeposit deposit must be positive if !m.InitialDeposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) } From 1a6607fe946725b8a8d57accc94aa9a5bff71a2e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 17:11:09 +0700 Subject: [PATCH 139/272] update comment --- x/tunnel/client/cli/util_test.go | 7 +- x/tunnel/keeper/account.go | 2 +- x/tunnel/keeper/grpc_query.go | 1 - x/tunnel/keeper/grpc_query_test.go | 7 -- x/tunnel/keeper/latest_signal_prices_test.go | 6 - x/tunnel/keeper/msg_server.go | 4 +- x/tunnel/keeper/packet.go | 36 +++--- x/tunnel/keeper/packet_test.go | 29 +---- x/tunnel/keeper/tss_packet_test.go | 5 - x/tunnel/keeper/tunnel.go | 24 ++-- x/tunnel/keeper/tunnel_test.go | 112 +++++++------------ x/tunnel/types/msgs.go | 8 +- x/tunnel/types/params.go | 8 +- 13 files changed, 83 insertions(+), 166 deletions(-) diff --git a/x/tunnel/client/cli/util_test.go b/x/tunnel/client/cli/util_test.go index 3491f7b2a..6cbfdbab7 100644 --- a/x/tunnel/client/cli/util_test.go +++ b/x/tunnel/client/cli/util_test.go @@ -9,9 +9,8 @@ import ( ) func TestParseSignalDeviations(t *testing.T) { - // Test case for valid signal deviation + // test case for valid signal deviations t.Run("valid signal deviations", func(t *testing.T) { - // Setup signalDeviations := []SignalDeviation{ {SignalID: "BTC", DeviationBPS: 2000}, {SignalID: "ETH", DeviationBPS: 4000}, @@ -19,15 +18,13 @@ func TestParseSignalDeviations(t *testing.T) { file, cleanup := createTempSignalDeviationFile(signalDeviations) defer cleanup() - // Execute result, err := parseSignalDeviations(file) - // Verify require.NoError(t, err) require.Equal(t, signalDeviations, result.SignalDeviations) }) - // Test case for empty file path + // test case for empty file path t.Run("empty file path", func(t *testing.T) { result, err := parseSignalDeviations("") diff --git a/x/tunnel/keeper/account.go b/x/tunnel/keeper/account.go index 1b109c017..de5cde510 100644 --- a/x/tunnel/keeper/account.go +++ b/x/tunnel/keeper/account.go @@ -21,7 +21,7 @@ func (k Keeper) GenerateAccount(ctx sdk.Context, key string) (sdk.AccAddress, er tunnelAccAddr := sdk.AccAddress(moduleCred.Address()) - // This should not happen + // this should not happen if acc := k.authKeeper.GetAccount(ctx, tunnelAccAddr); acc != nil { return nil, types.ErrAccountAlreadyExist.Wrapf( "existing account for newly generated key account address %s", diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 873e9dda6..c88fb1b0f 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -30,7 +30,6 @@ func (q queryServer) Tunnels(c context.Context, req *types.QueryTunnelsRequest) store, req.Pagination, func(key []byte, t *types.Tunnel) (*types.Tunnel, error) { - // Filter by status switch req.StatusFilter { case types.TUNNEL_STATUS_FILTER_UNSPECIFIED: return t, nil diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index 54232c046..f0b9e0a07 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -7,7 +7,6 @@ import ( func (s *KeeperTestSuite) TestGRPCQueryTunnels() { ctx, k, q := s.ctx, s.keeper, s.queryServer - // Set tunnels tunnel1 := types.Tunnel{ ID: 1, } @@ -17,7 +16,6 @@ func (s *KeeperTestSuite) TestGRPCQueryTunnels() { k.SetTunnel(ctx, tunnel1) k.SetTunnel(ctx, tunnel2) - // Query tunnels resp, err := q.Tunnels(ctx, &types.QueryTunnelsRequest{}) s.Require().NoError(err) s.Require().NotNil(resp) @@ -29,13 +27,11 @@ func (s *KeeperTestSuite) TestGRPCQueryTunnels() { func (s *KeeperTestSuite) TestGRPCQueryTunnel() { ctx, k, q := s.ctx, s.keeper, s.queryServer - // Set tunnel tunnel := types.Tunnel{ ID: 1, } k.SetTunnel(ctx, tunnel) - // Query tunnel resp, err := q.Tunnel(ctx, &types.QueryTunnelRequest{ TunnelId: 1, }) @@ -47,7 +43,6 @@ func (s *KeeperTestSuite) TestGRPCQueryTunnel() { func (s *KeeperTestSuite) TestGRPCQueryPackets() { ctx, k, q := s.ctx, s.keeper, s.queryServer - // Set tunnel tunnel := types.Tunnel{ ID: 1, NonceCount: 2, @@ -61,7 +56,6 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { k.SetTunnel(ctx, tunnel) - // Set packets packet1 := types.Packet{ TunnelID: 1, Nonce: 1, @@ -85,7 +79,6 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { k.SetPacket(ctx, packet1) k.SetPacket(ctx, packet2) - // Query packets resp, err := q.Packets(ctx, &types.QueryPacketsRequest{ TunnelId: 1, }) diff --git a/x/tunnel/keeper/latest_signal_prices_test.go b/x/tunnel/keeper/latest_signal_prices_test.go index 39d982f08..6bb8d21b4 100644 --- a/x/tunnel/keeper/latest_signal_prices_test.go +++ b/x/tunnel/keeper/latest_signal_prices_test.go @@ -7,7 +7,6 @@ import ( func (s *KeeperTestSuite) TestGetSetLatestSignalPrices() { ctx, k := s.ctx, s.keeper - // Define test data tunnelID := uint64(1) latestSignalPrices := types.LatestSignalPrices{ TunnelID: tunnelID, @@ -16,10 +15,8 @@ func (s *KeeperTestSuite) TestGetSetLatestSignalPrices() { }, } - // Set the latest signal prices k.SetLatestSignalPrices(ctx, latestSignalPrices) - // Get the latest signal prices retrievedSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) s.Require().NoError(err) s.Require().Equal(latestSignalPrices, retrievedSignalPrices) @@ -28,7 +25,6 @@ func (s *KeeperTestSuite) TestGetSetLatestSignalPrices() { func (s *KeeperTestSuite) TestGetAllLatestSignalPrices() { ctx, k := s.ctx, s.keeper - // Define test data latestSignalPrices1 := types.LatestSignalPrices{ TunnelID: 1, SignalPrices: []types.SignalPrice{ @@ -42,11 +38,9 @@ func (s *KeeperTestSuite) TestGetAllLatestSignalPrices() { }, } - // Set the latest signal prices k.SetLatestSignalPrices(ctx, latestSignalPrices1) k.SetLatestSignalPrices(ctx, latestSignalPrices2) - // Get all latest signal prices allLatestSignalPrices := k.GetAllLatestSignalPrices(ctx) s.Require().Len(allLatestSignalPrices, 2) s.Require().Contains(allLatestSignalPrices, latestSignalPrices1) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 46663f7cb..9fc630f03 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -192,12 +192,11 @@ func (ms msgServer) TriggerTunnel( currentPrices := ms.Keeper.feedsKeeper.GetCurrentPrices(ctx) currentPricesMap := createCurrentPricesMap(currentPrices) - // Produce packet with trigger all signals + // produce packet with trigger all signals if err := ms.Keeper.ProducePacket(ctx, tunnel.ID, currentPricesMap, true); err != nil { return nil, err } - // Emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeManualTriggerTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), @@ -225,7 +224,6 @@ func (ms msgServer) UpdateParams( return nil, err } - // Emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeUpdateParams, sdk.NewAttribute(types.AttributeKeyParams, req.Params.String()), diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 203855ba7..a44b7f5ba 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -19,7 +19,7 @@ func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) er return err } - // Update total fees + // update total fees totalFees := k.GetTotalFees(ctx) totalFees.TotalPacketFee = totalFees.TotalPacketFee.Add(basePacketFee...) k.SetTotalFees(ctx, totalFees) @@ -55,19 +55,19 @@ func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) ty // ProduceActiveTunnelPackets generates packets and sends packets to the destination route for all active tunnels func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { - // Get active tunnel IDs + // get active tunnel IDs ids := k.GetActiveTunnelIDs(ctx) currentPrices := k.feedsKeeper.GetCurrentPrices(ctx) currentPricesMap := createCurrentPricesMap(currentPrices) - // Check for active tunnels + // check for active tunnels for _, id := range ids { tunnel := k.MustGetTunnel(ctx, id) balances := k.bankKeeper.SpendableCoins(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) basePacketFee := k.GetParams(ctx).BasePacketFee - // Deactivate tunnel if the fee payer does not have enough balance. + // deactivate tunnel if the fee payer does not have enough balance. if !balances.IsAllGTE(basePacketFee) { k.MustDeactivateTunnel(ctx, id) continue @@ -97,14 +97,14 @@ func (k Keeper) ProducePacket( ) error { unixNow := ctx.BlockTime().Unix() - // Get tunnel and signal prices info + // get tunnel and signal prices info tunnel := k.MustGetTunnel(ctx, tunnelID) latestSignalPrices := k.MustGetLatestSignalPrices(ctx, tunnelID) - // Check if the interval has passed + // check if the interval has passed intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+latestSignalPrices.Timestamp - // Generate new signal prices + // generate new signal prices nsps := GenerateSignalPrices( ctx, currentPricesMap, @@ -113,12 +113,12 @@ func (k Keeper) ProducePacket( triggerAll || intervalTrigger, ) - // Return if no new signal prices + // return if no new signal prices if len(nsps) == 0 { return nil } - // Deduct base packet fee from the fee payer, + // deduct base packet fee from the fee payer, feePayer := sdk.MustAccAddressFromBech32(tunnel.FeePayer) if err := k.DeductBasePacketFee(ctx, feePayer); err != nil { return sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) @@ -129,14 +129,14 @@ func (k Keeper) ProducePacket( return sdkerrors.Wrapf(err, "route %s failed to send packet", tunnel.Route.TypeUrl) } - // Update signal prices info + // update signal prices info latestSignalPrices.UpdateSignalPrices(nsps) if triggerAll || intervalTrigger { latestSignalPrices.Timestamp = unixNow } k.SetLatestSignalPrices(ctx, latestSignalPrices) - // Update tunnel nonce count + // update tunnel nonce count tunnel.NonceCount++ k.SetTunnel(ctx, tunnel) @@ -161,17 +161,17 @@ func (k Keeper) SendPacket( return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } - // Return error if failed to send packet + // return error if failed to send packet if err != nil { return err } - // Set the packet content + // set the packet content if err := packet.SetPacketContent(content); err != nil { panic(fmt.Sprintf("failed to set packet content: %s", err)) } - // Set the packet in the store + // set the packet in the store k.SetPacket(ctx, packet) return nil } @@ -192,14 +192,14 @@ func GenerateSignalPrices( continue } - // Get signal info from signalDeviationMap + // get signal info from signalDeviationMap signalDeviation, exists := signalDeviationMap[sp.SignalID] if !exists { - // Panic if signal info not found for signal ID in the tunnel that should not happen + // panic if signal info not found for signal ID in the tunnel that should not happen panic(fmt.Sprintf("signal info not found for signal ID: %s", sp.SignalID)) } - // If triggerAll is true or the deviation exceeds the threshold, add the signal price info to the list + // if triggerAll is true or the deviation exceeds the threshold, add the signal price info to the list if triggerAll || deviationExceedsThreshold( sdk.NewIntFromUint64(sp.Price), @@ -220,7 +220,7 @@ func GenerateSignalPrices( // deviationExceedsThreshold checks if the deviation between the old price and the new price exceeds the threshold func deviationExceedsThreshold(oldPrice, newPrice, thresholdBPS sdkmath.Int) bool { - // If the old price is zero, always add the signal price info to the list + // if the old price is zero, always add the signal price info to the list if oldPrice.IsZero() { return true } diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 824b32e4e..5962f787b 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -12,26 +12,23 @@ import ( func (s *KeeperTestSuite) TestDeductBasePacketFee() { ctx, k := s.ctx, s.keeper - // Define test data feePayer := sdk.AccAddress([]byte("fee_payer_address")) basePacketFee := sdk.Coins{sdk.NewInt64Coin("uband", 100)} + s.bankKeeper.EXPECT(). + SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, basePacketFee). + Return(nil) + defaultParams := types.DefaultParams() defaultParams.BasePacketFee = basePacketFee err := k.SetParams(ctx, defaultParams) s.Require().NoError(err) - // Mock bankKeeper to simulate coin transfer - s.bankKeeper.EXPECT(). - SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, basePacketFee). - Return(nil) - - // Call the DeductBasePacketFee function err = k.DeductBasePacketFee(ctx, feePayer) s.Require().NoError(err) - // Validate the total fees are updated + // validate the total fees are updated totalFee := k.GetTotalFees(ctx) s.Require().Equal(basePacketFee, totalFee.TotalPacketFee) } @@ -54,7 +51,6 @@ func (s *KeeperTestSuite) TestGetSetPacket() { func (s *KeeperTestSuite) TestProducePacket() { ctx, k := s.ctx, s.keeper - // Define test data tunnelID := uint64(1) currentPricesMap := map[string]feedstypes.Price{ "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, @@ -74,7 +70,6 @@ func (s *KeeperTestSuite) TestProducePacket() { DestinationContractAddress: "0x", } - // Mock bankKeeper to simulate coin transfer s.bankKeeper.EXPECT(). SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(10)))). Return(nil) @@ -82,7 +77,6 @@ func (s *KeeperTestSuite) TestProducePacket() { err := tunnel.SetRoute(route) s.Require().NoError(err) - // Set the tunnel k.SetTunnel(ctx, tunnel) err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) @@ -90,7 +84,6 @@ func (s *KeeperTestSuite) TestProducePacket() { {SignalID: "BTC/USD", Price: 0}, }, 0)) - // Call the ProduceActiveTunnelPackets function err = k.ProducePacket(ctx, tunnelID, currentPricesMap, false) s.Require().NoError(err) } @@ -98,7 +91,6 @@ func (s *KeeperTestSuite) TestProducePacket() { func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { ctx, k := s.ctx, s.keeper - // Define test data tunnelID := uint64(1) feePayer := sdk.AccAddress([]byte("fee_payer_address")) tunnel := types.Tunnel{ @@ -126,12 +118,10 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { err := tunnel.SetRoute(route) s.Require().NoError(err) - // set params defaultParams := types.DefaultParams() err = k.SetParams(ctx, defaultParams) s.Require().NoError(err) - // Set the tunnel k.SetTunnel(ctx, tunnel) err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) @@ -139,10 +129,8 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { {SignalID: "BTC/USD", Price: 0}, }, 0)) - // Call the ProduceActiveTunnelPackets function k.ProduceActiveTunnelPackets(ctx) - // Validate the tunnel is Inactive & no packet is Created newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) s.Require().True(newTunnelInfo.IsActive) @@ -155,7 +143,6 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { ctx, k := s.ctx, s.keeper - // Define test data tunnelID := uint64(1) feePayer := sdk.AccAddress([]byte("fee_payer_address")) tunnel := types.Tunnel{ @@ -181,12 +168,10 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { err := tunnel.SetRoute(route) s.Require().NoError(err) - // set params defaultParams := types.DefaultParams() err = k.SetParams(ctx, defaultParams) s.Require().NoError(err) - // Set the tunnel k.SetTunnel(ctx, tunnel) err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) @@ -194,10 +179,8 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { {SignalID: "BTC/USD", Price: 0}, }, 0)) - // Call the ProduceActiveTunnelPackets function k.ProduceActiveTunnelPackets(ctx) - // Validate the tunnel is Inactive & no packet is Created newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) s.Require().False(newTunnelInfo.IsActive) @@ -210,7 +193,6 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { func (s *KeeperTestSuite) TestGenerateSignalPrices() { ctx := s.ctx - // Define test data tunnelID := uint64(1) currentPricesMap := map[string]feedstypes.Price{ "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, @@ -226,7 +208,6 @@ func (s *KeeperTestSuite) TestGenerateSignalPrices() { {SignalID: "BTC/USD", Price: 0}, }, 0) - // Call the GenerateSignalPrices function nsps := keeper.GenerateSignalPrices( ctx, currentPricesMap, diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index ded97ecbf..5d4533eaa 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -10,13 +10,10 @@ import ( func (s *KeeperTestSuite) TestSendTSSPacket() { ctx, k := s.ctx, s.keeper - // Create a sample TSSRoute route := types.TSSRoute{ DestinationChainID: "chain-1", DestinationContractAddress: "0x1234567890abcdef", } - - // Create a sample Packet packet := types.NewPacket( 1, // tunnelID 1, // nonce @@ -25,11 +22,9 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { time.Now().Unix(), ) - // Send the TSS packet content, err := k.SendTSSPacket(ctx, &route, packet) s.Require().NoError(err) - // Assert the packet content packetContent, ok := content.(*types.TSSPacketContent) s.Require().True(ok) s.Require().Equal("chain-1", packetContent.DestinationChainID) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index cc56e1fc3..8359f6083 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -18,24 +18,23 @@ func (k Keeper) AddTunnel( interval uint64, creator string, ) (*types.Tunnel, error) { - // Get the next tunnel ID id := k.GetTunnelCount(ctx) newID := id + 1 - // Generate a new fee payer account + // generate a new fee payer account feePayer, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", newID)) if err != nil { return nil, err } - // Set the signal prices info + // set the signal prices info var signalPrices []types.SignalPrice for _, sd := range signalDeviations { signalPrices = append(signalPrices, types.NewSignalPrice(sd.SignalID, 0)) } k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(newID, signalPrices, 0)) - // Create a new tunnel + // create a new tunnel tunnel := types.NewTunnel( newID, 0, @@ -50,7 +49,7 @@ func (k Keeper) AddTunnel( ) k.SetTunnel(ctx, tunnel) - // Increment the tunnel count + // increment the tunnel count k.SetTunnelCount(ctx, newID) return &tunnel, nil @@ -68,19 +67,18 @@ func (k Keeper) EditTunnel( return err } - // Edit the tunnel + // edit the tunnel tunnel.SignalDeviations = signalDeviations tunnel.Interval = interval k.SetTunnel(ctx, tunnel) - // Edit the signal prices info + // edit the signal prices info var signalPrices []types.SignalPrice for _, sp := range signalDeviations { signalPrices = append(signalPrices, types.NewSignalPrice(sp.SignalID, 0)) } k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, signalPrices, 0)) - // Emit an event event := sdk.NewEvent( types.EventTypeEditTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), @@ -176,14 +174,13 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { return err } - // Add the tunnel ID to the active tunnel IDs + // add the tunnel ID to the active tunnel IDs k.ActiveTunnelID(ctx, tunnelID) - // Set the last interval timestamp to the current block time + // set the last interval timestamp to the current block time tunnel.IsActive = true k.SetTunnel(ctx, tunnel) - // Emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeActivateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), @@ -200,14 +197,13 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { return err } - // Remove the tunnel ID from the active tunnel IDs + // remove the tunnel ID from the active tunnel IDs k.DeactivateTunnelID(ctx, tunnelID) - // Set the last interval timestamp to the current block time + // set the last interval timestamp to the current block time tunnel.IsActive = false k.SetTunnel(ctx, tunnel) - // emit and event. ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeDeactivateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 35d1a58c6..90fe6b1b8 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -11,7 +11,6 @@ import ( func (s *KeeperTestSuite) TestAddTunnel() { ctx, k := s.ctx, s.keeper - // Define test data route := &codectypes.Any{} signalDeviations := []types.SignalDeviation{ {SignalID: "BTC"}, @@ -20,17 +19,6 @@ func (s *KeeperTestSuite) TestAddTunnel() { interval := uint64(10) creator := sdk.AccAddress([]byte("creator_address")).String() - s.accountKeeper.EXPECT(). - GetAccount(ctx, gomock.Any()). - Return(nil).Times(1) - s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) - s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) - - // Call the AddTunnel function - tunnel, err := k.AddTunnel(ctx, route, types.ENCODER_FIXED_POINT_ABI, signalDeviations, interval, creator) - s.Require().NoError(err) - - // Define the expected tunnel expectedTunnel := types.Tunnel{ ID: 1, Route: route, @@ -43,7 +31,6 @@ func (s *KeeperTestSuite) TestAddTunnel() { CreatedAt: ctx.BlockTime().Unix(), } - // Define the expected latest signal prices expectedSignalPrices := types.LatestSignalPrices{ TunnelID: 1, SignalPrices: []types.SignalPrice{ @@ -53,14 +40,21 @@ func (s *KeeperTestSuite) TestAddTunnel() { Timestamp: 0, } - // Validate the results + s.accountKeeper.EXPECT(). + GetAccount(ctx, gomock.Any()). + Return(nil).Times(1) + s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + + tunnel, err := k.AddTunnel(ctx, route, types.ENCODER_FIXED_POINT_ABI, signalDeviations, interval, creator) + s.Require().NoError(err) s.Require().Equal(expectedTunnel, *tunnel) - // Check the tunnel count + // check the tunnel count tunnelCount := k.GetTunnelCount(ctx) s.Require().Equal(uint64(1), tunnelCount) - // Check the latest signal prices + // check the latest signal prices latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnel.ID) s.Require().NoError(err) s.Require().Equal(expectedSignalPrices, latestSignalPrices) @@ -69,12 +63,11 @@ func (s *KeeperTestSuite) TestAddTunnel() { func (s *KeeperTestSuite) TestEditTunnel() { ctx, k := s.ctx, s.keeper - // Define initial test data initialRoute := &codectypes.Any{} initialEncoder := types.ENCODER_FIXED_POINT_ABI initialSignalDeviations := []types.SignalDeviation{ - {SignalID: "BTC"}, - {SignalID: "ETH"}, + {SignalID: "BTC", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, + {SignalID: "ETH", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, } initialInterval := uint64(10) creator := sdk.AccAddress([]byte("creator_address")).String() @@ -85,7 +78,6 @@ func (s *KeeperTestSuite) TestEditTunnel() { s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) - // Add an initial tunnel initialTunnel, err := k.AddTunnel( ctx, initialRoute, @@ -96,24 +88,24 @@ func (s *KeeperTestSuite) TestEditTunnel() { ) s.Require().NoError(err) - // Define new test data for editing the tunnel + // define new test data for editing the tunnel newSignalDeviations := []types.SignalDeviation{ - {SignalID: "BTC"}, - {SignalID: "ETH"}, + {SignalID: "BTC", SoftDeviationBPS: 1100, HardDeviationBPS: 1100}, + {SignalID: "ETH", SoftDeviationBPS: 1100, HardDeviationBPS: 1100}, } newInterval := uint64(20) - // Call the EditTunnel function + // call the EditTunnel function err = k.EditTunnel(ctx, initialTunnel.ID, newSignalDeviations, newInterval) s.Require().NoError(err) - // Validate the edited tunnel + // validate the edited tunnel editedTunnel, err := k.GetTunnel(ctx, initialTunnel.ID) s.Require().NoError(err) s.Require().Equal(newSignalDeviations, editedTunnel.SignalDeviations) s.Require().Equal(newInterval, editedTunnel.Interval) - // Check the latest signal prices + // check the latest signal prices latestSignalPrices, err := k.GetLatestSignalPrices(ctx, editedTunnel.ID) s.Require().NoError(err) s.Require().Equal(editedTunnel.ID, latestSignalPrices.TunnelID) @@ -127,75 +119,54 @@ func (s *KeeperTestSuite) TestEditTunnel() { func (s *KeeperTestSuite) TestGetSetTunnel() { ctx, k := s.ctx, s.keeper - // Create a new tunnel instance tunnel := types.Tunnel{ID: 1} - // Set the tunnel in the keeper k.SetTunnel(ctx, tunnel) - // Attempt to retrieve the tunnel by its ID retrievedTunnel, err := k.GetTunnel(ctx, tunnel.ID) - - // Assert no error occurred during retrieval - s.Require().NoError(err, "retrieving tunnel should not produce an error") - - // Assert the retrieved tunnel matches the one we set - s.Require().Equal(tunnel, retrievedTunnel, "the retrieved tunnel should match the original") + s.Require().NoError(err) + s.Require().Equal(tunnel, retrievedTunnel) } func (s *KeeperTestSuite) TestGetTunnels() { ctx, k := s.ctx, s.keeper - // Create a new tunnel instance tunnel := types.Tunnel{ID: 1} - // Set the tunnel in the keeper k.SetTunnel(ctx, tunnel) - // Retrieve all tunnels tunnels := k.GetTunnels(ctx) - - // Assert the number of tunnels is 1 - s.Require().Len(tunnels, 1, "expected 1 tunnel to be retrieved") + s.Require().Len(tunnels, 1) } func (s *KeeperTestSuite) TestGetSetTunnelCount() { ctx, k := s.ctx, s.keeper - // Set a new tunnel count newCount := uint64(5) k.SetTunnelCount(ctx, newCount) - // Get the tunnel count and verify it retrievedCount := k.GetTunnelCount(ctx) - s.Require().Equal(newCount, retrievedCount, "retrieved tunnel count should match the set value") + s.Require().Equal(newCount, retrievedCount) } func (s *KeeperTestSuite) TestGetActiveTunnelIDs() { ctx, k := s.ctx, s.keeper - // Define active tunnel IDs activeTunnelIDs := []uint64{1, 2, 3} - - // Add active tunnel IDs to the store for _, id := range activeTunnelIDs { k.ActiveTunnelID(ctx, id) } - // Call the GetActiveTunnelIDs function retrievedIDs := k.GetActiveTunnelIDs(ctx) - - // Validate the results - s.Require().Equal(activeTunnelIDs, retrievedIDs, "retrieved active tunnel IDs should match the expected values") + s.Require().Equal(activeTunnelIDs, retrievedIDs) } func (s *KeeperTestSuite) TestActivateTunnel() { ctx, k := s.ctx, s.keeper - // Define test data tunnelID := uint64(1) - route := &codectypes.Any{} // Replace with actual route data - encoder := types.ENCODER_FIXED_POINT_ABI // Replace with actual encoder data + route := &codectypes.Any{} + encoder := types.ENCODER_FIXED_POINT_ABI signalDeviations := []types.SignalDeviation{ {SignalID: "BTC"}, {SignalID: "ETH"}, @@ -203,7 +174,6 @@ func (s *KeeperTestSuite) TestActivateTunnel() { interval := uint64(10) creator := sdk.AccAddress([]byte("creator_address")).String() - // Add a tunnel to the store tunnel := types.Tunnel{ ID: tunnelID, Route: route, @@ -216,27 +186,25 @@ func (s *KeeperTestSuite) TestActivateTunnel() { } k.SetTunnel(ctx, tunnel) - // Call the ActivateTunnel function err := k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) - // Validate the tunnel is activated + // validate the tunnel is activated activatedTunnel, err := k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) - s.Require().True(activatedTunnel.IsActive, "tunnel should be active") + s.Require().True(activatedTunnel.IsActive) - // Validate the active tunnel ID is stored + // validate the active tunnel ID is stored activeTunnelIDs := k.GetActiveTunnelIDs(ctx) - s.Require().Contains(activeTunnelIDs, tunnelID, "active tunnel IDs should contain the activated tunnel ID") + s.Require().Contains(activeTunnelIDs, tunnelID) } func (s *KeeperTestSuite) TestDeactivateTunnel() { ctx, k := s.ctx, s.keeper - // Define test data tunnelID := uint64(1) - route := &codectypes.Any{} // Replace with actual route data - encoder := types.ENCODER_FIXED_POINT_ABI // Replace with actual encoder data + route := &codectypes.Any{} + encoder := types.ENCODER_FIXED_POINT_ABI signalDeviations := []types.SignalDeviation{ {SignalID: "BTC"}, {SignalID: "ETH"}, @@ -244,7 +212,7 @@ func (s *KeeperTestSuite) TestDeactivateTunnel() { interval := uint64(10) creator := sdk.AccAddress([]byte("creator_address")).String() - // Add a tunnel to the store + // add a tunnel to the store tunnel := types.Tunnel{ ID: tunnelID, Route: route, @@ -257,30 +225,26 @@ func (s *KeeperTestSuite) TestDeactivateTunnel() { } k.SetTunnel(ctx, tunnel) - // Call the DeactivateTunnel function + // call the DeactivateTunnel function err := k.DeactivateTunnel(ctx, tunnelID) s.Require().NoError(err) - // Validate the tunnel is deactivated + // validate the tunnel is deactivated deactivatedTunnel, err := k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) - s.Require().False(deactivatedTunnel.IsActive, "tunnel should be inactive") + s.Require().False(deactivatedTunnel.IsActive) - // Validate the active tunnel ID is removed + // validate the active tunnel ID is removed activeTunnelIDs := k.GetActiveTunnelIDs(ctx) - s.Require(). - NotContains(activeTunnelIDs, tunnelID, "active tunnel IDs should not contain the deactivated tunnel ID") + s.Require().NotContains(activeTunnelIDs, tunnelID) } func (s *KeeperTestSuite) TestGetSetTotalFees() { ctx, k := s.ctx, s.keeper totalFees := types.TotalFees{TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100)))} - - // Set the total fees in the keeper k.SetTotalFees(ctx, totalFees) - // Get the total fees and verify it retrievedFees := k.GetTotalFees(ctx) - s.Require().Equal(totalFees, retrievedFees, "retrieved total fees should match the set value") + s.Require().Equal(totalFees, retrievedFees) } diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 1ed8f47ec..cf96e0fae 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -101,17 +101,17 @@ func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { - // Creator address must be valid + // creator address must be valid if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - // Signal deviations cannot be empty + // signal deviations cannot be empty if len(m.SignalDeviations) == 0 { return sdkerrors.ErrInvalidRequest.Wrapf("signal deviations cannot be empty") } - // Route must be valid + // route must be valid r, ok := m.Route.GetCachedValue().(RouteI) if !ok { return sdkerrors.ErrPackAny.Wrapf("cannot unpack route") @@ -120,7 +120,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } - // InitialDeposit deposit must be positive + // initialDeposit deposit must be positive if !m.InitialDeposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) } diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 9cbbdbbe5..0572c1aa0 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -42,22 +42,22 @@ func DefaultParams() Params { // Validate validates the set of params func (p Params) Validate() error { - // Validate MinDeposit + // validate MinDeposit if !p.MinDeposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("%s", p.MinDeposit.String()) } - // Validate MinInterval + // validate MinInterval if err := validateUint64("min interval", true)(p.MinInterval); err != nil { return err } - // Validate MaxSignals + // validate MaxSignals if err := validateUint64("max signals", true)(p.MaxSignals); err != nil { return err } - // Validate BasePacketFee + // validate BasePacketFee if !p.BasePacketFee.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("%s", p.BasePacketFee.String()) } From b96877a0de1fdb548b41bc85322ff7e123143a0c Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 17:18:31 +0700 Subject: [PATCH 140/272] update comment --- x/tunnel/keeper/deposit.go | 16 ++++++++-------- x/tunnel/keeper/deposit_test.go | 20 ++++---------------- x/tunnel/keeper/grpc_query_test.go | 6 ------ 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index e3d0dcda3..025375187 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -22,7 +22,7 @@ func (k Keeper) AddDeposit( return err } - // Transfer the deposit from the depositor to the tunnel module account + // transfer the deposit from the depositor to the tunnel module account if err := k.bankKeeper.SendCoinsFromAccountToModule( ctx, depositorAddr, @@ -32,7 +32,7 @@ func (k Keeper) AddDeposit( return err } - // Update the depositor's deposit + // update the depositor's deposit deposit, found := k.GetDeposit(ctx, tunnelID, depositorAddr) if !found { deposit = types.NewDeposit(tunnelID, depositorAddr, depositAmount) @@ -41,7 +41,7 @@ func (k Keeper) AddDeposit( } k.SetDeposit(ctx, deposit) - // Update the tunnel's total deposit + // update the tunnel's total deposit tunnel.TotalDeposit = tunnel.TotalDeposit.Add(depositAmount...) k.SetTunnel(ctx, tunnel) @@ -102,12 +102,12 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi return types.ErrDepositNotFound } - // Check if the withdrawer has enough deposit + // check if the withdrawer has enough deposit if !deposit.Amount.IsAllGTE(amount) { return types.ErrInsufficientDeposit } - // Transfer the deposit from the tunnel module account to the withdrawer + // transfer the deposit from the tunnel module account to the withdrawer if err := k.bankKeeper.SendCoinsFromModuleToAccount( ctx, types.ModuleName, @@ -117,7 +117,7 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi return err } - // Update the withdrawer's deposit + // update the withdrawer's deposit deposit.Amount = deposit.Amount.Sub(amount...) if deposit.Amount.IsZero() { k.DeleteDeposit(ctx, tunnelID, withdrawer) @@ -125,11 +125,11 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi k.SetDeposit(ctx, deposit) } - // Update the tunnel's total deposit + // update the tunnel's total deposit tunnel.TotalDeposit = tunnel.TotalDeposit.Sub(amount...) k.SetTunnel(ctx, tunnel) - // Deactivate the tunnel if the total deposit is less than the min deposit + // deactivate the tunnel if the total deposit is less than the min deposit minDeposit := k.GetParams(ctx).MinDeposit if !tunnel.TotalDeposit.IsAllGTE(minDeposit) { k.MustDeactivateTunnel(ctx, tunnelID) diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index 22d3bf0d0..cf754d085 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -17,20 +17,18 @@ func (s *KeeperTestSuite) TestAddDeposit() { SendCoinsFromAccountToModule(ctx, depositorAddr, types.ModuleName, depositAmount). Return(nil).Times(1) - // Add a tunnel tunnel := types.Tunnel{ID: tunnelID, TotalDeposit: sdk.NewCoins()} k.SetTunnel(ctx, tunnel) - // Add deposit err := k.AddDeposit(ctx, tunnelID, depositorAddr, depositAmount) s.Require().NoError(err) - // Check deposit + // check deposit deposit, found := k.GetDeposit(ctx, tunnelID, depositorAddr) s.Require().True(found) s.Require().Equal(depositAmount, deposit.Amount) - // Check tunnel's total deposit + // check tunnel's total deposit tunnel, err = k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) s.Require().Equal(depositAmount, tunnel.TotalDeposit) @@ -43,11 +41,9 @@ func (s *KeeperTestSuite) TestGetSetDeposit() { depositorAddr := sdk.AccAddress([]byte("depositor")) depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))) - // Set deposit deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit) - // Get deposit retrievedDeposit, found := k.GetDeposit(ctx, tunnelID, depositorAddr) s.Require().True(found) s.Require().Equal(deposit, retrievedDeposit) @@ -60,11 +56,9 @@ func (s *KeeperTestSuite) TestGetDeposits() { depositorAddr := sdk.AccAddress([]byte("depositor")) depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))) - // Set deposit deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit) - // Get deposits deposits := k.GetDeposits(ctx, tunnelID) s.Require().Len(deposits, 1) s.Require().Equal(deposit, deposits[0]) @@ -77,14 +71,11 @@ func (s *KeeperTestSuite) TestDeleteDeposit() { depositorAddr := sdk.AccAddress([]byte("depositor")) depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdk.NewInt(100))) - // Set deposit deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit) - // Delete deposit k.DeleteDeposit(ctx, tunnelID, depositorAddr) - // Check deposit _, found := k.GetDeposit(ctx, tunnelID, depositorAddr) s.Require().False(found) } @@ -100,23 +91,20 @@ func (s *KeeperTestSuite) TestWithdrawDeposit() { SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositorAddr, depositAmount). Return(nil).Times(1) - // Set a tunnel tunnel := types.Tunnel{ID: tunnelID, TotalDeposit: depositAmount, IsActive: true} k.SetTunnel(ctx, tunnel) - // Set deposit deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit) - // Withdraw deposit err := k.WithdrawDeposit(ctx, tunnelID, depositAmount, depositorAddr) s.Require().NoError(err) - // Check tunnel's total deposit + // check tunnel's total deposit tunnel, err = k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) s.Require().Equal(sdk.Coins(nil), tunnel.TotalDeposit) - // Check is active + // check is active s.Require().False(tunnel.IsActive) } diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index b36eb8f6f..4b6270d81 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -131,7 +131,6 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { func (s *KeeperTestSuite) TestGRPCQueryDeposit() { ctx, k, q := s.ctx, s.keeper, s.queryServer - // Set tunnel tunnel := types.Tunnel{ ID: 1, NonceCount: 2, @@ -144,7 +143,6 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposit() { s.Require().NoError(err) k.SetTunnel(ctx, tunnel) - // Set deposit deposit := types.Deposit{ TunnelID: 1, Depositor: sdk.AccAddress([]byte("depositor")).String(), @@ -152,7 +150,6 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposit() { } k.SetDeposit(ctx, deposit) - // Query deposit resp, err := q.Deposit(ctx, &types.QueryDepositRequest{ TunnelId: 1, Depositor: deposit.Depositor, @@ -165,7 +162,6 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposit() { func (s *KeeperTestSuite) TestGRPCQueryDeposits() { ctx, k, q := s.ctx, s.keeper, s.queryServer - // Set tunnel tunnel := types.Tunnel{ ID: 1, NonceCount: 2, @@ -178,7 +174,6 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposits() { s.Require().NoError(err) k.SetTunnel(ctx, tunnel) - // Set deposits deposit1 := types.Deposit{ TunnelID: 1, Depositor: sdk.AccAddress([]byte("depositor1")).String(), @@ -192,7 +187,6 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposits() { k.SetDeposit(ctx, deposit1) k.SetDeposit(ctx, deposit2) - // Query deposits resp, err := q.Deposits(ctx, &types.QueryDepositsRequest{ TunnelId: 1, }) From 99dc37d44232a8b734d70c53ab654ef1407e4d71 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 17:21:19 +0700 Subject: [PATCH 141/272] update comment --- x/tunnel/keeper/keeper_test.go | 2 +- x/tunnel/keeper/msg_server.go | 13 +++++++++---- x/tunnel/keeper/tunnel.go | 4 ++-- x/tunnel/keeper/tunnel_test.go | 6 +++--- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go index 57ea14551..d271c2dc8 100644 --- a/x/tunnel/keeper/keeper_test.go +++ b/x/tunnel/keeper/keeper_test.go @@ -105,7 +105,7 @@ func (s *KeeperTestSuite) AddSampleTunnel(isActive bool) { types.ENCODER_FIXED_POINT_ABI, signalDeviations, 10, - sdk.AccAddress([]byte("creator_address")).String(), + sdk.AccAddress([]byte("creator_address")), ) s.Require().NoError(err) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 9fc630f03..f52a6936b 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -37,16 +37,21 @@ func (ms msgServer) CreateTunnel( return nil, types.ErrIntervalTooLow } + creator, err := sdk.AccAddressFromBech32(req.Creator) + if err != nil { + return nil, err + } + // TODO: check deposit with params, transfer deposit to module account - // Add a new tunnel + // add a new tunnel tunnel, err := ms.Keeper.AddTunnel( ctx, req.Route, req.Encoder, req.SignalDeviations, req.Interval, - req.Creator, + creator, ) if err != nil { return nil, err @@ -121,12 +126,12 @@ func (ms msgServer) Activate( return nil, err } - // Check if the creator is the same + // check if the creator is the same if req.Creator != tunnel.Creator { return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", req.Creator, req.TunnelID) } - // Check if the tunnel is already active + // check if the tunnel is already active if tunnel.IsActive { return nil, types.ErrAlreadyActive.Wrapf("tunnelID %d", req.TunnelID) } diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 8359f6083..7847a4aef 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -16,7 +16,7 @@ func (k Keeper) AddTunnel( encoder types.Encoder, signalDeviations []types.SignalDeviation, interval uint64, - creator string, + creator sdk.AccAddress, ) (*types.Tunnel, error) { id := k.GetTunnelCount(ctx) newID := id + 1 @@ -45,7 +45,7 @@ func (k Keeper) AddTunnel( interval, false, ctx.BlockTime().Unix(), - creator, + creator.String(), ) k.SetTunnel(ctx, tunnel) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 90fe6b1b8..77a91c877 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -17,14 +17,14 @@ func (s *KeeperTestSuite) TestAddTunnel() { {SignalID: "ETH"}, } interval := uint64(10) - creator := sdk.AccAddress([]byte("creator_address")).String() + creator := sdk.AccAddress([]byte("creator_address")) expectedTunnel := types.Tunnel{ ID: 1, Route: route, Encoder: types.ENCODER_FIXED_POINT_ABI, FeePayer: "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", - Creator: creator, + Creator: creator.String(), Interval: interval, SignalDeviations: signalDeviations, IsActive: false, @@ -70,7 +70,7 @@ func (s *KeeperTestSuite) TestEditTunnel() { {SignalID: "ETH", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, } initialInterval := uint64(10) - creator := sdk.AccAddress([]byte("creator_address")).String() + creator := sdk.AccAddress([]byte("creator_address")) s.accountKeeper.EXPECT(). GetAccount(ctx, gomock.Any()). From 3a008aaaf9cc5b7b88ee5da91b3b9b2d89684e84 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 20 Sep 2024 17:25:28 +0700 Subject: [PATCH 142/272] change error position --- x/tunnel/types/errors.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index bc3776d5b..2057eafd6 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -17,9 +17,9 @@ var ( ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") - ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 13, "invalid deposit denom") - ErrDepositNotFound = errorsmod.Register(ModuleName, 14, "deposit not found") - ErrInsufficientDeposit = errorsmod.Register(ModuleName, 15, "insufficient deposit") - ErrAlreadyActive = errorsmod.Register(ModuleName, 16, "already active") - ErrAlreadyInactive = errorsmod.Register(ModuleName, 17, "already inactive") + ErrAlreadyActive = errorsmod.Register(ModuleName, 13, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 14, "already inactive") + ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") + ErrDepositNotFound = errorsmod.Register(ModuleName, 16, "deposit not found") + ErrInsufficientDeposit = errorsmod.Register(ModuleName, 17, "insufficient deposit") ) From 0122fce893e63062570c8f4350a25c0ab0bac02f Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 23 Sep 2024 15:16:33 +0700 Subject: [PATCH 143/272] clean up --- proto/tunnel/v1beta1/query.proto | 14 +- scripts/tunnel/create_tunnel.sh | 2 +- scripts/tunnel/edit_tunnel.sh | 1 + x/tunnel/client/cli/query.go | 8 +- x/tunnel/client/cli/tx.go | 13 +- x/tunnel/client/cli/util.go | 10 +- x/tunnel/keeper/genesis.go | 19 +-- x/tunnel/keeper/genesis_test.go | 73 +++++++--- x/tunnel/keeper/latest_signal_prices.go | 2 +- x/tunnel/keeper/msg_server.go | 10 +- x/tunnel/keeper/packet.go | 35 ++--- x/tunnel/keeper/tunnel.go | 15 +- x/tunnel/types/errors.go | 26 ++-- x/tunnel/types/events.go | 14 +- x/tunnel/types/msgs.go | 31 +++-- x/tunnel/types/query.pb.go | 174 ++++++++++++------------ x/tunnel/types/query.pb.gw.go | 104 +++++++------- x/tunnel/types/tunnel.go | 18 ++- 18 files changed, 311 insertions(+), 258 deletions(-) create mode 100644 scripts/tunnel/edit_tunnel.sh diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index 73f9f4bf1..e0446f98b 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -11,11 +11,6 @@ import "tunnel/v1beta1/tunnel.proto"; // Query service defines the gRPC querier service. service Query { - // Params is a RPC method that returns all parameters of the module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/tunnel/v1beta1/params"; - } - // Tunnels is a RPC method that returns all tunnels. rpc Tunnels(QueryTunnelsRequest) returns (QueryTunnelsResponse) { option (google.api.http).get = "/tunnel/v1beta1/tunnels"; @@ -35,6 +30,11 @@ service Query { rpc Packet(QueryPacketRequest) returns (QueryPacketResponse) { option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/packets/{nonce}"; } + + // Params is a RPC method that returns all parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/tunnel/v1beta1/params"; + } } // TunnelStatusFilter defines a filter for tunnel status. @@ -49,7 +49,7 @@ enum TunnelStatusFilter { TUNNEL_STATUS_FILTER_INACTIVE = 2; } -// QueryTunnelsRequest is the request type for the Query/Tunnel RPC method. +// QueryTunnelsRequest is the request type for the Query/Tunnels RPC method. message QueryTunnelsRequest { // status_filter is a flag to filter tunnels by status. TunnelStatusFilter status_filter = 1; @@ -57,7 +57,7 @@ message QueryTunnelsRequest { cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryTunnelsResponse is the response type for the Query/Tunnel RPC method. +// QueryTunnelsResponse is the response type for the Query/Tunnels RPC method. message QueryTunnelsResponse { // Tunnels is a list of tunnels. repeated Tunnel tunnels = 1; diff --git a/scripts/tunnel/create_tunnel.sh b/scripts/tunnel/create_tunnel.sh index d967fa737..628ceb54a 100644 --- a/scripts/tunnel/create_tunnel.sh +++ b/scripts/tunnel/create_tunnel.sh @@ -1 +1 @@ -bandd tx tunnel create tss evm-1 0x0001 1 1band 10 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain +bandd tx tunnel create-tunnel tss evm-1 0x0001 1 1uband 10 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/edit_tunnel.sh b/scripts/tunnel/edit_tunnel.sh new file mode 100644 index 000000000..8371813a5 --- /dev/null +++ b/scripts/tunnel/edit_tunnel.sh @@ -0,0 +1 @@ +bandd tx tunnel edit-tunnel 1 15 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index c7e96db25..e35cbbeea 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -10,7 +10,7 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -const flagTunnelStatusFilter = "status" +const flagTunnelActiveStatusFilter = "active" // GetQueryCmd returns the cli query commands for this module func GetQueryCmd() *cobra.Command { @@ -75,7 +75,7 @@ func GetQueryCmdTunnels() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - statusFilterFlag, err := cmd.Flags().GetBool(flagTunnelStatusFilter) + statusFilterFlag, err := cmd.Flags().GetBool(flagTunnelActiveStatusFilter) if err != nil { return err } @@ -86,7 +86,7 @@ func GetQueryCmdTunnels() *cobra.Command { } var statusFilter types.TunnelStatusFilter - if !cmd.Flags().Changed(flagTunnelStatusFilter) { + if !cmd.Flags().Changed(flagTunnelActiveStatusFilter) { statusFilter = types.TUNNEL_STATUS_FILTER_UNSPECIFIED } else if statusFilterFlag { statusFilter = types.TUNNEL_STATUS_FILTER_ACTIVE @@ -106,7 +106,7 @@ func GetQueryCmdTunnels() *cobra.Command { }, } - cmd.Flags().Bool(flagTunnelStatusFilter, false, "Filter tunnels by active status") + cmd.Flags().Bool(flagTunnelActiveStatusFilter, false, "Filter tunnels by active status") flags.AddPaginationFlagsToCmd(cmd, "tunnels") flags.AddQueryFlagsToCmd(cmd) diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index e1b3b88c7..c917ec27d 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -22,7 +22,7 @@ func GetTxCmd() *cobra.Command { RunE: client.ValidateCmd, } - txCmd.AddCommand(GetTxCmdCreateTunnels()) + txCmd.AddCommand(GetTxCmdCreateTunnel()) txCmd.AddCommand(GetTxCmdEditTunnel()) txCmd.AddCommand(GetTxCmdActivate()) txCmd.AddCommand(GetTxCmdDeactivate()) @@ -31,18 +31,17 @@ func GetTxCmd() *cobra.Command { return txCmd } -func GetTxCmdCreateTunnels() *cobra.Command { +func GetTxCmdCreateTunnel() *cobra.Command { txCmd := &cobra.Command{ - Use: "create", + Use: "create-tunnel", Short: "Create a new tunnel", DisableFlagParsing: true, RunE: client.ValidateCmd, } + // add create tunnel subcommands txCmd.AddCommand(GetTxCmdCreateTSSTunnel()) - flags.AddTxFlagsToCmd(txCmd) - return txCmd } @@ -101,7 +100,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { func GetTxCmdEditTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "edit [tunnel-id] [interval] [signalDeviations-json-file] ", + Use: "edit-tunnel [tunnel-id] [interval] [signalDeviations-json-file] ", Short: "Edit an existing tunnel", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { @@ -195,7 +194,7 @@ func GetTxCmdDeactivate() *cobra.Command { func GetTxCmdTriggerTunnel() *cobra.Command { cmd := &cobra.Command{ Use: "trigger [tunnel-id]", - Short: "Manual trigger a tunnel", + Short: "Trigger a tunnel to generate a new packet", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index 52fd90eee..b15e5eba4 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -20,13 +20,13 @@ type SignalDeviation struct { // ToSignalDeviations converts signal information to types.SignalDeviation, excluding soft deviation. // Note: Soft deviation may be utilized in the future for deviation adjustments. -func (sis SignalDeviations) ToSignalDeviations() []types.SignalDeviation { +func (ss SignalDeviations) ToSignalDeviations() []types.SignalDeviation { var signalDeviations []types.SignalDeviation - for _, si := range sis.SignalDeviations { + for _, sd := range ss.SignalDeviations { signalDeviation := types.SignalDeviation{ - SignalID: si.SignalID, - SoftDeviationBPS: si.DeviationBPS, - HardDeviationBPS: si.DeviationBPS, + SignalID: sd.SignalID, + SoftDeviationBPS: sd.DeviationBPS, + HardDeviationBPS: sd.DeviationBPS, } signalDeviations = append(signalDeviations, signalDeviation) } diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 3a9258bd9..80e5fe6e3 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -16,8 +16,8 @@ func ValidateGenesis(data *types.GenesisState) error { } // validate the tunnel IDs - for _, tunnel := range data.Tunnels { - if tunnel.ID > data.TunnelCount { + for _, t := range data.Tunnels { + if t.ID > data.TunnelCount { return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in tunnels") } } @@ -28,10 +28,13 @@ func ValidateGenesis(data *types.GenesisState) error { } // validate latest signal prices - for _, latestSignalPrices := range data.LatestSignalPricesList { - if latestSignalPrices.TunnelID == 0 || latestSignalPrices.TunnelID > data.TunnelCount { + for _, lsp := range data.LatestSignalPricesList { + if lsp.TunnelID == 0 || lsp.TunnelID > data.TunnelCount { return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in latest signal prices") } + if err := lsp.ValidateBasic(); err != nil { + return types.ErrInvalidGenesis.Wrapf("invalid latest signal prices: %s", err.Error()) + } } // validate the total fees @@ -62,10 +65,10 @@ func InitGenesis(ctx sdk.Context, k *Keeper, data *types.GenesisState) { k.SetTunnelCount(ctx, data.TunnelCount) // set tunnels - for _, tunnel := range data.Tunnels { - k.SetTunnel(ctx, tunnel) - if tunnel.IsActive { - k.ActiveTunnelID(ctx, tunnel.ID) + for _, t := range data.Tunnels { + k.SetTunnel(ctx, t) + if t.IsActive { + k.ActiveTunnelID(ctx, t.ID) } } diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index 384175527..a174bdb39 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -19,25 +19,6 @@ func TestValidateGenesis(t *testing.T) { requireErr bool errMsg string }{ - { - name: "valid genesis state", - genesis: &types.GenesisState{ - Tunnels: []types.Tunnel{ - {ID: 1}, - {ID: 2}, - }, - TunnelCount: 2, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1}, - {TunnelID: 2}, - }, - TotalFees: types.TotalFees{ - TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), - }, - Params: types.DefaultParams(), - }, - requireErr: false, - }, { name: "length of tunnels does not match tunnel count", genesis: &types.GenesisState{ @@ -103,6 +84,24 @@ func TestValidateGenesis(t *testing.T) { requireErr: true, errMsg: "tunnel count mismatch", }, + { + name: "invalid latest signal prices", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + TunnelCount: 1, + LatestSignalPricesList: []types.LatestSignalPrices{ + { + TunnelID: 1, + SignalPrices: []types.SignalPrice{}, + }, + }, + TotalFees: types.TotalFees{}, + }, + requireErr: true, + errMsg: "invalid latest signal prices", + }, { name: "invalid total fee", genesis: &types.GenesisState{ @@ -111,7 +110,12 @@ func TestValidateGenesis(t *testing.T) { }, TunnelCount: 1, LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1}, + { + TunnelID: 1, + SignalPrices: []types.SignalPrice{ + {SignalID: "ETH", Price: 5000}, + }, + }, }, TotalFees: types.TotalFees{ TotalPacketFee: sdk.Coins{ @@ -122,6 +126,35 @@ func TestValidateGenesis(t *testing.T) { requireErr: true, errMsg: "invalid total fees", }, + { + name: "all good", + genesis: &types.GenesisState{ + Tunnels: []types.Tunnel{ + {ID: 1}, + {ID: 2}, + }, + TunnelCount: 2, + LatestSignalPricesList: []types.LatestSignalPrices{ + { + TunnelID: 1, + SignalPrices: []types.SignalPrice{ + {SignalID: "ETH", Price: 5000}, + }, + }, + { + TunnelID: 2, + SignalPrices: []types.SignalPrice{ + {SignalID: "ETH", Price: 5000}, + }, + }, + }, + TotalFees: types.TotalFees{ + TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdk.NewInt(100))), + }, + Params: types.DefaultParams(), + }, + requireErr: false, + }, } for _, tt := range tests { diff --git a/x/tunnel/keeper/latest_signal_prices.go b/x/tunnel/keeper/latest_signal_prices.go index 736163e96..3044f50fd 100644 --- a/x/tunnel/keeper/latest_signal_prices.go +++ b/x/tunnel/keeper/latest_signal_prices.go @@ -16,7 +16,7 @@ func (k Keeper) SetLatestSignalPrices(ctx sdk.Context, latestSignalPrices types. func (k Keeper) GetLatestSignalPrices(ctx sdk.Context, tunnelID uint64) (types.LatestSignalPrices, error) { bz := ctx.KVStore(k.storeKey).Get(types.LatestSignalPricesStoreKey(tunnelID)) if bz == nil { - return types.LatestSignalPrices{}, types.ErrSignalPricesInfoNotFound.Wrapf("tunnelID: %d", tunnelID) + return types.LatestSignalPrices{}, types.ErrLatestSignalPricesNotFound.Wrapf("tunnelID: %d", tunnelID) } var latestSignalPrices types.LatestSignalPrices diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index f52a6936b..a61ff20f1 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -136,8 +136,7 @@ func (ms msgServer) Activate( return nil, types.ErrAlreadyActive.Wrapf("tunnelID %d", req.TunnelID) } - err = ms.Keeper.ActivateTunnel(ctx, req.TunnelID) - if err != nil { + if err := ms.Keeper.ActivateTunnel(ctx, req.TunnelID); err != nil { return nil, err } @@ -164,8 +163,7 @@ func (ms msgServer) Deactivate( return nil, types.ErrAlreadyInactive.Wrapf("tunnelID %d", req.TunnelID) } - err = ms.Keeper.DeactivateTunnel(ctx, req.TunnelID) - if err != nil { + if err := ms.Keeper.DeactivateTunnel(ctx, req.TunnelID); err != nil { return nil, err } @@ -195,7 +193,7 @@ func (ms msgServer) TriggerTunnel( } currentPrices := ms.Keeper.feedsKeeper.GetCurrentPrices(ctx) - currentPricesMap := createCurrentPricesMap(currentPrices) + currentPricesMap := createPricesMap(currentPrices) // produce packet with trigger all signals if err := ms.Keeper.ProducePacket(ctx, tunnel.ID, currentPricesMap, true); err != nil { @@ -203,7 +201,7 @@ func (ms msgServer) TriggerTunnel( } ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeManualTriggerTunnel, + types.EventTypeTriggerTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), )) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index a44b7f5ba..a53277ee5 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -59,7 +59,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { ids := k.GetActiveTunnelIDs(ctx) currentPrices := k.feedsKeeper.GetCurrentPrices(ctx) - currentPricesMap := createCurrentPricesMap(currentPrices) + currentPricesMap := createPricesMap(currentPrices) // check for active tunnels for _, id := range ids { @@ -102,7 +102,8 @@ func (k Keeper) ProducePacket( latestSignalPrices := k.MustGetLatestSignalPrices(ctx, tunnelID) // check if the interval has passed - intervalTrigger := ctx.BlockTime().Unix() >= int64(tunnel.Interval)+latestSignalPrices.Timestamp + intervalTrigger := unixNow >= int64(tunnel.Interval)+latestSignalPrices.Timestamp + triggerAll = triggerAll || intervalTrigger // generate new signal prices nsps := GenerateSignalPrices( @@ -110,7 +111,7 @@ func (k Keeper) ProducePacket( currentPricesMap, tunnel.GetSignalDeviationMap(), latestSignalPrices.SignalPrices, - triggerAll || intervalTrigger, + triggerAll, ) // return if no new signal prices @@ -124,20 +125,22 @@ func (k Keeper) ProducePacket( return sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) } - newPacket := types.NewPacket(tunnel.ID, tunnel.NonceCount+1, nsps, nil, unixNow) + // increment nonce count + tunnel.NonceCount++ + + newPacket := types.NewPacket(tunnel.ID, tunnel.NonceCount, nsps, nil, unixNow) if err := k.SendPacket(ctx, tunnel, newPacket); err != nil { return sdkerrors.Wrapf(err, "route %s failed to send packet", tunnel.Route.TypeUrl) } // update signal prices info latestSignalPrices.UpdateSignalPrices(nsps) - if triggerAll || intervalTrigger { + if triggerAll { latestSignalPrices.Timestamp = unixNow } k.SetLatestSignalPrices(ctx, latestSignalPrices) - // update tunnel nonce count - tunnel.NonceCount++ + // update nonce count k.SetTunnel(ctx, tunnel) return nil @@ -168,7 +171,7 @@ func (k Keeper) SendPacket( // set the packet content if err := packet.SetPacketContent(content); err != nil { - panic(fmt.Sprintf("failed to set packet content: %s", err)) + return sdkerrors.Wrapf(err, "failed to set packet content for tunnel ID: %d", tunnel.ID) } // set the packet in the store @@ -227,17 +230,17 @@ func deviationExceedsThreshold(oldPrice, newPrice, thresholdBPS sdkmath.Int) boo // if the deviation is greater than the hard deviation, add the signal price info to the list // soft deviation is the feature to be implemented in the future - deviation := newPrice.Sub(oldPrice).Abs().Quo(oldPrice) + // deviationInBPS = |(newPrice - oldPrice)| * 10000 / oldPrice + deviationInBPS := newPrice.Sub(oldPrice).Abs().MulRaw(10000).Quo(oldPrice) - deviationInBPS := deviation.MulRaw(10000) return deviationInBPS.GTE(thresholdBPS) } -// createCurrentPricesMap creates a map of current prices with signal ID as the key -func createCurrentPricesMap(latestPrices []feedstypes.Price) map[string]feedstypes.Price { - latestPricesMap := make(map[string]feedstypes.Price, len(latestPrices)) - for _, price := range latestPrices { - latestPricesMap[price.SignalID] = price +// createPricesMap creates a map of prices with signal ID as the key +func createPricesMap(prices []feedstypes.Price) map[string]feedstypes.Price { + pricesMap := make(map[string]feedstypes.Price, len(prices)) + for _, p := range prices { + pricesMap[p.SignalID] = p } - return latestPricesMap + return pricesMap } diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 7847a4aef..14f3cbea9 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -74,8 +74,8 @@ func (k Keeper) EditTunnel( // edit the signal prices info var signalPrices []types.SignalPrice - for _, sp := range signalDeviations { - signalPrices = append(signalPrices, types.NewSignalPrice(sp.SignalID, 0)) + for _, sd := range signalDeviations { + signalPrices = append(signalPrices, types.NewSignalPrice(sd.SignalID, 0)) } k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, signalPrices, 0)) @@ -84,9 +84,9 @@ func (k Keeper) EditTunnel( sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), ) - for _, signalDeviation := range signalDeviations { + for _, sd := range signalDeviations { event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeySignalPriceInfos, signalDeviation.String()), + sdk.NewAttribute(types.AttributeKeySignalPriceInfos, sd.String()), ) } ctx.EventManager().EmitEvent(event) @@ -182,7 +182,7 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { k.SetTunnel(ctx, tunnel) ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeActivateTunnel, + types.EventTypeActivate, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", true)), )) @@ -205,7 +205,7 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { k.SetTunnel(ctx, tunnel) ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeDeactivateTunnel, + types.EventTypeDeactivate, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), )) @@ -215,8 +215,7 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { // MustDeactivateTunnel deactivates a tunnel and panics if the tunnel does not exist func (k Keeper) MustDeactivateTunnel(ctx sdk.Context, tunnelID uint64) { - err := k.DeactivateTunnel(ctx, tunnelID) - if err != nil { + if err := k.DeactivateTunnel(ctx, tunnelID); err != nil { panic(err) } } diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 79085f163..96795fa0a 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -6,17 +6,17 @@ import ( // x/tunnel module sentinel errors var ( - ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") - ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") - ErrIntervalTooLow = errorsmod.Register(ModuleName, 4, "interval too low") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") - ErrSignalPricesInfoNotFound = errorsmod.Register(ModuleName, 6, "signal prices info not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 8, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of the tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") - ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") - ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") - ErrAlreadyActive = errorsmod.Register(ModuleName, 13, "already active") - ErrAlreadyInactive = errorsmod.Register(ModuleName, 14, "already inactive") + ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") + ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") + ErrIntervalTooLow = errorsmod.Register(ModuleName, 4, "interval too low") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") + ErrLatestSignalPricesNotFound = errorsmod.Register(ModuleName, 6, "latest signal prices not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 8, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of the tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") + ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") + ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") + ErrAlreadyActive = errorsmod.Register(ModuleName, 13, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 14, "already inactive") ) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index ba8b4e378..4497e1851 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,13 +2,13 @@ package types // events const ( - EventTypeUpdateParams = "update_params" - EventTypeCreateTunnel = "create_tunnel" - EventTypeEditTunnel = "edit_tunnel" - EventTypeActivateTunnel = "activate_tunnel" - EventTypeDeactivateTunnel = "deactivate_tunnel" - EventTypeManualTriggerTunnel = "manual_trigger_tunnel" - EventTypeProducePacketFail = "produce_packet_fail" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeEditTunnel = "edit_tunnel" + EventTypeActivate = "activate" + EventTypeDeactivate = "deactivate" + EventTypeTriggerTunnel = "trigger_tunnel" + EventTypeProducePacketFail = "produce_packet_fail" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index cf96e0fae..a88ec11b4 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -74,7 +74,7 @@ func NewMsgCreateAxelarTunnel( initialDeposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { - r := &TSSRoute{ + r := &AxelarRoute{ DestinationChainID: destinationChainID, DestinationContractAddress: destinationContractAddress, } @@ -110,6 +110,10 @@ func (m MsgCreateTunnel) ValidateBasic() error { if len(m.SignalDeviations) == 0 { return sdkerrors.ErrInvalidRequest.Wrapf("signal deviations cannot be empty") } + // signal deviations cannot duplicate + if err := validateUniqueSignalIDs(m.SignalDeviations); err != nil { + return err + } // route must be valid r, ok := m.Route.GetCachedValue().(RouteI) @@ -125,15 +129,10 @@ func (m MsgCreateTunnel) ValidateBasic() error { return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) } - err := validateUniqueSignalIDs(m.SignalDeviations) - if err != nil { - return err - } - return nil } -// SetRoute sets the route for the message. +// SetTunnelRoute sets the route of the tunnel. func (m *MsgCreateTunnel) SetTunnelRoute(route RouteI) error { msg, ok := route.(proto.Message) if !ok { @@ -154,7 +153,7 @@ func (m MsgCreateTunnel) UnpackInterfaces(unpacker types.AnyUnpacker) error { return unpacker.UnpackAny(m.Route, &route) } -// GetRoute returns the route of the message. +// GetTunnelRoute returns the route of the tunnel. func (m MsgCreateTunnel) GetTunnelRoute() RouteI { route, ok := m.Route.GetCachedValue().(RouteI) if !ok { @@ -199,8 +198,12 @@ func (m MsgEditTunnel) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - err := validateUniqueSignalIDs(m.SignalDeviations) - if err != nil { + // signal deviations cannot be empty + if len(m.SignalDeviations) == 0 { + return sdkerrors.ErrInvalidRequest.Wrapf("signal deviations cannot be empty") + } + // signal deviations cannot duplicate + if err := validateUniqueSignalIDs(m.SignalDeviations); err != nil { return err } @@ -346,11 +349,11 @@ func (m *MsgUpdateParams) ValidateBasic() error { // validateUniqueSignalIDs checks if the SignalIDs in the given slice are unique func validateUniqueSignalIDs(signalDeviations []SignalDeviation) error { signalIDMap := make(map[string]bool) - for _, signalDeviation := range signalDeviations { - if _, ok := signalIDMap[signalDeviation.SignalID]; ok { - return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", signalDeviation.SignalID) + for _, sd := range signalDeviations { + if _, found := signalIDMap[sd.SignalID]; found { + return sdkerrors.ErrInvalidRequest.Wrapf("duplicate signal ID: %s", sd.SignalID) } - signalIDMap[signalDeviation.SignalID] = true + signalIDMap[sd.SignalID] = true } return nil } diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 6532ba0bf..a147a257a 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -62,7 +62,7 @@ func (TunnelStatusFilter) EnumDescriptor() ([]byte, []int) { return fileDescriptor_220124e1821d297e, []int{0} } -// QueryTunnelsRequest is the request type for the Query/Tunnel RPC method. +// QueryTunnelsRequest is the request type for the Query/Tunnels RPC method. type QueryTunnelsRequest struct { // status_filter is a flag to filter tunnels by status. StatusFilter TunnelStatusFilter `protobuf:"varint,1,opt,name=status_filter,json=statusFilter,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"status_filter,omitempty"` @@ -117,7 +117,7 @@ func (m *QueryTunnelsRequest) GetPagination() *query.PageRequest { return nil } -// QueryTunnelsResponse is the response type for the Query/Tunnel RPC method. +// QueryTunnelsResponse is the response type for the Query/Tunnels RPC method. type QueryTunnelsResponse struct { // Tunnels is a list of tunnels. Tunnels []*Tunnel `protobuf:"bytes,1,rep,name=tunnels,proto3" json:"tunnels,omitempty"` @@ -575,53 +575,53 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 723 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x4f, 0x13, 0x4d, - 0x18, 0xee, 0xf2, 0x95, 0xf2, 0x7d, 0xc3, 0x27, 0x21, 0x63, 0x83, 0x75, 0xd1, 0xa5, 0x6e, 0x51, - 0x09, 0xc4, 0x1d, 0x29, 0x7a, 0xf2, 0x04, 0xd8, 0x92, 0x8d, 0xa4,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xfb, 0xf0, - 0x83, 0x02, 0x46, 0xe4, 0xf0, 0xc1, 0xb4, 0x3a, 0xf6, 0xef, 0x85, 0x14, 0xdf, 0x67, 0xe6, 0x57, - 0x5f, 0xe0, 0x1a, 0xee, 0xc1, 0xb9, 0x0b, 0x68, 0x40, 0xe1, 0x08, 0x1f, 0x28, 0x41, 0xdb, 0x83, - 0xdf, 0xa9, 0x6d, 0xef, 0x1b, 0x49, 0xb5, 0x34, 0x10, 0x23, 0x85, 0x3c, 0xe2, 0x42, 0x1e, 0xc2, - 0x85, 0xbf, 0x10, 0x82, 0xf6, 0xf8, 0x00, 0xef, 0x2f, 0x99, 0x87, 0xc7, 0x9a, 0x72, 0x74, 0xac, - 0x29, 0x3f, 0x8f, 0x35, 0xe5, 0xe3, 0x89, 0x96, 0x39, 0x3a, 0xd1, 0x32, 0xdf, 0x4f, 0xb4, 0xcc, - 0x73, 0x64, 0x3b, 0xfe, 0x66, 0xaf, 0x65, 0xb4, 0xe9, 0x16, 0x6a, 0x61, 0x77, 0x83, 0xff, 0x0f, - 0xb6, 0x69, 0x07, 0xb5, 0x37, 0xb1, 0xe3, 0xa2, 0x9d, 0x32, 0x7a, 0x15, 0x12, 0xfa, 0xbb, 0x1e, - 0x61, 0xad, 0x1c, 0x47, 0x2c, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x76, 0xfb, 0x18, 0xf1, 0xf1, - 0x07, 0x00, 0x00, + // 721 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xc1, 0x4f, 0x13, 0x4f, + 0x14, 0xc7, 0x3b, 0xfc, 0x4a, 0xf9, 0x39, 0x28, 0x21, 0x63, 0x83, 0xb5, 0xe8, 0x52, 0xb7, 0xa8, + 0x04, 0xe2, 0x8e, 0x14, 0x3d, 0x79, 0x02, 0x6c, 0x49, 0x23, 0x69, 0x70, 0x5b, 0x3c, 0x78, 0x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8, 0xe9, 0x00, 0xc0, 0x8c, 0x4c, 0x94, 0x30, 0x8c, 0x88, 0x3f, 0xf2, 0xc5, 0x81, + 0x1a, 0x05, 0xf2, 0x48, 0x80, 0x3c, 0x44, 0x0b, 0xff, 0x00, 0x82, 0xf7, 0x84, 0x9b, 0xf6, 0xd1, + 0xb6, 0xcf, 0xe3, 0x5f, 0xd7, 0x44, 0x9e, 0x3e, 0x7f, 0x24, 0xf2, 0xf4, 0xbb, 0x45, 0xd7, 0x04, + 0x4f, 0x0e, 0x4d, 0xe0, 0xd8, 0x5f, 0xdf, 0x52, 0xf5, 0xf0, 0x58, 0x03, 0x47, 0xc7, 0x1a, 0xf8, + 0x79, 0xac, 0x81, 0x8f, 0x27, 0x5a, 0xea, 0xe8, 0x44, 0x4b, 0x7d, 0x3f, 0xd1, 0x52, 0xcf, 0xb1, + 0x65, 0x7b, 0x9b, 0xbd, 0x96, 0xd1, 0x66, 0x5b, 0xb8, 0x45, 0x9c, 0x0d, 0xf1, 0x1f, 0x6c, 0xb3, + 0x0e, 0x6e, 0x6f, 0x12, 0xdb, 0xc1, 0x3b, 0x25, 0xfc, 0x2a, 0xc8, 0xe9, 0xed, 0xba, 0x94, 0xb7, + 0x32, 0x42, 0xb1, 0xf0, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x34, 0xfa, 0xa1, 0xf1, 0x07, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -636,8 +636,6 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Params is a RPC method that returns all parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Tunnels is a RPC method that returns all tunnels. Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) // Tunnel is a RPC method that returns a tunnel by its ID. @@ -646,6 +644,8 @@ type QueryClient interface { Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) // Packet is a RPC method that returns a packet by its tunnel ID and nonce. Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) + // Params is a RPC method that returns all parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } type queryClient struct { @@ -656,15 +656,6 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) { out := new(QueryTunnelsResponse) err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Tunnels", in, out, opts...) @@ -701,10 +692,17 @@ func (c *queryClient) Packet(ctx context.Context, in *QueryPacketRequest, opts . return out, nil } +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { - // Params is a RPC method that returns all parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Tunnels is a RPC method that returns all tunnels. Tunnels(context.Context, *QueryTunnelsRequest) (*QueryTunnelsResponse, error) // Tunnel is a RPC method that returns a tunnel by its ID. @@ -713,15 +711,14 @@ type QueryServer interface { Packets(context.Context, *QueryPacketsRequest) (*QueryPacketsResponse, error) // Packet is a RPC method that returns a packet by its tunnel ID and nonce. Packet(context.Context, *QueryPacketRequest) (*QueryPacketResponse, error) + // Params is a RPC method that returns all parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} func (*UnimplementedQueryServer) Tunnels(ctx context.Context, req *QueryTunnelsRequest) (*QueryTunnelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Tunnels not implemented") } @@ -734,29 +731,14 @@ func (*UnimplementedQueryServer) Packets(ctx context.Context, req *QueryPacketsR func (*UnimplementedQueryServer) Packet(ctx context.Context, req *QueryPacketRequest) (*QueryPacketResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Packet not implemented") } +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/tunnel.v1beta1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_Tunnels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryTunnelsRequest) if err := dec(in); err != nil { @@ -829,14 +811,28 @@ func _Query_Packet_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tunnel.v1beta1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "tunnel.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, { MethodName: "Tunnels", Handler: _Query_Tunnels_Handler, @@ -853,6 +849,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Packet", Handler: _Query_Packet_Handler, }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "tunnel/v1beta1/query.proto", diff --git a/x/tunnel/types/query.pb.gw.go b/x/tunnel/types/query.pb.gw.go index 36dbbecfa..8bfe27c77 100644 --- a/x/tunnel/types/query.pb.gw.go +++ b/x/tunnel/types/query.pb.gw.go @@ -33,24 +33,6 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Query_Tunnels_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -289,13 +271,31 @@ func local_request_Query_Packet_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Tunnels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -306,7 +306,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Tunnels_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -314,11 +314,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Tunnels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Tunnels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Tunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -329,7 +329,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Tunnels_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Tunnel_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -337,11 +337,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Tunnels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Tunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Tunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Packets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -352,7 +352,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Tunnel_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Packets_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -360,11 +360,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Tunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Packets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Packets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Packet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -375,7 +375,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Packets_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Packet_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -383,11 +383,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Packets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Packet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Packet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -398,7 +398,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Packet_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -406,7 +406,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_Packet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -451,7 +451,7 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Tunnels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -460,18 +460,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Tunnels_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Tunnels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Tunnels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Tunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -480,18 +480,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Tunnels_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Tunnel_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_Tunnels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Tunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Tunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Packets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -500,18 +500,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Tunnel_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Packets_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_Tunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Packets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Packets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Packet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -520,18 +520,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Packets_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Packet_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_Packets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Packet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_Packet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -540,14 +540,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Packet_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_Packet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -555,8 +555,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Tunnels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "tunnels"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Tunnel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id"}, "", runtime.AssumeColonVerbOpt(false))) @@ -564,11 +562,11 @@ var ( pattern_Query_Packets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Packet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_Tunnels_0 = runtime.ForwardResponseMessage forward_Query_Tunnel_0 = runtime.ForwardResponseMessage @@ -576,4 +574,6 @@ var ( forward_Query_Packets_0 = runtime.ForwardResponseMessage forward_Query_Packet_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage ) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index af675a5fd..1fb0da8dd 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -60,8 +60,22 @@ func (t *Tunnel) SetRoute(route RouteI) error { // GetSignalDeviationMap returns the signal deviation map of the tunnel. func (t Tunnel) GetSignalDeviationMap() map[string]SignalDeviation { signalDeviationMap := make(map[string]SignalDeviation, len(t.SignalDeviations)) - for _, si := range t.SignalDeviations { - signalDeviationMap[si.SignalID] = si + for _, sd := range t.SignalDeviations { + signalDeviationMap[sd.SignalID] = sd } return signalDeviationMap } + +// ValidateBasic performs basic validation of the LatestSignalPrices. +func (l LatestSignalPrices) ValidateBasic() error { + if l.TunnelID == 0 { + return fmt.Errorf("tunnel ID cannot be 0") + } + if len(l.SignalPrices) == 0 { + return fmt.Errorf("signal prices cannot be empty") + } + if l.Timestamp < 0 { + return fmt.Errorf("timestamp cannot be negative") + } + return nil +} From eb8d5c64c578d8eb4f470833909c44cd50e4d97d Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 23 Sep 2024 15:29:36 +0700 Subject: [PATCH 144/272] update words --- x/tunnel/types/signal.go | 6 +++--- x/tunnel/types/tunnel.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index f530bc16f..a8a61ae9d 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -27,7 +27,7 @@ func NewLatestSignalPrices( } // UpdateSignalPrices updates the signal prices in the latest signal prices. -func (lsps *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { +func (latestSignalPrices *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { // create a map of new signal prices newSpMap := make(map[string]SignalPrice) for _, sp := range newSignalPrices { @@ -35,9 +35,9 @@ func (lsps *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice } // update signal prices - for i, sp := range lsps.SignalPrices { + for i, sp := range latestSignalPrices.SignalPrices { if newSp, ok := newSpMap[sp.SignalID]; ok { - lsps.SignalPrices[i] = newSp + latestSignalPrices.SignalPrices[i] = newSp } } } diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 1fb0da8dd..5f768776e 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -67,14 +67,14 @@ func (t Tunnel) GetSignalDeviationMap() map[string]SignalDeviation { } // ValidateBasic performs basic validation of the LatestSignalPrices. -func (l LatestSignalPrices) ValidateBasic() error { - if l.TunnelID == 0 { +func (latestSignalPrices LatestSignalPrices) ValidateBasic() error { + if latestSignalPrices.TunnelID == 0 { return fmt.Errorf("tunnel ID cannot be 0") } - if len(l.SignalPrices) == 0 { + if len(latestSignalPrices.SignalPrices) == 0 { return fmt.Errorf("signal prices cannot be empty") } - if l.Timestamp < 0 { + if latestSignalPrices.Timestamp < 0 { return fmt.Errorf("timestamp cannot be negative") } return nil From 9d6f7049220c54eb1938154e2ee429ec6d37d707 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 23 Sep 2024 16:48:07 +0700 Subject: [PATCH 145/272] fix comment --- x/tunnel/keeper/tunnel.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 99d2f79eb..06b224a8e 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -175,6 +175,12 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { return err } + // verify if the total deposit meets or exceeds the minimum required deposit + minDeposit := k.GetParams(ctx).MinDeposit + if !tunnel.TotalDeposit.IsAllGTE(minDeposit) { + return types.ErrInsufficientDeposit + } + // add the tunnel ID to the active tunnel IDs k.ActiveTunnelID(ctx, tunnelID) From 3f67a6ca567da7008bae2d34605da7a3213b349e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 23 Sep 2024 16:49:39 +0700 Subject: [PATCH 146/272] update validate --- x/tunnel/types/msgs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index a88ec11b4..f5bf4a4a7 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -124,8 +124,8 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } - // initialDeposit deposit must be positive - if !m.InitialDeposit.IsValid() { + // initial deposit must be valid and non-negative + if !m.InitialDeposit.IsValid() || m.InitialDeposit.IsAnyNegative() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) } From d6daa3e8930270623222c81ffc1d45e4d45d5147 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 23 Sep 2024 17:13:37 +0700 Subject: [PATCH 147/272] update checking logic --- x/tunnel/keeper/keeper_test.go | 21 +++++++++++++++------ x/tunnel/keeper/msg_server.go | 2 +- x/tunnel/keeper/packet_test.go | 13 +++++++++++++ x/tunnel/keeper/tunnel_test.go | 2 ++ 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go index d271c2dc8..2bf0a09c7 100644 --- a/x/tunnel/keeper/keeper_test.go +++ b/x/tunnel/keeper/keeper_test.go @@ -79,11 +79,13 @@ func (s *KeeperTestSuite) reset() { } func (s *KeeperTestSuite) AddSampleTunnel(isActive bool) { + ctx, k := s.ctx, s.keeper + s.accountKeeper.EXPECT(). - GetAccount(s.ctx, gomock.Any()). + GetAccount(ctx, gomock.Any()). Return(nil).Times(1) - s.accountKeeper.EXPECT().NewAccount(s.ctx, gomock.Any()).Times(1) - s.accountKeeper.EXPECT().SetAccount(s.ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) signalDeviations := []types.SignalDeviation{ { @@ -99,8 +101,8 @@ func (s *KeeperTestSuite) AddSampleTunnel(isActive bool) { routeAny, err := codectypes.NewAnyWithValue(route) s.Require().NoError(err) - tunnel, err := s.keeper.AddTunnel( - s.ctx, + tunnel, err := k.AddTunnel( + ctx, routeAny, types.ENCODER_FIXED_POINT_ABI, signalDeviations, @@ -110,7 +112,14 @@ func (s *KeeperTestSuite) AddSampleTunnel(isActive bool) { s.Require().NoError(err) if isActive { - err := s.keeper.ActivateTunnel(s.ctx, tunnel.ID) + tunnel, err := k.GetTunnel(ctx, tunnel.ID) + s.Require().NoError(err) + + // set deposit to the tunnel to be able to activate + tunnel.TotalDeposit = append(tunnel.TotalDeposit, k.GetParams(ctx).MinDeposit...) + k.SetTunnel(ctx, tunnel) + + err = k.ActivateTunnel(ctx, tunnel.ID) s.Require().NoError(err) } } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index bc0d9ed3e..b36438fec 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -56,7 +56,7 @@ func (ms msgServer) CreateTunnel( } // Deposit the initial deposit to the tunnel - if req.InitialDeposit.IsAllPositive() { + if !req.InitialDeposit.IsZero() { if err := ms.Keeper.AddDeposit(ctx, tunnel.ID, creator, req.InitialDeposit); err != nil { return nil, err } diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 5962f787b..c29aa5a72 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -77,9 +77,14 @@ func (s *KeeperTestSuite) TestProducePacket() { err := tunnel.SetRoute(route) s.Require().NoError(err) + // set deposit to the tunnel to be able to activate + tunnel.TotalDeposit = append(tunnel.TotalDeposit, k.GetParams(ctx).MinDeposit...) + k.SetTunnel(ctx, tunnel) + err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) + k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ {SignalID: "BTC/USD", Price: 0}, }, 0)) @@ -122,9 +127,13 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { err = k.SetParams(ctx, defaultParams) s.Require().NoError(err) + // set deposit to the tunnel to be able to activate + tunnel.TotalDeposit = append(tunnel.TotalDeposit, k.GetParams(ctx).MinDeposit...) k.SetTunnel(ctx, tunnel) + err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) + k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ {SignalID: "BTC/USD", Price: 0}, }, 0)) @@ -172,9 +181,13 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { err = k.SetParams(ctx, defaultParams) s.Require().NoError(err) + // set deposit to the tunnel to be able to activate + tunnel.TotalDeposit = append(tunnel.TotalDeposit, k.GetParams(ctx).MinDeposit...) k.SetTunnel(ctx, tunnel) + err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) + k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ {SignalID: "BTC/USD", Price: 0}, }, 0)) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index ce70a522c..b1bee34ae 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -181,10 +181,12 @@ func (s *KeeperTestSuite) TestActivateTunnel() { Encoder: encoder, SignalDeviations: signalDeviations, Interval: interval, + TotalDeposit: k.GetParams(ctx).MinDeposit, Creator: creator, IsActive: false, CreatedAt: ctx.BlockTime().Unix(), } + k.SetTunnel(ctx, tunnel) err := k.ActivateTunnel(ctx, tunnelID) From c04f5aa985f46ff13373020f3d0a1c76fdc4da15 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 24 Sep 2024 11:26:24 +0700 Subject: [PATCH 148/272] clean up --- x/tunnel/keeper/genesis.go | 2 +- x/tunnel/types/keys.go | 20 ++++++++++++-------- x/tunnel/types/msgs.go | 4 ++-- x/tunnel/types/signal.go | 16 ++++++++++++++++ x/tunnel/types/tunnel.go | 14 -------------- 5 files changed, 31 insertions(+), 25 deletions(-) diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 80e5fe6e3..4ed8ee28c 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -32,7 +32,7 @@ func ValidateGenesis(data *types.GenesisState) error { if lsp.TunnelID == 0 || lsp.TunnelID > data.TunnelCount { return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in latest signal prices") } - if err := lsp.ValidateBasic(); err != nil { + if err := lsp.Validate(); err != nil { return types.ErrInvalidGenesis.Wrapf("invalid latest signal prices: %s", err.Error()) } } diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index d26c21783..48381ff57 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -26,37 +26,41 @@ const ( ) var ( - TunnelCountStoreKey = []byte{0x00} - + // global store keys + TunnelCountStoreKey = []byte{0x00} TotalPacketFeeStoreKey = []byte{0x01} - ActiveTunnelIDStoreKeyPrefix = []byte{0x10} - - TunnelStoreKeyPrefix = []byte{0x11} - - PacketStoreKeyPrefix = []byte{0x12} - + // store prefixes + ActiveTunnelIDStoreKeyPrefix = []byte{0x10} + TunnelStoreKeyPrefix = []byte{0x11} + PacketStoreKeyPrefix = []byte{0x12} LatestSignalPricesStoreKeyPrefix = []byte{0x13} + // params store keys ParamsKey = []byte{0x90} ) +// TunnelStoreKey returns the key to retrieve a specific tunnel from the store. func TunnelStoreKey(tunnelID uint64) []byte { return append(TunnelStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } +// ActiveTunnelIDStoreKey returns the key to retrieve a specific active tunnel ID from the store. func ActiveTunnelIDStoreKey(tunnelID uint64) []byte { return append(ActiveTunnelIDStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } +// TunnelPacketsStoreKey returns the key to retrieve all packets of a tunnel from the store. func TunnelPacketsStoreKey(tunnelID uint64) []byte { return append(PacketStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } +// TunnelPacketStoreKey returns the key to retrieve a packet of a tunnel from the store. func TunnelPacketStoreKey(tunnelID uint64, packetID uint64) []byte { return append(TunnelPacketsStoreKey(tunnelID), sdk.Uint64ToBigEndian(packetID)...) } +// LatestSignalPricesStoreKey returns the key to retrieve the latest signal prices from the store. func LatestSignalPricesStoreKey(tunnelID uint64) []byte { return append(LatestSignalPricesStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index f5bf4a4a7..6d50fa56a 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -124,8 +124,8 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } - // initial deposit must be valid and non-negative - if !m.InitialDeposit.IsValid() || m.InitialDeposit.IsAnyNegative() { + // initial deposit must be valid + if !m.InitialDeposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) } diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index a8a61ae9d..9a62d75a9 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -1,5 +1,7 @@ package types +import "fmt" + // NewSignalDeviation creates a new SignalDeviation instance. func NewSignalDeviation( signalID string, @@ -26,6 +28,20 @@ func NewLatestSignalPrices( } } +// Validate validates the latest signal prices. +func (latestSignalPrices LatestSignalPrices) Validate() error { + if latestSignalPrices.TunnelID == 0 { + return fmt.Errorf("tunnel ID cannot be 0") + } + if len(latestSignalPrices.SignalPrices) == 0 { + return fmt.Errorf("signal prices cannot be empty") + } + if latestSignalPrices.Timestamp < 0 { + return fmt.Errorf("timestamp cannot be negative") + } + return nil +} + // UpdateSignalPrices updates the signal prices in the latest signal prices. func (latestSignalPrices *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { // create a map of new signal prices diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 5f768776e..587adf1ea 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -65,17 +65,3 @@ func (t Tunnel) GetSignalDeviationMap() map[string]SignalDeviation { } return signalDeviationMap } - -// ValidateBasic performs basic validation of the LatestSignalPrices. -func (latestSignalPrices LatestSignalPrices) ValidateBasic() error { - if latestSignalPrices.TunnelID == 0 { - return fmt.Errorf("tunnel ID cannot be 0") - } - if len(latestSignalPrices.SignalPrices) == 0 { - return fmt.Errorf("signal prices cannot be empty") - } - if latestSignalPrices.Timestamp < 0 { - return fmt.Errorf("timestamp cannot be negative") - } - return nil -} From 0e2b3d129a7d48dd4b46175725a11114a3abd39c Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 24 Sep 2024 11:34:26 +0700 Subject: [PATCH 149/272] update validate --- x/tunnel/keeper/genesis.go | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 4ed8ee28c..20e4cc999 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -8,6 +8,27 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +// validateLastSignalPricesList validates the latest signal prices list. +func validateLastSignalPricesList( + tunnels []types.Tunnel, + lsps []types.LatestSignalPrices, +) error { + tunnelMap := make(map[uint64]bool) + for _, t := range tunnels { + tunnelMap[t.ID] = true + } + + for _, lsp := range lsps { + if _, ok := tunnelMap[lsp.TunnelID]; !ok { + return fmt.Errorf("tunnel ID %d not found in tunnels", lsp.TunnelID) + } + if err := lsp.Validate(); err != nil { + return err + } + } + return nil +} + // ValidateGenesis validates the provided genesis state. func ValidateGenesis(data *types.GenesisState) error { // validate the tunnel count @@ -28,13 +49,8 @@ func ValidateGenesis(data *types.GenesisState) error { } // validate latest signal prices - for _, lsp := range data.LatestSignalPricesList { - if lsp.TunnelID == 0 || lsp.TunnelID > data.TunnelCount { - return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in latest signal prices") - } - if err := lsp.Validate(); err != nil { - return types.ErrInvalidGenesis.Wrapf("invalid latest signal prices: %s", err.Error()) - } + if err := validateLastSignalPricesList(data.Tunnels, data.LatestSignalPricesList); err != nil { + return types.ErrInvalidGenesis.Wrapf("invalid latest signal prices: %s", err.Error()) } // validate the total fees From c847f553dde58e75296e1e1088980faffd2cb17a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 24 Sep 2024 11:36:25 +0700 Subject: [PATCH 150/272] add len --- x/tunnel/keeper/genesis.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 20e4cc999..7ccfac2e0 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -13,6 +13,10 @@ func validateLastSignalPricesList( tunnels []types.Tunnel, lsps []types.LatestSignalPrices, ) error { + if len(tunnels) != len(lsps) { + return fmt.Errorf("tunnels and latest signal prices list length mismatch") + } + tunnelMap := make(map[uint64]bool) for _, t := range tunnels { tunnelMap[t.ID] = true From 23d07d50aa78f217194b47b7c554a0359516389a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 24 Sep 2024 11:39:06 +0700 Subject: [PATCH 151/272] remove dub --- x/tunnel/keeper/msg_server.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index b36438fec..96d8a4e00 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -142,12 +142,6 @@ func (ms msgServer) Activate( return nil, types.ErrAlreadyActive.Wrapf("tunnelID %d", req.TunnelID) } - // verify if the total deposit meets or exceeds the minimum required deposit - minDeposit := ms.Keeper.GetParams(ctx).MinDeposit - if !tunnel.TotalDeposit.IsAllGTE(minDeposit) { - return nil, types.ErrInsufficientDeposit - } - if err := ms.Keeper.ActivateTunnel(ctx, req.TunnelID); err != nil { return nil, err } From 42cc26b0467f884c0a262d302c7f3c900f7835f7 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 24 Sep 2024 14:52:53 +0700 Subject: [PATCH 152/272] update test --- x/tunnel/keeper/genesis.go | 2 +- x/tunnel/keeper/genesis_test.go | 67 +++++++-------------------------- 2 files changed, 15 insertions(+), 54 deletions(-) diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 7ccfac2e0..97e21697d 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -49,7 +49,7 @@ func ValidateGenesis(data *types.GenesisState) error { // validate the latest signal prices count if len(data.LatestSignalPricesList) != int(data.TunnelCount) { - return types.ErrInvalidGenesis.Wrapf("length of latest signal prices does not match tunnel count") + return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in latest signal prices") } // validate latest signal prices diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index a174bdb39..835a3d88b 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -13,14 +13,12 @@ import ( ) func TestValidateGenesis(t *testing.T) { - tests := []struct { - name string + cases := map[string]struct { genesis *types.GenesisState requireErr bool errMsg string }{ - { - name: "length of tunnels does not match tunnel count", + "length of tunnels does not match tunnel count": { genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 1}, @@ -30,8 +28,7 @@ func TestValidateGenesis(t *testing.T) { requireErr: true, errMsg: "length of tunnels does not match tunnel count", }, - { - name: "tunnel ID greater than tunnel count", + "tunnel count mismatch in tunnels": { genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 3}, @@ -39,10 +36,9 @@ func TestValidateGenesis(t *testing.T) { TunnelCount: 1, }, requireErr: true, - errMsg: "tunnel count mismatch", + errMsg: "tunnel count mismatch in tunnels", }, - { - name: "latest signal prices does not match tunnel count", + "tunnel count mismatch in latest signal prices": { genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 1}, @@ -54,10 +50,9 @@ func TestValidateGenesis(t *testing.T) { }, }, requireErr: true, - errMsg: "latest signal prices does not match tunnel count", + errMsg: "tunnel count mismatch in latest signal prices", }, - { - name: "tunnel count mismatch in latest signal prices", + "invalid latest signal prices": { genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 1}, @@ -68,42 +63,9 @@ func TestValidateGenesis(t *testing.T) { }, }, requireErr: true, - errMsg: "tunnel count mismatch", - }, - { - name: "tunnel id is zero in latest signal prices", - genesis: &types.GenesisState{ - Tunnels: []types.Tunnel{ - {ID: 1}, - }, - TunnelCount: 1, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 0}, - }, - }, - requireErr: true, - errMsg: "tunnel count mismatch", - }, - { - name: "invalid latest signal prices", - genesis: &types.GenesisState{ - Tunnels: []types.Tunnel{ - {ID: 1}, - }, - TunnelCount: 1, - LatestSignalPricesList: []types.LatestSignalPrices{ - { - TunnelID: 1, - SignalPrices: []types.SignalPrice{}, - }, - }, - TotalFees: types.TotalFees{}, - }, - requireErr: true, errMsg: "invalid latest signal prices", }, - { - name: "invalid total fee", + "invalid total fees": { genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 1}, @@ -126,8 +88,7 @@ func TestValidateGenesis(t *testing.T) { requireErr: true, errMsg: "invalid total fees", }, - { - name: "all good", + "all good": { genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 1}, @@ -157,12 +118,12 @@ func TestValidateGenesis(t *testing.T) { }, } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - err := keeper.ValidateGenesis(tt.genesis) - if tt.requireErr { + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + err := keeper.ValidateGenesis(tc.genesis) + if tc.requireErr { require.Error(t, err) - require.Contains(t, err.Error(), tt.errMsg) + require.Contains(t, err.Error(), tc.errMsg) } else { require.NoError(t, err) } From 0643294b68903634897caf015eb5f6ffc5058462 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 25 Sep 2024 12:19:44 +0700 Subject: [PATCH 153/272] add comment --- x/tunnel/types/keys.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index a1a4ffa50..1f0c55f50 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -69,10 +69,12 @@ func LatestSignalPricesStoreKey(tunnelID uint64) []byte { return append(LatestSignalPricesStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } +// DepositsStoreKey returns the key to retrieve all deposits of a tunnel from the store. func DepositsStoreKey(tunnelID uint64) []byte { return append(DepositStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } +// DepositStoreKey returns the key to retrieve a deposit of a tunnel from the store. func DepositStoreKey(tunnelID uint64, depositor sdk.AccAddress) []byte { return append(DepositsStoreKey(tunnelID), address.MustLengthPrefix(depositor)...) } From 57c7e62748e31e0bf14dfbe1dd191287fb803a4a Mon Sep 17 00:00:00 2001 From: Natthakun Kitthaworn Date: Thu, 26 Sep 2024 14:45:02 +0700 Subject: [PATCH 154/272] [Tunnel] add benchmark (#216) * add benchmark * Fix typo * fix variable * fix benchmark test --- benchmark/tunnel_bench_test.go | 188 +++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 benchmark/tunnel_bench_test.go diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go new file mode 100644 index 000000000..b808d43f1 --- /dev/null +++ b/benchmark/tunnel_bench_test.go @@ -0,0 +1,188 @@ +package benchmark + +import ( + "fmt" + "math/rand" + "testing" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/require" + + bandtesting "github.com/bandprotocol/chain/v2/testing" + feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" + "github.com/bandprotocol/chain/v2/x/tunnel/types" +) + +func BenchmarkTunnelABCI(b *testing.B) { + testcases := []struct { + numTunnels int + numSignals int + maxSignals int + encoderType types.Encoder + }{ + {1, 1, 1, types.ENCODER_FIXED_POINT_ABI}, + {1, 100, 100, types.ENCODER_FIXED_POINT_ABI}, + {10, 10, 100, types.ENCODER_FIXED_POINT_ABI}, + {10, 100, 100, types.ENCODER_FIXED_POINT_ABI}, + {100, 100, 100, types.ENCODER_FIXED_POINT_ABI}, + {1, 1, 1, types.ENCODER_TICK_ABI}, + {1, 100, 100, types.ENCODER_TICK_ABI}, + {10, 10, 100, types.ENCODER_TICK_ABI}, + {10, 100, 100, types.ENCODER_TICK_ABI}, + {100, 100, 100, types.ENCODER_TICK_ABI}, + } + + for _, tc := range testcases { + f := testBenchmarkTunnel(tc.numTunnels, tc.numSignals, tc.maxSignals, tc.encoderType) + benchmarkTestName := fmt.Sprintf( + "TunnelABCI_%dTunnel_%dSignals_%dMaxSignal_%sEncoderType", + tc.numTunnels, tc.numSignals, tc.maxSignals, tc.encoderType, + ) + b.Run(benchmarkTestName, f) + } +} + +// testBenchmarkTunnel is a helper function to benchmark tunnel endblock process. +func testBenchmarkTunnel(numTunnels, numSignals, maxSignals int, encoder types.Encoder) func(b *testing.B) { + return func(b *testing.B) { + require.GreaterOrEqual(b, maxSignals, numSignals) + require.NotEqual(b, types.ENCODER_UNSPECIFIED, encoder) + + ba := InitializeBenchmarkApp(b, -1) + + // set minDeposit to 1 + params := ba.TunnelKeeper.GetParams(ba.Ctx) + params.MinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 1)) + err := ba.TunnelKeeper.SetParams(ba.Ctx, params) + require.NoError(b, err) + + var globalSignalDeviations []types.SignalDeviation + for i := 1; i <= maxSignals; i++ { + globalSignalDeviations = append(globalSignalDeviations, types.SignalDeviation{ + SignalID: fmt.Sprintf("test%d", i), SoftDeviationBPS: 100, HardDeviationBPS: 200, + }) + } + + // create tunnel; for each tunnel, randomly pick signals from global signalInfos. + for i := 1; i <= numTunnels; i++ { + signalIdx := rand.Perm(maxSignals) + var signalDeviations []types.SignalDeviation + for j := 0; j < numSignals; j++ { + signalDeviations = append(signalDeviations, globalSignalDeviations[signalIdx[j]]) + } + + err := createNewTunnels(ba, &types.TSSRoute{}, signalDeviations, encoder) + require.NoError(b, err) + } + + setupFeedsPrice(ba, globalSignalDeviations) + + b.ResetTimer() + b.StopTimer() + for i := 0; i < b.N; i++ { + ba.CallBeginBlock() + err := shiftFeedsPrice(ba, globalSignalDeviations, 10500) + require.NoError(b, err) + + tunnels := []types.Tunnel{} + for j := 1; j <= numTunnels; j++ { + tunnel := ba.TunnelKeeper.MustGetTunnel(ba.Ctx, uint64(j)) + tunnels = append(tunnels, tunnel) + } + + b.StartTimer() + ba.CallEndBlock() + b.StopTimer() + + ba.Commit() + + // check result + for j := 1; j <= numTunnels; j++ { + newTunnel := ba.TunnelKeeper.MustGetTunnel(ba.Ctx, uint64(j)) + require.Equal(b, tunnels[j-1].NonceCount+1, newTunnel.NonceCount) + require.True(b, newTunnel.IsActive) + } + } + } +} + +// createNewTunnels creates new tunnels with given signalInfos and encoder. +func createNewTunnels( + ba *BenchmarkApp, + route types.RouteI, + signalDeviations []types.SignalDeviation, + encoder types.Encoder, +) error { + msg, ok := route.(proto.Message) + if !ok { + return fmt.Errorf("cannot proto marshal %T", msg) + } + routeAny, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return err + } + + creator := bandtesting.Alice.Address + tunnel, err := ba.TunnelKeeper.AddTunnel( + ba.Ctx, routeAny, encoder, signalDeviations, 1000, creator, + ) + if err != nil { + return err + } + + depositor := bandtesting.Bob.Address + minDeposit := ba.TunnelKeeper.GetParams(ba.Ctx).MinDeposit + if err := ba.TunnelKeeper.AddDeposit(ba.Ctx, tunnel.ID, depositor, minDeposit); err != nil { + return err + } + + if err := ba.TunnelKeeper.ActivateTunnel(ba.Ctx, tunnel.ID); err != nil { + return err + } + + depositAmt := sdk.NewCoins(sdk.NewInt64Coin("uband", 50000)) + if err := ba.BankKeeper.SendCoins( + ba.Ctx, + bandtesting.Validators[0].Address, + sdk.MustAccAddressFromBech32(tunnel.FeePayer), + depositAmt, + ); err != nil { + return err + } + + return nil +} + +// setupFeedsPrice sets up feeds and prices for benchmarking. +func setupFeedsPrice(ba *BenchmarkApp, signalDeviations []types.SignalDeviation) { + var feeds []feedstypes.Feed + var prices []feedstypes.Price + for i, sd := range signalDeviations { + feeds = append(feeds, feedstypes.Feed{ + SignalID: sd.SignalID, Power: 1000, Interval: 1000, + }) + prices = append(prices, feedstypes.Price{ + SignalID: sd.SignalID, Price: uint64(i+1) * 1000, Timestamp: ba.Ctx.BlockTime().Unix(), + }) + } + + ba.FeedsKeeper.SetCurrentFeeds(ba.Ctx, feeds) + ba.FeedsKeeper.SetPrices(ba.Ctx, prices) +} + +// shiftFeedsPrice shifts current feeds price by given multiplier. +func shiftFeedsPrice(ba *BenchmarkApp, signalDeviations []types.SignalDeviation, mltpyBps uint64) error { + for _, sd := range signalDeviations { + p, err := ba.FeedsKeeper.GetPrice(ba.Ctx, sd.SignalID) + if err != nil { + return err + } + + p.Price = p.Price * mltpyBps / 10000 + ba.FeedsKeeper.SetPrice(ba.Ctx, p) + } + + return nil +} From bc0eef29a54f753e152df0395470fe71c914003f Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 30 Sep 2024 15:44:00 +0700 Subject: [PATCH 155/272] clean up --- app/keepers/keepers.go | 2 +- x/tunnel/abci.go | 2 +- x/tunnel/keeper/genesis.go | 61 +----------------------------- x/tunnel/keeper/genesis_test.go | 2 +- x/tunnel/keeper/grpc_query.go | 4 +- x/tunnel/keeper/keeper.go | 4 +- x/tunnel/keeper/keeper_test.go | 7 +--- x/tunnel/keeper/msg_server.go | 12 ++++-- x/tunnel/keeper/packet.go | 5 ++- x/tunnel/keeper/tss_packet_test.go | 5 ++- x/tunnel/keeper/tunnel.go | 8 ++-- x/tunnel/keeper/tunnel_test.go | 7 ++-- x/tunnel/module.go | 6 +-- x/tunnel/types/genesis.go | 57 ++++++++++++++++++++++++++++ x/tunnel/types/packet.go | 17 +++++++-- x/tunnel/types/signal.go | 14 +++---- x/tunnel/types/tunnel.go | 17 +++++++-- 17 files changed, 129 insertions(+), 101 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index cf4387aa2..d2776a4b9 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -59,7 +59,7 @@ type AppKeepers struct { FeedsKeeper feedskeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper GlobalfeeKeeper globalfeekeeper.Keeper - TunnelKeeper *tunnelkeeper.Keeper + TunnelKeeper tunnelkeeper.Keeper RestakeKeeper restakekeeper.Keeper // make scoped keepers public for test purposes diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index 89f50aa09..f18d1c1d0 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -9,7 +9,7 @@ import ( func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { } -func EndBlocker(ctx sdk.Context, k *keeper.Keeper) { +func EndBlocker(ctx sdk.Context, k keeper.Keeper) { // produce packets for all tunnels that are active and have passed the interval time trigger // or deviated from the last price to destination route k.ProduceActiveTunnelPackets(ctx) diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 97e21697d..1e9dd2ecf 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -8,65 +8,8 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) -// validateLastSignalPricesList validates the latest signal prices list. -func validateLastSignalPricesList( - tunnels []types.Tunnel, - lsps []types.LatestSignalPrices, -) error { - if len(tunnels) != len(lsps) { - return fmt.Errorf("tunnels and latest signal prices list length mismatch") - } - - tunnelMap := make(map[uint64]bool) - for _, t := range tunnels { - tunnelMap[t.ID] = true - } - - for _, lsp := range lsps { - if _, ok := tunnelMap[lsp.TunnelID]; !ok { - return fmt.Errorf("tunnel ID %d not found in tunnels", lsp.TunnelID) - } - if err := lsp.Validate(); err != nil { - return err - } - } - return nil -} - -// ValidateGenesis validates the provided genesis state. -func ValidateGenesis(data *types.GenesisState) error { - // validate the tunnel count - if uint64(len(data.Tunnels)) != data.TunnelCount { - return types.ErrInvalidGenesis.Wrapf("length of tunnels does not match tunnel count") - } - - // validate the tunnel IDs - for _, t := range data.Tunnels { - if t.ID > data.TunnelCount { - return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in tunnels") - } - } - - // validate the latest signal prices count - if len(data.LatestSignalPricesList) != int(data.TunnelCount) { - return types.ErrInvalidGenesis.Wrapf("tunnel count mismatch in latest signal prices") - } - - // validate latest signal prices - if err := validateLastSignalPricesList(data.Tunnels, data.LatestSignalPricesList); err != nil { - return types.ErrInvalidGenesis.Wrapf("invalid latest signal prices: %s", err.Error()) - } - - // validate the total fees - if err := data.TotalFees.Validate(); err != nil { - return types.ErrInvalidGenesis.Wrapf("invalid total fees: %s", err.Error()) - } - - return data.Params.Validate() -} - // InitGenesis initializes the module's state from a provided genesis state. -func InitGenesis(ctx sdk.Context, k *Keeper, data *types.GenesisState) { +func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { if err := k.SetParams(ctx, data.Params); err != nil { panic(err) } @@ -102,7 +45,7 @@ func InitGenesis(ctx sdk.Context, k *Keeper, data *types.GenesisState) { } // ExportGenesis returns the module's exported genesis -func ExportGenesis(ctx sdk.Context, k *Keeper) *types.GenesisState { +func ExportGenesis(ctx sdk.Context, k Keeper) *types.GenesisState { return &types.GenesisState{ Params: k.GetParams(ctx), TunnelCount: k.GetTunnelCount(ctx), diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index 835a3d88b..f8c37a4f2 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -120,7 +120,7 @@ func TestValidateGenesis(t *testing.T) { for name, tc := range cases { t.Run(name, func(t *testing.T) { - err := keeper.ValidateGenesis(tc.genesis) + err := types.ValidateGenesis(*tc.genesis) if tc.requireErr { require.Error(t, err) require.Contains(t, err.Error(), tc.errMsg) diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 2ca89b15f..371f33c75 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -14,9 +14,9 @@ import ( var _ types.QueryServer = queryServer{} -type queryServer struct{ k *Keeper } +type queryServer struct{ k Keeper } -func NewQueryServer(k *Keeper) types.QueryServer { +func NewQueryServer(k Keeper) types.QueryServer { return queryServer{k: k} } diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index ddc74b524..0fcee9198 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -34,7 +34,7 @@ func NewKeeper( feedsKeeper types.FeedsKeeper, bandtssKeeper types.BandtssKeeper, authority string, -) *Keeper { +) Keeper { // ensure tunnel module account is set if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) @@ -45,7 +45,7 @@ func NewKeeper( panic(fmt.Errorf("invalid bandtss authority address: %w", err)) } - return &Keeper{ + return Keeper{ cdc: cdc, storeKey: key, authKeeper: authKeeper, diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go index 2bf0a09c7..efc40bd21 100644 --- a/x/tunnel/keeper/keeper_test.go +++ b/x/tunnel/keeper/keeper_test.go @@ -6,7 +6,6 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdktestutil "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" @@ -24,7 +23,7 @@ import ( type KeeperTestSuite struct { suite.Suite - keeper *keeper.Keeper + keeper keeper.Keeper queryServer types.QueryServer msgServer types.MsgServer @@ -98,12 +97,10 @@ func (s *KeeperTestSuite) AddSampleTunnel(isActive bool) { DestinationChainID: "chain-1", DestinationContractAddress: "0x1234567890abcdef", } - routeAny, err := codectypes.NewAnyWithValue(route) - s.Require().NoError(err) tunnel, err := k.AddTunnel( ctx, - routeAny, + route, types.ENCODER_FIXED_POINT_ABI, signalDeviations, 10, diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 96d8a4e00..3d1cda87a 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "errors" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,11 +14,11 @@ import ( var _ types.MsgServer = msgServer{} type msgServer struct { - *Keeper + Keeper } // NewMsgServerImpl returns an implementation of the x/tunnel MsgServer interface. -func NewMsgServerImpl(keeper *Keeper) types.MsgServer { +func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{Keeper: keeper} } @@ -42,10 +43,15 @@ func (ms msgServer) CreateTunnel( return nil, err } + route, ok := req.Route.GetCachedValue().(types.RouteI) + if !ok { + return nil, errors.New("cannot create tunnel, failed to convert proto Any to routeI") + } + // add a new tunnel tunnel, err := ms.Keeper.AddTunnel( ctx, - req.Route, + route, req.Encoder, req.SignalDeviations, req.Interval, diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index a53277ee5..de9d4408b 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -128,7 +128,10 @@ func (k Keeper) ProducePacket( // increment nonce count tunnel.NonceCount++ - newPacket := types.NewPacket(tunnel.ID, tunnel.NonceCount, nsps, nil, unixNow) + newPacket, err := types.NewPacket(tunnel.ID, tunnel.NonceCount, nsps, nil, unixNow) + if err != nil { + return sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) + } if err := k.SendPacket(ctx, tunnel, newPacket); err != nil { return sdkerrors.Wrapf(err, "route %s failed to send packet", tunnel.Route.TypeUrl) } diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index 5d4533eaa..ba292382c 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -14,13 +14,14 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { DestinationChainID: "chain-1", DestinationContractAddress: "0x1234567890abcdef", } - packet := types.NewPacket( + packet, err := types.NewPacket( 1, // tunnelID 1, // nonce []types.SignalPrice{}, // SignalPriceInfos - nil, + &route, time.Now().Unix(), ) + s.Require().NoError(err) content, err := k.SendTSSPacket(ctx, &route, packet) s.Require().NoError(err) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 06b224a8e..bb9ca865b 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -3,7 +3,6 @@ package keeper import ( "fmt" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v2/x/tunnel/types" @@ -12,7 +11,7 @@ import ( // AddTunnel adds a new tunnel func (k Keeper) AddTunnel( ctx sdk.Context, - route *codectypes.Any, + route types.RouteI, encoder types.Encoder, signalDeviations []types.SignalDeviation, interval uint64, @@ -35,7 +34,7 @@ func (k Keeper) AddTunnel( k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(newID, signalPrices, 0)) // create a new tunnel - tunnel := types.NewTunnel( + tunnel, err := types.NewTunnel( newID, 0, route, @@ -48,6 +47,9 @@ func (k Keeper) AddTunnel( ctx.BlockTime().Unix(), creator.String(), ) + if err != nil { + return nil, err + } k.SetTunnel(ctx, tunnel) // increment the tunnel count diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index b1bee34ae..4adb70358 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -11,7 +11,8 @@ import ( func (s *KeeperTestSuite) TestAddTunnel() { ctx, k := s.ctx, s.keeper - route := &codectypes.Any{} + route := &types.TSSRoute{} + any, _ := codectypes.NewAnyWithValue(route) signalDeviations := []types.SignalDeviation{ {SignalID: "BTC"}, {SignalID: "ETH"}, @@ -21,7 +22,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { expectedTunnel := types.Tunnel{ ID: 1, - Route: route, + Route: any, Encoder: types.ENCODER_FIXED_POINT_ABI, FeePayer: "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", Creator: creator.String(), @@ -64,7 +65,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { func (s *KeeperTestSuite) TestEditTunnel() { ctx, k := s.ctx, s.keeper - initialRoute := &codectypes.Any{} + initialRoute := &types.TSSRoute{} initialEncoder := types.ENCODER_FIXED_POINT_ABI initialSignalDeviations := []types.SignalDeviation{ {SignalID: "BTC", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, diff --git a/x/tunnel/module.go b/x/tunnel/module.go index 8e4b360de..498a5aadc 100644 --- a/x/tunnel/module.go +++ b/x/tunnel/module.go @@ -64,7 +64,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) } - return keeper.ValidateGenesis(&genState) + return types.ValidateGenesis(genState) } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the tunnel module. @@ -88,13 +88,13 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { type AppModule struct { AppModuleBasic - keeper *keeper.Keeper + keeper keeper.Keeper } // NewAppModule creates a new AppModule object func NewAppModule( cdc codec.Codec, - keeper *keeper.Keeper, + keeper keeper.Keeper, ) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc}, diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index c377e7914..8e8e32482 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -24,6 +24,38 @@ func DefaultGenesisState() *GenesisState { return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []LatestSignalPrices{}, TotalFees{}) } +// ValidateGenesis validates the provided genesis state. +func ValidateGenesis(data GenesisState) error { + // validate the tunnel count + if uint64(len(data.Tunnels)) != data.TunnelCount { + return ErrInvalidGenesis.Wrapf("length of tunnels does not match tunnel count") + } + + // validate the tunnel IDs + for _, t := range data.Tunnels { + if t.ID > data.TunnelCount { + return ErrInvalidGenesis.Wrapf("tunnel count mismatch in tunnels") + } + } + + // validate the latest signal prices count + if len(data.LatestSignalPricesList) != int(data.TunnelCount) { + return ErrInvalidGenesis.Wrapf("tunnel count mismatch in latest signal prices") + } + + // validate latest signal prices + if err := validateLastSignalPricesList(data.Tunnels, data.LatestSignalPricesList); err != nil { + return ErrInvalidGenesis.Wrapf("invalid latest signal prices: %s", err.Error()) + } + + // validate the total fees + if err := data.TotalFees.Validate(); err != nil { + return ErrInvalidGenesis.Wrapf("invalid total fees: %s", err.Error()) + } + + return data.Params.Validate() +} + // Validate validates the total fees func (tf TotalFees) Validate() error { if !tf.TotalPacketFee.IsValid() { @@ -31,3 +63,28 @@ func (tf TotalFees) Validate() error { } return nil } + +// validateLastSignalPricesList validates the latest signal prices list. +func validateLastSignalPricesList( + tunnels []Tunnel, + lsps []LatestSignalPrices, +) error { + if len(tunnels) != len(lsps) { + return fmt.Errorf("tunnels and latest signal prices list length mismatch") + } + + tunnelMap := make(map[uint64]bool) + for _, t := range tunnels { + tunnelMap[t.ID] = true + } + + for _, lsp := range lsps { + if _, ok := tunnelMap[lsp.TunnelID]; !ok { + return fmt.Errorf("tunnel ID %d not found in tunnels", lsp.TunnelID) + } + if err := lsp.Validate(); err != nil { + return err + } + } + return nil +} diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 5f855cd34..1bd97c00b 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -13,16 +13,25 @@ func NewPacket( tunnelID uint64, nonce uint64, signalPrices []SignalPrice, - packetContent *types.Any, + packetContent PacketContentI, createdAt int64, -) Packet { +) (Packet, error) { + msg, ok := packetContent.(proto.Message) + if !ok { + return Packet{}, fmt.Errorf("can't proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return Packet{}, err + } + return Packet{ TunnelID: tunnelID, Nonce: nonce, SignalPrices: signalPrices, - PacketContent: packetContent, + PacketContent: any, CreatedAt: createdAt, - } + }, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 9a62d75a9..7e4a8a46e 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -29,21 +29,21 @@ func NewLatestSignalPrices( } // Validate validates the latest signal prices. -func (latestSignalPrices LatestSignalPrices) Validate() error { - if latestSignalPrices.TunnelID == 0 { +func (lsps LatestSignalPrices) Validate() error { + if lsps.TunnelID == 0 { return fmt.Errorf("tunnel ID cannot be 0") } - if len(latestSignalPrices.SignalPrices) == 0 { + if len(lsps.SignalPrices) == 0 { return fmt.Errorf("signal prices cannot be empty") } - if latestSignalPrices.Timestamp < 0 { + if lsps.Timestamp < 0 { return fmt.Errorf("timestamp cannot be negative") } return nil } // UpdateSignalPrices updates the signal prices in the latest signal prices. -func (latestSignalPrices *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { +func (lsps *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { // create a map of new signal prices newSpMap := make(map[string]SignalPrice) for _, sp := range newSignalPrices { @@ -51,9 +51,9 @@ func (latestSignalPrices *LatestSignalPrices) UpdateSignalPrices(newSignalPrices } // update signal prices - for i, sp := range latestSignalPrices.SignalPrices { + for i, sp := range lsps.SignalPrices { if newSp, ok := newSpMap[sp.SignalID]; ok { - latestSignalPrices.SignalPrices[i] = newSp + lsps.SignalPrices[i] = newSp } } } diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 7c5b1ce87..46bc54e5b 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -14,7 +14,7 @@ var _ types.UnpackInterfacesMessage = Tunnel{} func NewTunnel( id uint64, nonceCount uint64, - route *types.Any, + route RouteI, encoder Encoder, feePayer string, signalDeviations []SignalDeviation, @@ -23,11 +23,20 @@ func NewTunnel( isActive bool, createdAt int64, creator string, -) Tunnel { +) (Tunnel, error) { + msg, ok := route.(proto.Message) + if !ok { + return Tunnel{}, fmt.Errorf("can't proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return Tunnel{}, err + } + return Tunnel{ ID: id, NonceCount: nonceCount, - Route: route, + Route: any, Encoder: encoder, FeePayer: feePayer, SignalDeviations: signalDeviations, @@ -36,7 +45,7 @@ func NewTunnel( IsActive: isActive, CreatedAt: createdAt, Creator: creator, - } + }, nil } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces From 62897f8f9b06489744ba5a565f73fbb74b6eb344 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 30 Sep 2024 16:38:44 +0700 Subject: [PATCH 156/272] fix test --- benchmark/tunnel_bench_test.go | 14 ++------------ x/tunnel/keeper/packet.go | 2 +- x/tunnel/keeper/tss_packet_test.go | 1 - x/tunnel/types/packet.go | 12 +----------- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go index b808d43f1..392c99d47 100644 --- a/benchmark/tunnel_bench_test.go +++ b/benchmark/tunnel_bench_test.go @@ -5,9 +5,7 @@ import ( "math/rand" "testing" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" bandtesting "github.com/bandprotocol/chain/v2/testing" @@ -101,6 +99,7 @@ func testBenchmarkTunnel(numTunnels, numSignals, maxSignals int, encoder types.E // check result for j := 1; j <= numTunnels; j++ { newTunnel := ba.TunnelKeeper.MustGetTunnel(ba.Ctx, uint64(j)) + fmt.Printf("%d -%d ", tunnels[j-1].NonceCount+1, newTunnel.NonceCount) require.Equal(b, tunnels[j-1].NonceCount+1, newTunnel.NonceCount) require.True(b, newTunnel.IsActive) } @@ -115,18 +114,9 @@ func createNewTunnels( signalDeviations []types.SignalDeviation, encoder types.Encoder, ) error { - msg, ok := route.(proto.Message) - if !ok { - return fmt.Errorf("cannot proto marshal %T", msg) - } - routeAny, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return err - } - creator := bandtesting.Alice.Address tunnel, err := ba.TunnelKeeper.AddTunnel( - ba.Ctx, routeAny, encoder, signalDeviations, 1000, creator, + ba.Ctx, route, encoder, signalDeviations, 1000, creator, ) if err != nil { return err diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index de9d4408b..4a456e912 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -128,7 +128,7 @@ func (k Keeper) ProducePacket( // increment nonce count tunnel.NonceCount++ - newPacket, err := types.NewPacket(tunnel.ID, tunnel.NonceCount, nsps, nil, unixNow) + newPacket, err := types.NewPacket(tunnel.ID, tunnel.NonceCount, nsps, unixNow) if err != nil { return sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) } diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index ba292382c..f3668d1a2 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -18,7 +18,6 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { 1, // tunnelID 1, // nonce []types.SignalPrice{}, // SignalPriceInfos - &route, time.Now().Unix(), ) s.Require().NoError(err) diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 1bd97c00b..872187725 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -13,23 +13,13 @@ func NewPacket( tunnelID uint64, nonce uint64, signalPrices []SignalPrice, - packetContent PacketContentI, createdAt int64, ) (Packet, error) { - msg, ok := packetContent.(proto.Message) - if !ok { - return Packet{}, fmt.Errorf("can't proto marshal %T", msg) - } - any, err := types.NewAnyWithValue(msg) - if err != nil { - return Packet{}, err - } - return Packet{ TunnelID: tunnelID, Nonce: nonce, SignalPrices: signalPrices, - PacketContent: any, + PacketContent: nil, CreatedAt: createdAt, }, nil } From b4e82d63aa6803dfac3eacf5bb877f8249502ae7 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 30 Sep 2024 16:40:53 +0700 Subject: [PATCH 157/272] remove print --- benchmark/tunnel_bench_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go index 392c99d47..57a3177b9 100644 --- a/benchmark/tunnel_bench_test.go +++ b/benchmark/tunnel_bench_test.go @@ -99,7 +99,6 @@ func testBenchmarkTunnel(numTunnels, numSignals, maxSignals int, encoder types.E // check result for j := 1; j <= numTunnels; j++ { newTunnel := ba.TunnelKeeper.MustGetTunnel(ba.Ctx, uint64(j)) - fmt.Printf("%d -%d ", tunnels[j-1].NonceCount+1, newTunnel.NonceCount) require.Equal(b, tunnels[j-1].NonceCount+1, newTunnel.NonceCount) require.True(b, newTunnel.IsActive) } From 55c27107fa0223c3a93ac85a6ffc9cb751e790e1 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 30 Sep 2024 17:08:33 +0700 Subject: [PATCH 158/272] replace nonce with sequence --- benchmark/tunnel_bench_test.go | 2 +- proto/tunnel/v1beta1/query.proto | 10 +- proto/tunnel/v1beta1/tunnel.proto | 8 +- x/tunnel/client/cli/query.go | 8 +- x/tunnel/keeper/grpc_query.go | 2 +- x/tunnel/keeper/grpc_query_test.go | 24 ++-- x/tunnel/keeper/packet.go | 20 +-- x/tunnel/keeper/packet_test.go | 8 +- x/tunnel/keeper/tss_packet_test.go | 4 +- x/tunnel/types/packet.go | 6 +- x/tunnel/types/query.pb.go | 140 ++++++++++----------- x/tunnel/types/query.pb.gw.go | 18 +-- x/tunnel/types/tunnel.go | 4 +- x/tunnel/types/tunnel.pb.go | 194 ++++++++++++++--------------- 14 files changed, 224 insertions(+), 224 deletions(-) diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go index 57a3177b9..1dd1b2dc8 100644 --- a/benchmark/tunnel_bench_test.go +++ b/benchmark/tunnel_bench_test.go @@ -99,7 +99,7 @@ func testBenchmarkTunnel(numTunnels, numSignals, maxSignals int, encoder types.E // check result for j := 1; j <= numTunnels; j++ { newTunnel := ba.TunnelKeeper.MustGetTunnel(ba.Ctx, uint64(j)) - require.Equal(b, tunnels[j-1].NonceCount+1, newTunnel.NonceCount) + require.Equal(b, tunnels[j-1].Sequence+1, newTunnel.Sequence) require.True(b, newTunnel.IsActive) } } diff --git a/proto/tunnel/v1beta1/query.proto b/proto/tunnel/v1beta1/query.proto index d9d5e4134..f3ca05348 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/tunnel/v1beta1/query.proto @@ -36,9 +36,9 @@ service Query { option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/packets"; } - // Packet is a RPC method that returns a packet by its tunnel ID and nonce. + // Packet is a RPC method that returns a packet by its tunnel ID and sequence. rpc Packet(QueryPacketRequest) returns (QueryPacketResponse) { - option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/packets/{nonce}"; + option (google.api.http).get = "/tunnel/v1beta1/tunnels/{tunnel_id}/packets/{sequence}"; } // Params is a RPC method that returns all parameters of the module. @@ -137,13 +137,13 @@ message QueryPacketsResponse { message QueryPacketRequest { // tunnel_id is the ID of the tunnel to query packets. uint64 tunnel_id = 1; - // nonce is the nonce of the packet to query. - uint64 nonce = 2; + // sequence is the sequence of the packet to query. + uint64 sequence = 2; } // QueryPacketResponse is the response type for the Query/Packet RPC method. message QueryPacketResponse { - // packet is the packet with the given tunnel ID and nonce. + // packet is the packet with the given tunnel ID and sequence. Packet packet = 1; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 68e8b8bcf..6daaee13a 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -66,8 +66,8 @@ message Tunnel { // id is the tunnel ID uint64 id = 1 [(gogoproto.customname) = "ID"]; - // nonce_count is representing the number of packets sent - uint64 nonce_count = 2; + // sequence is representing the sequence of the tunnel packet. + uint64 sequence = 2; // route is the route for delivering the signal prices google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; // encoder is the mode of encoding price signal data. @@ -127,8 +127,8 @@ message TotalFees { message Packet { // tunnel_id is the tunnel ID uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - // nonce is the nonce of the packet - uint64 nonce = 2; + // sequence is representing the sequence of the tunnel packet. + uint64 sequence = 2; // signal_prices is the list of signal prices repeated SignalPrice signal_prices = 3 [(gogoproto.nullable) = false]; // packet_content is the content of the packet that implements PacketContentI diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go index 40b8ec278..ee0bf5d44 100644 --- a/x/tunnel/client/cli/query.go +++ b/x/tunnel/client/cli/query.go @@ -273,8 +273,8 @@ func GetQueryCmdPackets() *cobra.Command { // GetQueryCmdPacket implements the query packet command. func GetQueryCmdPacket() *cobra.Command { cmd := &cobra.Command{ - Use: "packet [tunnel-id] [nonce]", - Short: "Query a packet by tunnel id and nonce", + Use: "packet [tunnel-id] [sequence]", + Short: "Query a packet by tunnel id and sequence", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -289,14 +289,14 @@ func GetQueryCmdPacket() *cobra.Command { return err } - nonce, err := strconv.ParseUint(args[1], 10, 64) + sequence, err := strconv.ParseUint(args[1], 10, 64) if err != nil { return err } res, err := queryClient.Packet(cmd.Context(), &types.QueryPacketRequest{ TunnelId: tunnelID, - Nonce: nonce, + Sequence: sequence, }) if err != nil { return err diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 371f33c75..60f130f26 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -135,7 +135,7 @@ func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) func (q queryServer) Packet(c context.Context, req *types.QueryPacketRequest) (*types.QueryPacketResponse, error) { ctx := sdk.UnwrapSDKContext(c) - packet, err := q.k.GetPacket(ctx, req.TunnelId, req.Nonce) + packet, err := q.k.GetPacket(ctx, req.TunnelId, req.Sequence) if err != nil { return nil, err } diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index 4b6270d81..4d0d8e2d8 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -46,8 +46,8 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { ctx, k, q := s.ctx, s.keeper, s.queryServer tunnel := types.Tunnel{ - ID: 1, - NonceCount: 2, + ID: 1, + Sequence: 2, } r := types.TSSRoute{ DestinationChainID: "1", @@ -60,11 +60,11 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { packet1 := types.Packet{ TunnelID: 1, - Nonce: 1, + Sequence: 1, } packet2 := types.Packet{ TunnelID: 1, - Nonce: 2, + Sequence: 2, } err = packet1.SetPacketContent(&types.TSSPacketContent{ SigningID: 1, @@ -96,8 +96,8 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { // set tunnel tunnel := types.Tunnel{ - ID: 1, - NonceCount: 2, + ID: 1, + Sequence: 2, } r := types.TSSRoute{ DestinationChainID: "1", @@ -109,7 +109,7 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { packet1 := types.Packet{ TunnelID: 1, - Nonce: 1, + Sequence: 1, } err = packet1.SetPacketContent(&types.TSSPacketContent{ SigningID: 1, @@ -121,7 +121,7 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { res, err := q.Packet(ctx, &types.QueryPacketRequest{ TunnelId: 1, - Nonce: 1, + Sequence: 1, }) s.Require().NoError(err) s.Require().NotNil(res) @@ -132,8 +132,8 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposit() { ctx, k, q := s.ctx, s.keeper, s.queryServer tunnel := types.Tunnel{ - ID: 1, - NonceCount: 2, + ID: 1, + Sequence: 2, } r := types.TSSRoute{ DestinationChainID: "1", @@ -163,8 +163,8 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposits() { ctx, k, q := s.ctx, s.keeper, s.queryServer tunnel := types.Tunnel{ - ID: 1, - NonceCount: 2, + ID: 1, + Sequence: 2, } r := types.TSSRoute{ DestinationChainID: "1", diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 4a456e912..808f825f8 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -29,14 +29,14 @@ func (k Keeper) DeductBasePacketFee(ctx sdk.Context, feePayer sdk.AccAddress) er // SetPacket sets a packet in the store func (k Keeper) SetPacket(ctx sdk.Context, packet types.Packet) { ctx.KVStore(k.storeKey). - Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.Nonce), k.cdc.MustMarshal(&packet)) + Set(types.TunnelPacketStoreKey(packet.TunnelID, packet.Sequence), k.cdc.MustMarshal(&packet)) } // GetPacket retrieves a packet by its tunnel ID and packet ID -func (k Keeper) GetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) (types.Packet, error) { - bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, nonce)) +func (k Keeper) GetPacket(ctx sdk.Context, tunnelID uint64, sequence uint64) (types.Packet, error) { + bz := ctx.KVStore(k.storeKey).Get(types.TunnelPacketStoreKey(tunnelID, sequence)) if bz == nil { - return types.Packet{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, nonce: %d", tunnelID, nonce) + return types.Packet{}, types.ErrPacketNotFound.Wrapf("tunnelID: %d, sequence: %d", tunnelID, sequence) } var packet types.Packet @@ -45,8 +45,8 @@ func (k Keeper) GetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) (types } // MustGetPacket retrieves a packet by its tunnel ID and packet ID and panics if the packet does not exist -func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, nonce uint64) types.Packet { - packet, err := k.GetPacket(ctx, tunnelID, nonce) +func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, sequence uint64) types.Packet { + packet, err := k.GetPacket(ctx, tunnelID, sequence) if err != nil { panic(err) } @@ -125,10 +125,10 @@ func (k Keeper) ProducePacket( return sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) } - // increment nonce count - tunnel.NonceCount++ + // increment sequence number + tunnel.Sequence++ - newPacket, err := types.NewPacket(tunnel.ID, tunnel.NonceCount, nsps, unixNow) + newPacket, err := types.NewPacket(tunnel.ID, tunnel.Sequence, nsps, unixNow) if err != nil { return sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) } @@ -143,7 +143,7 @@ func (k Keeper) ProducePacket( } k.SetLatestSignalPrices(ctx, latestSignalPrices) - // update nonce count + // update sequence number k.SetTunnel(ctx, tunnel) return nil diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index c29aa5a72..4a03c3e7d 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -38,12 +38,12 @@ func (s *KeeperTestSuite) TestGetSetPacket() { packet := types.Packet{ TunnelID: 1, - Nonce: 1, + Sequence: 1, } k.SetPacket(ctx, packet) - storedPacket, err := k.GetPacket(ctx, packet.TunnelID, packet.Nonce) + storedPacket, err := k.GetPacket(ctx, packet.TunnelID, packet.Sequence) s.Require().NoError(err) s.Require().Equal(packet, storedPacket) } @@ -143,7 +143,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) s.Require().True(newTunnelInfo.IsActive) - s.Require().Equal(newTunnelInfo.NonceCount, uint64(1)) + s.Require().Equal(newTunnelInfo.Sequence, uint64(1)) activeTunnels := k.GetActiveTunnelIDs(ctx) s.Require().Equal([]uint64{1}, activeTunnels) @@ -197,7 +197,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) s.Require().False(newTunnelInfo.IsActive) - s.Require().Equal(newTunnelInfo.NonceCount, uint64(0)) + s.Require().Equal(newTunnelInfo.Sequence, uint64(0)) activeTunnels := k.GetActiveTunnelIDs(ctx) s.Require().Len(activeTunnels, 0) diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index f3668d1a2..d28c669d4 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -16,8 +16,8 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { } packet, err := types.NewPacket( 1, // tunnelID - 1, // nonce - []types.SignalPrice{}, // SignalPriceInfos + 1, // sequence + []types.SignalPrice{}, // signalPriceInfos[] time.Now().Unix(), ) s.Require().NoError(err) diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 872187725..78e725ed9 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -11,13 +11,13 @@ var _ types.UnpackInterfacesMessage = Packet{} func NewPacket( tunnelID uint64, - nonce uint64, + sequence uint64, signalPrices []SignalPrice, createdAt int64, ) (Packet, error) { return Packet{ TunnelID: tunnelID, - Nonce: nonce, + Sequence: sequence, SignalPrices: signalPrices, PacketContent: nil, CreatedAt: createdAt, @@ -49,7 +49,7 @@ func (p *Packet) SetPacketContent(packetContent PacketContentI) error { func (p Packet) GetContent() (PacketContentI, error) { packetContent, ok := p.PacketContent.GetCachedValue().(PacketContentI) if !ok { - return nil, ErrNoPacketContent.Wrapf("tunnelID: %d, nonce: %d", p.TunnelID, p.Nonce) + return nil, ErrNoPacketContent.Wrapf("tunnelID: %d, sequence: %d", p.TunnelID, p.Sequence) } return packetContent, nil diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 07efdb131..7fcedc8cf 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -589,8 +589,8 @@ func (m *QueryPacketsResponse) GetPagination() *query.PageResponse { type QueryPacketRequest struct { // tunnel_id is the ID of the tunnel to query packets. TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // nonce is the nonce of the packet to query. - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // sequence is the sequence of the packet to query. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` } func (m *QueryPacketRequest) Reset() { *m = QueryPacketRequest{} } @@ -633,16 +633,16 @@ func (m *QueryPacketRequest) GetTunnelId() uint64 { return 0 } -func (m *QueryPacketRequest) GetNonce() uint64 { +func (m *QueryPacketRequest) GetSequence() uint64 { if m != nil { - return m.Nonce + return m.Sequence } return 0 } // QueryPacketResponse is the response type for the Query/Packet RPC method. type QueryPacketResponse struct { - // packet is the packet with the given tunnel ID and nonce. + // packet is the packet with the given tunnel ID and sequence. Packet *Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` } @@ -790,62 +790,62 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 869 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4f, 0x4f, 0xe3, 0x46, - 0x18, 0xc6, 0x33, 0x34, 0x24, 0x30, 0xb4, 0x08, 0x4d, 0x53, 0x48, 0x0d, 0x35, 0xa9, 0x03, 0x2d, - 0x82, 0xd6, 0x53, 0x12, 0xaa, 0x56, 0xed, 0xa5, 0xfc, 0x49, 0x50, 0x54, 0x94, 0xa6, 0x4e, 0xe8, - 0xa1, 0x97, 0xc8, 0x49, 0xdc, 0x60, 0x35, 0x78, 0x4c, 0xc6, 0x41, 0xa5, 0x11, 0x3d, 0x54, 0x3d, - 0xb4, 0x87, 0xae, 0x76, 0xb5, 0xda, 0xfd, 0x02, 0x2b, 0xed, 0x57, 0xd8, 0xaf, 0xc0, 0x11, 0x69, - 0x2f, 0x7b, 0x5a, 0xad, 0x60, 0x3f, 0xc8, 0x2a, 0x33, 0x63, 0x27, 0xce, 0xda, 0x21, 0x48, 0x68, - 0x6f, 0xc9, 0xcc, 0x33, 0xf3, 0xfe, 0xde, 0xf7, 0xf5, 0xfb, 0xd8, 0x50, 0x72, 0x3a, 0x96, 0x65, - 0xb4, 0xf0, 0xe9, 0x66, 0xcd, 0x70, 0xf4, 0x4d, 0x7c, 0xd2, 0x31, 0xda, 0x67, 0xaa, 0xdd, 0x26, - 0x0e, 0x41, 0xb3, 0x7c, 0x4f, 0x15, 0x7b, 0x52, 0xa2, 0x49, 0x9a, 0x84, 0x6d, 0xe1, 0xde, 0x2f, - 0xae, 0x92, 0xd6, 0xeb, 0x84, 0x1e, 0x13, 0x8a, 0x6b, 0x3a, 0x35, 0xf8, 0x71, 0xef, 0x32, 0x5b, - 0x6f, 0x9a, 0x96, 0xee, 0x98, 0xc4, 0x12, 0xda, 0xa5, 0x26, 0x21, 0xcd, 0x96, 0x81, 0x75, 0xdb, - 0xc4, 0xba, 0x65, 0x11, 0x87, 0x6d, 0x52, 0xb1, 0xbb, 0x38, 0xc4, 0x62, 0xeb, 0x6d, 0xfd, 0x38, - 0x6c, 0x53, 0xb0, 0xb1, 0x4d, 0xe5, 0x29, 0x80, 0x1f, 0xfe, 0xdc, 0x0b, 0x5d, 0x61, 0xab, 0x54, - 0x33, 0x4e, 0x3a, 0x06, 0x75, 0xd0, 0x3e, 0xfc, 0x80, 0x3a, 0xba, 0xd3, 0xa1, 0xd5, 0xdf, 0xcc, - 0x96, 0x63, 0xb4, 0x93, 0x20, 0x05, 0xd6, 0x66, 0x33, 0x8a, 0xea, 0xcf, 0x4c, 0xe5, 0xc7, 0xca, - 0x4c, 0x9a, 0x67, 0x4a, 0xed, 0x7d, 0x3a, 0xf0, 0x0f, 0xe5, 0x21, 0xec, 0x27, 0x93, 0x9c, 0x48, - 0x81, 0xb5, 0x99, 0xcc, 0x67, 0x2a, 0xcf, 0x5c, 0xed, 0x65, 0xae, 0xf2, 0xc2, 0xb9, 0x17, 0x96, - 0xf4, 0xa6, 0x21, 0x20, 0xb4, 0x81, 0x93, 0xca, 0x03, 0x00, 0x13, 0x7e, 0x50, 0x6a, 0x13, 0x8b, - 0x1a, 0xe8, 0x2b, 0x18, 0xe7, 0x4c, 0x34, 0x09, 0x52, 0xef, 0xad, 0xcd, 0x64, 0xe6, 0x83, 0x19, - 0x35, 0x57, 0x86, 0xf6, 0x03, 0x90, 0x3e, 0xbf, 0x11, 0x89, 0x87, 0xf3, 0x31, 0x6d, 0x42, 0x34, - 0x80, 0xe4, 0x96, 0x6e, 0x11, 0x4e, 0xf3, 0x48, 0x55, 0xb3, 0xc1, 0xca, 0x16, 0xd5, 0xa6, 0xf8, - 0x42, 0xa1, 0xa1, 0xfc, 0xe8, 0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, 0x74, 0xb9, 0x76, 0xfd, 0x1f, 0x00, - 0xd1, 0xdb, 0xde, 0x89, 0x56, 0x60, 0xaa, 0x72, 0x58, 0x2c, 0xe6, 0x0e, 0xaa, 0xe5, 0xca, 0x76, - 0xe5, 0xb0, 0x5c, 0xcd, 0x17, 0x0e, 0x2a, 0x39, 0xad, 0x7a, 0x58, 0x2c, 0x97, 0x72, 0xbb, 0x85, - 0x7c, 0x21, 0xb7, 0x37, 0x17, 0x41, 0xcb, 0x70, 0x31, 0x50, 0xb5, 0xbd, 0x5b, 0x29, 0xfc, 0x92, - 0x9b, 0x03, 0xe8, 0x53, 0xf8, 0x49, 0xa0, 0xa0, 0x50, 0x14, 0x92, 0x09, 0x29, 0xfa, 0xef, 0x13, - 0x39, 0x92, 0x79, 0x16, 0x87, 0x93, 0x2c, 0x29, 0xd4, 0x81, 0x71, 0xe1, 0xac, 0x28, 0x3d, 0x9c, - 0x41, 0xc0, 0x0b, 0x42, 0x5a, 0x19, 0x2d, 0xe2, 0xc5, 0x51, 0x96, 0xff, 0x7e, 0xfe, 0xfa, 0xe1, - 0xc4, 0xc7, 0x68, 0x01, 0x07, 0xbe, 0x84, 0x28, 0xfa, 0x0b, 0xc6, 0xf8, 0x19, 0xa4, 0x8c, 0xb8, - 0xd0, 0x0d, 0x9a, 0x1e, 0xa9, 0x11, 0x31, 0x37, 0x58, 0xcc, 0x55, 0x94, 0x0e, 0x89, 0x89, 0xbb, - 0xde, 0x63, 0x75, 0x8e, 0xfe, 0x07, 0x70, 0xca, 0x35, 0x30, 0x14, 0x9c, 0xd3, 0x90, 0xbb, 0x4a, - 0xab, 0x37, 0xa8, 0x04, 0xc6, 0x16, 0xc3, 0x50, 0xd1, 0x17, 0x63, 0x60, 0x60, 0xcf, 0x06, 0x1f, - 0x03, 0x18, 0x17, 0x57, 0x85, 0xf4, 0xc1, 0xef, 0x6b, 0xd2, 0xca, 0x68, 0x91, 0x80, 0xf9, 0x81, - 0xc1, 0x7c, 0x87, 0xbe, 0xbd, 0x0d, 0x0c, 0xee, 0x7a, 0x1e, 0x78, 0x8e, 0xfe, 0x03, 0x30, 0x2e, - 0x2c, 0x23, 0x04, 0xcc, 0xef, 0x66, 0x21, 0x60, 0x43, 0xae, 0xa3, 0x64, 0x19, 0xd8, 0x97, 0x68, - 0x63, 0x1c, 0x30, 0xd7, 0x78, 0xee, 0x01, 0x18, 0xe3, 0x17, 0x85, 0x3c, 0x35, 0x3e, 0x23, 0x91, - 0xd2, 0x23, 0x35, 0x02, 0xe4, 0x7b, 0x06, 0xf2, 0x35, 0xca, 0xde, 0x02, 0x04, 0x77, 0x99, 0xed, - 0x9c, 0xa3, 0x93, 0x1e, 0x4f, 0x6f, 0xae, 0x43, 0x79, 0x06, 0x8c, 0x24, 0x94, 0x67, 0xd0, 0x56, - 0x14, 0x99, 0xf1, 0x24, 0xd1, 0x3c, 0x0e, 0xfc, 0xb6, 0xdb, 0x29, 0x5c, 0x5c, 0xc9, 0xe0, 0xf2, - 0x4a, 0x06, 0xaf, 0xae, 0x64, 0x70, 0xff, 0x5a, 0x8e, 0x5c, 0x5e, 0xcb, 0x91, 0x17, 0xd7, 0x72, - 0xe4, 0x57, 0xdc, 0x34, 0x9d, 0xa3, 0x4e, 0x4d, 0xad, 0x93, 0x63, 0x5c, 0xd3, 0xad, 0x06, 0xfb, - 0xd0, 0xab, 0x93, 0x16, 0xae, 0x1f, 0xe9, 0xa6, 0x85, 0x4f, 0x33, 0xf8, 0x0f, 0xf7, 0x4e, 0xe7, - 0xcc, 0x36, 0x68, 0x2d, 0xc6, 0x14, 0xd9, 0x37, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x94, 0x64, - 0x89, 0xd2, 0x0a, 0x00, 0x00, + // 870 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4f, 0x4f, 0x1b, 0x47, + 0x18, 0xc6, 0x3d, 0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0x37, 0xff, 0x39, 0xa1, 0xcb, 0x74, + 0x95, 0x28, 0xda, 0x61, 0x5b, 0x23, 0x36, 0xda, 0x81, 0x5f, 0x13, 0x5b, 0xb5, 0xdb, 0xa4, 0x72, + 0x5b, 0x6f, 0xda, 0x5a, 0x2b, 0x09, 0x52, 0x60, 0x71, 0x3c, 0x23, 0xc9, 0xfe, 0xcc, 0x64, 0x76, + 0xac, 0x44, 0xa5, 0x39, 0xaa, 0x54, 0xbe, 0x22, 0x3d, 0xff, 0x50, 0x0e, 0xc2, 0x6e, 0x32, 0xc9, + 0x91, 0x14, 0x58, 0x1c, 0xcb, 0xfc, 0x28, 0xb3, 0xcc, 0x65, 0x27, 0x73, 0x99, 0x15, 0xce, 0xbd, + 0xb0, 0xa8, 0x36, 0x34, 0x0e, 0xa1, 0xf4, 0x9c, 0x94, 0x4e, 0x01, 0x9c, 0xf4, 0x83, 0x12, 0xcb, + 0x34, 0x88, 0x86, 0x7e, 0x85, 0x71, 0xc6, 0x44, 0x92, 0x20, 0xf5, 0xc5, 0xe2, 0x58, 0x66, 0x2a, + 0x98, 0x51, 0x71, 0x65, 0x68, 0x27, 0x00, 0xe9, 0xa7, 0x2b, 0x91, 0x58, 0x38, 0x1f, 0xd3, 0x0a, + 0x44, 0x3d, 0x48, 0x6e, 0xe9, 0x66, 0xe0, 0x28, 0x8b, 0x54, 0xd1, 0xeb, 0xb4, 0x6c, 0x51, 0x25, + 0xc1, 0x16, 0xf2, 0x75, 0xe9, 0x6f, 0x5f, 0xb9, 0xbd, 0x24, 0xd6, 0x60, 0x8c, 0x49, 0xe8, 0x81, + 0xd0, 0x1c, 0x36, 0xa3, 0x67, 0xef, 0xe6, 0x22, 0x0a, 0xd7, 0x4a, 0x1d, 0x5e, 0x92, 0x6d, 0xcd, + 0x32, 0x89, 0x6e, 0x93, 0x61, 0x08, 0x6e, 0xac, 0x21, 0xcf, 0x01, 0xfc, 0xb6, 0x2f, 0x3a, 0x4f, + 0x66, 0x15, 0x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, 0xd9, + 0x89, 0x90, 0x1e, 0xa8, 0xe1, 0x20, 0x7f, 0x52, 0x90, 0x75, 0xf4, 0xdb, 0x35, 0x40, 0x70, 0xc7, + 0x75, 0x9e, 0x13, 0x74, 0xe8, 0x20, 0x39, 0xa3, 0x1d, 0x8a, 0xd4, 0xe3, 0x25, 0xa1, 0x48, 0xbd, + 0xce, 0x22, 0x89, 0x14, 0x29, 0x89, 0xa6, 0x70, 0xe0, 0x47, 0xde, 0x66, 0xfe, 0xec, 0x42, 0x04, + 0xe7, 0x17, 0x22, 0x78, 0x7f, 0x21, 0x82, 0xa7, 0x97, 0x62, 0xe4, 0xfc, 0x52, 0x8c, 0xbc, 0xbd, + 0x14, 0x23, 0xb7, 0x70, 0x43, 0xb7, 0xf7, 0xdb, 0x55, 0xb9, 0x66, 0x1e, 0xe0, 0xaa, 0x6a, 0xd4, + 0xe9, 0x17, 0x5f, 0xcd, 0x6c, 0xe2, 0xda, 0xbe, 0xaa, 0x1b, 0xf8, 0x28, 0x83, 0xef, 0xba, 0x77, + 0xda, 0xc7, 0x96, 0x46, 0xaa, 0x31, 0xaa, 0x58, 0xfd, 0x18, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xd7, + 0x80, 0x03, 0xdb, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -870,7 +870,7 @@ type QueryClient interface { Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) // Packets is a RPC method that returns all packets of a tunnel. Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) - // Packet is a RPC method that returns a packet by its tunnel ID and nonce. + // Packet is a RPC method that returns a packet by its tunnel ID and sequence. Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) // Params is a RPC method that returns all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) @@ -959,7 +959,7 @@ type QueryServer interface { Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) // Packets is a RPC method that returns all packets of a tunnel. Packets(context.Context, *QueryPacketsRequest) (*QueryPacketsResponse, error) - // Packet is a RPC method that returns a packet by its tunnel ID and nonce. + // Packet is a RPC method that returns a packet by its tunnel ID and sequence. Packet(context.Context, *QueryPacketRequest) (*QueryPacketResponse, error) // Params is a RPC method that returns all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) @@ -1574,8 +1574,8 @@ func (m *QueryPacketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Nonce != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Nonce)) + if m.Sequence != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x10 } @@ -1853,8 +1853,8 @@ func (m *QueryPacketRequest) Size() (n int) { if m.TunnelId != 0 { n += 1 + sovQuery(uint64(m.TunnelId)) } - if m.Nonce != 0 { - n += 1 + sovQuery(uint64(m.Nonce)) + if m.Sequence != 0 { + n += 1 + sovQuery(uint64(m.Sequence)) } return n } @@ -2959,9 +2959,9 @@ func (m *QueryPacketRequest) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) } - m.Nonce = 0 + m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2971,7 +2971,7 @@ func (m *QueryPacketRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + m.Sequence |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/tunnel/types/query.pb.gw.go b/x/tunnel/types/query.pb.gw.go index ea5712a68..1b3937aa6 100644 --- a/x/tunnel/types/query.pb.gw.go +++ b/x/tunnel/types/query.pb.gw.go @@ -365,15 +365,15 @@ func request_Query_Packet_0(ctx context.Context, marshaler runtime.Marshaler, cl return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) } - val, ok = pathParams["nonce"] + val, ok = pathParams["sequence"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nonce") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "sequence") } - protoReq.Nonce, err = runtime.Uint64(val) + protoReq.Sequence, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nonce", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "sequence", err) } msg, err := client.Packet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -403,15 +403,15 @@ func local_request_Query_Packet_0(ctx context.Context, marshaler runtime.Marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tunnel_id", err) } - val, ok = pathParams["nonce"] + val, ok = pathParams["sequence"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nonce") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "sequence") } - protoReq.Nonce, err = runtime.Uint64(val) + protoReq.Sequence, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nonce", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "sequence", err) } msg, err := server.Packet(ctx, &protoReq) @@ -799,7 +799,7 @@ var ( pattern_Query_Packets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Packet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Packet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"tunnel", "v1beta1", "tunnels", "tunnel_id", "packets", "sequence"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"tunnel", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 46bc54e5b..b6236c736 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -13,7 +13,7 @@ var _ types.UnpackInterfacesMessage = Tunnel{} // NewTunnel creates a new Tunnel instance. func NewTunnel( id uint64, - nonceCount uint64, + Sequence uint64, route RouteI, encoder Encoder, feePayer string, @@ -35,7 +35,7 @@ func NewTunnel( return Tunnel{ ID: id, - NonceCount: nonceCount, + Sequence: Sequence, Route: any, Encoder: encoder, FeePayer: feePayer, diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index a59a13837..53b071bf1 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -304,8 +304,8 @@ func (m *Deposit) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { type Tunnel struct { // id is the tunnel ID ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // nonce_count is representing the number of packets sent - NonceCount uint64 `protobuf:"varint,2,opt,name=nonce_count,json=nonceCount,proto3" json:"nonce_count,omitempty"` + // sequence is representing the sequence of the tunnel packet. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // route is the route for delivering the signal prices Route *types1.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. @@ -366,9 +366,9 @@ func (m *Tunnel) GetID() uint64 { return 0 } -func (m *Tunnel) GetNonceCount() uint64 { +func (m *Tunnel) GetSequence() uint64 { if m != nil { - return m.NonceCount + return m.Sequence } return 0 } @@ -605,8 +605,8 @@ func (m *TotalFees) GetTotalPacketFee() github_com_cosmos_cosmos_sdk_types.Coins type Packet struct { // tunnel_id is the tunnel ID TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // nonce is the nonce of the packet - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // sequence is representing the sequence of the tunnel packet. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // signal_prices is the list of signal prices SignalPrices []SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` // packet_content is the content of the packet that implements PacketContentI @@ -655,9 +655,9 @@ func (m *Packet) GetTunnelID() uint64 { return 0 } -func (m *Packet) GetNonce() uint64 { +func (m *Packet) GetSequence() uint64 { if m != nil { - return m.Nonce + return m.Sequence } return 0 } @@ -829,79 +829,79 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 1151 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x8f, 0x93, 0x6c, 0x36, 0x79, 0xd9, 0x86, 0x74, 0x1a, 0xb5, 0x6e, 0xb6, 0xc4, 0xd1, 0x9e, - 0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 0xa9, 0xfe, 0x0f, 0x06, 0x53, 0x7e, 0x8b, 0xf3, 0xb9, 0xec, 0xa5, 0xb8, 0xc5, - 0xbb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x47, 0x43, 0x53, 0xf6, 0xa2, 0x0b, 0x00, 0x00, + // 1140 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xda, 0x8e, 0x63, 0x4f, 0x12, 0xe3, 0x4e, 0xad, 0x66, 0xeb, 0x14, 0xdb, 0xca, 0xc9, + 0x44, 0x8a, 0x37, 0x09, 0x6a, 0x85, 0x72, 0xc2, 0xff, 0xa2, 0xae, 0x0a, 0x89, 0x59, 0x1b, 0x09, + 0x71, 0x59, 0xad, 0x77, 0xc7, 0xce, 0x50, 0x7b, 0xc7, 0xdd, 0x19, 0x47, 0xcd, 0x27, 0xa0, 0xca, + 0x89, 0x2f, 0x10, 0x84, 0x40, 0x88, 0x0a, 0x2e, 0x1c, 0x72, 0xe3, 0x0b, 0x54, 0x39, 0x55, 0x9c, + 0x38, 0x20, 0x83, 0x9c, 0x43, 0xf9, 0x0c, 0x9c, 0xd0, 0xce, 0xcc, 0xfa, 0x5f, 0x13, 0x42, 0x10, + 0x48, 0xbd, 0xd8, 0xfb, 0xfe, 0xce, 0x7b, 0xbf, 0xf7, 0x7b, 0x3b, 0x0b, 0xd6, 0xd8, 0xc0, 0x75, + 0x51, 0x57, 0x3b, 0xda, 0x6e, 0x21, 0x66, 0x6d, 0x6b, 0x42, 0x2c, 0xf6, 0x3d, 0xc2, 0x08, 0x4c, + 0x4a, 0x49, 0x1a, 0x33, 0xb7, 0xac, 0x1e, 0x76, 0x89, 0xc6, 0x7f, 0x85, 0x4b, 0x26, 0x6b, 0x13, + 0xda, 0x23, 0x54, 0x6b, 0x59, 0x14, 0x8d, 0x93, 0xd8, 0x04, 0xbb, 0xd2, 0x7e, 0x57, 0xd8, 0x4d, + 0x2e, 0x69, 0x42, 0x90, 0xa6, 0x74, 0x87, 0x74, 0x88, 0xd0, 0xfb, 0x4f, 0x41, 0x40, 0x87, 0x90, + 0x4e, 0x17, 0x69, 0x5c, 0x6a, 0x0d, 0xda, 0x9a, 0xe5, 0x1e, 0x07, 0xa6, 0x36, 0x42, 0x0e, 0x1d, + 0x9f, 0xc2, 0x25, 0x61, 0x5a, 0xff, 0x5a, 0x01, 0xf1, 0x66, 0xa3, 0x61, 0x90, 0x01, 0x43, 0xf0, + 0x21, 0x48, 0x3b, 0x88, 0x32, 0xec, 0x5a, 0x0c, 0x13, 0xd7, 0xb4, 0x0f, 0x2d, 0xec, 0x9a, 0xd8, + 0x51, 0x95, 0xbc, 0x52, 0x48, 0x94, 0xef, 0x8c, 0x86, 0x39, 0x58, 0x9d, 0xd8, 0x2b, 0xbe, 0x59, + 0xaf, 0x1a, 0xd0, 0x99, 0xd7, 0x39, 0xf0, 0x7d, 0x70, 0x6f, 0x26, 0x13, 0x71, 0x99, 0x67, 0xd9, + 0xcc, 0xb4, 0x1c, 0xc7, 0x43, 0x94, 0xaa, 0x61, 0x3f, 0xa3, 0x91, 0x99, 0x8e, 0x94, 0x2e, 0x25, + 0xe1, 0xb1, 0x0b, 0xce, 0xcf, 0x36, 0x63, 0xbc, 0x2c, 0x7d, 0xfd, 0x5b, 0x05, 0x2c, 0x95, 0x9e, + 0xa2, 0xae, 0xe5, 0xbd, 0xd9, 0x75, 0x9e, 0x2b, 0xe0, 0xad, 0x06, 0xee, 0xb8, 0x56, 0xb7, 0x8a, + 0x8e, 0x30, 0x77, 0x87, 0xef, 0x80, 0x04, 0xe5, 0xaa, 0x49, 0x81, 0xcb, 0xa3, 0x61, 0x2e, 0x2e, + 0xfc, 0xf4, 0xaa, 0x11, 0x17, 0x66, 0xdd, 0x81, 0x65, 0x00, 0x29, 0x69, 0x33, 0xd3, 0x09, 0x82, +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86, 0xb9, 0xb0, 0x5e, 0x35, 0xc2, 0xd8, 0x81, 0x19, 0x10, 0xa7, + 0xe8, 0xc9, 0x00, 0xb9, 0x36, 0x12, 0x53, 0x30, 0xc6, 0x32, 0x7c, 0x00, 0x16, 0x3c, 0x7f, 0xe8, + 0x1c, 0xda, 0xa5, 0x9d, 0x74, 0x51, 0x6c, 0x5f, 0x31, 0xd8, 0xbe, 0x62, 0xc9, 0x3d, 0x2e, 0x4f, + 0x71, 0xc3, 0x10, 0xee, 0x70, 0x1b, 0x2c, 0x22, 0xd7, 0x26, 0x0e, 0xf2, 0xd4, 0x68, 0x5e, 0x29, + 0x24, 0x77, 0x56, 0x8b, 0xb3, 0xef, 0x8a, 0x62, 0x4d, 0x98, 0x8d, 0xc0, 0x0f, 0xde, 0x07, 0x89, + 0x36, 0x42, 0x66, 0xdf, 0x3a, 0x46, 0x9e, 0xba, 0x70, 0x0d, 0xa2, 0xf1, 0x36, 0x42, 0x75, 0xdf, + 0x13, 0x1a, 0xe0, 0x96, 0x24, 0xde, 0x98, 0x0b, 0x54, 0x8d, 0x71, 0x6c, 0x73, 0xf3, 0x67, 0xce, + 0x91, 0xb6, 0x1c, 0xf5, 0x11, 0x36, 0x52, 0x74, 0x56, 0x4d, 0x7d, 0x44, 0xb0, 0xcb, 0x90, 0x77, + 0x64, 0x75, 0xd5, 0x45, 0x81, 0x48, 0x20, 0xc3, 0x01, 0x58, 0x61, 0x84, 0xf1, 0xe3, 0xf8, 0x4c, + 0xd5, 0xf8, 0xff, 0x34, 0xc7, 0x65, 0x7e, 0x4c, 0x40, 0xcd, 0x35, 0x90, 0xc0, 0xd4, 0xb4, 0x6c, + 0x86, 0x8f, 0x90, 0x9a, 0xc8, 0x2b, 0x85, 0xb8, 0x11, 0xc7, 0xb4, 0xc4, 0x65, 0xf8, 0x36, 0x00, + 0xb6, 0x87, 0x2c, 0x86, 0x1c, 0xd3, 0x62, 0x2a, 0xc8, 0x2b, 0x85, 0x88, 0x91, 0x90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af, 0x3c, 0xe2, 0x21, 0xe1, 0x4c, + 0xfa, 0xe4, 0x34, 0xff, 0x9a, 0x3e, 0x13, 0x7d, 0xf6, 0x4d, 0x36, 0x54, 0xfe, 0xf0, 0xf9, 0x28, + 0xab, 0xbc, 0x18, 0x65, 0x95, 0x97, 0xa3, 0xac, 0xf2, 0xfb, 0x28, 0xab, 0x7c, 0x71, 0x91, 0x0d, + 0xbd, 0xbc, 0xc8, 0x86, 0x7e, 0xb9, 0xc8, 0x86, 0x3e, 0xd5, 0xfe, 0x01, 0x31, 0xe5, 0xc7, 0x38, + 0xe7, 0x65, 0x2b, 0xc6, 0x3d, 0xde, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x08, 0x5d, 0x1e, + 0xa3, 0x0b, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -1045,7 +1045,7 @@ func (this *Tunnel) Equal(that interface{}) bool { if this.ID != that1.ID { return false } - if this.NonceCount != that1.NonceCount { + if this.Sequence != that1.Sequence { return false } if !this.Route.Equal(that1.Route) { @@ -1200,7 +1200,7 @@ func (this *Packet) Equal(that interface{}) bool { if this.TunnelID != that1.TunnelID { return false } - if this.Nonce != that1.Nonce { + if this.Sequence != that1.Sequence { return false } if len(this.SignalPrices) != len(that1.SignalPrices) { @@ -1541,8 +1541,8 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if m.NonceCount != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.NonceCount)) + if m.Sequence != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x10 } @@ -1724,8 +1724,8 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - if m.Nonce != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Nonce)) + if m.Sequence != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x10 } @@ -1916,8 +1916,8 @@ func (m *Tunnel) Size() (n int) { if m.ID != 0 { n += 1 + sovTunnel(uint64(m.ID)) } - if m.NonceCount != 0 { - n += 1 + sovTunnel(uint64(m.NonceCount)) + if m.Sequence != 0 { + n += 1 + sovTunnel(uint64(m.Sequence)) } if m.Route != nil { l = m.Route.Size() @@ -2019,8 +2019,8 @@ func (m *Packet) Size() (n int) { if m.TunnelID != 0 { n += 1 + sovTunnel(uint64(m.TunnelID)) } - if m.Nonce != 0 { - n += 1 + sovTunnel(uint64(m.Nonce)) + if m.Sequence != 0 { + n += 1 + sovTunnel(uint64(m.Sequence)) } if len(m.SignalPrices) > 0 { for _, e := range m.SignalPrices { @@ -2617,9 +2617,9 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NonceCount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) } - m.NonceCount = 0 + m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2629,7 +2629,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NonceCount |= uint64(b&0x7F) << shift + m.Sequence |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -3257,9 +3257,9 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) } - m.Nonce = 0 + m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -3269,7 +3269,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift + m.Sequence |= uint64(b&0x7F) << shift if b < 0x80 { break } From 3284ad0b14579f3accaf1bf48efe128f1f91ef31 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 30 Sep 2024 17:13:18 +0700 Subject: [PATCH 159/272] lint --- x/tunnel/types/tunnel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index b6236c736..8b1ac07d6 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -13,7 +13,7 @@ var _ types.UnpackInterfacesMessage = Tunnel{} // NewTunnel creates a new Tunnel instance. func NewTunnel( id uint64, - Sequence uint64, + sequence uint64, route RouteI, encoder Encoder, feePayer string, @@ -35,7 +35,7 @@ func NewTunnel( return Tunnel{ ID: id, - Sequence: Sequence, + Sequence: sequence, Route: any, Encoder: encoder, FeePayer: feePayer, From ed81446a26af7c2daa6090710832b978a7bfcfc8 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 1 Oct 2024 17:52:39 +0700 Subject: [PATCH 160/272] add Fee in routeI interface and logic for checking fund --- x/tunnel/keeper/tunnel.go | 27 +++++++++++++++++++++++++++ x/tunnel/types/axelar_route.go | 6 ++++++ x/tunnel/types/route.go | 6 +++++- x/tunnel/types/tss_route.go | 6 ++++++ 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index bb9ca865b..9d0001842 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -245,3 +245,30 @@ func (k Keeper) GetTotalFees(ctx sdk.Context) types.TotalFees { k.cdc.MustUnmarshal(bz, &totalFee) return totalFee } + +// HasEnoughFundToCreatePacket checks if the fee payer has enough balance to create a packet +func (k Keeper) HasEnoughFundToCreatePacket(ctx sdk.Context, tunnelID uint64) (bool, error) { + tunnel, err := k.GetTunnel(ctx, tunnelID) + if err != nil { + return false, err + } + + // get the route fee from the tunnel + route, ok := tunnel.Route.GetCachedValue().(types.RouteI) + if !ok { + return false, types.ErrInvalidRoute + } + routeFee := route.Fee() + + // get the base packet fee and calculate total fee + basePacketFee := k.GetParams(ctx).BasePacketFee + totalFee := basePacketFee.Add(routeFee...) + + // compare the fee payer's balance with the total fee + feePayer, err := sdk.AccAddressFromBech32(tunnel.FeePayer) + if err != nil { + return false, err + } + balances := k.bankKeeper.SpendableCoins(ctx, feePayer) + return balances.IsAllGTE(totalFee), nil +} diff --git a/x/tunnel/types/axelar_route.go b/x/tunnel/types/axelar_route.go index b380cd5b6..18a6ec32d 100644 --- a/x/tunnel/types/axelar_route.go +++ b/x/tunnel/types/axelar_route.go @@ -1,7 +1,13 @@ package types +import sdk "github.com/cosmos/cosmos-sdk/types" + var _ RouteI = &AxelarRoute{} func (r *AxelarRoute) ValidateBasic() error { return nil } + +func (r *AxelarRoute) Fee() sdk.Coins { + return sdk.NewCoins() +} diff --git a/x/tunnel/types/route.go b/x/tunnel/types/route.go index 4beb34357..e9d9cb981 100644 --- a/x/tunnel/types/route.go +++ b/x/tunnel/types/route.go @@ -1,10 +1,14 @@ package types -import "github.com/cosmos/gogoproto/proto" +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/gogoproto/proto" +) // RouteI defines a routing path to deliver data to the destination. type RouteI interface { proto.Message ValidateBasic() error + Fee() sdk.Coins } diff --git a/x/tunnel/types/tss_route.go b/x/tunnel/types/tss_route.go index 285935a48..e55e5beaa 100644 --- a/x/tunnel/types/tss_route.go +++ b/x/tunnel/types/tss_route.go @@ -1,7 +1,13 @@ package types +import sdk "github.com/cosmos/cosmos-sdk/types" + var _ RouteI = &TSSRoute{} func (r *TSSRoute) ValidateBasic() error { return nil } + +func (r *TSSRoute) Fee() sdk.Coins { + return sdk.NewCoins() +} From 24f77fb7f375adf251a1cc866adf5285b6c2062e Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 1 Oct 2024 17:56:14 +0700 Subject: [PATCH 161/272] fix producePacket logic --- proto/tunnel/v1beta1/tunnel.proto | 5 +- x/tunnel/keeper/genesis_test.go | 2 +- x/tunnel/keeper/latest_signal_prices.go | 28 +++ x/tunnel/keeper/msg_server.go | 12 +- x/tunnel/keeper/msg_server_test.go | 9 +- x/tunnel/keeper/packet.go | 229 ++++++++++++++---------- x/tunnel/keeper/packet_test.go | 17 +- x/tunnel/keeper/tunnel_test.go | 2 +- x/tunnel/types/errors.go | 2 + x/tunnel/types/signal.go | 12 +- x/tunnel/types/tunnel.pb.go | 170 +++++++++--------- 11 files changed, 284 insertions(+), 204 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 6daaee13a..a633dc55e 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -100,8 +100,9 @@ message LatestSignalPrices { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // signal_prices is the list of signal prices repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; - // timestamp is the timestamp when the signal prices are produced - int64 timestamp = 3; + // last_interval_timestamp is the timestamp when the signal prices were updated + // because the specified interval has been reached. + int64 last_interval_timestamp = 3; } // SignalPrice is the type for a signal price diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index f8c37a4f2..67ed0c16c 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -157,7 +157,7 @@ func (s *KeeperTestSuite) TestInitExportGenesis() { SignalPrices: []types.SignalPrice{ {SignalID: "ETH", Price: 5000}, }, - Timestamp: 0, + LastIntervalTimestamp: 0, }, }, TotalFees: types.TotalFees{ diff --git a/x/tunnel/keeper/latest_signal_prices.go b/x/tunnel/keeper/latest_signal_prices.go index 3044f50fd..862e89290 100644 --- a/x/tunnel/keeper/latest_signal_prices.go +++ b/x/tunnel/keeper/latest_signal_prices.go @@ -45,3 +45,31 @@ func (k Keeper) GetAllLatestSignalPrices(ctx sdk.Context) []types.LatestSignalPr } return allLatestSignalPrices } + +// UpdateLastInterval updates the last interval timestamp of the tunnel in the LatestSignalPrices. +// LatestSignalPrices of the tunnel must be set before calling this function. +func (k Keeper) UpdateLastInterval(ctx sdk.Context, tunnelID uint64, timestamp int64) error { + latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + if err != nil { + return err + } + + latestSignalPrices.LastIntervalTimestamp = timestamp + k.SetLatestSignalPrices(ctx, latestSignalPrices) + + return nil +} + +// UpdatePriceTunnel updates the signal prices of the tunnel in the LatestSignalPrices. +// LatestSignalPrices of the tunnel must be set before calling this function. +func (k Keeper) UpdatePriceTunnel(ctx sdk.Context, tunnelID uint64, signalPrices []types.SignalPrice) error { + latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + if err != nil { + return err + } + + latestSignalPrices.SignalPrices = signalPrices + k.SetLatestSignalPrices(ctx, latestSignalPrices) + + return nil +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 3d1cda87a..7bfef7784 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -204,11 +204,19 @@ func (ms msgServer) TriggerTunnel( return nil, types.ErrInactiveTunnel.Wrapf("tunnelID %d", req.TunnelID) } + ok, err := ms.Keeper.HasEnoughFundToCreatePacket(ctx, tunnel.ID) + if err != nil { + return nil, err + } + if !ok { + return nil, types.ErrInsufficientFund.Wrapf("tunnelID %d", req.TunnelID) + } + + // TODO: get current prices from the given signal IDs currentPrices := ms.Keeper.feedsKeeper.GetCurrentPrices(ctx) currentPricesMap := createPricesMap(currentPrices) - // produce packet with trigger all signals - if err := ms.Keeper.ProducePacket(ctx, tunnel.ID, currentPricesMap, true); err != nil { + if err := ms.Keeper.ProducePacket(ctx, req.TunnelID, currentPricesMap, true); err != nil { return nil, err } diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 53a1c1970..7f5da19b0 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -402,6 +402,10 @@ func (s *KeeperTestSuite) TestMsgDeactivate() { } func (s *KeeperTestSuite) TestMsgTriggerTunnel() { + feePayer := sdk.MustAccAddressFromBech32( + "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", + ) + cases := map[string]struct { preRun func() *types.MsgTriggerTunnel expErr bool @@ -436,16 +440,13 @@ func (s *KeeperTestSuite) TestMsgTriggerTunnel() { preRun: func() *types.MsgTriggerTunnel { s.AddSampleTunnel(true) - feePayer := sdk.MustAccAddressFromBech32( - "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", - ) - s.feedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT(). SendCoinsFromAccountToModule(gomock.Any(), feePayer, types.ModuleName, types.DefaultBasePacketFee). Return(nil) + s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) return types.NewMsgTriggerTunnel(1, sdk.AccAddress([]byte("creator_address")).String()) }, diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 808f825f8..a73748f72 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "math" sdkerrors "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" @@ -63,12 +64,8 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // check for active tunnels for _, id := range ids { - tunnel := k.MustGetTunnel(ctx, id) - balances := k.bankKeeper.SpendableCoins(ctx, sdk.MustAccAddressFromBech32(tunnel.FeePayer)) - basePacketFee := k.GetParams(ctx).BasePacketFee - - // deactivate tunnel if the fee payer does not have enough balance. - if !balances.IsAllGTE(basePacketFee) { + ok, err := k.HasEnoughFundToCreatePacket(ctx, id) + if err != nil || !ok { k.MustDeactivateTunnel(ctx, id) continue } @@ -93,71 +90,98 @@ func (k Keeper) ProducePacket( ctx sdk.Context, tunnelID uint64, currentPricesMap map[string]feedstypes.Price, - triggerAll bool, + sendAll bool, ) error { unixNow := ctx.BlockTime().Unix() // get tunnel and signal prices info - tunnel := k.MustGetTunnel(ctx, tunnelID) - latestSignalPrices := k.MustGetLatestSignalPrices(ctx, tunnelID) + tunnel, err := k.GetTunnel(ctx, tunnelID) + if err != nil { + return err + } + latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + if err != nil { + return err + } // check if the interval has passed - intervalTrigger := unixNow >= int64(tunnel.Interval)+latestSignalPrices.Timestamp - triggerAll = triggerAll || intervalTrigger - - // generate new signal prices - nsps := GenerateSignalPrices( - ctx, - currentPricesMap, - tunnel.GetSignalDeviationMap(), - latestSignalPrices.SignalPrices, - triggerAll, - ) - - // return if no new signal prices - if len(nsps) == 0 { + intervalTrigger := unixNow >= int64(tunnel.Interval)+latestSignalPrices.LastIntervalTimestamp + sendAll = sendAll || intervalTrigger + + // generate new signal prices; if no new signal prices, stop the process. + newSignalPrices, err := k.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + if err != nil { + return err + } + if len(newSignalPrices) == 0 { return nil } - // deduct base packet fee from the fee payer, - feePayer := sdk.MustAccAddressFromBech32(tunnel.FeePayer) - if err := k.DeductBasePacketFee(ctx, feePayer); err != nil { - return sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) + // create a new packet + packet, err := k.CreatePacket(ctx, tunnel.ID, newSignalPrices) + if err != nil { + return err } - // increment sequence number - tunnel.Sequence++ + // send packet + if err := k.SendPacket(ctx, packet); err != nil { + return sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) + } + + // update latest price info. + if err := k.UpdatePriceTunnel(ctx, tunnel.ID, newSignalPrices); err != nil { + return err + } + if sendAll { + if err := k.UpdateLastInterval(ctx, tunnel.ID, ctx.BlockTime().Unix()); err != nil { + return err + } + } + + return nil +} - newPacket, err := types.NewPacket(tunnel.ID, tunnel.Sequence, nsps, unixNow) +// CreatePacket creates a new packet of the the given tunnel. Creating a packet charges +// the base packet fee to the tunnel's fee payer. +func (k Keeper) CreatePacket( + ctx sdk.Context, + tunnelID uint64, + signalPrices []types.SignalPrice, +) (types.Packet, error) { + tunnel, err := k.GetTunnel(ctx, tunnelID) if err != nil { - return sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) + return types.Packet{}, err } - if err := k.SendPacket(ctx, tunnel, newPacket); err != nil { - return sdkerrors.Wrapf(err, "route %s failed to send packet", tunnel.Route.TypeUrl) + + // deduct base packet fee from the fee payer, + feePayer := sdk.MustAccAddressFromBech32(tunnel.FeePayer) + if err := k.DeductBasePacketFee(ctx, feePayer); err != nil { + return types.Packet{}, sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) } - // update signal prices info - latestSignalPrices.UpdateSignalPrices(nsps) - if triggerAll { - latestSignalPrices.Timestamp = unixNow + tunnel.Sequence++ + packet, err := types.NewPacket(tunnelID, tunnel.Sequence, signalPrices, ctx.BlockTime().Unix()) + if err != nil { + return types.Packet{}, sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) } - k.SetLatestSignalPrices(ctx, latestSignalPrices) - // update sequence number + // update information in the store k.SetTunnel(ctx, tunnel) + k.SetPacket(ctx, packet) - return nil + return packet, nil } // SendPacket sends a packet to the destination route -func (k Keeper) SendPacket( - ctx sdk.Context, - tunnel types.Tunnel, - packet types.Packet, -) error { - var content types.PacketContentI - var err error +func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { + tunnel, err := k.GetTunnel(ctx, packet.TunnelID) + if err != nil { + return err + } + // get the packet content, which is the information receiving after + // sending packet to the destination route + var content types.PacketContentI switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: content, err = k.SendTSSPacket(ctx, r, packet) @@ -172,71 +196,88 @@ func (k Keeper) SendPacket( return err } - // set the packet content + // update the packet content if err := packet.SetPacketContent(content); err != nil { return sdkerrors.Wrapf(err, "failed to set packet content for tunnel ID: %d", tunnel.ID) } - - // set the packet in the store k.SetPacket(ctx, packet) + return nil } -// GenerateSignalPrices generates signal prices based on the current prices and signal info -func GenerateSignalPrices( +// GenerateNewSignalPrices generates new signal prices based on the current prices +// and signal deviations. +func (k Keeper) GenerateNewSignalPrices( ctx sdk.Context, - currentPricesMap map[string]feedstypes.Price, - signalDeviationMap map[string]types.SignalDeviation, - signalPrices []types.SignalPrice, - triggerAll bool, -) []types.SignalPrice { - var sps []types.SignalPrice - for _, sp := range signalPrices { - currentPrice, exists := currentPricesMap[sp.SignalID] - if !exists || currentPrice.PriceStatus != feedstypes.PriceStatusAvailable { - sps = append(sps, types.NewSignalPrice(sp.SignalID, 0)) - continue - } + tunnelID uint64, + currentFeedsPricesMap map[string]feedstypes.Price, + sendAll bool, +) ([]types.SignalPrice, error) { + // get deviation info from the tunnel + tunnel, err := k.GetTunnel(ctx, tunnelID) + if err != nil { + return nil, err + } + signalDeviations := tunnel.GetSignalDeviationMap() + + // get latest signal prices + latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + if err != nil { + return nil, err + } - // get signal info from signalDeviationMap - signalDeviation, exists := signalDeviationMap[sp.SignalID] - if !exists { - // panic if signal info not found for signal ID in the tunnel that should not happen - panic(fmt.Sprintf("signal info not found for signal ID: %s", sp.SignalID)) + shouldSend := false + newSignalPrices := make([]types.SignalPrice, 0) + for _, sp := range latestSignalPrices.SignalPrices { + oldPrice := sdk.NewIntFromUint64(sp.Price) + + // get current price from the feed, if not found, set price to 0 + price := uint64(0) + feedPrice, ok := currentFeedsPricesMap[sp.SignalID] + if ok && feedPrice.PriceStatus == feedstypes.PriceStatusAvailable { + price = feedPrice.Price } + newPrice := sdk.NewIntFromUint64(price) - // if triggerAll is true or the deviation exceeds the threshold, add the signal price info to the list - if triggerAll || - deviationExceedsThreshold( - sdk.NewIntFromUint64(sp.Price), - sdk.NewIntFromUint64(currentPrice.Price), - sdk.NewIntFromUint64(signalDeviation.HardDeviationBPS), - ) { - sps = append( - sps, - types.NewSignalPrice( - sp.SignalID, - currentPrice.Price, - ), - ) + // get hard/soft deviation, panic if not found; should not happen. + sd, ok := signalDeviations[sp.SignalID] + if !ok { + panic(fmt.Sprintf("deviation not found for signal ID: %s", sp.SignalID)) + } + hardDeviation := sdk.NewIntFromUint64(sd.HardDeviationBPS) + softDeviation := sdk.NewIntFromUint64(sd.SoftDeviationBPS) + + // calculate deviation between old price and new price and compare with the threshold. + // shouldSend is set to true if sendAll is true or there is a signal whose deviation + // is over the hard threshold. + deviation := calculateDeviationBPS(oldPrice, newPrice) + if sendAll || deviation.GTE(hardDeviation) { + newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) + shouldSend = true + } else if deviation.GTE(softDeviation) { + newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) } } - return sps + + if shouldSend { + return newSignalPrices, nil + } else { + return []types.SignalPrice{}, nil + } } -// deviationExceedsThreshold checks if the deviation between the old price and the new price exceeds the threshold -func deviationExceedsThreshold(oldPrice, newPrice, thresholdBPS sdkmath.Int) bool { - // if the old price is zero, always add the signal price info to the list +// calculateDeviationBPS calculates the deviation between the old price and +// the new price in basis points, i.e., |(newPrice - oldPrice)| * 10000 / oldPrice +func calculateDeviationBPS(oldPrice, newPrice sdkmath.Int) sdkmath.Int { if oldPrice.IsZero() { - return true + if newPrice.IsZero() { + return sdkmath.ZeroInt() + } else { + return sdkmath.NewInt(math.MaxInt64) + } } - // if the deviation is greater than the hard deviation, add the signal price info to the list - // soft deviation is the feature to be implemented in the future - // deviationInBPS = |(newPrice - oldPrice)| * 10000 / oldPrice - deviationInBPS := newPrice.Sub(oldPrice).Abs().MulRaw(10000).Quo(oldPrice) - - return deviationInBPS.GTE(thresholdBPS) + return newPrice.Sub(oldPrice).Abs().MulRaw(10000).Quo(oldPrice) } // createPricesMap creates a map of prices with signal ID as the key diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 4a03c3e7d..25eea7779 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -5,7 +5,6 @@ import ( "go.uber.org/mock/gomock" feedstypes "github.com/bandprotocol/chain/v2/x/feeds/types" - "github.com/bandprotocol/chain/v2/x/tunnel/keeper" "github.com/bandprotocol/chain/v2/x/tunnel/types" ) @@ -210,9 +209,9 @@ func (s *KeeperTestSuite) TestGenerateSignalPrices() { currentPricesMap := map[string]feedstypes.Price{ "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, } - triggerAll := true + sendAll := true tunnel := types.Tunnel{ - ID: 1, + ID: tunnelID, SignalDeviations: []types.SignalDeviation{ {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, }, @@ -221,12 +220,10 @@ func (s *KeeperTestSuite) TestGenerateSignalPrices() { {SignalID: "BTC/USD", Price: 0}, }, 0) - nsps := keeper.GenerateSignalPrices( - ctx, - currentPricesMap, - tunnel.GetSignalDeviationMap(), - latestSignalPrices.SignalPrices, - triggerAll, - ) + s.keeper.SetTunnel(ctx, tunnel) + s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + + nsps, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + s.Require().NoError(err) s.Require().Len(nsps, 1) } diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 4adb70358..c2c10c48a 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -39,7 +39,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { {SignalID: "BTC", Price: 0}, {SignalID: "ETH", Price: 0}, }, - Timestamp: 0, + LastIntervalTimestamp: 0, } s.accountKeeper.EXPECT(). diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 893fdc60c..deef970bd 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -22,4 +22,6 @@ var ( ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") ErrDepositNotFound = errorsmod.Register(ModuleName, 16, "deposit not found") ErrInsufficientDeposit = errorsmod.Register(ModuleName, 17, "insufficient deposit") + ErrSignalPricesNotFound = errorsmod.Register(ModuleName, 18, "signal prices not found") + ErrInsufficientFund = errorsmod.Register(ModuleName, 19, "insufficient fund") ) diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 7e4a8a46e..face5c414 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -19,12 +19,12 @@ func NewSignalDeviation( func NewLatestSignalPrices( tunnelID uint64, signalPrices []SignalPrice, - timestamp int64, + lastIntervalTimestamp int64, ) LatestSignalPrices { return LatestSignalPrices{ - TunnelID: tunnelID, - SignalPrices: signalPrices, - Timestamp: timestamp, + TunnelID: tunnelID, + SignalPrices: signalPrices, + LastIntervalTimestamp: lastIntervalTimestamp, } } @@ -36,8 +36,8 @@ func (lsps LatestSignalPrices) Validate() error { if len(lsps.SignalPrices) == 0 { return fmt.Errorf("signal prices cannot be empty") } - if lsps.Timestamp < 0 { - return fmt.Errorf("timestamp cannot be negative") + if lsps.LastIntervalTimestamp < 0 { + return fmt.Errorf("last interval timestamp cannot be negative") } return nil } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 53b071bf1..c93c9ba88 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -442,8 +442,9 @@ type LatestSignalPrices struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // signal_prices is the list of signal prices SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` - // timestamp is the timestamp when the signal prices are produced - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // last_interval_timestamp is the timestamp when the signal prices were updated + // because the specified interval has been reached. + LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` } func (m *LatestSignalPrices) Reset() { *m = LatestSignalPrices{} } @@ -493,9 +494,9 @@ func (m *LatestSignalPrices) GetSignalPrices() []SignalPrice { return nil } -func (m *LatestSignalPrices) GetTimestamp() int64 { +func (m *LatestSignalPrices) GetLastIntervalTimestamp() int64 { if m != nil { - return m.Timestamp + return m.LastIntervalTimestamp } return 0 } @@ -829,79 +830,80 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 1140 bytes of a gzipped FileDescriptorProto + // 1154 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xda, 0x8e, 0x63, 0x4f, 0x12, 0xe3, 0x4e, 0xad, 0x66, 0xeb, 0x14, 0xdb, 0xca, 0xc9, - 0x44, 0x8a, 0x37, 0x09, 0x6a, 0x85, 0x72, 0xc2, 0xff, 0xa2, 0xae, 0x0a, 0x89, 0x59, 0x1b, 0x09, - 0x71, 0x59, 0xad, 0x77, 0xc7, 0xce, 0x50, 0x7b, 0xc7, 0xdd, 0x19, 0x47, 0xcd, 0x27, 0xa0, 0xca, - 0x89, 0x2f, 0x10, 0x84, 0x40, 0x88, 0x0a, 0x2e, 0x1c, 0x72, 0xe3, 0x0b, 0x54, 0x39, 0x55, 0x9c, - 0x38, 0x20, 0x83, 0x9c, 0x43, 0xf9, 0x0c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, 0xb0, 0xcb, 0x90, 0x77, - 0x64, 0x75, 0xd5, 0x45, 0x81, 0x48, 0x20, 0xc3, 0x01, 0x58, 0x61, 0x84, 0xf1, 0xe3, 0xf8, 0x4c, - 0xd5, 0xf8, 0xff, 0x34, 0xc7, 0x65, 0x7e, 0x4c, 0x40, 0xcd, 0x35, 0x90, 0xc0, 0xd4, 0xb4, 0x6c, - 0x86, 0x8f, 0x90, 0x9a, 0xc8, 0x2b, 0x85, 0xb8, 0x11, 0xc7, 0xb4, 0xc4, 0x65, 0xf8, 0x36, 0x00, - 0xb6, 0x87, 0x2c, 0x86, 0x1c, 0xd3, 0x62, 0x2a, 0xc8, 0x2b, 0x85, 0x88, 0x91, 0x90, 0x9a, 0x12, - 0x83, 0x3b, 0x60, 0x91, 0x0b, 0xc4, 0x53, 0x97, 0xae, 0xc1, 0x35, 0x70, 0x94, 0xec, 0xf9, 0x41, - 0x01, 0xf0, 0x03, 0x8b, 0x21, 0xca, 0x04, 0x74, 0x75, 0x0f, 0xdb, 0x88, 0xde, 0x64, 0x4f, 0xf6, - 0xc0, 0x8a, 0x1c, 0x4f, 0x9f, 0xc7, 0xaa, 0x61, 0x0e, 0xd7, 0xda, 0xe5, 0xa3, 0xe1, 0xf9, 0xe5, - 0x58, 0x96, 0xe9, 0xf4, 0x91, 0xf7, 0x40, 0x82, 0xe1, 0x1e, 0xa2, 0xcc, 0xea, 0xf5, 0x39, 0x19, - 0x23, 0xc6, 0x44, 0x21, 0xab, 0x6d, 0x82, 0xa5, 0xa9, 0x34, 0x37, 0x79, 0x25, 0xa5, 0xc1, 0x02, - 0x2f, 0x4f, 0xf2, 0x5f, 0x08, 0x32, 0xeb, 0x33, 0x05, 0x24, 0x9a, 0xfe, 0x28, 0xf6, 0x10, 0xa2, - 0x70, 0x00, 0x52, 0x62, 0xfc, 0x7d, 0xcb, 0x7e, 0x8c, 0x98, 0xd9, 0x46, 0x48, 0x55, 0xae, 0x63, - 0xc0, 0xd6, 0x4d, 0x19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6, 0x51, 0xf3, 0x09, 0xa8, 0x72, + 0xe2, 0x0b, 0x04, 0x21, 0x10, 0xa2, 0xe2, 0xc4, 0x21, 0x37, 0xce, 0x48, 0x55, 0x4e, 0x15, 0x27, + 0x0e, 0xc8, 0x20, 0xe7, 0x50, 0x3e, 0x03, 0x27, 0xb4, 0x33, 0xb3, 0xfe, 0xd7, 0x84, 0x10, 0x04, + 0x52, 0x2f, 0x89, 0xdf, 0xfb, 0xbd, 0xf7, 0xe6, 0xfd, 0xf9, 0xbd, 0x99, 0x05, 0xab, 0x6c, 0xe0, + 0xba, 0xb8, 0xab, 0x1d, 0x6d, 0xb5, 0x30, 0x43, 0x5b, 0x9a, 0x10, 0x8b, 0x7d, 0x8f, 0x30, 0x02, + 0x93, 0x52, 0x92, 0x60, 0xe6, 0x36, 0xea, 0x39, 0x2e, 0xd1, 0xf8, 0x5f, 0x61, 0x92, 0xc9, 0x5a, + 0x84, 0xf6, 0x08, 0xd5, 0x5a, 0x88, 0xe2, 0x71, 0x10, 0x8b, 0x38, 0xae, 0xc4, 0xef, 0x09, 0xdc, + 0xe4, 0x92, 0x26, 0x04, 0x09, 0xa5, 0x3b, 0xa4, 0x43, 0x84, 0xde, 0xff, 0x15, 0x38, 0x74, 0x08, + 0xe9, 0x74, 0xb1, 0xc6, 0xa5, 0xd6, 0xa0, 0xad, 0x21, 0xf7, 0x38, 0x80, 0xda, 0x18, 0xdb, 0x74, + 0x7c, 0x0a, 0x97, 0x04, 0xb4, 0xf6, 0xb5, 0x02, 0xe2, 0xcd, 0x46, 0xc3, 0x20, 0x03, 0x86, 0xe1, + 0x03, 0x90, 0xb6, 0x31, 0x65, 0x8e, 0x8b, 0x98, 0x43, 0x5c, 0xd3, 0x3a, 0x44, 0x8e, 0x6b, 0x3a, + 0xb6, 0xaa, 0xe4, 0x95, 0x42, 0xa2, 0x7c, 0x77, 0x34, 0xcc, 0xc1, 0xea, 0x04, 0xaf, 0xf8, 0xb0, + 0x5e, 0x35, 0xa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d, 0x0b, + 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -1117,7 +1119,7 @@ func (this *LatestSignalPrices) Equal(that interface{}) bool { return false } } - if this.Timestamp != that1.Timestamp { + if this.LastIntervalTimestamp != that1.LastIntervalTimestamp { return false } return true @@ -1574,8 +1576,8 @@ func (m *LatestSignalPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Timestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) + if m.LastIntervalTimestamp != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.LastIntervalTimestamp)) i-- dAtA[i] = 0x18 } @@ -1973,8 +1975,8 @@ func (m *LatestSignalPrices) Size() (n int) { n += 1 + l + sovTunnel(uint64(l)) } } - if m.Timestamp != 0 { - n += 1 + sovTunnel(uint64(m.Timestamp)) + if m.LastIntervalTimestamp != 0 { + n += 1 + sovTunnel(uint64(m.LastIntervalTimestamp)) } return n } @@ -2984,9 +2986,9 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastIntervalTimestamp", wireType) } - m.Timestamp = 0 + m.LastIntervalTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2996,7 +2998,7 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift + m.LastIntervalTimestamp |= int64(b&0x7F) << shift if b < 0x80 { break } From 914b11e2caba1a00f297cb00095e73aec84b32e2 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 2 Oct 2024 02:41:47 +0700 Subject: [PATCH 162/272] rename editTunnel to updateAndResetTunnel --- proto/tunnel/v1beta1/tx.proto | 14 +- scripts/tunnel/edit_tunnel.sh | 1 - scripts/tunnel/update_and_reset_tunnel.sh | 1 + x/tunnel/client/cli/tx.go | 10 +- x/tunnel/keeper/msg_server.go | 12 +- x/tunnel/keeper/msg_server_test.go | 26 +-- x/tunnel/keeper/tunnel.go | 6 +- x/tunnel/keeper/tunnel_test.go | 6 +- x/tunnel/types/codec.go | 4 +- x/tunnel/types/events.go | 14 +- x/tunnel/types/msgs.go | 18 +- x/tunnel/types/tx.pb.go | 259 +++++++++++----------- 12 files changed, 186 insertions(+), 185 deletions(-) delete mode 100644 scripts/tunnel/edit_tunnel.sh create mode 100644 scripts/tunnel/update_and_reset_tunnel.sh diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 0d10f744d..2ebe7c953 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -18,8 +18,8 @@ service Msg { // CreateTunnel is a RPC method to create a new tunnel. rpc CreateTunnel(MsgCreateTunnel) returns (MsgCreateTunnelResponse); - // EditTunnel is a RPC method to edit a tunnel. - rpc EditTunnel(MsgEditTunnel) returns (MsgEditTunnelResponse); + // UpdateAndResetTunnel is a RPC method to edit a tunnel. + rpc UpdateAndResetTunnel(MsgUpdateAndResetTunnel) returns (MsgUpdateAndResetTunnelResponse); // Activate is a RPC method to activate a tunnel. rpc Activate(MsgActivate) returns (MsgActivateResponse); @@ -68,10 +68,10 @@ message MsgCreateTunnelResponse { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; } -// MsgEditTunnel is the transaction message to edit a tunnel. -message MsgEditTunnel { +// MsgUpdateAndResetTunnel is the transaction message to edit a tunnel. +message MsgUpdateAndResetTunnel { option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "tunnel/MsgEditTunnel"; + option (amino.name) = "tunnel/MsgUpdateAndResetTunnel"; // tunnel_id is the ID of the tunnel to edit. uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; @@ -83,8 +83,8 @@ message MsgEditTunnel { string creator = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. -message MsgEditTunnelResponse {} +// MsgUpdateAndResetTunnelResponse is the response type for the Msg/UpdateAndResetTunnel RPC method. +message MsgUpdateAndResetTunnelResponse {} // Activate is the transaction message to activate a tunnel. message MsgActivate { diff --git a/scripts/tunnel/edit_tunnel.sh b/scripts/tunnel/edit_tunnel.sh deleted file mode 100644 index 8371813a5..000000000 --- a/scripts/tunnel/edit_tunnel.sh +++ /dev/null @@ -1 +0,0 @@ -bandd tx tunnel edit-tunnel 1 15 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/update_and_reset_tunnel.sh b/scripts/tunnel/update_and_reset_tunnel.sh new file mode 100644 index 000000000..2eb9cde4a --- /dev/null +++ b/scripts/tunnel/update_and_reset_tunnel.sh @@ -0,0 +1 @@ +bandd tx tunnel update-and-reset-tunnel 1 15 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index dbc12cbf0..5ca7d8b9f 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -23,7 +23,7 @@ func GetTxCmd() *cobra.Command { } txCmd.AddCommand(GetTxCmdCreateTunnel()) - txCmd.AddCommand(GetTxCmdEditTunnel()) + txCmd.AddCommand(GetTxCmdUpdateAndResetTunnel()) txCmd.AddCommand(GetTxCmdActivate()) txCmd.AddCommand(GetTxCmdDeactivate()) txCmd.AddCommand(GetTxCmdTriggerTunnel()) @@ -100,10 +100,10 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { return cmd } -func GetTxCmdEditTunnel() *cobra.Command { +func GetTxCmdUpdateAndResetTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "edit-tunnel [tunnel-id] [interval] [signalDeviations-json-file] ", - Short: "Edit an existing tunnel", + Use: "update-and-reset-tunnel [tunnel-id] [interval] [signalDeviations-json-file] ", + Short: "Update an existing tunnel and reset the latest price interval of the tunnel", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) @@ -126,7 +126,7 @@ func GetTxCmdEditTunnel() *cobra.Command { return err } - msg := types.NewMsgEditTunnel( + msg := types.NewMsgUpdateAndResetTunnel( id, signalDeviations.ToSignalDeviations(), interval, diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 7bfef7784..b493befa6 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -93,11 +93,11 @@ func (ms msgServer) CreateTunnel( }, nil } -// EditTunnel edits a tunnel. -func (ms msgServer) EditTunnel( +// UpdateAndResetTunnel edits a tunnel and reset latest signal price interval. +func (ms msgServer) UpdateAndResetTunnel( goCtx context.Context, - req *types.MsgEditTunnel, -) (*types.MsgEditTunnelResponse, error) { + req *types.MsgUpdateAndResetTunnel, +) (*types.MsgUpdateAndResetTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // validate signal infos and interval @@ -118,12 +118,12 @@ func (ms msgServer) EditTunnel( return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", req.Creator, req.TunnelID) } - err = ms.Keeper.EditTunnel(ctx, req.TunnelID, req.SignalDeviations, req.Interval) + err = ms.Keeper.UpdateAndResetTunnel(ctx, req.TunnelID, req.SignalDeviations, req.Interval) if err != nil { return nil, err } - return &types.MsgEditTunnelResponse{}, nil + return &types.MsgUpdateAndResetTunnelResponse{}, nil } // Activate activates a tunnel. diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 7f5da19b0..68a02a520 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -134,14 +134,14 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { } } -func (s *KeeperTestSuite) TestMsgEditTunnel() { +func (s *KeeperTestSuite) TestMsgUpdateAndResetTunnel() { cases := map[string]struct { - preRun func() *types.MsgEditTunnel + preRun func() *types.MsgUpdateAndResetTunnel expErr bool expErrMsg string }{ "max signal exceed": { - preRun: func() *types.MsgEditTunnel { + preRun: func() *types.MsgUpdateAndResetTunnel { params := types.DefaultParams() params.MaxSignals = 1 err := s.keeper.SetParams(s.ctx, params) @@ -162,7 +162,7 @@ func (s *KeeperTestSuite) TestMsgEditTunnel() { }, } - return types.NewMsgEditTunnel( + return types.NewMsgUpdateAndResetTunnel( 1, editedSignalDeviations, 10, @@ -173,7 +173,7 @@ func (s *KeeperTestSuite) TestMsgEditTunnel() { expErrMsg: "max signals exceeded", }, "interval too low": { - preRun: func() *types.MsgEditTunnel { + preRun: func() *types.MsgUpdateAndResetTunnel { params := types.DefaultParams() params.MinInterval = 5 err := s.keeper.SetParams(s.ctx, params) @@ -189,7 +189,7 @@ func (s *KeeperTestSuite) TestMsgEditTunnel() { }, } - return types.NewMsgEditTunnel( + return types.NewMsgUpdateAndResetTunnel( 1, editedSignalDeviations, 1, @@ -200,8 +200,8 @@ func (s *KeeperTestSuite) TestMsgEditTunnel() { expErrMsg: "interval too low", }, "tunnel not found": { - preRun: func() *types.MsgEditTunnel { - return types.NewMsgEditTunnel( + preRun: func() *types.MsgUpdateAndResetTunnel { + return types.NewMsgUpdateAndResetTunnel( 1, []types.SignalDeviation{}, 10, @@ -212,10 +212,10 @@ func (s *KeeperTestSuite) TestMsgEditTunnel() { expErrMsg: "tunnel not found", }, "invalid creator of the tunnel": { - preRun: func() *types.MsgEditTunnel { + preRun: func() *types.MsgUpdateAndResetTunnel { s.AddSampleTunnel(false) - return types.NewMsgEditTunnel( + return types.NewMsgUpdateAndResetTunnel( 1, []types.SignalDeviation{}, 10, @@ -226,7 +226,7 @@ func (s *KeeperTestSuite) TestMsgEditTunnel() { expErrMsg: "invalid creator of the tunnel", }, "all good": { - preRun: func() *types.MsgEditTunnel { + preRun: func() *types.MsgUpdateAndResetTunnel { s.AddSampleTunnel(false) editedSignalDeviations := []types.SignalDeviation{ @@ -237,7 +237,7 @@ func (s *KeeperTestSuite) TestMsgEditTunnel() { }, } - return types.NewMsgEditTunnel( + return types.NewMsgUpdateAndResetTunnel( 1, editedSignalDeviations, 10, @@ -253,7 +253,7 @@ func (s *KeeperTestSuite) TestMsgEditTunnel() { s.Run(name, func() { msg := tc.preRun() - _, err := s.msgServer.EditTunnel(s.ctx, msg) + _, err := s.msgServer.UpdateAndResetTunnel(s.ctx, msg) if tc.expErr { s.Require().Error(err) s.Require().Contains(err.Error(), tc.expErrMsg) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 9d0001842..6d4bb28b5 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -58,8 +58,8 @@ func (k Keeper) AddTunnel( return &tunnel, nil } -// EditTunnel edits a tunnel -func (k Keeper) EditTunnel( +// UpdateAndResetTunnel edits a tunnel and reset latest signal price interval. +func (k Keeper) UpdateAndResetTunnel( ctx sdk.Context, tunnelID uint64, signalDeviations []types.SignalDeviation, @@ -83,7 +83,7 @@ func (k Keeper) EditTunnel( k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, signalPrices, 0)) event := sdk.NewEvent( - types.EventTypeEditTunnel, + types.EventTypeUpdateAndResetTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), ) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index c2c10c48a..dd120f6cb 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -62,7 +62,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { s.Require().Equal(expectedSignalPrices, latestSignalPrices) } -func (s *KeeperTestSuite) TestEditTunnel() { +func (s *KeeperTestSuite) TestUpdateAndResetTunnel() { ctx, k := s.ctx, s.keeper initialRoute := &types.TSSRoute{} @@ -97,8 +97,8 @@ func (s *KeeperTestSuite) TestEditTunnel() { } newInterval := uint64(20) - // call the EditTunnel function - err = k.EditTunnel(ctx, initialTunnel.ID, newSignalDeviations, newInterval) + // call the UpdateAndResetTunnel function + err = k.UpdateAndResetTunnel(ctx, initialTunnel.ID, newSignalDeviations, newInterval) s.Require().NoError(err) // validate the edited tunnel diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index a45e5ddc0..737c58602 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -13,7 +13,7 @@ import ( // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgCreateTunnel{}, "tunnel/MsgCreateTunnel") - legacy.RegisterAminoMsg(cdc, &MsgEditTunnel{}, "tunnel/MsgEditTunnel") + legacy.RegisterAminoMsg(cdc, &MsgUpdateAndResetTunnel{}, "tunnel/MsgUpdateAndResetTunnel") legacy.RegisterAminoMsg(cdc, &MsgActivate{}, "tunnel/MsgActivate") legacy.RegisterAminoMsg(cdc, &MsgDeactivate{}, "tunnel/MsgDeactivate") legacy.RegisterAminoMsg(cdc, &MsgTriggerTunnel{}, "tunnel/MsgTriggerTunnel") @@ -34,7 +34,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgCreateTunnel{}, - &MsgEditTunnel{}, + &MsgUpdateAndResetTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 376ee7ab5..3ae543690 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,13 +2,13 @@ package types // events const ( - EventTypeUpdateParams = "update_params" - EventTypeCreateTunnel = "create_tunnel" - EventTypeEditTunnel = "edit_tunnel" - EventTypeActivate = "activate" - EventTypeDeactivate = "deactivate" - EventTypeTriggerTunnel = "trigger_tunnel" - EventTypeProducePacketFail = "produce_packet_fail" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeUpdateAndResetTunnel = "update_and_reset_tunnel" + EventTypeActivate = "activate" + EventTypeDeactivate = "deactivate" + EventTypeTriggerTunnel = "trigger_tunnel" + EventTypeProducePacketFail = "produce_packet_fail" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 5c8326d93..2b0f59d27 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -10,7 +10,7 @@ import ( ) var ( - _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgEditTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawTunnel{}, &MsgUpdateParams{} + _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgUpdateAndResetTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawTunnel{}, &MsgUpdateParams{} _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) @@ -163,14 +163,14 @@ func (m MsgCreateTunnel) GetTunnelRoute() RouteI { return route } -// NewMsgEditTunnel creates a new MsgEditTunnel instance. -func NewMsgEditTunnel( +// NewMsgUpdateAndResetTunnel creates a new MsgUpdateAndResetTunnel instance. +func NewMsgUpdateAndResetTunnel( tunnelID uint64, signalDeviations []SignalDeviation, interval uint64, creator string, -) *MsgEditTunnel { - return &MsgEditTunnel{ +) *MsgUpdateAndResetTunnel { + return &MsgUpdateAndResetTunnel{ TunnelID: tunnelID, SignalDeviations: signalDeviations, Interval: interval, @@ -179,20 +179,20 @@ func NewMsgEditTunnel( } // Route Implements Msg. -func (m MsgEditTunnel) Type() string { return sdk.MsgTypeURL(&m) } +func (m MsgUpdateAndResetTunnel) Type() string { return sdk.MsgTypeURL(&m) } // GetSignBytes implements the LegacyMsg interface. -func (m MsgEditTunnel) GetSignBytes() []byte { +func (m MsgUpdateAndResetTunnel) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } // GetSigners returns the expected signers for the message. -func (m *MsgEditTunnel) GetSigners() []sdk.AccAddress { +func (m *MsgUpdateAndResetTunnel) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} } // ValidateBasic does a sanity check on the provided data -func (m MsgEditTunnel) ValidateBasic() error { +func (m MsgUpdateAndResetTunnel) ValidateBasic() error { // creator address must be valid if _, err := sdk.AccAddressFromBech32(m.Creator); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 1cdad3eb8..6d15b8eb1 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -170,8 +170,8 @@ func (m *MsgCreateTunnelResponse) GetTunnelID() uint64 { return 0 } -// MsgEditTunnel is the transaction message to edit a tunnel. -type MsgEditTunnel struct { +// MsgUpdateAndResetTunnel is the transaction message to edit a tunnel. +type MsgUpdateAndResetTunnel struct { // tunnel_id is the ID of the tunnel to edit. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // signal_deviations is the list of signal deviations. @@ -182,18 +182,18 @@ type MsgEditTunnel struct { Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` } -func (m *MsgEditTunnel) Reset() { *m = MsgEditTunnel{} } -func (m *MsgEditTunnel) String() string { return proto.CompactTextString(m) } -func (*MsgEditTunnel) ProtoMessage() {} -func (*MsgEditTunnel) Descriptor() ([]byte, []int) { +func (m *MsgUpdateAndResetTunnel) Reset() { *m = MsgUpdateAndResetTunnel{} } +func (m *MsgUpdateAndResetTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateAndResetTunnel) ProtoMessage() {} +func (*MsgUpdateAndResetTunnel) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{2} } -func (m *MsgEditTunnel) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateAndResetTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgEditTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateAndResetTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgEditTunnel.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateAndResetTunnel.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -203,62 +203,62 @@ func (m *MsgEditTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *MsgEditTunnel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEditTunnel.Merge(m, src) +func (m *MsgUpdateAndResetTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateAndResetTunnel.Merge(m, src) } -func (m *MsgEditTunnel) XXX_Size() int { +func (m *MsgUpdateAndResetTunnel) XXX_Size() int { return m.Size() } -func (m *MsgEditTunnel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEditTunnel.DiscardUnknown(m) +func (m *MsgUpdateAndResetTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateAndResetTunnel.DiscardUnknown(m) } -var xxx_messageInfo_MsgEditTunnel proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateAndResetTunnel proto.InternalMessageInfo -func (m *MsgEditTunnel) GetTunnelID() uint64 { +func (m *MsgUpdateAndResetTunnel) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgEditTunnel) GetSignalDeviations() []SignalDeviation { +func (m *MsgUpdateAndResetTunnel) GetSignalDeviations() []SignalDeviation { if m != nil { return m.SignalDeviations } return nil } -func (m *MsgEditTunnel) GetInterval() uint64 { +func (m *MsgUpdateAndResetTunnel) GetInterval() uint64 { if m != nil { return m.Interval } return 0 } -func (m *MsgEditTunnel) GetCreator() string { +func (m *MsgUpdateAndResetTunnel) GetCreator() string { if m != nil { return m.Creator } return "" } -// MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. -type MsgEditTunnelResponse struct { +// MsgUpdateAndResetTunnelResponse is the response type for the Msg/UpdateAndResetTunnel RPC method. +type MsgUpdateAndResetTunnelResponse struct { } -func (m *MsgEditTunnelResponse) Reset() { *m = MsgEditTunnelResponse{} } -func (m *MsgEditTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgEditTunnelResponse) ProtoMessage() {} -func (*MsgEditTunnelResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpdateAndResetTunnelResponse) Reset() { *m = MsgUpdateAndResetTunnelResponse{} } +func (m *MsgUpdateAndResetTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateAndResetTunnelResponse) ProtoMessage() {} +func (*MsgUpdateAndResetTunnelResponse) Descriptor() ([]byte, []int) { return fileDescriptor_747f2bf21e50fad9, []int{3} } -func (m *MsgEditTunnelResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateAndResetTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgEditTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateAndResetTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgEditTunnelResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateAndResetTunnelResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -268,17 +268,17 @@ func (m *MsgEditTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *MsgEditTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEditTunnelResponse.Merge(m, src) +func (m *MsgUpdateAndResetTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateAndResetTunnelResponse.Merge(m, src) } -func (m *MsgEditTunnelResponse) XXX_Size() int { +func (m *MsgUpdateAndResetTunnelResponse) XXX_Size() int { return m.Size() } -func (m *MsgEditTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEditTunnelResponse.DiscardUnknown(m) +func (m *MsgUpdateAndResetTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateAndResetTunnelResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgEditTunnelResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateAndResetTunnelResponse proto.InternalMessageInfo // Activate is the transaction message to activate a tunnel. type MsgActivate struct { @@ -853,8 +853,8 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateTunnel)(nil), "tunnel.v1beta1.MsgCreateTunnel") proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") - proto.RegisterType((*MsgEditTunnel)(nil), "tunnel.v1beta1.MsgEditTunnel") - proto.RegisterType((*MsgEditTunnelResponse)(nil), "tunnel.v1beta1.MsgEditTunnelResponse") + proto.RegisterType((*MsgUpdateAndResetTunnel)(nil), "tunnel.v1beta1.MsgUpdateAndResetTunnel") + proto.RegisterType((*MsgUpdateAndResetTunnelResponse)(nil), "tunnel.v1beta1.MsgUpdateAndResetTunnelResponse") proto.RegisterType((*MsgActivate)(nil), "tunnel.v1beta1.MsgActivate") proto.RegisterType((*MsgActivateResponse)(nil), "tunnel.v1beta1.MsgActivateResponse") proto.RegisterType((*MsgDeactivate)(nil), "tunnel.v1beta1.MsgDeactivate") @@ -872,70 +872,71 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 1002 bytes of a gzipped FileDescriptorProto + // 1016 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x49, 0x9a, 0x4c, 0xd2, 0xb4, 0x59, 0xd2, 0x7a, 0xbd, 0x11, 0xb6, 0xd9, 0xaa, - 0xaa, 0x13, 0x91, 0x5d, 0xc5, 0x50, 0x84, 0xc2, 0x29, 0xae, 0x7b, 0x88, 0x84, 0x25, 0xb4, 0x2d, - 0xa2, 0x02, 0x89, 0x68, 0xbc, 0x3b, 0xac, 0x47, 0xd8, 0x33, 0xd6, 0xce, 0xd8, 0xad, 0xaf, 0x48, - 0x5c, 0x38, 0xc1, 0x81, 0x13, 0xe2, 0xc2, 0x09, 0xf5, 0x94, 0x43, 0xff, 0x03, 0x2e, 0x85, 0x53, - 0xc5, 0x89, 0x53, 0x40, 0xc9, 0x21, 0x12, 0x7f, 0x05, 0xda, 0xd9, 0xd9, 0x9f, 0x59, 0x9c, 0x14, - 0x55, 0x48, 0xbd, 0x24, 0x9e, 0xf7, 0x7d, 0x6f, 0xf6, 0x9b, 0x6f, 0xde, 0xbc, 0x19, 0x50, 0xe1, - 0x63, 0x42, 0xd0, 0xc0, 0x9a, 0xec, 0xf6, 0x10, 0x87, 0xbb, 0x16, 0x7f, 0x62, 0x8e, 0x7c, 0xca, - 0xa9, 0xba, 0x16, 0x02, 0xa6, 0x04, 0xf4, 0xaa, 0x47, 0xa9, 0x37, 0x40, 0x96, 0x40, 0x7b, 0xe3, - 0x2f, 0x2c, 0x48, 0xa6, 0x21, 0x55, 0xdf, 0xf0, 0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 0x23, 0x03, 0xab, 0xd7, 0x77, 0x10, 0xb6, 0x26, 0x4d, 0xeb, + 0xa9, 0xbc, 0xdb, 0x8b, 0xa6, 0xd4, 0x5d, 0xe4, 0x8c, 0x77, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, + 0xf2, 0xc9, 0xdf, 0x99, 0xdf, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -952,8 +953,8 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) - // EditTunnel is a RPC method to edit a tunnel. - EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) + // UpdateAndResetTunnel is a RPC method to edit a tunnel. + UpdateAndResetTunnel(ctx context.Context, in *MsgUpdateAndResetTunnel, opts ...grpc.CallOption) (*MsgUpdateAndResetTunnelResponse, error) // Activate is a RPC method to activate a tunnel. Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) // Deactivate is a RPC method to deactivate a tunnel. @@ -985,9 +986,9 @@ func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts return out, nil } -func (c *msgClient) EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) { - out := new(MsgEditTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/EditTunnel", in, out, opts...) +func (c *msgClient) UpdateAndResetTunnel(ctx context.Context, in *MsgUpdateAndResetTunnel, opts ...grpc.CallOption) (*MsgUpdateAndResetTunnelResponse, error) { + out := new(MsgUpdateAndResetTunnelResponse) + err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/UpdateAndResetTunnel", in, out, opts...) if err != nil { return nil, err } @@ -1052,8 +1053,8 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts type MsgServer interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) - // EditTunnel is a RPC method to edit a tunnel. - EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) + // UpdateAndResetTunnel is a RPC method to edit a tunnel. + UpdateAndResetTunnel(context.Context, *MsgUpdateAndResetTunnel) (*MsgUpdateAndResetTunnelResponse, error) // Activate is a RPC method to activate a tunnel. Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) // Deactivate is a RPC method to deactivate a tunnel. @@ -1075,8 +1076,8 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) CreateTunnel(ctx context.Context, req *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTunnel not implemented") } -func (*UnimplementedMsgServer) EditTunnel(ctx context.Context, req *MsgEditTunnel) (*MsgEditTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EditTunnel not implemented") +func (*UnimplementedMsgServer) UpdateAndResetTunnel(ctx context.Context, req *MsgUpdateAndResetTunnel) (*MsgUpdateAndResetTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAndResetTunnel not implemented") } func (*UnimplementedMsgServer) Activate(ctx context.Context, req *MsgActivate) (*MsgActivateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") @@ -1119,20 +1120,20 @@ func _Msg_CreateTunnel_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_EditTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEditTunnel) +func _Msg_UpdateAndResetTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateAndResetTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).EditTunnel(ctx, in) + return srv.(MsgServer).UpdateAndResetTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/EditTunnel", + FullMethod: "/tunnel.v1beta1.Msg/UpdateAndResetTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EditTunnel(ctx, req.(*MsgEditTunnel)) + return srv.(MsgServer).UpdateAndResetTunnel(ctx, req.(*MsgUpdateAndResetTunnel)) } return interceptor(ctx, in, info, handler) } @@ -1254,8 +1255,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CreateTunnel_Handler, }, { - MethodName: "EditTunnel", - Handler: _Msg_EditTunnel_Handler, + MethodName: "UpdateAndResetTunnel", + Handler: _Msg_UpdateAndResetTunnel_Handler, }, { MethodName: "Activate", @@ -1394,7 +1395,7 @@ func (m *MsgCreateTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgEditTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateAndResetTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1404,12 +1405,12 @@ func (m *MsgEditTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgEditTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateAndResetTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgEditTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateAndResetTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1448,7 +1449,7 @@ func (m *MsgEditTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgEditTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateAndResetTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1458,12 +1459,12 @@ func (m *MsgEditTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgEditTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateAndResetTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgEditTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateAndResetTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1910,7 +1911,7 @@ func (m *MsgCreateTunnelResponse) Size() (n int) { return n } -func (m *MsgEditTunnel) Size() (n int) { +func (m *MsgUpdateAndResetTunnel) Size() (n int) { if m == nil { return 0 } @@ -1935,7 +1936,7 @@ func (m *MsgEditTunnel) Size() (n int) { return n } -func (m *MsgEditTunnelResponse) Size() (n int) { +func (m *MsgUpdateAndResetTunnelResponse) Size() (n int) { if m == nil { return 0 } @@ -2404,7 +2405,7 @@ func (m *MsgCreateTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgEditTunnel) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateAndResetTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2427,10 +2428,10 @@ func (m *MsgEditTunnel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgEditTunnel: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateAndResetTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEditTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateAndResetTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2558,7 +2559,7 @@ func (m *MsgEditTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgEditTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateAndResetTunnelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2581,10 +2582,10 @@ func (m *MsgEditTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgEditTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateAndResetTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEditTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateAndResetTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From 568a3cf827d0dc783f514da22a27ecf2b11623e2 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 2 Oct 2024 09:56:40 +0700 Subject: [PATCH 163/272] fix calculateDeviation --- x/tunnel/keeper/packet.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index a73748f72..1267cfcb0 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -269,12 +269,12 @@ func (k Keeper) GenerateNewSignalPrices( // calculateDeviationBPS calculates the deviation between the old price and // the new price in basis points, i.e., |(newPrice - oldPrice)| * 10000 / oldPrice func calculateDeviationBPS(oldPrice, newPrice sdkmath.Int) sdkmath.Int { + if newPrice.Equal(oldPrice) { + return sdkmath.ZeroInt() + } + if oldPrice.IsZero() { - if newPrice.IsZero() { - return sdkmath.ZeroInt() - } else { - return sdkmath.NewInt(math.MaxInt64) - } + return sdkmath.NewInt(math.MaxInt64) } return newPrice.Sub(oldPrice).Abs().MulRaw(10000).Quo(oldPrice) From 573f17112247d5c91dfb4f2973292a016fc2feba Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 2 Oct 2024 10:16:27 +0700 Subject: [PATCH 164/272] add testcases for soft/hard deviation --- x/tunnel/keeper/packet_test.go | 60 +++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 25eea7779..adcce1d5f 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -202,7 +202,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { s.Require().Len(activeTunnels, 0) } -func (s *KeeperTestSuite) TestGenerateSignalPrices() { +func (s *KeeperTestSuite) TestGenerateSignalPricesSendAll() { ctx := s.ctx tunnelID := uint64(1) @@ -227,3 +227,61 @@ func (s *KeeperTestSuite) TestGenerateSignalPrices() { s.Require().NoError(err) s.Require().Len(nsps, 1) } + +func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { + ctx := s.ctx + + tunnelID := uint64(1) + currentPricesMap := map[string]feedstypes.Price{ + "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "ETH/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, + } + sendAll := false + tunnel := types.Tunnel{ + ID: tunnelID, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, + {SignalID: "ETH/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, + }, + } + latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 48500}, // 3% + {SignalID: "ETH/USD", Price: 1980}, // 1% + }, 0) + + s.keeper.SetTunnel(ctx, tunnel) + s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + + nsps, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + s.Require().NoError(err) + s.Require().Len(nsps, 2) +} + +func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { + ctx := s.ctx + + tunnelID := uint64(1) + currentPricesMap := map[string]feedstypes.Price{ + "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "ETH/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, + } + sendAll := false + tunnel := types.Tunnel{ + ID: tunnelID, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, + {SignalID: "ETH/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, + }, + } + latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 49000}, // 2% + {SignalID: "ETH/USD", Price: 1950}, // 2.5% + }, 0) + + s.keeper.SetTunnel(ctx, tunnel) + s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + + nsps, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + s.Require().NoError(err) + s.Require().Len(nsps, 0) +} From 80aeb493c75a14a12297bbd47254d94f42375582 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 2 Oct 2024 14:59:21 +0700 Subject: [PATCH 165/272] add read me --- .golangci.yml | 10 +- x/tunnel/README.md | 496 +++++++++++++++++++++++++++++++++- x/tunnel/keeper/msg_server.go | 2 +- x/tunnel/types/events.go | 24 +- 4 files changed, 511 insertions(+), 21 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index b555b6edf..99e2ea9c7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ run: timeout: 5m - go: '1.22.3' + go: "1.22.3" linters: disable-all: true @@ -8,7 +8,7 @@ linters: - bodyclose - whitespace - errcheck - - exportloopref + - copyloopvar - gci - gocritic - gofumpt @@ -30,13 +30,13 @@ issues: - ".*\\.pb\\.gw\\.\\.go$" - ".*\\.pulsar\\.go$" exclude-rules: - - text: 'Use of weak random number generator' + - text: "Use of weak random number generator" linters: - gosec - - text: 'ST1003:' + - text: "ST1003:" linters: - stylecheck - + linters-settings: gci: custom-order: true diff --git a/x/tunnel/README.md b/x/tunnel/README.md index 9f42845d7..57233405f 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -6,14 +6,504 @@ sidebar_position: 1 ## Abstract +The Tunnel module's main purpose is to decentralize create packet by enabling the configuration of intervals and deviations for transmitting price data to Ethereum Virtual Machine (EVM)-compatible blockchains, as well as other Cosmos-based blockchains. It integrates with key technologies such as Threshold Signature Schemes (TSS), Inter-Blockchain Communication (IBC), Axelar, and Hyperlane to ensure secure and efficient data transmission. + ## Contents +- [`x/tunnel`](#xtunnel) + - [Abstract](#abstract) + - [Contents](#contents) + - [Concepts](#concepts) + - [Tunnel](#tunnel) + - [Route](#route) + - [IBC Route](#ibc-route) + - [TSS Route](#tss-route) + - [Axelar Route](#axelar-route) + - [Hyperlane Stride Route](#hyperlane-stride-route) + - [Packet](#packet) + - [Packet Generation](#packet-generation) + - [State](#state) + - [TunnelCount](#tunnelcount) + - [TotalFee](#totalfee) + - [ActiveTunnelID](#activetunnelid) + - [Tunnel](#tunnel-1) + - [Packet](#packet-1) + - [LatestSignalPrices](#latestsignalprices) + - [Deposit](#deposit) + - [Params](#params) + - [Msg](#msg) + - [MsgCreateTunnel](#msgcreatetunnel) + - [MsgEditTunnel](#msgedittunnel) + - [MsgActivate](#msgactivate) + - [MsgDeactivate](#msgdeactivate) + - [MsgTriggerTunnel](#msgtriggertunnel) + - [MsgDepositTunnel](#msgdeposittunnel) + - [MsgWithdrawTunnel](#msgwithdrawtunnel) + - [Events](#events) + - [Event: `create_tunnel`](#event-create_tunnel) + - [Event: `edit_tunnel`](#event-edit_tunnel) + - [Event: `activate`](#event-activate) + - [Event: `deactivate`](#event-deactivate) + - [Event: `trigger_tunnel`](#event-trigger_tunnel) + - [Event: `produce_packet_fail`](#event-produce_packet_fail) + - [Clients](#clients) + - [CLI Commands](#cli-commands) + - [Query Commands](#query-commands) + - [List All Tunnels](#list-all-tunnels) + - [Get Tunnel by ID](#get-tunnel-by-id) + - [Get Deposits for a Tunnel](#get-deposits-for-a-tunnel) + - [Get Deposit by Depositor](#get-deposit-by-depositor) + - [List All Packets for a Tunnel](#list-all-packets-for-a-tunnel) + - [Get Packet by Sequence](#get-packet-by-sequence) + +## Concepts + +### Tunnel + +The `x/tunnel` module defines a `Tunnel` type that specifies details such as the way to send the data to the destination ([Route](#route)), the type of price data to encode, the fee payer's address for packet fees, and the total deposit of the tunnel (which must meet a minimum requirement to activate). It also includes the interval and deviation settings for the price data used when producing packets at every end-block. + +Users can create a new tunnel by sending a `MsgCreateTunnel` message to BandChain, specifying the desired signals and deviations. The available routes for tunnels are provided in the [Route](#route) concepts. + +```go +type Tunnel struct { + // ID is the unique identifier of the tunnel. + ID uint64 + // Sequence represents the sequence number of the tunnel packets. + Sequence uint64 + // Route defines the path for delivering the signal prices. + Route *types1.Any + // Encoder specifies the mode of encoding price signal data. + Encoder Encoder + // FeePayer is the address responsible for paying the packet fees. + FeePayer string + // SignalDeviations is a list of signal deviations. + SignalDeviations []SignalDeviation + // Interval determines how often the signal prices are delivered. + Interval uint64 + // TotalDeposit is the total amount of deposit in the tunnel. + TotalDeposit sdk.Coins + // IsActive indicates whether the tunnel is active. + IsActive bool + // CreatedAt is the timestamp when the tunnel was created. + CreatedAt int64 + // Creator is the address of the tunnel's creator. + Creator string +} +``` + +### Route + +A Route defines the secure method for transmitting price data to a destination chain using a tunnel. It specifies the pathway and protocols that ensure safe and reliable data delivery from BandChain to other EVM-compatible chains or Cosmos-based blockchains. + +#### IBC Route + +The IBC Route enables the transmission of data from BandChain to Cosmos-compatible chains via the Inter-Blockchain Communication (IBC) protocol. This route allows for secure and efficient cross-chain communication, leveraging the standardized IBC protocol to transmit packets of data between chains. + +To create an IBC tunnel, use the following CLI command: + +> **Note**: An example of the signalInfos-json-file can be found at scripts/tunnel/signal_deviations.json. + +```bash +bandd tx tunnel create-tunnel ibc [channel-id] [encoder] [initial-deposit] [interval] [signalInfos-json-file] +``` + +#### TSS Route + +#### Axelar Route + +#### Hyperlane Stride Route + +The Hyperlane Stride Route enables the transmission of data from BandChain to EVM-compatible chains via the Stride chain using Hyperlane bridge. This route sends an IBC transfer to the Stride chain through IBC hooks, which then utilizes the Hyperlane bridge to forward the data to the destination EVM-compatible chain. This method ensures secure and efficient cross-chain communication. + +To create a Hyperlane Stride tunnel, use the following CLI command: + +```bash +bandd tx tunnel create-tunnel hyperlane-stride [channel-id] [contract] [dispatchDestDomain] [dispatchRecipientAddr] [fund] [encoder] [initial-deposit] [interval] [signalDeviations-json-file] +``` + +### Packet + +A Packet is the data unit produced and sent to the destination chain based on the specified route. + +```go +type Packet struct { + // tunnel_id is the tunnel ID + TunnelID uint64 + // sequence is representing the sequence of the tunnel packet. + Sequence uint64 + // signal_prices is the list of signal prices + SignalPrices []SignalPrice + // packet_content is the content of the packet that implements PacketContentI + PacketContent *types1.Any + // created_at is the timestamp when the packet is created + CreatedAt int64 +} +``` + +#### Packet Generation + +At the end of every block, the tunnel generates packets by checking the deviations and intervals for each tunnel. We utilize both hard and soft deviations: + +- **Hard Deviation**: If any signal reaches this threshold, the system triggers a check on all soft deviations. +- **Soft Deviation**: If any signal meets its soft deviation criteria during this check, the latest price is sent in the packet. + +This mechanism helps reduce the number of transactions on the destination route during periods of market instability. + ## State -## Begin-Block +### TunnelCount -## End-Block +Stores the number of tunnels existing on the chain. -## Events +- **TunnelCount**: `0x00 | -> BigEndian(#tunnels)` + +### TotalFee + +Stores the total fees collected by tunnels when producing packets. + +- **TotalFee**: `0x01 | -> TotalFee` + +### ActiveTunnelID + +Stores the IDs of active tunnels for quick querying at the end of a block. + +- **ActiveTunnelID**: `0x10 | TunnelID -> []byte{0x01}` + +### Tunnel + +Stores information about each tunnel. + +- **Tunnel**: `0x11 | TunnelID -> Tunnel` + +### Packet + +Stores information about packets sent via the routes declared in tunnels. + +- **Packet**: `0x12 | TunnelID | Sequence -> Packet` + +### LatestSignalPrices + +Stores the latest prices that the tunnel has sent to the destination route. These are used to compare intervals and deviations at the end of each block. + +- **LatestSignalPrices**: `0x13 | TunnelID -> LatestSignalPrices` + +### Deposit + +Stores the total deposit per tunnel by each depositor. + +- **Deposit**: `0x14 | TunnelID | DepositorAddress -> Deposit` + +### Params + +Stores the parameters in the state. These parameters can be updated via a governance proposal or by an authority address. + +- **Params**: `0x90 -> Params` + +The `x/tunnel` module contains the following parameters: + +```go +type Params struct { + // MinDeposit is the minimum deposit required to create a tunnel. + MinDeposit sdk.Coins + // MinInterval is the minimum interval in seconds. + MinInterval uint64 + // MaxSignals defines the maximum number of signals allowed per tunnel. + MaxSignals uint64 + // BasePacketFee is the base fee for each packet. + BasePacketFee sdk.Coins +} +``` ## Msg + +In this section, we describe the processing of the tunnel messages and the corresponding updates to the state. All created/modified state objects specified by each message are defined within the [state](#state) section. + +### MsgCreateTunnel + +```protobuf +// MsgCreateTunnel is the transaction message to create a new tunnel. +message MsgCreateTunnel { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgCreateTunnel"; + + // signal_deviations is the list of signal deviations. + repeated SignalDeviation signal_deviations = 1 [(gogoproto.nullable) = false]; + // interval is the interval for delivering the signal prices. + uint64 interval = 2; + // route is the route for delivering the signal prices + google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; + // encoder is the mode of encoding price signal data. + Encoder encoder = 4; + // initial_deposit is the deposit value that must be paid at tunnel creation. + repeated cosmos.base.v1beta1.Coin initial_deposit = 5 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; + // creator is the address of the creator. + string creator = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +- **Deviation and Interval Settings**: Each tunnel must specify the deviation per signal and the interval per tunnel. +- **Route Selection**: Only one route can be chosen per tunnel. +- **Encoder Types**: Specifies the type of price value to be sent to the destination route. + - Price + - Tick +- **Initial Deposit**: The initial deposit can be set to zero. Other users can contribute to the tunnel's deposit until it reaches the required minimum deposit. + +### MsgEditTunnel + +**Editable Arguments**: The following parameters can be modified within the tunnel: `signal_deviations` and `Interval` + +```protobuf +// MsgEditTunnel is the transaction message to edit a tunnel. +message MsgEditTunnel { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgEditTunnel"; + + // tunnel_id is the ID of the tunnel to edit. + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // signal_deviations is the list of signal deviations. + repeated SignalDeviation signal_deviations = 2 [(gogoproto.nullable) = false]; + // interval is the interval for delivering the signal prices. + uint64 interval = 3; + // creator is the address of the creator. + string creator = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +### MsgActivate + +To activate the tunnel for processing at the EndBlock, the following conditions must be met: + +1. The total deposit must exceed the minimum deposit. +2. The fee payer must have sufficient Band tokens in their account to cover the base fee (will deactivate if tunnel didn’t have band). + +```protobuf +// Activate is the transaction message to activate a tunnel. +message MsgActivate { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgActivate"; + + // tunnel_id is the ID of the tunnel to activate. + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // creator is the address of the creator. + string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +### MsgDeactivate + +To stop producing new packets, the tunnel can be deactivated. + +```protobuf +// MsgDeactivate is the transaction message to deactivate a tunnel. +message MsgDeactivate { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgDeactivate"; + + // tunnel_id is the ID of the tunnel to deactivate. + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // creator is the address of the creator. + string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +### MsgTriggerTunnel + +Allows the manual creation of a packet without waiting for the deviation or interval conditions to be met. + +```protobuf +// MsgTriggerTunnel is the transaction message to manually trigger a tunnel. +message MsgTriggerTunnel { + option (cosmos.msg.v1.signer) = "creator"; + option (amino.name) = "tunnel/MsgTriggerTunnel"; + + // tunnel_id is the ID of the tunnel to manually trigger. + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // creator is the address of the creator. + string creator = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +### MsgDepositTunnel + +Increase the `total_deposit` for the tunnel by depositing more coins. + +```protobuf +// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. +message MsgDepositTunnel { + option (cosmos.msg.v1.signer) = "depositor"; + option (amino.name) = "tunnel/MsgDepositTunnel"; + + // tunnel_id defines the unique id of the tunnel. + uint64 tunnel_id = 1 + [(gogoproto.customname) = "TunnelID", (gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; + + // amount to be deposited by depositor. + repeated cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; + + // depositor defines the deposit addresses from the tunnel. + string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +### MsgWithdrawTunnel + +Allows users to withdraw their deposited coins from the tunnel. + +```protobuf +// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. +message MsgWithdrawTunnel { + option (cosmos.msg.v1.signer) = "withdrawer"; + option (amino.name) = "tunnel/MsgWithdrawTunnel"; + + // tunnel_id defines the unique id of the tunnel. + uint64 tunnel_id = 1 + [(gogoproto.customname) = "TunnelID", (gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; + + // amount to be withdrawn by withdrawer. + repeated cosmos.base.v1beta1.Coin amount = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true + ]; + + // withdrawer defines the withdraw addresses from the tunnel. + string withdrawer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} +``` + +## Events + +The `x/tunnel` module emits several events that can be used to track the state changes and actions within the module. These events are helpful for developers and users to monitor tunnel creation, updates, activations, deactivations, and packet production. + +### Event: `create_tunnel` + +This event is emitted when a new tunnel is created. + +| Attribute Key | Attribute Value | +| --------------- | --------------------------- | +| tunnel_id | `{ID}` | +| interval | `{Interval}` | +| route | `{Route.String()}` | +| encoder | `{Encoder.String()}` | +| initial_deposit | `{InitialDeposit.String()}` | +| fee_payer | `{FeePayer}` | +| is_active | `{IsActive}` | +| created_at | `{CreatedAt}` | +| creator | `{Creator}` | + +### Event: `edit_tunnel` + +This event is emitted when an existing tunnel is edited. + +| Attribute Key | Attribute Value | +| ------------------ | ------------------------------ | +| tunnel_id | `{ID}` | +| interval | `{Interval}` | +| signal_deviation[] | `{[]SignalDeviation.String()}` | + +### Event: `activate` + +This event is emitted when a tunnel is activated. + +| Attribute Key | Attribute Value | +| ------------- | --------------- | +| tunnel_id | `{ID}` | +| is_active | `true` | + +### Event: `deactivate` + +This event is emitted when a tunnel is deactivated. + +| Attribute Key | Attribute Value | +| ------------- | --------------- | +| tunnel_id | `{ID}` | +| is_active | `false` | + +### Event: `trigger_tunnel` + +This event is emitted when a tunnel is triggered to produce a packet due to deviations or intervals. + +| Attribute Key | Attribute Value | +| ------------- | --------------- | +| tunnel_id | `{ID}` | + +### Event: `produce_packet_fail` + +This event is emitted when the tunnel fails to produce a packet. + +| Attribute Key | Attribute Value | +| ------------- | --------------- | +| tunnel_id | `{ID}` | +| reason | `{err.Error()}` | + +## Clients + +Users can interact with the `x/tunnel` module via the Command-Line Interface (CLI). The CLI allows for querying tunnel states and performing various operations. + +### CLI Commands + +To access the tunnel module commands, use: + +```bash +bandd query tunnel --help +``` + +#### Query Commands + +The query commands enable users to retrieve information about tunnels, deposits, and packets. + +##### List All Tunnels + +To query all tunnels in the `x/tunnel` module: + +```bash +bandd query tunnel tunnels +``` + +##### Get Tunnel by ID + +To query a specific tunnel by its ID: + +```bash +bandd query tunnel tunnel [tunnel-id] +``` + +##### Get Deposits for a Tunnel + +To query the total deposits for a tunnel by its ID: + +```bash +bandd query tunnel deposits [tunnel-id] +``` + +##### Get Deposit by Depositor + +To query the total deposit of a depositor for a specific tunnel: + +```bash +bandd query tunnel deposit [tunnel-id] [depositor-address] +``` + +##### List All Packets for a Tunnel + +To query all packets produced by a tunnel: + +```bash +bandd query tunnel packets [tunnel-id] +``` + +##### Get Packet by Sequence + +To query a specific packet produced by a tunnel using its sequence number: + +```bash +bandd query tunnel packet [tunnel-id] [sequence] +``` diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 3d1cda87a..48e136010 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -83,7 +83,7 @@ func (ms msgServer) CreateTunnel( ) for _, sd := range req.SignalDeviations { event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeySignalPriceInfos, sd.String()), + sdk.NewAttribute(types.AttributeKeySignalDeviation, sd.String()), ) } ctx.EventManager().EmitEvent(event) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 376ee7ab5..00082c269 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -10,16 +10,16 @@ const ( EventTypeTriggerTunnel = "trigger_tunnel" EventTypeProducePacketFail = "produce_packet_fail" - AttributeKeyParams = "params" - AttributeKeyTunnelID = "tunnel_id" - AttributeKeyInterval = "interval" - AttributeKeyRoute = "route" - AttributeKeyEncoder = "encoder" - AttributeKeyInitialDeposit = "initial_deposit" - AttributeKeyFeePayer = "fee_payer" - AttributeKeySignalPriceInfos = "signal_price_infos" - AttributeKeyIsActive = "is_active" - AttributeKeyCreatedAt = "created_at" - AttributeKeyCreator = "creator" - AttributeKeyReason = "reason" + AttributeKeyParams = "params" + AttributeKeyTunnelID = "tunnel_id" + AttributeKeyInterval = "interval" + AttributeKeyRoute = "route" + AttributeKeyEncoder = "encoder" + AttributeKeyInitialDeposit = "initial_deposit" + AttributeKeyFeePayer = "fee_payer" + AttributeKeySignalDeviation = "signal_deviation" + AttributeKeyIsActive = "is_active" + AttributeKeyCreatedAt = "created_at" + AttributeKeyCreator = "creator" + AttributeKeyReason = "reason" ) From b65de08c452a53f49bc95b754506e652d4a5a27c Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 2 Oct 2024 15:06:28 +0700 Subject: [PATCH 166/272] fix golangci --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 99e2ea9c7..6d9149253 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,7 +8,7 @@ linters: - bodyclose - whitespace - errcheck - - copyloopvar + - exportloopref - gci - gocritic - gofumpt From c46b2ad974753db443de19779daaf85953e02682 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 2 Oct 2024 15:13:59 +0700 Subject: [PATCH 167/272] fix attribute event --- x/tunnel/keeper/tunnel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index bb9ca865b..3ad52812f 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -89,7 +89,7 @@ func (k Keeper) EditTunnel( ) for _, sd := range signalDeviations { event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeySignalPriceInfos, sd.String()), + sdk.NewAttribute(types.AttributeKeySignalDeviation, sd.String()), ) } ctx.EventManager().EmitEvent(event) From ca9306dbb9fccf12abfec06099abd76823b7086c Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 2 Oct 2024 15:24:52 +0700 Subject: [PATCH 168/272] fix expected keeper --- x/tunnel/keeper/msg_server.go | 2 +- x/tunnel/keeper/msg_server_test.go | 2 +- x/tunnel/keeper/packet.go | 2 +- x/tunnel/keeper/packet_test.go | 4 ++-- x/tunnel/testutil/mock_expected_keepers.go | 12 ++++++------ x/tunnel/types/expected_keepers.go | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 48e136010..fff9c170d 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -204,7 +204,7 @@ func (ms msgServer) TriggerTunnel( return nil, types.ErrInactiveTunnel.Wrapf("tunnelID %d", req.TunnelID) } - currentPrices := ms.Keeper.feedsKeeper.GetCurrentPrices(ctx) + currentPrices := ms.Keeper.feedsKeeper.GetAllCurrentPrices(ctx) currentPricesMap := createPricesMap(currentPrices) // produce packet with trigger all signals diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 53a1c1970..167583c1e 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -440,7 +440,7 @@ func (s *KeeperTestSuite) TestMsgTriggerTunnel() { "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", ) - s.feedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ + s.feedsKeeper.EXPECT().GetAllCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT(). diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 808f825f8..a7b2b07b7 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -58,7 +58,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // get active tunnel IDs ids := k.GetActiveTunnelIDs(ctx) - currentPrices := k.feedsKeeper.GetCurrentPrices(ctx) + currentPrices := k.feedsKeeper.GetAllCurrentPrices(ctx) currentPricesMap := createPricesMap(currentPrices) // check for active tunnels diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 4a03c3e7d..ec36dd3bc 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -112,7 +112,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { DestinationContractAddress: "0x", } - s.feedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ + s.feedsKeeper.EXPECT().GetAllCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) @@ -168,7 +168,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { DestinationContractAddress: "0x", } - s.feedsKeeper.EXPECT().GetCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ + s.feedsKeeper.EXPECT().GetAllCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer). diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/mock_expected_keepers.go index 45bb465f1..01c7374c2 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/mock_expected_keepers.go @@ -225,18 +225,18 @@ func (m *MockFeedsKeeper) EXPECT() *MockFeedsKeeperMockRecorder { return m.recorder } -// GetCurrentPrices mocks base method. -func (m *MockFeedsKeeper) GetCurrentPrices(ctx types2.Context) []types0.Price { +// GetAllCurrentPrices mocks base method. +func (m *MockFeedsKeeper) GetAllCurrentPrices(ctx types2.Context) []types0.Price { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCurrentPrices", ctx) + ret := m.ctrl.Call(m, "GetAllCurrentPrices", ctx) ret0, _ := ret[0].([]types0.Price) return ret0 } -// GetCurrentPrices indicates an expected call of GetCurrentPrices. -func (mr *MockFeedsKeeperMockRecorder) GetCurrentPrices(ctx any) *gomock.Call { +// GetAllCurrentPrices indicates an expected call of GetAllCurrentPrices. +func (mr *MockFeedsKeeperMockRecorder) GetAllCurrentPrices(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetCurrentPrices), ctx) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllCurrentPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetAllCurrentPrices), ctx) } // MockBandtssKeeper is a mock of BandtssKeeper interface. diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index fa8c13316..89e6f2542 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -39,7 +39,7 @@ type BankKeeper interface { } type FeedsKeeper interface { - GetCurrentPrices(ctx sdk.Context) (prices []feedstypes.Price) + GetAllCurrentPrices(ctx sdk.Context) (prices []feedstypes.Price) } type BandtssKeeper interface { From 376af53c0e00db4a0a578469ffcbfa613e7ff5b3 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 2 Oct 2024 17:18:40 +0700 Subject: [PATCH 169/272] fix proto --- proto/tunnel/v1beta1/tunnel.proto | 2 +- proto/tunnel/v1beta1/tx.proto | 5 +++-- x/tunnel/types/tunnel.pb.go | 2 +- x/tunnel/types/tx.pb.go | 7 ++++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index a633dc55e..4bfc3004d 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -101,7 +101,7 @@ message LatestSignalPrices { // signal_prices is the list of signal prices repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; // last_interval_timestamp is the timestamp when the signal prices were updated - // because the specified interval has been reached. + // because the specified interval was reached. int64 last_interval_timestamp = 3; } diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/tunnel/v1beta1/tx.proto index 2ebe7c953..9edd5300e 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/tunnel/v1beta1/tx.proto @@ -18,7 +18,7 @@ service Msg { // CreateTunnel is a RPC method to create a new tunnel. rpc CreateTunnel(MsgCreateTunnel) returns (MsgCreateTunnelResponse); - // UpdateAndResetTunnel is a RPC method to edit a tunnel. + // UpdateAndResetTunnel is a RPC method to update a tunnel information and reset the interval. rpc UpdateAndResetTunnel(MsgUpdateAndResetTunnel) returns (MsgUpdateAndResetTunnelResponse); // Activate is a RPC method to activate a tunnel. @@ -68,7 +68,8 @@ message MsgCreateTunnelResponse { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; } -// MsgUpdateAndResetTunnel is the transaction message to edit a tunnel. +// MsgUpdateAndResetTunnel is the transaction message to update a tunnel information +// and reset the interval. message MsgUpdateAndResetTunnel { option (cosmos.msg.v1.signer) = "creator"; option (amino.name) = "tunnel/MsgUpdateAndResetTunnel"; diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index c93c9ba88..6c583d2c4 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -443,7 +443,7 @@ type LatestSignalPrices struct { // signal_prices is the list of signal prices SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` // last_interval_timestamp is the timestamp when the signal prices were updated - // because the specified interval has been reached. + // because the specified interval was reached. LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 6d15b8eb1..50209b64d 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -170,7 +170,8 @@ func (m *MsgCreateTunnelResponse) GetTunnelID() uint64 { return 0 } -// MsgUpdateAndResetTunnel is the transaction message to edit a tunnel. +// MsgUpdateAndResetTunnel is the transaction message to update a tunnel information +// and reset the interval. type MsgUpdateAndResetTunnel struct { // tunnel_id is the ID of the tunnel to edit. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` @@ -953,7 +954,7 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) - // UpdateAndResetTunnel is a RPC method to edit a tunnel. + // UpdateAndResetTunnel is a RPC method to update a tunnel information and reset the interval. UpdateAndResetTunnel(ctx context.Context, in *MsgUpdateAndResetTunnel, opts ...grpc.CallOption) (*MsgUpdateAndResetTunnelResponse, error) // Activate is a RPC method to activate a tunnel. Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) @@ -1053,7 +1054,7 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts type MsgServer interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) - // UpdateAndResetTunnel is a RPC method to edit a tunnel. + // UpdateAndResetTunnel is a RPC method to update a tunnel information and reset the interval. UpdateAndResetTunnel(context.Context, *MsgUpdateAndResetTunnel) (*MsgUpdateAndResetTunnelResponse, error) // Activate is a RPC method to activate a tunnel. Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) From c94cfd20c71773c17ea99ba5748f08295af90cde Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 3 Oct 2024 09:12:27 +0700 Subject: [PATCH 170/272] fix from comments --- x/tunnel/keeper/account.go | 2 ++ x/tunnel/keeper/packet.go | 4 ++-- x/tunnel/types/packet.go | 9 +-------- x/tunnel/types/signal.go | 14 +++++++------- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/x/tunnel/keeper/account.go b/x/tunnel/keeper/account.go index de5cde510..95f0157ca 100644 --- a/x/tunnel/keeper/account.go +++ b/x/tunnel/keeper/account.go @@ -7,6 +7,8 @@ import ( "github.com/bandprotocol/chain/v2/x/tunnel/types" ) +// TODO: patch account generation follow ibc-v8 +// https://github.com/cosmos/ibc-go/blob/v8.5.1/modules/apps/27-interchain-accounts/types/account.go#L46 func (k Keeper) GenerateAccount(ctx sdk.Context, key string) (sdk.AccAddress, error) { header := ctx.BlockHeader() diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index a7b2b07b7..19d107a24 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -102,8 +102,8 @@ func (k Keeper) ProducePacket( latestSignalPrices := k.MustGetLatestSignalPrices(ctx, tunnelID) // check if the interval has passed - intervalTrigger := unixNow >= int64(tunnel.Interval)+latestSignalPrices.Timestamp - triggerAll = triggerAll || intervalTrigger + isIntervalReached := unixNow >= int64(tunnel.Interval)+latestSignalPrices.Timestamp + triggerAll = triggerAll || isIntervalReached // generate new signal prices nsps := GenerateSignalPrices( diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 78e725ed9..8f226ef31 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -1,10 +1,7 @@ package types import ( - "fmt" - "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/cosmos/gogoproto/proto" ) var _ types.UnpackInterfacesMessage = Packet{} @@ -32,11 +29,7 @@ func (p Packet) UnpackInterfaces(unpacker types.AnyUnpacker) error { // SetPacketContent sets the packet content of the packet. func (p *Packet) SetPacketContent(packetContent PacketContentI) error { - msg, ok := packetContent.(proto.Message) - if !ok { - return fmt.Errorf("can't proto marshal %T", msg) - } - any, err := types.NewAnyWithValue(msg) + any, err := types.NewAnyWithValue(packetContent) if err != nil { return err } diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 7e4a8a46e..29f28e5b8 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -29,21 +29,21 @@ func NewLatestSignalPrices( } // Validate validates the latest signal prices. -func (lsps LatestSignalPrices) Validate() error { - if lsps.TunnelID == 0 { +func (l LatestSignalPrices) Validate() error { + if l.TunnelID == 0 { return fmt.Errorf("tunnel ID cannot be 0") } - if len(lsps.SignalPrices) == 0 { + if len(l.SignalPrices) == 0 { return fmt.Errorf("signal prices cannot be empty") } - if lsps.Timestamp < 0 { + if l.Timestamp < 0 { return fmt.Errorf("timestamp cannot be negative") } return nil } // UpdateSignalPrices updates the signal prices in the latest signal prices. -func (lsps *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { +func (l *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { // create a map of new signal prices newSpMap := make(map[string]SignalPrice) for _, sp := range newSignalPrices { @@ -51,9 +51,9 @@ func (lsps *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice } // update signal prices - for i, sp := range lsps.SignalPrices { + for i, sp := range l.SignalPrices { if newSp, ok := newSpMap[sp.SignalID]; ok { - lsps.SignalPrices[i] = newSp + l.SignalPrices[i] = newSp } } } From 33083ab3166bc72ebb63115c5b3a42a75f561307 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 3 Oct 2024 10:00:07 +0700 Subject: [PATCH 171/272] revert change --- x/tunnel/keeper/packet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 90571774d..545f51e3d 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -196,7 +196,7 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { return err } - // update the packet content + // set the packet content if err := packet.SetPacketContent(content); err != nil { return sdkerrors.Wrapf(err, "failed to set packet content for tunnel ID: %d", tunnel.ID) } @@ -249,7 +249,7 @@ func (k Keeper) GenerateNewSignalPrices( // calculate deviation between old price and new price and compare with the threshold. // shouldSend is set to true if sendAll is true or there is a signal whose deviation - // is over the hard threshold. + // is over the hard threshold. deviation := calculateDeviationBPS(oldPrice, newPrice) if sendAll || deviation.GTE(hardDeviation) { newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) From c93ee4a4f45b090fac3b679733631261172ea2df Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 3 Oct 2024 17:23:06 +0700 Subject: [PATCH 172/272] clean doc --- x/tunnel/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/x/tunnel/README.md b/x/tunnel/README.md index 57233405f..58eadd221 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -1,7 +1,3 @@ ---- -sidebar_position: 1 ---- - # `x/tunnel` ## Abstract From 132ebf9051a421ca69daef91b95db7b642f6ceb9 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Fri, 4 Oct 2024 09:33:12 +0700 Subject: [PATCH 173/272] fix from comments --- x/tunnel/keeper/packet.go | 9 ++++++--- x/tunnel/keeper/tunnel.go | 5 ++++- x/tunnel/types/axelar_route.go | 4 ++-- x/tunnel/types/route.go | 2 +- x/tunnel/types/tss_route.go | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 545f51e3d..ad8ce2b7e 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -62,10 +62,13 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { currentPrices := k.feedsKeeper.GetAllCurrentPrices(ctx) currentPricesMap := createPricesMap(currentPrices) - // check for active tunnels + // create new packet if possible for active tunnels. If not enough fund, deactivate the tunnel. for _, id := range ids { ok, err := k.HasEnoughFundToCreatePacket(ctx, id) - if err != nil || !ok { + if err != nil { + continue + } + if !ok { k.MustDeactivateTunnel(ctx, id) continue } @@ -133,7 +136,7 @@ func (k Keeper) ProducePacket( return err } if sendAll { - if err := k.UpdateLastInterval(ctx, tunnel.ID, ctx.BlockTime().Unix()); err != nil { + if err := k.UpdateLastInterval(ctx, tunnel.ID, unixNow); err != nil { return err } } diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 2fabe79f8..076d801f2 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -258,7 +258,10 @@ func (k Keeper) HasEnoughFundToCreatePacket(ctx sdk.Context, tunnelID uint64) (b if !ok { return false, types.ErrInvalidRoute } - routeFee := route.Fee() + routeFee, err := route.Fee() + if err != nil { + return false, err + } // get the base packet fee and calculate total fee basePacketFee := k.GetParams(ctx).BasePacketFee diff --git a/x/tunnel/types/axelar_route.go b/x/tunnel/types/axelar_route.go index 18a6ec32d..b3ac4f9d1 100644 --- a/x/tunnel/types/axelar_route.go +++ b/x/tunnel/types/axelar_route.go @@ -8,6 +8,6 @@ func (r *AxelarRoute) ValidateBasic() error { return nil } -func (r *AxelarRoute) Fee() sdk.Coins { - return sdk.NewCoins() +func (r *AxelarRoute) Fee() (sdk.Coins, error) { + return sdk.NewCoins(), nil } diff --git a/x/tunnel/types/route.go b/x/tunnel/types/route.go index e9d9cb981..c3f9dc0a4 100644 --- a/x/tunnel/types/route.go +++ b/x/tunnel/types/route.go @@ -10,5 +10,5 @@ type RouteI interface { proto.Message ValidateBasic() error - Fee() sdk.Coins + Fee() (sdk.Coins, error) } diff --git a/x/tunnel/types/tss_route.go b/x/tunnel/types/tss_route.go index e55e5beaa..17812925e 100644 --- a/x/tunnel/types/tss_route.go +++ b/x/tunnel/types/tss_route.go @@ -8,6 +8,6 @@ func (r *TSSRoute) ValidateBasic() error { return nil } -func (r *TSSRoute) Fee() sdk.Coins { - return sdk.NewCoins() +func (r *TSSRoute) Fee() (sdk.Coins, error) { + return sdk.NewCoins(), nil } From 0d8ee9862bf00475ec5e3e4eb40063a34de22348 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 4 Oct 2024 15:20:30 +0700 Subject: [PATCH 174/272] update readme --- x/tunnel/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/README.md b/x/tunnel/README.md index 58eadd221..a5e33fc7f 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -2,7 +2,7 @@ ## Abstract -The Tunnel module's main purpose is to decentralize create packet by enabling the configuration of intervals and deviations for transmitting price data to Ethereum Virtual Machine (EVM)-compatible blockchains, as well as other Cosmos-based blockchains. It integrates with key technologies such as Threshold Signature Schemes (TSS), Inter-Blockchain Communication (IBC), Axelar, and Hyperlane to ensure secure and efficient data transmission. +The Tunnel module is designed to decentralize the creation of push-based price data packets by enabling users to configure intervals and deviations for transmitting price data. It ensures secure and efficient transmission to Ethereum Virtual Machine (EVM)-compatible blockchains, Cosmos-based blockchains, and other blockchain networks. Users have the flexibility to select their preferred transmission route, such as the Inter-Blockchain Communication (IBC) protocol or bridge technologies that integrate with Band Protocol. This versatility allows for seamless and reliable delivery of price data across diverse blockchain ecosystems. ## Contents From a984ee3602a45fcd2e8e46adddcec9471351d6ae Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 8 Oct 2024 09:39:13 +0700 Subject: [PATCH 175/272] fix from comments --- x/tunnel/keeper/packet.go | 5 +---- x/tunnel/keeper/packet_test.go | 12 ++++++------ x/tunnel/keeper/tss_packet_test.go | 3 +-- x/tunnel/types/packet.go | 4 ++-- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index ad8ce2b7e..05afdaa31 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -163,10 +163,7 @@ func (k Keeper) CreatePacket( } tunnel.Sequence++ - packet, err := types.NewPacket(tunnelID, tunnel.Sequence, signalPrices, ctx.BlockTime().Unix()) - if err != nil { - return types.Packet{}, sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) - } + packet := types.NewPacket(tunnelID, tunnel.Sequence, signalPrices, ctx.BlockTime().Unix()) // update information in the store k.SetTunnel(ctx, tunnel) diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 1ce429387..ed2607e21 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -223,9 +223,9 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesSendAll() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - nsps, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + newSignalPrices, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) s.Require().NoError(err) - s.Require().Len(nsps, 1) + s.Require().Len(newSignalPrices, 1) } func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { @@ -252,9 +252,9 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - nsps, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + newSignalPrices, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) s.Require().NoError(err) - s.Require().Len(nsps, 2) + s.Require().Len(newSignalPrices, 2) } func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { @@ -281,7 +281,7 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - nsps, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + newSignalPrices, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) s.Require().NoError(err) - s.Require().Len(nsps, 0) + s.Require().Len(newSignalPrices, 0) } diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index d28c669d4..37f9dcd16 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -14,13 +14,12 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { DestinationChainID: "chain-1", DestinationContractAddress: "0x1234567890abcdef", } - packet, err := types.NewPacket( + packet := types.NewPacket( 1, // tunnelID 1, // sequence []types.SignalPrice{}, // signalPriceInfos[] time.Now().Unix(), ) - s.Require().NoError(err) content, err := k.SendTSSPacket(ctx, &route, packet) s.Require().NoError(err) diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 8f226ef31..9bb640539 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -11,14 +11,14 @@ func NewPacket( sequence uint64, signalPrices []SignalPrice, createdAt int64, -) (Packet, error) { +) Packet { return Packet{ TunnelID: tunnelID, Sequence: sequence, SignalPrices: signalPrices, PacketContent: nil, CreatedAt: createdAt, - }, nil + } } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces From 02906364605d7994f5b245af34f592edf16b7edf Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 18 Oct 2024 16:31:44 +0700 Subject: [PATCH 176/272] clean up --- app/keepers/keepers.go | 2 +- x/tunnel/client/cli/util.go | 2 +- x/tunnel/keeper/account.go | 2 +- x/tunnel/keeper/axelar_packet_handler.go | 2 +- x/tunnel/keeper/axelar_packet_handler_test.go | 1 + x/tunnel/keeper/deposit_test.go | 19 +++++++- x/tunnel/keeper/grpc_query.go | 38 +++++++-------- x/tunnel/keeper/grpc_query_test.go | 46 +++++++++---------- 8 files changed, 64 insertions(+), 48 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 435780e16..a90eb67d1 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -384,7 +384,7 @@ func NewAppKeeper( // If evidence needs to be handled for the app, set routes in router here and seal appKeepers.EvidenceKeeper = *evidenceKeeper - //GlobalFeeKeeper + // GlobalFeeKeeper appKeepers.GlobalFeeKeeper = globalfeekeeper.NewKeeper( appCodec, appKeepers.keys[globalfeetypes.StoreKey], diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index 35a9217ec..75eca435a 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -12,7 +12,7 @@ type SignalDeviations struct { SignalDeviations []SignalDeviation `json:"signal_deviations"` } -// SignalDeviation represents the signal information without soft deviation, which may be implemented in the future. +// Note: SignalDeviation represents the signal information without soft deviation, which may be utilized in the future for deviation adjustments type SignalDeviation struct { SignalID string `json:"signal_id"` DeviationBPS uint64 `json:"deviation_bps"` diff --git a/x/tunnel/keeper/account.go b/x/tunnel/keeper/account.go index c608f8de0..8411a2285 100644 --- a/x/tunnel/keeper/account.go +++ b/x/tunnel/keeper/account.go @@ -23,8 +23,8 @@ func (k Keeper) GenerateAccount(ctx sdk.Context, key string) (sdk.AccAddress, er tunnelAccAddr := sdk.AccAddress(moduleCred.Address()) - // this should not happen if acc := k.authKeeper.GetAccount(ctx, tunnelAccAddr); acc != nil { + // this should not happen return nil, types.ErrAccountAlreadyExist.Wrapf( "existing account for newly generated key account address %s", tunnelAccAddr.String(), diff --git a/x/tunnel/keeper/axelar_packet_handler.go b/x/tunnel/keeper/axelar_packet_handler.go index 901e24a88..aa0bb25c1 100644 --- a/x/tunnel/keeper/axelar_packet_handler.go +++ b/x/tunnel/keeper/axelar_packet_handler.go @@ -6,7 +6,7 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -// SendAxelarPacket sends Axelar packet +// TODO: SendAxelarPacket sends Axelar packet func (k Keeper) SendAxelarPacket( ctx sdk.Context, route *types.AxelarRoute, diff --git a/x/tunnel/keeper/axelar_packet_handler_test.go b/x/tunnel/keeper/axelar_packet_handler_test.go index 71264af74..e3636c18d 100644 --- a/x/tunnel/keeper/axelar_packet_handler_test.go +++ b/x/tunnel/keeper/axelar_packet_handler_test.go @@ -4,4 +4,5 @@ import ( "testing" ) +// TODO: TestSendAxelarPacket tests SendAxelarPacket func TestSendAxelarPacket(t *testing.T) {} diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index 2832a8c9a..654afd9a6 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -88,9 +88,14 @@ func (s *KeeperTestSuite) TestWithdrawDeposit() { tunnelID := uint64(1) depositorAddr := sdk.AccAddress([]byte("depositor")) depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(1000))) + firstWithdraw := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(500))) + secondWithdraw := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(500))) s.bankKeeper.EXPECT(). - SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositorAddr, depositAmount). + SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositorAddr, firstWithdraw). + Return(nil).Times(1) + s.bankKeeper.EXPECT(). + SendCoinsFromModuleToAccount(ctx, types.ModuleName, depositorAddr, secondWithdraw). Return(nil).Times(1) tunnel := types.Tunnel{ID: tunnelID, TotalDeposit: depositAmount, IsActive: true} @@ -99,7 +104,17 @@ func (s *KeeperTestSuite) TestWithdrawDeposit() { deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit) - err := k.WithdrawDeposit(ctx, tunnelID, depositAmount, depositorAddr) + // partial withdraw + err := k.WithdrawDeposit(ctx, tunnelID, firstWithdraw, depositorAddr) + s.Require().NoError(err) + + // check tunnel's total deposit + tunnel, err = k.GetTunnel(ctx, tunnelID) + s.Require().NoError(err) + s.Require().Equal(deposit.Amount.Sub(firstWithdraw...), tunnel.TotalDeposit) + + // withdraw all + err = k.WithdrawDeposit(ctx, tunnelID, secondWithdraw, depositorAddr) s.Require().NoError(err) // check tunnel's total deposit diff --git a/x/tunnel/keeper/grpc_query.go b/x/tunnel/keeper/grpc_query.go index 717920613..33990a1ac 100644 --- a/x/tunnel/keeper/grpc_query.go +++ b/x/tunnel/keeper/grpc_query.go @@ -69,23 +69,6 @@ func (q queryServer) Tunnel(c context.Context, req *types.QueryTunnelRequest) (* return &types.QueryTunnelResponse{Tunnel: tunnel}, nil } -// Deposit queries a deposit by its tunnel ID and depositor address. -func (q queryServer) Deposit(c context.Context, req *types.QueryDepositRequest) (*types.QueryDepositResponse, error) { - ctx := sdk.UnwrapSDKContext(c) - - depositor, err := sdk.AccAddressFromBech32(req.Depositor) - if err != nil { - return nil, err - } - - deposit, found := q.k.GetDeposit(ctx, req.TunnelId, depositor) - if !found { - return nil, types.ErrDepositNotFound - } - - return &types.QueryDepositResponse{Deposit: deposit}, nil -} - // Deposits queries all deposits of the tunnel. func (q queryServer) Deposits( c context.Context, @@ -112,7 +95,24 @@ func (q queryServer) Deposits( return &types.QueryDepositsResponse{Deposits: deposits, Pagination: pageRes}, nil } -// Packets queries all packets of the module. +// Deposit queries a deposit by its tunnel ID and depositor address. +func (q queryServer) Deposit(c context.Context, req *types.QueryDepositRequest) (*types.QueryDepositResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + depositor, err := sdk.AccAddressFromBech32(req.Depositor) + if err != nil { + return nil, err + } + + deposit, found := q.k.GetDeposit(ctx, req.TunnelId, depositor) + if !found { + return nil, types.ErrDepositNotFound + } + + return &types.QueryDepositResponse{Deposit: deposit}, nil +} + +// Packets queries all packets of the tunnel. func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) (*types.QueryPacketsResponse, error) { ctx := sdk.UnwrapSDKContext(c) @@ -133,7 +133,7 @@ func (q queryServer) Packets(c context.Context, req *types.QueryPacketsRequest) return &types.QueryPacketsResponse{Packets: filteredPackets, Pagination: pageRes}, nil } -// Packet queries a packet by its ID. +// Packet queries a packet by tunnel ID and sequence. func (q queryServer) Packet(c context.Context, req *types.QueryPacketRequest) (*types.QueryPacketResponse, error) { ctx := sdk.UnwrapSDKContext(c) diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index 636754977..d3f3fea47 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -130,7 +130,7 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { s.Require().Equal(packet1, *res.Packet) } -func (s *KeeperTestSuite) TestGRPCQueryDeposit() { +func (s *KeeperTestSuite) TestGRPCQueryDeposits() { ctx, k, q := s.ctx, s.keeper, s.queryServer tunnel := types.Tunnel{ @@ -145,23 +145,30 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposit() { s.Require().NoError(err) k.SetTunnel(ctx, tunnel) - deposit := types.Deposit{ + deposit1 := types.Deposit{ TunnelID: 1, - Depositor: sdk.AccAddress([]byte("depositor")).String(), + Depositor: sdk.AccAddress([]byte("depositor1")).String(), Amount: sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))), } - k.SetDeposit(ctx, deposit) + deposit2 := types.Deposit{ + TunnelID: 1, + Depositor: sdk.AccAddress([]byte("depositor2")).String(), + Amount: sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(110))), + } + k.SetDeposit(ctx, deposit1) + k.SetDeposit(ctx, deposit2) - resp, err := q.Deposit(ctx, &types.QueryDepositRequest{ - TunnelId: 1, - Depositor: deposit.Depositor, + resp, err := q.Deposits(ctx, &types.QueryDepositsRequest{ + TunnelId: 1, }) s.Require().NoError(err) s.Require().NotNil(resp) - s.Require().Equal(deposit, resp.Deposit) + s.Require().Len(resp.Deposits, 2) + s.Require().Equal(deposit1, *resp.Deposits[0]) + s.Require().Equal(deposit2, *resp.Deposits[1]) } -func (s *KeeperTestSuite) TestGRPCQueryDeposits() { +func (s *KeeperTestSuite) TestGRPCQueryDeposit() { ctx, k, q := s.ctx, s.keeper, s.queryServer tunnel := types.Tunnel{ @@ -176,25 +183,18 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposits() { s.Require().NoError(err) k.SetTunnel(ctx, tunnel) - deposit1 := types.Deposit{ + deposit := types.Deposit{ TunnelID: 1, - Depositor: sdk.AccAddress([]byte("depositor1")).String(), + Depositor: sdk.AccAddress([]byte("depositor")).String(), Amount: sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))), } - deposit2 := types.Deposit{ - TunnelID: 1, - Depositor: sdk.AccAddress([]byte("depositor2")).String(), - Amount: sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(110))), - } - k.SetDeposit(ctx, deposit1) - k.SetDeposit(ctx, deposit2) + k.SetDeposit(ctx, deposit) - resp, err := q.Deposits(ctx, &types.QueryDepositsRequest{ - TunnelId: 1, + resp, err := q.Deposit(ctx, &types.QueryDepositRequest{ + TunnelId: 1, + Depositor: deposit.Depositor, }) s.Require().NoError(err) s.Require().NotNil(resp) - s.Require().Len(resp.Deposits, 2) - s.Require().Equal(deposit1, *resp.Deposits[0]) - s.Require().Equal(deposit2, *resp.Deposits[1]) + s.Require().Equal(deposit, resp.Deposit) } From 25ff5793f5cc0398843429622bcdfe41ea0951a5 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 18 Oct 2024 17:16:51 +0700 Subject: [PATCH 177/272] update order --- benchmark/tunnel_bench_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go index 31251a882..97de56e71 100644 --- a/benchmark/tunnel_bench_test.go +++ b/benchmark/tunnel_bench_test.go @@ -6,9 +6,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" bandtesting "github.com/bandprotocol/chain/v3/testing" feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" From c457b6b3524020169bdba1d913f55bfb890db178 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 21 Oct 2024 15:53:19 +0700 Subject: [PATCH 178/272] change script name --- scripts/tunnel/{create_tunnel.sh => create_tss_tunnel.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/tunnel/{create_tunnel.sh => create_tss_tunnel.sh} (100%) diff --git a/scripts/tunnel/create_tunnel.sh b/scripts/tunnel/create_tss_tunnel.sh similarity index 100% rename from scripts/tunnel/create_tunnel.sh rename to scripts/tunnel/create_tss_tunnel.sh From ef6ee085e097df5907bfd0b769fceb84ff6bad82 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 22 Oct 2024 13:47:56 +0700 Subject: [PATCH 179/272] init auto ci temp --- x/tunnel/autocli.go | 76 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 x/tunnel/autocli.go diff --git a/x/tunnel/autocli.go b/x/tunnel/autocli.go new file mode 100644 index 000000000..5c5ea3112 --- /dev/null +++ b/x/tunnel/autocli.go @@ -0,0 +1,76 @@ +package tunnel + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +// AutoCLIOptions returns the AutoCLI options for the tunnel module +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: types.ModuleName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Shows the parameters of the tunnel module", + }, + { + RpcMethod: "Tunnels", + Use: "tunnels", + Short: "Query all tunnels", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "status_filter"}, + }, + }, + { + RpcMethod: "Tunnel", + Use: "tunnel [tunnel-id]", + Short: "Query a specific tunnel by ID", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "tunnel_id"}, + }, + }, + { + RpcMethod: "Deposits", + Use: "deposits [tunnel-id]", + Short: "Query all deposits of a tunnel", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "tunnel_id"}, + }, + }, + { + RpcMethod: "Deposit", + Use: "deposit [tunnel-id] [depositor]", + Short: "Query a specific deposit by tunnel ID and depositor address", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "tunnel_id"}, + {ProtoField: "depositor"}, + }, + }, + { + RpcMethod: "Packets", + Use: "packets [tunnel-id]", + Short: "Query all packets of a tunnel", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "tunnel_id"}, + }, + }, + { + RpcMethod: "Packet", + Use: "packet [tunnel-id] [sequence]", + Short: "Query a specific packet by tunnel ID and sequence", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "tunnel_id"}, + {ProtoField: "sequence"}, + }, + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: restakev1beta1.Msg_ServiceDesc.ServiceName, + }, + } +} From 4f7a62e71e8f395e87be2eefe89630f8b90e7abf Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 22 Oct 2024 14:13:52 +0700 Subject: [PATCH 180/272] init cli --- Makefile | 2 - .../v1 => tunnel/v1beta1}/genesis.pulsar.go | 561 +- api/tunnel/v1beta1/params.pulsar.go | 930 ++ .../v1beta1/query.pulsar.go} | 5206 +++++------ api/tunnel/v1beta1/query_grpc.pb.go | 345 + api/tunnel/v1beta1/tunnel.pulsar.go | 7697 +++++++++++++++++ .../v1beta1/tx.pulsar.go} | 6846 +++++++-------- api/tunnel/v1beta1/tx_grpc.pb.go | 384 + ...{create_tss_tunnel.sh => create_tunnel.sh} | 0 x/tunnel/autocli.go | 8 +- x/tunnel/client/cli/query.go | 313 - x/tunnel/module.go | 5 - x/tunnel/types/genesis.pb.go | 26 +- x/tunnel/types/params.pb.go | 26 +- x/tunnel/types/query.pb.go | 108 +- x/tunnel/types/tunnel.pb.go | 154 +- x/tunnel/types/tx.pb.go | 126 +- 17 files changed, 15847 insertions(+), 6890 deletions(-) rename api/{oracle/v1 => tunnel/v1beta1}/genesis.pulsar.go (55%) create mode 100644 api/tunnel/v1beta1/params.pulsar.go rename api/{tss/v1beta1/tx.pulsar.go => tunnel/v1beta1/query.pulsar.go} (56%) create mode 100644 api/tunnel/v1beta1/query_grpc.pb.go create mode 100644 api/tunnel/v1beta1/tunnel.pulsar.go rename api/{tss/v1beta1/query.pulsar.go => tunnel/v1beta1/tx.pulsar.go} (56%) create mode 100644 api/tunnel/v1beta1/tx_grpc.pb.go rename scripts/tunnel/{create_tss_tunnel.sh => create_tunnel.sh} (100%) delete mode 100644 x/tunnel/client/cli/query.go diff --git a/Makefile b/Makefile index 595a73726..08e58d94c 100644 --- a/Makefile +++ b/Makefile @@ -45,8 +45,6 @@ all: install install: go.sum go install -mod=readonly $(BUILD_FLAGS) ./cmd/bandd go install -mod=readonly $(BUILD_FLAGS) ./cmd/yoda - go install -mod=readonly $(BUILD_FLAGS) ./cmd/cylinder - go install -mod=readonly $(BUILD_FLAGS) ./cmd/grogu release: go.sum env GOOS=linux GOARCH=amd64 \ diff --git a/api/oracle/v1/genesis.pulsar.go b/api/tunnel/v1beta1/genesis.pulsar.go similarity index 55% rename from api/oracle/v1/genesis.pulsar.go rename to api/tunnel/v1beta1/genesis.pulsar.go index 07cbb7939..b81a7bb27 100644 --- a/api/oracle/v1/genesis.pulsar.go +++ b/api/tunnel/v1beta1/genesis.pulsar.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package oraclev1 +package tunnelv1beta1 import ( fmt "fmt" @@ -13,121 +13,125 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_GenesisState_2_list)(nil) +var _ protoreflect.List = (*_GenesisState_3_list)(nil) -type _GenesisState_2_list struct { - list *[]*DataSource +type _GenesisState_3_list struct { + list *[]*Tunnel } -func (x *_GenesisState_2_list) Len() int { +func (x *_GenesisState_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DataSource) + concreteValue := valueUnwrapped.Interface().(*Tunnel) (*x.list)[i] = concreteValue } -func (x *_GenesisState_2_list) Append(value protoreflect.Value) { +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DataSource) + concreteValue := valueUnwrapped.Interface().(*Tunnel) *x.list = append(*x.list, concreteValue) } -func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(DataSource) +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(Tunnel) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_GenesisState_2_list) Truncate(n int) { +func (x *_GenesisState_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(DataSource) +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(Tunnel) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_GenesisState_2_list) IsValid() bool { +func (x *_GenesisState_3_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_GenesisState_3_list)(nil) +var _ protoreflect.List = (*_GenesisState_4_list)(nil) -type _GenesisState_3_list struct { - list *[]*OracleScript +type _GenesisState_4_list struct { + list *[]*LatestSignalPrices } -func (x *_GenesisState_3_list) Len() int { +func (x *_GenesisState_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { +func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { +func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*OracleScript) + concreteValue := valueUnwrapped.Interface().(*LatestSignalPrices) (*x.list)[i] = concreteValue } -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { +func (x *_GenesisState_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*OracleScript) + concreteValue := valueUnwrapped.Interface().(*LatestSignalPrices) *x.list = append(*x.list, concreteValue) } -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(OracleScript) +func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { + v := new(LatestSignalPrices) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_GenesisState_3_list) Truncate(n int) { +func (x *_GenesisState_4_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(OracleScript) +func (x *_GenesisState_4_list) NewElement() protoreflect.Value { + v := new(LatestSignalPrices) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_GenesisState_3_list) IsValid() bool { +func (x *_GenesisState_4_list) IsValid() bool { return x.list != nil } var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_data_sources protoreflect.FieldDescriptor - fd_GenesisState_oracle_scripts protoreflect.FieldDescriptor + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_tunnel_count protoreflect.FieldDescriptor + fd_GenesisState_tunnels protoreflect.FieldDescriptor + fd_GenesisState_latest_signal_prices_list protoreflect.FieldDescriptor + fd_GenesisState_total_fees protoreflect.FieldDescriptor ) func init() { - file_oracle_v1_genesis_proto_init() - md_GenesisState = File_oracle_v1_genesis_proto.Messages().ByName("GenesisState") + file_tunnel_v1beta1_genesis_proto_init() + md_GenesisState = File_tunnel_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_data_sources = md_GenesisState.Fields().ByName("data_sources") - fd_GenesisState_oracle_scripts = md_GenesisState.Fields().ByName("oracle_scripts") + fd_GenesisState_tunnel_count = md_GenesisState.Fields().ByName("tunnel_count") + fd_GenesisState_tunnels = md_GenesisState.Fields().ByName("tunnels") + fd_GenesisState_latest_signal_prices_list = md_GenesisState.Fields().ByName("latest_signal_prices_list") + fd_GenesisState_total_fees = md_GenesisState.Fields().ByName("total_fees") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -139,7 +143,7 @@ func (x *GenesisState) ProtoReflect() protoreflect.Message { } func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_oracle_v1_genesis_proto_msgTypes[0] + mi := &file_tunnel_v1beta1_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -201,15 +205,27 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } - if len(x.DataSources) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.DataSources}) - if !f(fd_GenesisState_data_sources, value) { + if x.TunnelCount != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelCount) + if !f(fd_GenesisState_tunnel_count, value) { + return + } + } + if len(x.Tunnels) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Tunnels}) + if !f(fd_GenesisState_tunnels, value) { return } } - if len(x.OracleScripts) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.OracleScripts}) - if !f(fd_GenesisState_oracle_scripts, value) { + if len(x.LatestSignalPricesList) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.LatestSignalPricesList}) + if !f(fd_GenesisState_latest_signal_prices_list, value) { + return + } + } + if x.TotalFees != nil { + value := protoreflect.ValueOfMessage(x.TotalFees.ProtoReflect()) + if !f(fd_GenesisState_total_fees, value) { return } } @@ -228,17 +244,21 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "oracle.v1.GenesisState.params": + case "tunnel.v1beta1.GenesisState.params": return x.Params != nil - case "oracle.v1.GenesisState.data_sources": - return len(x.DataSources) != 0 - case "oracle.v1.GenesisState.oracle_scripts": - return len(x.OracleScripts) != 0 + case "tunnel.v1beta1.GenesisState.tunnel_count": + return x.TunnelCount != uint64(0) + case "tunnel.v1beta1.GenesisState.tunnels": + return len(x.Tunnels) != 0 + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + return len(x.LatestSignalPricesList) != 0 + case "tunnel.v1beta1.GenesisState.total_fees": + return x.TotalFees != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -250,17 +270,21 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "oracle.v1.GenesisState.params": + case "tunnel.v1beta1.GenesisState.params": x.Params = nil - case "oracle.v1.GenesisState.data_sources": - x.DataSources = nil - case "oracle.v1.GenesisState.oracle_scripts": - x.OracleScripts = nil + case "tunnel.v1beta1.GenesisState.tunnel_count": + x.TunnelCount = uint64(0) + case "tunnel.v1beta1.GenesisState.tunnels": + x.Tunnels = nil + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + x.LatestSignalPricesList = nil + case "tunnel.v1beta1.GenesisState.total_fees": + x.TotalFees = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -272,26 +296,32 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "oracle.v1.GenesisState.params": + case "tunnel.v1beta1.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "oracle.v1.GenesisState.data_sources": - if len(x.DataSources) == 0 { - return protoreflect.ValueOfList(&_GenesisState_2_list{}) + case "tunnel.v1beta1.GenesisState.tunnel_count": + value := x.TunnelCount + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.GenesisState.tunnels": + if len(x.Tunnels) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) } - listValue := &_GenesisState_2_list{list: &x.DataSources} + listValue := &_GenesisState_3_list{list: &x.Tunnels} return protoreflect.ValueOfList(listValue) - case "oracle.v1.GenesisState.oracle_scripts": - if len(x.OracleScripts) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + if len(x.LatestSignalPricesList) == 0 { + return protoreflect.ValueOfList(&_GenesisState_4_list{}) } - listValue := &_GenesisState_3_list{list: &x.OracleScripts} + listValue := &_GenesisState_4_list{list: &x.LatestSignalPricesList} return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.GenesisState.total_fees": + value := x.TotalFees + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) } } @@ -307,21 +337,25 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "oracle.v1.GenesisState.params": + case "tunnel.v1beta1.GenesisState.params": x.Params = value.Message().Interface().(*Params) - case "oracle.v1.GenesisState.data_sources": - lv := value.List() - clv := lv.(*_GenesisState_2_list) - x.DataSources = *clv.list - case "oracle.v1.GenesisState.oracle_scripts": + case "tunnel.v1beta1.GenesisState.tunnel_count": + x.TunnelCount = value.Uint() + case "tunnel.v1beta1.GenesisState.tunnels": lv := value.List() clv := lv.(*_GenesisState_3_list) - x.OracleScripts = *clv.list + x.Tunnels = *clv.list + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + lv := value.List() + clv := lv.(*_GenesisState_4_list) + x.LatestSignalPricesList = *clv.list + case "tunnel.v1beta1.GenesisState.total_fees": + x.TotalFees = value.Message().Interface().(*TotalFees) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -337,28 +371,35 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "oracle.v1.GenesisState.params": + case "tunnel.v1beta1.GenesisState.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "oracle.v1.GenesisState.data_sources": - if x.DataSources == nil { - x.DataSources = []*DataSource{} + case "tunnel.v1beta1.GenesisState.tunnels": + if x.Tunnels == nil { + x.Tunnels = []*Tunnel{} } - value := &_GenesisState_2_list{list: &x.DataSources} + value := &_GenesisState_3_list{list: &x.Tunnels} return protoreflect.ValueOfList(value) - case "oracle.v1.GenesisState.oracle_scripts": - if x.OracleScripts == nil { - x.OracleScripts = []*OracleScript{} + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + if x.LatestSignalPricesList == nil { + x.LatestSignalPricesList = []*LatestSignalPrices{} } - value := &_GenesisState_3_list{list: &x.OracleScripts} + value := &_GenesisState_4_list{list: &x.LatestSignalPricesList} return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.GenesisState.total_fees": + if x.TotalFees == nil { + x.TotalFees = new(TotalFees) + } + return protoreflect.ValueOfMessage(x.TotalFees.ProtoReflect()) + case "tunnel.v1beta1.GenesisState.tunnel_count": + panic(fmt.Errorf("field tunnel_count of message tunnel.v1beta1.GenesisState is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -367,20 +408,25 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "oracle.v1.GenesisState.params": + case "tunnel.v1beta1.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "oracle.v1.GenesisState.data_sources": - list := []*DataSource{} - return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - case "oracle.v1.GenesisState.oracle_scripts": - list := []*OracleScript{} + case "tunnel.v1beta1.GenesisState.tunnel_count": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.GenesisState.tunnels": + list := []*Tunnel{} return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + list := []*LatestSignalPrices{} + return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + case "tunnel.v1beta1.GenesisState.total_fees": + m := new(TotalFees) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message oracle.v1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -390,7 +436,7 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in oracle.v1.GenesisState", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.GenesisState", d.FullName())) } panic("unreachable") } @@ -449,18 +495,25 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.DataSources) > 0 { - for _, e := range x.DataSources { + if x.TunnelCount != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelCount)) + } + if len(x.Tunnels) > 0 { + for _, e := range x.Tunnels { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } - if len(x.OracleScripts) > 0 { - for _, e := range x.OracleScripts { + if len(x.LatestSignalPricesList) > 0 { + for _, e := range x.LatestSignalPricesList { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } + if x.TotalFees != nil { + l = options.Size(x.TotalFees) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -490,9 +543,23 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.OracleScripts) > 0 { - for iNdEx := len(x.OracleScripts) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.OracleScripts[iNdEx]) + if x.TotalFees != nil { + encoded, err := options.Marshal(x.TotalFees) + 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.LatestSignalPricesList) > 0 { + for iNdEx := len(x.LatestSignalPricesList) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LatestSignalPricesList[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -503,12 +570,12 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } } - if len(x.DataSources) > 0 { - for iNdEx := len(x.DataSources) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DataSources[iNdEx]) + if len(x.Tunnels) > 0 { + for iNdEx := len(x.Tunnels) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Tunnels[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -519,9 +586,14 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } + if x.TunnelCount != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelCount)) + i-- + dAtA[i] = 0x10 + } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { @@ -622,8 +694,27 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelCount", wireType) + } + x.TunnelCount = 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.TunnelCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DataSources", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tunnels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -650,14 +741,48 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.DataSources = append(x.DataSources, &DataSource{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DataSources[len(x.DataSources)-1]); err != nil { + x.Tunnels = append(x.Tunnels, &Tunnel{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tunnels[len(x.Tunnels)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 3: + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LatestSignalPricesList", 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 + } + x.LatestSignalPricesList = append(x.LatestSignalPricesList, &LatestSignalPrices{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LatestSignalPricesList[len(x.LatestSignalPricesList)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OracleScripts", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalFees", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -684,8 +809,10 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.OracleScripts = append(x.OracleScripts, &OracleScript{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OracleScripts[len(x.OracleScripts)-1]); err != nil { + if x.TotalFees == nil { + x.TotalFees = &TotalFees{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalFees); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -728,7 +855,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: oracle/v1/genesis.proto +// source: tunnel/v1beta1/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -737,24 +864,28 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// GenesisState defines the oracle module's genesis state. +// GenesisState represents the initial state of the blockchain. type GenesisState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Params defines all the parameters of the module. + // params is all parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - // DataSources are data sources to be installed during genesis phase. - DataSources []*DataSource `protobuf:"bytes,2,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"` - // OracleScripts are list of oracle scripts to be installed during genesis phase. - OracleScripts []*OracleScript `protobuf:"bytes,3,rep,name=oracle_scripts,json=oracleScripts,proto3" json:"oracle_scripts,omitempty"` + // tunnel_count is the number of tunnels. + TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` + // tunnels is the list of tunnels. + Tunnels []*Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels,omitempty"` + // latest_signal_prices_list is the list of latest signal prices. + LatestSignalPricesList []*LatestSignalPrices `protobuf:"bytes,4,rep,name=latest_signal_prices_list,json=latestSignalPricesList,proto3" json:"latest_signal_prices_list,omitempty"` + // total_fees is the type for the total fees collected by the tunnel + TotalFees *TotalFees `protobuf:"bytes,5,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"` } func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { - mi := &file_oracle_v1_genesis_proto_msgTypes[0] + mi := &file_tunnel_v1beta1_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -768,7 +899,7 @@ func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { - return file_oracle_v1_genesis_proto_rawDescGZIP(), []int{0} + return file_tunnel_v1beta1_genesis_proto_rawDescGZIP(), []int{0} } func (x *GenesisState) GetParams() *Params { @@ -778,91 +909,121 @@ func (x *GenesisState) GetParams() *Params { return nil } -func (x *GenesisState) GetDataSources() []*DataSource { +func (x *GenesisState) GetTunnelCount() uint64 { if x != nil { - return x.DataSources + return x.TunnelCount + } + return 0 +} + +func (x *GenesisState) GetTunnels() []*Tunnel { + if x != nil { + return x.Tunnels + } + return nil +} + +func (x *GenesisState) GetLatestSignalPricesList() []*LatestSignalPrices { + if x != nil { + return x.LatestSignalPricesList } return nil } -func (x *GenesisState) GetOracleScripts() []*OracleScript { +func (x *GenesisState) GetTotalFees() *TotalFees { if x != nil { - return x.OracleScripts + return x.TotalFees } return nil } -var File_oracle_v1_genesis_proto protoreflect.FileDescriptor - -var file_oracle_v1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x6f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x42, 0x9b, 0x01, 0x0a, 0x0d, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, +var File_tunnel_v1beta1_genesis_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, + 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, + 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x12, 0x63, 0x0a, 0x19, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x16, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, + 0x65, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, + 0x46, 0x65, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x46, 0x65, 0x65, 0x73, 0x42, 0xbe, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, + 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_oracle_v1_genesis_proto_rawDescOnce sync.Once - file_oracle_v1_genesis_proto_rawDescData = file_oracle_v1_genesis_proto_rawDesc + file_tunnel_v1beta1_genesis_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_genesis_proto_rawDescData = file_tunnel_v1beta1_genesis_proto_rawDesc ) -func file_oracle_v1_genesis_proto_rawDescGZIP() []byte { - file_oracle_v1_genesis_proto_rawDescOnce.Do(func() { - file_oracle_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_genesis_proto_rawDescData) +func file_tunnel_v1beta1_genesis_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_genesis_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_genesis_proto_rawDescData) }) - return file_oracle_v1_genesis_proto_rawDescData -} - -var file_oracle_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_oracle_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: oracle.v1.GenesisState - (*Params)(nil), // 1: oracle.v1.Params - (*DataSource)(nil), // 2: oracle.v1.DataSource - (*OracleScript)(nil), // 3: oracle.v1.OracleScript -} -var file_oracle_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: oracle.v1.GenesisState.params:type_name -> oracle.v1.Params - 2, // 1: oracle.v1.GenesisState.data_sources:type_name -> oracle.v1.DataSource - 3, // 2: oracle.v1.GenesisState.oracle_scripts:type_name -> oracle.v1.OracleScript - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_oracle_v1_genesis_proto_init() } -func file_oracle_v1_genesis_proto_init() { - if File_oracle_v1_genesis_proto != nil { + return file_tunnel_v1beta1_genesis_proto_rawDescData +} + +var file_tunnel_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_tunnel_v1beta1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: tunnel.v1beta1.GenesisState + (*Params)(nil), // 1: tunnel.v1beta1.Params + (*Tunnel)(nil), // 2: tunnel.v1beta1.Tunnel + (*LatestSignalPrices)(nil), // 3: tunnel.v1beta1.LatestSignalPrices + (*TotalFees)(nil), // 4: tunnel.v1beta1.TotalFees +} +var file_tunnel_v1beta1_genesis_proto_depIdxs = []int32{ + 1, // 0: tunnel.v1beta1.GenesisState.params:type_name -> tunnel.v1beta1.Params + 2, // 1: tunnel.v1beta1.GenesisState.tunnels:type_name -> tunnel.v1beta1.Tunnel + 3, // 2: tunnel.v1beta1.GenesisState.latest_signal_prices_list:type_name -> tunnel.v1beta1.LatestSignalPrices + 4, // 3: tunnel.v1beta1.GenesisState.total_fees:type_name -> tunnel.v1beta1.TotalFees + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_tunnel_v1beta1_genesis_proto_init() } +func file_tunnel_v1beta1_genesis_proto_init() { + if File_tunnel_v1beta1_genesis_proto != nil { return } - file_oracle_v1_oracle_proto_init() + file_tunnel_v1beta1_params_proto_init() + file_tunnel_v1beta1_tunnel_proto_init() if !protoimpl.UnsafeEnabled { - file_oracle_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_tunnel_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state @@ -879,18 +1040,18 @@ func file_oracle_v1_genesis_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_oracle_v1_genesis_proto_rawDesc, + RawDescriptor: file_tunnel_v1beta1_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_oracle_v1_genesis_proto_goTypes, - DependencyIndexes: file_oracle_v1_genesis_proto_depIdxs, - MessageInfos: file_oracle_v1_genesis_proto_msgTypes, + GoTypes: file_tunnel_v1beta1_genesis_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_genesis_proto_depIdxs, + MessageInfos: file_tunnel_v1beta1_genesis_proto_msgTypes, }.Build() - File_oracle_v1_genesis_proto = out.File - file_oracle_v1_genesis_proto_rawDesc = nil - file_oracle_v1_genesis_proto_goTypes = nil - file_oracle_v1_genesis_proto_depIdxs = nil + File_tunnel_v1beta1_genesis_proto = out.File + file_tunnel_v1beta1_genesis_proto_rawDesc = nil + file_tunnel_v1beta1_genesis_proto_goTypes = nil + file_tunnel_v1beta1_genesis_proto_depIdxs = nil } diff --git a/api/tunnel/v1beta1/params.pulsar.go b/api/tunnel/v1beta1/params.pulsar.go new file mode 100644 index 000000000..a71b206dd --- /dev/null +++ b/api/tunnel/v1beta1/params.pulsar.go @@ -0,0 +1,930 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tunnelv1beta1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + 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" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_Params_1_list)(nil) + +type _Params_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Params_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Params_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Params_4_list)(nil) + +type _Params_4_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Params_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Params_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_4_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_4_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_min_deposit protoreflect.FieldDescriptor + fd_Params_min_interval protoreflect.FieldDescriptor + fd_Params_max_signals protoreflect.FieldDescriptor + fd_Params_base_packet_fee protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_params_proto_init() + md_Params = File_tunnel_v1beta1_params_proto.Messages().ByName("Params") + fd_Params_min_deposit = md_Params.Fields().ByName("min_deposit") + fd_Params_min_interval = md_Params.Fields().ByName("min_interval") + fd_Params_max_signals = md_Params.Fields().ByName("max_signals") + fd_Params_base_packet_fee = md_Params.Fields().ByName("base_packet_fee") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_params_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_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// 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_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(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_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.MinDeposit) != 0 { + value := protoreflect.ValueOfList(&_Params_1_list{list: &x.MinDeposit}) + if !f(fd_Params_min_deposit, value) { + return + } + } + if x.MinInterval != uint64(0) { + value := protoreflect.ValueOfUint64(x.MinInterval) + if !f(fd_Params_min_interval, value) { + return + } + } + if x.MaxSignals != uint64(0) { + value := protoreflect.ValueOfUint64(x.MaxSignals) + if !f(fd_Params_max_signals, value) { + return + } + } + if len(x.BasePacketFee) != 0 { + value := protoreflect.ValueOfList(&_Params_4_list{list: &x.BasePacketFee}) + if !f(fd_Params_base_packet_fee, 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_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + return len(x.MinDeposit) != 0 + case "tunnel.v1beta1.Params.min_interval": + return x.MinInterval != uint64(0) + case "tunnel.v1beta1.Params.max_signals": + return x.MaxSignals != uint64(0) + case "tunnel.v1beta1.Params.base_packet_fee": + return len(x.BasePacketFee) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + x.MinDeposit = nil + case "tunnel.v1beta1.Params.min_interval": + x.MinInterval = uint64(0) + case "tunnel.v1beta1.Params.max_signals": + x.MaxSignals = uint64(0) + case "tunnel.v1beta1.Params.base_packet_fee": + x.BasePacketFee = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + if len(x.MinDeposit) == 0 { + return protoreflect.ValueOfList(&_Params_1_list{}) + } + listValue := &_Params_1_list{list: &x.MinDeposit} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.Params.min_interval": + value := x.MinInterval + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Params.max_signals": + value := x.MaxSignals + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Params.base_packet_fee": + if len(x.BasePacketFee) == 0 { + return protoreflect.ValueOfList(&_Params_4_list{}) + } + listValue := &_Params_4_list{list: &x.BasePacketFee} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + lv := value.List() + clv := lv.(*_Params_1_list) + x.MinDeposit = *clv.list + case "tunnel.v1beta1.Params.min_interval": + x.MinInterval = value.Uint() + case "tunnel.v1beta1.Params.max_signals": + x.MaxSignals = value.Uint() + case "tunnel.v1beta1.Params.base_packet_fee": + lv := value.List() + clv := lv.(*_Params_4_list) + x.BasePacketFee = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + if x.MinDeposit == nil { + x.MinDeposit = []*v1beta1.Coin{} + } + value := &_Params_1_list{list: &x.MinDeposit} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Params.base_packet_fee": + if x.BasePacketFee == nil { + x.BasePacketFee = []*v1beta1.Coin{} + } + value := &_Params_4_list{list: &x.BasePacketFee} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Params.min_interval": + panic(fmt.Errorf("field min_interval of message tunnel.v1beta1.Params is not mutable")) + case "tunnel.v1beta1.Params.max_signals": + panic(fmt.Errorf("field max_signals of message tunnel.v1beta1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Params_1_list{list: &list}) + case "tunnel.v1beta1.Params.min_interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Params.max_signals": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Params.base_packet_fee": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Params_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.MinDeposit) > 0 { + for _, e := range x.MinDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.MinInterval != 0 { + n += 1 + runtime.Sov(uint64(x.MinInterval)) + } + if x.MaxSignals != 0 { + n += 1 + runtime.Sov(uint64(x.MaxSignals)) + } + if len(x.BasePacketFee) > 0 { + for _, e := range x.BasePacketFee { + l = options.Size(e) + 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().(*Params) + 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.BasePacketFee) > 0 { + for iNdEx := len(x.BasePacketFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.BasePacketFee[iNdEx]) + 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] = 0x22 + } + } + if x.MaxSignals != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxSignals)) + i-- + dAtA[i] = 0x18 + } + if x.MinInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MinInterval)) + i-- + dAtA[i] = 0x10 + } + if len(x.MinDeposit) > 0 { + for iNdEx := len(x.MinDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.MinDeposit[iNdEx]) + 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().(*Params) + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: 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 MinDeposit", 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 + } + x.MinDeposit = append(x.MinDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinDeposit[len(x.MinDeposit)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinInterval", wireType) + } + x.MinInterval = 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.MinInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxSignals", wireType) + } + x.MaxSignals = 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.MaxSignals |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BasePacketFee", 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 + } + x.BasePacketFee = append(x.BasePacketFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BasePacketFee[len(x.BasePacketFee)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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: tunnel/v1beta1/params.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) +) + +// Params is the data structure that keeps the parameters of the module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // min_deposit is the minimum deposit required to create a tunnel + MinDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` + // min_interval is the minimum interval in seconds + MinInterval uint64 `protobuf:"varint,2,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` + // max_signals defines the maximum number of signals allowed per tunnel. + MaxSignals uint64 `protobuf:"varint,3,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` + // base_packet_fee is the base fee for each packet + BasePacketFee []*v1beta1.Coin `protobuf:"bytes,4,rep,name=base_packet_fee,json=basePacketFee,proto3" json:"base_packet_fee,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_params_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_params_proto_rawDescGZIP(), []int{0} +} + +func (x *Params) GetMinDeposit() []*v1beta1.Coin { + if x != nil { + return x.MinDeposit + } + return nil +} + +func (x *Params) GetMinInterval() uint64 { + if x != nil { + return x.MinInterval + } + return 0 +} + +func (x *Params) GetMaxSignals() uint64 { + if x != nil { + return x.MaxSignals + } + return 0 +} + +func (x *Params) GetBasePacketFee() []*v1beta1.Coin { + if x != nil { + return x.BasePacketFee + } + return nil +} + +var File_tunnel_v1beta1_params_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_params_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, + 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 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, 0x22, 0xb9, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6c, + 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x03, 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, 0x30, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, + 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, + 0x12, 0x73, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, + 0xbd, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, + 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, + 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tunnel_v1beta1_params_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_params_proto_rawDescData = file_tunnel_v1beta1_params_proto_rawDesc +) + +func file_tunnel_v1beta1_params_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_params_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_params_proto_rawDescData) + }) + return file_tunnel_v1beta1_params_proto_rawDescData +} + +var file_tunnel_v1beta1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_tunnel_v1beta1_params_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: tunnel.v1beta1.Params + (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin +} +var file_tunnel_v1beta1_params_proto_depIdxs = []int32{ + 1, // 0: tunnel.v1beta1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 1, // 1: tunnel.v1beta1.Params.base_packet_fee:type_name -> cosmos.base.v1beta1.Coin + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_tunnel_v1beta1_params_proto_init() } +func file_tunnel_v1beta1_params_proto_init() { + if File_tunnel_v1beta1_params_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tunnel_v1beta1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); 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_tunnel_v1beta1_params_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tunnel_v1beta1_params_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_params_proto_depIdxs, + MessageInfos: file_tunnel_v1beta1_params_proto_msgTypes, + }.Build() + File_tunnel_v1beta1_params_proto = out.File + file_tunnel_v1beta1_params_proto_rawDesc = nil + file_tunnel_v1beta1_params_proto_goTypes = nil + file_tunnel_v1beta1_params_proto_depIdxs = nil +} diff --git a/api/tss/v1beta1/tx.pulsar.go b/api/tunnel/v1beta1/query.pulsar.go similarity index 56% rename from api/tss/v1beta1/tx.pulsar.go rename to api/tunnel/v1beta1/query.pulsar.go index da17540cb..2af6c1ab5 100644 --- a/api/tss/v1beta1/tx.pulsar.go +++ b/api/tunnel/v1beta1/query.pulsar.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package tssv1beta1 +package tunnelv1beta1 import ( - _ "cosmossdk.io/api/amino" - _ "cosmossdk.io/api/cosmos/msg/v1" + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -17,30 +16,28 @@ import ( ) var ( - md_MsgSubmitDKGRound1 protoreflect.MessageDescriptor - fd_MsgSubmitDKGRound1_group_id protoreflect.FieldDescriptor - fd_MsgSubmitDKGRound1_round1_info protoreflect.FieldDescriptor - fd_MsgSubmitDKGRound1_sender protoreflect.FieldDescriptor + md_QueryTunnelsRequest protoreflect.MessageDescriptor + fd_QueryTunnelsRequest_status_filter protoreflect.FieldDescriptor + fd_QueryTunnelsRequest_pagination protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgSubmitDKGRound1 = File_tss_v1beta1_tx_proto.Messages().ByName("MsgSubmitDKGRound1") - fd_MsgSubmitDKGRound1_group_id = md_MsgSubmitDKGRound1.Fields().ByName("group_id") - fd_MsgSubmitDKGRound1_round1_info = md_MsgSubmitDKGRound1.Fields().ByName("round1_info") - fd_MsgSubmitDKGRound1_sender = md_MsgSubmitDKGRound1.Fields().ByName("sender") + file_tunnel_v1beta1_query_proto_init() + md_QueryTunnelsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelsRequest") + fd_QueryTunnelsRequest_status_filter = md_QueryTunnelsRequest.Fields().ByName("status_filter") + fd_QueryTunnelsRequest_pagination = md_QueryTunnelsRequest.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitDKGRound1)(nil) +var _ protoreflect.Message = (*fastReflection_QueryTunnelsRequest)(nil) -type fastReflection_MsgSubmitDKGRound1 MsgSubmitDKGRound1 +type fastReflection_QueryTunnelsRequest QueryTunnelsRequest -func (x *MsgSubmitDKGRound1) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitDKGRound1)(x) +func (x *QueryTunnelsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTunnelsRequest)(x) } -func (x *MsgSubmitDKGRound1) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[0] +func (x *QueryTunnelsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -51,43 +48,43 @@ func (x *MsgSubmitDKGRound1) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitDKGRound1_messageType fastReflection_MsgSubmitDKGRound1_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitDKGRound1_messageType{} +var _fastReflection_QueryTunnelsRequest_messageType fastReflection_QueryTunnelsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryTunnelsRequest_messageType{} -type fastReflection_MsgSubmitDKGRound1_messageType struct{} +type fastReflection_QueryTunnelsRequest_messageType struct{} -func (x fastReflection_MsgSubmitDKGRound1_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitDKGRound1)(nil) +func (x fastReflection_QueryTunnelsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTunnelsRequest)(nil) } -func (x fastReflection_MsgSubmitDKGRound1_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDKGRound1) +func (x fastReflection_QueryTunnelsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTunnelsRequest) } -func (x fastReflection_MsgSubmitDKGRound1_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDKGRound1 +func (x fastReflection_QueryTunnelsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitDKGRound1) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDKGRound1 +func (x *fastReflection_QueryTunnelsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelsRequest } // 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_MsgSubmitDKGRound1) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitDKGRound1_messageType +func (x *fastReflection_QueryTunnelsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryTunnelsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitDKGRound1) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDKGRound1) +func (x *fastReflection_QueryTunnelsRequest) New() protoreflect.Message { + return new(fastReflection_QueryTunnelsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitDKGRound1) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitDKGRound1)(x) +func (x *fastReflection_QueryTunnelsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryTunnelsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -95,22 +92,16 @@ func (x *fastReflection_MsgSubmitDKGRound1) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitDKGRound1) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgSubmitDKGRound1_group_id, value) { +func (x *fastReflection_QueryTunnelsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.StatusFilter != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.StatusFilter)) + if !f(fd_QueryTunnelsRequest_status_filter, value) { return } } - if x.Round1Info != nil { - value := protoreflect.ValueOfMessage(x.Round1Info.ProtoReflect()) - if !f(fd_MsgSubmitDKGRound1_round1_info, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgSubmitDKGRound1_sender, value) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryTunnelsRequest_pagination, value) { return } } @@ -127,19 +118,17 @@ func (x *fastReflection_MsgSubmitDKGRound1) Range(f func(protoreflect.FieldDescr // 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_MsgSubmitDKGRound1) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryTunnelsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound1.group_id": - return x.GroupId != uint64(0) - case "tss.v1beta1.MsgSubmitDKGRound1.round1_info": - return x.Round1Info != nil - case "tss.v1beta1.MsgSubmitDKGRound1.sender": - return x.Sender != "" + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + return x.StatusFilter != 0 + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) } } @@ -149,19 +138,17 @@ func (x *fastReflection_MsgSubmitDKGRound1) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound1) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryTunnelsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound1.group_id": - x.GroupId = uint64(0) - case "tss.v1beta1.MsgSubmitDKGRound1.round1_info": - x.Round1Info = nil - case "tss.v1beta1.MsgSubmitDKGRound1.sender": - x.Sender = "" + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + x.StatusFilter = 0 + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) } } @@ -171,22 +158,19 @@ func (x *fastReflection_MsgSubmitDKGRound1) Clear(fd protoreflect.FieldDescripto // 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_MsgSubmitDKGRound1) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound1.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - case "tss.v1beta1.MsgSubmitDKGRound1.round1_info": - value := x.Round1Info + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + value := x.StatusFilter + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tss.v1beta1.MsgSubmitDKGRound1.sender": - value := x.Sender - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1 does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", descriptor.FullName())) } } @@ -200,19 +184,17 @@ func (x *fastReflection_MsgSubmitDKGRound1) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound1) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryTunnelsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound1.group_id": - x.GroupId = value.Uint() - case "tss.v1beta1.MsgSubmitDKGRound1.round1_info": - x.Round1Info = value.Message().Interface().(*Round1Info) - case "tss.v1beta1.MsgSubmitDKGRound1.sender": - x.Sender = value.Interface().(string) + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + x.StatusFilter = (TunnelStatusFilter)(value.Enum()) + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) } } @@ -226,52 +208,48 @@ func (x *fastReflection_MsgSubmitDKGRound1) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound1) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound1.round1_info": - if x.Round1Info == nil { - x.Round1Info = new(Round1Info) - } - return protoreflect.ValueOfMessage(x.Round1Info.ProtoReflect()) - case "tss.v1beta1.MsgSubmitDKGRound1.group_id": - panic(fmt.Errorf("field group_id of message tss.v1beta1.MsgSubmitDKGRound1 is not mutable")) - case "tss.v1beta1.MsgSubmitDKGRound1.sender": - panic(fmt.Errorf("field sender of message tss.v1beta1.MsgSubmitDKGRound1 is not mutable")) + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + panic(fmt.Errorf("field status_filter of message tunnel.v1beta1.QueryTunnelsRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest 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_MsgSubmitDKGRound1) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound1.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "tss.v1beta1.MsgSubmitDKGRound1.round1_info": - m := new(Round1Info) + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + return protoreflect.ValueOfEnum(0) + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tss.v1beta1.MsgSubmitDKGRound1.sender": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest 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_MsgSubmitDKGRound1) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryTunnelsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgSubmitDKGRound1", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelsRequest", d.FullName())) } panic("unreachable") } @@ -279,7 +257,7 @@ func (x *fastReflection_MsgSubmitDKGRound1) WhichOneof(d protoreflect.OneofDescr // 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_MsgSubmitDKGRound1) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryTunnelsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -290,7 +268,7 @@ func (x *fastReflection_MsgSubmitDKGRound1) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound1) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryTunnelsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -302,7 +280,7 @@ func (x *fastReflection_MsgSubmitDKGRound1) SetUnknown(fields protoreflect.RawFi // 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_MsgSubmitDKGRound1) IsValid() bool { +func (x *fastReflection_QueryTunnelsRequest) IsValid() bool { return x != nil } @@ -312,9 +290,9 @@ func (x *fastReflection_MsgSubmitDKGRound1) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryTunnelsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitDKGRound1) + x := input.Message.Interface().(*QueryTunnelsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -326,15 +304,11 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) + if x.StatusFilter != 0 { + n += 1 + runtime.Sov(uint64(x.StatusFilter)) } - if x.Round1Info != nil { - l = options.Size(x.Round1Info) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { + if x.Pagination != nil { + l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -347,7 +321,7 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDKGRound1) + x := input.Message.Interface().(*QueryTunnelsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -366,15 +340,8 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x1a - } - if x.Round1Info != nil { - encoded, err := options.Marshal(x.Round1Info) + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -387,8 +354,8 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x12 } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + if x.StatusFilter != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.StatusFilter)) i-- dAtA[i] = 0x8 } @@ -403,7 +370,7 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDKGRound1) + x := input.Message.Interface().(*QueryTunnelsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -435,17 +402,17 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDKGRound1: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDKGRound1: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StatusFilter", wireType) } - x.GroupId = 0 + x.StatusFilter = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -455,14 +422,14 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift + x.StatusFilter |= TunnelStatusFilter(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Round1Info", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -489,45 +456,13 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Round1Info == nil { - x.Round1Info = &Round1Info{} + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Round1Info); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); 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 Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -563,25 +498,80 @@ func (x *fastReflection_MsgSubmitDKGRound1) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_QueryTunnelsResponse_1_list)(nil) + +type _QueryTunnelsResponse_1_list struct { + list *[]*Tunnel +} + +func (x *_QueryTunnelsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryTunnelsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryTunnelsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Tunnel) + (*x.list)[i] = concreteValue +} + +func (x *_QueryTunnelsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Tunnel) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryTunnelsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Tunnel) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryTunnelsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryTunnelsResponse_1_list) NewElement() protoreflect.Value { + v := new(Tunnel) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryTunnelsResponse_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_MsgSubmitDKGRound1Response protoreflect.MessageDescriptor + md_QueryTunnelsResponse protoreflect.MessageDescriptor + fd_QueryTunnelsResponse_tunnels protoreflect.FieldDescriptor + fd_QueryTunnelsResponse_pagination protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgSubmitDKGRound1Response = File_tss_v1beta1_tx_proto.Messages().ByName("MsgSubmitDKGRound1Response") + file_tunnel_v1beta1_query_proto_init() + md_QueryTunnelsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelsResponse") + fd_QueryTunnelsResponse_tunnels = md_QueryTunnelsResponse.Fields().ByName("tunnels") + fd_QueryTunnelsResponse_pagination = md_QueryTunnelsResponse.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitDKGRound1Response)(nil) +var _ protoreflect.Message = (*fastReflection_QueryTunnelsResponse)(nil) -type fastReflection_MsgSubmitDKGRound1Response MsgSubmitDKGRound1Response +type fastReflection_QueryTunnelsResponse QueryTunnelsResponse -func (x *MsgSubmitDKGRound1Response) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitDKGRound1Response)(x) +func (x *QueryTunnelsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTunnelsResponse)(x) } -func (x *MsgSubmitDKGRound1Response) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[1] +func (x *QueryTunnelsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -592,43 +582,43 @@ func (x *MsgSubmitDKGRound1Response) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitDKGRound1Response_messageType fastReflection_MsgSubmitDKGRound1Response_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitDKGRound1Response_messageType{} +var _fastReflection_QueryTunnelsResponse_messageType fastReflection_QueryTunnelsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryTunnelsResponse_messageType{} -type fastReflection_MsgSubmitDKGRound1Response_messageType struct{} +type fastReflection_QueryTunnelsResponse_messageType struct{} -func (x fastReflection_MsgSubmitDKGRound1Response_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitDKGRound1Response)(nil) +func (x fastReflection_QueryTunnelsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTunnelsResponse)(nil) } -func (x fastReflection_MsgSubmitDKGRound1Response_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDKGRound1Response) +func (x fastReflection_QueryTunnelsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTunnelsResponse) } -func (x fastReflection_MsgSubmitDKGRound1Response_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDKGRound1Response +func (x fastReflection_QueryTunnelsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitDKGRound1Response) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDKGRound1Response +func (x *fastReflection_QueryTunnelsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelsResponse } // 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_MsgSubmitDKGRound1Response) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitDKGRound1Response_messageType +func (x *fastReflection_QueryTunnelsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryTunnelsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitDKGRound1Response) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDKGRound1Response) +func (x *fastReflection_QueryTunnelsResponse) New() protoreflect.Message { + return new(fastReflection_QueryTunnelsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitDKGRound1Response) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitDKGRound1Response)(x) +func (x *fastReflection_QueryTunnelsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryTunnelsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -636,7 +626,19 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitDKGRound1Response) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryTunnelsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Tunnels) != 0 { + value := protoreflect.ValueOfList(&_QueryTunnelsResponse_1_list{list: &x.Tunnels}) + if !f(fd_QueryTunnelsResponse_tunnels, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryTunnelsResponse_pagination, value) { + return + } + } } // Has reports whether a field is populated. @@ -650,13 +652,17 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) Range(f func(protoreflect.Fi // 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_MsgSubmitDKGRound1Response) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryTunnelsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + return len(x.Tunnels) != 0 + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) } } @@ -666,13 +672,17 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound1Response) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryTunnelsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + x.Tunnels = nil + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) } } @@ -682,13 +692,22 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) Clear(fd protoreflect.FieldD // 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_MsgSubmitDKGRound1Response) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + if len(x.Tunnels) == 0 { + return protoreflect.ValueOfList(&_QueryTunnelsResponse_1_list{}) + } + listValue := &_QueryTunnelsResponse_1_list{list: &x.Tunnels} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1Response does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", descriptor.FullName())) } } @@ -702,13 +721,19 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound1Response) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryTunnelsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + lv := value.List() + clv := lv.(*_QueryTunnelsResponse_1_list) + x.Tunnels = *clv.list + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) } } @@ -722,36 +747,53 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound1Response) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + if x.Tunnels == nil { + x.Tunnels = []*Tunnel{} + } + value := &_QueryTunnelsResponse_1_list{list: &x.Tunnels} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse 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_MsgSubmitDKGRound1Response) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + list := []*Tunnel{} + return protoreflect.ValueOfList(&_QueryTunnelsResponse_1_list{list: &list}) + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound1Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound1Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse 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_MsgSubmitDKGRound1Response) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryTunnelsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgSubmitDKGRound1Response", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelsResponse", d.FullName())) } panic("unreachable") } @@ -759,7 +801,7 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) WhichOneof(d protoreflect.On // 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_MsgSubmitDKGRound1Response) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryTunnelsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -770,7 +812,7 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound1Response) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryTunnelsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -782,7 +824,7 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) SetUnknown(fields protorefle // 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_MsgSubmitDKGRound1Response) IsValid() bool { +func (x *fastReflection_QueryTunnelsResponse) IsValid() bool { return x != nil } @@ -792,9 +834,9 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitDKGRound1Response) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryTunnelsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitDKGRound1Response) + x := input.Message.Interface().(*QueryTunnelsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -806,6 +848,16 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) ProtoMethods() *protoiface.M var n int var l int _ = l + if len(x.Tunnels) > 0 { + for _, e := range x.Tunnels { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -816,7 +868,7 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDKGRound1Response) + x := input.Message.Interface().(*QueryTunnelsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -835,6 +887,36 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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.Tunnels) > 0 { + for iNdEx := len(x.Tunnels) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Tunnels[iNdEx]) + 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 { @@ -846,7 +928,7 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDKGRound1Response) + x := input.Message.Interface().(*QueryTunnelsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -878,12 +960,82 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDKGRound1Response: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDKGRound1Response: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelsResponse: 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 Tunnels", 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 + } + x.Tunnels = append(x.Tunnels, &Tunnel{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tunnels[len(x.Tunnels)-1]); 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 Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -920,30 +1072,26 @@ func (x *fastReflection_MsgSubmitDKGRound1Response) ProtoMethods() *protoiface.M } var ( - md_MsgSubmitDKGRound2 protoreflect.MessageDescriptor - fd_MsgSubmitDKGRound2_group_id protoreflect.FieldDescriptor - fd_MsgSubmitDKGRound2_round2_info protoreflect.FieldDescriptor - fd_MsgSubmitDKGRound2_sender protoreflect.FieldDescriptor + md_QueryTunnelRequest protoreflect.MessageDescriptor + fd_QueryTunnelRequest_tunnel_id protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgSubmitDKGRound2 = File_tss_v1beta1_tx_proto.Messages().ByName("MsgSubmitDKGRound2") - fd_MsgSubmitDKGRound2_group_id = md_MsgSubmitDKGRound2.Fields().ByName("group_id") - fd_MsgSubmitDKGRound2_round2_info = md_MsgSubmitDKGRound2.Fields().ByName("round2_info") - fd_MsgSubmitDKGRound2_sender = md_MsgSubmitDKGRound2.Fields().ByName("sender") + file_tunnel_v1beta1_query_proto_init() + md_QueryTunnelRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelRequest") + fd_QueryTunnelRequest_tunnel_id = md_QueryTunnelRequest.Fields().ByName("tunnel_id") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitDKGRound2)(nil) +var _ protoreflect.Message = (*fastReflection_QueryTunnelRequest)(nil) -type fastReflection_MsgSubmitDKGRound2 MsgSubmitDKGRound2 +type fastReflection_QueryTunnelRequest QueryTunnelRequest -func (x *MsgSubmitDKGRound2) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitDKGRound2)(x) +func (x *QueryTunnelRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTunnelRequest)(x) } -func (x *MsgSubmitDKGRound2) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[2] +func (x *QueryTunnelRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -954,43 +1102,43 @@ func (x *MsgSubmitDKGRound2) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitDKGRound2_messageType fastReflection_MsgSubmitDKGRound2_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitDKGRound2_messageType{} +var _fastReflection_QueryTunnelRequest_messageType fastReflection_QueryTunnelRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryTunnelRequest_messageType{} -type fastReflection_MsgSubmitDKGRound2_messageType struct{} +type fastReflection_QueryTunnelRequest_messageType struct{} -func (x fastReflection_MsgSubmitDKGRound2_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitDKGRound2)(nil) +func (x fastReflection_QueryTunnelRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTunnelRequest)(nil) } -func (x fastReflection_MsgSubmitDKGRound2_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDKGRound2) +func (x fastReflection_QueryTunnelRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTunnelRequest) } -func (x fastReflection_MsgSubmitDKGRound2_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDKGRound2 +func (x fastReflection_QueryTunnelRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitDKGRound2) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDKGRound2 +func (x *fastReflection_QueryTunnelRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelRequest } // 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_MsgSubmitDKGRound2) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitDKGRound2_messageType +func (x *fastReflection_QueryTunnelRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryTunnelRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitDKGRound2) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDKGRound2) +func (x *fastReflection_QueryTunnelRequest) New() protoreflect.Message { + return new(fastReflection_QueryTunnelRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitDKGRound2) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitDKGRound2)(x) +func (x *fastReflection_QueryTunnelRequest) Interface() protoreflect.ProtoMessage { + return (*QueryTunnelRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -998,22 +1146,10 @@ func (x *fastReflection_MsgSubmitDKGRound2) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitDKGRound2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgSubmitDKGRound2_group_id, value) { - return - } - } - if x.Round2Info != nil { - value := protoreflect.ValueOfMessage(x.Round2Info.ProtoReflect()) - if !f(fd_MsgSubmitDKGRound2_round2_info, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgSubmitDKGRound2_sender, value) { +func (x *fastReflection_QueryTunnelRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryTunnelRequest_tunnel_id, value) { return } } @@ -1030,19 +1166,15 @@ func (x *fastReflection_MsgSubmitDKGRound2) Range(f func(protoreflect.FieldDescr // 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_MsgSubmitDKGRound2) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryTunnelRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound2.group_id": - return x.GroupId != uint64(0) - case "tss.v1beta1.MsgSubmitDKGRound2.round2_info": - return x.Round2Info != nil - case "tss.v1beta1.MsgSubmitDKGRound2.sender": - return x.Sender != "" + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + return x.TunnelId != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) } } @@ -1052,19 +1184,15 @@ func (x *fastReflection_MsgSubmitDKGRound2) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound2) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryTunnelRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound2.group_id": - x.GroupId = uint64(0) - case "tss.v1beta1.MsgSubmitDKGRound2.round2_info": - x.Round2Info = nil - case "tss.v1beta1.MsgSubmitDKGRound2.sender": - x.Sender = "" + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + x.TunnelId = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) } } @@ -1074,22 +1202,16 @@ func (x *fastReflection_MsgSubmitDKGRound2) Clear(fd protoreflect.FieldDescripto // 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_MsgSubmitDKGRound2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound2.group_id": - value := x.GroupId + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tss.v1beta1.MsgSubmitDKGRound2.round2_info": - value := x.Round2Info - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tss.v1beta1.MsgSubmitDKGRound2.sender": - value := x.Sender - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2 does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", descriptor.FullName())) } } @@ -1103,19 +1225,15 @@ func (x *fastReflection_MsgSubmitDKGRound2) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryTunnelRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound2.group_id": - x.GroupId = value.Uint() - case "tss.v1beta1.MsgSubmitDKGRound2.round2_info": - x.Round2Info = value.Message().Interface().(*Round2Info) - case "tss.v1beta1.MsgSubmitDKGRound2.sender": - x.Sender = value.Interface().(string) + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + x.TunnelId = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) } } @@ -1129,52 +1247,40 @@ func (x *fastReflection_MsgSubmitDKGRound2) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound2.round2_info": - if x.Round2Info == nil { - x.Round2Info = new(Round2Info) - } - return protoreflect.ValueOfMessage(x.Round2Info.ProtoReflect()) - case "tss.v1beta1.MsgSubmitDKGRound2.group_id": - panic(fmt.Errorf("field group_id of message tss.v1beta1.MsgSubmitDKGRound2 is not mutable")) - case "tss.v1beta1.MsgSubmitDKGRound2.sender": - panic(fmt.Errorf("field sender of message tss.v1beta1.MsgSubmitDKGRound2 is not mutable")) + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryTunnelRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest 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_MsgSubmitDKGRound2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDKGRound2.group_id": + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tss.v1beta1.MsgSubmitDKGRound2.round2_info": - m := new(Round2Info) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tss.v1beta1.MsgSubmitDKGRound2.sender": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest 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_MsgSubmitDKGRound2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryTunnelRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgSubmitDKGRound2", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelRequest", d.FullName())) } panic("unreachable") } @@ -1182,7 +1288,7 @@ func (x *fastReflection_MsgSubmitDKGRound2) WhichOneof(d protoreflect.OneofDescr // 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_MsgSubmitDKGRound2) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryTunnelRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1193,7 +1299,7 @@ func (x *fastReflection_MsgSubmitDKGRound2) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound2) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryTunnelRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1205,7 +1311,7 @@ func (x *fastReflection_MsgSubmitDKGRound2) SetUnknown(fields protoreflect.RawFi // 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_MsgSubmitDKGRound2) IsValid() bool { +func (x *fastReflection_QueryTunnelRequest) IsValid() bool { return x != nil } @@ -1215,9 +1321,9 @@ func (x *fastReflection_MsgSubmitDKGRound2) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitDKGRound2) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryTunnelRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitDKGRound2) + x := input.Message.Interface().(*QueryTunnelRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1229,16 +1335,8 @@ func (x *fastReflection_MsgSubmitDKGRound2) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - if x.Round2Info != nil { - l = options.Size(x.Round2Info) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -1250,7 +1348,7 @@ func (x *fastReflection_MsgSubmitDKGRound2) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDKGRound2) + x := input.Message.Interface().(*QueryTunnelRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1269,29 +1367,8 @@ func (x *fastReflection_MsgSubmitDKGRound2) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x1a - } - if x.Round2Info != nil { - encoded, err := options.Marshal(x.Round2Info) - 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 x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- dAtA[i] = 0x8 } @@ -1306,7 +1383,7 @@ func (x *fastReflection_MsgSubmitDKGRound2) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDKGRound2) + x := input.Message.Interface().(*QueryTunnelRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1338,36 +1415,17 @@ func (x *fastReflection_MsgSubmitDKGRound2) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDKGRound2: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDKGRound2: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 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.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Round2Info", wireType) - } - var msglen int + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1377,74 +1435,25 @@ func (x *fastReflection_MsgSubmitDKGRound2) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + x.TunnelId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Round2Info == nil { - x.Round2Info = &Round2Info{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Round2Info); 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 Sender", 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.Sender = 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]...) + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } @@ -1467,24 +1476,26 @@ func (x *fastReflection_MsgSubmitDKGRound2) ProtoMethods() *protoiface.Methods { } var ( - md_MsgSubmitDKGRound2Response protoreflect.MessageDescriptor + md_QueryTunnelResponse protoreflect.MessageDescriptor + fd_QueryTunnelResponse_tunnel protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgSubmitDKGRound2Response = File_tss_v1beta1_tx_proto.Messages().ByName("MsgSubmitDKGRound2Response") + file_tunnel_v1beta1_query_proto_init() + md_QueryTunnelResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelResponse") + fd_QueryTunnelResponse_tunnel = md_QueryTunnelResponse.Fields().ByName("tunnel") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitDKGRound2Response)(nil) +var _ protoreflect.Message = (*fastReflection_QueryTunnelResponse)(nil) -type fastReflection_MsgSubmitDKGRound2Response MsgSubmitDKGRound2Response +type fastReflection_QueryTunnelResponse QueryTunnelResponse -func (x *MsgSubmitDKGRound2Response) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitDKGRound2Response)(x) +func (x *QueryTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTunnelResponse)(x) } -func (x *MsgSubmitDKGRound2Response) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[3] +func (x *QueryTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1495,43 +1506,43 @@ func (x *MsgSubmitDKGRound2Response) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitDKGRound2Response_messageType fastReflection_MsgSubmitDKGRound2Response_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitDKGRound2Response_messageType{} +var _fastReflection_QueryTunnelResponse_messageType fastReflection_QueryTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryTunnelResponse_messageType{} -type fastReflection_MsgSubmitDKGRound2Response_messageType struct{} +type fastReflection_QueryTunnelResponse_messageType struct{} -func (x fastReflection_MsgSubmitDKGRound2Response_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitDKGRound2Response)(nil) +func (x fastReflection_QueryTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTunnelResponse)(nil) } -func (x fastReflection_MsgSubmitDKGRound2Response_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDKGRound2Response) +func (x fastReflection_QueryTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTunnelResponse) } -func (x fastReflection_MsgSubmitDKGRound2Response_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDKGRound2Response +func (x fastReflection_QueryTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitDKGRound2Response) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDKGRound2Response +func (x *fastReflection_QueryTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelResponse } // 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_MsgSubmitDKGRound2Response) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitDKGRound2Response_messageType +func (x *fastReflection_QueryTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitDKGRound2Response) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDKGRound2Response) +func (x *fastReflection_QueryTunnelResponse) New() protoreflect.Message { + return new(fastReflection_QueryTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitDKGRound2Response) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitDKGRound2Response)(x) +func (x *fastReflection_QueryTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*QueryTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1539,7 +1550,13 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitDKGRound2Response) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Tunnel != nil { + value := protoreflect.ValueOfMessage(x.Tunnel.ProtoReflect()) + if !f(fd_QueryTunnelResponse_tunnel, value) { + return + } + } } // Has reports whether a field is populated. @@ -1553,13 +1570,15 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) Range(f func(protoreflect.Fi // 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_MsgSubmitDKGRound2Response) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + return x.Tunnel != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1569,13 +1588,15 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound2Response) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + x.Tunnel = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1585,13 +1606,16 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) Clear(fd protoreflect.FieldD // 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_MsgSubmitDKGRound2Response) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + value := x.Tunnel + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2Response does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -1605,13 +1629,15 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound2Response) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + x.Tunnel = value.Message().Interface().(*Tunnel) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1625,36 +1651,44 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound2Response) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + if x.Tunnel == nil { + x.Tunnel = new(Tunnel) + } + return protoreflect.ValueOfMessage(x.Tunnel.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse 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_MsgSubmitDKGRound2Response) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + m := new(Tunnel) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDKGRound2Response")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDKGRound2Response does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse 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_MsgSubmitDKGRound2Response) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgSubmitDKGRound2Response", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelResponse", d.FullName())) } panic("unreachable") } @@ -1662,7 +1696,7 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) WhichOneof(d protoreflect.On // 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_MsgSubmitDKGRound2Response) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1673,7 +1707,7 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDKGRound2Response) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1685,7 +1719,7 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) SetUnknown(fields protorefle // 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_MsgSubmitDKGRound2Response) IsValid() bool { +func (x *fastReflection_QueryTunnelResponse) IsValid() bool { return x != nil } @@ -1695,9 +1729,9 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitDKGRound2Response) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitDKGRound2Response) + x := input.Message.Interface().(*QueryTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1709,6 +1743,10 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) ProtoMethods() *protoiface.M var n int var l int _ = l + if x.Tunnel != nil { + l = options.Size(x.Tunnel) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1719,7 +1757,7 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDKGRound2Response) + x := input.Message.Interface().(*QueryTunnelResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1738,6 +1776,20 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Tunnel != nil { + encoded, err := options.Marshal(x.Tunnel) + 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 { @@ -1749,7 +1801,7 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDKGRound2Response) + x := input.Message.Interface().(*QueryTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1781,12 +1833,48 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDKGRound2Response: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDKGRound2Response: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelResponse: 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 Tunnel", 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.Tunnel == nil { + x.Tunnel = &Tunnel{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tunnel); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1822,82 +1910,29 @@ func (x *fastReflection_MsgSubmitDKGRound2Response) ProtoMethods() *protoiface.M } } -var _ protoreflect.List = (*_MsgComplain_2_list)(nil) - -type _MsgComplain_2_list struct { - list *[]*Complaint -} - -func (x *_MsgComplain_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgComplain_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgComplain_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Complaint) - (*x.list)[i] = concreteValue -} - -func (x *_MsgComplain_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Complaint) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgComplain_2_list) AppendMutable() protoreflect.Value { - v := new(Complaint) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgComplain_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgComplain_2_list) NewElement() protoreflect.Value { - v := new(Complaint) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgComplain_2_list) IsValid() bool { - return x.list != nil -} - var ( - md_MsgComplain protoreflect.MessageDescriptor - fd_MsgComplain_group_id protoreflect.FieldDescriptor - fd_MsgComplain_complaints protoreflect.FieldDescriptor - fd_MsgComplain_sender protoreflect.FieldDescriptor + md_QueryDepositsRequest protoreflect.MessageDescriptor + fd_QueryDepositsRequest_tunnel_id protoreflect.FieldDescriptor + fd_QueryDepositsRequest_pagination protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgComplain = File_tss_v1beta1_tx_proto.Messages().ByName("MsgComplain") - fd_MsgComplain_group_id = md_MsgComplain.Fields().ByName("group_id") - fd_MsgComplain_complaints = md_MsgComplain.Fields().ByName("complaints") - fd_MsgComplain_sender = md_MsgComplain.Fields().ByName("sender") + file_tunnel_v1beta1_query_proto_init() + md_QueryDepositsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositsRequest") + fd_QueryDepositsRequest_tunnel_id = md_QueryDepositsRequest.Fields().ByName("tunnel_id") + fd_QueryDepositsRequest_pagination = md_QueryDepositsRequest.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_MsgComplain)(nil) +var _ protoreflect.Message = (*fastReflection_QueryDepositsRequest)(nil) -type fastReflection_MsgComplain MsgComplain +type fastReflection_QueryDepositsRequest QueryDepositsRequest -func (x *MsgComplain) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgComplain)(x) +func (x *QueryDepositsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDepositsRequest)(x) } -func (x *MsgComplain) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[4] +func (x *QueryDepositsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1908,43 +1943,43 @@ func (x *MsgComplain) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgComplain_messageType fastReflection_MsgComplain_messageType -var _ protoreflect.MessageType = fastReflection_MsgComplain_messageType{} +var _fastReflection_QueryDepositsRequest_messageType fastReflection_QueryDepositsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDepositsRequest_messageType{} -type fastReflection_MsgComplain_messageType struct{} +type fastReflection_QueryDepositsRequest_messageType struct{} -func (x fastReflection_MsgComplain_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgComplain)(nil) +func (x fastReflection_QueryDepositsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDepositsRequest)(nil) } -func (x fastReflection_MsgComplain_messageType) New() protoreflect.Message { - return new(fastReflection_MsgComplain) +func (x fastReflection_QueryDepositsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDepositsRequest) } -func (x fastReflection_MsgComplain_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgComplain +func (x fastReflection_QueryDepositsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgComplain) Descriptor() protoreflect.MessageDescriptor { - return md_MsgComplain +func (x *fastReflection_QueryDepositsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositsRequest } // 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_MsgComplain) Type() protoreflect.MessageType { - return _fastReflection_MsgComplain_messageType +func (x *fastReflection_QueryDepositsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDepositsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgComplain) New() protoreflect.Message { - return new(fastReflection_MsgComplain) +func (x *fastReflection_QueryDepositsRequest) New() protoreflect.Message { + return new(fastReflection_QueryDepositsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgComplain) Interface() protoreflect.ProtoMessage { - return (*MsgComplain)(x) +func (x *fastReflection_QueryDepositsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDepositsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -1952,22 +1987,16 @@ func (x *fastReflection_MsgComplain) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgComplain) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgComplain_group_id, value) { - return - } - } - if len(x.Complaints) != 0 { - value := protoreflect.ValueOfList(&_MsgComplain_2_list{list: &x.Complaints}) - if !f(fd_MsgComplain_complaints, value) { +func (x *fastReflection_QueryDepositsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryDepositsRequest_tunnel_id, value) { return } } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgComplain_sender, value) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryDepositsRequest_pagination, value) { return } } @@ -1984,19 +2013,17 @@ func (x *fastReflection_MsgComplain) Range(f func(protoreflect.FieldDescriptor, // 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_MsgComplain) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryDepositsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.MsgComplain.group_id": - return x.GroupId != uint64(0) - case "tss.v1beta1.MsgComplain.complaints": - return len(x.Complaints) != 0 - case "tss.v1beta1.MsgComplain.sender": - return x.Sender != "" + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplain")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplain does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) } } @@ -2006,19 +2033,17 @@ func (x *fastReflection_MsgComplain) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgComplain) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryDepositsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.MsgComplain.group_id": - x.GroupId = uint64(0) - case "tss.v1beta1.MsgComplain.complaints": - x.Complaints = nil - case "tss.v1beta1.MsgComplain.sender": - x.Sender = "" + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplain")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplain does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) } } @@ -2028,25 +2053,19 @@ func (x *fastReflection_MsgComplain) Clear(fd protoreflect.FieldDescriptor) { // 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_MsgComplain) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.MsgComplain.group_id": - value := x.GroupId + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tss.v1beta1.MsgComplain.complaints": - if len(x.Complaints) == 0 { - return protoreflect.ValueOfList(&_MsgComplain_2_list{}) - } - listValue := &_MsgComplain_2_list{list: &x.Complaints} - return protoreflect.ValueOfList(listValue) - case "tss.v1beta1.MsgComplain.sender": - value := x.Sender - return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplain")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplain does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", descriptor.FullName())) } } @@ -2060,21 +2079,17 @@ func (x *fastReflection_MsgComplain) Get(descriptor protoreflect.FieldDescriptor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgComplain) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryDepositsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.MsgComplain.group_id": - x.GroupId = value.Uint() - case "tss.v1beta1.MsgComplain.complaints": - lv := value.List() - clv := lv.(*_MsgComplain_2_list) - x.Complaints = *clv.list - case "tss.v1beta1.MsgComplain.sender": - x.Sender = value.Interface().(string) + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplain")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplain does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) } } @@ -2088,53 +2103,48 @@ func (x *fastReflection_MsgComplain) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgComplain) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgComplain.complaints": - if x.Complaints == nil { - x.Complaints = []*Complaint{} + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) } - value := &_MsgComplain_2_list{list: &x.Complaints} - return protoreflect.ValueOfList(value) - case "tss.v1beta1.MsgComplain.group_id": - panic(fmt.Errorf("field group_id of message tss.v1beta1.MsgComplain is not mutable")) - case "tss.v1beta1.MsgComplain.sender": - panic(fmt.Errorf("field sender of message tss.v1beta1.MsgComplain is not mutable")) + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryDepositsRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplain")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplain does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest 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_MsgComplain) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgComplain.group_id": + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tss.v1beta1.MsgComplain.complaints": - list := []*Complaint{} - return protoreflect.ValueOfList(&_MsgComplain_2_list{list: &list}) - case "tss.v1beta1.MsgComplain.sender": - return protoreflect.ValueOfString("") + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplain")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplain does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest 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_MsgComplain) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryDepositsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgComplain", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositsRequest", d.FullName())) } panic("unreachable") } @@ -2142,7 +2152,7 @@ func (x *fastReflection_MsgComplain) WhichOneof(d protoreflect.OneofDescriptor) // 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_MsgComplain) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryDepositsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2153,7 +2163,7 @@ func (x *fastReflection_MsgComplain) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgComplain) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryDepositsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2165,7 +2175,7 @@ func (x *fastReflection_MsgComplain) SetUnknown(fields protoreflect.RawFields) { // 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_MsgComplain) IsValid() bool { +func (x *fastReflection_QueryDepositsRequest) IsValid() bool { return x != nil } @@ -2175,9 +2185,9 @@ func (x *fastReflection_MsgComplain) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryDepositsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgComplain) + x := input.Message.Interface().(*QueryDepositsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2189,17 +2199,11 @@ func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - if len(x.Complaints) > 0 { - for _, e := range x.Complaints { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) } - l = len(x.Sender) - if l > 0 { + if x.Pagination != nil { + l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -2212,7 +2216,7 @@ func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgComplain) + x := input.Message.Interface().(*QueryDepositsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2231,31 +2235,22 @@ func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x1a - } - if len(x.Complaints) > 0 { - for iNdEx := len(x.Complaints) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Complaints[iNdEx]) - 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 x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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 x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- dAtA[i] = 0x8 } @@ -2270,7 +2265,7 @@ func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgComplain) + x := input.Message.Interface().(*QueryDepositsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2302,17 +2297,17 @@ func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgComplain: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgComplain: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - x.GroupId = 0 + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2322,14 +2317,14 @@ func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift + x.TunnelId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Complaints", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2356,42 +2351,12 @@ func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Complaints = append(x.Complaints, &Complaint{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Complaints[len(x.Complaints)-1]); 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 Sender", 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 x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - x.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2428,25 +2393,80 @@ func (x *fastReflection_MsgComplain) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_QueryDepositsResponse_1_list)(nil) + +type _QueryDepositsResponse_1_list struct { + list *[]*Deposit +} + +func (x *_QueryDepositsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryDepositsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryDepositsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Deposit) + (*x.list)[i] = concreteValue +} + +func (x *_QueryDepositsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Deposit) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryDepositsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Deposit) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDepositsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryDepositsResponse_1_list) NewElement() protoreflect.Value { + v := new(Deposit) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDepositsResponse_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_MsgComplainResponse protoreflect.MessageDescriptor + md_QueryDepositsResponse protoreflect.MessageDescriptor + fd_QueryDepositsResponse_deposits protoreflect.FieldDescriptor + fd_QueryDepositsResponse_pagination protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgComplainResponse = File_tss_v1beta1_tx_proto.Messages().ByName("MsgComplainResponse") + file_tunnel_v1beta1_query_proto_init() + md_QueryDepositsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositsResponse") + fd_QueryDepositsResponse_deposits = md_QueryDepositsResponse.Fields().ByName("deposits") + fd_QueryDepositsResponse_pagination = md_QueryDepositsResponse.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_MsgComplainResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryDepositsResponse)(nil) -type fastReflection_MsgComplainResponse MsgComplainResponse +type fastReflection_QueryDepositsResponse QueryDepositsResponse -func (x *MsgComplainResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgComplainResponse)(x) +func (x *QueryDepositsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDepositsResponse)(x) } -func (x *MsgComplainResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[5] +func (x *QueryDepositsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2457,43 +2477,43 @@ func (x *MsgComplainResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgComplainResponse_messageType fastReflection_MsgComplainResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgComplainResponse_messageType{} +var _fastReflection_QueryDepositsResponse_messageType fastReflection_QueryDepositsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDepositsResponse_messageType{} -type fastReflection_MsgComplainResponse_messageType struct{} +type fastReflection_QueryDepositsResponse_messageType struct{} -func (x fastReflection_MsgComplainResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgComplainResponse)(nil) +func (x fastReflection_QueryDepositsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDepositsResponse)(nil) } -func (x fastReflection_MsgComplainResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgComplainResponse) +func (x fastReflection_QueryDepositsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDepositsResponse) } -func (x fastReflection_MsgComplainResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgComplainResponse +func (x fastReflection_QueryDepositsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgComplainResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgComplainResponse +func (x *fastReflection_QueryDepositsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositsResponse } // 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_MsgComplainResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgComplainResponse_messageType +func (x *fastReflection_QueryDepositsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDepositsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgComplainResponse) New() protoreflect.Message { - return new(fastReflection_MsgComplainResponse) +func (x *fastReflection_QueryDepositsResponse) New() protoreflect.Message { + return new(fastReflection_QueryDepositsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgComplainResponse) Interface() protoreflect.ProtoMessage { - return (*MsgComplainResponse)(x) +func (x *fastReflection_QueryDepositsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDepositsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2501,7 +2521,19 @@ func (x *fastReflection_MsgComplainResponse) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgComplainResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryDepositsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Deposits) != 0 { + value := protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &x.Deposits}) + if !f(fd_QueryDepositsResponse_deposits, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryDepositsResponse_pagination, value) { + return + } + } } // Has reports whether a field is populated. @@ -2515,13 +2547,17 @@ func (x *fastReflection_MsgComplainResponse) Range(f func(protoreflect.FieldDesc // 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_MsgComplainResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryDepositsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + return len(x.Deposits) != 0 + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplainResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplainResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) } } @@ -2531,13 +2567,17 @@ func (x *fastReflection_MsgComplainResponse) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgComplainResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryDepositsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + x.Deposits = nil + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplainResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplainResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) } } @@ -2547,13 +2587,22 @@ func (x *fastReflection_MsgComplainResponse) Clear(fd protoreflect.FieldDescript // 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_MsgComplainResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + if len(x.Deposits) == 0 { + return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{}) + } + listValue := &_QueryDepositsResponse_1_list{list: &x.Deposits} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplainResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplainResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", descriptor.FullName())) } } @@ -2567,13 +2616,19 @@ func (x *fastReflection_MsgComplainResponse) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgComplainResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryDepositsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + lv := value.List() + clv := lv.(*_QueryDepositsResponse_1_list) + x.Deposits = *clv.list + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplainResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplainResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) } } @@ -2587,36 +2642,53 @@ func (x *fastReflection_MsgComplainResponse) Set(fd protoreflect.FieldDescriptor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgComplainResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + if x.Deposits == nil { + x.Deposits = []*Deposit{} + } + value := &_QueryDepositsResponse_1_list{list: &x.Deposits} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplainResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplainResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse 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_MsgComplainResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + list := []*Deposit{} + return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &list}) + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgComplainResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgComplainResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse 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_MsgComplainResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryDepositsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgComplainResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositsResponse", d.FullName())) } panic("unreachable") } @@ -2624,7 +2696,7 @@ func (x *fastReflection_MsgComplainResponse) WhichOneof(d protoreflect.OneofDesc // 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_MsgComplainResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryDepositsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2635,7 +2707,7 @@ func (x *fastReflection_MsgComplainResponse) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgComplainResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryDepositsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2647,7 +2719,7 @@ func (x *fastReflection_MsgComplainResponse) SetUnknown(fields protoreflect.RawF // 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_MsgComplainResponse) IsValid() bool { +func (x *fastReflection_QueryDepositsResponse) IsValid() bool { return x != nil } @@ -2657,9 +2729,9 @@ func (x *fastReflection_MsgComplainResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgComplainResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryDepositsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgComplainResponse) + x := input.Message.Interface().(*QueryDepositsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2671,6 +2743,16 @@ func (x *fastReflection_MsgComplainResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l + if len(x.Deposits) > 0 { + for _, e := range x.Deposits { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2681,7 +2763,7 @@ func (x *fastReflection_MsgComplainResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgComplainResponse) + x := input.Message.Interface().(*QueryDepositsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2700,18 +2782,48 @@ func (x *fastReflection_MsgComplainResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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.Deposits) > 0 { + for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Deposits[iNdEx]) + 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().(*MsgComplainResponse) + x := input.Message.Interface().(*QueryDepositsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2743,12 +2855,82 @@ func (x *fastReflection_MsgComplainResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgComplainResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgComplainResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsResponse: 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 Deposits", 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 + } + x.Deposits = append(x.Deposits, &Deposit{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposits[len(x.Deposits)-1]); 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 Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2785,32 +2967,28 @@ func (x *fastReflection_MsgComplainResponse) ProtoMethods() *protoiface.Methods } var ( - md_MsgConfirm protoreflect.MessageDescriptor - fd_MsgConfirm_group_id protoreflect.FieldDescriptor - fd_MsgConfirm_member_id protoreflect.FieldDescriptor - fd_MsgConfirm_own_pub_key_sig protoreflect.FieldDescriptor - fd_MsgConfirm_sender protoreflect.FieldDescriptor + md_QueryDepositRequest protoreflect.MessageDescriptor + fd_QueryDepositRequest_tunnel_id protoreflect.FieldDescriptor + fd_QueryDepositRequest_depositor protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgConfirm = File_tss_v1beta1_tx_proto.Messages().ByName("MsgConfirm") - fd_MsgConfirm_group_id = md_MsgConfirm.Fields().ByName("group_id") - fd_MsgConfirm_member_id = md_MsgConfirm.Fields().ByName("member_id") - fd_MsgConfirm_own_pub_key_sig = md_MsgConfirm.Fields().ByName("own_pub_key_sig") - fd_MsgConfirm_sender = md_MsgConfirm.Fields().ByName("sender") + file_tunnel_v1beta1_query_proto_init() + md_QueryDepositRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositRequest") + fd_QueryDepositRequest_tunnel_id = md_QueryDepositRequest.Fields().ByName("tunnel_id") + fd_QueryDepositRequest_depositor = md_QueryDepositRequest.Fields().ByName("depositor") } -var _ protoreflect.Message = (*fastReflection_MsgConfirm)(nil) +var _ protoreflect.Message = (*fastReflection_QueryDepositRequest)(nil) -type fastReflection_MsgConfirm MsgConfirm +type fastReflection_QueryDepositRequest QueryDepositRequest -func (x *MsgConfirm) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgConfirm)(x) +func (x *QueryDepositRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDepositRequest)(x) } -func (x *MsgConfirm) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[6] +func (x *QueryDepositRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2821,43 +2999,43 @@ func (x *MsgConfirm) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgConfirm_messageType fastReflection_MsgConfirm_messageType -var _ protoreflect.MessageType = fastReflection_MsgConfirm_messageType{} +var _fastReflection_QueryDepositRequest_messageType fastReflection_QueryDepositRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDepositRequest_messageType{} -type fastReflection_MsgConfirm_messageType struct{} +type fastReflection_QueryDepositRequest_messageType struct{} -func (x fastReflection_MsgConfirm_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgConfirm)(nil) +func (x fastReflection_QueryDepositRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDepositRequest)(nil) } -func (x fastReflection_MsgConfirm_messageType) New() protoreflect.Message { - return new(fastReflection_MsgConfirm) +func (x fastReflection_QueryDepositRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDepositRequest) } -func (x fastReflection_MsgConfirm_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgConfirm +func (x fastReflection_QueryDepositRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgConfirm) Descriptor() protoreflect.MessageDescriptor { - return md_MsgConfirm +func (x *fastReflection_QueryDepositRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositRequest } // 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_MsgConfirm) Type() protoreflect.MessageType { - return _fastReflection_MsgConfirm_messageType +func (x *fastReflection_QueryDepositRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDepositRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgConfirm) New() protoreflect.Message { - return new(fastReflection_MsgConfirm) +func (x *fastReflection_QueryDepositRequest) New() protoreflect.Message { + return new(fastReflection_QueryDepositRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgConfirm) Interface() protoreflect.ProtoMessage { - return (*MsgConfirm)(x) +func (x *fastReflection_QueryDepositRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDepositRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -2865,28 +3043,16 @@ func (x *fastReflection_MsgConfirm) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgConfirm) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgConfirm_group_id, value) { - return - } - } - if x.MemberId != uint64(0) { - value := protoreflect.ValueOfUint64(x.MemberId) - if !f(fd_MsgConfirm_member_id, value) { - return - } - } - if len(x.OwnPubKeySig) != 0 { - value := protoreflect.ValueOfBytes(x.OwnPubKeySig) - if !f(fd_MsgConfirm_own_pub_key_sig, value) { +func (x *fastReflection_QueryDepositRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryDepositRequest_tunnel_id, value) { return } } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgConfirm_sender, value) { + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_QueryDepositRequest_depositor, value) { return } } @@ -2903,21 +3069,17 @@ func (x *fastReflection_MsgConfirm) Range(f func(protoreflect.FieldDescriptor, p // 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_MsgConfirm) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryDepositRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.MsgConfirm.group_id": - return x.GroupId != uint64(0) - case "tss.v1beta1.MsgConfirm.member_id": - return x.MemberId != uint64(0) - case "tss.v1beta1.MsgConfirm.own_pub_key_sig": - return len(x.OwnPubKeySig) != 0 - case "tss.v1beta1.MsgConfirm.sender": - return x.Sender != "" + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.QueryDepositRequest.depositor": + return x.Depositor != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirm")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirm does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) } } @@ -2927,21 +3089,17 @@ func (x *fastReflection_MsgConfirm) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgConfirm) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryDepositRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.MsgConfirm.group_id": - x.GroupId = uint64(0) - case "tss.v1beta1.MsgConfirm.member_id": - x.MemberId = uint64(0) - case "tss.v1beta1.MsgConfirm.own_pub_key_sig": - x.OwnPubKeySig = nil - case "tss.v1beta1.MsgConfirm.sender": - x.Sender = "" + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.QueryDepositRequest.depositor": + x.Depositor = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirm")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirm does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) } } @@ -2951,25 +3109,19 @@ func (x *fastReflection_MsgConfirm) Clear(fd protoreflect.FieldDescriptor) { // 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_MsgConfirm) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.MsgConfirm.group_id": - value := x.GroupId + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tss.v1beta1.MsgConfirm.member_id": - value := x.MemberId - return protoreflect.ValueOfUint64(value) - case "tss.v1beta1.MsgConfirm.own_pub_key_sig": - value := x.OwnPubKeySig - return protoreflect.ValueOfBytes(value) - case "tss.v1beta1.MsgConfirm.sender": - value := x.Sender + case "tunnel.v1beta1.QueryDepositRequest.depositor": + value := x.Depositor return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirm")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirm does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", descriptor.FullName())) } } @@ -2983,21 +3135,17 @@ func (x *fastReflection_MsgConfirm) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgConfirm) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryDepositRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.MsgConfirm.group_id": - x.GroupId = value.Uint() - case "tss.v1beta1.MsgConfirm.member_id": - x.MemberId = value.Uint() - case "tss.v1beta1.MsgConfirm.own_pub_key_sig": - x.OwnPubKeySig = value.Bytes() - case "tss.v1beta1.MsgConfirm.sender": - x.Sender = value.Interface().(string) + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.QueryDepositRequest.depositor": + x.Depositor = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirm")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirm does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) } } @@ -3011,52 +3159,44 @@ func (x *fastReflection_MsgConfirm) Set(fd protoreflect.FieldDescriptor, value p // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgConfirm) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgConfirm.group_id": - panic(fmt.Errorf("field group_id of message tss.v1beta1.MsgConfirm is not mutable")) - case "tss.v1beta1.MsgConfirm.member_id": - panic(fmt.Errorf("field member_id of message tss.v1beta1.MsgConfirm is not mutable")) - case "tss.v1beta1.MsgConfirm.own_pub_key_sig": - panic(fmt.Errorf("field own_pub_key_sig of message tss.v1beta1.MsgConfirm is not mutable")) - case "tss.v1beta1.MsgConfirm.sender": - panic(fmt.Errorf("field sender of message tss.v1beta1.MsgConfirm is not mutable")) + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryDepositRequest is not mutable")) + case "tunnel.v1beta1.QueryDepositRequest.depositor": + panic(fmt.Errorf("field depositor of message tunnel.v1beta1.QueryDepositRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirm")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirm does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest 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_MsgConfirm) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgConfirm.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "tss.v1beta1.MsgConfirm.member_id": + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tss.v1beta1.MsgConfirm.own_pub_key_sig": - return protoreflect.ValueOfBytes(nil) - case "tss.v1beta1.MsgConfirm.sender": + case "tunnel.v1beta1.QueryDepositRequest.depositor": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirm")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirm does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest 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_MsgConfirm) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryDepositRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgConfirm", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositRequest", d.FullName())) } panic("unreachable") } @@ -3064,7 +3204,7 @@ func (x *fastReflection_MsgConfirm) WhichOneof(d protoreflect.OneofDescriptor) p // 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_MsgConfirm) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryDepositRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3075,7 +3215,7 @@ func (x *fastReflection_MsgConfirm) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgConfirm) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryDepositRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3087,7 +3227,7 @@ func (x *fastReflection_MsgConfirm) SetUnknown(fields protoreflect.RawFields) { // 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_MsgConfirm) IsValid() bool { +func (x *fastReflection_QueryDepositRequest) IsValid() bool { return x != nil } @@ -3097,9 +3237,9 @@ func (x *fastReflection_MsgConfirm) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryDepositRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgConfirm) + x := input.Message.Interface().(*QueryDepositRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3111,17 +3251,10 @@ func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - if x.MemberId != 0 { - n += 1 + runtime.Sov(uint64(x.MemberId)) - } - l = len(x.OwnPubKeySig) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) } - l = len(x.Sender) + l = len(x.Depositor) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3135,7 +3268,7 @@ func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgConfirm) + x := input.Message.Interface().(*QueryDepositRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3154,27 +3287,15 @@ func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x22 - } - if len(x.OwnPubKeySig) > 0 { - i -= len(x.OwnPubKeySig) - copy(dAtA[i:], x.OwnPubKeySig) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OwnPubKeySig))) + if len(x.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) i-- - dAtA[i] = 0x1a - } - if x.MemberId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MemberId)) - i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- dAtA[i] = 0x8 } @@ -3189,7 +3310,7 @@ func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgConfirm) + x := input.Message.Interface().(*QueryDepositRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3221,17 +3342,17 @@ func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgConfirm: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgConfirm: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - x.GroupId = 0 + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3241,67 +3362,14 @@ func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift + x.TunnelId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MemberId", wireType) - } - x.MemberId = 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.MemberId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OwnPubKeySig", wireType) - } - var byteLen 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++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - 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.OwnPubKeySig = append(x.OwnPubKeySig[:0], dAtA[iNdEx:postIndex]...) - if x.OwnPubKeySig == nil { - x.OwnPubKeySig = []byte{} - } - iNdEx = postIndex - case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3329,7 +3397,7 @@ func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Sender = string(dAtA[iNdEx:postIndex]) + x.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3367,24 +3435,26 @@ func (x *fastReflection_MsgConfirm) ProtoMethods() *protoiface.Methods { } var ( - md_MsgConfirmResponse protoreflect.MessageDescriptor + md_QueryDepositResponse protoreflect.MessageDescriptor + fd_QueryDepositResponse_deposit protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgConfirmResponse = File_tss_v1beta1_tx_proto.Messages().ByName("MsgConfirmResponse") + file_tunnel_v1beta1_query_proto_init() + md_QueryDepositResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositResponse") + fd_QueryDepositResponse_deposit = md_QueryDepositResponse.Fields().ByName("deposit") } -var _ protoreflect.Message = (*fastReflection_MsgConfirmResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryDepositResponse)(nil) -type fastReflection_MsgConfirmResponse MsgConfirmResponse +type fastReflection_QueryDepositResponse QueryDepositResponse -func (x *MsgConfirmResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgConfirmResponse)(x) +func (x *QueryDepositResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDepositResponse)(x) } -func (x *MsgConfirmResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[7] +func (x *QueryDepositResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3395,43 +3465,43 @@ func (x *MsgConfirmResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgConfirmResponse_messageType fastReflection_MsgConfirmResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgConfirmResponse_messageType{} +var _fastReflection_QueryDepositResponse_messageType fastReflection_QueryDepositResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDepositResponse_messageType{} -type fastReflection_MsgConfirmResponse_messageType struct{} +type fastReflection_QueryDepositResponse_messageType struct{} -func (x fastReflection_MsgConfirmResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgConfirmResponse)(nil) +func (x fastReflection_QueryDepositResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDepositResponse)(nil) } -func (x fastReflection_MsgConfirmResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgConfirmResponse) +func (x fastReflection_QueryDepositResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDepositResponse) } -func (x fastReflection_MsgConfirmResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgConfirmResponse +func (x fastReflection_QueryDepositResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgConfirmResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgConfirmResponse +func (x *fastReflection_QueryDepositResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositResponse } // 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_MsgConfirmResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgConfirmResponse_messageType +func (x *fastReflection_QueryDepositResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDepositResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgConfirmResponse) New() protoreflect.Message { - return new(fastReflection_MsgConfirmResponse) +func (x *fastReflection_QueryDepositResponse) New() protoreflect.Message { + return new(fastReflection_QueryDepositResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgConfirmResponse) Interface() protoreflect.ProtoMessage { - return (*MsgConfirmResponse)(x) +func (x *fastReflection_QueryDepositResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDepositResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3439,7 +3509,13 @@ func (x *fastReflection_MsgConfirmResponse) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgConfirmResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryDepositResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Deposit != nil { + value := protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) + if !f(fd_QueryDepositResponse_deposit, value) { + return + } + } } // Has reports whether a field is populated. @@ -3453,13 +3529,15 @@ func (x *fastReflection_MsgConfirmResponse) Range(f func(protoreflect.FieldDescr // 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_MsgConfirmResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryDepositResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + return x.Deposit != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirmResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirmResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) } } @@ -3469,13 +3547,15 @@ func (x *fastReflection_MsgConfirmResponse) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgConfirmResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryDepositResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + x.Deposit = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirmResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirmResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) } } @@ -3485,13 +3565,16 @@ func (x *fastReflection_MsgConfirmResponse) Clear(fd protoreflect.FieldDescripto // 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_MsgConfirmResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + value := x.Deposit + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirmResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirmResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", descriptor.FullName())) } } @@ -3505,13 +3588,15 @@ func (x *fastReflection_MsgConfirmResponse) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgConfirmResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryDepositResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + x.Deposit = value.Message().Interface().(*Deposit) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirmResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirmResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) } } @@ -3525,36 +3610,44 @@ func (x *fastReflection_MsgConfirmResponse) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgConfirmResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + if x.Deposit == nil { + x.Deposit = new(Deposit) + } + return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirmResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirmResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse 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_MsgConfirmResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryDepositResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + m := new(Deposit) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgConfirmResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgConfirmResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse 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_MsgConfirmResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryDepositResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgConfirmResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositResponse", d.FullName())) } panic("unreachable") } @@ -3562,7 +3655,7 @@ func (x *fastReflection_MsgConfirmResponse) WhichOneof(d protoreflect.OneofDescr // 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_MsgConfirmResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryDepositResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3573,7 +3666,7 @@ func (x *fastReflection_MsgConfirmResponse) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgConfirmResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryDepositResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3585,7 +3678,7 @@ func (x *fastReflection_MsgConfirmResponse) SetUnknown(fields protoreflect.RawFi // 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_MsgConfirmResponse) IsValid() bool { +func (x *fastReflection_QueryDepositResponse) IsValid() bool { return x != nil } @@ -3595,9 +3688,9 @@ func (x *fastReflection_MsgConfirmResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgConfirmResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryDepositResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgConfirmResponse) + x := input.Message.Interface().(*QueryDepositResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3609,6 +3702,10 @@ func (x *fastReflection_MsgConfirmResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + if x.Deposit != nil { + l = options.Size(x.Deposit) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3619,7 +3716,7 @@ func (x *fastReflection_MsgConfirmResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgConfirmResponse) + x := input.Message.Interface().(*QueryDepositResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3638,6 +3735,20 @@ func (x *fastReflection_MsgConfirmResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Deposit != nil { + encoded, err := options.Marshal(x.Deposit) + 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 { @@ -3649,7 +3760,7 @@ func (x *fastReflection_MsgConfirmResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgConfirmResponse) + x := input.Message.Interface().(*QueryDepositResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3681,12 +3792,48 @@ func (x *fastReflection_MsgConfirmResponse) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgConfirmResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgConfirmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositResponse: 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 Deposit", 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.Deposit == nil { + x.Deposit = &Deposit{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposit); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3722,80 +3869,29 @@ func (x *fastReflection_MsgConfirmResponse) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_MsgSubmitDEs_1_list)(nil) - -type _MsgSubmitDEs_1_list struct { - list *[]*DE -} - -func (x *_MsgSubmitDEs_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSubmitDEs_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgSubmitDEs_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DE) - (*x.list)[i] = concreteValue -} - -func (x *_MsgSubmitDEs_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DE) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSubmitDEs_1_list) AppendMutable() protoreflect.Value { - v := new(DE) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitDEs_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgSubmitDEs_1_list) NewElement() protoreflect.Value { - v := new(DE) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSubmitDEs_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_MsgSubmitDEs protoreflect.MessageDescriptor - fd_MsgSubmitDEs_des protoreflect.FieldDescriptor - fd_MsgSubmitDEs_sender protoreflect.FieldDescriptor + md_QueryPacketsRequest protoreflect.MessageDescriptor + fd_QueryPacketsRequest_tunnel_id protoreflect.FieldDescriptor + fd_QueryPacketsRequest_pagination protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgSubmitDEs = File_tss_v1beta1_tx_proto.Messages().ByName("MsgSubmitDEs") - fd_MsgSubmitDEs_des = md_MsgSubmitDEs.Fields().ByName("des") - fd_MsgSubmitDEs_sender = md_MsgSubmitDEs.Fields().ByName("sender") + file_tunnel_v1beta1_query_proto_init() + md_QueryPacketsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketsRequest") + fd_QueryPacketsRequest_tunnel_id = md_QueryPacketsRequest.Fields().ByName("tunnel_id") + fd_QueryPacketsRequest_pagination = md_QueryPacketsRequest.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitDEs)(nil) +var _ protoreflect.Message = (*fastReflection_QueryPacketsRequest)(nil) -type fastReflection_MsgSubmitDEs MsgSubmitDEs +type fastReflection_QueryPacketsRequest QueryPacketsRequest -func (x *MsgSubmitDEs) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitDEs)(x) +func (x *QueryPacketsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketsRequest)(x) } -func (x *MsgSubmitDEs) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[8] +func (x *QueryPacketsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3806,43 +3902,43 @@ func (x *MsgSubmitDEs) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitDEs_messageType fastReflection_MsgSubmitDEs_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitDEs_messageType{} +var _fastReflection_QueryPacketsRequest_messageType fastReflection_QueryPacketsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketsRequest_messageType{} -type fastReflection_MsgSubmitDEs_messageType struct{} +type fastReflection_QueryPacketsRequest_messageType struct{} -func (x fastReflection_MsgSubmitDEs_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitDEs)(nil) +func (x fastReflection_QueryPacketsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketsRequest)(nil) } -func (x fastReflection_MsgSubmitDEs_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDEs) +func (x fastReflection_QueryPacketsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketsRequest) } -func (x fastReflection_MsgSubmitDEs_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDEs +func (x fastReflection_QueryPacketsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitDEs) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDEs +func (x *fastReflection_QueryPacketsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketsRequest } // 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_MsgSubmitDEs) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitDEs_messageType +func (x *fastReflection_QueryPacketsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitDEs) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDEs) +func (x *fastReflection_QueryPacketsRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitDEs) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitDEs)(x) +func (x *fastReflection_QueryPacketsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -3850,16 +3946,16 @@ func (x *fastReflection_MsgSubmitDEs) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitDEs) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Des) != 0 { - value := protoreflect.ValueOfList(&_MsgSubmitDEs_1_list{list: &x.Des}) - if !f(fd_MsgSubmitDEs_des, value) { +func (x *fastReflection_QueryPacketsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryPacketsRequest_tunnel_id, value) { return } } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgSubmitDEs_sender, value) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryPacketsRequest_pagination, value) { return } } @@ -3876,17 +3972,17 @@ func (x *fastReflection_MsgSubmitDEs) Range(f func(protoreflect.FieldDescriptor, // 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_MsgSubmitDEs) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryPacketsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDEs.des": - return len(x.Des) != 0 - case "tss.v1beta1.MsgSubmitDEs.sender": - return x.Sender != "" + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEs")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEs does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) } } @@ -3896,17 +3992,17 @@ func (x *fastReflection_MsgSubmitDEs) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDEs) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryPacketsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDEs.des": - x.Des = nil - case "tss.v1beta1.MsgSubmitDEs.sender": - x.Sender = "" + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEs")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEs does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) } } @@ -3916,22 +4012,19 @@ func (x *fastReflection_MsgSubmitDEs) Clear(fd protoreflect.FieldDescriptor) { // 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_MsgSubmitDEs) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.MsgSubmitDEs.des": - if len(x.Des) == 0 { - return protoreflect.ValueOfList(&_MsgSubmitDEs_1_list{}) - } - listValue := &_MsgSubmitDEs_1_list{list: &x.Des} - return protoreflect.ValueOfList(listValue) - case "tss.v1beta1.MsgSubmitDEs.sender": - value := x.Sender - return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEs")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEs does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", descriptor.FullName())) } } @@ -3945,19 +4038,17 @@ func (x *fastReflection_MsgSubmitDEs) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDEs) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryPacketsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDEs.des": - lv := value.List() - clv := lv.(*_MsgSubmitDEs_1_list) - x.Des = *clv.list - case "tss.v1beta1.MsgSubmitDEs.sender": - x.Sender = value.Interface().(string) + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEs")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEs does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) } } @@ -3971,49 +4062,48 @@ func (x *fastReflection_MsgSubmitDEs) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDEs) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDEs.des": - if x.Des == nil { - x.Des = []*DE{} + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) } - value := &_MsgSubmitDEs_1_list{list: &x.Des} - return protoreflect.ValueOfList(value) - case "tss.v1beta1.MsgSubmitDEs.sender": - panic(fmt.Errorf("field sender of message tss.v1beta1.MsgSubmitDEs is not mutable")) + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryPacketsRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEs")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEs does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest 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_MsgSubmitDEs) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitDEs.des": - list := []*DE{} - return protoreflect.ValueOfList(&_MsgSubmitDEs_1_list{list: &list}) - case "tss.v1beta1.MsgSubmitDEs.sender": - return protoreflect.ValueOfString("") + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEs")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEs does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest 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_MsgSubmitDEs) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryPacketsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgSubmitDEs", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketsRequest", d.FullName())) } panic("unreachable") } @@ -4021,7 +4111,7 @@ func (x *fastReflection_MsgSubmitDEs) WhichOneof(d protoreflect.OneofDescriptor) // 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_MsgSubmitDEs) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryPacketsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4032,7 +4122,7 @@ func (x *fastReflection_MsgSubmitDEs) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDEs) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryPacketsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4044,7 +4134,7 @@ func (x *fastReflection_MsgSubmitDEs) SetUnknown(fields protoreflect.RawFields) // 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_MsgSubmitDEs) IsValid() bool { +func (x *fastReflection_QueryPacketsRequest) IsValid() bool { return x != nil } @@ -4054,9 +4144,9 @@ func (x *fastReflection_MsgSubmitDEs) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryPacketsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitDEs) + x := input.Message.Interface().(*QueryPacketsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4068,14 +4158,11 @@ func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if len(x.Des) > 0 { - for _, e := range x.Des { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) } - l = len(x.Sender) - if l > 0 { + if x.Pagination != nil { + l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -4088,7 +4175,7 @@ func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDEs) + x := input.Message.Interface().(*QueryPacketsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4107,28 +4194,24 @@ func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(x.Des) > 0 { - for iNdEx := len(x.Des) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Des[iNdEx]) - 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 x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -4141,7 +4224,7 @@ func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDEs) + x := input.Message.Interface().(*QueryPacketsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4173,17 +4256,17 @@ func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDEs: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDEs: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketsRequest: 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 Des", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - var msglen int + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4193,31 +4276,16 @@ func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + x.TunnelId |= uint64(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 - } - x.Des = append(x.Des, &DE{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Des[len(x.Des)-1]); 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 Sender", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4227,23 +4295,27 @@ func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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 } - x.Sender = string(dAtA[iNdEx:postIndex]) + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -4280,25 +4352,80 @@ func (x *fastReflection_MsgSubmitDEs) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_QueryPacketsResponse_1_list)(nil) + +type _QueryPacketsResponse_1_list struct { + list *[]*Packet +} + +func (x *_QueryPacketsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryPacketsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryPacketsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Packet) + (*x.list)[i] = concreteValue +} + +func (x *_QueryPacketsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Packet) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryPacketsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Packet) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPacketsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryPacketsResponse_1_list) NewElement() protoreflect.Value { + v := new(Packet) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPacketsResponse_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_MsgSubmitDEsResponse protoreflect.MessageDescriptor + md_QueryPacketsResponse protoreflect.MessageDescriptor + fd_QueryPacketsResponse_packets protoreflect.FieldDescriptor + fd_QueryPacketsResponse_pagination protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgSubmitDEsResponse = File_tss_v1beta1_tx_proto.Messages().ByName("MsgSubmitDEsResponse") + file_tunnel_v1beta1_query_proto_init() + md_QueryPacketsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketsResponse") + fd_QueryPacketsResponse_packets = md_QueryPacketsResponse.Fields().ByName("packets") + fd_QueryPacketsResponse_pagination = md_QueryPacketsResponse.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitDEsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryPacketsResponse)(nil) -type fastReflection_MsgSubmitDEsResponse MsgSubmitDEsResponse +type fastReflection_QueryPacketsResponse QueryPacketsResponse -func (x *MsgSubmitDEsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitDEsResponse)(x) +func (x *QueryPacketsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketsResponse)(x) } -func (x *MsgSubmitDEsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[9] +func (x *QueryPacketsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4309,43 +4436,43 @@ func (x *MsgSubmitDEsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitDEsResponse_messageType fastReflection_MsgSubmitDEsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitDEsResponse_messageType{} +var _fastReflection_QueryPacketsResponse_messageType fastReflection_QueryPacketsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketsResponse_messageType{} -type fastReflection_MsgSubmitDEsResponse_messageType struct{} +type fastReflection_QueryPacketsResponse_messageType struct{} -func (x fastReflection_MsgSubmitDEsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitDEsResponse)(nil) +func (x fastReflection_QueryPacketsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketsResponse)(nil) } -func (x fastReflection_MsgSubmitDEsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDEsResponse) +func (x fastReflection_QueryPacketsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketsResponse) } -func (x fastReflection_MsgSubmitDEsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDEsResponse +func (x fastReflection_QueryPacketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitDEsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitDEsResponse +func (x *fastReflection_QueryPacketsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketsResponse } // 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_MsgSubmitDEsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitDEsResponse_messageType +func (x *fastReflection_QueryPacketsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitDEsResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitDEsResponse) +func (x *fastReflection_QueryPacketsResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitDEsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitDEsResponse)(x) +func (x *fastReflection_QueryPacketsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -4353,7 +4480,19 @@ func (x *fastReflection_MsgSubmitDEsResponse) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitDEsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryPacketsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Packets) != 0 { + value := protoreflect.ValueOfList(&_QueryPacketsResponse_1_list{list: &x.Packets}) + if !f(fd_QueryPacketsResponse_packets, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryPacketsResponse_pagination, value) { + return + } + } } // Has reports whether a field is populated. @@ -4367,13 +4506,17 @@ func (x *fastReflection_MsgSubmitDEsResponse) Range(f func(protoreflect.FieldDes // 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_MsgSubmitDEsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryPacketsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + return len(x.Packets) != 0 + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) } } @@ -4383,13 +4526,17 @@ func (x *fastReflection_MsgSubmitDEsResponse) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDEsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryPacketsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + x.Packets = nil + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) } } @@ -4399,13 +4546,22 @@ func (x *fastReflection_MsgSubmitDEsResponse) Clear(fd protoreflect.FieldDescrip // 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_MsgSubmitDEsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + if len(x.Packets) == 0 { + return protoreflect.ValueOfList(&_QueryPacketsResponse_1_list{}) + } + listValue := &_QueryPacketsResponse_1_list{list: &x.Packets} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", descriptor.FullName())) } } @@ -4419,13 +4575,19 @@ func (x *fastReflection_MsgSubmitDEsResponse) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDEsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryPacketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + lv := value.List() + clv := lv.(*_QueryPacketsResponse_1_list) + x.Packets = *clv.list + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) } } @@ -4439,36 +4601,53 @@ func (x *fastReflection_MsgSubmitDEsResponse) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDEsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + if x.Packets == nil { + x.Packets = []*Packet{} + } + value := &_QueryPacketsResponse_1_list{list: &x.Packets} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse 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_MsgSubmitDEsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + list := []*Packet{} + return protoreflect.ValueOfList(&_QueryPacketsResponse_1_list{list: &list}) + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitDEsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitDEsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse 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_MsgSubmitDEsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryPacketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgSubmitDEsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketsResponse", d.FullName())) } panic("unreachable") } @@ -4476,7 +4655,7 @@ func (x *fastReflection_MsgSubmitDEsResponse) WhichOneof(d protoreflect.OneofDes // 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_MsgSubmitDEsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryPacketsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4487,7 +4666,7 @@ func (x *fastReflection_MsgSubmitDEsResponse) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitDEsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryPacketsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4499,7 +4678,7 @@ func (x *fastReflection_MsgSubmitDEsResponse) SetUnknown(fields protoreflect.Raw // 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_MsgSubmitDEsResponse) IsValid() bool { +func (x *fastReflection_QueryPacketsResponse) IsValid() bool { return x != nil } @@ -4509,9 +4688,9 @@ func (x *fastReflection_MsgSubmitDEsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitDEsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryPacketsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitDEsResponse) + x := input.Message.Interface().(*QueryPacketsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4523,6 +4702,16 @@ func (x *fastReflection_MsgSubmitDEsResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l + if len(x.Packets) > 0 { + for _, e := range x.Packets { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4533,7 +4722,7 @@ func (x *fastReflection_MsgSubmitDEsResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDEsResponse) + x := input.Message.Interface().(*QueryPacketsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4552,6 +4741,36 @@ func (x *fastReflection_MsgSubmitDEsResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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.Packets) > 0 { + for iNdEx := len(x.Packets) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Packets[iNdEx]) + 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 { @@ -4563,7 +4782,7 @@ func (x *fastReflection_MsgSubmitDEsResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitDEsResponse) + x := input.Message.Interface().(*QueryPacketsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4595,12 +4814,82 @@ func (x *fastReflection_MsgSubmitDEsResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDEsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitDEsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketsResponse: 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 Packets", 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 + } + x.Packets = append(x.Packets, &Packet{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Packets[len(x.Packets)-1]); 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 Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4637,32 +4926,28 @@ func (x *fastReflection_MsgSubmitDEsResponse) ProtoMethods() *protoiface.Methods } var ( - md_MsgSubmitSignature protoreflect.MessageDescriptor - fd_MsgSubmitSignature_signing_id protoreflect.FieldDescriptor - fd_MsgSubmitSignature_member_id protoreflect.FieldDescriptor - fd_MsgSubmitSignature_signature protoreflect.FieldDescriptor - fd_MsgSubmitSignature_signer protoreflect.FieldDescriptor + md_QueryPacketRequest protoreflect.MessageDescriptor + fd_QueryPacketRequest_tunnel_id protoreflect.FieldDescriptor + fd_QueryPacketRequest_sequence protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgSubmitSignature = File_tss_v1beta1_tx_proto.Messages().ByName("MsgSubmitSignature") - fd_MsgSubmitSignature_signing_id = md_MsgSubmitSignature.Fields().ByName("signing_id") - fd_MsgSubmitSignature_member_id = md_MsgSubmitSignature.Fields().ByName("member_id") - fd_MsgSubmitSignature_signature = md_MsgSubmitSignature.Fields().ByName("signature") - fd_MsgSubmitSignature_signer = md_MsgSubmitSignature.Fields().ByName("signer") + file_tunnel_v1beta1_query_proto_init() + md_QueryPacketRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketRequest") + fd_QueryPacketRequest_tunnel_id = md_QueryPacketRequest.Fields().ByName("tunnel_id") + fd_QueryPacketRequest_sequence = md_QueryPacketRequest.Fields().ByName("sequence") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitSignature)(nil) +var _ protoreflect.Message = (*fastReflection_QueryPacketRequest)(nil) -type fastReflection_MsgSubmitSignature MsgSubmitSignature +type fastReflection_QueryPacketRequest QueryPacketRequest -func (x *MsgSubmitSignature) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitSignature)(x) +func (x *QueryPacketRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketRequest)(x) } -func (x *MsgSubmitSignature) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[10] +func (x *QueryPacketRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4673,43 +4958,43 @@ func (x *MsgSubmitSignature) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitSignature_messageType fastReflection_MsgSubmitSignature_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitSignature_messageType{} +var _fastReflection_QueryPacketRequest_messageType fastReflection_QueryPacketRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketRequest_messageType{} -type fastReflection_MsgSubmitSignature_messageType struct{} +type fastReflection_QueryPacketRequest_messageType struct{} -func (x fastReflection_MsgSubmitSignature_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitSignature)(nil) +func (x fastReflection_QueryPacketRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketRequest)(nil) } -func (x fastReflection_MsgSubmitSignature_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitSignature) +func (x fastReflection_QueryPacketRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketRequest) } -func (x fastReflection_MsgSubmitSignature_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitSignature +func (x fastReflection_QueryPacketRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitSignature) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitSignature +func (x *fastReflection_QueryPacketRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketRequest } // 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_MsgSubmitSignature) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitSignature_messageType +func (x *fastReflection_QueryPacketRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitSignature) New() protoreflect.Message { - return new(fastReflection_MsgSubmitSignature) +func (x *fastReflection_QueryPacketRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitSignature) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitSignature)(x) +func (x *fastReflection_QueryPacketRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -4717,28 +5002,16 @@ func (x *fastReflection_MsgSubmitSignature) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitSignature) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SigningId != uint64(0) { - value := protoreflect.ValueOfUint64(x.SigningId) - if !f(fd_MsgSubmitSignature_signing_id, value) { - return - } - } - if x.MemberId != uint64(0) { - value := protoreflect.ValueOfUint64(x.MemberId) - if !f(fd_MsgSubmitSignature_member_id, value) { - return - } - } - if len(x.Signature) != 0 { - value := protoreflect.ValueOfBytes(x.Signature) - if !f(fd_MsgSubmitSignature_signature, value) { +func (x *fastReflection_QueryPacketRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryPacketRequest_tunnel_id, value) { return } } - if x.Signer != "" { - value := protoreflect.ValueOfString(x.Signer) - if !f(fd_MsgSubmitSignature_signer, value) { + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_QueryPacketRequest_sequence, value) { return } } @@ -4755,21 +5028,17 @@ func (x *fastReflection_MsgSubmitSignature) Range(f func(protoreflect.FieldDescr // 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_MsgSubmitSignature) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryPacketRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitSignature.signing_id": - return x.SigningId != uint64(0) - case "tss.v1beta1.MsgSubmitSignature.member_id": - return x.MemberId != uint64(0) - case "tss.v1beta1.MsgSubmitSignature.signature": - return len(x.Signature) != 0 - case "tss.v1beta1.MsgSubmitSignature.signer": - return x.Signer != "" + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.QueryPacketRequest.sequence": + return x.Sequence != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignature")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignature does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) } } @@ -4779,21 +5048,17 @@ func (x *fastReflection_MsgSubmitSignature) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignature) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryPacketRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitSignature.signing_id": - x.SigningId = uint64(0) - case "tss.v1beta1.MsgSubmitSignature.member_id": - x.MemberId = uint64(0) - case "tss.v1beta1.MsgSubmitSignature.signature": - x.Signature = nil - case "tss.v1beta1.MsgSubmitSignature.signer": - x.Signer = "" + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.QueryPacketRequest.sequence": + x.Sequence = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignature")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignature does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) } } @@ -4803,25 +5068,19 @@ func (x *fastReflection_MsgSubmitSignature) Clear(fd protoreflect.FieldDescripto // 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_MsgSubmitSignature) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.MsgSubmitSignature.signing_id": - value := x.SigningId + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tss.v1beta1.MsgSubmitSignature.member_id": - value := x.MemberId + case "tunnel.v1beta1.QueryPacketRequest.sequence": + value := x.Sequence return protoreflect.ValueOfUint64(value) - case "tss.v1beta1.MsgSubmitSignature.signature": - value := x.Signature - return protoreflect.ValueOfBytes(value) - case "tss.v1beta1.MsgSubmitSignature.signer": - value := x.Signer - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignature")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignature does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", descriptor.FullName())) } } @@ -4835,21 +5094,17 @@ func (x *fastReflection_MsgSubmitSignature) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignature) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryPacketRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitSignature.signing_id": - x.SigningId = value.Uint() - case "tss.v1beta1.MsgSubmitSignature.member_id": - x.MemberId = value.Uint() - case "tss.v1beta1.MsgSubmitSignature.signature": - x.Signature = value.Bytes() - case "tss.v1beta1.MsgSubmitSignature.signer": - x.Signer = value.Interface().(string) + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.QueryPacketRequest.sequence": + x.Sequence = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignature")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignature does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) } } @@ -4863,52 +5118,44 @@ func (x *fastReflection_MsgSubmitSignature) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignature) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitSignature.signing_id": - panic(fmt.Errorf("field signing_id of message tss.v1beta1.MsgSubmitSignature is not mutable")) - case "tss.v1beta1.MsgSubmitSignature.member_id": - panic(fmt.Errorf("field member_id of message tss.v1beta1.MsgSubmitSignature is not mutable")) - case "tss.v1beta1.MsgSubmitSignature.signature": - panic(fmt.Errorf("field signature of message tss.v1beta1.MsgSubmitSignature is not mutable")) - case "tss.v1beta1.MsgSubmitSignature.signer": - panic(fmt.Errorf("field signer of message tss.v1beta1.MsgSubmitSignature is not mutable")) + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryPacketRequest is not mutable")) + case "tunnel.v1beta1.QueryPacketRequest.sequence": + panic(fmt.Errorf("field sequence of message tunnel.v1beta1.QueryPacketRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignature")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignature does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest 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_MsgSubmitSignature) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgSubmitSignature.signing_id": + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tss.v1beta1.MsgSubmitSignature.member_id": + case "tunnel.v1beta1.QueryPacketRequest.sequence": return protoreflect.ValueOfUint64(uint64(0)) - case "tss.v1beta1.MsgSubmitSignature.signature": - return protoreflect.ValueOfBytes(nil) - case "tss.v1beta1.MsgSubmitSignature.signer": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignature")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignature does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest 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_MsgSubmitSignature) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryPacketRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgSubmitSignature", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketRequest", d.FullName())) } panic("unreachable") } @@ -4916,7 +5163,7 @@ func (x *fastReflection_MsgSubmitSignature) WhichOneof(d protoreflect.OneofDescr // 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_MsgSubmitSignature) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryPacketRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4927,7 +5174,7 @@ func (x *fastReflection_MsgSubmitSignature) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignature) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryPacketRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4939,7 +5186,7 @@ func (x *fastReflection_MsgSubmitSignature) SetUnknown(fields protoreflect.RawFi // 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_MsgSubmitSignature) IsValid() bool { +func (x *fastReflection_QueryPacketRequest) IsValid() bool { return x != nil } @@ -4949,9 +5196,9 @@ func (x *fastReflection_MsgSubmitSignature) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryPacketRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitSignature) + x := input.Message.Interface().(*QueryPacketRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4963,19 +5210,11 @@ func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.SigningId != 0 { - n += 1 + runtime.Sov(uint64(x.SigningId)) - } - if x.MemberId != 0 { - n += 1 + runtime.Sov(uint64(x.MemberId)) - } - l = len(x.Signature) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) } - l = len(x.Signer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -4987,7 +5226,7 @@ func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitSignature) + x := input.Message.Interface().(*QueryPacketRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5006,27 +5245,13 @@ func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Signer) > 0 { - i -= len(x.Signer) - copy(dAtA[i:], x.Signer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) - i-- - dAtA[i] = 0x22 - } - if len(x.Signature) > 0 { - i -= len(x.Signature) - copy(dAtA[i:], x.Signature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) - i-- - dAtA[i] = 0x1a - } - if x.MemberId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MemberId)) + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) i-- dAtA[i] = 0x10 } - if x.SigningId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SigningId)) + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- dAtA[i] = 0x8 } @@ -5041,7 +5266,7 @@ func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitSignature) + x := input.Message.Interface().(*QueryPacketRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5073,17 +5298,17 @@ func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitSignature: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitSignature: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigningId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - x.SigningId = 0 + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5093,35 +5318,16 @@ func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.SigningId |= uint64(b&0x7F) << shift + x.TunnelId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MemberId", wireType) - } - x.MemberId = 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.MemberId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) } - var byteLen int + x.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5131,72 +5337,25 @@ func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + x.Sequence |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - postIndex := iNdEx + byteLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Signature = append(x.Signature[:0], dAtA[iNdEx:postIndex]...) - if x.Signature == nil { - x.Signature = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = 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]...) + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } @@ -5219,24 +5378,26 @@ func (x *fastReflection_MsgSubmitSignature) ProtoMethods() *protoiface.Methods { } var ( - md_MsgSubmitSignatureResponse protoreflect.MessageDescriptor + md_QueryPacketResponse protoreflect.MessageDescriptor + fd_QueryPacketResponse_packet protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgSubmitSignatureResponse = File_tss_v1beta1_tx_proto.Messages().ByName("MsgSubmitSignatureResponse") + file_tunnel_v1beta1_query_proto_init() + md_QueryPacketResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketResponse") + fd_QueryPacketResponse_packet = md_QueryPacketResponse.Fields().ByName("packet") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitSignatureResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryPacketResponse)(nil) -type fastReflection_MsgSubmitSignatureResponse MsgSubmitSignatureResponse +type fastReflection_QueryPacketResponse QueryPacketResponse -func (x *MsgSubmitSignatureResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitSignatureResponse)(x) +func (x *QueryPacketResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketResponse)(x) } -func (x *MsgSubmitSignatureResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[11] +func (x *QueryPacketResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5247,43 +5408,43 @@ func (x *MsgSubmitSignatureResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitSignatureResponse_messageType fastReflection_MsgSubmitSignatureResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitSignatureResponse_messageType{} +var _fastReflection_QueryPacketResponse_messageType fastReflection_QueryPacketResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketResponse_messageType{} -type fastReflection_MsgSubmitSignatureResponse_messageType struct{} +type fastReflection_QueryPacketResponse_messageType struct{} -func (x fastReflection_MsgSubmitSignatureResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitSignatureResponse)(nil) +func (x fastReflection_QueryPacketResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketResponse)(nil) } -func (x fastReflection_MsgSubmitSignatureResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitSignatureResponse) +func (x fastReflection_QueryPacketResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketResponse) } -func (x fastReflection_MsgSubmitSignatureResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitSignatureResponse +func (x fastReflection_QueryPacketResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitSignatureResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitSignatureResponse +func (x *fastReflection_QueryPacketResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketResponse } // 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_MsgSubmitSignatureResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitSignatureResponse_messageType +func (x *fastReflection_QueryPacketResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitSignatureResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitSignatureResponse) +func (x *fastReflection_QueryPacketResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitSignatureResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitSignatureResponse)(x) +func (x *fastReflection_QueryPacketResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -5291,7 +5452,13 @@ func (x *fastReflection_MsgSubmitSignatureResponse) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitSignatureResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryPacketResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Packet != nil { + value := protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) + if !f(fd_QueryPacketResponse_packet, value) { + return + } + } } // Has reports whether a field is populated. @@ -5305,13 +5472,15 @@ func (x *fastReflection_MsgSubmitSignatureResponse) Range(f func(protoreflect.Fi // 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_MsgSubmitSignatureResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryPacketResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + return x.Packet != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignatureResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignatureResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) } } @@ -5321,13 +5490,15 @@ func (x *fastReflection_MsgSubmitSignatureResponse) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignatureResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryPacketResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + x.Packet = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignatureResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignatureResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) } } @@ -5337,13 +5508,16 @@ func (x *fastReflection_MsgSubmitSignatureResponse) Clear(fd protoreflect.FieldD // 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_MsgSubmitSignatureResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + value := x.Packet + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignatureResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignatureResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", descriptor.FullName())) } } @@ -5357,13 +5531,15 @@ func (x *fastReflection_MsgSubmitSignatureResponse) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignatureResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryPacketResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + x.Packet = value.Message().Interface().(*Packet) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignatureResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignatureResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) } } @@ -5377,36 +5553,44 @@ func (x *fastReflection_MsgSubmitSignatureResponse) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignatureResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + if x.Packet == nil { + x.Packet = new(Packet) + } + return protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignatureResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignatureResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse 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_MsgSubmitSignatureResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryPacketResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + m := new(Packet) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgSubmitSignatureResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgSubmitSignatureResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse 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_MsgSubmitSignatureResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryPacketResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgSubmitSignatureResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketResponse", d.FullName())) } panic("unreachable") } @@ -5414,7 +5598,7 @@ func (x *fastReflection_MsgSubmitSignatureResponse) WhichOneof(d protoreflect.On // 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_MsgSubmitSignatureResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryPacketResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5425,7 +5609,7 @@ func (x *fastReflection_MsgSubmitSignatureResponse) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignatureResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryPacketResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5437,7 +5621,7 @@ func (x *fastReflection_MsgSubmitSignatureResponse) SetUnknown(fields protorefle // 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_MsgSubmitSignatureResponse) IsValid() bool { +func (x *fastReflection_QueryPacketResponse) IsValid() bool { return x != nil } @@ -5447,9 +5631,9 @@ func (x *fastReflection_MsgSubmitSignatureResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitSignatureResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryPacketResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitSignatureResponse) + x := input.Message.Interface().(*QueryPacketResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5461,6 +5645,10 @@ func (x *fastReflection_MsgSubmitSignatureResponse) ProtoMethods() *protoiface.M var n int var l int _ = l + if x.Packet != nil { + l = options.Size(x.Packet) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5471,7 +5659,7 @@ func (x *fastReflection_MsgSubmitSignatureResponse) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitSignatureResponse) + x := input.Message.Interface().(*QueryPacketResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5490,6 +5678,20 @@ func (x *fastReflection_MsgSubmitSignatureResponse) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Packet != nil { + encoded, err := options.Marshal(x.Packet) + 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 { @@ -5501,7 +5703,7 @@ func (x *fastReflection_MsgSubmitSignatureResponse) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitSignatureResponse) + x := input.Message.Interface().(*QueryPacketResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5533,12 +5735,48 @@ func (x *fastReflection_MsgSubmitSignatureResponse) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitSignatureResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitSignatureResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketResponse: 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 Packet", 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.Packet == nil { + x.Packet = &Packet{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Packet); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5575,28 +5813,24 @@ func (x *fastReflection_MsgSubmitSignatureResponse) ProtoMethods() *protoiface.M } var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_params protoreflect.FieldDescriptor - fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + md_QueryParamsRequest protoreflect.MessageDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgUpdateParams = File_tss_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") - fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") - fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + file_tunnel_v1beta1_query_proto_init() + md_QueryParamsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") } -var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) -type fastReflection_MsgUpdateParams MsgUpdateParams +type fastReflection_QueryParamsRequest QueryParamsRequest -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) } -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[12] +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5607,43 +5841,43 @@ func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} +var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} -type fastReflection_MsgUpdateParams_messageType struct{} +type fastReflection_QueryParamsRequest_messageType struct{} -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) } -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) } -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest } // 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_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType +func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(x) +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -5651,19 +5885,7 @@ func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateParams_params, value) { - return - } - } - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateParams_authority, value) { - return - } - } +func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -5677,17 +5899,13 @@ func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescript // 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_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.MsgUpdateParams.params": - return x.Params != nil - case "tss.v1beta1.MsgUpdateParams.authority": - return x.Authority != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -5697,17 +5915,13 @@ func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.MsgUpdateParams.params": - x.Params = nil - case "tss.v1beta1.MsgUpdateParams.authority": - x.Authority = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -5717,19 +5931,13 @@ func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) // 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_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tss.v1beta1.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParams does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", descriptor.FullName())) } } @@ -5743,17 +5951,13 @@ func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - case "tss.v1beta1.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -5767,48 +5971,36 @@ func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "tss.v1beta1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message tss.v1beta1.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest 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_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tss.v1beta1.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest 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_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgUpdateParams", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryParamsRequest", d.FullName())) } panic("unreachable") } @@ -5816,7 +6008,7 @@ func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescript // 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_MsgUpdateParams) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5827,7 +6019,7 @@ func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5839,7 +6031,7 @@ func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawField // 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_MsgUpdateParams) IsValid() bool { +func (x *fastReflection_QueryParamsRequest) IsValid() bool { return x != nil } @@ -5849,9 +6041,9 @@ func (x *fastReflection_MsgUpdateParams) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) + x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5863,14 +6055,6 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5881,7 +6065,7 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) + x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5900,27 +6084,6 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0x12 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - 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 { @@ -5932,7 +6095,7 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) + x := input.Message.Interface().(*QueryParamsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5964,80 +6127,12 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: 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 Params", 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.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); 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 Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -6074,24 +6169,26 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { } var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_tx_proto_init() - md_MsgUpdateParamsResponse = File_tss_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") + file_tunnel_v1beta1_query_proto_init() + md_QueryParamsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse +type fastReflection_QueryParamsResponse QueryParamsResponse -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) } -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_tx_proto_msgTypes[13] +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6102,43 +6199,43 @@ func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} +var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} -type fastReflection_MsgUpdateParamsResponse_messageType struct{} +type fastReflection_QueryParamsResponse_messageType struct{} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) } -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) } -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse } // 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_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType +func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(x) +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -6146,7 +6243,13 @@ func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoM // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, value) { + return + } + } } // Has reports whether a field is populated. @@ -6160,13 +6263,15 @@ func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.Field // 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_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + return x.Params != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -6176,13 +6281,15 @@ func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescri // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -6192,13 +6299,16 @@ func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDesc // 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_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", descriptor.FullName())) } } @@ -6212,13 +6322,15 @@ func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.Fie // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -6232,36 +6344,44 @@ func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescri // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse 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_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse 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_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.MsgUpdateParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryParamsResponse", d.FullName())) } panic("unreachable") } @@ -6269,7 +6389,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.Oneof // 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_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6280,7 +6400,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFi // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6292,7 +6412,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect. // 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_MsgUpdateParamsResponse) IsValid() bool { +func (x *fastReflection_QueryParamsResponse) IsValid() bool { return x != nil } @@ -6302,9 +6422,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) + x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6316,6 +6436,10 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth var n int var l int _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6326,7 +6450,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) + x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6345,6 +6469,20 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + 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 { @@ -6356,7 +6494,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) + x := input.Message.Interface().(*QueryParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6388,12 +6526,48 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -6433,7 +6607,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: tss/v1beta1/tx.proto +// source: tunnel/v1beta1/query.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -6442,851 +6616,908 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// MsgSubmitDKGRound1 is the Msg/MsgSubmitDKGRound1 request type. -type MsgSubmitDKGRound1 struct { +// TunnelStatusFilter defines a filter for tunnel status. +type TunnelStatusFilter int32 + +const ( + // TUNNEL_STATUS_FILTER_UNSPECIFIED defines an unspecified status. + TunnelStatusFilter_TUNNEL_STATUS_FILTER_UNSPECIFIED TunnelStatusFilter = 0 + // TUNNEL_STATUS_FILTER_ACTIVE defines an active tunnel. + TunnelStatusFilter_TUNNEL_STATUS_FILTER_ACTIVE TunnelStatusFilter = 1 + // TUNNEL_STATUS_FILTER_INACTIVE defines an inactive tunnel. + TunnelStatusFilter_TUNNEL_STATUS_FILTER_INACTIVE TunnelStatusFilter = 2 +) + +// Enum value maps for TunnelStatusFilter. +var ( + TunnelStatusFilter_name = map[int32]string{ + 0: "TUNNEL_STATUS_FILTER_UNSPECIFIED", + 1: "TUNNEL_STATUS_FILTER_ACTIVE", + 2: "TUNNEL_STATUS_FILTER_INACTIVE", + } + TunnelStatusFilter_value = map[string]int32{ + "TUNNEL_STATUS_FILTER_UNSPECIFIED": 0, + "TUNNEL_STATUS_FILTER_ACTIVE": 1, + "TUNNEL_STATUS_FILTER_INACTIVE": 2, + } +) + +func (x TunnelStatusFilter) Enum() *TunnelStatusFilter { + p := new(TunnelStatusFilter) + *p = x + return p +} + +func (x TunnelStatusFilter) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TunnelStatusFilter) Descriptor() protoreflect.EnumDescriptor { + return file_tunnel_v1beta1_query_proto_enumTypes[0].Descriptor() +} + +func (TunnelStatusFilter) Type() protoreflect.EnumType { + return &file_tunnel_v1beta1_query_proto_enumTypes[0] +} + +func (x TunnelStatusFilter) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TunnelStatusFilter.Descriptor instead. +func (TunnelStatusFilter) EnumDescriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{0} +} + +// QueryTunnelsRequest is the request type for the Query/Tunnels RPC method. +type QueryTunnelsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // group_id is ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // round1_info is all data that require to handle round 1. - Round1Info *Round1Info `protobuf:"bytes,2,opt,name=round1_info,json=round1Info,proto3" json:"round1_info,omitempty"` - // sender is the user address that submits the group creation information; - // must be a member of this group. - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + // status_filter is a flag to filter tunnels by status. + StatusFilter TunnelStatusFilter `protobuf:"varint,1,opt,name=status_filter,json=statusFilter,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"status_filter,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *MsgSubmitDKGRound1) Reset() { - *x = MsgSubmitDKGRound1{} +func (x *QueryTunnelsRequest) Reset() { + *x = QueryTunnelsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[0] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgSubmitDKGRound1) String() string { +func (x *QueryTunnelsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitDKGRound1) ProtoMessage() {} +func (*QueryTunnelsRequest) ProtoMessage() {} -// Deprecated: Use MsgSubmitDKGRound1.ProtoReflect.Descriptor instead. -func (*MsgSubmitDKGRound1) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{0} +// Deprecated: Use QueryTunnelsRequest.ProtoReflect.Descriptor instead. +func (*QueryTunnelsRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{0} } -func (x *MsgSubmitDKGRound1) GetGroupId() uint64 { +func (x *QueryTunnelsRequest) GetStatusFilter() TunnelStatusFilter { if x != nil { - return x.GroupId + return x.StatusFilter } - return 0 + return TunnelStatusFilter_TUNNEL_STATUS_FILTER_UNSPECIFIED } -func (x *MsgSubmitDKGRound1) GetRound1Info() *Round1Info { +func (x *QueryTunnelsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { - return x.Round1Info + return x.Pagination } return nil } -func (x *MsgSubmitDKGRound1) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -// MsgSubmitDKGRound1Response is the Msg/SubmitDKGRound1 response type. -type MsgSubmitDKGRound1Response struct { +// QueryTunnelsResponse is the response type for the Query/Tunnels RPC method. +type QueryTunnelsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // Tunnels is a list of tunnels. + Tunnels []*Tunnel `protobuf:"bytes,1,rep,name=tunnels,proto3" json:"tunnels,omitempty"` + // pagination defines an optional pagination for the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *MsgSubmitDKGRound1Response) Reset() { - *x = MsgSubmitDKGRound1Response{} +func (x *QueryTunnelsResponse) Reset() { + *x = QueryTunnelsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[1] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgSubmitDKGRound1Response) String() string { +func (x *QueryTunnelsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitDKGRound1Response) ProtoMessage() {} +func (*QueryTunnelsResponse) ProtoMessage() {} + +// Deprecated: Use QueryTunnelsResponse.ProtoReflect.Descriptor instead. +func (*QueryTunnelsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryTunnelsResponse) GetTunnels() []*Tunnel { + if x != nil { + return x.Tunnels + } + return nil +} -// Deprecated: Use MsgSubmitDKGRound1Response.ProtoReflect.Descriptor instead. -func (*MsgSubmitDKGRound1Response) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{1} +func (x *QueryTunnelsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil } -// MsgSubmitDKGRound2 is the Msg/SubmitDKGRound2 request type. -type MsgSubmitDKGRound2 struct { +// QueryTunnelRequest is the request type for the Query/Tunnel RPC method. +type QueryTunnelRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // group_id is ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // round2_info is all data that is required to handle round 2. - Round2Info *Round2Info `protobuf:"bytes,2,opt,name=round2_info,json=round2Info,proto3" json:"round2_info,omitempty"` - // sender is the user address that submits the group creation information; - // must be a member of this group. - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + // tunnel_id is the ID of the tunnel to query. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` } -func (x *MsgSubmitDKGRound2) Reset() { - *x = MsgSubmitDKGRound2{} +func (x *QueryTunnelRequest) Reset() { + *x = QueryTunnelRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[2] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgSubmitDKGRound2) String() string { +func (x *QueryTunnelRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitDKGRound2) ProtoMessage() {} +func (*QueryTunnelRequest) ProtoMessage() {} -// Deprecated: Use MsgSubmitDKGRound2.ProtoReflect.Descriptor instead. -func (*MsgSubmitDKGRound2) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{2} +// Deprecated: Use QueryTunnelRequest.ProtoReflect.Descriptor instead. +func (*QueryTunnelRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{2} } -func (x *MsgSubmitDKGRound2) GetGroupId() uint64 { +func (x *QueryTunnelRequest) GetTunnelId() uint64 { if x != nil { - return x.GroupId + return x.TunnelId } return 0 } -func (x *MsgSubmitDKGRound2) GetRound2Info() *Round2Info { - if x != nil { - return x.Round2Info - } - return nil -} - -func (x *MsgSubmitDKGRound2) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -// MsgSubmitDKGRound2Response is response data for MsgSubmitDKGRound2 message -type MsgSubmitDKGRound2Response struct { +// QueryTunnelResponse is the response type for the Query/Tunnel RPC method. +type QueryTunnelResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // tunnel is the tunnel with the given ID. + Tunnel *Tunnel `protobuf:"bytes,1,opt,name=tunnel,proto3" json:"tunnel,omitempty"` } -func (x *MsgSubmitDKGRound2Response) Reset() { - *x = MsgSubmitDKGRound2Response{} +func (x *QueryTunnelResponse) Reset() { + *x = QueryTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[3] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgSubmitDKGRound2Response) String() string { +func (x *QueryTunnelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitDKGRound2Response) ProtoMessage() {} +func (*QueryTunnelResponse) ProtoMessage() {} + +// Deprecated: Use QueryTunnelResponse.ProtoReflect.Descriptor instead. +func (*QueryTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{3} +} -// Deprecated: Use MsgSubmitDKGRound2Response.ProtoReflect.Descriptor instead. -func (*MsgSubmitDKGRound2Response) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{3} +func (x *QueryTunnelResponse) GetTunnel() *Tunnel { + if x != nil { + return x.Tunnel + } + return nil } -// MsgComplain is a message used to complain about malicious actors in the group. -type MsgComplain struct { +// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +type QueryDepositsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // group_id is ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // complaints is a list of complaints. - Complaints []*Complaint `protobuf:"bytes,2,rep,name=complaints,proto3" json:"complaints,omitempty"` - // sender is the user address that submits the group creation information; - // must be a member of this group. - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + // tunnel_id is the ID of the tunnel to query deposits. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *MsgComplain) Reset() { - *x = MsgComplain{} +func (x *QueryDepositsRequest) Reset() { + *x = QueryDepositsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[4] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgComplain) String() string { +func (x *QueryDepositsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgComplain) ProtoMessage() {} +func (*QueryDepositsRequest) ProtoMessage() {} -// Deprecated: Use MsgComplain.ProtoReflect.Descriptor instead. -func (*MsgComplain) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{4} +// Deprecated: Use QueryDepositsRequest.ProtoReflect.Descriptor instead. +func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{4} } -func (x *MsgComplain) GetGroupId() uint64 { +func (x *QueryDepositsRequest) GetTunnelId() uint64 { if x != nil { - return x.GroupId + return x.TunnelId } return 0 } -func (x *MsgComplain) GetComplaints() []*Complaint { +func (x *QueryDepositsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { - return x.Complaints + return x.Pagination } return nil } -func (x *MsgComplain) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -// MsgComplainResponse is response data for MsgComplain message -type MsgComplainResponse struct { +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +type QueryDepositsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // deposits is a list of deposits. + Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"` + // pagination defines an optional pagination for the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *MsgComplainResponse) Reset() { - *x = MsgComplainResponse{} +func (x *QueryDepositsResponse) Reset() { + *x = QueryDepositsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[5] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgComplainResponse) String() string { +func (x *QueryDepositsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgComplainResponse) ProtoMessage() {} +func (*QueryDepositsResponse) ProtoMessage() {} -// Deprecated: Use MsgComplainResponse.ProtoReflect.Descriptor instead. -func (*MsgComplainResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{5} +// Deprecated: Use QueryDepositsResponse.ProtoReflect.Descriptor instead. +func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{5} } -// MsgConfirm is a message used to confirm own public key. -type MsgConfirm struct { +func (x *QueryDepositsResponse) GetDeposits() []*Deposit { + if x != nil { + return x.Deposits + } + return nil +} + +func (x *QueryDepositsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryDepositRequest is the request type for the Query/Deposit RPC method. +type QueryDepositRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // group_id is ID of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // member_id is ID of the sender. - MemberId uint64 `protobuf:"varint,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` - // own_pub_key_sig is a signature of the member_i on its own PubKey to confirm - // that the address is able to derive the PubKey. - OwnPubKeySig []byte `protobuf:"bytes,3,opt,name=own_pub_key_sig,json=ownPubKeySig,proto3" json:"own_pub_key_sig,omitempty"` - // sender is the user address that submits the group creation information; - // must be a member of this group. - Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` + // tunnel_id is the ID of the tunnel to query. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // depositor is the address of the depositor to query. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` } -func (x *MsgConfirm) Reset() { - *x = MsgConfirm{} +func (x *QueryDepositRequest) Reset() { + *x = QueryDepositRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[6] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgConfirm) String() string { +func (x *QueryDepositRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgConfirm) ProtoMessage() {} +func (*QueryDepositRequest) ProtoMessage() {} -// Deprecated: Use MsgConfirm.ProtoReflect.Descriptor instead. -func (*MsgConfirm) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{6} +// Deprecated: Use QueryDepositRequest.ProtoReflect.Descriptor instead. +func (*QueryDepositRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{6} } -func (x *MsgConfirm) GetGroupId() uint64 { +func (x *QueryDepositRequest) GetTunnelId() uint64 { if x != nil { - return x.GroupId + return x.TunnelId } return 0 } -func (x *MsgConfirm) GetMemberId() uint64 { +func (x *QueryDepositRequest) GetDepositor() string { if x != nil { - return x.MemberId - } - return 0 -} - -func (x *MsgConfirm) GetOwnPubKeySig() []byte { - if x != nil { - return x.OwnPubKeySig - } - return nil -} - -func (x *MsgConfirm) GetSender() string { - if x != nil { - return x.Sender + return x.Depositor } return "" } -// MsgConfirmResponse is response data for MsgConfirm message -type MsgConfirmResponse struct { +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +type QueryDepositResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // deposit is the deposit with the given tunnel ID and depositor address. + Deposit *Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` } -func (x *MsgConfirmResponse) Reset() { - *x = MsgConfirmResponse{} +func (x *QueryDepositResponse) Reset() { + *x = QueryDepositResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[7] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgConfirmResponse) String() string { +func (x *QueryDepositResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgConfirmResponse) ProtoMessage() {} +func (*QueryDepositResponse) ProtoMessage() {} + +// Deprecated: Use QueryDepositResponse.ProtoReflect.Descriptor instead. +func (*QueryDepositResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{7} +} -// Deprecated: Use MsgConfirmResponse.ProtoReflect.Descriptor instead. -func (*MsgConfirmResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{7} +func (x *QueryDepositResponse) GetDeposit() *Deposit { + if x != nil { + return x.Deposit + } + return nil } -// MsgSubmitDEs is a message used to submit a list of DEs. -type MsgSubmitDEs struct { +// QueryPacketsRequest is the request type for the Query/Packets RPC method. +type QueryPacketsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // des is a list of DE objects. - Des []*DE `protobuf:"bytes,1,rep,name=des,proto3" json:"des,omitempty"` - // sender is the user address that submits DE objects. - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + // tunnel_id is the ID of the tunnel to query packets. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *MsgSubmitDEs) Reset() { - *x = MsgSubmitDEs{} +func (x *QueryPacketsRequest) Reset() { + *x = QueryPacketsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[8] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgSubmitDEs) String() string { +func (x *QueryPacketsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitDEs) ProtoMessage() {} +func (*QueryPacketsRequest) ProtoMessage() {} -// Deprecated: Use MsgSubmitDEs.ProtoReflect.Descriptor instead. -func (*MsgSubmitDEs) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{8} +// Deprecated: Use QueryPacketsRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketsRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{8} } -func (x *MsgSubmitDEs) GetDes() []*DE { +func (x *QueryPacketsRequest) GetTunnelId() uint64 { if x != nil { - return x.Des + return x.TunnelId } - return nil + return 0 } -func (x *MsgSubmitDEs) GetSender() string { +func (x *QueryPacketsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { - return x.Sender + return x.Pagination } - return "" + return nil } -// MsgSubmitDEsResponse is response data for MsgSubmitDEs message -type MsgSubmitDEsResponse struct { +// QueryPacketsResponse is the response type for the Query/Packets RPC method. +type QueryPacketsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // packets is a list of packets. + Packets []*Packet `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets,omitempty"` + // pagination defines an optional pagination for the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *MsgSubmitDEsResponse) Reset() { - *x = MsgSubmitDEsResponse{} +func (x *QueryPacketsResponse) Reset() { + *x = QueryPacketsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[9] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgSubmitDEsResponse) String() string { +func (x *QueryPacketsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitDEsResponse) ProtoMessage() {} +func (*QueryPacketsResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketsResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{9} +} -// Deprecated: Use MsgSubmitDEsResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitDEsResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{9} +func (x *QueryPacketsResponse) GetPackets() []*Packet { + if x != nil { + return x.Packets + } + return nil } -// MsgSubmitSignature is a message used to submitting signature data. -type MsgSubmitSignature struct { +func (x *QueryPacketsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryPacketRequest is the request type for the Query/Packet RPC method. +type QueryPacketRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // signing_id is the unique identifier of the signing process. - SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` - // member_id is the unique identifier of the signer in the group. - MemberId uint64 `protobuf:"varint,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` - // signature is the signature produced by the signer. - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - // signer is the address who signs a message; must be a member of the group. - Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` + // tunnel_id is the ID of the tunnel to query packets. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // sequence is the sequence of the packet to query. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` } -func (x *MsgSubmitSignature) Reset() { - *x = MsgSubmitSignature{} +func (x *QueryPacketRequest) Reset() { + *x = QueryPacketRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[10] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgSubmitSignature) String() string { +func (x *QueryPacketRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitSignature) ProtoMessage() {} +func (*QueryPacketRequest) ProtoMessage() {} -// Deprecated: Use MsgSubmitSignature.ProtoReflect.Descriptor instead. -func (*MsgSubmitSignature) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{10} +// Deprecated: Use QueryPacketRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{10} } -func (x *MsgSubmitSignature) GetSigningId() uint64 { +func (x *QueryPacketRequest) GetTunnelId() uint64 { if x != nil { - return x.SigningId + return x.TunnelId } return 0 } -func (x *MsgSubmitSignature) GetMemberId() uint64 { +func (x *QueryPacketRequest) GetSequence() uint64 { if x != nil { - return x.MemberId + return x.Sequence } return 0 } -func (x *MsgSubmitSignature) GetSignature() []byte { - if x != nil { - return x.Signature +// QueryPacketResponse is the response type for the Query/Packet RPC method. +type QueryPacketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // packet is the packet with the given tunnel ID and sequence. + Packet *Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` +} + +func (x *QueryPacketResponse) Reset() { + *x = QueryPacketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *MsgSubmitSignature) GetSigner() string { +func (x *QueryPacketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryPacketResponse) GetPacket() *Packet { if x != nil { - return x.Signer + return x.Packet } - return "" + return nil } -// MsgSubmitSignatureResponse is response data for MsgSubmitSignature message -type MsgSubmitSignatureResponse struct { +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgSubmitSignatureResponse) Reset() { - *x = MsgSubmitSignatureResponse{} +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[11] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgSubmitSignatureResponse) String() string { +func (x *QueryParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitSignatureResponse) ProtoMessage() {} +func (*QueryParamsRequest) ProtoMessage() {} -// Deprecated: Use MsgSubmitSignatureResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitSignatureResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{11} +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{12} } -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // params defines the x/tss parameters to update. + // params is the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - // authority is the address of the governance account. - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` } -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[12] + mi := &file_tunnel_v1beta1_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *MsgUpdateParams) String() string { +func (x *QueryParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgUpdateParams) ProtoMessage() {} +func (*QueryParamsResponse) ProtoMessage() {} -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{12} +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{13} } -func (x *MsgUpdateParams) GetParams() *Params { +func (x *QueryParamsResponse) GetParams() *Params { if x != nil { return x.Params } return nil } -func (x *MsgUpdateParams) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_tx_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_tx_proto_rawDescGZIP(), []int{13} -} - -var File_tss_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_tss_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 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, 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, 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, 0x15, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x73, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x8a, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x31, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, - 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x31, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x31, 0x49, - 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x31, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x3a, 0x26, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x31, 0x22, - 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, - 0x6f, 0x75, 0x6e, 0x64, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8a, 0x02, - 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x32, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, - 0x12, 0x3e, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x32, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x32, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x32, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 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, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x3a, 0x26, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, - 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x32, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x32, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfb, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, - 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, 0x07, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, - 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, - 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 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, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x3a, 0x20, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x10, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf9, 0x02, - 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x5a, 0x0a, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, - 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, +var File_tunnel_v1beta1_query_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_query_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, + 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x91, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x31, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x06, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x22, 0x7b, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x95, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, + 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x4f, 0x0a, 0x14, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7a, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, + 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x30, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, 0x12, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x2a, 0x84, 0x01, 0x0a, 0x12, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x20, 0x54, + 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, + 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, + 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x32, 0xba, 0x07, 0x0a, 0x05, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x75, 0x0a, 0x07, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x7e, 0x0a, 0x06, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, + 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, + 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x96, 0x01, 0x0a, + 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x89, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x91, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0x71, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x12, 0x16, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xbc, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x5e, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x41, 0xe2, 0xde, 0x1f, - 0x08, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x31, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x44, 0x52, 0x08, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x12, 0x5d, 0x0a, 0x0f, 0x6f, 0x77, 0x6e, 0x5f, - 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x36, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0c, 0x6f, 0x77, 0x6e, 0x50, 0x75, - 0x62, 0x4b, 0x65, 0x79, 0x53, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x3a, 0x1e, 0x82, 0xe7, 0xb0, 0x2a, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x74, 0x73, 0x73, 0x2f, 0x4d, - 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x92, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x45, 0x73, - 0x12, 0x2e, 0x0a, 0x03, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x45, 0x42, 0x0b, - 0xc8, 0xde, 0x1f, 0x00, 0xe2, 0xde, 0x1f, 0x03, 0x44, 0x45, 0x73, 0x52, 0x03, 0x64, 0x65, 0x73, - 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 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, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x3a, 0x20, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, - 0xe7, 0xb0, 0x2a, 0x10, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x44, 0x45, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x44, 0x45, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x03, 0x0a, - 0x12, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x62, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x43, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, - 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x5e, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x41, 0xe2, 0xde, 0x1f, 0x08, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x31, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x44, 0x52, 0x08, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x36, 0xfa, 0xde, 0x1f, 0x32, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x30, 0x0a, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, - 0x26, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, - 0x16, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x3a, 0x26, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x13, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xcf, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, - 0x5b, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, 0x6e, - 0x64, 0x31, 0x12, 0x1f, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, - 0x6e, 0x64, 0x31, 0x1a, 0x27, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, - 0x75, 0x6e, 0x64, 0x31, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0f, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x32, 0x12, - 0x1f, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x32, - 0x1a, 0x27, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x4b, 0x47, 0x52, 0x6f, 0x75, 0x6e, 0x64, - 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x18, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x1a, - 0x20, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x43, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x17, 0x2e, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x1a, 0x1f, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x44, 0x45, 0x73, 0x12, 0x19, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x45, 0x73, 0x1a, 0x21, - 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x44, 0x45, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5b, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x12, 0x1f, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x27, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, - 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, - 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x24, 0x2e, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xa4, 0x01, 0x0a, 0x0f, 0x63, 0x6f, - 0x6d, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, - 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, - 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x73, 0x73, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x54, 0x73, - 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0b, 0x54, 0x73, 0x73, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x17, 0x54, 0x73, 0x73, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0c, 0x54, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_tss_v1beta1_tx_proto_rawDescOnce sync.Once - file_tss_v1beta1_tx_proto_rawDescData = file_tss_v1beta1_tx_proto_rawDesc + file_tunnel_v1beta1_query_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_query_proto_rawDescData = file_tunnel_v1beta1_query_proto_rawDesc ) -func file_tss_v1beta1_tx_proto_rawDescGZIP() []byte { - file_tss_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_tss_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_tss_v1beta1_tx_proto_rawDescData) +func file_tunnel_v1beta1_query_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_query_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_query_proto_rawDescData) }) - return file_tss_v1beta1_tx_proto_rawDescData -} - -var file_tss_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_tss_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgSubmitDKGRound1)(nil), // 0: tss.v1beta1.MsgSubmitDKGRound1 - (*MsgSubmitDKGRound1Response)(nil), // 1: tss.v1beta1.MsgSubmitDKGRound1Response - (*MsgSubmitDKGRound2)(nil), // 2: tss.v1beta1.MsgSubmitDKGRound2 - (*MsgSubmitDKGRound2Response)(nil), // 3: tss.v1beta1.MsgSubmitDKGRound2Response - (*MsgComplain)(nil), // 4: tss.v1beta1.MsgComplain - (*MsgComplainResponse)(nil), // 5: tss.v1beta1.MsgComplainResponse - (*MsgConfirm)(nil), // 6: tss.v1beta1.MsgConfirm - (*MsgConfirmResponse)(nil), // 7: tss.v1beta1.MsgConfirmResponse - (*MsgSubmitDEs)(nil), // 8: tss.v1beta1.MsgSubmitDEs - (*MsgSubmitDEsResponse)(nil), // 9: tss.v1beta1.MsgSubmitDEsResponse - (*MsgSubmitSignature)(nil), // 10: tss.v1beta1.MsgSubmitSignature - (*MsgSubmitSignatureResponse)(nil), // 11: tss.v1beta1.MsgSubmitSignatureResponse - (*MsgUpdateParams)(nil), // 12: tss.v1beta1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 13: tss.v1beta1.MsgUpdateParamsResponse - (*Round1Info)(nil), // 14: tss.v1beta1.Round1Info - (*Round2Info)(nil), // 15: tss.v1beta1.Round2Info - (*Complaint)(nil), // 16: tss.v1beta1.Complaint - (*DE)(nil), // 17: tss.v1beta1.DE - (*Params)(nil), // 18: tss.v1beta1.Params -} -var file_tss_v1beta1_tx_proto_depIdxs = []int32{ - 14, // 0: tss.v1beta1.MsgSubmitDKGRound1.round1_info:type_name -> tss.v1beta1.Round1Info - 15, // 1: tss.v1beta1.MsgSubmitDKGRound2.round2_info:type_name -> tss.v1beta1.Round2Info - 16, // 2: tss.v1beta1.MsgComplain.complaints:type_name -> tss.v1beta1.Complaint - 17, // 3: tss.v1beta1.MsgSubmitDEs.des:type_name -> tss.v1beta1.DE - 18, // 4: tss.v1beta1.MsgUpdateParams.params:type_name -> tss.v1beta1.Params - 0, // 5: tss.v1beta1.Msg.SubmitDKGRound1:input_type -> tss.v1beta1.MsgSubmitDKGRound1 - 2, // 6: tss.v1beta1.Msg.SubmitDKGRound2:input_type -> tss.v1beta1.MsgSubmitDKGRound2 - 4, // 7: tss.v1beta1.Msg.Complain:input_type -> tss.v1beta1.MsgComplain - 6, // 8: tss.v1beta1.Msg.Confirm:input_type -> tss.v1beta1.MsgConfirm - 8, // 9: tss.v1beta1.Msg.SubmitDEs:input_type -> tss.v1beta1.MsgSubmitDEs - 10, // 10: tss.v1beta1.Msg.SubmitSignature:input_type -> tss.v1beta1.MsgSubmitSignature - 12, // 11: tss.v1beta1.Msg.UpdateParams:input_type -> tss.v1beta1.MsgUpdateParams - 1, // 12: tss.v1beta1.Msg.SubmitDKGRound1:output_type -> tss.v1beta1.MsgSubmitDKGRound1Response - 3, // 13: tss.v1beta1.Msg.SubmitDKGRound2:output_type -> tss.v1beta1.MsgSubmitDKGRound2Response - 5, // 14: tss.v1beta1.Msg.Complain:output_type -> tss.v1beta1.MsgComplainResponse - 7, // 15: tss.v1beta1.Msg.Confirm:output_type -> tss.v1beta1.MsgConfirmResponse - 9, // 16: tss.v1beta1.Msg.SubmitDEs:output_type -> tss.v1beta1.MsgSubmitDEsResponse - 11, // 17: tss.v1beta1.Msg.SubmitSignature:output_type -> tss.v1beta1.MsgSubmitSignatureResponse - 13, // 18: tss.v1beta1.Msg.UpdateParams:output_type -> tss.v1beta1.MsgUpdateParamsResponse - 12, // [12:19] is the sub-list for method output_type - 5, // [5:12] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_tss_v1beta1_tx_proto_init() } -func file_tss_v1beta1_tx_proto_init() { - if File_tss_v1beta1_tx_proto != nil { + return file_tunnel_v1beta1_query_proto_rawDescData +} + +var file_tunnel_v1beta1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_tunnel_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_tunnel_v1beta1_query_proto_goTypes = []interface{}{ + (TunnelStatusFilter)(0), // 0: tunnel.v1beta1.TunnelStatusFilter + (*QueryTunnelsRequest)(nil), // 1: tunnel.v1beta1.QueryTunnelsRequest + (*QueryTunnelsResponse)(nil), // 2: tunnel.v1beta1.QueryTunnelsResponse + (*QueryTunnelRequest)(nil), // 3: tunnel.v1beta1.QueryTunnelRequest + (*QueryTunnelResponse)(nil), // 4: tunnel.v1beta1.QueryTunnelResponse + (*QueryDepositsRequest)(nil), // 5: tunnel.v1beta1.QueryDepositsRequest + (*QueryDepositsResponse)(nil), // 6: tunnel.v1beta1.QueryDepositsResponse + (*QueryDepositRequest)(nil), // 7: tunnel.v1beta1.QueryDepositRequest + (*QueryDepositResponse)(nil), // 8: tunnel.v1beta1.QueryDepositResponse + (*QueryPacketsRequest)(nil), // 9: tunnel.v1beta1.QueryPacketsRequest + (*QueryPacketsResponse)(nil), // 10: tunnel.v1beta1.QueryPacketsResponse + (*QueryPacketRequest)(nil), // 11: tunnel.v1beta1.QueryPacketRequest + (*QueryPacketResponse)(nil), // 12: tunnel.v1beta1.QueryPacketResponse + (*QueryParamsRequest)(nil), // 13: tunnel.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 14: tunnel.v1beta1.QueryParamsResponse + (*v1beta1.PageRequest)(nil), // 15: cosmos.base.query.v1beta1.PageRequest + (*Tunnel)(nil), // 16: tunnel.v1beta1.Tunnel + (*v1beta1.PageResponse)(nil), // 17: cosmos.base.query.v1beta1.PageResponse + (*Deposit)(nil), // 18: tunnel.v1beta1.Deposit + (*Packet)(nil), // 19: tunnel.v1beta1.Packet + (*Params)(nil), // 20: tunnel.v1beta1.Params +} +var file_tunnel_v1beta1_query_proto_depIdxs = []int32{ + 0, // 0: tunnel.v1beta1.QueryTunnelsRequest.status_filter:type_name -> tunnel.v1beta1.TunnelStatusFilter + 15, // 1: tunnel.v1beta1.QueryTunnelsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 16, // 2: tunnel.v1beta1.QueryTunnelsResponse.tunnels:type_name -> tunnel.v1beta1.Tunnel + 17, // 3: tunnel.v1beta1.QueryTunnelsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 16, // 4: tunnel.v1beta1.QueryTunnelResponse.tunnel:type_name -> tunnel.v1beta1.Tunnel + 15, // 5: tunnel.v1beta1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 6: tunnel.v1beta1.QueryDepositsResponse.deposits:type_name -> tunnel.v1beta1.Deposit + 17, // 7: tunnel.v1beta1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 18, // 8: tunnel.v1beta1.QueryDepositResponse.deposit:type_name -> tunnel.v1beta1.Deposit + 15, // 9: tunnel.v1beta1.QueryPacketsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 19, // 10: tunnel.v1beta1.QueryPacketsResponse.packets:type_name -> tunnel.v1beta1.Packet + 17, // 11: tunnel.v1beta1.QueryPacketsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 19, // 12: tunnel.v1beta1.QueryPacketResponse.packet:type_name -> tunnel.v1beta1.Packet + 20, // 13: tunnel.v1beta1.QueryParamsResponse.params:type_name -> tunnel.v1beta1.Params + 1, // 14: tunnel.v1beta1.Query.Tunnels:input_type -> tunnel.v1beta1.QueryTunnelsRequest + 3, // 15: tunnel.v1beta1.Query.Tunnel:input_type -> tunnel.v1beta1.QueryTunnelRequest + 5, // 16: tunnel.v1beta1.Query.Deposits:input_type -> tunnel.v1beta1.QueryDepositsRequest + 7, // 17: tunnel.v1beta1.Query.Deposit:input_type -> tunnel.v1beta1.QueryDepositRequest + 9, // 18: tunnel.v1beta1.Query.Packets:input_type -> tunnel.v1beta1.QueryPacketsRequest + 11, // 19: tunnel.v1beta1.Query.Packet:input_type -> tunnel.v1beta1.QueryPacketRequest + 13, // 20: tunnel.v1beta1.Query.Params:input_type -> tunnel.v1beta1.QueryParamsRequest + 2, // 21: tunnel.v1beta1.Query.Tunnels:output_type -> tunnel.v1beta1.QueryTunnelsResponse + 4, // 22: tunnel.v1beta1.Query.Tunnel:output_type -> tunnel.v1beta1.QueryTunnelResponse + 6, // 23: tunnel.v1beta1.Query.Deposits:output_type -> tunnel.v1beta1.QueryDepositsResponse + 8, // 24: tunnel.v1beta1.Query.Deposit:output_type -> tunnel.v1beta1.QueryDepositResponse + 10, // 25: tunnel.v1beta1.Query.Packets:output_type -> tunnel.v1beta1.QueryPacketsResponse + 12, // 26: tunnel.v1beta1.Query.Packet:output_type -> tunnel.v1beta1.QueryPacketResponse + 14, // 27: tunnel.v1beta1.Query.Params:output_type -> tunnel.v1beta1.QueryParamsResponse + 21, // [21:28] is the sub-list for method output_type + 14, // [14:21] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_tunnel_v1beta1_query_proto_init() } +func file_tunnel_v1beta1_query_proto_init() { + if File_tunnel_v1beta1_query_proto != nil { return } - file_tss_v1beta1_tss_proto_init() - file_tss_v1beta1_genesis_proto_init() + file_tunnel_v1beta1_params_proto_init() + file_tunnel_v1beta1_tunnel_proto_init() if !protoimpl.UnsafeEnabled { - file_tss_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitDKGRound1); i { + file_tunnel_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTunnelsRequest); i { case 0: return &v.state case 1: @@ -7297,8 +7528,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitDKGRound1Response); i { + file_tunnel_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTunnelsResponse); i { case 0: return &v.state case 1: @@ -7309,8 +7540,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitDKGRound2); i { + file_tunnel_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTunnelRequest); i { case 0: return &v.state case 1: @@ -7321,8 +7552,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitDKGRound2Response); i { + file_tunnel_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTunnelResponse); i { case 0: return &v.state case 1: @@ -7333,8 +7564,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgComplain); i { + file_tunnel_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDepositsRequest); i { case 0: return &v.state case 1: @@ -7345,8 +7576,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgComplainResponse); i { + file_tunnel_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDepositsResponse); i { case 0: return &v.state case 1: @@ -7357,8 +7588,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgConfirm); i { + file_tunnel_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDepositRequest); i { case 0: return &v.state case 1: @@ -7369,8 +7600,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgConfirmResponse); i { + file_tunnel_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDepositResponse); i { case 0: return &v.state case 1: @@ -7381,8 +7612,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitDEs); i { + file_tunnel_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketsRequest); i { case 0: return &v.state case 1: @@ -7393,8 +7624,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitDEsResponse); i { + file_tunnel_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketsResponse); i { case 0: return &v.state case 1: @@ -7405,8 +7636,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitSignature); i { + file_tunnel_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketRequest); i { case 0: return &v.state case 1: @@ -7417,8 +7648,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitSignatureResponse); i { + file_tunnel_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketResponse); i { case 0: return &v.state case 1: @@ -7429,8 +7660,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { + file_tunnel_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { case 0: return &v.state case 1: @@ -7441,8 +7672,8 @@ func file_tss_v1beta1_tx_proto_init() { return nil } } - file_tss_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { + file_tunnel_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); i { case 0: return &v.state case 1: @@ -7458,18 +7689,19 @@ func file_tss_v1beta1_tx_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tss_v1beta1_tx_proto_rawDesc, - NumEnums: 0, + RawDescriptor: file_tunnel_v1beta1_query_proto_rawDesc, + NumEnums: 1, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_tss_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_tss_v1beta1_tx_proto_depIdxs, - MessageInfos: file_tss_v1beta1_tx_proto_msgTypes, + GoTypes: file_tunnel_v1beta1_query_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_query_proto_depIdxs, + EnumInfos: file_tunnel_v1beta1_query_proto_enumTypes, + MessageInfos: file_tunnel_v1beta1_query_proto_msgTypes, }.Build() - File_tss_v1beta1_tx_proto = out.File - file_tss_v1beta1_tx_proto_rawDesc = nil - file_tss_v1beta1_tx_proto_goTypes = nil - file_tss_v1beta1_tx_proto_depIdxs = nil + File_tunnel_v1beta1_query_proto = out.File + file_tunnel_v1beta1_query_proto_rawDesc = nil + file_tunnel_v1beta1_query_proto_goTypes = nil + file_tunnel_v1beta1_query_proto_depIdxs = nil } diff --git a/api/tunnel/v1beta1/query_grpc.pb.go b/api/tunnel/v1beta1/query_grpc.pb.go new file mode 100644 index 000000000..7d905fbe8 --- /dev/null +++ b/api/tunnel/v1beta1/query_grpc.pb.go @@ -0,0 +1,345 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: tunnel/v1beta1/query.proto + +package tunnelv1beta1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_Tunnels_FullMethodName = "/tunnel.v1beta1.Query/Tunnels" + Query_Tunnel_FullMethodName = "/tunnel.v1beta1.Query/Tunnel" + Query_Deposits_FullMethodName = "/tunnel.v1beta1.Query/Deposits" + Query_Deposit_FullMethodName = "/tunnel.v1beta1.Query/Deposit" + Query_Packets_FullMethodName = "/tunnel.v1beta1.Query/Packets" + Query_Packet_FullMethodName = "/tunnel.v1beta1.Query/Packet" + Query_Params_FullMethodName = "/tunnel.v1beta1.Query/Params" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // Tunnels is a RPC method that returns all tunnels. + Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) + // Tunnel is a RPC method that returns a tunnel by its ID. + Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) + // Deposits queries all deposits of a single tunnel. + Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) + // Deposit queries single deposit information based tunnelID, depositAddr. + Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) + // Packets is a RPC method that returns all packets of a tunnel. + Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) + // Packet is a RPC method that returns a packet by its tunnel ID and sequence. + Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) + // Params is a RPC method that returns all parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) { + out := new(QueryTunnelsResponse) + err := c.cc.Invoke(ctx, Query_Tunnels_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) { + out := new(QueryTunnelResponse) + err := c.cc.Invoke(ctx, Query_Tunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) { + out := new(QueryDepositsResponse) + err := c.cc.Invoke(ctx, Query_Deposits_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) { + out := new(QueryDepositResponse) + err := c.cc.Invoke(ctx, Query_Deposit_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) { + out := new(QueryPacketsResponse) + err := c.cc.Invoke(ctx, Query_Packets_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) { + out := new(QueryPacketResponse) + err := c.cc.Invoke(ctx, Query_Packet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // Tunnels is a RPC method that returns all tunnels. + Tunnels(context.Context, *QueryTunnelsRequest) (*QueryTunnelsResponse, error) + // Tunnel is a RPC method that returns a tunnel by its ID. + Tunnel(context.Context, *QueryTunnelRequest) (*QueryTunnelResponse, error) + // Deposits queries all deposits of a single tunnel. + Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) + // Deposit queries single deposit information based tunnelID, depositAddr. + Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) + // Packets is a RPC method that returns all packets of a tunnel. + Packets(context.Context, *QueryPacketsRequest) (*QueryPacketsResponse, error) + // Packet is a RPC method that returns a packet by its tunnel ID and sequence. + Packet(context.Context, *QueryPacketRequest) (*QueryPacketResponse, error) + // Params is a RPC method that returns all parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Tunnels(context.Context, *QueryTunnelsRequest) (*QueryTunnelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tunnels not implemented") +} +func (UnimplementedQueryServer) Tunnel(context.Context, *QueryTunnelRequest) (*QueryTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tunnel not implemented") +} +func (UnimplementedQueryServer) Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposits not implemented") +} +func (UnimplementedQueryServer) Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") +} +func (UnimplementedQueryServer) Packets(context.Context, *QueryPacketsRequest) (*QueryPacketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Packets not implemented") +} +func (UnimplementedQueryServer) Packet(context.Context, *QueryPacketRequest) (*QueryPacketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Packet not implemented") +} +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Tunnels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTunnelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Tunnels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Tunnels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Tunnels(ctx, req.(*QueryTunnelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Tunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTunnelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Tunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Tunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Tunnel(ctx, req.(*QueryTunnelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Deposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Deposits_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deposits(ctx, req.(*QueryDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Deposit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deposit(ctx, req.(*QueryDepositRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Packets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Packets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Packets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Packets(ctx, req.(*QueryPacketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Packet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Packet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Packet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Packet(ctx, req.(*QueryPacketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tunnel.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Tunnels", + Handler: _Query_Tunnels_Handler, + }, + { + MethodName: "Tunnel", + Handler: _Query_Tunnel_Handler, + }, + { + MethodName: "Deposits", + Handler: _Query_Deposits_Handler, + }, + { + MethodName: "Deposit", + Handler: _Query_Deposit_Handler, + }, + { + MethodName: "Packets", + Handler: _Query_Packets_Handler, + }, + { + MethodName: "Packet", + Handler: _Query_Packet_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tunnel/v1beta1/query.proto", +} diff --git a/api/tunnel/v1beta1/tunnel.pulsar.go b/api/tunnel/v1beta1/tunnel.pulsar.go new file mode 100644 index 000000000..5bb903e37 --- /dev/null +++ b/api/tunnel/v1beta1/tunnel.pulsar.go @@ -0,0 +1,7697 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tunnelv1beta1 + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + _ "github.com/bandprotocol/chain/v3/api/feeds/v1beta1" + _ "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_TSSRoute protoreflect.MessageDescriptor + fd_TSSRoute_destination_chain_id protoreflect.FieldDescriptor + fd_TSSRoute_destination_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_TSSRoute = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSRoute") + fd_TSSRoute_destination_chain_id = md_TSSRoute.Fields().ByName("destination_chain_id") + fd_TSSRoute_destination_contract_address = md_TSSRoute.Fields().ByName("destination_contract_address") +} + +var _ protoreflect.Message = (*fastReflection_TSSRoute)(nil) + +type fastReflection_TSSRoute TSSRoute + +func (x *TSSRoute) ProtoReflect() protoreflect.Message { + return (*fastReflection_TSSRoute)(x) +} + +func (x *TSSRoute) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_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_TSSRoute_messageType fastReflection_TSSRoute_messageType +var _ protoreflect.MessageType = fastReflection_TSSRoute_messageType{} + +type fastReflection_TSSRoute_messageType struct{} + +func (x fastReflection_TSSRoute_messageType) Zero() protoreflect.Message { + return (*fastReflection_TSSRoute)(nil) +} +func (x fastReflection_TSSRoute_messageType) New() protoreflect.Message { + return new(fastReflection_TSSRoute) +} +func (x fastReflection_TSSRoute_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TSSRoute +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TSSRoute) Descriptor() protoreflect.MessageDescriptor { + return md_TSSRoute +} + +// 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_TSSRoute) Type() protoreflect.MessageType { + return _fastReflection_TSSRoute_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TSSRoute) New() protoreflect.Message { + return new(fastReflection_TSSRoute) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TSSRoute) Interface() protoreflect.ProtoMessage { + return (*TSSRoute)(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_TSSRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_TSSRoute_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_TSSRoute_destination_contract_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_TSSRoute) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + return x.DestinationChainId != "" + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + return x.DestinationContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + x.DestinationChainId = "" + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + x.DestinationContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message tunnel.v1beta1.TSSRoute is not mutable")) + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message tunnel.v1beta1.TSSRoute is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TSSRoute", 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_TSSRoute) 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_TSSRoute) 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_TSSRoute) 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_TSSRoute) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TSSRoute) + 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.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + 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().(*TSSRoute) + 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.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + 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().(*TSSRoute) + 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: TSSRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRoute: 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 DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = 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_AxelarRoute protoreflect.MessageDescriptor + fd_AxelarRoute_destination_chain_id protoreflect.FieldDescriptor + fd_AxelarRoute_destination_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_AxelarRoute = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("AxelarRoute") + fd_AxelarRoute_destination_chain_id = md_AxelarRoute.Fields().ByName("destination_chain_id") + fd_AxelarRoute_destination_contract_address = md_AxelarRoute.Fields().ByName("destination_contract_address") +} + +var _ protoreflect.Message = (*fastReflection_AxelarRoute)(nil) + +type fastReflection_AxelarRoute AxelarRoute + +func (x *AxelarRoute) ProtoReflect() protoreflect.Message { + return (*fastReflection_AxelarRoute)(x) +} + +func (x *AxelarRoute) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_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_AxelarRoute_messageType fastReflection_AxelarRoute_messageType +var _ protoreflect.MessageType = fastReflection_AxelarRoute_messageType{} + +type fastReflection_AxelarRoute_messageType struct{} + +func (x fastReflection_AxelarRoute_messageType) Zero() protoreflect.Message { + return (*fastReflection_AxelarRoute)(nil) +} +func (x fastReflection_AxelarRoute_messageType) New() protoreflect.Message { + return new(fastReflection_AxelarRoute) +} +func (x fastReflection_AxelarRoute_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AxelarRoute +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AxelarRoute) Descriptor() protoreflect.MessageDescriptor { + return md_AxelarRoute +} + +// 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_AxelarRoute) Type() protoreflect.MessageType { + return _fastReflection_AxelarRoute_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AxelarRoute) New() protoreflect.Message { + return new(fastReflection_AxelarRoute) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AxelarRoute) Interface() protoreflect.ProtoMessage { + return (*AxelarRoute)(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_AxelarRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_AxelarRoute_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_AxelarRoute_destination_contract_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_AxelarRoute) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarRoute.destination_chain_id": + return x.DestinationChainId != "" + case "tunnel.v1beta1.AxelarRoute.destination_contract_address": + return x.DestinationContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarRoute 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_AxelarRoute) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarRoute.destination_chain_id": + x.DestinationChainId = "" + case "tunnel.v1beta1.AxelarRoute.destination_contract_address": + x.DestinationContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarRoute 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_AxelarRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.AxelarRoute.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.AxelarRoute.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarRoute 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_AxelarRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarRoute.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "tunnel.v1beta1.AxelarRoute.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarRoute 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_AxelarRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarRoute.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message tunnel.v1beta1.AxelarRoute is not mutable")) + case "tunnel.v1beta1.AxelarRoute.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message tunnel.v1beta1.AxelarRoute is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarRoute 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_AxelarRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarRoute.destination_chain_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.AxelarRoute.destination_contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarRoute 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_AxelarRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.AxelarRoute", 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_AxelarRoute) 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_AxelarRoute) 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_AxelarRoute) 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_AxelarRoute) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AxelarRoute) + 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.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + 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().(*AxelarRoute) + 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.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + 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().(*AxelarRoute) + 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: AxelarRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AxelarRoute: 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 DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = 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_SignalDeviation protoreflect.MessageDescriptor + fd_SignalDeviation_signal_id protoreflect.FieldDescriptor + fd_SignalDeviation_soft_deviation_bps protoreflect.FieldDescriptor + fd_SignalDeviation_hard_deviation_bps protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_SignalDeviation = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalDeviation") + fd_SignalDeviation_signal_id = md_SignalDeviation.Fields().ByName("signal_id") + fd_SignalDeviation_soft_deviation_bps = md_SignalDeviation.Fields().ByName("soft_deviation_bps") + fd_SignalDeviation_hard_deviation_bps = md_SignalDeviation.Fields().ByName("hard_deviation_bps") +} + +var _ protoreflect.Message = (*fastReflection_SignalDeviation)(nil) + +type fastReflection_SignalDeviation SignalDeviation + +func (x *SignalDeviation) ProtoReflect() protoreflect.Message { + return (*fastReflection_SignalDeviation)(x) +} + +func (x *SignalDeviation) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_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_SignalDeviation_messageType fastReflection_SignalDeviation_messageType +var _ protoreflect.MessageType = fastReflection_SignalDeviation_messageType{} + +type fastReflection_SignalDeviation_messageType struct{} + +func (x fastReflection_SignalDeviation_messageType) Zero() protoreflect.Message { + return (*fastReflection_SignalDeviation)(nil) +} +func (x fastReflection_SignalDeviation_messageType) New() protoreflect.Message { + return new(fastReflection_SignalDeviation) +} +func (x fastReflection_SignalDeviation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SignalDeviation +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SignalDeviation) Descriptor() protoreflect.MessageDescriptor { + return md_SignalDeviation +} + +// 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_SignalDeviation) Type() protoreflect.MessageType { + return _fastReflection_SignalDeviation_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SignalDeviation) New() protoreflect.Message { + return new(fastReflection_SignalDeviation) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SignalDeviation) Interface() protoreflect.ProtoMessage { + return (*SignalDeviation)(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_SignalDeviation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SignalId != "" { + value := protoreflect.ValueOfString(x.SignalId) + if !f(fd_SignalDeviation_signal_id, value) { + return + } + } + if x.SoftDeviationBps != uint64(0) { + value := protoreflect.ValueOfUint64(x.SoftDeviationBps) + if !f(fd_SignalDeviation_soft_deviation_bps, value) { + return + } + } + if x.HardDeviationBps != uint64(0) { + value := protoreflect.ValueOfUint64(x.HardDeviationBps) + if !f(fd_SignalDeviation_hard_deviation_bps, 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_SignalDeviation) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + return x.SignalId != "" + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + return x.SoftDeviationBps != uint64(0) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + return x.HardDeviationBps != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + x.SignalId = "" + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + x.SoftDeviationBps = uint64(0) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + x.HardDeviationBps = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + value := x.SignalId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + value := x.SoftDeviationBps + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + value := x.HardDeviationBps + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + x.SignalId = value.Interface().(string) + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + x.SoftDeviationBps = value.Uint() + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + x.HardDeviationBps = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + panic(fmt.Errorf("field signal_id of message tunnel.v1beta1.SignalDeviation is not mutable")) + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + panic(fmt.Errorf("field soft_deviation_bps of message tunnel.v1beta1.SignalDeviation is not mutable")) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + panic(fmt.Errorf("field hard_deviation_bps of message tunnel.v1beta1.SignalDeviation is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.SignalDeviation", 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_SignalDeviation) 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_SignalDeviation) 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_SignalDeviation) 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_SignalDeviation) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SignalDeviation) + 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.SignalId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.SoftDeviationBps != 0 { + n += 1 + runtime.Sov(uint64(x.SoftDeviationBps)) + } + if x.HardDeviationBps != 0 { + n += 1 + runtime.Sov(uint64(x.HardDeviationBps)) + } + 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().(*SignalDeviation) + 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 x.HardDeviationBps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.HardDeviationBps)) + i-- + dAtA[i] = 0x18 + } + if x.SoftDeviationBps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SoftDeviationBps)) + i-- + dAtA[i] = 0x10 + } + if len(x.SignalId) > 0 { + i -= len(x.SignalId) + copy(dAtA[i:], x.SignalId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignalId))) + 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().(*SignalDeviation) + 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: SignalDeviation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignalDeviation: 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 SignalId", 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.SignalId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBps", wireType) + } + x.SoftDeviationBps = 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.SoftDeviationBps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBps", wireType) + } + x.HardDeviationBps = 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.HardDeviationBps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 _ protoreflect.List = (*_Deposit_3_list)(nil) + +type _Deposit_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Deposit_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Deposit_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Deposit_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Deposit_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Deposit_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Deposit_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Deposit_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Deposit_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Deposit protoreflect.MessageDescriptor + fd_Deposit_tunnel_id protoreflect.FieldDescriptor + fd_Deposit_depositor protoreflect.FieldDescriptor + fd_Deposit_amount protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_Deposit = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Deposit") + fd_Deposit_tunnel_id = md_Deposit.Fields().ByName("tunnel_id") + fd_Deposit_depositor = md_Deposit.Fields().ByName("depositor") + fd_Deposit_amount = md_Deposit.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_Deposit)(nil) + +type fastReflection_Deposit Deposit + +func (x *Deposit) ProtoReflect() protoreflect.Message { + return (*fastReflection_Deposit)(x) +} + +func (x *Deposit) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_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_Deposit_messageType fastReflection_Deposit_messageType +var _ protoreflect.MessageType = fastReflection_Deposit_messageType{} + +type fastReflection_Deposit_messageType struct{} + +func (x fastReflection_Deposit_messageType) Zero() protoreflect.Message { + return (*fastReflection_Deposit)(nil) +} +func (x fastReflection_Deposit_messageType) New() protoreflect.Message { + return new(fastReflection_Deposit) +} +func (x fastReflection_Deposit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Deposit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Deposit) Descriptor() protoreflect.MessageDescriptor { + return md_Deposit +} + +// 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_Deposit) Type() protoreflect.MessageType { + return _fastReflection_Deposit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Deposit) New() protoreflect.Message { + return new(fastReflection_Deposit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Deposit) Interface() protoreflect.ProtoMessage { + return (*Deposit)(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_Deposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_Deposit_tunnel_id, value) { + return + } + } + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_Deposit_depositor, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_Deposit_3_list{list: &x.Amount}) + if !f(fd_Deposit_amount, 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_Deposit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.Deposit.depositor": + return x.Depositor != "" + case "tunnel.v1beta1.Deposit.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.Deposit.depositor": + x.Depositor = "" + case "tunnel.v1beta1.Deposit.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Deposit.depositor": + value := x.Depositor + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.Deposit.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_Deposit_3_list{}) + } + listValue := &_Deposit_3_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.Deposit.depositor": + x.Depositor = value.Interface().(string) + case "tunnel.v1beta1.Deposit.amount": + lv := value.List() + clv := lv.(*_Deposit_3_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_Deposit_3_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Deposit.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.Deposit is not mutable")) + case "tunnel.v1beta1.Deposit.depositor": + panic(fmt.Errorf("field depositor of message tunnel.v1beta1.Deposit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Deposit.depositor": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.Deposit.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Deposit_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Deposit", 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_Deposit) 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_Deposit) 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_Deposit) 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_Deposit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Deposit) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + l = len(x.Depositor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + 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().(*Deposit) + 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.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + 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 len(x.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) + i-- + dAtA[i] = 0x12 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*Deposit) + 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: Deposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = 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 Amount", 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 + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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 _ protoreflect.List = (*_Tunnel_6_list)(nil) + +type _Tunnel_6_list struct { + list *[]*SignalDeviation +} + +func (x *_Tunnel_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Tunnel_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Tunnel_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + (*x.list)[i] = concreteValue +} + +func (x *_Tunnel_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Tunnel_6_list) AppendMutable() protoreflect.Value { + v := new(SignalDeviation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Tunnel_6_list) NewElement() protoreflect.Value { + v := new(SignalDeviation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Tunnel_8_list)(nil) + +type _Tunnel_8_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Tunnel_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Tunnel_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Tunnel_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Tunnel_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Tunnel_8_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Tunnel_8_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_8_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Tunnel protoreflect.MessageDescriptor + fd_Tunnel_id protoreflect.FieldDescriptor + fd_Tunnel_sequence protoreflect.FieldDescriptor + fd_Tunnel_route protoreflect.FieldDescriptor + fd_Tunnel_encoder protoreflect.FieldDescriptor + fd_Tunnel_fee_payer protoreflect.FieldDescriptor + fd_Tunnel_signal_deviations protoreflect.FieldDescriptor + fd_Tunnel_interval protoreflect.FieldDescriptor + fd_Tunnel_total_deposit protoreflect.FieldDescriptor + fd_Tunnel_is_active protoreflect.FieldDescriptor + fd_Tunnel_created_at protoreflect.FieldDescriptor + fd_Tunnel_creator protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_Tunnel = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Tunnel") + fd_Tunnel_id = md_Tunnel.Fields().ByName("id") + fd_Tunnel_sequence = md_Tunnel.Fields().ByName("sequence") + fd_Tunnel_route = md_Tunnel.Fields().ByName("route") + fd_Tunnel_encoder = md_Tunnel.Fields().ByName("encoder") + fd_Tunnel_fee_payer = md_Tunnel.Fields().ByName("fee_payer") + fd_Tunnel_signal_deviations = md_Tunnel.Fields().ByName("signal_deviations") + fd_Tunnel_interval = md_Tunnel.Fields().ByName("interval") + fd_Tunnel_total_deposit = md_Tunnel.Fields().ByName("total_deposit") + fd_Tunnel_is_active = md_Tunnel.Fields().ByName("is_active") + fd_Tunnel_created_at = md_Tunnel.Fields().ByName("created_at") + fd_Tunnel_creator = md_Tunnel.Fields().ByName("creator") +} + +var _ protoreflect.Message = (*fastReflection_Tunnel)(nil) + +type fastReflection_Tunnel Tunnel + +func (x *Tunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_Tunnel)(x) +} + +func (x *Tunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[4] + 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_Tunnel_messageType fastReflection_Tunnel_messageType +var _ protoreflect.MessageType = fastReflection_Tunnel_messageType{} + +type fastReflection_Tunnel_messageType struct{} + +func (x fastReflection_Tunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_Tunnel)(nil) +} +func (x fastReflection_Tunnel_messageType) New() protoreflect.Message { + return new(fastReflection_Tunnel) +} +func (x fastReflection_Tunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Tunnel +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Tunnel) Descriptor() protoreflect.MessageDescriptor { + return md_Tunnel +} + +// 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_Tunnel) Type() protoreflect.MessageType { + return _fastReflection_Tunnel_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Tunnel) New() protoreflect.Message { + return new(fastReflection_Tunnel) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Tunnel) Interface() protoreflect.ProtoMessage { + return (*Tunnel)(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_Tunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_Tunnel_id, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_Tunnel_sequence, value) { + return + } + } + if x.Route != nil { + value := protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + if !f(fd_Tunnel_route, value) { + return + } + } + if x.Encoder != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoder)) + if !f(fd_Tunnel_encoder, value) { + return + } + } + if x.FeePayer != "" { + value := protoreflect.ValueOfString(x.FeePayer) + if !f(fd_Tunnel_fee_payer, value) { + return + } + } + if len(x.SignalDeviations) != 0 { + value := protoreflect.ValueOfList(&_Tunnel_6_list{list: &x.SignalDeviations}) + if !f(fd_Tunnel_signal_deviations, value) { + return + } + } + if x.Interval != uint64(0) { + value := protoreflect.ValueOfUint64(x.Interval) + if !f(fd_Tunnel_interval, value) { + return + } + } + if len(x.TotalDeposit) != 0 { + value := protoreflect.ValueOfList(&_Tunnel_8_list{list: &x.TotalDeposit}) + if !f(fd_Tunnel_total_deposit, value) { + return + } + } + if x.IsActive != false { + value := protoreflect.ValueOfBool(x.IsActive) + if !f(fd_Tunnel_is_active, value) { + return + } + } + if x.CreatedAt != int64(0) { + value := protoreflect.ValueOfInt64(x.CreatedAt) + if !f(fd_Tunnel_created_at, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_Tunnel_creator, 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_Tunnel) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.id": + return x.Id != uint64(0) + case "tunnel.v1beta1.Tunnel.sequence": + return x.Sequence != uint64(0) + case "tunnel.v1beta1.Tunnel.route": + return x.Route != nil + case "tunnel.v1beta1.Tunnel.encoder": + return x.Encoder != 0 + case "tunnel.v1beta1.Tunnel.fee_payer": + return x.FeePayer != "" + case "tunnel.v1beta1.Tunnel.signal_deviations": + return len(x.SignalDeviations) != 0 + case "tunnel.v1beta1.Tunnel.interval": + return x.Interval != uint64(0) + case "tunnel.v1beta1.Tunnel.total_deposit": + return len(x.TotalDeposit) != 0 + case "tunnel.v1beta1.Tunnel.is_active": + return x.IsActive != false + case "tunnel.v1beta1.Tunnel.created_at": + return x.CreatedAt != int64(0) + case "tunnel.v1beta1.Tunnel.creator": + return x.Creator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.id": + x.Id = uint64(0) + case "tunnel.v1beta1.Tunnel.sequence": + x.Sequence = uint64(0) + case "tunnel.v1beta1.Tunnel.route": + x.Route = nil + case "tunnel.v1beta1.Tunnel.encoder": + x.Encoder = 0 + case "tunnel.v1beta1.Tunnel.fee_payer": + x.FeePayer = "" + case "tunnel.v1beta1.Tunnel.signal_deviations": + x.SignalDeviations = nil + case "tunnel.v1beta1.Tunnel.interval": + x.Interval = uint64(0) + case "tunnel.v1beta1.Tunnel.total_deposit": + x.TotalDeposit = nil + case "tunnel.v1beta1.Tunnel.is_active": + x.IsActive = false + case "tunnel.v1beta1.Tunnel.created_at": + x.CreatedAt = int64(0) + case "tunnel.v1beta1.Tunnel.creator": + x.Creator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.Tunnel.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Tunnel.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Tunnel.route": + value := x.Route + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tunnel.v1beta1.Tunnel.encoder": + value := x.Encoder + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "tunnel.v1beta1.Tunnel.fee_payer": + value := x.FeePayer + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.Tunnel.signal_deviations": + if len(x.SignalDeviations) == 0 { + return protoreflect.ValueOfList(&_Tunnel_6_list{}) + } + listValue := &_Tunnel_6_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.Tunnel.interval": + value := x.Interval + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Tunnel.total_deposit": + if len(x.TotalDeposit) == 0 { + return protoreflect.ValueOfList(&_Tunnel_8_list{}) + } + listValue := &_Tunnel_8_list{list: &x.TotalDeposit} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.Tunnel.is_active": + value := x.IsActive + return protoreflect.ValueOfBool(value) + case "tunnel.v1beta1.Tunnel.created_at": + value := x.CreatedAt + return protoreflect.ValueOfInt64(value) + case "tunnel.v1beta1.Tunnel.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.id": + x.Id = value.Uint() + case "tunnel.v1beta1.Tunnel.sequence": + x.Sequence = value.Uint() + case "tunnel.v1beta1.Tunnel.route": + x.Route = value.Message().Interface().(*anypb.Any) + case "tunnel.v1beta1.Tunnel.encoder": + x.Encoder = (Encoder)(value.Enum()) + case "tunnel.v1beta1.Tunnel.fee_payer": + x.FeePayer = value.Interface().(string) + case "tunnel.v1beta1.Tunnel.signal_deviations": + lv := value.List() + clv := lv.(*_Tunnel_6_list) + x.SignalDeviations = *clv.list + case "tunnel.v1beta1.Tunnel.interval": + x.Interval = value.Uint() + case "tunnel.v1beta1.Tunnel.total_deposit": + lv := value.List() + clv := lv.(*_Tunnel_8_list) + x.TotalDeposit = *clv.list + case "tunnel.v1beta1.Tunnel.is_active": + x.IsActive = value.Bool() + case "tunnel.v1beta1.Tunnel.created_at": + x.CreatedAt = value.Int() + case "tunnel.v1beta1.Tunnel.creator": + x.Creator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.route": + if x.Route == nil { + x.Route = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + case "tunnel.v1beta1.Tunnel.signal_deviations": + if x.SignalDeviations == nil { + x.SignalDeviations = []*SignalDeviation{} + } + value := &_Tunnel_6_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Tunnel.total_deposit": + if x.TotalDeposit == nil { + x.TotalDeposit = []*v1beta1.Coin{} + } + value := &_Tunnel_8_list{list: &x.TotalDeposit} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Tunnel.id": + panic(fmt.Errorf("field id of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.sequence": + panic(fmt.Errorf("field sequence of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.encoder": + panic(fmt.Errorf("field encoder of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.fee_payer": + panic(fmt.Errorf("field fee_payer of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.interval": + panic(fmt.Errorf("field interval of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.is_active": + panic(fmt.Errorf("field is_active of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.created_at": + panic(fmt.Errorf("field created_at of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.Tunnel is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Tunnel.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Tunnel.route": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tunnel.v1beta1.Tunnel.encoder": + return protoreflect.ValueOfEnum(0) + case "tunnel.v1beta1.Tunnel.fee_payer": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.Tunnel.signal_deviations": + list := []*SignalDeviation{} + return protoreflect.ValueOfList(&_Tunnel_6_list{list: &list}) + case "tunnel.v1beta1.Tunnel.interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Tunnel.total_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Tunnel_8_list{list: &list}) + case "tunnel.v1beta1.Tunnel.is_active": + return protoreflect.ValueOfBool(false) + case "tunnel.v1beta1.Tunnel.created_at": + return protoreflect.ValueOfInt64(int64(0)) + case "tunnel.v1beta1.Tunnel.creator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Tunnel", 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_Tunnel) 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_Tunnel) 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_Tunnel) 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_Tunnel) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Tunnel) + 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.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.Route != nil { + l = options.Size(x.Route) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Encoder != 0 { + n += 1 + runtime.Sov(uint64(x.Encoder)) + } + l = len(x.FeePayer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.SignalDeviations) > 0 { + for _, e := range x.SignalDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Interval != 0 { + n += 1 + runtime.Sov(uint64(x.Interval)) + } + if len(x.TotalDeposit) > 0 { + for _, e := range x.TotalDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.IsActive { + n += 2 + } + if x.CreatedAt != 0 { + n += 1 + runtime.Sov(uint64(x.CreatedAt)) + } + l = len(x.Creator) + 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().(*Tunnel) + 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.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x5a + } + if x.CreatedAt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) + i-- + dAtA[i] = 0x50 + } + if x.IsActive { + i-- + if x.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(x.TotalDeposit) > 0 { + for iNdEx := len(x.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TotalDeposit[iNdEx]) + 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] = 0x42 + } + } + if x.Interval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Interval)) + i-- + dAtA[i] = 0x38 + } + if len(x.SignalDeviations) > 0 { + for iNdEx := len(x.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalDeviations[iNdEx]) + 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] = 0x32 + } + } + if len(x.FeePayer) > 0 { + i -= len(x.FeePayer) + copy(dAtA[i:], x.FeePayer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeePayer))) + i-- + dAtA[i] = 0x2a + } + if x.Encoder != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoder)) + i-- + dAtA[i] = 0x20 + } + if x.Route != nil { + encoded, err := options.Marshal(x.Route) + 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.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x10 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + 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().(*Tunnel) + 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: Tunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Tunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 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.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Route", 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.Route == nil { + x.Route = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Route); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) + } + x.Encoder = 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.Encoder |= Encoder(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 FeePayer", 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.FeePayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", 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 + } + x.SignalDeviations = append(x.SignalDeviations, &SignalDeviation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalDeviations[len(x.SignalDeviations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + x.Interval = 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.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", 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 + } + x.TotalDeposit = append(x.TotalDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalDeposit[len(x.TotalDeposit)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.IsActive = bool(v != 0) + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + x.CreatedAt = 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.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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 _ protoreflect.List = (*_LatestSignalPrices_2_list)(nil) + +type _LatestSignalPrices_2_list struct { + list *[]*SignalPrice +} + +func (x *_LatestSignalPrices_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_LatestSignalPrices_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_LatestSignalPrices_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalPrice) + (*x.list)[i] = concreteValue +} + +func (x *_LatestSignalPrices_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalPrice) + *x.list = append(*x.list, concreteValue) +} + +func (x *_LatestSignalPrices_2_list) AppendMutable() protoreflect.Value { + v := new(SignalPrice) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_LatestSignalPrices_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_LatestSignalPrices_2_list) NewElement() protoreflect.Value { + v := new(SignalPrice) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_LatestSignalPrices_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_LatestSignalPrices protoreflect.MessageDescriptor + fd_LatestSignalPrices_tunnel_id protoreflect.FieldDescriptor + fd_LatestSignalPrices_signal_prices protoreflect.FieldDescriptor + fd_LatestSignalPrices_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_LatestSignalPrices = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestSignalPrices") + fd_LatestSignalPrices_tunnel_id = md_LatestSignalPrices.Fields().ByName("tunnel_id") + fd_LatestSignalPrices_signal_prices = md_LatestSignalPrices.Fields().ByName("signal_prices") + fd_LatestSignalPrices_timestamp = md_LatestSignalPrices.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_LatestSignalPrices)(nil) + +type fastReflection_LatestSignalPrices LatestSignalPrices + +func (x *LatestSignalPrices) ProtoReflect() protoreflect.Message { + return (*fastReflection_LatestSignalPrices)(x) +} + +func (x *LatestSignalPrices) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[5] + 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_LatestSignalPrices_messageType fastReflection_LatestSignalPrices_messageType +var _ protoreflect.MessageType = fastReflection_LatestSignalPrices_messageType{} + +type fastReflection_LatestSignalPrices_messageType struct{} + +func (x fastReflection_LatestSignalPrices_messageType) Zero() protoreflect.Message { + return (*fastReflection_LatestSignalPrices)(nil) +} +func (x fastReflection_LatestSignalPrices_messageType) New() protoreflect.Message { + return new(fastReflection_LatestSignalPrices) +} +func (x fastReflection_LatestSignalPrices_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LatestSignalPrices +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_LatestSignalPrices) Descriptor() protoreflect.MessageDescriptor { + return md_LatestSignalPrices +} + +// 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_LatestSignalPrices) Type() protoreflect.MessageType { + return _fastReflection_LatestSignalPrices_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_LatestSignalPrices) New() protoreflect.Message { + return new(fastReflection_LatestSignalPrices) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_LatestSignalPrices) Interface() protoreflect.ProtoMessage { + return (*LatestSignalPrices)(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_LatestSignalPrices) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_LatestSignalPrices_tunnel_id, value) { + return + } + } + if len(x.SignalPrices) != 0 { + value := protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &x.SignalPrices}) + if !f(fd_LatestSignalPrices_signal_prices, value) { + return + } + } + if x.Timestamp != int64(0) { + value := protoreflect.ValueOfInt64(x.Timestamp) + if !f(fd_LatestSignalPrices_timestamp, 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_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + return len(x.SignalPrices) != 0 + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + return x.Timestamp != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + x.SignalPrices = nil + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + x.Timestamp = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + if len(x.SignalPrices) == 0 { + return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{}) + } + listValue := &_LatestSignalPrices_2_list{list: &x.SignalPrices} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + value := x.Timestamp + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + lv := value.List() + clv := lv.(*_LatestSignalPrices_2_list) + x.SignalPrices = *clv.list + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + x.Timestamp = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + if x.SignalPrices == nil { + x.SignalPrices = []*SignalPrice{} + } + value := &_LatestSignalPrices_2_list{list: &x.SignalPrices} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.LatestSignalPrices is not mutable")) + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + panic(fmt.Errorf("field timestamp of message tunnel.v1beta1.LatestSignalPrices is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + list := []*SignalPrice{} + return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &list}) + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.LatestSignalPrices", 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_LatestSignalPrices) 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_LatestSignalPrices) 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_LatestSignalPrices) 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_LatestSignalPrices) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*LatestSignalPrices) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.SignalPrices) > 0 { + for _, e := range x.SignalPrices { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Timestamp != 0 { + n += 1 + runtime.Sov(uint64(x.Timestamp)) + } + 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().(*LatestSignalPrices) + 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 x.Timestamp != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) + i-- + dAtA[i] = 0x18 + } + if len(x.SignalPrices) > 0 { + for iNdEx := len(x.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalPrices[iNdEx]) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*LatestSignalPrices) + 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: LatestSignalPrices: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestSignalPrices: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", 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 + } + x.SignalPrices = append(x.SignalPrices, &SignalPrice{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalPrices[len(x.SignalPrices)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + x.Timestamp = 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.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_SignalPrice protoreflect.MessageDescriptor + fd_SignalPrice_signal_id protoreflect.FieldDescriptor + fd_SignalPrice_price protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_SignalPrice = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalPrice") + fd_SignalPrice_signal_id = md_SignalPrice.Fields().ByName("signal_id") + fd_SignalPrice_price = md_SignalPrice.Fields().ByName("price") +} + +var _ protoreflect.Message = (*fastReflection_SignalPrice)(nil) + +type fastReflection_SignalPrice SignalPrice + +func (x *SignalPrice) ProtoReflect() protoreflect.Message { + return (*fastReflection_SignalPrice)(x) +} + +func (x *SignalPrice) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[6] + 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_SignalPrice_messageType fastReflection_SignalPrice_messageType +var _ protoreflect.MessageType = fastReflection_SignalPrice_messageType{} + +type fastReflection_SignalPrice_messageType struct{} + +func (x fastReflection_SignalPrice_messageType) Zero() protoreflect.Message { + return (*fastReflection_SignalPrice)(nil) +} +func (x fastReflection_SignalPrice_messageType) New() protoreflect.Message { + return new(fastReflection_SignalPrice) +} +func (x fastReflection_SignalPrice_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SignalPrice +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SignalPrice) Descriptor() protoreflect.MessageDescriptor { + return md_SignalPrice +} + +// 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_SignalPrice) Type() protoreflect.MessageType { + return _fastReflection_SignalPrice_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SignalPrice) New() protoreflect.Message { + return new(fastReflection_SignalPrice) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SignalPrice) Interface() protoreflect.ProtoMessage { + return (*SignalPrice)(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_SignalPrice) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SignalId != "" { + value := protoreflect.ValueOfString(x.SignalId) + if !f(fd_SignalPrice_signal_id, value) { + return + } + } + if x.Price != uint64(0) { + value := protoreflect.ValueOfUint64(x.Price) + if !f(fd_SignalPrice_price, 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_SignalPrice) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + return x.SignalId != "" + case "tunnel.v1beta1.SignalPrice.price": + return x.Price != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + x.SignalId = "" + case "tunnel.v1beta1.SignalPrice.price": + x.Price = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + value := x.SignalId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.SignalPrice.price": + value := x.Price + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + x.SignalId = value.Interface().(string) + case "tunnel.v1beta1.SignalPrice.price": + x.Price = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + panic(fmt.Errorf("field signal_id of message tunnel.v1beta1.SignalPrice is not mutable")) + case "tunnel.v1beta1.SignalPrice.price": + panic(fmt.Errorf("field price of message tunnel.v1beta1.SignalPrice is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.SignalPrice.price": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.SignalPrice", 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_SignalPrice) 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_SignalPrice) 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_SignalPrice) 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_SignalPrice) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SignalPrice) + 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.SignalId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Price != 0 { + n += 1 + runtime.Sov(uint64(x.Price)) + } + 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().(*SignalPrice) + 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 x.Price != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Price)) + i-- + dAtA[i] = 0x10 + } + if len(x.SignalId) > 0 { + i -= len(x.SignalId) + copy(dAtA[i:], x.SignalId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignalId))) + 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().(*SignalPrice) + 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: SignalPrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignalPrice: 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 SignalId", 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.SignalId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + x.Price = 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.Price |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 _ protoreflect.List = (*_TotalFees_1_list)(nil) + +type _TotalFees_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_TotalFees_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_TotalFees_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_TotalFees_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_TotalFees_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_TotalFees_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_TotalFees_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_TotalFees_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_TotalFees_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_TotalFees protoreflect.MessageDescriptor + fd_TotalFees_total_packet_fee protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_TotalFees = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TotalFees") + fd_TotalFees_total_packet_fee = md_TotalFees.Fields().ByName("total_packet_fee") +} + +var _ protoreflect.Message = (*fastReflection_TotalFees)(nil) + +type fastReflection_TotalFees TotalFees + +func (x *TotalFees) ProtoReflect() protoreflect.Message { + return (*fastReflection_TotalFees)(x) +} + +func (x *TotalFees) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[7] + 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_TotalFees_messageType fastReflection_TotalFees_messageType +var _ protoreflect.MessageType = fastReflection_TotalFees_messageType{} + +type fastReflection_TotalFees_messageType struct{} + +func (x fastReflection_TotalFees_messageType) Zero() protoreflect.Message { + return (*fastReflection_TotalFees)(nil) +} +func (x fastReflection_TotalFees_messageType) New() protoreflect.Message { + return new(fastReflection_TotalFees) +} +func (x fastReflection_TotalFees_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TotalFees +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TotalFees) Descriptor() protoreflect.MessageDescriptor { + return md_TotalFees +} + +// 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_TotalFees) Type() protoreflect.MessageType { + return _fastReflection_TotalFees_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TotalFees) New() protoreflect.Message { + return new(fastReflection_TotalFees) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TotalFees) Interface() protoreflect.ProtoMessage { + return (*TotalFees)(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_TotalFees) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.TotalPacketFee) != 0 { + value := protoreflect.ValueOfList(&_TotalFees_1_list{list: &x.TotalPacketFee}) + if !f(fd_TotalFees_total_packet_fee, 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_TotalFees) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + return len(x.TotalPacketFee) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + x.TotalPacketFee = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + if len(x.TotalPacketFee) == 0 { + return protoreflect.ValueOfList(&_TotalFees_1_list{}) + } + listValue := &_TotalFees_1_list{list: &x.TotalPacketFee} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + lv := value.List() + clv := lv.(*_TotalFees_1_list) + x.TotalPacketFee = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + if x.TotalPacketFee == nil { + x.TotalPacketFee = []*v1beta1.Coin{} + } + value := &_TotalFees_1_list{list: &x.TotalPacketFee} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_TotalFees_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TotalFees", 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_TotalFees) 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_TotalFees) 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_TotalFees) 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_TotalFees) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TotalFees) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.TotalPacketFee) > 0 { + for _, e := range x.TotalPacketFee { + l = options.Size(e) + 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().(*TotalFees) + 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.TotalPacketFee) > 0 { + for iNdEx := len(x.TotalPacketFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TotalPacketFee[iNdEx]) + 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().(*TotalFees) + 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: TotalFees: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TotalFees: 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 TotalPacketFee", 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 + } + x.TotalPacketFee = append(x.TotalPacketFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalPacketFee[len(x.TotalPacketFee)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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 _ protoreflect.List = (*_Packet_3_list)(nil) + +type _Packet_3_list struct { + list *[]*SignalPrice +} + +func (x *_Packet_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Packet_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Packet_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalPrice) + (*x.list)[i] = concreteValue +} + +func (x *_Packet_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalPrice) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Packet_3_list) AppendMutable() protoreflect.Value { + v := new(SignalPrice) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Packet_3_list) NewElement() protoreflect.Value { + v := new(SignalPrice) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Packet protoreflect.MessageDescriptor + fd_Packet_tunnel_id protoreflect.FieldDescriptor + fd_Packet_sequence protoreflect.FieldDescriptor + fd_Packet_signal_prices protoreflect.FieldDescriptor + fd_Packet_packet_content protoreflect.FieldDescriptor + fd_Packet_created_at protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_Packet = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Packet") + fd_Packet_tunnel_id = md_Packet.Fields().ByName("tunnel_id") + fd_Packet_sequence = md_Packet.Fields().ByName("sequence") + fd_Packet_signal_prices = md_Packet.Fields().ByName("signal_prices") + fd_Packet_packet_content = md_Packet.Fields().ByName("packet_content") + fd_Packet_created_at = md_Packet.Fields().ByName("created_at") +} + +var _ protoreflect.Message = (*fastReflection_Packet)(nil) + +type fastReflection_Packet Packet + +func (x *Packet) ProtoReflect() protoreflect.Message { + return (*fastReflection_Packet)(x) +} + +func (x *Packet) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[8] + 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_Packet_messageType fastReflection_Packet_messageType +var _ protoreflect.MessageType = fastReflection_Packet_messageType{} + +type fastReflection_Packet_messageType struct{} + +func (x fastReflection_Packet_messageType) Zero() protoreflect.Message { + return (*fastReflection_Packet)(nil) +} +func (x fastReflection_Packet_messageType) New() protoreflect.Message { + return new(fastReflection_Packet) +} +func (x fastReflection_Packet_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Packet +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Packet) Descriptor() protoreflect.MessageDescriptor { + return md_Packet +} + +// 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_Packet) Type() protoreflect.MessageType { + return _fastReflection_Packet_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Packet) New() protoreflect.Message { + return new(fastReflection_Packet) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Packet) Interface() protoreflect.ProtoMessage { + return (*Packet)(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_Packet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_Packet_tunnel_id, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_Packet_sequence, value) { + return + } + } + if len(x.SignalPrices) != 0 { + value := protoreflect.ValueOfList(&_Packet_3_list{list: &x.SignalPrices}) + if !f(fd_Packet_signal_prices, value) { + return + } + } + if x.PacketContent != nil { + value := protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) + if !f(fd_Packet_packet_content, value) { + return + } + } + if x.CreatedAt != int64(0) { + value := protoreflect.ValueOfInt64(x.CreatedAt) + if !f(fd_Packet_created_at, 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_Packet) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.Packet.sequence": + return x.Sequence != uint64(0) + case "tunnel.v1beta1.Packet.signal_prices": + return len(x.SignalPrices) != 0 + case "tunnel.v1beta1.Packet.packet_content": + return x.PacketContent != nil + case "tunnel.v1beta1.Packet.created_at": + return x.CreatedAt != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.Packet.sequence": + x.Sequence = uint64(0) + case "tunnel.v1beta1.Packet.signal_prices": + x.SignalPrices = nil + case "tunnel.v1beta1.Packet.packet_content": + x.PacketContent = nil + case "tunnel.v1beta1.Packet.created_at": + x.CreatedAt = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Packet.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Packet.signal_prices": + if len(x.SignalPrices) == 0 { + return protoreflect.ValueOfList(&_Packet_3_list{}) + } + listValue := &_Packet_3_list{list: &x.SignalPrices} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.Packet.packet_content": + value := x.PacketContent + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tunnel.v1beta1.Packet.created_at": + value := x.CreatedAt + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.Packet.sequence": + x.Sequence = value.Uint() + case "tunnel.v1beta1.Packet.signal_prices": + lv := value.List() + clv := lv.(*_Packet_3_list) + x.SignalPrices = *clv.list + case "tunnel.v1beta1.Packet.packet_content": + x.PacketContent = value.Message().Interface().(*anypb.Any) + case "tunnel.v1beta1.Packet.created_at": + x.CreatedAt = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.signal_prices": + if x.SignalPrices == nil { + x.SignalPrices = []*SignalPrice{} + } + value := &_Packet_3_list{list: &x.SignalPrices} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Packet.packet_content": + if x.PacketContent == nil { + x.PacketContent = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) + case "tunnel.v1beta1.Packet.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.Packet is not mutable")) + case "tunnel.v1beta1.Packet.sequence": + panic(fmt.Errorf("field sequence of message tunnel.v1beta1.Packet is not mutable")) + case "tunnel.v1beta1.Packet.created_at": + panic(fmt.Errorf("field created_at of message tunnel.v1beta1.Packet is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Packet.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Packet.signal_prices": + list := []*SignalPrice{} + return protoreflect.ValueOfList(&_Packet_3_list{list: &list}) + case "tunnel.v1beta1.Packet.packet_content": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tunnel.v1beta1.Packet.created_at": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Packet", 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_Packet) 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_Packet) 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_Packet) 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_Packet) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Packet) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if len(x.SignalPrices) > 0 { + for _, e := range x.SignalPrices { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.PacketContent != nil { + l = options.Size(x.PacketContent) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.CreatedAt != 0 { + n += 1 + runtime.Sov(uint64(x.CreatedAt)) + } + 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().(*Packet) + 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 x.CreatedAt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) + i-- + dAtA[i] = 0x28 + } + if x.PacketContent != nil { + encoded, err := options.Marshal(x.PacketContent) + 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] = 0x22 + } + if len(x.SignalPrices) > 0 { + for iNdEx := len(x.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalPrices[iNdEx]) + 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.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x10 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*Packet) + 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: Packet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", 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 + } + x.SignalPrices = append(x.SignalPrices, &SignalPrice{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalPrices[len(x.SignalPrices)-1]); 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 PacketContent", 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.PacketContent == nil { + x.PacketContent = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PacketContent); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + x.CreatedAt = 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.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_TSSPacketContent protoreflect.MessageDescriptor + fd_TSSPacketContent_signing_id protoreflect.FieldDescriptor + fd_TSSPacketContent_destination_chain_id protoreflect.FieldDescriptor + fd_TSSPacketContent_destination_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_TSSPacketContent = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSPacketContent") + fd_TSSPacketContent_signing_id = md_TSSPacketContent.Fields().ByName("signing_id") + fd_TSSPacketContent_destination_chain_id = md_TSSPacketContent.Fields().ByName("destination_chain_id") + fd_TSSPacketContent_destination_contract_address = md_TSSPacketContent.Fields().ByName("destination_contract_address") +} + +var _ protoreflect.Message = (*fastReflection_TSSPacketContent)(nil) + +type fastReflection_TSSPacketContent TSSPacketContent + +func (x *TSSPacketContent) ProtoReflect() protoreflect.Message { + return (*fastReflection_TSSPacketContent)(x) +} + +func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[9] + 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_TSSPacketContent_messageType fastReflection_TSSPacketContent_messageType +var _ protoreflect.MessageType = fastReflection_TSSPacketContent_messageType{} + +type fastReflection_TSSPacketContent_messageType struct{} + +func (x fastReflection_TSSPacketContent_messageType) Zero() protoreflect.Message { + return (*fastReflection_TSSPacketContent)(nil) +} +func (x fastReflection_TSSPacketContent_messageType) New() protoreflect.Message { + return new(fastReflection_TSSPacketContent) +} +func (x fastReflection_TSSPacketContent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TSSPacketContent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TSSPacketContent) Descriptor() protoreflect.MessageDescriptor { + return md_TSSPacketContent +} + +// 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_TSSPacketContent) Type() protoreflect.MessageType { + return _fastReflection_TSSPacketContent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TSSPacketContent) New() protoreflect.Message { + return new(fastReflection_TSSPacketContent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TSSPacketContent) Interface() protoreflect.ProtoMessage { + return (*TSSPacketContent)(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_TSSPacketContent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SigningId != uint64(0) { + value := protoreflect.ValueOfUint64(x.SigningId) + if !f(fd_TSSPacketContent_signing_id, value) { + return + } + } + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_TSSPacketContent_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_TSSPacketContent_destination_contract_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_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + return x.SigningId != uint64(0) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + return x.DestinationChainId != "" + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + return x.DestinationContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + x.SigningId = uint64(0) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + x.DestinationChainId = "" + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + x.DestinationContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + value := x.SigningId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + x.SigningId = value.Uint() + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + panic(fmt.Errorf("field signing_id of message tunnel.v1beta1.TSSPacketContent is not mutable")) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message tunnel.v1beta1.TSSPacketContent is not mutable")) + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message tunnel.v1beta1.TSSPacketContent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TSSPacketContent", 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_TSSPacketContent) 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_TSSPacketContent) 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_TSSPacketContent) 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_TSSPacketContent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TSSPacketContent) + 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.SigningId != 0 { + n += 1 + runtime.Sov(uint64(x.SigningId)) + } + l = len(x.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + 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().(*TSSPacketContent) + 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.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x1a + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + i-- + dAtA[i] = 0x12 + } + if x.SigningId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SigningId)) + i-- + dAtA[i] = 0x8 + } + 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().(*TSSPacketContent) + 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: TSSPacketContent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigningId", wireType) + } + x.SigningId = 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.SigningId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = 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_AxelarPacketContent protoreflect.MessageDescriptor + fd_AxelarPacketContent_ibc_queue_id protoreflect.FieldDescriptor + fd_AxelarPacketContent_destination_chain_id protoreflect.FieldDescriptor + fd_AxelarPacketContent_destination_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_AxelarPacketContent = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("AxelarPacketContent") + fd_AxelarPacketContent_ibc_queue_id = md_AxelarPacketContent.Fields().ByName("ibc_queue_id") + fd_AxelarPacketContent_destination_chain_id = md_AxelarPacketContent.Fields().ByName("destination_chain_id") + fd_AxelarPacketContent_destination_contract_address = md_AxelarPacketContent.Fields().ByName("destination_contract_address") +} + +var _ protoreflect.Message = (*fastReflection_AxelarPacketContent)(nil) + +type fastReflection_AxelarPacketContent AxelarPacketContent + +func (x *AxelarPacketContent) ProtoReflect() protoreflect.Message { + return (*fastReflection_AxelarPacketContent)(x) +} + +func (x *AxelarPacketContent) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[10] + 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_AxelarPacketContent_messageType fastReflection_AxelarPacketContent_messageType +var _ protoreflect.MessageType = fastReflection_AxelarPacketContent_messageType{} + +type fastReflection_AxelarPacketContent_messageType struct{} + +func (x fastReflection_AxelarPacketContent_messageType) Zero() protoreflect.Message { + return (*fastReflection_AxelarPacketContent)(nil) +} +func (x fastReflection_AxelarPacketContent_messageType) New() protoreflect.Message { + return new(fastReflection_AxelarPacketContent) +} +func (x fastReflection_AxelarPacketContent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AxelarPacketContent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AxelarPacketContent) Descriptor() protoreflect.MessageDescriptor { + return md_AxelarPacketContent +} + +// 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_AxelarPacketContent) Type() protoreflect.MessageType { + return _fastReflection_AxelarPacketContent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AxelarPacketContent) New() protoreflect.Message { + return new(fastReflection_AxelarPacketContent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AxelarPacketContent) Interface() protoreflect.ProtoMessage { + return (*AxelarPacketContent)(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_AxelarPacketContent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.IbcQueueId != uint64(0) { + value := protoreflect.ValueOfUint64(x.IbcQueueId) + if !f(fd_AxelarPacketContent_ibc_queue_id, value) { + return + } + } + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_AxelarPacketContent_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_AxelarPacketContent_destination_contract_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_AxelarPacketContent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarPacketContent.ibc_queue_id": + return x.IbcQueueId != uint64(0) + case "tunnel.v1beta1.AxelarPacketContent.destination_chain_id": + return x.DestinationChainId != "" + case "tunnel.v1beta1.AxelarPacketContent.destination_contract_address": + return x.DestinationContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarPacketContent 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_AxelarPacketContent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarPacketContent.ibc_queue_id": + x.IbcQueueId = uint64(0) + case "tunnel.v1beta1.AxelarPacketContent.destination_chain_id": + x.DestinationChainId = "" + case "tunnel.v1beta1.AxelarPacketContent.destination_contract_address": + x.DestinationContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarPacketContent 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_AxelarPacketContent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.AxelarPacketContent.ibc_queue_id": + value := x.IbcQueueId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.AxelarPacketContent.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.AxelarPacketContent.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarPacketContent 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_AxelarPacketContent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarPacketContent.ibc_queue_id": + x.IbcQueueId = value.Uint() + case "tunnel.v1beta1.AxelarPacketContent.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "tunnel.v1beta1.AxelarPacketContent.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarPacketContent 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_AxelarPacketContent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarPacketContent.ibc_queue_id": + panic(fmt.Errorf("field ibc_queue_id of message tunnel.v1beta1.AxelarPacketContent is not mutable")) + case "tunnel.v1beta1.AxelarPacketContent.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message tunnel.v1beta1.AxelarPacketContent is not mutable")) + case "tunnel.v1beta1.AxelarPacketContent.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message tunnel.v1beta1.AxelarPacketContent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarPacketContent 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_AxelarPacketContent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.AxelarPacketContent.ibc_queue_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.AxelarPacketContent.destination_chain_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.AxelarPacketContent.destination_contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.AxelarPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.AxelarPacketContent 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_AxelarPacketContent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.AxelarPacketContent", 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_AxelarPacketContent) 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_AxelarPacketContent) 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_AxelarPacketContent) 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_AxelarPacketContent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AxelarPacketContent) + 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.IbcQueueId != 0 { + n += 1 + runtime.Sov(uint64(x.IbcQueueId)) + } + l = len(x.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + 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().(*AxelarPacketContent) + 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.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x1a + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + i-- + dAtA[i] = 0x12 + } + if x.IbcQueueId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.IbcQueueId)) + i-- + dAtA[i] = 0x8 + } + 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().(*AxelarPacketContent) + 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: AxelarPacketContent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AxelarPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcQueueId", wireType) + } + x.IbcQueueId = 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.IbcQueueId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = 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: tunnel/v1beta1/tunnel.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) +) + +// Encoder is an enumerator that defines the mode of encoding message in tunnel module. +type Encoder int32 + +const ( + // ENCODER_UNSPECIFIED is an unspecified encoder mode. + Encoder_ENCODER_UNSPECIFIED Encoder = 0 + // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). + Encoder_ENCODER_FIXED_POINT_ABI Encoder = 1 + // ENCODER_TICK_ABI is a tick abi encoder. + Encoder_ENCODER_TICK_ABI Encoder = 2 +) + +// Enum value maps for Encoder. +var ( + Encoder_name = map[int32]string{ + 0: "ENCODER_UNSPECIFIED", + 1: "ENCODER_FIXED_POINT_ABI", + 2: "ENCODER_TICK_ABI", + } + Encoder_value = map[string]int32{ + "ENCODER_UNSPECIFIED": 0, + "ENCODER_FIXED_POINT_ABI": 1, + "ENCODER_TICK_ABI": 2, + } +) + +func (x Encoder) Enum() *Encoder { + p := new(Encoder) + *p = x + return p +} + +func (x Encoder) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Encoder) Descriptor() protoreflect.EnumDescriptor { + return file_tunnel_v1beta1_tunnel_proto_enumTypes[0].Descriptor() +} + +func (Encoder) Type() protoreflect.EnumType { + return &file_tunnel_v1beta1_tunnel_proto_enumTypes[0] +} + +func (x Encoder) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Encoder.Descriptor instead. +func (Encoder) EnumDescriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} +} + +// TSSRoute is the type for a TSS route +type TSSRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (x *TSSRoute) Reset() { + *x = TSSRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TSSRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TSSRoute) ProtoMessage() {} + +// Deprecated: Use TSSRoute.ProtoReflect.Descriptor instead. +func (*TSSRoute) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} +} + +func (x *TSSRoute) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *TSSRoute) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +// AxelarRoute is the type for an Axelar route +type AxelarRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (x *AxelarRoute) Reset() { + *x = AxelarRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AxelarRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AxelarRoute) ProtoMessage() {} + +// Deprecated: Use AxelarRoute.ProtoReflect.Descriptor instead. +func (*AxelarRoute) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{1} +} + +func (x *AxelarRoute) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *AxelarRoute) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +// SignalDeviation is the type for a signal with soft and hard deviation +type SignalDeviation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signal_id is the signal ID + SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // soft_deviation_bps is the soft deviation in basis points + SoftDeviationBps uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` + // hard_deviation_bps is the hard deviation in basis points + HardDeviationBps uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` +} + +func (x *SignalDeviation) Reset() { + *x = SignalDeviation{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalDeviation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalDeviation) ProtoMessage() {} + +// Deprecated: Use SignalDeviation.ProtoReflect.Descriptor instead. +func (*SignalDeviation) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{2} +} + +func (x *SignalDeviation) GetSignalId() string { + if x != nil { + return x.SignalId + } + return "" +} + +func (x *SignalDeviation) GetSoftDeviationBps() uint64 { + if x != nil { + return x.SoftDeviationBps + } + return 0 +} + +func (x *SignalDeviation) GetHardDeviationBps() uint64 { + if x != nil { + return x.HardDeviationBps + } + return 0 +} + +// Deposit defines an amount deposited by an account address to the tunnel. +type Deposit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // depositor defines the deposit addresses from the proposals. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` + // amount to be deposited by depositor. + Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *Deposit) Reset() { + *x = Deposit{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Deposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Deposit) ProtoMessage() {} + +// Deprecated: Use Deposit.ProtoReflect.Descriptor instead. +func (*Deposit) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{3} +} + +func (x *Deposit) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *Deposit) GetDepositor() string { + if x != nil { + return x.Depositor + } + return "" +} + +func (x *Deposit) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// Tunnel is the type for a tunnel +type Tunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the tunnel ID + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // sequence is representing the sequence of the tunnel packet. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // route is the route for delivering the signal prices + Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + // encoder is the mode of encoding price signal data. + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + // fee_payer is the address of the fee payer + FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + // signal_deviations is the list of signal deviations + SignalDeviations []*SignalDeviation `protobuf:"bytes,6,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations,omitempty"` + // interval is the interval for delivering the signal prices + Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` + // total_deposit is the total deposit on the tunnel. + TotalDeposit []*v1beta1.Coin `protobuf:"bytes,8,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"` + // is_active is the flag to indicate if the tunnel is active + IsActive bool `protobuf:"varint,9,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + // created_at is the timestamp when the tunnel is created + CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // creator is the address of the creator + Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *Tunnel) Reset() { + *x = Tunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tunnel) ProtoMessage() {} + +// Deprecated: Use Tunnel.ProtoReflect.Descriptor instead. +func (*Tunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{4} +} + +func (x *Tunnel) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Tunnel) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *Tunnel) GetRoute() *anypb.Any { + if x != nil { + return x.Route + } + return nil +} + +func (x *Tunnel) GetEncoder() Encoder { + if x != nil { + return x.Encoder + } + return Encoder_ENCODER_UNSPECIFIED +} + +func (x *Tunnel) GetFeePayer() string { + if x != nil { + return x.FeePayer + } + return "" +} + +func (x *Tunnel) GetSignalDeviations() []*SignalDeviation { + if x != nil { + return x.SignalDeviations + } + return nil +} + +func (x *Tunnel) GetInterval() uint64 { + if x != nil { + return x.Interval + } + return 0 +} + +func (x *Tunnel) GetTotalDeposit() []*v1beta1.Coin { + if x != nil { + return x.TotalDeposit + } + return nil +} + +func (x *Tunnel) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *Tunnel) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *Tunnel) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +// LatestSignalPrices is the type for signal prices that tunnel produces +type LatestSignalPrices struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the tunnel ID + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // signal_prices is the list of signal prices + SignalPrices []*SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` + // timestamp is the timestamp when the signal prices are produced + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *LatestSignalPrices) Reset() { + *x = LatestSignalPrices{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LatestSignalPrices) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LatestSignalPrices) ProtoMessage() {} + +// Deprecated: Use LatestSignalPrices.ProtoReflect.Descriptor instead. +func (*LatestSignalPrices) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{5} +} + +func (x *LatestSignalPrices) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *LatestSignalPrices) GetSignalPrices() []*SignalPrice { + if x != nil { + return x.SignalPrices + } + return nil +} + +func (x *LatestSignalPrices) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +// SignalPrice is the type for a signal price +type SignalPrice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signal_id is the signal ID + SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // price is the price of the signal + Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` +} + +func (x *SignalPrice) Reset() { + *x = SignalPrice{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalPrice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalPrice) ProtoMessage() {} + +// Deprecated: Use SignalPrice.ProtoReflect.Descriptor instead. +func (*SignalPrice) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{6} +} + +func (x *SignalPrice) GetSignalId() string { + if x != nil { + return x.SignalId + } + return "" +} + +func (x *SignalPrice) GetPrice() uint64 { + if x != nil { + return x.Price + } + return 0 +} + +// TotalFees is the type for the total fees collected by the tunnel +type TotalFees struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // total_packet_fee is the total packet fee collected + TotalPacketFee []*v1beta1.Coin `protobuf:"bytes,1,rep,name=total_packet_fee,json=totalPacketFee,proto3" json:"total_packet_fee,omitempty"` +} + +func (x *TotalFees) Reset() { + *x = TotalFees{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TotalFees) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TotalFees) ProtoMessage() {} + +// Deprecated: Use TotalFees.ProtoReflect.Descriptor instead. +func (*TotalFees) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{7} +} + +func (x *TotalFees) GetTotalPacketFee() []*v1beta1.Coin { + if x != nil { + return x.TotalPacketFee + } + return nil +} + +// Packet is the packet that tunnel produces +type Packet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the tunnel ID + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // sequence is representing the sequence of the tunnel packet. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // signal_prices is the list of signal prices + SignalPrices []*SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` + // packet_content is the content of the packet that implements PacketContentI + PacketContent *anypb.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + // created_at is the timestamp when the packet is created + CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (x *Packet) Reset() { + *x = Packet{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Packet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Packet) ProtoMessage() {} + +// Deprecated: Use Packet.ProtoReflect.Descriptor instead. +func (*Packet) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{8} +} + +func (x *Packet) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *Packet) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *Packet) GetSignalPrices() []*SignalPrice { + if x != nil { + return x.SignalPrices + } + return nil +} + +func (x *Packet) GetPacketContent() *anypb.Any { + if x != nil { + return x.PacketContent + } + return nil +} + +func (x *Packet) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +// TSSPacketContent is the packet content for TSS +type TSSPacketContent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signing_id is the signing ID + SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (x *TSSPacketContent) Reset() { + *x = TSSPacketContent{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TSSPacketContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TSSPacketContent) ProtoMessage() {} + +// Deprecated: Use TSSPacketContent.ProtoReflect.Descriptor instead. +func (*TSSPacketContent) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{9} +} + +func (x *TSSPacketContent) GetSigningId() uint64 { + if x != nil { + return x.SigningId + } + return 0 +} + +func (x *TSSPacketContent) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *TSSPacketContent) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +// AxelarPacketContent is the packet content for Axelar +type AxelarPacketContent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ibc_queue_id is the IBC queue ID + IbcQueueId uint64 `protobuf:"varint,1,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (x *AxelarPacketContent) Reset() { + *x = AxelarPacketContent{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AxelarPacketContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AxelarPacketContent) ProtoMessage() {} + +// Deprecated: Use AxelarPacketContent.ProtoReflect.Descriptor instead. +func (*AxelarPacketContent) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{10} +} + +func (x *AxelarPacketContent) GetIbcQueueId() uint64 { + if x != nil { + return x.IbcQueueId + } + return 0 +} + +func (x *AxelarPacketContent) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *AxelarPacketContent) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +var File_tunnel_v1beta1_tunnel_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 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, 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, 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, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, + 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0xa5, 0x01, 0x0a, + 0x0b, 0x41, 0x78, 0x65, 0x6c, 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x49, 0x22, 0xca, 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, + 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, + 0x01, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x0a, + 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, + 0x22, 0xbb, 0x04, 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x06, 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, + 0x36, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, 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, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, + 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x65, + 0x65, 0x5f, 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x08, 0x66, 0x65, 0x65, 0x50, 0x61, 0x79, 0x65, + 0x72, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x18, 0x08, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xab, + 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x46, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, + 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, + 0x1f, 0x01, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, + 0x12, 0x75, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x87, 0x02, + 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, + 0x46, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0a, + 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, + 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, + 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x22, 0xe7, 0x01, 0x0a, 0x13, 0x41, 0x78, 0x65, + 0x6c, 0x61, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x12, 0x30, 0x0a, 0x0c, 0x69, 0x62, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0e, 0xe2, 0xde, 0x1f, 0x0a, 0x49, 0x42, 0x43, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x49, 0x44, 0x52, 0x0a, 0x69, 0x62, 0x63, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, + 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, + 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, + 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, + 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, + 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, + 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, + 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, + 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xc1, 0x01, 0x0a, + 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tunnel_v1beta1_tunnel_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_tunnel_proto_rawDescData = file_tunnel_v1beta1_tunnel_proto_rawDesc +) + +func file_tunnel_v1beta1_tunnel_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_tunnel_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_tunnel_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_tunnel_proto_rawDescData) + }) + return file_tunnel_v1beta1_tunnel_proto_rawDescData +} + +var file_tunnel_v1beta1_tunnel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_tunnel_v1beta1_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_tunnel_v1beta1_tunnel_proto_goTypes = []interface{}{ + (Encoder)(0), // 0: tunnel.v1beta1.Encoder + (*TSSRoute)(nil), // 1: tunnel.v1beta1.TSSRoute + (*AxelarRoute)(nil), // 2: tunnel.v1beta1.AxelarRoute + (*SignalDeviation)(nil), // 3: tunnel.v1beta1.SignalDeviation + (*Deposit)(nil), // 4: tunnel.v1beta1.Deposit + (*Tunnel)(nil), // 5: tunnel.v1beta1.Tunnel + (*LatestSignalPrices)(nil), // 6: tunnel.v1beta1.LatestSignalPrices + (*SignalPrice)(nil), // 7: tunnel.v1beta1.SignalPrice + (*TotalFees)(nil), // 8: tunnel.v1beta1.TotalFees + (*Packet)(nil), // 9: tunnel.v1beta1.Packet + (*TSSPacketContent)(nil), // 10: tunnel.v1beta1.TSSPacketContent + (*AxelarPacketContent)(nil), // 11: tunnel.v1beta1.AxelarPacketContent + (*v1beta1.Coin)(nil), // 12: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 13: google.protobuf.Any +} +var file_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ + 12, // 0: tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin + 13, // 1: tunnel.v1beta1.Tunnel.route:type_name -> google.protobuf.Any + 0, // 2: tunnel.v1beta1.Tunnel.encoder:type_name -> tunnel.v1beta1.Encoder + 3, // 3: tunnel.v1beta1.Tunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation + 12, // 4: tunnel.v1beta1.Tunnel.total_deposit:type_name -> cosmos.base.v1beta1.Coin + 7, // 5: tunnel.v1beta1.LatestSignalPrices.signal_prices:type_name -> tunnel.v1beta1.SignalPrice + 12, // 6: tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin + 7, // 7: tunnel.v1beta1.Packet.signal_prices:type_name -> tunnel.v1beta1.SignalPrice + 13, // 8: tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_tunnel_v1beta1_tunnel_proto_init() } +func file_tunnel_v1beta1_tunnel_proto_init() { + if File_tunnel_v1beta1_tunnel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tunnel_v1beta1_tunnel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TSSRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AxelarRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalDeviation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Deposit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LatestSignalPrices); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalPrice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TotalFees); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Packet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TSSPacketContent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AxelarPacketContent); 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_tunnel_v1beta1_tunnel_proto_rawDesc, + NumEnums: 1, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tunnel_v1beta1_tunnel_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_tunnel_proto_depIdxs, + EnumInfos: file_tunnel_v1beta1_tunnel_proto_enumTypes, + MessageInfos: file_tunnel_v1beta1_tunnel_proto_msgTypes, + }.Build() + File_tunnel_v1beta1_tunnel_proto = out.File + file_tunnel_v1beta1_tunnel_proto_rawDesc = nil + file_tunnel_v1beta1_tunnel_proto_goTypes = nil + file_tunnel_v1beta1_tunnel_proto_depIdxs = nil +} diff --git a/api/tss/v1beta1/query.pulsar.go b/api/tunnel/v1beta1/tx.pulsar.go similarity index 56% rename from api/tss/v1beta1/query.pulsar.go rename to api/tunnel/v1beta1/tx.pulsar.go index 2f1465c80..1a164ac77 100644 --- a/api/tss/v1beta1/query.pulsar.go +++ b/api/tunnel/v1beta1/tx.pulsar.go @@ -1,39 +1,156 @@ // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package tssv1beta1 +package tunnelv1beta1 import ( - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + _ "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" - _ "google.golang.org/genproto/googleapis/api/annotations" 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 _ protoreflect.List = (*_MsgCreateTunnel_1_list)(nil) + +type _MsgCreateTunnel_1_list struct { + list *[]*SignalDeviation +} + +func (x *_MsgCreateTunnel_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCreateTunnel_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCreateTunnel_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCreateTunnel_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCreateTunnel_1_list) AppendMutable() protoreflect.Value { + v := new(SignalDeviation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateTunnel_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCreateTunnel_1_list) NewElement() protoreflect.Value { + v := new(SignalDeviation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateTunnel_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgCreateTunnel_5_list)(nil) + +type _MsgCreateTunnel_5_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgCreateTunnel_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCreateTunnel_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCreateTunnel_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCreateTunnel_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCreateTunnel_5_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateTunnel_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCreateTunnel_5_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateTunnel_5_list) IsValid() bool { + return x.list != nil +} + var ( - md_QueryCountsRequest protoreflect.MessageDescriptor + md_MsgCreateTunnel protoreflect.MessageDescriptor + fd_MsgCreateTunnel_signal_deviations protoreflect.FieldDescriptor + fd_MsgCreateTunnel_interval protoreflect.FieldDescriptor + fd_MsgCreateTunnel_route protoreflect.FieldDescriptor + fd_MsgCreateTunnel_encoder protoreflect.FieldDescriptor + fd_MsgCreateTunnel_initial_deposit protoreflect.FieldDescriptor + fd_MsgCreateTunnel_creator protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryCountsRequest = File_tss_v1beta1_query_proto.Messages().ByName("QueryCountsRequest") + file_tunnel_v1beta1_tx_proto_init() + md_MsgCreateTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgCreateTunnel") + fd_MsgCreateTunnel_signal_deviations = md_MsgCreateTunnel.Fields().ByName("signal_deviations") + fd_MsgCreateTunnel_interval = md_MsgCreateTunnel.Fields().ByName("interval") + fd_MsgCreateTunnel_route = md_MsgCreateTunnel.Fields().ByName("route") + fd_MsgCreateTunnel_encoder = md_MsgCreateTunnel.Fields().ByName("encoder") + fd_MsgCreateTunnel_initial_deposit = md_MsgCreateTunnel.Fields().ByName("initial_deposit") + fd_MsgCreateTunnel_creator = md_MsgCreateTunnel.Fields().ByName("creator") } -var _ protoreflect.Message = (*fastReflection_QueryCountsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_MsgCreateTunnel)(nil) -type fastReflection_QueryCountsRequest QueryCountsRequest +type fastReflection_MsgCreateTunnel MsgCreateTunnel -func (x *QueryCountsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCountsRequest)(x) +func (x *MsgCreateTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateTunnel)(x) } -func (x *QueryCountsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[0] +func (x *MsgCreateTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -44,43 +161,43 @@ func (x *QueryCountsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryCountsRequest_messageType fastReflection_QueryCountsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryCountsRequest_messageType{} +var _fastReflection_MsgCreateTunnel_messageType fastReflection_MsgCreateTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateTunnel_messageType{} -type fastReflection_QueryCountsRequest_messageType struct{} +type fastReflection_MsgCreateTunnel_messageType struct{} -func (x fastReflection_QueryCountsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCountsRequest)(nil) +func (x fastReflection_MsgCreateTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateTunnel)(nil) } -func (x fastReflection_QueryCountsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCountsRequest) +func (x fastReflection_MsgCreateTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateTunnel) } -func (x fastReflection_QueryCountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCountsRequest +func (x fastReflection_MsgCreateTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateTunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryCountsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCountsRequest +func (x *fastReflection_MsgCreateTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateTunnel } // 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_QueryCountsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryCountsRequest_messageType +func (x *fastReflection_MsgCreateTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateTunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCountsRequest) New() protoreflect.Message { - return new(fastReflection_QueryCountsRequest) +func (x *fastReflection_MsgCreateTunnel) New() protoreflect.Message { + return new(fastReflection_MsgCreateTunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCountsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryCountsRequest)(x) +func (x *fastReflection_MsgCreateTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgCreateTunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -88,7 +205,43 @@ func (x *fastReflection_QueryCountsRequest) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryCountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgCreateTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.SignalDeviations) != 0 { + value := protoreflect.ValueOfList(&_MsgCreateTunnel_1_list{list: &x.SignalDeviations}) + if !f(fd_MsgCreateTunnel_signal_deviations, value) { + return + } + } + if x.Interval != uint64(0) { + value := protoreflect.ValueOfUint64(x.Interval) + if !f(fd_MsgCreateTunnel_interval, value) { + return + } + } + if x.Route != nil { + value := protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + if !f(fd_MsgCreateTunnel_route, value) { + return + } + } + if x.Encoder != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoder)) + if !f(fd_MsgCreateTunnel_encoder, value) { + return + } + } + if len(x.InitialDeposit) != 0 { + value := protoreflect.ValueOfList(&_MsgCreateTunnel_5_list{list: &x.InitialDeposit}) + if !f(fd_MsgCreateTunnel_initial_deposit, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgCreateTunnel_creator, value) { + return + } + } } // Has reports whether a field is populated. @@ -102,13 +255,25 @@ func (x *fastReflection_QueryCountsRequest) Range(f func(protoreflect.FieldDescr // 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_QueryCountsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgCreateTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + return len(x.SignalDeviations) != 0 + case "tunnel.v1beta1.MsgCreateTunnel.interval": + return x.Interval != uint64(0) + case "tunnel.v1beta1.MsgCreateTunnel.route": + return x.Route != nil + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + return x.Encoder != 0 + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + return len(x.InitialDeposit) != 0 + case "tunnel.v1beta1.MsgCreateTunnel.creator": + return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) } } @@ -118,13 +283,25 @@ func (x *fastReflection_QueryCountsRequest) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCountsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgCreateTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + x.SignalDeviations = nil + case "tunnel.v1beta1.MsgCreateTunnel.interval": + x.Interval = uint64(0) + case "tunnel.v1beta1.MsgCreateTunnel.route": + x.Route = nil + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + x.Encoder = 0 + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + x.InitialDeposit = nil + case "tunnel.v1beta1.MsgCreateTunnel.creator": + x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) } } @@ -134,13 +311,37 @@ func (x *fastReflection_QueryCountsRequest) Clear(fd protoreflect.FieldDescripto // 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_QueryCountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + if len(x.SignalDeviations) == 0 { + return protoreflect.ValueOfList(&_MsgCreateTunnel_1_list{}) + } + listValue := &_MsgCreateTunnel_1_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgCreateTunnel.interval": + value := x.Interval + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgCreateTunnel.route": + value := x.Route + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + value := x.Encoder + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + if len(x.InitialDeposit) == 0 { + return protoreflect.ValueOfList(&_MsgCreateTunnel_5_list{}) + } + listValue := &_MsgCreateTunnel_5_list{list: &x.InitialDeposit} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgCreateTunnel.creator": + value := x.Creator + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", descriptor.FullName())) } } @@ -154,13 +355,29 @@ func (x *fastReflection_QueryCountsRequest) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgCreateTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + lv := value.List() + clv := lv.(*_MsgCreateTunnel_1_list) + x.SignalDeviations = *clv.list + case "tunnel.v1beta1.MsgCreateTunnel.interval": + x.Interval = value.Uint() + case "tunnel.v1beta1.MsgCreateTunnel.route": + x.Route = value.Message().Interface().(*anypb.Any) + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + x.Encoder = (Encoder)(value.Enum()) + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + lv := value.List() + clv := lv.(*_MsgCreateTunnel_5_list) + x.InitialDeposit = *clv.list + case "tunnel.v1beta1.MsgCreateTunnel.creator": + x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) } } @@ -174,36 +391,74 @@ func (x *fastReflection_QueryCountsRequest) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + if x.SignalDeviations == nil { + x.SignalDeviations = []*SignalDeviation{} + } + value := &_MsgCreateTunnel_1_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgCreateTunnel.route": + if x.Route == nil { + x.Route = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + if x.InitialDeposit == nil { + x.InitialDeposit = []*v1beta1.Coin{} + } + value := &_MsgCreateTunnel_5_list{list: &x.InitialDeposit} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgCreateTunnel.interval": + panic(fmt.Errorf("field interval of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + panic(fmt.Errorf("field encoder of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) + case "tunnel.v1beta1.MsgCreateTunnel.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel 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_QueryCountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + list := []*SignalDeviation{} + return protoreflect.ValueOfList(&_MsgCreateTunnel_1_list{list: &list}) + case "tunnel.v1beta1.MsgCreateTunnel.interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgCreateTunnel.route": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + return protoreflect.ValueOfEnum(0) + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgCreateTunnel_5_list{list: &list}) + case "tunnel.v1beta1.MsgCreateTunnel.creator": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel 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_QueryCountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgCreateTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryCountsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgCreateTunnel", d.FullName())) } panic("unreachable") } @@ -211,7 +466,7 @@ func (x *fastReflection_QueryCountsRequest) WhichOneof(d protoreflect.OneofDescr // 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_QueryCountsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgCreateTunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -222,7 +477,7 @@ func (x *fastReflection_QueryCountsRequest) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCountsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgCreateTunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -234,7 +489,7 @@ func (x *fastReflection_QueryCountsRequest) SetUnknown(fields protoreflect.RawFi // 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_QueryCountsRequest) IsValid() bool { +func (x *fastReflection_MsgCreateTunnel) IsValid() bool { return x != nil } @@ -244,9 +499,9 @@ func (x *fastReflection_QueryCountsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryCountsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgCreateTunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCountsRequest) + x := input.Message.Interface().(*MsgCreateTunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -258,6 +513,32 @@ func (x *fastReflection_QueryCountsRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + if len(x.SignalDeviations) > 0 { + for _, e := range x.SignalDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Interval != 0 { + n += 1 + runtime.Sov(uint64(x.Interval)) + } + if x.Route != nil { + l = options.Size(x.Route) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Encoder != 0 { + n += 1 + runtime.Sov(uint64(x.Encoder)) + } + if len(x.InitialDeposit) > 0 { + for _, e := range x.InitialDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -268,7 +549,7 @@ func (x *fastReflection_QueryCountsRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCountsRequest) + x := input.Message.Interface().(*MsgCreateTunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -287,6 +568,69 @@ func (x *fastReflection_QueryCountsRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x32 + } + if len(x.InitialDeposit) > 0 { + for iNdEx := len(x.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.InitialDeposit[iNdEx]) + 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 x.Encoder != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoder)) + i-- + dAtA[i] = 0x20 + } + if x.Route != nil { + encoded, err := options.Marshal(x.Route) + 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.Interval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Interval)) + i-- + dAtA[i] = 0x10 + } + if len(x.SignalDeviations) > 0 { + for iNdEx := len(x.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalDeviations[iNdEx]) + 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 { @@ -298,7 +642,7 @@ func (x *fastReflection_QueryCountsRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCountsRequest) + x := input.Message.Interface().(*MsgCreateTunnel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -330,41 +674,215 @@ func (x *fastReflection_QueryCountsRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCountsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", 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 + } + x.SignalDeviations = append(x.SignalDeviations, &SignalDeviation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalDeviations[len(x.SignalDeviations)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + x.Interval = 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.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Route", 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 } - if (iNdEx + skippy) > l { + 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 !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + if x.Route == nil { + x.Route = &anypb.Any{} } - 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, + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Route); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) + } + x.Encoder = 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.Encoder |= Encoder(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 InitialDeposit", 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 + } + x.InitialDeposit = append(x.InitialDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InitialDeposit[len(x.InitialDeposit)-1]); 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 Creator", 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.Creator = 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, @@ -372,28 +890,26 @@ func (x *fastReflection_QueryCountsRequest) ProtoMethods() *protoiface.Methods { } var ( - md_QueryCountsResponse protoreflect.MessageDescriptor - fd_QueryCountsResponse_group_count protoreflect.FieldDescriptor - fd_QueryCountsResponse_signing_count protoreflect.FieldDescriptor + md_MsgCreateTunnelResponse protoreflect.MessageDescriptor + fd_MsgCreateTunnelResponse_tunnel_id protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryCountsResponse = File_tss_v1beta1_query_proto.Messages().ByName("QueryCountsResponse") - fd_QueryCountsResponse_group_count = md_QueryCountsResponse.Fields().ByName("group_count") - fd_QueryCountsResponse_signing_count = md_QueryCountsResponse.Fields().ByName("signing_count") + file_tunnel_v1beta1_tx_proto_init() + md_MsgCreateTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgCreateTunnelResponse") + fd_MsgCreateTunnelResponse_tunnel_id = md_MsgCreateTunnelResponse.Fields().ByName("tunnel_id") } -var _ protoreflect.Message = (*fastReflection_QueryCountsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgCreateTunnelResponse)(nil) -type fastReflection_QueryCountsResponse QueryCountsResponse +type fastReflection_MsgCreateTunnelResponse MsgCreateTunnelResponse -func (x *QueryCountsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCountsResponse)(x) +func (x *MsgCreateTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateTunnelResponse)(x) } -func (x *QueryCountsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[1] +func (x *MsgCreateTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -404,43 +920,43 @@ func (x *QueryCountsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryCountsResponse_messageType fastReflection_QueryCountsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryCountsResponse_messageType{} +var _fastReflection_MsgCreateTunnelResponse_messageType fastReflection_MsgCreateTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateTunnelResponse_messageType{} -type fastReflection_QueryCountsResponse_messageType struct{} +type fastReflection_MsgCreateTunnelResponse_messageType struct{} -func (x fastReflection_QueryCountsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCountsResponse)(nil) +func (x fastReflection_MsgCreateTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateTunnelResponse)(nil) } -func (x fastReflection_QueryCountsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCountsResponse) +func (x fastReflection_MsgCreateTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateTunnelResponse) } -func (x fastReflection_QueryCountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCountsResponse +func (x fastReflection_MsgCreateTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryCountsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCountsResponse +func (x *fastReflection_MsgCreateTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateTunnelResponse } // 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_QueryCountsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryCountsResponse_messageType +func (x *fastReflection_MsgCreateTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCountsResponse) New() protoreflect.Message { - return new(fastReflection_QueryCountsResponse) +func (x *fastReflection_MsgCreateTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCountsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryCountsResponse)(x) +func (x *fastReflection_MsgCreateTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -448,16 +964,10 @@ func (x *fastReflection_QueryCountsResponse) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryCountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupCount != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupCount) - if !f(fd_QueryCountsResponse_group_count, value) { - return - } - } - if x.SigningCount != uint64(0) { - value := protoreflect.ValueOfUint64(x.SigningCount) - if !f(fd_QueryCountsResponse_signing_count, value) { +func (x *fastReflection_MsgCreateTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgCreateTunnelResponse_tunnel_id, value) { return } } @@ -474,17 +984,15 @@ func (x *fastReflection_QueryCountsResponse) Range(f func(protoreflect.FieldDesc // 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_QueryCountsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgCreateTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryCountsResponse.group_count": - return x.GroupCount != uint64(0) - case "tss.v1beta1.QueryCountsResponse.signing_count": - return x.SigningCount != uint64(0) + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + return x.TunnelId != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) } } @@ -494,17 +1002,15 @@ func (x *fastReflection_QueryCountsResponse) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCountsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgCreateTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryCountsResponse.group_count": - x.GroupCount = uint64(0) - case "tss.v1beta1.QueryCountsResponse.signing_count": - x.SigningCount = uint64(0) + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + x.TunnelId = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) } } @@ -514,19 +1020,16 @@ func (x *fastReflection_QueryCountsResponse) Clear(fd protoreflect.FieldDescript // 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_QueryCountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryCountsResponse.group_count": - value := x.GroupCount - return protoreflect.ValueOfUint64(value) - case "tss.v1beta1.QueryCountsResponse.signing_count": - value := x.SigningCount + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + value := x.TunnelId return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -540,17 +1043,15 @@ func (x *fastReflection_QueryCountsResponse) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgCreateTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryCountsResponse.group_count": - x.GroupCount = value.Uint() - case "tss.v1beta1.QueryCountsResponse.signing_count": - x.SigningCount = value.Uint() + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + x.TunnelId = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) } } @@ -564,44 +1065,40 @@ func (x *fastReflection_QueryCountsResponse) Set(fd protoreflect.FieldDescriptor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryCountsResponse.group_count": - panic(fmt.Errorf("field group_count of message tss.v1beta1.QueryCountsResponse is not mutable")) - case "tss.v1beta1.QueryCountsResponse.signing_count": - panic(fmt.Errorf("field signing_count of message tss.v1beta1.QueryCountsResponse is not mutable")) + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgCreateTunnelResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse 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_QueryCountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgCreateTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryCountsResponse.group_count": - return protoreflect.ValueOfUint64(uint64(0)) - case "tss.v1beta1.QueryCountsResponse.signing_count": + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryCountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryCountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse 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_QueryCountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgCreateTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryCountsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgCreateTunnelResponse", d.FullName())) } panic("unreachable") } @@ -609,7 +1106,7 @@ func (x *fastReflection_QueryCountsResponse) WhichOneof(d protoreflect.OneofDesc // 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_QueryCountsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgCreateTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -620,7 +1117,7 @@ func (x *fastReflection_QueryCountsResponse) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCountsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgCreateTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -632,7 +1129,7 @@ func (x *fastReflection_QueryCountsResponse) SetUnknown(fields protoreflect.RawF // 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_QueryCountsResponse) IsValid() bool { +func (x *fastReflection_MsgCreateTunnelResponse) IsValid() bool { return x != nil } @@ -642,9 +1139,9 @@ func (x *fastReflection_QueryCountsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgCreateTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCountsResponse) + x := input.Message.Interface().(*MsgCreateTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -656,11 +1153,8 @@ func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.GroupCount != 0 { - n += 1 + runtime.Sov(uint64(x.GroupCount)) - } - if x.SigningCount != 0 { - n += 1 + runtime.Sov(uint64(x.SigningCount)) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -672,7 +1166,7 @@ func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCountsResponse) + x := input.Message.Interface().(*MsgCreateTunnelResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -691,13 +1185,8 @@ func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.SigningCount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SigningCount)) - i-- - dAtA[i] = 0x10 - } - if x.GroupCount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupCount)) + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- dAtA[i] = 0x8 } @@ -712,7 +1201,7 @@ func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCountsResponse) + x := input.Message.Interface().(*MsgCreateTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -744,36 +1233,17 @@ func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCountsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupCount", wireType) - } - x.GroupCount = 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.GroupCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigningCount", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - x.SigningCount = 0 + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -783,7 +1253,7 @@ func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods } b := dAtA[iNdEx] iNdEx++ - x.SigningCount |= uint64(b&0x7F) << shift + x.TunnelId |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -823,27 +1293,84 @@ func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods } } +var _ protoreflect.List = (*_MsgEditTunnel_2_list)(nil) + +type _MsgEditTunnel_2_list struct { + list *[]*SignalDeviation +} + +func (x *_MsgEditTunnel_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgEditTunnel_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgEditTunnel_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + (*x.list)[i] = concreteValue +} + +func (x *_MsgEditTunnel_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgEditTunnel_2_list) AppendMutable() protoreflect.Value { + v := new(SignalDeviation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgEditTunnel_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgEditTunnel_2_list) NewElement() protoreflect.Value { + v := new(SignalDeviation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgEditTunnel_2_list) IsValid() bool { + return x.list != nil +} + var ( - md_QueryGroupRequest protoreflect.MessageDescriptor - fd_QueryGroupRequest_group_id protoreflect.FieldDescriptor + md_MsgEditTunnel protoreflect.MessageDescriptor + fd_MsgEditTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgEditTunnel_signal_deviations protoreflect.FieldDescriptor + fd_MsgEditTunnel_interval protoreflect.FieldDescriptor + fd_MsgEditTunnel_creator protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryGroupRequest = File_tss_v1beta1_query_proto.Messages().ByName("QueryGroupRequest") - fd_QueryGroupRequest_group_id = md_QueryGroupRequest.Fields().ByName("group_id") + file_tunnel_v1beta1_tx_proto_init() + md_MsgEditTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnel") + fd_MsgEditTunnel_tunnel_id = md_MsgEditTunnel.Fields().ByName("tunnel_id") + fd_MsgEditTunnel_signal_deviations = md_MsgEditTunnel.Fields().ByName("signal_deviations") + fd_MsgEditTunnel_interval = md_MsgEditTunnel.Fields().ByName("interval") + fd_MsgEditTunnel_creator = md_MsgEditTunnel.Fields().ByName("creator") } -var _ protoreflect.Message = (*fastReflection_QueryGroupRequest)(nil) +var _ protoreflect.Message = (*fastReflection_MsgEditTunnel)(nil) -type fastReflection_QueryGroupRequest QueryGroupRequest +type fastReflection_MsgEditTunnel MsgEditTunnel -func (x *QueryGroupRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupRequest)(x) +func (x *MsgEditTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgEditTunnel)(x) } -func (x *QueryGroupRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[2] +func (x *MsgEditTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -854,43 +1381,43 @@ func (x *QueryGroupRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryGroupRequest_messageType fastReflection_QueryGroupRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupRequest_messageType{} +var _fastReflection_MsgEditTunnel_messageType fastReflection_MsgEditTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgEditTunnel_messageType{} -type fastReflection_QueryGroupRequest_messageType struct{} +type fastReflection_MsgEditTunnel_messageType struct{} -func (x fastReflection_QueryGroupRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupRequest)(nil) +func (x fastReflection_MsgEditTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgEditTunnel)(nil) } -func (x fastReflection_QueryGroupRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupRequest) +func (x fastReflection_MsgEditTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgEditTunnel) } -func (x fastReflection_QueryGroupRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupRequest +func (x fastReflection_MsgEditTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgEditTunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryGroupRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupRequest +func (x *fastReflection_MsgEditTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgEditTunnel } // 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_QueryGroupRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupRequest_messageType +func (x *fastReflection_MsgEditTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgEditTunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupRequest) New() protoreflect.Message { - return new(fastReflection_QueryGroupRequest) +func (x *fastReflection_MsgEditTunnel) New() protoreflect.Message { + return new(fastReflection_MsgEditTunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGroupRequest)(x) +func (x *fastReflection_MsgEditTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgEditTunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -898,10 +1425,28 @@ func (x *fastReflection_QueryGroupRequest) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryGroupRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_QueryGroupRequest_group_id, value) { +func (x *fastReflection_MsgEditTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgEditTunnel_tunnel_id, value) { + return + } + } + if len(x.SignalDeviations) != 0 { + value := protoreflect.ValueOfList(&_MsgEditTunnel_2_list{list: &x.SignalDeviations}) + if !f(fd_MsgEditTunnel_signal_deviations, value) { + return + } + } + if x.Interval != uint64(0) { + value := protoreflect.ValueOfUint64(x.Interval) + if !f(fd_MsgEditTunnel_interval, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgEditTunnel_creator, value) { return } } @@ -918,15 +1463,21 @@ func (x *fastReflection_QueryGroupRequest) Range(f func(protoreflect.FieldDescri // 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_QueryGroupRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgEditTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryGroupRequest.group_id": - return x.GroupId != uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + return len(x.SignalDeviations) != 0 + case "tunnel.v1beta1.MsgEditTunnel.interval": + return x.Interval != uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.creator": + return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) } } @@ -936,15 +1487,21 @@ func (x *fastReflection_QueryGroupRequest) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGroupRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgEditTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryGroupRequest.group_id": - x.GroupId = uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + x.SignalDeviations = nil + case "tunnel.v1beta1.MsgEditTunnel.interval": + x.Interval = uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.creator": + x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) } } @@ -954,16 +1511,28 @@ func (x *fastReflection_QueryGroupRequest) Clear(fd protoreflect.FieldDescriptor // 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_QueryGroupRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgEditTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryGroupRequest.group_id": - value := x.GroupId + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + if len(x.SignalDeviations) == 0 { + return protoreflect.ValueOfList(&_MsgEditTunnel_2_list{}) + } + listValue := &_MsgEditTunnel_2_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgEditTunnel.interval": + value := x.Interval return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgEditTunnel.creator": + value := x.Creator + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", descriptor.FullName())) } } @@ -977,15 +1546,23 @@ func (x *fastReflection_QueryGroupRequest) Get(descriptor protoreflect.FieldDesc // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGroupRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgEditTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryGroupRequest.group_id": - x.GroupId = value.Uint() + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + lv := value.List() + clv := lv.(*_MsgEditTunnel_2_list) + x.SignalDeviations = *clv.list + case "tunnel.v1beta1.MsgEditTunnel.interval": + x.Interval = value.Uint() + case "tunnel.v1beta1.MsgEditTunnel.creator": + x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) } } @@ -999,40 +1576,57 @@ func (x *fastReflection_QueryGroupRequest) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGroupRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgEditTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryGroupRequest.group_id": - panic(fmt.Errorf("field group_id of message tss.v1beta1.QueryGroupRequest is not mutable")) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + if x.SignalDeviations == nil { + x.SignalDeviations = []*SignalDeviation{} + } + value := &_MsgEditTunnel_2_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgEditTunnel is not mutable")) + case "tunnel.v1beta1.MsgEditTunnel.interval": + panic(fmt.Errorf("field interval of message tunnel.v1beta1.MsgEditTunnel is not mutable")) + case "tunnel.v1beta1.MsgEditTunnel.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgEditTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel 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_QueryGroupRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgEditTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryGroupRequest.group_id": + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + list := []*SignalDeviation{} + return protoreflect.ValueOfList(&_MsgEditTunnel_2_list{list: &list}) + case "tunnel.v1beta1.MsgEditTunnel.interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgEditTunnel.creator": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel 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_QueryGroupRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgEditTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryGroupRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgEditTunnel", d.FullName())) } panic("unreachable") } @@ -1040,7 +1634,7 @@ func (x *fastReflection_QueryGroupRequest) WhichOneof(d protoreflect.OneofDescri // 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_QueryGroupRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgEditTunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1051,7 +1645,7 @@ func (x *fastReflection_QueryGroupRequest) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGroupRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgEditTunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1063,7 +1657,7 @@ func (x *fastReflection_QueryGroupRequest) SetUnknown(fields protoreflect.RawFie // 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_QueryGroupRequest) IsValid() bool { +func (x *fastReflection_MsgEditTunnel) IsValid() bool { return x != nil } @@ -1073,9 +1667,9 @@ func (x *fastReflection_QueryGroupRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGroupRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgEditTunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupRequest) + x := input.Message.Interface().(*MsgEditTunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1087,8 +1681,21 @@ func (x *fastReflection_QueryGroupRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.SignalDeviations) > 0 { + for _, e := range x.SignalDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Interval != 0 { + n += 1 + runtime.Sov(uint64(x.Interval)) + } + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -1100,7 +1707,7 @@ func (x *fastReflection_QueryGroupRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupRequest) + x := input.Message.Interface().(*MsgEditTunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1119,8 +1726,36 @@ func (x *fastReflection_QueryGroupRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x22 + } + if x.Interval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Interval)) + i-- + dAtA[i] = 0x18 + } + if len(x.SignalDeviations) > 0 { + for iNdEx := len(x.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalDeviations[iNdEx]) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- dAtA[i] = 0x8 } @@ -1135,7 +1770,7 @@ func (x *fastReflection_QueryGroupRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupRequest) + x := input.Message.Interface().(*MsgEditTunnel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1167,17 +1802,17 @@ func (x *fastReflection_QueryGroupRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - x.GroupId = 0 + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1187,37 +1822,122 @@ func (x *fastReflection_QueryGroupRequest) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift + x.TunnelId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + 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 } - if (iNdEx + skippy) > l { + 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 !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + x.SignalDeviations = append(x.SignalDeviations, &SignalDeviation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalDeviations[len(x.SignalDeviations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - 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{}{}, + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + x.Interval = 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.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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, @@ -1227,294 +1947,25 @@ func (x *fastReflection_QueryGroupRequest) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_QueryGroupResponse_3_list)(nil) - -type _QueryGroupResponse_3_list struct { - list *[]*Member -} - -func (x *_QueryGroupResponse_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupResponse_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupResponse_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupResponse_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupResponse_3_list) AppendMutable() protoreflect.Value { - v := new(Member) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupResponse_3_list) NewElement() protoreflect.Value { - v := new(Member) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryGroupResponse_4_list)(nil) - -type _QueryGroupResponse_4_list struct { - list *[]*Round1Info -} - -func (x *_QueryGroupResponse_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupResponse_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupResponse_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Round1Info) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupResponse_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Round1Info) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupResponse_4_list) AppendMutable() protoreflect.Value { - v := new(Round1Info) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupResponse_4_list) NewElement() protoreflect.Value { - v := new(Round1Info) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryGroupResponse_5_list)(nil) - -type _QueryGroupResponse_5_list struct { - list *[]*Round2Info -} - -func (x *_QueryGroupResponse_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupResponse_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupResponse_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Round2Info) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupResponse_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Round2Info) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupResponse_5_list) AppendMutable() protoreflect.Value { - v := new(Round2Info) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupResponse_5_list) NewElement() protoreflect.Value { - v := new(Round2Info) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryGroupResponse_6_list)(nil) - -type _QueryGroupResponse_6_list struct { - list *[]*ComplaintsWithStatus -} - -func (x *_QueryGroupResponse_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupResponse_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupResponse_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ComplaintsWithStatus) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupResponse_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ComplaintsWithStatus) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupResponse_6_list) AppendMutable() protoreflect.Value { - v := new(ComplaintsWithStatus) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_6_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupResponse_6_list) NewElement() protoreflect.Value { - v := new(ComplaintsWithStatus) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_6_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryGroupResponse_7_list)(nil) - -type _QueryGroupResponse_7_list struct { - list *[]*Confirm -} - -func (x *_QueryGroupResponse_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGroupResponse_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGroupResponse_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Confirm) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGroupResponse_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Confirm) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGroupResponse_7_list) AppendMutable() protoreflect.Value { - v := new(Confirm) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGroupResponse_7_list) NewElement() protoreflect.Value { - v := new(Confirm) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGroupResponse_7_list) IsValid() bool { - return x.list != nil -} - var ( - md_QueryGroupResponse protoreflect.MessageDescriptor - fd_QueryGroupResponse_group protoreflect.FieldDescriptor - fd_QueryGroupResponse_dkg_context protoreflect.FieldDescriptor - fd_QueryGroupResponse_members protoreflect.FieldDescriptor - fd_QueryGroupResponse_round1_infos protoreflect.FieldDescriptor - fd_QueryGroupResponse_round2_infos protoreflect.FieldDescriptor - fd_QueryGroupResponse_complaints_with_status protoreflect.FieldDescriptor - fd_QueryGroupResponse_confirms protoreflect.FieldDescriptor + md_MsgEditTunnelResponse protoreflect.MessageDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryGroupResponse = File_tss_v1beta1_query_proto.Messages().ByName("QueryGroupResponse") - fd_QueryGroupResponse_group = md_QueryGroupResponse.Fields().ByName("group") - fd_QueryGroupResponse_dkg_context = md_QueryGroupResponse.Fields().ByName("dkg_context") - fd_QueryGroupResponse_members = md_QueryGroupResponse.Fields().ByName("members") - fd_QueryGroupResponse_round1_infos = md_QueryGroupResponse.Fields().ByName("round1_infos") - fd_QueryGroupResponse_round2_infos = md_QueryGroupResponse.Fields().ByName("round2_infos") - fd_QueryGroupResponse_complaints_with_status = md_QueryGroupResponse.Fields().ByName("complaints_with_status") - fd_QueryGroupResponse_confirms = md_QueryGroupResponse.Fields().ByName("confirms") + file_tunnel_v1beta1_tx_proto_init() + md_MsgEditTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnelResponse") } -var _ protoreflect.Message = (*fastReflection_QueryGroupResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgEditTunnelResponse)(nil) -type fastReflection_QueryGroupResponse QueryGroupResponse +type fastReflection_MsgEditTunnelResponse MsgEditTunnelResponse -func (x *QueryGroupResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGroupResponse)(x) +func (x *MsgEditTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgEditTunnelResponse)(x) } -func (x *QueryGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[3] +func (x *MsgEditTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1525,43 +1976,43 @@ func (x *QueryGroupResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryGroupResponse_messageType fastReflection_QueryGroupResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGroupResponse_messageType{} +var _fastReflection_MsgEditTunnelResponse_messageType fastReflection_MsgEditTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgEditTunnelResponse_messageType{} -type fastReflection_QueryGroupResponse_messageType struct{} +type fastReflection_MsgEditTunnelResponse_messageType struct{} -func (x fastReflection_QueryGroupResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGroupResponse)(nil) +func (x fastReflection_MsgEditTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgEditTunnelResponse)(nil) } -func (x fastReflection_QueryGroupResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGroupResponse) +func (x fastReflection_MsgEditTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgEditTunnelResponse) } -func (x fastReflection_QueryGroupResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupResponse +func (x fastReflection_MsgEditTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgEditTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryGroupResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGroupResponse +func (x *fastReflection_MsgEditTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgEditTunnelResponse } // 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_QueryGroupResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGroupResponse_messageType +func (x *fastReflection_MsgEditTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgEditTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGroupResponse) New() protoreflect.Message { - return new(fastReflection_QueryGroupResponse) +func (x *fastReflection_MsgEditTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgEditTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGroupResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGroupResponse)(x) +func (x *fastReflection_MsgEditTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgEditTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1569,49 +2020,7 @@ func (x *fastReflection_QueryGroupResponse) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryGroupResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Group != nil { - value := protoreflect.ValueOfMessage(x.Group.ProtoReflect()) - if !f(fd_QueryGroupResponse_group, value) { - return - } - } - if len(x.DkgContext) != 0 { - value := protoreflect.ValueOfBytes(x.DkgContext) - if !f(fd_QueryGroupResponse_dkg_context, value) { - return - } - } - if len(x.Members) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupResponse_3_list{list: &x.Members}) - if !f(fd_QueryGroupResponse_members, value) { - return - } - } - if len(x.Round1Infos) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupResponse_4_list{list: &x.Round1Infos}) - if !f(fd_QueryGroupResponse_round1_infos, value) { - return - } - } - if len(x.Round2Infos) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupResponse_5_list{list: &x.Round2Infos}) - if !f(fd_QueryGroupResponse_round2_infos, value) { - return - } - } - if len(x.ComplaintsWithStatus) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupResponse_6_list{list: &x.ComplaintsWithStatus}) - if !f(fd_QueryGroupResponse_complaints_with_status, value) { - return - } - } - if len(x.Confirms) != 0 { - value := protoreflect.ValueOfList(&_QueryGroupResponse_7_list{list: &x.Confirms}) - if !f(fd_QueryGroupResponse_confirms, value) { - return - } - } +func (x *fastReflection_MsgEditTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1625,27 +2034,13 @@ func (x *fastReflection_QueryGroupResponse) Range(f func(protoreflect.FieldDescr // 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_QueryGroupResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgEditTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryGroupResponse.group": - return x.Group != nil - case "tss.v1beta1.QueryGroupResponse.dkg_context": - return len(x.DkgContext) != 0 - case "tss.v1beta1.QueryGroupResponse.members": - return len(x.Members) != 0 - case "tss.v1beta1.QueryGroupResponse.round1_infos": - return len(x.Round1Infos) != 0 - case "tss.v1beta1.QueryGroupResponse.round2_infos": - return len(x.Round2Infos) != 0 - case "tss.v1beta1.QueryGroupResponse.complaints_with_status": - return len(x.ComplaintsWithStatus) != 0 - case "tss.v1beta1.QueryGroupResponse.confirms": - return len(x.Confirms) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1655,27 +2050,13 @@ func (x *fastReflection_QueryGroupResponse) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGroupResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgEditTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryGroupResponse.group": - x.Group = nil - case "tss.v1beta1.QueryGroupResponse.dkg_context": - x.DkgContext = nil - case "tss.v1beta1.QueryGroupResponse.members": - x.Members = nil - case "tss.v1beta1.QueryGroupResponse.round1_infos": - x.Round1Infos = nil - case "tss.v1beta1.QueryGroupResponse.round2_infos": - x.Round2Infos = nil - case "tss.v1beta1.QueryGroupResponse.complaints_with_status": - x.ComplaintsWithStatus = nil - case "tss.v1beta1.QueryGroupResponse.confirms": - x.Confirms = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1685,49 +2066,13 @@ func (x *fastReflection_QueryGroupResponse) Clear(fd protoreflect.FieldDescripto // 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_QueryGroupResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgEditTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryGroupResponse.group": - value := x.Group - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tss.v1beta1.QueryGroupResponse.dkg_context": - value := x.DkgContext - return protoreflect.ValueOfBytes(value) - case "tss.v1beta1.QueryGroupResponse.members": - if len(x.Members) == 0 { - return protoreflect.ValueOfList(&_QueryGroupResponse_3_list{}) - } - listValue := &_QueryGroupResponse_3_list{list: &x.Members} - return protoreflect.ValueOfList(listValue) - case "tss.v1beta1.QueryGroupResponse.round1_infos": - if len(x.Round1Infos) == 0 { - return protoreflect.ValueOfList(&_QueryGroupResponse_4_list{}) - } - listValue := &_QueryGroupResponse_4_list{list: &x.Round1Infos} - return protoreflect.ValueOfList(listValue) - case "tss.v1beta1.QueryGroupResponse.round2_infos": - if len(x.Round2Infos) == 0 { - return protoreflect.ValueOfList(&_QueryGroupResponse_5_list{}) - } - listValue := &_QueryGroupResponse_5_list{list: &x.Round2Infos} - return protoreflect.ValueOfList(listValue) - case "tss.v1beta1.QueryGroupResponse.complaints_with_status": - if len(x.ComplaintsWithStatus) == 0 { - return protoreflect.ValueOfList(&_QueryGroupResponse_6_list{}) - } - listValue := &_QueryGroupResponse_6_list{list: &x.ComplaintsWithStatus} - return protoreflect.ValueOfList(listValue) - case "tss.v1beta1.QueryGroupResponse.confirms": - if len(x.Confirms) == 0 { - return protoreflect.ValueOfList(&_QueryGroupResponse_7_list{}) - } - listValue := &_QueryGroupResponse_7_list{list: &x.Confirms} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -1741,37 +2086,13 @@ func (x *fastReflection_QueryGroupResponse) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGroupResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgEditTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryGroupResponse.group": - x.Group = value.Message().Interface().(*Group) - case "tss.v1beta1.QueryGroupResponse.dkg_context": - x.DkgContext = value.Bytes() - case "tss.v1beta1.QueryGroupResponse.members": - lv := value.List() - clv := lv.(*_QueryGroupResponse_3_list) - x.Members = *clv.list - case "tss.v1beta1.QueryGroupResponse.round1_infos": - lv := value.List() - clv := lv.(*_QueryGroupResponse_4_list) - x.Round1Infos = *clv.list - case "tss.v1beta1.QueryGroupResponse.round2_infos": - lv := value.List() - clv := lv.(*_QueryGroupResponse_5_list) - x.Round2Infos = *clv.list - case "tss.v1beta1.QueryGroupResponse.complaints_with_status": - lv := value.List() - clv := lv.(*_QueryGroupResponse_6_list) - x.ComplaintsWithStatus = *clv.list - case "tss.v1beta1.QueryGroupResponse.confirms": - lv := value.List() - clv := lv.(*_QueryGroupResponse_7_list) - x.Confirms = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1785,93 +2106,36 @@ func (x *fastReflection_QueryGroupResponse) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGroupResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgEditTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryGroupResponse.group": - if x.Group == nil { - x.Group = new(Group) - } - return protoreflect.ValueOfMessage(x.Group.ProtoReflect()) - case "tss.v1beta1.QueryGroupResponse.members": - if x.Members == nil { - x.Members = []*Member{} - } - value := &_QueryGroupResponse_3_list{list: &x.Members} - return protoreflect.ValueOfList(value) - case "tss.v1beta1.QueryGroupResponse.round1_infos": - if x.Round1Infos == nil { - x.Round1Infos = []*Round1Info{} - } - value := &_QueryGroupResponse_4_list{list: &x.Round1Infos} - return protoreflect.ValueOfList(value) - case "tss.v1beta1.QueryGroupResponse.round2_infos": - if x.Round2Infos == nil { - x.Round2Infos = []*Round2Info{} - } - value := &_QueryGroupResponse_5_list{list: &x.Round2Infos} - return protoreflect.ValueOfList(value) - case "tss.v1beta1.QueryGroupResponse.complaints_with_status": - if x.ComplaintsWithStatus == nil { - x.ComplaintsWithStatus = []*ComplaintsWithStatus{} - } - value := &_QueryGroupResponse_6_list{list: &x.ComplaintsWithStatus} - return protoreflect.ValueOfList(value) - case "tss.v1beta1.QueryGroupResponse.confirms": - if x.Confirms == nil { - x.Confirms = []*Confirm{} - } - value := &_QueryGroupResponse_7_list{list: &x.Confirms} - return protoreflect.ValueOfList(value) - case "tss.v1beta1.QueryGroupResponse.dkg_context": - panic(fmt.Errorf("field dkg_context of message tss.v1beta1.QueryGroupResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse 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_QueryGroupResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgEditTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryGroupResponse.group": - m := new(Group) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tss.v1beta1.QueryGroupResponse.dkg_context": - return protoreflect.ValueOfBytes(nil) - case "tss.v1beta1.QueryGroupResponse.members": - list := []*Member{} - return protoreflect.ValueOfList(&_QueryGroupResponse_3_list{list: &list}) - case "tss.v1beta1.QueryGroupResponse.round1_infos": - list := []*Round1Info{} - return protoreflect.ValueOfList(&_QueryGroupResponse_4_list{list: &list}) - case "tss.v1beta1.QueryGroupResponse.round2_infos": - list := []*Round2Info{} - return protoreflect.ValueOfList(&_QueryGroupResponse_5_list{list: &list}) - case "tss.v1beta1.QueryGroupResponse.complaints_with_status": - list := []*ComplaintsWithStatus{} - return protoreflect.ValueOfList(&_QueryGroupResponse_6_list{list: &list}) - case "tss.v1beta1.QueryGroupResponse.confirms": - list := []*Confirm{} - return protoreflect.ValueOfList(&_QueryGroupResponse_7_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryGroupResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryGroupResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse 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_QueryGroupResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgEditTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryGroupResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgEditTunnelResponse", d.FullName())) } panic("unreachable") } @@ -1879,7 +2143,7 @@ func (x *fastReflection_QueryGroupResponse) WhichOneof(d protoreflect.OneofDescr // 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_QueryGroupResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgEditTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1890,7 +2154,7 @@ func (x *fastReflection_QueryGroupResponse) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGroupResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgEditTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1902,7 +2166,7 @@ func (x *fastReflection_QueryGroupResponse) SetUnknown(fields protoreflect.RawFi // 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_QueryGroupResponse) IsValid() bool { +func (x *fastReflection_MsgEditTunnelResponse) IsValid() bool { return x != nil } @@ -1912,9 +2176,9 @@ func (x *fastReflection_QueryGroupResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGroupResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgEditTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGroupResponse) + x := input.Message.Interface().(*MsgEditTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1926,44 +2190,6 @@ func (x *fastReflection_QueryGroupResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Group != nil { - l = options.Size(x.Group) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DkgContext) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Members) > 0 { - for _, e := range x.Members { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Round1Infos) > 0 { - for _, e := range x.Round1Infos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Round2Infos) > 0 { - for _, e := range x.Round2Infos { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.ComplaintsWithStatus) > 0 { - for _, e := range x.ComplaintsWithStatus { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Confirms) > 0 { - for _, e := range x.Confirms { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1974,125 +2200,24 @@ func (x *fastReflection_QueryGroupResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupResponse) + x := input.Message.Interface().(*MsgEditTunnelResponse) 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.Confirms) > 0 { - for iNdEx := len(x.Confirms) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Confirms[iNdEx]) - 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] = 0x3a - } - } - if len(x.ComplaintsWithStatus) > 0 { - for iNdEx := len(x.ComplaintsWithStatus) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ComplaintsWithStatus[iNdEx]) - 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] = 0x32 - } - } - if len(x.Round2Infos) > 0 { - for iNdEx := len(x.Round2Infos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Round2Infos[iNdEx]) - 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.Round1Infos) > 0 { - for iNdEx := len(x.Round1Infos) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Round1Infos[iNdEx]) - 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] = 0x22 - } - } - if len(x.Members) > 0 { - for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Members[iNdEx]) - 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 len(x.DkgContext) > 0 { - i -= len(x.DkgContext) - copy(dAtA[i:], x.DkgContext) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DkgContext))) - i-- - dAtA[i] = 0x12 - } - if x.Group != nil { - encoded, err := options.Marshal(x.Group) - 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 + 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 input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -2105,7 +2230,7 @@ func (x *fastReflection_QueryGroupResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGroupResponse) + x := input.Message.Interface().(*MsgEditTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2137,252 +2262,12 @@ func (x *fastReflection_QueryGroupResponse) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnelResponse: 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 Group", 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.Group == nil { - x.Group = &Group{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Group); 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 DkgContext", wireType) - } - var byteLen 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++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - 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.DkgContext = append(x.DkgContext[:0], dAtA[iNdEx:postIndex]...) - if x.DkgContext == nil { - x.DkgContext = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Members", 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 - } - x.Members = append(x.Members, &Member{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); 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 Round1Infos", 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 - } - x.Round1Infos = append(x.Round1Infos, &Round1Info{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Round1Infos[len(x.Round1Infos)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Round2Infos", 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 - } - x.Round2Infos = append(x.Round2Infos, &Round2Info{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Round2Infos[len(x.Round2Infos)-1]); 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 ComplaintsWithStatus", 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 - } - x.ComplaintsWithStatus = append(x.ComplaintsWithStatus, &ComplaintsWithStatus{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ComplaintsWithStatus[len(x.ComplaintsWithStatus)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Confirms", 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 - } - x.Confirms = append(x.Confirms, &Confirm{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Confirms[len(x.Confirms)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2419,26 +2304,28 @@ func (x *fastReflection_QueryGroupResponse) ProtoMethods() *protoiface.Methods { } var ( - md_QueryMembersRequest protoreflect.MessageDescriptor - fd_QueryMembersRequest_group_id protoreflect.FieldDescriptor + md_MsgActivate protoreflect.MessageDescriptor + fd_MsgActivate_tunnel_id protoreflect.FieldDescriptor + fd_MsgActivate_creator protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryMembersRequest = File_tss_v1beta1_query_proto.Messages().ByName("QueryMembersRequest") - fd_QueryMembersRequest_group_id = md_QueryMembersRequest.Fields().ByName("group_id") + file_tunnel_v1beta1_tx_proto_init() + md_MsgActivate = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgActivate") + fd_MsgActivate_tunnel_id = md_MsgActivate.Fields().ByName("tunnel_id") + fd_MsgActivate_creator = md_MsgActivate.Fields().ByName("creator") } -var _ protoreflect.Message = (*fastReflection_QueryMembersRequest)(nil) +var _ protoreflect.Message = (*fastReflection_MsgActivate)(nil) -type fastReflection_QueryMembersRequest QueryMembersRequest +type fastReflection_MsgActivate MsgActivate -func (x *QueryMembersRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryMembersRequest)(x) +func (x *MsgActivate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgActivate)(x) } -func (x *QueryMembersRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[4] +func (x *MsgActivate) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2449,43 +2336,43 @@ func (x *QueryMembersRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryMembersRequest_messageType fastReflection_QueryMembersRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryMembersRequest_messageType{} +var _fastReflection_MsgActivate_messageType fastReflection_MsgActivate_messageType +var _ protoreflect.MessageType = fastReflection_MsgActivate_messageType{} -type fastReflection_QueryMembersRequest_messageType struct{} +type fastReflection_MsgActivate_messageType struct{} -func (x fastReflection_QueryMembersRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryMembersRequest)(nil) +func (x fastReflection_MsgActivate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgActivate)(nil) } -func (x fastReflection_QueryMembersRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryMembersRequest) +func (x fastReflection_MsgActivate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgActivate) } -func (x fastReflection_QueryMembersRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryMembersRequest +func (x fastReflection_MsgActivate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgActivate } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryMembersRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryMembersRequest +func (x *fastReflection_MsgActivate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgActivate } // 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_QueryMembersRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryMembersRequest_messageType +func (x *fastReflection_MsgActivate) Type() protoreflect.MessageType { + return _fastReflection_MsgActivate_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryMembersRequest) New() protoreflect.Message { - return new(fastReflection_QueryMembersRequest) +func (x *fastReflection_MsgActivate) New() protoreflect.Message { + return new(fastReflection_MsgActivate) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryMembersRequest) Interface() protoreflect.ProtoMessage { - return (*QueryMembersRequest)(x) +func (x *fastReflection_MsgActivate) Interface() protoreflect.ProtoMessage { + return (*MsgActivate)(x) } // Range iterates over every populated field in an undefined order, @@ -2493,10 +2380,16 @@ func (x *fastReflection_QueryMembersRequest) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryMembersRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_QueryMembersRequest_group_id, value) { +func (x *fastReflection_MsgActivate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgActivate_tunnel_id, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgActivate_creator, value) { return } } @@ -2513,15 +2406,17 @@ func (x *fastReflection_QueryMembersRequest) Range(f func(protoreflect.FieldDesc // 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_QueryMembersRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgActivate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryMembersRequest.group_id": - return x.GroupId != uint64(0) + case "tunnel.v1beta1.MsgActivate.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgActivate.creator": + return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) } } @@ -2531,15 +2426,17 @@ func (x *fastReflection_QueryMembersRequest) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryMembersRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgActivate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryMembersRequest.group_id": - x.GroupId = uint64(0) + case "tunnel.v1beta1.MsgActivate.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgActivate.creator": + x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) } } @@ -2549,16 +2446,19 @@ func (x *fastReflection_QueryMembersRequest) Clear(fd protoreflect.FieldDescript // 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_QueryMembersRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgActivate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryMembersRequest.group_id": - value := x.GroupId + case "tunnel.v1beta1.MsgActivate.tunnel_id": + value := x.TunnelId return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgActivate.creator": + value := x.Creator + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", descriptor.FullName())) } } @@ -2572,15 +2472,17 @@ func (x *fastReflection_QueryMembersRequest) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryMembersRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgActivate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryMembersRequest.group_id": - x.GroupId = value.Uint() + case "tunnel.v1beta1.MsgActivate.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgActivate.creator": + x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) } } @@ -2594,40 +2496,44 @@ func (x *fastReflection_QueryMembersRequest) Set(fd protoreflect.FieldDescriptor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryMembersRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgActivate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryMembersRequest.group_id": - panic(fmt.Errorf("field group_id of message tss.v1beta1.QueryMembersRequest is not mutable")) + case "tunnel.v1beta1.MsgActivate.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgActivate is not mutable")) + case "tunnel.v1beta1.MsgActivate.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgActivate is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate 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_QueryMembersRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgActivate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryMembersRequest.group_id": + case "tunnel.v1beta1.MsgActivate.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgActivate.creator": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate 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_QueryMembersRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgActivate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryMembersRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgActivate", d.FullName())) } panic("unreachable") } @@ -2635,7 +2541,7 @@ func (x *fastReflection_QueryMembersRequest) WhichOneof(d protoreflect.OneofDesc // 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_QueryMembersRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgActivate) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2646,7 +2552,7 @@ func (x *fastReflection_QueryMembersRequest) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryMembersRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgActivate) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2658,7 +2564,7 @@ func (x *fastReflection_QueryMembersRequest) SetUnknown(fields protoreflect.RawF // 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_QueryMembersRequest) IsValid() bool { +func (x *fastReflection_MsgActivate) IsValid() bool { return x != nil } @@ -2668,9 +2574,9 @@ func (x *fastReflection_QueryMembersRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryMembersRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgActivate) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryMembersRequest) + x := input.Message.Interface().(*MsgActivate) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2682,8 +2588,12 @@ func (x *fastReflection_QueryMembersRequest) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + l = len(x.Creator) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -2695,7 +2605,7 @@ func (x *fastReflection_QueryMembersRequest) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryMembersRequest) + x := input.Message.Interface().(*MsgActivate) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2714,8 +2624,15 @@ func (x *fastReflection_QueryMembersRequest) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x12 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- dAtA[i] = 0x8 } @@ -2730,7 +2647,7 @@ func (x *fastReflection_QueryMembersRequest) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryMembersRequest) + x := input.Message.Interface().(*MsgActivate) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2762,17 +2679,36 @@ func (x *fastReflection_QueryMembersRequest) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMembersRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgActivate: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMembersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgActivate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } - x.GroupId = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2782,11 +2718,24 @@ func (x *fastReflection_QueryMembersRequest) ProtoMethods() *protoiface.Methods } b := dAtA[iNdEx] iNdEx++ - x.GroupId |= uint64(b&0x7F) << shift + 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.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2822,78 +2771,25 @@ func (x *fastReflection_QueryMembersRequest) ProtoMethods() *protoiface.Methods } } -var _ protoreflect.List = (*_QueryMembersResponse_1_list)(nil) - -type _QueryMembersResponse_1_list struct { - list *[]*Member -} - -func (x *_QueryMembersResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryMembersResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryMembersResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - (*x.list)[i] = concreteValue -} - -func (x *_QueryMembersResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Member) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryMembersResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Member) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryMembersResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryMembersResponse_1_list) NewElement() protoreflect.Value { - v := new(Member) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryMembersResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_QueryMembersResponse protoreflect.MessageDescriptor - fd_QueryMembersResponse_members protoreflect.FieldDescriptor + md_MsgActivateResponse protoreflect.MessageDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryMembersResponse = File_tss_v1beta1_query_proto.Messages().ByName("QueryMembersResponse") - fd_QueryMembersResponse_members = md_QueryMembersResponse.Fields().ByName("members") + file_tunnel_v1beta1_tx_proto_init() + md_MsgActivateResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgActivateResponse") } -var _ protoreflect.Message = (*fastReflection_QueryMembersResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgActivateResponse)(nil) -type fastReflection_QueryMembersResponse QueryMembersResponse +type fastReflection_MsgActivateResponse MsgActivateResponse -func (x *QueryMembersResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryMembersResponse)(x) +func (x *MsgActivateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgActivateResponse)(x) } -func (x *QueryMembersResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[5] +func (x *MsgActivateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2904,43 +2800,43 @@ func (x *QueryMembersResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryMembersResponse_messageType fastReflection_QueryMembersResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryMembersResponse_messageType{} +var _fastReflection_MsgActivateResponse_messageType fastReflection_MsgActivateResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgActivateResponse_messageType{} -type fastReflection_QueryMembersResponse_messageType struct{} +type fastReflection_MsgActivateResponse_messageType struct{} -func (x fastReflection_QueryMembersResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryMembersResponse)(nil) +func (x fastReflection_MsgActivateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgActivateResponse)(nil) } -func (x fastReflection_QueryMembersResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryMembersResponse) +func (x fastReflection_MsgActivateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgActivateResponse) } -func (x fastReflection_QueryMembersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryMembersResponse +func (x fastReflection_MsgActivateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgActivateResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryMembersResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryMembersResponse +func (x *fastReflection_MsgActivateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgActivateResponse } // 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_QueryMembersResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryMembersResponse_messageType +func (x *fastReflection_MsgActivateResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgActivateResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryMembersResponse) New() protoreflect.Message { - return new(fastReflection_QueryMembersResponse) +func (x *fastReflection_MsgActivateResponse) New() protoreflect.Message { + return new(fastReflection_MsgActivateResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryMembersResponse) Interface() protoreflect.ProtoMessage { - return (*QueryMembersResponse)(x) +func (x *fastReflection_MsgActivateResponse) Interface() protoreflect.ProtoMessage { + return (*MsgActivateResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2948,13 +2844,7 @@ func (x *fastReflection_QueryMembersResponse) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryMembersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Members) != 0 { - value := protoreflect.ValueOfList(&_QueryMembersResponse_1_list{list: &x.Members}) - if !f(fd_QueryMembersResponse_members, value) { - return - } - } +func (x *fastReflection_MsgActivateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -2968,15 +2858,13 @@ func (x *fastReflection_QueryMembersResponse) Range(f func(protoreflect.FieldDes // 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_QueryMembersResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgActivateResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryMembersResponse.members": - return len(x.Members) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) } } @@ -2986,15 +2874,13 @@ func (x *fastReflection_QueryMembersResponse) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryMembersResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgActivateResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryMembersResponse.members": - x.Members = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) } } @@ -3004,19 +2890,13 @@ func (x *fastReflection_QueryMembersResponse) Clear(fd protoreflect.FieldDescrip // 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_QueryMembersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgActivateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryMembersResponse.members": - if len(x.Members) == 0 { - return protoreflect.ValueOfList(&_QueryMembersResponse_1_list{}) - } - listValue := &_QueryMembersResponse_1_list{list: &x.Members} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", descriptor.FullName())) } } @@ -3030,17 +2910,13 @@ func (x *fastReflection_QueryMembersResponse) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryMembersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgActivateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryMembersResponse.members": - lv := value.List() - clv := lv.(*_QueryMembersResponse_1_list) - x.Members = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) } } @@ -3054,45 +2930,36 @@ func (x *fastReflection_QueryMembersResponse) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryMembersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgActivateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryMembersResponse.members": - if x.Members == nil { - x.Members = []*Member{} - } - value := &_QueryMembersResponse_1_list{list: &x.Members} - return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse 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_QueryMembersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgActivateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryMembersResponse.members": - list := []*Member{} - return protoreflect.ValueOfList(&_QueryMembersResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryMembersResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryMembersResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse 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_QueryMembersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgActivateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryMembersResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgActivateResponse", d.FullName())) } panic("unreachable") } @@ -3100,7 +2967,7 @@ func (x *fastReflection_QueryMembersResponse) WhichOneof(d protoreflect.OneofDes // 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_QueryMembersResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgActivateResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3111,7 +2978,7 @@ func (x *fastReflection_QueryMembersResponse) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryMembersResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgActivateResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3123,7 +2990,7 @@ func (x *fastReflection_QueryMembersResponse) SetUnknown(fields protoreflect.Raw // 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_QueryMembersResponse) IsValid() bool { +func (x *fastReflection_MsgActivateResponse) IsValid() bool { return x != nil } @@ -3133,9 +3000,9 @@ func (x *fastReflection_QueryMembersResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryMembersResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgActivateResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryMembersResponse) + x := input.Message.Interface().(*MsgActivateResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3147,12 +3014,6 @@ func (x *fastReflection_QueryMembersResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if len(x.Members) > 0 { - for _, e := range x.Members { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3163,7 +3024,7 @@ func (x *fastReflection_QueryMembersResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryMembersResponse) + x := input.Message.Interface().(*MsgActivateResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3182,22 +3043,6 @@ func (x *fastReflection_QueryMembersResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Members) > 0 { - for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Members[iNdEx]) - 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 { @@ -3209,7 +3054,7 @@ func (x *fastReflection_QueryMembersResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryMembersResponse) + x := input.Message.Interface().(*MsgActivateResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3241,46 +3086,12 @@ func (x *fastReflection_QueryMembersResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMembersResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgActivateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryMembersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgActivateResponse: 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 Members", 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 - } - x.Members = append(x.Members, &Member{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Members[len(x.Members)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3317,28 +3128,28 @@ func (x *fastReflection_QueryMembersResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryIsGranteeRequest protoreflect.MessageDescriptor - fd_QueryIsGranteeRequest_granter protoreflect.FieldDescriptor - fd_QueryIsGranteeRequest_grantee protoreflect.FieldDescriptor + md_MsgDeactivate protoreflect.MessageDescriptor + fd_MsgDeactivate_tunnel_id protoreflect.FieldDescriptor + fd_MsgDeactivate_creator protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryIsGranteeRequest = File_tss_v1beta1_query_proto.Messages().ByName("QueryIsGranteeRequest") - fd_QueryIsGranteeRequest_granter = md_QueryIsGranteeRequest.Fields().ByName("granter") - fd_QueryIsGranteeRequest_grantee = md_QueryIsGranteeRequest.Fields().ByName("grantee") + file_tunnel_v1beta1_tx_proto_init() + md_MsgDeactivate = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDeactivate") + fd_MsgDeactivate_tunnel_id = md_MsgDeactivate.Fields().ByName("tunnel_id") + fd_MsgDeactivate_creator = md_MsgDeactivate.Fields().ByName("creator") } -var _ protoreflect.Message = (*fastReflection_QueryIsGranteeRequest)(nil) +var _ protoreflect.Message = (*fastReflection_MsgDeactivate)(nil) -type fastReflection_QueryIsGranteeRequest QueryIsGranteeRequest +type fastReflection_MsgDeactivate MsgDeactivate -func (x *QueryIsGranteeRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryIsGranteeRequest)(x) +func (x *MsgDeactivate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDeactivate)(x) } -func (x *QueryIsGranteeRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[6] +func (x *MsgDeactivate) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3349,43 +3160,43 @@ func (x *QueryIsGranteeRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryIsGranteeRequest_messageType fastReflection_QueryIsGranteeRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryIsGranteeRequest_messageType{} +var _fastReflection_MsgDeactivate_messageType fastReflection_MsgDeactivate_messageType +var _ protoreflect.MessageType = fastReflection_MsgDeactivate_messageType{} -type fastReflection_QueryIsGranteeRequest_messageType struct{} +type fastReflection_MsgDeactivate_messageType struct{} -func (x fastReflection_QueryIsGranteeRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryIsGranteeRequest)(nil) +func (x fastReflection_MsgDeactivate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDeactivate)(nil) } -func (x fastReflection_QueryIsGranteeRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryIsGranteeRequest) +func (x fastReflection_MsgDeactivate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDeactivate) } -func (x fastReflection_QueryIsGranteeRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIsGranteeRequest +func (x fastReflection_MsgDeactivate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeactivate } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryIsGranteeRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIsGranteeRequest +func (x *fastReflection_MsgDeactivate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeactivate } // 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_QueryIsGranteeRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryIsGranteeRequest_messageType +func (x *fastReflection_MsgDeactivate) Type() protoreflect.MessageType { + return _fastReflection_MsgDeactivate_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryIsGranteeRequest) New() protoreflect.Message { - return new(fastReflection_QueryIsGranteeRequest) +func (x *fastReflection_MsgDeactivate) New() protoreflect.Message { + return new(fastReflection_MsgDeactivate) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryIsGranteeRequest) Interface() protoreflect.ProtoMessage { - return (*QueryIsGranteeRequest)(x) +func (x *fastReflection_MsgDeactivate) Interface() protoreflect.ProtoMessage { + return (*MsgDeactivate)(x) } // Range iterates over every populated field in an undefined order, @@ -3393,16 +3204,16 @@ func (x *fastReflection_QueryIsGranteeRequest) Interface() protoreflect.ProtoMes // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryIsGranteeRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_QueryIsGranteeRequest_granter, value) { +func (x *fastReflection_MsgDeactivate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgDeactivate_tunnel_id, value) { return } } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_QueryIsGranteeRequest_grantee, value) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgDeactivate_creator, value) { return } } @@ -3419,17 +3230,17 @@ func (x *fastReflection_QueryIsGranteeRequest) Range(f func(protoreflect.FieldDe // 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_QueryIsGranteeRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgDeactivate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeRequest.granter": - return x.Granter != "" - case "tss.v1beta1.QueryIsGranteeRequest.grantee": - return x.Grantee != "" + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgDeactivate.creator": + return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) } } @@ -3439,17 +3250,17 @@ func (x *fastReflection_QueryIsGranteeRequest) Has(fd protoreflect.FieldDescript // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIsGranteeRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgDeactivate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeRequest.granter": - x.Granter = "" - case "tss.v1beta1.QueryIsGranteeRequest.grantee": - x.Grantee = "" + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgDeactivate.creator": + x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) } } @@ -3459,19 +3270,19 @@ func (x *fastReflection_QueryIsGranteeRequest) Clear(fd protoreflect.FieldDescri // 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_QueryIsGranteeRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDeactivate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryIsGranteeRequest.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "tss.v1beta1.QueryIsGranteeRequest.grantee": - value := x.Grantee + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgDeactivate.creator": + value := x.Creator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", descriptor.FullName())) } } @@ -3485,17 +3296,17 @@ func (x *fastReflection_QueryIsGranteeRequest) Get(descriptor protoreflect.Field // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIsGranteeRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgDeactivate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeRequest.granter": - x.Granter = value.Interface().(string) - case "tss.v1beta1.QueryIsGranteeRequest.grantee": - x.Grantee = value.Interface().(string) + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgDeactivate.creator": + x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) } } @@ -3509,44 +3320,44 @@ func (x *fastReflection_QueryIsGranteeRequest) Set(fd protoreflect.FieldDescript // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIsGranteeRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDeactivate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeRequest.granter": - panic(fmt.Errorf("field granter of message tss.v1beta1.QueryIsGranteeRequest is not mutable")) - case "tss.v1beta1.QueryIsGranteeRequest.grantee": - panic(fmt.Errorf("field grantee of message tss.v1beta1.QueryIsGranteeRequest is not mutable")) + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgDeactivate is not mutable")) + case "tunnel.v1beta1.MsgDeactivate.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgDeactivate is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate 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_QueryIsGranteeRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDeactivate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeRequest.granter": - return protoreflect.ValueOfString("") - case "tss.v1beta1.QueryIsGranteeRequest.grantee": + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgDeactivate.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate 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_QueryIsGranteeRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgDeactivate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryIsGranteeRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDeactivate", d.FullName())) } panic("unreachable") } @@ -3554,7 +3365,7 @@ func (x *fastReflection_QueryIsGranteeRequest) WhichOneof(d protoreflect.OneofDe // 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_QueryIsGranteeRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgDeactivate) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3565,7 +3376,7 @@ func (x *fastReflection_QueryIsGranteeRequest) GetUnknown() protoreflect.RawFiel // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIsGranteeRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgDeactivate) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3577,7 +3388,7 @@ func (x *fastReflection_QueryIsGranteeRequest) SetUnknown(fields protoreflect.Ra // 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_QueryIsGranteeRequest) IsValid() bool { +func (x *fastReflection_MsgDeactivate) IsValid() bool { return x != nil } @@ -3587,9 +3398,9 @@ func (x *fastReflection_QueryIsGranteeRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgDeactivate) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryIsGranteeRequest) + x := input.Message.Interface().(*MsgDeactivate) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3601,11 +3412,10 @@ func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Method var n int var l int _ = l - l = len(x.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) } - l = len(x.Grantee) + l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3619,7 +3429,7 @@ func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Method } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryIsGranteeRequest) + x := input.Message.Interface().(*MsgDeactivate) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3638,19 +3448,17 @@ func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0x12 } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -3663,7 +3471,7 @@ func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Method }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryIsGranteeRequest) + x := input.Message.Interface().(*MsgDeactivate) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3695,17 +3503,17 @@ func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Method fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIsGranteeRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeactivate: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIsGranteeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeactivate: 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 Granter", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - var stringLen uint64 + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3715,27 +3523,14 @@ func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Method } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.TunnelId |= 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.Granter = 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 Grantee", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3763,7 +3558,7 @@ func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Method if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Grantee = string(dAtA[iNdEx:postIndex]) + x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3801,26 +3596,24 @@ func (x *fastReflection_QueryIsGranteeRequest) ProtoMethods() *protoiface.Method } var ( - md_QueryIsGranteeResponse protoreflect.MessageDescriptor - fd_QueryIsGranteeResponse_is_grantee protoreflect.FieldDescriptor + md_MsgDeactivateResponse protoreflect.MessageDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryIsGranteeResponse = File_tss_v1beta1_query_proto.Messages().ByName("QueryIsGranteeResponse") - fd_QueryIsGranteeResponse_is_grantee = md_QueryIsGranteeResponse.Fields().ByName("is_grantee") + file_tunnel_v1beta1_tx_proto_init() + md_MsgDeactivateResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDeactivateResponse") } -var _ protoreflect.Message = (*fastReflection_QueryIsGranteeResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgDeactivateResponse)(nil) -type fastReflection_QueryIsGranteeResponse QueryIsGranteeResponse +type fastReflection_MsgDeactivateResponse MsgDeactivateResponse -func (x *QueryIsGranteeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryIsGranteeResponse)(x) +func (x *MsgDeactivateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDeactivateResponse)(x) } -func (x *QueryIsGranteeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[7] +func (x *MsgDeactivateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3831,43 +3624,43 @@ func (x *QueryIsGranteeResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryIsGranteeResponse_messageType fastReflection_QueryIsGranteeResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryIsGranteeResponse_messageType{} +var _fastReflection_MsgDeactivateResponse_messageType fastReflection_MsgDeactivateResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDeactivateResponse_messageType{} -type fastReflection_QueryIsGranteeResponse_messageType struct{} +type fastReflection_MsgDeactivateResponse_messageType struct{} -func (x fastReflection_QueryIsGranteeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryIsGranteeResponse)(nil) +func (x fastReflection_MsgDeactivateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDeactivateResponse)(nil) } -func (x fastReflection_QueryIsGranteeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryIsGranteeResponse) +func (x fastReflection_MsgDeactivateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDeactivateResponse) } -func (x fastReflection_QueryIsGranteeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIsGranteeResponse +func (x fastReflection_MsgDeactivateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeactivateResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryIsGranteeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIsGranteeResponse +func (x *fastReflection_MsgDeactivateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeactivateResponse } // 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_QueryIsGranteeResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryIsGranteeResponse_messageType +func (x *fastReflection_MsgDeactivateResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDeactivateResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryIsGranteeResponse) New() protoreflect.Message { - return new(fastReflection_QueryIsGranteeResponse) +func (x *fastReflection_MsgDeactivateResponse) New() protoreflect.Message { + return new(fastReflection_MsgDeactivateResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryIsGranteeResponse) Interface() protoreflect.ProtoMessage { - return (*QueryIsGranteeResponse)(x) +func (x *fastReflection_MsgDeactivateResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDeactivateResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3875,13 +3668,7 @@ func (x *fastReflection_QueryIsGranteeResponse) Interface() protoreflect.ProtoMe // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryIsGranteeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.IsGrantee != false { - value := protoreflect.ValueOfBool(x.IsGrantee) - if !f(fd_QueryIsGranteeResponse_is_grantee, value) { - return - } - } +func (x *fastReflection_MsgDeactivateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -3895,15 +3682,13 @@ func (x *fastReflection_QueryIsGranteeResponse) Range(f func(protoreflect.FieldD // 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_QueryIsGranteeResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgDeactivateResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeResponse.is_grantee": - return x.IsGrantee != false default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) } } @@ -3913,15 +3698,13 @@ func (x *fastReflection_QueryIsGranteeResponse) Has(fd protoreflect.FieldDescrip // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIsGranteeResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgDeactivateResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeResponse.is_grantee": - x.IsGrantee = false default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) } } @@ -3931,16 +3714,13 @@ func (x *fastReflection_QueryIsGranteeResponse) Clear(fd protoreflect.FieldDescr // 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_QueryIsGranteeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDeactivateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryIsGranteeResponse.is_grantee": - value := x.IsGrantee - return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", descriptor.FullName())) } } @@ -3954,15 +3734,13 @@ func (x *fastReflection_QueryIsGranteeResponse) Get(descriptor protoreflect.Fiel // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIsGranteeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgDeactivateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeResponse.is_grantee": - x.IsGrantee = value.Bool() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) } } @@ -3976,40 +3754,36 @@ func (x *fastReflection_QueryIsGranteeResponse) Set(fd protoreflect.FieldDescrip // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIsGranteeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDeactivateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeResponse.is_grantee": - panic(fmt.Errorf("field is_grantee of message tss.v1beta1.QueryIsGranteeResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse 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_QueryIsGranteeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDeactivateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryIsGranteeResponse.is_grantee": - return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryIsGranteeResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryIsGranteeResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse 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_QueryIsGranteeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgDeactivateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryIsGranteeResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDeactivateResponse", d.FullName())) } panic("unreachable") } @@ -4017,7 +3791,7 @@ func (x *fastReflection_QueryIsGranteeResponse) WhichOneof(d protoreflect.OneofD // 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_QueryIsGranteeResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgDeactivateResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4028,7 +3802,7 @@ func (x *fastReflection_QueryIsGranteeResponse) GetUnknown() protoreflect.RawFie // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIsGranteeResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgDeactivateResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4040,7 +3814,7 @@ func (x *fastReflection_QueryIsGranteeResponse) SetUnknown(fields protoreflect.R // 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_QueryIsGranteeResponse) IsValid() bool { +func (x *fastReflection_MsgDeactivateResponse) IsValid() bool { return x != nil } @@ -4050,9 +3824,9 @@ func (x *fastReflection_QueryIsGranteeResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryIsGranteeResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgDeactivateResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryIsGranteeResponse) + x := input.Message.Interface().(*MsgDeactivateResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4064,9 +3838,6 @@ func (x *fastReflection_QueryIsGranteeResponse) ProtoMethods() *protoiface.Metho var n int var l int _ = l - if x.IsGrantee { - n += 2 - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4077,7 +3848,7 @@ func (x *fastReflection_QueryIsGranteeResponse) ProtoMethods() *protoiface.Metho } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryIsGranteeResponse) + x := input.Message.Interface().(*MsgDeactivateResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4096,16 +3867,6 @@ func (x *fastReflection_QueryIsGranteeResponse) ProtoMethods() *protoiface.Metho i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.IsGrantee { - i-- - if x.IsGrantee { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -4117,7 +3878,7 @@ func (x *fastReflection_QueryIsGranteeResponse) ProtoMethods() *protoiface.Metho }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryIsGranteeResponse) + x := input.Message.Interface().(*MsgDeactivateResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4149,32 +3910,12 @@ func (x *fastReflection_QueryIsGranteeResponse) ProtoMethods() *protoiface.Metho fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIsGranteeResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeactivateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIsGranteeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeactivateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsGrantee", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsGrantee = bool(v != 0) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4211,28 +3952,28 @@ func (x *fastReflection_QueryIsGranteeResponse) ProtoMethods() *protoiface.Metho } var ( - md_QueryDERequest protoreflect.MessageDescriptor - fd_QueryDERequest_address protoreflect.FieldDescriptor - fd_QueryDERequest_pagination protoreflect.FieldDescriptor + md_MsgTriggerTunnel protoreflect.MessageDescriptor + fd_MsgTriggerTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgTriggerTunnel_creator protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryDERequest = File_tss_v1beta1_query_proto.Messages().ByName("QueryDERequest") - fd_QueryDERequest_address = md_QueryDERequest.Fields().ByName("address") - fd_QueryDERequest_pagination = md_QueryDERequest.Fields().ByName("pagination") + file_tunnel_v1beta1_tx_proto_init() + md_MsgTriggerTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgTriggerTunnel") + fd_MsgTriggerTunnel_tunnel_id = md_MsgTriggerTunnel.Fields().ByName("tunnel_id") + fd_MsgTriggerTunnel_creator = md_MsgTriggerTunnel.Fields().ByName("creator") } -var _ protoreflect.Message = (*fastReflection_QueryDERequest)(nil) +var _ protoreflect.Message = (*fastReflection_MsgTriggerTunnel)(nil) -type fastReflection_QueryDERequest QueryDERequest +type fastReflection_MsgTriggerTunnel MsgTriggerTunnel -func (x *QueryDERequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDERequest)(x) +func (x *MsgTriggerTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgTriggerTunnel)(x) } -func (x *QueryDERequest) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[8] +func (x *MsgTriggerTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4243,43 +3984,43 @@ func (x *QueryDERequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryDERequest_messageType fastReflection_QueryDERequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDERequest_messageType{} +var _fastReflection_MsgTriggerTunnel_messageType fastReflection_MsgTriggerTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgTriggerTunnel_messageType{} -type fastReflection_QueryDERequest_messageType struct{} +type fastReflection_MsgTriggerTunnel_messageType struct{} -func (x fastReflection_QueryDERequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDERequest)(nil) +func (x fastReflection_MsgTriggerTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgTriggerTunnel)(nil) } -func (x fastReflection_QueryDERequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDERequest) +func (x fastReflection_MsgTriggerTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgTriggerTunnel) } -func (x fastReflection_QueryDERequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDERequest +func (x fastReflection_MsgTriggerTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTriggerTunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryDERequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDERequest +func (x *fastReflection_MsgTriggerTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTriggerTunnel } // 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_QueryDERequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDERequest_messageType +func (x *fastReflection_MsgTriggerTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgTriggerTunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDERequest) New() protoreflect.Message { - return new(fastReflection_QueryDERequest) +func (x *fastReflection_MsgTriggerTunnel) New() protoreflect.Message { + return new(fastReflection_MsgTriggerTunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDERequest) Interface() protoreflect.ProtoMessage { - return (*QueryDERequest)(x) +func (x *fastReflection_MsgTriggerTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgTriggerTunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -4287,16 +4028,16 @@ func (x *fastReflection_QueryDERequest) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryDERequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryDERequest_address, value) { +func (x *fastReflection_MsgTriggerTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgTriggerTunnel_tunnel_id, value) { return } } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDERequest_pagination, value) { + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgTriggerTunnel_creator, value) { return } } @@ -4313,17 +4054,17 @@ func (x *fastReflection_QueryDERequest) Range(f func(protoreflect.FieldDescripto // 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_QueryDERequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgTriggerTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryDERequest.address": - return x.Address != "" - case "tss.v1beta1.QueryDERequest.pagination": - return x.Pagination != nil + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDERequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDERequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) } } @@ -4333,17 +4074,17 @@ func (x *fastReflection_QueryDERequest) Has(fd protoreflect.FieldDescriptor) boo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDERequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgTriggerTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryDERequest.address": - x.Address = "" - case "tss.v1beta1.QueryDERequest.pagination": - x.Pagination = nil + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDERequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDERequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) } } @@ -4353,19 +4094,19 @@ func (x *fastReflection_QueryDERequest) Clear(fd protoreflect.FieldDescriptor) { // 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_QueryDERequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTriggerTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryDERequest.address": - value := x.Address + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + value := x.Creator return protoreflect.ValueOfString(value) - case "tss.v1beta1.QueryDERequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDERequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDERequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", descriptor.FullName())) } } @@ -4379,17 +4120,17 @@ func (x *fastReflection_QueryDERequest) Get(descriptor protoreflect.FieldDescrip // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDERequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgTriggerTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryDERequest.address": - x.Address = value.Interface().(string) - case "tss.v1beta1.QueryDERequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDERequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDERequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) } } @@ -4403,48 +4144,44 @@ func (x *fastReflection_QueryDERequest) Set(fd protoreflect.FieldDescriptor, val // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDERequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTriggerTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryDERequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "tss.v1beta1.QueryDERequest.address": - panic(fmt.Errorf("field address of message tss.v1beta1.QueryDERequest is not mutable")) + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgTriggerTunnel is not mutable")) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgTriggerTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDERequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDERequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel 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_QueryDERequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTriggerTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryDERequest.address": + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": return protoreflect.ValueOfString("") - case "tss.v1beta1.QueryDERequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDERequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDERequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel 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_QueryDERequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgTriggerTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryDERequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgTriggerTunnel", d.FullName())) } panic("unreachable") } @@ -4452,7 +4189,7 @@ func (x *fastReflection_QueryDERequest) WhichOneof(d protoreflect.OneofDescripto // 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_QueryDERequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgTriggerTunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4463,7 +4200,7 @@ func (x *fastReflection_QueryDERequest) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDERequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgTriggerTunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4475,7 +4212,7 @@ func (x *fastReflection_QueryDERequest) SetUnknown(fields protoreflect.RawFields // 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_QueryDERequest) IsValid() bool { +func (x *fastReflection_MsgTriggerTunnel) IsValid() bool { return x != nil } @@ -4485,9 +4222,9 @@ func (x *fastReflection_QueryDERequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgTriggerTunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDERequest) + x := input.Message.Interface().(*MsgTriggerTunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4499,12 +4236,11 @@ func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) } - if x.Pagination != nil { - l = options.Size(x.Pagination) + l = len(x.Creator) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -4517,7 +4253,7 @@ func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDERequest) + x := input.Message.Interface().(*MsgTriggerTunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4536,26 +4272,17 @@ func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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))) + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- dAtA[i] = 0x12 } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -4568,7 +4295,7 @@ func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDERequest) + x := input.Message.Interface().(*MsgTriggerTunnel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4600,17 +4327,17 @@ func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDERequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTriggerTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDERequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTriggerTunnel: 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 Address", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - var stringLen uint64 + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4620,29 +4347,16 @@ func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.TunnelId |= 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.Address = 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 Pagination", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4652,27 +4366,23 @@ func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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 } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4683,106 +4393,51 @@ func (x *fastReflection_QueryDERequest) ProtoMethods() *protoiface.Methods { 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 _ protoreflect.List = (*_QueryDEResponse_1_list)(nil) - -type _QueryDEResponse_1_list struct { - list *[]*DE -} - -func (x *_QueryDEResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDEResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDEResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DE) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDEResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DE) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDEResponse_1_list) AppendMutable() protoreflect.Value { - v := new(DE) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} + 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 + } + } -func (x *_QueryDEResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil + 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, } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDEResponse_1_list) NewElement() protoreflect.Value { - v := new(DE) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDEResponse_1_list) IsValid() bool { - return x.list != nil } var ( - md_QueryDEResponse protoreflect.MessageDescriptor - fd_QueryDEResponse_des protoreflect.FieldDescriptor - fd_QueryDEResponse_pagination protoreflect.FieldDescriptor + md_MsgTriggerTunnelResponse protoreflect.MessageDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryDEResponse = File_tss_v1beta1_query_proto.Messages().ByName("QueryDEResponse") - fd_QueryDEResponse_des = md_QueryDEResponse.Fields().ByName("des") - fd_QueryDEResponse_pagination = md_QueryDEResponse.Fields().ByName("pagination") + file_tunnel_v1beta1_tx_proto_init() + md_MsgTriggerTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgTriggerTunnelResponse") } -var _ protoreflect.Message = (*fastReflection_QueryDEResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgTriggerTunnelResponse)(nil) -type fastReflection_QueryDEResponse QueryDEResponse +type fastReflection_MsgTriggerTunnelResponse MsgTriggerTunnelResponse -func (x *QueryDEResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDEResponse)(x) +func (x *MsgTriggerTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgTriggerTunnelResponse)(x) } -func (x *QueryDEResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[9] +func (x *MsgTriggerTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4793,43 +4448,43 @@ func (x *QueryDEResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryDEResponse_messageType fastReflection_QueryDEResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDEResponse_messageType{} +var _fastReflection_MsgTriggerTunnelResponse_messageType fastReflection_MsgTriggerTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgTriggerTunnelResponse_messageType{} -type fastReflection_QueryDEResponse_messageType struct{} +type fastReflection_MsgTriggerTunnelResponse_messageType struct{} -func (x fastReflection_QueryDEResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDEResponse)(nil) +func (x fastReflection_MsgTriggerTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgTriggerTunnelResponse)(nil) } -func (x fastReflection_QueryDEResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDEResponse) +func (x fastReflection_MsgTriggerTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgTriggerTunnelResponse) } -func (x fastReflection_QueryDEResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDEResponse +func (x fastReflection_MsgTriggerTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTriggerTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryDEResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDEResponse +func (x *fastReflection_MsgTriggerTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTriggerTunnelResponse } // 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_QueryDEResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDEResponse_messageType +func (x *fastReflection_MsgTriggerTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgTriggerTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDEResponse) New() protoreflect.Message { - return new(fastReflection_QueryDEResponse) +func (x *fastReflection_MsgTriggerTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgTriggerTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDEResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDEResponse)(x) +func (x *fastReflection_MsgTriggerTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgTriggerTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -4837,19 +4492,7 @@ func (x *fastReflection_QueryDEResponse) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryDEResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Des) != 0 { - value := protoreflect.ValueOfList(&_QueryDEResponse_1_list{list: &x.Des}) - if !f(fd_QueryDEResponse_des, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryDEResponse_pagination, value) { - return - } - } +func (x *fastReflection_MsgTriggerTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -4863,17 +4506,13 @@ func (x *fastReflection_QueryDEResponse) Range(f func(protoreflect.FieldDescript // 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_QueryDEResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgTriggerTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryDEResponse.des": - return len(x.Des) != 0 - case "tss.v1beta1.QueryDEResponse.pagination": - return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDEResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDEResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) } } @@ -4883,17 +4522,13 @@ func (x *fastReflection_QueryDEResponse) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDEResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgTriggerTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryDEResponse.des": - x.Des = nil - case "tss.v1beta1.QueryDEResponse.pagination": - x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDEResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDEResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) } } @@ -4903,22 +4538,13 @@ func (x *fastReflection_QueryDEResponse) Clear(fd protoreflect.FieldDescriptor) // 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_QueryDEResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTriggerTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryDEResponse.des": - if len(x.Des) == 0 { - return protoreflect.ValueOfList(&_QueryDEResponse_1_list{}) - } - listValue := &_QueryDEResponse_1_list{list: &x.Des} - return protoreflect.ValueOfList(listValue) - case "tss.v1beta1.QueryDEResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDEResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDEResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -4932,19 +4558,13 @@ func (x *fastReflection_QueryDEResponse) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDEResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgTriggerTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryDEResponse.des": - lv := value.List() - clv := lv.(*_QueryDEResponse_1_list) - x.Des = *clv.list - case "tss.v1beta1.QueryDEResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDEResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDEResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) } } @@ -4958,53 +4578,36 @@ func (x *fastReflection_QueryDEResponse) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDEResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTriggerTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryDEResponse.des": - if x.Des == nil { - x.Des = []*DE{} - } - value := &_QueryDEResponse_1_list{list: &x.Des} - return protoreflect.ValueOfList(value) - case "tss.v1beta1.QueryDEResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDEResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDEResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse 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_QueryDEResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgTriggerTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryDEResponse.des": - list := []*DE{} - return protoreflect.ValueOfList(&_QueryDEResponse_1_list{list: &list}) - case "tss.v1beta1.QueryDEResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryDEResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryDEResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse 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_QueryDEResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgTriggerTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryDEResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgTriggerTunnelResponse", d.FullName())) } panic("unreachable") } @@ -5012,7 +4615,7 @@ func (x *fastReflection_QueryDEResponse) WhichOneof(d protoreflect.OneofDescript // 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_QueryDEResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgTriggerTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5023,7 +4626,7 @@ func (x *fastReflection_QueryDEResponse) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDEResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgTriggerTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5035,7 +4638,7 @@ func (x *fastReflection_QueryDEResponse) SetUnknown(fields protoreflect.RawField // 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_QueryDEResponse) IsValid() bool { +func (x *fastReflection_MsgTriggerTunnelResponse) IsValid() bool { return x != nil } @@ -5045,9 +4648,9 @@ func (x *fastReflection_QueryDEResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryDEResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgTriggerTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDEResponse) + x := input.Message.Interface().(*MsgTriggerTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5059,16 +4662,6 @@ func (x *fastReflection_QueryDEResponse) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if len(x.Des) > 0 { - for _, e := range x.Des { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5079,7 +4672,7 @@ func (x *fastReflection_QueryDEResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDEResponse) + x := input.Message.Interface().(*MsgTriggerTunnelResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5098,36 +4691,6 @@ func (x *fastReflection_QueryDEResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - 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.Des) > 0 { - for iNdEx := len(x.Des) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Des[iNdEx]) - 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 { @@ -5139,7 +4702,7 @@ func (x *fastReflection_QueryDEResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDEResponse) + x := input.Message.Interface().(*MsgTriggerTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5171,82 +4734,12 @@ func (x *fastReflection_QueryDEResponse) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDEResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTriggerTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDEResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTriggerTunnelResponse: 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 Des", 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 - } - x.Des = append(x.Des, &DE{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Des[len(x.Des)-1]); 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 Pagination", 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.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5282,27 +4775,82 @@ func (x *fastReflection_QueryDEResponse) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_MsgDepositTunnel_2_list)(nil) + +type _MsgDepositTunnel_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgDepositTunnel_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgDepositTunnel_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgDepositTunnel_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgDepositTunnel_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgDepositTunnel_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgDepositTunnel_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgDepositTunnel_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgDepositTunnel_2_list) IsValid() bool { + return x.list != nil +} + var ( - md_QueryPendingGroupsRequest protoreflect.MessageDescriptor - fd_QueryPendingGroupsRequest_address protoreflect.FieldDescriptor + md_MsgDepositTunnel protoreflect.MessageDescriptor + fd_MsgDepositTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgDepositTunnel_amount protoreflect.FieldDescriptor + fd_MsgDepositTunnel_depositor protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryPendingGroupsRequest = File_tss_v1beta1_query_proto.Messages().ByName("QueryPendingGroupsRequest") - fd_QueryPendingGroupsRequest_address = md_QueryPendingGroupsRequest.Fields().ByName("address") + file_tunnel_v1beta1_tx_proto_init() + md_MsgDepositTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnel") + fd_MsgDepositTunnel_tunnel_id = md_MsgDepositTunnel.Fields().ByName("tunnel_id") + fd_MsgDepositTunnel_amount = md_MsgDepositTunnel.Fields().ByName("amount") + fd_MsgDepositTunnel_depositor = md_MsgDepositTunnel.Fields().ByName("depositor") } -var _ protoreflect.Message = (*fastReflection_QueryPendingGroupsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_MsgDepositTunnel)(nil) -type fastReflection_QueryPendingGroupsRequest QueryPendingGroupsRequest +type fastReflection_MsgDepositTunnel MsgDepositTunnel -func (x *QueryPendingGroupsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPendingGroupsRequest)(x) +func (x *MsgDepositTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDepositTunnel)(x) } -func (x *QueryPendingGroupsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[10] +func (x *MsgDepositTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5313,43 +4861,43 @@ func (x *QueryPendingGroupsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryPendingGroupsRequest_messageType fastReflection_QueryPendingGroupsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryPendingGroupsRequest_messageType{} +var _fastReflection_MsgDepositTunnel_messageType fastReflection_MsgDepositTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgDepositTunnel_messageType{} -type fastReflection_QueryPendingGroupsRequest_messageType struct{} +type fastReflection_MsgDepositTunnel_messageType struct{} -func (x fastReflection_QueryPendingGroupsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPendingGroupsRequest)(nil) +func (x fastReflection_MsgDepositTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDepositTunnel)(nil) } -func (x fastReflection_QueryPendingGroupsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPendingGroupsRequest) +func (x fastReflection_MsgDepositTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDepositTunnel) } -func (x fastReflection_QueryPendingGroupsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingGroupsRequest +func (x fastReflection_MsgDepositTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositTunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryPendingGroupsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingGroupsRequest +func (x *fastReflection_MsgDepositTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositTunnel } // 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_QueryPendingGroupsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryPendingGroupsRequest_messageType +func (x *fastReflection_MsgDepositTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgDepositTunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPendingGroupsRequest) New() protoreflect.Message { - return new(fastReflection_QueryPendingGroupsRequest) +func (x *fastReflection_MsgDepositTunnel) New() protoreflect.Message { + return new(fastReflection_MsgDepositTunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPendingGroupsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryPendingGroupsRequest)(x) +func (x *fastReflection_MsgDepositTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgDepositTunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -5357,10 +4905,22 @@ func (x *fastReflection_QueryPendingGroupsRequest) Interface() protoreflect.Prot // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryPendingGroupsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryPendingGroupsRequest_address, value) { +func (x *fastReflection_MsgDepositTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgDepositTunnel_tunnel_id, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{list: &x.Amount}) + if !f(fd_MsgDepositTunnel_amount, value) { + return + } + } + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_MsgDepositTunnel_depositor, value) { return } } @@ -5377,15 +4937,19 @@ func (x *fastReflection_QueryPendingGroupsRequest) Range(f func(protoreflect.Fie // 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_QueryPendingGroupsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgDepositTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsRequest.address": - return x.Address != "" + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + return len(x.Amount) != 0 + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + return x.Depositor != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) } } @@ -5395,15 +4959,19 @@ func (x *fastReflection_QueryPendingGroupsRequest) Has(fd protoreflect.FieldDesc // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingGroupsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgDepositTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsRequest.address": - x.Address = "" + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + x.Amount = nil + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + x.Depositor = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) } } @@ -5413,16 +4981,25 @@ func (x *fastReflection_QueryPendingGroupsRequest) Clear(fd protoreflect.FieldDe // 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_QueryPendingGroupsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryPendingGroupsRequest.address": - value := x.Address + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{}) + } + listValue := &_MsgDepositTunnel_2_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + value := x.Depositor return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", descriptor.FullName())) } } @@ -5436,15 +5013,21 @@ func (x *fastReflection_QueryPendingGroupsRequest) Get(descriptor protoreflect.F // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingGroupsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgDepositTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsRequest.address": - x.Address = value.Interface().(string) + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgDepositTunnel.amount": + lv := value.List() + clv := lv.(*_MsgDepositTunnel_2_list) + x.Amount = *clv.list + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + x.Depositor = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) } } @@ -5458,40 +5041,53 @@ func (x *fastReflection_QueryPendingGroupsRequest) Set(fd protoreflect.FieldDesc // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingGroupsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsRequest.address": - panic(fmt.Errorf("field address of message tss.v1beta1.QueryPendingGroupsRequest is not mutable")) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgDepositTunnel_2_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgDepositTunnel is not mutable")) + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + panic(fmt.Errorf("field depositor of message tunnel.v1beta1.MsgDepositTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel 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_QueryPendingGroupsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsRequest.address": + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{list: &list}) + case "tunnel.v1beta1.MsgDepositTunnel.depositor": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel 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_QueryPendingGroupsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgDepositTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryPendingGroupsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDepositTunnel", d.FullName())) } panic("unreachable") } @@ -5499,7 +5095,7 @@ func (x *fastReflection_QueryPendingGroupsRequest) WhichOneof(d protoreflect.One // 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_QueryPendingGroupsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgDepositTunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5510,7 +5106,7 @@ func (x *fastReflection_QueryPendingGroupsRequest) GetUnknown() protoreflect.Raw // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingGroupsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgDepositTunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5522,7 +5118,7 @@ func (x *fastReflection_QueryPendingGroupsRequest) SetUnknown(fields protoreflec // 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_QueryPendingGroupsRequest) IsValid() bool { +func (x *fastReflection_MsgDepositTunnel) IsValid() bool { return x != nil } @@ -5532,9 +5128,9 @@ func (x *fastReflection_QueryPendingGroupsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryPendingGroupsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgDepositTunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPendingGroupsRequest) + x := input.Message.Interface().(*MsgDepositTunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5546,7 +5142,16 @@ func (x *fastReflection_QueryPendingGroupsRequest) ProtoMethods() *protoiface.Me var n int var l int _ = l - l = len(x.Address) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Depositor) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -5560,7 +5165,7 @@ func (x *fastReflection_QueryPendingGroupsRequest) ProtoMethods() *protoiface.Me } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingGroupsRequest) + x := input.Message.Interface().(*MsgDepositTunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5579,12 +5184,33 @@ func (x *fastReflection_QueryPendingGroupsRequest) ProtoMethods() *protoiface.Me i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + if len(x.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x1a + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -5597,7 +5223,7 @@ func (x *fastReflection_QueryPendingGroupsRequest) ProtoMethods() *protoiface.Me }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingGroupsRequest) + x := input.Message.Interface().(*MsgDepositTunnel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5616,28 +5242,81 @@ func (x *fastReflection_QueryPendingGroupsRequest) ProtoMethods() *protoiface.Me if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } - if iNdEx >= l { + 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: MsgDepositTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingGroupsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingGroupsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5665,7 +5344,7 @@ func (x *fastReflection_QueryPendingGroupsRequest) ProtoMethods() *protoiface.Me if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Address = string(dAtA[iNdEx:postIndex]) + x.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5702,73 +5381,25 @@ func (x *fastReflection_QueryPendingGroupsRequest) ProtoMethods() *protoiface.Me } } -var _ protoreflect.List = (*_QueryPendingGroupsResponse_1_list)(nil) - -type _QueryPendingGroupsResponse_1_list struct { - list *[]uint64 -} - -func (x *_QueryPendingGroupsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryPendingGroupsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_QueryPendingGroupsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_QueryPendingGroupsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryPendingGroupsResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message QueryPendingGroupsResponse at list field PendingGroups as it is not of Message kind")) -} - -func (x *_QueryPendingGroupsResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_QueryPendingGroupsResponse_1_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_QueryPendingGroupsResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_QueryPendingGroupsResponse protoreflect.MessageDescriptor - fd_QueryPendingGroupsResponse_pending_groups protoreflect.FieldDescriptor + md_MsgDepositTunnelResponse protoreflect.MessageDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryPendingGroupsResponse = File_tss_v1beta1_query_proto.Messages().ByName("QueryPendingGroupsResponse") - fd_QueryPendingGroupsResponse_pending_groups = md_QueryPendingGroupsResponse.Fields().ByName("pending_groups") + file_tunnel_v1beta1_tx_proto_init() + md_MsgDepositTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnelResponse") } -var _ protoreflect.Message = (*fastReflection_QueryPendingGroupsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgDepositTunnelResponse)(nil) -type fastReflection_QueryPendingGroupsResponse QueryPendingGroupsResponse +type fastReflection_MsgDepositTunnelResponse MsgDepositTunnelResponse -func (x *QueryPendingGroupsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPendingGroupsResponse)(x) +func (x *MsgDepositTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDepositTunnelResponse)(x) } -func (x *QueryPendingGroupsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[11] +func (x *MsgDepositTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5779,43 +5410,43 @@ func (x *QueryPendingGroupsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryPendingGroupsResponse_messageType fastReflection_QueryPendingGroupsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryPendingGroupsResponse_messageType{} +var _fastReflection_MsgDepositTunnelResponse_messageType fastReflection_MsgDepositTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDepositTunnelResponse_messageType{} -type fastReflection_QueryPendingGroupsResponse_messageType struct{} +type fastReflection_MsgDepositTunnelResponse_messageType struct{} -func (x fastReflection_QueryPendingGroupsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPendingGroupsResponse)(nil) +func (x fastReflection_MsgDepositTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDepositTunnelResponse)(nil) } -func (x fastReflection_QueryPendingGroupsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPendingGroupsResponse) +func (x fastReflection_MsgDepositTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDepositTunnelResponse) } -func (x fastReflection_QueryPendingGroupsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingGroupsResponse +func (x fastReflection_MsgDepositTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryPendingGroupsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingGroupsResponse +func (x *fastReflection_MsgDepositTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositTunnelResponse } // 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_QueryPendingGroupsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryPendingGroupsResponse_messageType +func (x *fastReflection_MsgDepositTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDepositTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPendingGroupsResponse) New() protoreflect.Message { - return new(fastReflection_QueryPendingGroupsResponse) +func (x *fastReflection_MsgDepositTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgDepositTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPendingGroupsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryPendingGroupsResponse)(x) +func (x *fastReflection_MsgDepositTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDepositTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -5823,13 +5454,7 @@ func (x *fastReflection_QueryPendingGroupsResponse) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryPendingGroupsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.PendingGroups) != 0 { - value := protoreflect.ValueOfList(&_QueryPendingGroupsResponse_1_list{list: &x.PendingGroups}) - if !f(fd_QueryPendingGroupsResponse_pending_groups, value) { - return - } - } +func (x *fastReflection_MsgDepositTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -5843,15 +5468,13 @@ func (x *fastReflection_QueryPendingGroupsResponse) Range(f func(protoreflect.Fi // 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_QueryPendingGroupsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgDepositTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsResponse.pending_groups": - return len(x.PendingGroups) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5861,15 +5484,13 @@ func (x *fastReflection_QueryPendingGroupsResponse) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingGroupsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgDepositTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsResponse.pending_groups": - x.PendingGroups = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5879,19 +5500,13 @@ func (x *fastReflection_QueryPendingGroupsResponse) Clear(fd protoreflect.FieldD // 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_QueryPendingGroupsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryPendingGroupsResponse.pending_groups": - if len(x.PendingGroups) == 0 { - return protoreflect.ValueOfList(&_QueryPendingGroupsResponse_1_list{}) - } - listValue := &_QueryPendingGroupsResponse_1_list{list: &x.PendingGroups} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -5905,17 +5520,13 @@ func (x *fastReflection_QueryPendingGroupsResponse) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingGroupsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgDepositTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsResponse.pending_groups": - lv := value.List() - clv := lv.(*_QueryPendingGroupsResponse_1_list) - x.PendingGroups = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5929,45 +5540,36 @@ func (x *fastReflection_QueryPendingGroupsResponse) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingGroupsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsResponse.pending_groups": - if x.PendingGroups == nil { - x.PendingGroups = []uint64{} - } - value := &_QueryPendingGroupsResponse_1_list{list: &x.PendingGroups} - return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse 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_QueryPendingGroupsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryPendingGroupsResponse.pending_groups": - list := []uint64{} - return protoreflect.ValueOfList(&_QueryPendingGroupsResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingGroupsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingGroupsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse 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_QueryPendingGroupsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgDepositTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryPendingGroupsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDepositTunnelResponse", d.FullName())) } panic("unreachable") } @@ -5975,7 +5577,7 @@ func (x *fastReflection_QueryPendingGroupsResponse) WhichOneof(d protoreflect.On // 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_QueryPendingGroupsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgDepositTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5986,7 +5588,7 @@ func (x *fastReflection_QueryPendingGroupsResponse) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingGroupsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgDepositTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5998,7 +5600,7 @@ func (x *fastReflection_QueryPendingGroupsResponse) SetUnknown(fields protorefle // 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_QueryPendingGroupsResponse) IsValid() bool { +func (x *fastReflection_MsgDepositTunnelResponse) IsValid() bool { return x != nil } @@ -6008,9 +5610,9 @@ func (x *fastReflection_QueryPendingGroupsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryPendingGroupsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgDepositTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPendingGroupsResponse) + x := input.Message.Interface().(*MsgDepositTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6022,13 +5624,6 @@ func (x *fastReflection_QueryPendingGroupsResponse) ProtoMethods() *protoiface.M var n int var l int _ = l - if len(x.PendingGroups) > 0 { - l = 0 - for _, e := range x.PendingGroups { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6039,7 +5634,7 @@ func (x *fastReflection_QueryPendingGroupsResponse) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingGroupsResponse) + x := input.Message.Interface().(*MsgDepositTunnelResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6058,26 +5653,6 @@ func (x *fastReflection_QueryPendingGroupsResponse) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.PendingGroups) > 0 { - var pksize2 int - for _, num := range x.PendingGroups { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.PendingGroups { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -6089,7 +5664,7 @@ func (x *fastReflection_QueryPendingGroupsResponse) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingGroupsResponse) + x := input.Message.Interface().(*MsgDepositTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6121,88 +5696,12 @@ func (x *fastReflection_QueryPendingGroupsResponse) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingGroupsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingGroupsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType == 0 { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.PendingGroups = append(x.PendingGroups, v) - } else if wireType == 2 { - var packedLen 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++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - 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 - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.PendingGroups) == 0 { - x.PendingGroups = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.PendingGroups = append(x.PendingGroups, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PendingGroups", wireType) - } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -6238,27 +5737,82 @@ func (x *fastReflection_QueryPendingGroupsResponse) ProtoMethods() *protoiface.M } } +var _ protoreflect.List = (*_MsgWithdrawTunnel_2_list)(nil) + +type _MsgWithdrawTunnel_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgWithdrawTunnel_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdrawTunnel_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgWithdrawTunnel_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdrawTunnel_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdrawTunnel_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawTunnel_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdrawTunnel_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawTunnel_2_list) IsValid() bool { + return x.list != nil +} + var ( - md_QueryPendingSigningsRequest protoreflect.MessageDescriptor - fd_QueryPendingSigningsRequest_address protoreflect.FieldDescriptor + md_MsgWithdrawTunnel protoreflect.MessageDescriptor + fd_MsgWithdrawTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgWithdrawTunnel_amount protoreflect.FieldDescriptor + fd_MsgWithdrawTunnel_withdrawer protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryPendingSigningsRequest = File_tss_v1beta1_query_proto.Messages().ByName("QueryPendingSigningsRequest") - fd_QueryPendingSigningsRequest_address = md_QueryPendingSigningsRequest.Fields().ByName("address") + file_tunnel_v1beta1_tx_proto_init() + md_MsgWithdrawTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnel") + fd_MsgWithdrawTunnel_tunnel_id = md_MsgWithdrawTunnel.Fields().ByName("tunnel_id") + fd_MsgWithdrawTunnel_amount = md_MsgWithdrawTunnel.Fields().ByName("amount") + fd_MsgWithdrawTunnel_withdrawer = md_MsgWithdrawTunnel.Fields().ByName("withdrawer") } -var _ protoreflect.Message = (*fastReflection_QueryPendingSigningsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_MsgWithdrawTunnel)(nil) -type fastReflection_QueryPendingSigningsRequest QueryPendingSigningsRequest +type fastReflection_MsgWithdrawTunnel MsgWithdrawTunnel -func (x *QueryPendingSigningsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPendingSigningsRequest)(x) +func (x *MsgWithdrawTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawTunnel)(x) } -func (x *QueryPendingSigningsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[12] +func (x *MsgWithdrawTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6269,43 +5823,43 @@ func (x *QueryPendingSigningsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryPendingSigningsRequest_messageType fastReflection_QueryPendingSigningsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryPendingSigningsRequest_messageType{} +var _fastReflection_MsgWithdrawTunnel_messageType fastReflection_MsgWithdrawTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawTunnel_messageType{} -type fastReflection_QueryPendingSigningsRequest_messageType struct{} +type fastReflection_MsgWithdrawTunnel_messageType struct{} -func (x fastReflection_QueryPendingSigningsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPendingSigningsRequest)(nil) +func (x fastReflection_MsgWithdrawTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawTunnel)(nil) } -func (x fastReflection_QueryPendingSigningsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPendingSigningsRequest) +func (x fastReflection_MsgWithdrawTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawTunnel) } -func (x fastReflection_QueryPendingSigningsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingSigningsRequest +func (x fastReflection_MsgWithdrawTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawTunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryPendingSigningsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingSigningsRequest +func (x *fastReflection_MsgWithdrawTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawTunnel } // 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_QueryPendingSigningsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryPendingSigningsRequest_messageType +func (x *fastReflection_MsgWithdrawTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawTunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPendingSigningsRequest) New() protoreflect.Message { - return new(fastReflection_QueryPendingSigningsRequest) +func (x *fastReflection_MsgWithdrawTunnel) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawTunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPendingSigningsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryPendingSigningsRequest)(x) +func (x *fastReflection_MsgWithdrawTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawTunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -6313,10 +5867,22 @@ func (x *fastReflection_QueryPendingSigningsRequest) Interface() protoreflect.Pr // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryPendingSigningsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryPendingSigningsRequest_address, value) { +func (x *fastReflection_MsgWithdrawTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgWithdrawTunnel_tunnel_id, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{list: &x.Amount}) + if !f(fd_MsgWithdrawTunnel_amount, value) { + return + } + } + if x.Withdrawer != "" { + value := protoreflect.ValueOfString(x.Withdrawer) + if !f(fd_MsgWithdrawTunnel_withdrawer, value) { return } } @@ -6333,15 +5899,19 @@ func (x *fastReflection_QueryPendingSigningsRequest) Range(f func(protoreflect.F // 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_QueryPendingSigningsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgWithdrawTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsRequest.address": - return x.Address != "" + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + return len(x.Amount) != 0 + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + return x.Withdrawer != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) } } @@ -6351,15 +5921,19 @@ func (x *fastReflection_QueryPendingSigningsRequest) Has(fd protoreflect.FieldDe // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingSigningsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgWithdrawTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsRequest.address": - x.Address = "" + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + x.Amount = nil + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + x.Withdrawer = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) } } @@ -6369,16 +5943,25 @@ func (x *fastReflection_QueryPendingSigningsRequest) Clear(fd protoreflect.Field // 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_QueryPendingSigningsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryPendingSigningsRequest.address": - value := x.Address + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{}) + } + listValue := &_MsgWithdrawTunnel_2_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + value := x.Withdrawer return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", descriptor.FullName())) } } @@ -6392,15 +5975,21 @@ func (x *fastReflection_QueryPendingSigningsRequest) Get(descriptor protoreflect // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingSigningsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgWithdrawTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsRequest.address": - x.Address = value.Interface().(string) + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + lv := value.List() + clv := lv.(*_MsgWithdrawTunnel_2_list) + x.Amount = *clv.list + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + x.Withdrawer = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) } } @@ -6414,40 +6003,53 @@ func (x *fastReflection_QueryPendingSigningsRequest) Set(fd protoreflect.FieldDe // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingSigningsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsRequest.address": - panic(fmt.Errorf("field address of message tss.v1beta1.QueryPendingSigningsRequest is not mutable")) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgWithdrawTunnel_2_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + panic(fmt.Errorf("field withdrawer of message tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel 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_QueryPendingSigningsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsRequest.address": + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{list: &list}) + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel 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_QueryPendingSigningsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgWithdrawTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryPendingSigningsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgWithdrawTunnel", d.FullName())) } panic("unreachable") } @@ -6455,7 +6057,7 @@ func (x *fastReflection_QueryPendingSigningsRequest) WhichOneof(d protoreflect.O // 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_QueryPendingSigningsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgWithdrawTunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6466,7 +6068,7 @@ func (x *fastReflection_QueryPendingSigningsRequest) GetUnknown() protoreflect.R // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingSigningsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgWithdrawTunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6478,7 +6080,7 @@ func (x *fastReflection_QueryPendingSigningsRequest) SetUnknown(fields protorefl // 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_QueryPendingSigningsRequest) IsValid() bool { +func (x *fastReflection_MsgWithdrawTunnel) IsValid() bool { return x != nil } @@ -6488,9 +6090,9 @@ func (x *fastReflection_QueryPendingSigningsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryPendingSigningsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgWithdrawTunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPendingSigningsRequest) + x := input.Message.Interface().(*MsgWithdrawTunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6502,7 +6104,16 @@ func (x *fastReflection_QueryPendingSigningsRequest) ProtoMethods() *protoiface. var n int var l int _ = l - l = len(x.Address) + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Withdrawer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -6516,7 +6127,7 @@ func (x *fastReflection_QueryPendingSigningsRequest) ProtoMethods() *protoiface. } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingSigningsRequest) + x := input.Message.Interface().(*MsgWithdrawTunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6535,12 +6146,33 @@ func (x *fastReflection_QueryPendingSigningsRequest) ProtoMethods() *protoiface. i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + if len(x.Withdrawer) > 0 { + i -= len(x.Withdrawer) + copy(dAtA[i:], x.Withdrawer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Withdrawer))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x1a + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -6553,7 +6185,7 @@ func (x *fastReflection_QueryPendingSigningsRequest) ProtoMethods() *protoiface. }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingSigningsRequest) + x := input.Message.Interface().(*MsgWithdrawTunnel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6585,15 +6217,68 @@ func (x *fastReflection_QueryPendingSigningsRequest) ProtoMethods() *protoiface. fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingSigningsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingSigningsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); 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 Address", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Withdrawer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6621,7 +6306,7 @@ func (x *fastReflection_QueryPendingSigningsRequest) ProtoMethods() *protoiface. if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Address = string(dAtA[iNdEx:postIndex]) + x.Withdrawer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -6658,73 +6343,25 @@ func (x *fastReflection_QueryPendingSigningsRequest) ProtoMethods() *protoiface. } } -var _ protoreflect.List = (*_QueryPendingSigningsResponse_1_list)(nil) - -type _QueryPendingSigningsResponse_1_list struct { - list *[]uint64 -} - -func (x *_QueryPendingSigningsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryPendingSigningsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_QueryPendingSigningsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_QueryPendingSigningsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryPendingSigningsResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message QueryPendingSigningsResponse at list field PendingSignings as it is not of Message kind")) -} - -func (x *_QueryPendingSigningsResponse_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_QueryPendingSigningsResponse_1_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_QueryPendingSigningsResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_QueryPendingSigningsResponse protoreflect.MessageDescriptor - fd_QueryPendingSigningsResponse_pending_signings protoreflect.FieldDescriptor + md_MsgWithdrawTunnelResponse protoreflect.MessageDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QueryPendingSigningsResponse = File_tss_v1beta1_query_proto.Messages().ByName("QueryPendingSigningsResponse") - fd_QueryPendingSigningsResponse_pending_signings = md_QueryPendingSigningsResponse.Fields().ByName("pending_signings") + file_tunnel_v1beta1_tx_proto_init() + md_MsgWithdrawTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnelResponse") } -var _ protoreflect.Message = (*fastReflection_QueryPendingSigningsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgWithdrawTunnelResponse)(nil) -type fastReflection_QueryPendingSigningsResponse QueryPendingSigningsResponse +type fastReflection_MsgWithdrawTunnelResponse MsgWithdrawTunnelResponse -func (x *QueryPendingSigningsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPendingSigningsResponse)(x) +func (x *MsgWithdrawTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawTunnelResponse)(x) } -func (x *QueryPendingSigningsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[13] +func (x *MsgWithdrawTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6735,43 +6372,43 @@ func (x *QueryPendingSigningsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryPendingSigningsResponse_messageType fastReflection_QueryPendingSigningsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryPendingSigningsResponse_messageType{} +var _fastReflection_MsgWithdrawTunnelResponse_messageType fastReflection_MsgWithdrawTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawTunnelResponse_messageType{} -type fastReflection_QueryPendingSigningsResponse_messageType struct{} +type fastReflection_MsgWithdrawTunnelResponse_messageType struct{} -func (x fastReflection_QueryPendingSigningsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPendingSigningsResponse)(nil) +func (x fastReflection_MsgWithdrawTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawTunnelResponse)(nil) } -func (x fastReflection_QueryPendingSigningsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPendingSigningsResponse) +func (x fastReflection_MsgWithdrawTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawTunnelResponse) } -func (x fastReflection_QueryPendingSigningsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingSigningsResponse +func (x fastReflection_MsgWithdrawTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryPendingSigningsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingSigningsResponse +func (x *fastReflection_MsgWithdrawTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawTunnelResponse } // 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_QueryPendingSigningsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryPendingSigningsResponse_messageType +func (x *fastReflection_MsgWithdrawTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPendingSigningsResponse) New() protoreflect.Message { - return new(fastReflection_QueryPendingSigningsResponse) +func (x *fastReflection_MsgWithdrawTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPendingSigningsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryPendingSigningsResponse)(x) +func (x *fastReflection_MsgWithdrawTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -6779,13 +6416,7 @@ func (x *fastReflection_QueryPendingSigningsResponse) Interface() protoreflect.P // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryPendingSigningsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.PendingSignings) != 0 { - value := protoreflect.ValueOfList(&_QueryPendingSigningsResponse_1_list{list: &x.PendingSignings}) - if !f(fd_QueryPendingSigningsResponse_pending_signings, value) { - return - } - } +func (x *fastReflection_MsgWithdrawTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -6799,15 +6430,13 @@ func (x *fastReflection_QueryPendingSigningsResponse) Range(f func(protoreflect. // 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_QueryPendingSigningsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgWithdrawTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsResponse.pending_signings": - return len(x.PendingSignings) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6817,15 +6446,13 @@ func (x *fastReflection_QueryPendingSigningsResponse) Has(fd protoreflect.FieldD // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingSigningsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgWithdrawTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsResponse.pending_signings": - x.PendingSignings = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6835,19 +6462,13 @@ func (x *fastReflection_QueryPendingSigningsResponse) Clear(fd protoreflect.Fiel // 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_QueryPendingSigningsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QueryPendingSigningsResponse.pending_signings": - if len(x.PendingSignings) == 0 { - return protoreflect.ValueOfList(&_QueryPendingSigningsResponse_1_list{}) - } - listValue := &_QueryPendingSigningsResponse_1_list{list: &x.PendingSignings} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -6861,17 +6482,13 @@ func (x *fastReflection_QueryPendingSigningsResponse) Get(descriptor protoreflec // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingSigningsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgWithdrawTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsResponse.pending_signings": - lv := value.List() - clv := lv.(*_QueryPendingSigningsResponse_1_list) - x.PendingSignings = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6885,45 +6502,36 @@ func (x *fastReflection_QueryPendingSigningsResponse) Set(fd protoreflect.FieldD // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingSigningsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsResponse.pending_signings": - if x.PendingSignings == nil { - x.PendingSignings = []uint64{} - } - value := &_QueryPendingSigningsResponse_1_list{list: &x.PendingSignings} - return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse 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_QueryPendingSigningsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QueryPendingSigningsResponse.pending_signings": - list := []uint64{} - return protoreflect.ValueOfList(&_QueryPendingSigningsResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QueryPendingSigningsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QueryPendingSigningsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse 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_QueryPendingSigningsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgWithdrawTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QueryPendingSigningsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgWithdrawTunnelResponse", d.FullName())) } panic("unreachable") } @@ -6931,7 +6539,7 @@ func (x *fastReflection_QueryPendingSigningsResponse) WhichOneof(d protoreflect. // 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_QueryPendingSigningsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgWithdrawTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6942,7 +6550,7 @@ func (x *fastReflection_QueryPendingSigningsResponse) GetUnknown() protoreflect. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingSigningsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgWithdrawTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6954,7 +6562,7 @@ func (x *fastReflection_QueryPendingSigningsResponse) SetUnknown(fields protoref // 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_QueryPendingSigningsResponse) IsValid() bool { +func (x *fastReflection_MsgWithdrawTunnelResponse) IsValid() bool { return x != nil } @@ -6964,9 +6572,9 @@ func (x *fastReflection_QueryPendingSigningsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryPendingSigningsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgWithdrawTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPendingSigningsResponse) + x := input.Message.Interface().(*MsgWithdrawTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6978,13 +6586,6 @@ func (x *fastReflection_QueryPendingSigningsResponse) ProtoMethods() *protoiface var n int var l int _ = l - if len(x.PendingSignings) > 0 { - l = 0 - for _, e := range x.PendingSignings { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6995,7 +6596,7 @@ func (x *fastReflection_QueryPendingSigningsResponse) ProtoMethods() *protoiface } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingSigningsResponse) + x := input.Message.Interface().(*MsgWithdrawTunnelResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -7014,26 +6615,6 @@ func (x *fastReflection_QueryPendingSigningsResponse) ProtoMethods() *protoiface i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.PendingSignings) > 0 { - var pksize2 int - for _, num := range x.PendingSignings { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.PendingSignings { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -7045,7 +6626,7 @@ func (x *fastReflection_QueryPendingSigningsResponse) ProtoMethods() *protoiface }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingSigningsResponse) + x := input.Message.Interface().(*MsgWithdrawTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -7077,88 +6658,12 @@ func (x *fastReflection_QueryPendingSigningsResponse) ProtoMethods() *protoiface fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingSigningsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingSigningsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType == 0 { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.PendingSignings = append(x.PendingSignings, v) - } else if wireType == 2 { - var packedLen 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++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - 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 - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.PendingSignings) == 0 { - x.PendingSignings = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v 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++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.PendingSignings = append(x.PendingSignings, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PendingSignings", wireType) - } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7195,26 +6700,28 @@ func (x *fastReflection_QueryPendingSigningsResponse) ProtoMethods() *protoiface } var ( - md_QuerySigningRequest protoreflect.MessageDescriptor - fd_QuerySigningRequest_signing_id protoreflect.FieldDescriptor + md_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QuerySigningRequest = File_tss_v1beta1_query_proto.Messages().ByName("QuerySigningRequest") - fd_QuerySigningRequest_signing_id = md_QuerySigningRequest.Fields().ByName("signing_id") + file_tunnel_v1beta1_tx_proto_init() + md_MsgUpdateParams = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") } -var _ protoreflect.Message = (*fastReflection_QuerySigningRequest)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) -type fastReflection_QuerySigningRequest QuerySigningRequest +type fastReflection_MsgUpdateParams MsgUpdateParams -func (x *QuerySigningRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySigningRequest)(x) +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) } -func (x *QuerySigningRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[14] +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7225,43 +6732,43 @@ func (x *QuerySigningRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QuerySigningRequest_messageType fastReflection_QuerySigningRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySigningRequest_messageType{} +var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} -type fastReflection_QuerySigningRequest_messageType struct{} +type fastReflection_MsgUpdateParams_messageType struct{} -func (x fastReflection_QuerySigningRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySigningRequest)(nil) +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) } -func (x fastReflection_QuerySigningRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySigningRequest) +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) } -func (x fastReflection_QuerySigningRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningRequest +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QuerySigningRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningRequest +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams } // 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_QuerySigningRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySigningRequest_messageType +func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySigningRequest) New() protoreflect.Message { - return new(fastReflection_QuerySigningRequest) +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySigningRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySigningRequest)(x) +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(x) } // Range iterates over every populated field in an undefined order, @@ -7269,10 +6776,16 @@ func (x *fastReflection_QuerySigningRequest) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QuerySigningRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SigningId != uint64(0) { - value := protoreflect.ValueOfUint64(x.SigningId) - if !f(fd_QuerySigningRequest_signing_id, value) { +func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, value) { return } } @@ -7289,15 +6802,17 @@ func (x *fastReflection_QuerySigningRequest) Range(f func(protoreflect.FieldDesc // 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_QuerySigningRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QuerySigningRequest.signing_id": - return x.SigningId != uint64(0) + case "tunnel.v1beta1.MsgUpdateParams.authority": + return x.Authority != "" + case "tunnel.v1beta1.MsgUpdateParams.params": + return x.Params != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -7307,15 +6822,17 @@ func (x *fastReflection_QuerySigningRequest) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySigningRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QuerySigningRequest.signing_id": - x.SigningId = uint64(0) + case "tunnel.v1beta1.MsgUpdateParams.authority": + x.Authority = "" + case "tunnel.v1beta1.MsgUpdateParams.params": + x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -7325,16 +6842,19 @@ func (x *fastReflection_QuerySigningRequest) Clear(fd protoreflect.FieldDescript // 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_QuerySigningRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QuerySigningRequest.signing_id": - value := x.SigningId - return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", descriptor.FullName())) } } @@ -7348,15 +6868,17 @@ func (x *fastReflection_QuerySigningRequest) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySigningRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QuerySigningRequest.signing_id": - x.SigningId = value.Uint() + case "tunnel.v1beta1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "tunnel.v1beta1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -7370,40 +6892,48 @@ func (x *fastReflection_QuerySigningRequest) Set(fd protoreflect.FieldDescriptor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySigningRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QuerySigningRequest.signing_id": - panic(fmt.Errorf("field signing_id of message tss.v1beta1.QuerySigningRequest is not mutable")) + case "tunnel.v1beta1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "tunnel.v1beta1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message tunnel.v1beta1.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams 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_QuerySigningRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QuerySigningRequest.signing_id": - return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams 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_QuerySigningRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QuerySigningRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgUpdateParams", d.FullName())) } panic("unreachable") } @@ -7411,7 +6941,7 @@ func (x *fastReflection_QuerySigningRequest) WhichOneof(d protoreflect.OneofDesc // 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_QuerySigningRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -7422,7 +6952,7 @@ func (x *fastReflection_QuerySigningRequest) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySigningRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -7434,7 +6964,7 @@ func (x *fastReflection_QuerySigningRequest) SetUnknown(fields protoreflect.RawF // 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_QuerySigningRequest) IsValid() bool { +func (x *fastReflection_MsgUpdateParams) IsValid() bool { return x != nil } @@ -7444,9 +6974,9 @@ func (x *fastReflection_QuerySigningRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QuerySigningRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySigningRequest) + x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -7458,8 +6988,13 @@ func (x *fastReflection_QuerySigningRequest) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.SigningId != 0 { - n += 1 + runtime.Sov(uint64(x.SigningId)) + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -7471,7 +7006,7 @@ func (x *fastReflection_QuerySigningRequest) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySigningRequest) + x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -7490,10 +7025,26 @@ func (x *fastReflection_QuerySigningRequest) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.SigningId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SigningId)) + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + 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.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -7506,7 +7057,7 @@ func (x *fastReflection_QuerySigningRequest) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySigningRequest) + x := input.Message.Interface().(*MsgUpdateParams) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -7538,17 +7089,49 @@ func (x *fastReflection_QuerySigningRequest) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySigningRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySigningRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigningId", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = 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 Params", wireType) } - x.SigningId = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -7558,11 +7141,28 @@ func (x *fastReflection_QuerySigningRequest) ProtoMethods() *protoiface.Methods } b := dAtA[iNdEx] iNdEx++ - x.SigningId |= uint64(b&0x7F) << shift + 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7599,26 +7199,24 @@ func (x *fastReflection_QuerySigningRequest) ProtoMethods() *protoiface.Methods } var ( - md_QuerySigningResponse protoreflect.MessageDescriptor - fd_QuerySigningResponse_signing_result protoreflect.FieldDescriptor + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor ) func init() { - file_tss_v1beta1_query_proto_init() - md_QuerySigningResponse = File_tss_v1beta1_query_proto.Messages().ByName("QuerySigningResponse") - fd_QuerySigningResponse_signing_result = md_QuerySigningResponse.Fields().ByName("signing_result") + file_tunnel_v1beta1_tx_proto_init() + md_MsgUpdateParamsResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") } -var _ protoreflect.Message = (*fastReflection_QuerySigningResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) -type fastReflection_QuerySigningResponse QuerySigningResponse +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse -func (x *QuerySigningResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySigningResponse)(x) +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) } -func (x *QuerySigningResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tss_v1beta1_query_proto_msgTypes[15] +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7629,43 +7227,43 @@ func (x *QuerySigningResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QuerySigningResponse_messageType fastReflection_QuerySigningResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySigningResponse_messageType{} +var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} -type fastReflection_QuerySigningResponse_messageType struct{} +type fastReflection_MsgUpdateParamsResponse_messageType struct{} -func (x fastReflection_QuerySigningResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySigningResponse)(nil) +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) } -func (x fastReflection_QuerySigningResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySigningResponse) +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) } -func (x fastReflection_QuerySigningResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningResponse +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QuerySigningResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySigningResponse +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse } // 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_QuerySigningResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySigningResponse_messageType +func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySigningResponse) New() protoreflect.Message { - return new(fastReflection_QuerySigningResponse) +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySigningResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySigningResponse)(x) +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -7673,13 +7271,7 @@ func (x *fastReflection_QuerySigningResponse) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QuerySigningResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SigningResult != nil { - value := protoreflect.ValueOfMessage(x.SigningResult.ProtoReflect()) - if !f(fd_QuerySigningResponse_signing_result, value) { - return - } - } +func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -7693,15 +7285,13 @@ func (x *fastReflection_QuerySigningResponse) Range(f func(protoreflect.FieldDes // 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_QuerySigningResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tss.v1beta1.QuerySigningResponse.signing_result": - return x.SigningResult != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -7711,15 +7301,13 @@ func (x *fastReflection_QuerySigningResponse) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySigningResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tss.v1beta1.QuerySigningResponse.signing_result": - x.SigningResult = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -7729,16 +7317,13 @@ func (x *fastReflection_QuerySigningResponse) Clear(fd protoreflect.FieldDescrip // 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_QuerySigningResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tss.v1beta1.QuerySigningResponse.signing_result": - value := x.SigningResult - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) } } @@ -7752,15 +7337,13 @@ func (x *fastReflection_QuerySigningResponse) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySigningResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tss.v1beta1.QuerySigningResponse.signing_result": - x.SigningResult = value.Message().Interface().(*SigningResult) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -7774,44 +7357,36 @@ func (x *fastReflection_QuerySigningResponse) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySigningResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QuerySigningResponse.signing_result": - if x.SigningResult == nil { - x.SigningResult = new(SigningResult) - } - return protoreflect.ValueOfMessage(x.SigningResult.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse 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_QuerySigningResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tss.v1beta1.QuerySigningResponse.signing_result": - m := new(SigningResult) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tss.v1beta1.QuerySigningResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tss.v1beta1.QuerySigningResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse 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_QuerySigningResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tss.v1beta1.QuerySigningResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgUpdateParamsResponse", d.FullName())) } panic("unreachable") } @@ -7819,7 +7394,7 @@ func (x *fastReflection_QuerySigningResponse) WhichOneof(d protoreflect.OneofDes // 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_QuerySigningResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -7830,7 +7405,7 @@ func (x *fastReflection_QuerySigningResponse) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySigningResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -7842,7 +7417,7 @@ func (x *fastReflection_QuerySigningResponse) SetUnknown(fields protoreflect.Raw // 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_QuerySigningResponse) IsValid() bool { +func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { return x != nil } @@ -7852,9 +7427,9 @@ func (x *fastReflection_QuerySigningResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QuerySigningResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySigningResponse) + x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -7866,10 +7441,6 @@ func (x *fastReflection_QuerySigningResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.SigningResult != nil { - l = options.Size(x.SigningResult) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7880,7 +7451,7 @@ func (x *fastReflection_QuerySigningResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySigningResponse) + x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -7899,20 +7470,6 @@ func (x *fastReflection_QuerySigningResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.SigningResult != nil { - encoded, err := options.Marshal(x.SigningResult) - 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 { @@ -7924,7 +7481,7 @@ func (x *fastReflection_QuerySigningResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySigningResponse) + x := input.Message.Interface().(*MsgUpdateParamsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -7956,48 +7513,12 @@ func (x *fastReflection_QuerySigningResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySigningResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySigningResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: 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 SigningResult", 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.SigningResult == nil { - x.SigningResult = &SigningResult{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SigningResult); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -8037,7 +7558,7 @@ func (x *fastReflection_QuerySigningResponse) ProtoMethods() *protoiface.Methods // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: tss/v1beta1/query.proto +// source: tunnel/v1beta1/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -8046,957 +7567,964 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// QueryCountsRequest is request type for the Query/Count RPC method. -type QueryCountsRequest struct { +// MsgCreateTunnel is the transaction message to create a new tunnel. +type MsgCreateTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields -} -func (x *QueryCountsRequest) Reset() { - *x = QueryCountsRequest{} + // signal_deviations is the list of signal deviations. + SignalDeviations []*SignalDeviation `protobuf:"bytes,1,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations,omitempty"` + // interval is the interval for delivering the signal prices. + Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` + // route is the route for delivering the signal prices + Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + // encoder is the mode of encoding price signal data. + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + // initial_deposit is the deposit value that must be paid at tunnel creation. + InitialDeposit []*v1beta1.Coin `protobuf:"bytes,5,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *MsgCreateTunnel) Reset() { + *x = MsgCreateTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[0] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryCountsRequest) String() string { +func (x *MsgCreateTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryCountsRequest) ProtoMessage() {} +func (*MsgCreateTunnel) ProtoMessage() {} -// Deprecated: Use QueryCountsRequest.ProtoReflect.Descriptor instead. -func (*QueryCountsRequest) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{0} +// Deprecated: Use MsgCreateTunnel.ProtoReflect.Descriptor instead. +func (*MsgCreateTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{0} } -// QueryCountsResponse is response type for the Query/Count RPC method. -type QueryCountsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // group_count is total number of group available on the chain - GroupCount uint64 `protobuf:"varint,1,opt,name=group_count,json=groupCount,proto3" json:"group_count,omitempty"` - // signing_count is total number of signing request submitted to the chain - SigningCount uint64 `protobuf:"varint,2,opt,name=signing_count,json=signingCount,proto3" json:"signing_count,omitempty"` +func (x *MsgCreateTunnel) GetSignalDeviations() []*SignalDeviation { + if x != nil { + return x.SignalDeviations + } + return nil } -func (x *QueryCountsResponse) Reset() { - *x = QueryCountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *MsgCreateTunnel) GetInterval() uint64 { + if x != nil { + return x.Interval } + return 0 } -func (x *QueryCountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *MsgCreateTunnel) GetRoute() *anypb.Any { + if x != nil { + return x.Route + } + return nil } -func (*QueryCountsResponse) ProtoMessage() {} - -// Deprecated: Use QueryCountsResponse.ProtoReflect.Descriptor instead. -func (*QueryCountsResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{1} +func (x *MsgCreateTunnel) GetEncoder() Encoder { + if x != nil { + return x.Encoder + } + return Encoder_ENCODER_UNSPECIFIED } -func (x *QueryCountsResponse) GetGroupCount() uint64 { +func (x *MsgCreateTunnel) GetInitialDeposit() []*v1beta1.Coin { if x != nil { - return x.GroupCount + return x.InitialDeposit } - return 0 + return nil } -func (x *QueryCountsResponse) GetSigningCount() uint64 { +func (x *MsgCreateTunnel) GetCreator() string { if x != nil { - return x.SigningCount + return x.Creator } - return 0 + return "" } -// QueryGroupRequest is the request type for the Query/Group RPC method -type QueryGroupRequest struct { +// MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. +type MsgCreateTunnelResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // group_id defines the unique id of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` } -func (x *QueryGroupRequest) Reset() { - *x = QueryGroupRequest{} +func (x *MsgCreateTunnelResponse) Reset() { + *x = MsgCreateTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[2] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryGroupRequest) String() string { +func (x *MsgCreateTunnelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryGroupRequest) ProtoMessage() {} +func (*MsgCreateTunnelResponse) ProtoMessage() {} -// Deprecated: Use QueryGroupRequest.ProtoReflect.Descriptor instead. -func (*QueryGroupRequest) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{2} +// Deprecated: Use MsgCreateTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{1} } -func (x *QueryGroupRequest) GetGroupId() uint64 { +func (x *MsgCreateTunnelResponse) GetTunnelId() uint64 { if x != nil { - return x.GroupId + return x.TunnelId } return 0 } -// QueryGroupResponse is the response type for the Query/Group RPC method -type QueryGroupResponse struct { +// MsgEditTunnel is the transaction message to edit a tunnel. +type MsgEditTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // group defines the group object containing group information. - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` - // dkg_context defines the DKG context data. - DkgContext []byte `protobuf:"bytes,2,opt,name=dkg_context,json=dkgContext,proto3" json:"dkg_context,omitempty"` - // members is the list of members in the group. - Members []*Member `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` - // round1_infos is the list of Round 1 information. - Round1Infos []*Round1Info `protobuf:"bytes,4,rep,name=round1_infos,json=round1Infos,proto3" json:"round1_infos,omitempty"` - // round2_infos is the list of Round 2 information. - Round2Infos []*Round2Info `protobuf:"bytes,5,rep,name=round2_infos,json=round2Infos,proto3" json:"round2_infos,omitempty"` - // complaints_with_status is the list of complaints with status. - ComplaintsWithStatus []*ComplaintsWithStatus `protobuf:"bytes,6,rep,name=complaints_with_status,json=complaintsWithStatus,proto3" json:"complaints_with_status,omitempty"` - // confirms is the list of confirms. - Confirms []*Confirm `protobuf:"bytes,7,rep,name=confirms,proto3" json:"confirms,omitempty"` -} - -func (x *QueryGroupResponse) Reset() { - *x = QueryGroupResponse{} + // tunnel_id is the ID of the tunnel to edit. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // signal_deviations is the list of signal deviations. + SignalDeviations []*SignalDeviation `protobuf:"bytes,2,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations,omitempty"` + // interval is the interval for delivering the signal prices. + Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *MsgEditTunnel) Reset() { + *x = MsgEditTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[3] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryGroupResponse) String() string { +func (x *MsgEditTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryGroupResponse) ProtoMessage() {} +func (*MsgEditTunnel) ProtoMessage() {} -// Deprecated: Use QueryGroupResponse.ProtoReflect.Descriptor instead. -func (*QueryGroupResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{3} +// Deprecated: Use MsgEditTunnel.ProtoReflect.Descriptor instead. +func (*MsgEditTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{2} } -func (x *QueryGroupResponse) GetGroup() *Group { +func (x *MsgEditTunnel) GetTunnelId() uint64 { if x != nil { - return x.Group + return x.TunnelId } - return nil + return 0 } -func (x *QueryGroupResponse) GetDkgContext() []byte { +func (x *MsgEditTunnel) GetSignalDeviations() []*SignalDeviation { if x != nil { - return x.DkgContext + return x.SignalDeviations } return nil } -func (x *QueryGroupResponse) GetMembers() []*Member { +func (x *MsgEditTunnel) GetInterval() uint64 { if x != nil { - return x.Members + return x.Interval } - return nil + return 0 } -func (x *QueryGroupResponse) GetRound1Infos() []*Round1Info { +func (x *MsgEditTunnel) GetCreator() string { if x != nil { - return x.Round1Infos + return x.Creator } - return nil + return "" } -func (x *QueryGroupResponse) GetRound2Infos() []*Round2Info { - if x != nil { - return x.Round2Infos - } - return nil +// MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. +type MsgEditTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (x *QueryGroupResponse) GetComplaintsWithStatus() []*ComplaintsWithStatus { - if x != nil { - return x.ComplaintsWithStatus +func (x *MsgEditTunnelResponse) Reset() { + *x = MsgEditTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *QueryGroupResponse) GetConfirms() []*Confirm { - if x != nil { - return x.Confirms - } - return nil +func (x *MsgEditTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -// QueryMembersRequest is the request type for the Query/Members RPC method -type QueryMembersRequest struct { +func (*MsgEditTunnelResponse) ProtoMessage() {} + +// Deprecated: Use MsgEditTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgEditTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{3} +} + +// Activate is the transaction message to activate a tunnel. +type MsgActivate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // group_id defines the unique id of the group. - GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // tunnel_id is the ID of the tunnel to activate. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } -func (x *QueryMembersRequest) Reset() { - *x = QueryMembersRequest{} +func (x *MsgActivate) Reset() { + *x = MsgActivate{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[4] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryMembersRequest) String() string { +func (x *MsgActivate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryMembersRequest) ProtoMessage() {} +func (*MsgActivate) ProtoMessage() {} -// Deprecated: Use QueryMembersRequest.ProtoReflect.Descriptor instead. -func (*QueryMembersRequest) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{4} +// Deprecated: Use MsgActivate.ProtoReflect.Descriptor instead. +func (*MsgActivate) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{4} } -func (x *QueryMembersRequest) GetGroupId() uint64 { +func (x *MsgActivate) GetTunnelId() uint64 { if x != nil { - return x.GroupId + return x.TunnelId } return 0 } -// QueryMembersResponse is the response type for the Query/Members RPC method -type QueryMembersResponse struct { +func (x *MsgActivate) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +// MsgActivateResponse is the response type for the Msg/Activate RPC method. +type MsgActivateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // members are member list of the group - Members []*Member `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` } -func (x *QueryMembersResponse) Reset() { - *x = QueryMembersResponse{} +func (x *MsgActivateResponse) Reset() { + *x = MsgActivateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[5] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryMembersResponse) String() string { +func (x *MsgActivateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryMembersResponse) ProtoMessage() {} - -// Deprecated: Use QueryMembersResponse.ProtoReflect.Descriptor instead. -func (*QueryMembersResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{5} -} +func (*MsgActivateResponse) ProtoMessage() {} -func (x *QueryMembersResponse) GetMembers() []*Member { - if x != nil { - return x.Members - } - return nil +// Deprecated: Use MsgActivateResponse.ProtoReflect.Descriptor instead. +func (*MsgActivateResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{5} } -// QueryIsSignerRequest is request type for the Query/IsGrantee RPC method. -type QueryIsGranteeRequest struct { +// MsgDeactivate is the transaction message to deactivate a tunnel. +type MsgDeactivate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // granter is a granter address - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // grantee is a grantee address - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` + // tunnel_id is the ID of the tunnel to deactivate. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } -func (x *QueryIsGranteeRequest) Reset() { - *x = QueryIsGranteeRequest{} +func (x *MsgDeactivate) Reset() { + *x = MsgDeactivate{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[6] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryIsGranteeRequest) String() string { +func (x *MsgDeactivate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryIsGranteeRequest) ProtoMessage() {} +func (*MsgDeactivate) ProtoMessage() {} -// Deprecated: Use QueryIsGranteeRequest.ProtoReflect.Descriptor instead. -func (*QueryIsGranteeRequest) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{6} +// Deprecated: Use MsgDeactivate.ProtoReflect.Descriptor instead. +func (*MsgDeactivate) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{6} } -func (x *QueryIsGranteeRequest) GetGranter() string { +func (x *MsgDeactivate) GetTunnelId() uint64 { if x != nil { - return x.Granter + return x.TunnelId } - return "" + return 0 } -func (x *QueryIsGranteeRequest) GetGrantee() string { +func (x *MsgDeactivate) GetCreator() string { if x != nil { - return x.Grantee + return x.Creator } return "" } -// QueryIsGranteeResponse is response type for the Query/IsGrantee RPC method. -type QueryIsGranteeResponse struct { +// MsgDeactivateTunnelResponse is the response type for the Msg/Deactivate RPC method. +type MsgDeactivateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // is_grantee is true if this account has been granted by granter - IsGrantee bool `protobuf:"varint,1,opt,name=is_grantee,json=isGrantee,proto3" json:"is_grantee,omitempty"` } -func (x *QueryIsGranteeResponse) Reset() { - *x = QueryIsGranteeResponse{} +func (x *MsgDeactivateResponse) Reset() { + *x = MsgDeactivateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[7] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryIsGranteeResponse) String() string { +func (x *MsgDeactivateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryIsGranteeResponse) ProtoMessage() {} - -// Deprecated: Use QueryIsGranteeResponse.ProtoReflect.Descriptor instead. -func (*QueryIsGranteeResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{7} -} +func (*MsgDeactivateResponse) ProtoMessage() {} -func (x *QueryIsGranteeResponse) GetIsGrantee() bool { - if x != nil { - return x.IsGrantee - } - return false +// Deprecated: Use MsgDeactivateResponse.ProtoReflect.Descriptor instead. +func (*MsgDeactivateResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{7} } -// QueryDERequest is the request type for the Query/DE RPC method. -type QueryDERequest struct { +// MsgTriggerTunnel is the transaction message to manually trigger a tunnel. +type MsgTriggerTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // address is the address for the request. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // pagination defines pagination settings for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // tunnel_id is the ID of the tunnel to manually trigger. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } -func (x *QueryDERequest) Reset() { - *x = QueryDERequest{} +func (x *MsgTriggerTunnel) Reset() { + *x = MsgTriggerTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[8] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryDERequest) String() string { +func (x *MsgTriggerTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryDERequest) ProtoMessage() {} +func (*MsgTriggerTunnel) ProtoMessage() {} -// Deprecated: Use QueryDERequest.ProtoReflect.Descriptor instead. -func (*QueryDERequest) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{8} +// Deprecated: Use MsgTriggerTunnel.ProtoReflect.Descriptor instead. +func (*MsgTriggerTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{8} } -func (x *QueryDERequest) GetAddress() string { +func (x *MsgTriggerTunnel) GetTunnelId() uint64 { if x != nil { - return x.Address + return x.TunnelId } - return "" + return 0 } -func (x *QueryDERequest) GetPagination() *v1beta1.PageRequest { +func (x *MsgTriggerTunnel) GetCreator() string { if x != nil { - return x.Pagination + return x.Creator } - return nil + return "" } -// QueryDEResponse is the response type for the Query/DE RPC method. -type QueryDEResponse struct { +// MsgTriggerTunnelResponse is the response type for the Msg/TriggerTunnel RPC method. +type MsgTriggerTunnelResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // des is a list of DEs. - Des []*DE `protobuf:"bytes,1,rep,name=des,proto3" json:"des,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryDEResponse) Reset() { - *x = QueryDEResponse{} +func (x *MsgTriggerTunnelResponse) Reset() { + *x = MsgTriggerTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[9] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryDEResponse) String() string { +func (x *MsgTriggerTunnelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryDEResponse) ProtoMessage() {} - -// Deprecated: Use QueryDEResponse.ProtoReflect.Descriptor instead. -func (*QueryDEResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryDEResponse) GetDes() []*DE { - if x != nil { - return x.Des - } - return nil -} +func (*MsgTriggerTunnelResponse) ProtoMessage() {} -func (x *QueryDEResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil +// Deprecated: Use MsgTriggerTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgTriggerTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{9} } -// QueryPendingGroupsRequest is the request type for the Query/PendingGroups RPC method. -type QueryPendingGroupsRequest struct { +// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. +type MsgDepositTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // address is the address of the member. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // amount to be deposited by depositor. + Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` + // depositor defines the deposit addresses from the tunnel. + Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"` } -func (x *QueryPendingGroupsRequest) Reset() { - *x = QueryPendingGroupsRequest{} +func (x *MsgDepositTunnel) Reset() { + *x = MsgDepositTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[10] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryPendingGroupsRequest) String() string { +func (x *MsgDepositTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryPendingGroupsRequest) ProtoMessage() {} +func (*MsgDepositTunnel) ProtoMessage() {} -// Deprecated: Use QueryPendingGroupsRequest.ProtoReflect.Descriptor instead. -func (*QueryPendingGroupsRequest) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{10} +// Deprecated: Use MsgDepositTunnel.ProtoReflect.Descriptor instead. +func (*MsgDepositTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{10} } -func (x *QueryPendingGroupsRequest) GetAddress() string { +func (x *MsgDepositTunnel) GetTunnelId() uint64 { if x != nil { - return x.Address + return x.TunnelId + } + return 0 +} + +func (x *MsgDepositTunnel) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *MsgDepositTunnel) GetDepositor() string { + if x != nil { + return x.Depositor } return "" } -// QueryPendingGroupsResponse is the response type for the Query/PendingGroups RPC method. -type QueryPendingGroupsResponse struct { +// MsgDepositTunnelResponse defines the Msg/Deposit response type. +type MsgDepositTunnelResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // pending_groups is a list of pending groups. - PendingGroups []uint64 `protobuf:"varint,1,rep,packed,name=pending_groups,json=pendingGroups,proto3" json:"pending_groups,omitempty"` } -func (x *QueryPendingGroupsResponse) Reset() { - *x = QueryPendingGroupsResponse{} +func (x *MsgDepositTunnelResponse) Reset() { + *x = MsgDepositTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[11] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryPendingGroupsResponse) String() string { +func (x *MsgDepositTunnelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryPendingGroupsResponse) ProtoMessage() {} - -// Deprecated: Use QueryPendingGroupsResponse.ProtoReflect.Descriptor instead. -func (*QueryPendingGroupsResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{11} -} +func (*MsgDepositTunnelResponse) ProtoMessage() {} -func (x *QueryPendingGroupsResponse) GetPendingGroups() []uint64 { - if x != nil { - return x.PendingGroups - } - return nil +// Deprecated: Use MsgDepositTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgDepositTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{11} } -// QueryPendingSigningsRequest is the request type for the Query/PendingSignings RPC method. -type QueryPendingSigningsRequest struct { +// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. +type MsgWithdrawTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // address is the address of the member. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // amount to be withdrawn by withdrawer. + Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` + // withdrawer defines the withdraw addresses from the tunnel. + Withdrawer string `protobuf:"bytes,3,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` } -func (x *QueryPendingSigningsRequest) Reset() { - *x = QueryPendingSigningsRequest{} +func (x *MsgWithdrawTunnel) Reset() { + *x = MsgWithdrawTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[12] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryPendingSigningsRequest) String() string { +func (x *MsgWithdrawTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryPendingSigningsRequest) ProtoMessage() {} +func (*MsgWithdrawTunnel) ProtoMessage() {} -// Deprecated: Use QueryPendingSigningsRequest.ProtoReflect.Descriptor instead. -func (*QueryPendingSigningsRequest) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{12} +// Deprecated: Use MsgWithdrawTunnel.ProtoReflect.Descriptor instead. +func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{12} } -func (x *QueryPendingSigningsRequest) GetAddress() string { +func (x *MsgWithdrawTunnel) GetTunnelId() uint64 { if x != nil { - return x.Address + return x.TunnelId + } + return 0 +} + +func (x *MsgWithdrawTunnel) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *MsgWithdrawTunnel) GetWithdrawer() string { + if x != nil { + return x.Withdrawer } return "" } -// QueryPendingSigningsResponse is the response type for the Query/PendingSignings RPC method. -type QueryPendingSigningsResponse struct { +// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. +type MsgWithdrawTunnelResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // pending_signings is a list of pending signings. - PendingSignings []uint64 `protobuf:"varint,1,rep,packed,name=pending_signings,json=pendingSignings,proto3" json:"pending_signings,omitempty"` } -func (x *QueryPendingSigningsResponse) Reset() { - *x = QueryPendingSigningsResponse{} +func (x *MsgWithdrawTunnelResponse) Reset() { + *x = MsgWithdrawTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[13] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryPendingSigningsResponse) String() string { +func (x *MsgWithdrawTunnelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryPendingSigningsResponse) ProtoMessage() {} - -// Deprecated: Use QueryPendingSigningsResponse.ProtoReflect.Descriptor instead. -func (*QueryPendingSigningsResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{13} -} +func (*MsgWithdrawTunnelResponse) ProtoMessage() {} -func (x *QueryPendingSigningsResponse) GetPendingSignings() []uint64 { - if x != nil { - return x.PendingSignings - } - return nil +// Deprecated: Use MsgWithdrawTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{13} } -// QuerySigningRequest is the request type for the Query/Signing RPC method. -type QuerySigningRequest struct { +// MsgUpdateParams is the transaction message to update parameters. +type MsgUpdateParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // signing_id is the ID of the signing request. - SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params is the x/tunnel parameters to update. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` } -func (x *QuerySigningRequest) Reset() { - *x = QuerySigningRequest{} +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[14] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QuerySigningRequest) String() string { +func (x *MsgUpdateParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QuerySigningRequest) ProtoMessage() {} +func (*MsgUpdateParams) ProtoMessage() {} -// Deprecated: Use QuerySigningRequest.ProtoReflect.Descriptor instead. -func (*QuerySigningRequest) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{14} +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{14} } -func (x *QuerySigningRequest) GetSigningId() uint64 { +func (x *MsgUpdateParams) GetAuthority() string { if x != nil { - return x.SigningId + return x.Authority } - return 0 + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil } -// QuerySigningResponse is the response type for the Query/Signing RPC method. -type QuerySigningResponse struct { +// MsgUpdateParamsResponse is the response type for the Msg/UpdateParams RPC method. +type MsgUpdateParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // signing_result is the result of the signing. - SigningResult *SigningResult `protobuf:"bytes,1,opt,name=signing_result,json=signingResult,proto3" json:"signing_result,omitempty"` } -func (x *QuerySigningResponse) Reset() { - *x = QuerySigningResponse{} +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tss_v1beta1_query_proto_msgTypes[15] + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QuerySigningResponse) String() string { +func (x *MsgUpdateParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QuerySigningResponse) ProtoMessage() {} - -// Deprecated: Use QuerySigningResponse.ProtoReflect.Descriptor instead. -func (*QuerySigningResponse) Descriptor() ([]byte, []int) { - return file_tss_v1beta1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QuerySigningResponse) GetSigningResult() *SigningResult { - if x != nil { - return x.SigningResult - } - return nil -} - -var File_tss_v1beta1_query_proto protoreflect.FileDescriptor - -var file_tss_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, - 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x2e, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, - 0x22, 0xf9, 0x03, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x63, 0x0a, 0x0b, 0x64, 0x6b, 0x67, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x42, 0xe2, 0xde, - 0x1f, 0x0a, 0x44, 0x4b, 0x47, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0xfa, 0xde, 0x1f, 0x30, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, - 0x62, 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x6c, 0x69, 0x62, - 0x73, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x52, 0x0a, 0x64, 0x6b, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x33, 0x0a, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x31, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x31, 0x49, 0x6e, 0x66, 0x6f, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x31, 0x49, 0x6e, - 0x66, 0x6f, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x32, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x32, 0x49, 0x6e, - 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x32, - 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x5d, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, - 0x6e, 0x74, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x57, 0x69, - 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x14, - 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x73, 0x22, 0x30, 0x0a, 0x13, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x4b, - 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x4b, 0x0a, 0x15, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x18, - 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x37, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, - 0x65, 0x22, 0x72, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x45, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x45, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x03, 0x64, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x45, 0x42, 0x0b, 0xc8, 0xde, 0x1f, 0x00, 0xe2, 0xde, 0x1f, - 0x03, 0x44, 0x45, 0x73, 0x52, 0x03, 0x64, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x43, 0x0a, 0x1a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, - 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x37, - 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x10, 0x70, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x04, 0x42, 0x36, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x0f, 0x70, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x34, 0x0a, 0x13, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x64, 0x22, 0x5f, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x73, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x32, 0x80, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x68, 0x0a, 0x06, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x15, 0x12, 0x13, 0x2f, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x70, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x1e, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x74, 0x73, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7e, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, - 0x12, 0x26, 0x2f, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x09, 0x49, 0x73, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x22, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x7d, 0x12, 0x67, 0x0a, 0x02, 0x44, 0x45, 0x12, 0x1b, 0x2e, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x45, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x45, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, - 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x5f, 0x6c, - 0x69, 0x73, 0x74, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x8f, 0x01, - 0x0a, 0x0d, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, - 0x26, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x74, 0x73, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, - 0x97, 0x01, 0x0a, 0x0f, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x73, 0x12, 0x28, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, - 0x12, 0x27, 0x2f, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x7a, 0x0a, 0x07, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x24, 0x12, 0x22, 0x2f, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0xa7, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x73, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x54, 0x73, 0x73, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0b, 0x54, 0x73, 0x73, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x17, 0x54, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0c, 0x54, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{15} +} + +var File_tunnel_v1beta1_tx_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_tx_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 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, 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, 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, 0x11, 0x61, 0x6d, 0x69, + 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x03, 0x0a, 0x0f, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, + 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, + 0x35, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, 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, 0x09, 0xca, 0xb4, 0x2d, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x0f, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x03, + 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, 0x35, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x27, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x22, 0x44, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x09, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x85, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x45, + 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, + 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, + 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, 0x13, + 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4d, + 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, + 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, + 0x02, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1a, + 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x4d, + 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, + 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, + 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, + 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, + 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, + 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x58, 0x0a, 0x0c, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1f, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x27, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x1a, 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x44, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, + 0x28, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x28, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x29, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb9, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, + 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_tss_v1beta1_query_proto_rawDescOnce sync.Once - file_tss_v1beta1_query_proto_rawDescData = file_tss_v1beta1_query_proto_rawDesc + file_tunnel_v1beta1_tx_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_tx_proto_rawDescData = file_tunnel_v1beta1_tx_proto_rawDesc ) -func file_tss_v1beta1_query_proto_rawDescGZIP() []byte { - file_tss_v1beta1_query_proto_rawDescOnce.Do(func() { - file_tss_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_tss_v1beta1_query_proto_rawDescData) +func file_tunnel_v1beta1_tx_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_tx_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_tx_proto_rawDescData) }) - return file_tss_v1beta1_query_proto_rawDescData -} - -var file_tss_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_tss_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryCountsRequest)(nil), // 0: tss.v1beta1.QueryCountsRequest - (*QueryCountsResponse)(nil), // 1: tss.v1beta1.QueryCountsResponse - (*QueryGroupRequest)(nil), // 2: tss.v1beta1.QueryGroupRequest - (*QueryGroupResponse)(nil), // 3: tss.v1beta1.QueryGroupResponse - (*QueryMembersRequest)(nil), // 4: tss.v1beta1.QueryMembersRequest - (*QueryMembersResponse)(nil), // 5: tss.v1beta1.QueryMembersResponse - (*QueryIsGranteeRequest)(nil), // 6: tss.v1beta1.QueryIsGranteeRequest - (*QueryIsGranteeResponse)(nil), // 7: tss.v1beta1.QueryIsGranteeResponse - (*QueryDERequest)(nil), // 8: tss.v1beta1.QueryDERequest - (*QueryDEResponse)(nil), // 9: tss.v1beta1.QueryDEResponse - (*QueryPendingGroupsRequest)(nil), // 10: tss.v1beta1.QueryPendingGroupsRequest - (*QueryPendingGroupsResponse)(nil), // 11: tss.v1beta1.QueryPendingGroupsResponse - (*QueryPendingSigningsRequest)(nil), // 12: tss.v1beta1.QueryPendingSigningsRequest - (*QueryPendingSigningsResponse)(nil), // 13: tss.v1beta1.QueryPendingSigningsResponse - (*QuerySigningRequest)(nil), // 14: tss.v1beta1.QuerySigningRequest - (*QuerySigningResponse)(nil), // 15: tss.v1beta1.QuerySigningResponse - (*Group)(nil), // 16: tss.v1beta1.Group - (*Member)(nil), // 17: tss.v1beta1.Member - (*Round1Info)(nil), // 18: tss.v1beta1.Round1Info - (*Round2Info)(nil), // 19: tss.v1beta1.Round2Info - (*ComplaintsWithStatus)(nil), // 20: tss.v1beta1.ComplaintsWithStatus - (*Confirm)(nil), // 21: tss.v1beta1.Confirm - (*v1beta1.PageRequest)(nil), // 22: cosmos.base.query.v1beta1.PageRequest - (*DE)(nil), // 23: tss.v1beta1.DE - (*v1beta1.PageResponse)(nil), // 24: cosmos.base.query.v1beta1.PageResponse - (*SigningResult)(nil), // 25: tss.v1beta1.SigningResult -} -var file_tss_v1beta1_query_proto_depIdxs = []int32{ - 16, // 0: tss.v1beta1.QueryGroupResponse.group:type_name -> tss.v1beta1.Group - 17, // 1: tss.v1beta1.QueryGroupResponse.members:type_name -> tss.v1beta1.Member - 18, // 2: tss.v1beta1.QueryGroupResponse.round1_infos:type_name -> tss.v1beta1.Round1Info - 19, // 3: tss.v1beta1.QueryGroupResponse.round2_infos:type_name -> tss.v1beta1.Round2Info - 20, // 4: tss.v1beta1.QueryGroupResponse.complaints_with_status:type_name -> tss.v1beta1.ComplaintsWithStatus - 21, // 5: tss.v1beta1.QueryGroupResponse.confirms:type_name -> tss.v1beta1.Confirm - 17, // 6: tss.v1beta1.QueryMembersResponse.members:type_name -> tss.v1beta1.Member - 22, // 7: tss.v1beta1.QueryDERequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 8: tss.v1beta1.QueryDEResponse.des:type_name -> tss.v1beta1.DE - 24, // 9: tss.v1beta1.QueryDEResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 25, // 10: tss.v1beta1.QuerySigningResponse.signing_result:type_name -> tss.v1beta1.SigningResult - 0, // 11: tss.v1beta1.Query.Counts:input_type -> tss.v1beta1.QueryCountsRequest - 2, // 12: tss.v1beta1.Query.Group:input_type -> tss.v1beta1.QueryGroupRequest - 4, // 13: tss.v1beta1.Query.Members:input_type -> tss.v1beta1.QueryMembersRequest - 6, // 14: tss.v1beta1.Query.IsGrantee:input_type -> tss.v1beta1.QueryIsGranteeRequest - 8, // 15: tss.v1beta1.Query.DE:input_type -> tss.v1beta1.QueryDERequest - 10, // 16: tss.v1beta1.Query.PendingGroups:input_type -> tss.v1beta1.QueryPendingGroupsRequest - 12, // 17: tss.v1beta1.Query.PendingSignings:input_type -> tss.v1beta1.QueryPendingSigningsRequest - 14, // 18: tss.v1beta1.Query.Signing:input_type -> tss.v1beta1.QuerySigningRequest - 1, // 19: tss.v1beta1.Query.Counts:output_type -> tss.v1beta1.QueryCountsResponse - 3, // 20: tss.v1beta1.Query.Group:output_type -> tss.v1beta1.QueryGroupResponse - 5, // 21: tss.v1beta1.Query.Members:output_type -> tss.v1beta1.QueryMembersResponse - 7, // 22: tss.v1beta1.Query.IsGrantee:output_type -> tss.v1beta1.QueryIsGranteeResponse - 9, // 23: tss.v1beta1.Query.DE:output_type -> tss.v1beta1.QueryDEResponse - 11, // 24: tss.v1beta1.Query.PendingGroups:output_type -> tss.v1beta1.QueryPendingGroupsResponse - 13, // 25: tss.v1beta1.Query.PendingSignings:output_type -> tss.v1beta1.QueryPendingSigningsResponse - 15, // 26: tss.v1beta1.Query.Signing:output_type -> tss.v1beta1.QuerySigningResponse - 19, // [19:27] is the sub-list for method output_type - 11, // [11:19] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_tss_v1beta1_query_proto_init() } -func file_tss_v1beta1_query_proto_init() { - if File_tss_v1beta1_query_proto != nil { + return file_tunnel_v1beta1_tx_proto_rawDescData +} + +var file_tunnel_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_tunnel_v1beta1_tx_proto_goTypes = []interface{}{ + (*MsgCreateTunnel)(nil), // 0: tunnel.v1beta1.MsgCreateTunnel + (*MsgCreateTunnelResponse)(nil), // 1: tunnel.v1beta1.MsgCreateTunnelResponse + (*MsgEditTunnel)(nil), // 2: tunnel.v1beta1.MsgEditTunnel + (*MsgEditTunnelResponse)(nil), // 3: tunnel.v1beta1.MsgEditTunnelResponse + (*MsgActivate)(nil), // 4: tunnel.v1beta1.MsgActivate + (*MsgActivateResponse)(nil), // 5: tunnel.v1beta1.MsgActivateResponse + (*MsgDeactivate)(nil), // 6: tunnel.v1beta1.MsgDeactivate + (*MsgDeactivateResponse)(nil), // 7: tunnel.v1beta1.MsgDeactivateResponse + (*MsgTriggerTunnel)(nil), // 8: tunnel.v1beta1.MsgTriggerTunnel + (*MsgTriggerTunnelResponse)(nil), // 9: tunnel.v1beta1.MsgTriggerTunnelResponse + (*MsgDepositTunnel)(nil), // 10: tunnel.v1beta1.MsgDepositTunnel + (*MsgDepositTunnelResponse)(nil), // 11: tunnel.v1beta1.MsgDepositTunnelResponse + (*MsgWithdrawTunnel)(nil), // 12: tunnel.v1beta1.MsgWithdrawTunnel + (*MsgWithdrawTunnelResponse)(nil), // 13: tunnel.v1beta1.MsgWithdrawTunnelResponse + (*MsgUpdateParams)(nil), // 14: tunnel.v1beta1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 15: tunnel.v1beta1.MsgUpdateParamsResponse + (*SignalDeviation)(nil), // 16: tunnel.v1beta1.SignalDeviation + (*anypb.Any)(nil), // 17: google.protobuf.Any + (Encoder)(0), // 18: tunnel.v1beta1.Encoder + (*v1beta1.Coin)(nil), // 19: cosmos.base.v1beta1.Coin + (*Params)(nil), // 20: tunnel.v1beta1.Params +} +var file_tunnel_v1beta1_tx_proto_depIdxs = []int32{ + 16, // 0: tunnel.v1beta1.MsgCreateTunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation + 17, // 1: tunnel.v1beta1.MsgCreateTunnel.route:type_name -> google.protobuf.Any + 18, // 2: tunnel.v1beta1.MsgCreateTunnel.encoder:type_name -> tunnel.v1beta1.Encoder + 19, // 3: tunnel.v1beta1.MsgCreateTunnel.initial_deposit:type_name -> cosmos.base.v1beta1.Coin + 16, // 4: tunnel.v1beta1.MsgEditTunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation + 19, // 5: tunnel.v1beta1.MsgDepositTunnel.amount:type_name -> cosmos.base.v1beta1.Coin + 19, // 6: tunnel.v1beta1.MsgWithdrawTunnel.amount:type_name -> cosmos.base.v1beta1.Coin + 20, // 7: tunnel.v1beta1.MsgUpdateParams.params:type_name -> tunnel.v1beta1.Params + 0, // 8: tunnel.v1beta1.Msg.CreateTunnel:input_type -> tunnel.v1beta1.MsgCreateTunnel + 2, // 9: tunnel.v1beta1.Msg.EditTunnel:input_type -> tunnel.v1beta1.MsgEditTunnel + 4, // 10: tunnel.v1beta1.Msg.Activate:input_type -> tunnel.v1beta1.MsgActivate + 6, // 11: tunnel.v1beta1.Msg.Deactivate:input_type -> tunnel.v1beta1.MsgDeactivate + 8, // 12: tunnel.v1beta1.Msg.TriggerTunnel:input_type -> tunnel.v1beta1.MsgTriggerTunnel + 10, // 13: tunnel.v1beta1.Msg.DepositTunnel:input_type -> tunnel.v1beta1.MsgDepositTunnel + 12, // 14: tunnel.v1beta1.Msg.WithdrawTunnel:input_type -> tunnel.v1beta1.MsgWithdrawTunnel + 14, // 15: tunnel.v1beta1.Msg.UpdateParams:input_type -> tunnel.v1beta1.MsgUpdateParams + 1, // 16: tunnel.v1beta1.Msg.CreateTunnel:output_type -> tunnel.v1beta1.MsgCreateTunnelResponse + 3, // 17: tunnel.v1beta1.Msg.EditTunnel:output_type -> tunnel.v1beta1.MsgEditTunnelResponse + 5, // 18: tunnel.v1beta1.Msg.Activate:output_type -> tunnel.v1beta1.MsgActivateResponse + 7, // 19: tunnel.v1beta1.Msg.Deactivate:output_type -> tunnel.v1beta1.MsgDeactivateResponse + 9, // 20: tunnel.v1beta1.Msg.TriggerTunnel:output_type -> tunnel.v1beta1.MsgTriggerTunnelResponse + 11, // 21: tunnel.v1beta1.Msg.DepositTunnel:output_type -> tunnel.v1beta1.MsgDepositTunnelResponse + 13, // 22: tunnel.v1beta1.Msg.WithdrawTunnel:output_type -> tunnel.v1beta1.MsgWithdrawTunnelResponse + 15, // 23: tunnel.v1beta1.Msg.UpdateParams:output_type -> tunnel.v1beta1.MsgUpdateParamsResponse + 16, // [16:24] is the sub-list for method output_type + 8, // [8:16] 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_tunnel_v1beta1_tx_proto_init() } +func file_tunnel_v1beta1_tx_proto_init() { + if File_tunnel_v1beta1_tx_proto != nil { return } - file_tss_v1beta1_tss_proto_init() + file_tunnel_v1beta1_params_proto_init() + file_tunnel_v1beta1_tunnel_proto_init() if !protoimpl.UnsafeEnabled { - file_tss_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCountsRequest); i { + file_tunnel_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateTunnel); i { case 0: return &v.state case 1: @@ -9007,8 +8535,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCountsResponse); i { + file_tunnel_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateTunnelResponse); i { case 0: return &v.state case 1: @@ -9019,8 +8547,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupRequest); i { + file_tunnel_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgEditTunnel); i { case 0: return &v.state case 1: @@ -9031,8 +8559,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGroupResponse); i { + file_tunnel_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgEditTunnelResponse); i { case 0: return &v.state case 1: @@ -9043,8 +8571,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryMembersRequest); i { + file_tunnel_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgActivate); i { case 0: return &v.state case 1: @@ -9055,8 +8583,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryMembersResponse); i { + file_tunnel_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgActivateResponse); i { case 0: return &v.state case 1: @@ -9067,8 +8595,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryIsGranteeRequest); i { + file_tunnel_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDeactivate); i { case 0: return &v.state case 1: @@ -9079,8 +8607,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryIsGranteeResponse); i { + file_tunnel_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDeactivateResponse); i { case 0: return &v.state case 1: @@ -9091,8 +8619,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDERequest); i { + file_tunnel_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTriggerTunnel); i { case 0: return &v.state case 1: @@ -9103,8 +8631,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDEResponse); i { + file_tunnel_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTriggerTunnelResponse); i { case 0: return &v.state case 1: @@ -9115,8 +8643,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPendingGroupsRequest); i { + file_tunnel_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDepositTunnel); i { case 0: return &v.state case 1: @@ -9127,8 +8655,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPendingGroupsResponse); i { + file_tunnel_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDepositTunnelResponse); i { case 0: return &v.state case 1: @@ -9139,8 +8667,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPendingSigningsRequest); i { + file_tunnel_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawTunnel); i { case 0: return &v.state case 1: @@ -9151,8 +8679,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPendingSigningsResponse); i { + file_tunnel_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawTunnelResponse); i { case 0: return &v.state case 1: @@ -9163,8 +8691,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySigningRequest); i { + file_tunnel_v1beta1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { case 0: return &v.state case 1: @@ -9175,8 +8703,8 @@ func file_tss_v1beta1_query_proto_init() { return nil } } - file_tss_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySigningResponse); i { + file_tunnel_v1beta1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state case 1: @@ -9192,18 +8720,18 @@ func file_tss_v1beta1_query_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tss_v1beta1_query_proto_rawDesc, + RawDescriptor: file_tunnel_v1beta1_tx_proto_rawDesc, NumEnums: 0, NumMessages: 16, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_tss_v1beta1_query_proto_goTypes, - DependencyIndexes: file_tss_v1beta1_query_proto_depIdxs, - MessageInfos: file_tss_v1beta1_query_proto_msgTypes, + GoTypes: file_tunnel_v1beta1_tx_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_tx_proto_depIdxs, + MessageInfos: file_tunnel_v1beta1_tx_proto_msgTypes, }.Build() - File_tss_v1beta1_query_proto = out.File - file_tss_v1beta1_query_proto_rawDesc = nil - file_tss_v1beta1_query_proto_goTypes = nil - file_tss_v1beta1_query_proto_depIdxs = nil + File_tunnel_v1beta1_tx_proto = out.File + file_tunnel_v1beta1_tx_proto_rawDesc = nil + file_tunnel_v1beta1_tx_proto_goTypes = nil + file_tunnel_v1beta1_tx_proto_depIdxs = nil } diff --git a/api/tunnel/v1beta1/tx_grpc.pb.go b/api/tunnel/v1beta1/tx_grpc.pb.go new file mode 100644 index 000000000..998a3b664 --- /dev/null +++ b/api/tunnel/v1beta1/tx_grpc.pb.go @@ -0,0 +1,384 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: tunnel/v1beta1/tx.proto + +package tunnelv1beta1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_CreateTunnel_FullMethodName = "/tunnel.v1beta1.Msg/CreateTunnel" + Msg_EditTunnel_FullMethodName = "/tunnel.v1beta1.Msg/EditTunnel" + Msg_Activate_FullMethodName = "/tunnel.v1beta1.Msg/Activate" + Msg_Deactivate_FullMethodName = "/tunnel.v1beta1.Msg/Deactivate" + Msg_TriggerTunnel_FullMethodName = "/tunnel.v1beta1.Msg/TriggerTunnel" + Msg_DepositTunnel_FullMethodName = "/tunnel.v1beta1.Msg/DepositTunnel" + Msg_WithdrawTunnel_FullMethodName = "/tunnel.v1beta1.Msg/WithdrawTunnel" + Msg_UpdateParams_FullMethodName = "/tunnel.v1beta1.Msg/UpdateParams" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // CreateTunnel is a RPC method to create a new tunnel. + CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) + // EditTunnel is a RPC method to edit a tunnel. + EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) + // Activate is a RPC method to activate a tunnel. + Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) + // Deactivate is a RPC method to deactivate a tunnel. + Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) + // TriggerTunnel is a RPC method to manually trigger a tunnel. + TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) + // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. + DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) + // UpdateParams is a RPC method to update parameters + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) { + out := new(MsgCreateTunnelResponse) + err := c.cc.Invoke(ctx, Msg_CreateTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) { + out := new(MsgEditTunnelResponse) + err := c.cc.Invoke(ctx, Msg_EditTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) { + out := new(MsgActivateResponse) + err := c.cc.Invoke(ctx, Msg_Activate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) { + out := new(MsgDeactivateResponse) + err := c.cc.Invoke(ctx, Msg_Deactivate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) { + out := new(MsgTriggerTunnelResponse) + err := c.cc.Invoke(ctx, Msg_TriggerTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) { + out := new(MsgDepositTunnelResponse) + err := c.cc.Invoke(ctx, Msg_DepositTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) { + out := new(MsgWithdrawTunnelResponse) + err := c.cc.Invoke(ctx, Msg_WithdrawTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // CreateTunnel is a RPC method to create a new tunnel. + CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) + // EditTunnel is a RPC method to edit a tunnel. + EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) + // Activate is a RPC method to activate a tunnel. + Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) + // Deactivate is a RPC method to deactivate a tunnel. + Deactivate(context.Context, *MsgDeactivate) (*MsgDeactivateResponse, error) + // TriggerTunnel is a RPC method to manually trigger a tunnel. + TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) + // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. + DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) + // UpdateParams is a RPC method to update parameters + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTunnel not implemented") +} +func (UnimplementedMsgServer) EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EditTunnel not implemented") +} +func (UnimplementedMsgServer) Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") +} +func (UnimplementedMsgServer) Deactivate(context.Context, *MsgDeactivate) (*MsgDeactivateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deactivate not implemented") +} +func (UnimplementedMsgServer) TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TriggerTunnel not implemented") +} +func (UnimplementedMsgServer) DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositTunnel not implemented") +} +func (UnimplementedMsgServer) WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawTunnel not implemented") +} +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_CreateTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateTunnel(ctx, req.(*MsgCreateTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_EditTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEditTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EditTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_EditTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EditTunnel(ctx, req.(*MsgEditTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Activate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgActivate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Activate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Activate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Activate(ctx, req.(*MsgActivate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Deactivate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeactivate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Deactivate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Deactivate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Deactivate(ctx, req.(*MsgDeactivate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTriggerTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TriggerTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_TriggerTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TriggerTunnel(ctx, req.(*MsgTriggerTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DepositTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_DepositTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DepositTunnel(ctx, req.(*MsgDepositTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_WithdrawTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawTunnel(ctx, req.(*MsgWithdrawTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tunnel.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateTunnel", + Handler: _Msg_CreateTunnel_Handler, + }, + { + MethodName: "EditTunnel", + Handler: _Msg_EditTunnel_Handler, + }, + { + MethodName: "Activate", + Handler: _Msg_Activate_Handler, + }, + { + MethodName: "Deactivate", + Handler: _Msg_Deactivate_Handler, + }, + { + MethodName: "TriggerTunnel", + Handler: _Msg_TriggerTunnel_Handler, + }, + { + MethodName: "DepositTunnel", + Handler: _Msg_DepositTunnel_Handler, + }, + { + MethodName: "WithdrawTunnel", + Handler: _Msg_WithdrawTunnel_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tunnel/v1beta1/tx.proto", +} diff --git a/scripts/tunnel/create_tss_tunnel.sh b/scripts/tunnel/create_tunnel.sh similarity index 100% rename from scripts/tunnel/create_tss_tunnel.sh rename to scripts/tunnel/create_tunnel.sh diff --git a/x/tunnel/autocli.go b/x/tunnel/autocli.go index 5c5ea3112..540bbb72e 100644 --- a/x/tunnel/autocli.go +++ b/x/tunnel/autocli.go @@ -3,14 +3,14 @@ package tunnel import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/bandprotocol/chain/v3/x/tunnel/types" + tunnelv1beta1 "github.com/bandprotocol/chain/v3/api/tunnel/v1beta1" ) // AutoCLIOptions returns the AutoCLI options for the tunnel module func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { return &autocliv1.ModuleOptions{ Query: &autocliv1.ServiceCommandDescriptor{ - Service: types.ModuleName, + Service: tunnelv1beta1.Query_ServiceDesc.ServiceName, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ { RpcMethod: "Params", @@ -22,7 +22,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Use: "tunnels", Short: "Query all tunnels", PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - {ProtoField: "status_filter"}, + {ProtoField: "status_filter", Optional: true}, }, }, { @@ -70,7 +70,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, }, Tx: &autocliv1.ServiceCommandDescriptor{ - Service: restakev1beta1.Msg_ServiceDesc.ServiceName, + Service: tunnelv1beta1.Msg_ServiceDesc.ServiceName, }, } } diff --git a/x/tunnel/client/cli/query.go b/x/tunnel/client/cli/query.go deleted file mode 100644 index e9e278d4d..000000000 --- a/x/tunnel/client/cli/query.go +++ /dev/null @@ -1,313 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - - "github.com/bandprotocol/chain/v3/x/tunnel/types" -) - -const flagTunnelActiveStatusFilter = "active" - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd() *cobra.Command { - queryCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the tunnel module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - queryCmd.AddCommand( - GetQueryCmdParams(), - GetQueryCmdTunnels(), - GetQueryCmdTunnel(), - GetQueryCmdDeposits(), - GetQueryCmdDeposit(), - GetQueryCmdPackets(), - GetQueryCmdPacket(), - ) - - return queryCmd -} - -// GetQueryCmdParams implements the query params command. -func GetQueryCmdParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "Shows the parameters of the module", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdTunnels implements the query tunnels command. -func GetQueryCmdTunnels() *cobra.Command { - cmd := &cobra.Command{ - Use: "tunnels", - Short: "Query all tunnels", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - statusFilterFlag, err := cmd.Flags().GetBool(flagTunnelActiveStatusFilter) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - var statusFilter types.TunnelStatusFilter - if !cmd.Flags().Changed(flagTunnelActiveStatusFilter) { - statusFilter = types.TUNNEL_STATUS_FILTER_UNSPECIFIED - } else if statusFilterFlag { - statusFilter = types.TUNNEL_STATUS_FILTER_ACTIVE - } else { - statusFilter = types.TUNNEL_STATUS_FILTER_INACTIVE - } - - res, err := queryClient.Tunnels(cmd.Context(), &types.QueryTunnelsRequest{ - StatusFilter: statusFilter, - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - cmd.Flags().Bool(flagTunnelActiveStatusFilter, false, "Filter tunnels by active status") - flags.AddPaginationFlagsToCmd(cmd, "tunnels") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdTunnel implements the query tunnel command. -func GetQueryCmdTunnel() *cobra.Command { - cmd := &cobra.Command{ - Use: "tunnel [tunnel-id]", - Short: "Query the tunnel by tunnel id", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - tunnelID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - res, err := queryClient.Tunnel(cmd.Context(), &types.QueryTunnelRequest{ - TunnelId: tunnelID, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdDeposits implements the query deposits command. -func GetQueryCmdDeposits() *cobra.Command { - cmd := &cobra.Command{ - Use: "deposits [tunnel-id]", - Short: "Query all deposits of a tunnel", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - tunnelID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.Deposits(cmd.Context(), &types.QueryDepositsRequest{ - TunnelId: tunnelID, - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, "deposits") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdDeposit implements the query deposit command. -func GetQueryCmdDeposit() *cobra.Command { - cmd := &cobra.Command{ - Use: "deposit [tunnel-id] [depositor]", - Short: "Query the deposit of a tunnel by tunnel id and depositor address", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - tunnelID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - res, err := queryClient.Deposit(cmd.Context(), &types.QueryDepositRequest{ - TunnelId: tunnelID, - Depositor: args[1], - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdPackets implements the query packets command. -func GetQueryCmdPackets() *cobra.Command { - cmd := &cobra.Command{ - Use: "packets [tunnel-id]", - Short: "Query the packets of a tunnel", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - tunnelID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - res, err := queryClient.Packets(cmd.Context(), &types.QueryPacketsRequest{ - TunnelId: tunnelID, - Pagination: pageReq, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, "packets") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdPacket implements the query packet command. -func GetQueryCmdPacket() *cobra.Command { - cmd := &cobra.Command{ - Use: "packet [tunnel-id] [sequence]", - Short: "Query a packet by tunnel id and sequence", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - tunnelID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - sequence, err := strconv.ParseUint(args[1], 10, 64) - if err != nil { - return err - } - - res, err := queryClient.Packet(cmd.Context(), &types.QueryPacketRequest{ - TunnelId: tunnelID, - Sequence: sequence, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/tunnel/module.go b/x/tunnel/module.go index fc7cab38d..ae2351ba0 100644 --- a/x/tunnel/module.go +++ b/x/tunnel/module.go @@ -83,11 +83,6 @@ func (AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd() } -// GetQueryCmd returns no root query command for the tunnel module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - // ---------------------------------------------------------------------------- // AppModule // ---------------------------------------------------------------------------- diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 910a41ab6..8f9c69d59 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -115,25 +115,25 @@ var fileDescriptor_cb87d9373a74da2e = []byte{ // 330 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0x4f, 0x02, 0x31, 0x14, 0xc7, 0xef, 0x00, 0x31, 0x16, 0xe2, 0x70, 0x31, 0xe4, 0x40, 0x73, 0x22, 0x13, 0xd3, 0x35, - 0xa0, 0x71, 0x74, 0xd0, 0x44, 0x63, 0xc2, 0x40, 0xc0, 0xc9, 0xe5, 0xd2, 0xab, 0xf5, 0x68, 0x52, + 0x88, 0x71, 0x74, 0xd0, 0x44, 0x63, 0xc2, 0x40, 0xc0, 0xc9, 0xe5, 0xd2, 0xab, 0xf5, 0x68, 0x52, 0xda, 0x0b, 0x7d, 0x10, 0xfd, 0x16, 0x7e, 0x28, 0x07, 0x46, 0x46, 0x27, 0x63, 0xe0, 0x8b, 0x18, 0xda, 0x4a, 0x22, 0xe8, 0x76, 0xef, 0xfd, 0x7f, 0xef, 0x77, 0xaf, 0x2d, 0x3a, 0x81, 0xa9, 0x94, 0x4c, 0xe0, 0x59, 0x27, 0x65, 0x40, 0x3a, 0x38, 0x63, 0x92, 0x69, 0xae, 0xe3, 0x7c, 0xa2, 0x40, 0x05, 0x87, 0x36, 0x8d, 0x5d, 0xda, 0x38, 0xca, 0x54, 0xa6, 0x4c, 0x84, 0xd7, 0x5f, 0x96, 0x6a, 0x1c, 0x6f, 0x39, 0x72, 0x32, 0x21, 0x63, 0xfd, 0x4f, 0xe8, 0x8c, 0x26, 0x6c, 0xbd, 0x17, 0x50, 0xf5, 0xce, 0xfe, 0x71, 0x08, 0x04, 0x58, 0x70, 0x81, 0xca, 0x76, 0x3a, 0xf4, 0x9b, 0x7e, 0xbb, - 0xd2, 0xad, 0xc5, 0xbf, 0x37, 0x88, 0xfb, 0x26, 0xbd, 0x2e, 0xcd, 0x3f, 0x4f, 0xbd, 0x81, 0x63, - 0x83, 0x33, 0x54, 0xb5, 0x58, 0x42, 0xd5, 0x54, 0x42, 0x58, 0x68, 0xfa, 0xed, 0xd2, 0xa0, 0x62, - 0x7b, 0x37, 0xeb, 0x56, 0x70, 0x89, 0xf6, 0x6d, 0xa9, 0xc3, 0x62, 0xb3, 0xf8, 0x97, 0xf9, 0xc1, - 0x94, 0xce, 0xfc, 0x03, 0x07, 0x14, 0xd5, 0x05, 0x01, 0xa6, 0x21, 0xd1, 0x3c, 0x93, 0x44, 0x24, - 0xf9, 0x84, 0x53, 0xa6, 0x13, 0xc1, 0x35, 0x84, 0x25, 0x63, 0x6a, 0x6d, 0x9b, 0x7a, 0x66, 0x60, - 0x68, 0xf8, 0xbe, 0xc1, 0x9d, 0xb5, 0x26, 0x76, 0x92, 0x1e, 0xd7, 0x10, 0x5c, 0x21, 0x04, 0x0a, - 0x88, 0x48, 0x9e, 0x19, 0xd3, 0xe1, 0x9e, 0x39, 0x79, 0x7d, 0x67, 0xbf, 0x35, 0x71, 0xcb, 0x36, -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, 0xe2, 0x96, 0x6d, + 0x64, 0x07, 0xb0, 0x69, 0xdc, 0xcf, 0x97, 0x91, 0xbf, 0x58, 0x46, 0xfe, 0xd7, 0x32, 0xf2, 0xdf, + 0x56, 0x91, 0xb7, 0x58, 0x45, 0xde, 0xc7, 0x2a, 0xf2, 0x1e, 0x71, 0xc6, 0x61, 0x34, 0x4d, 0x63, + 0xaa, 0xc6, 0x38, 0x25, 0xf2, 0xc9, 0x5c, 0x3b, 0x55, 0x02, 0xd3, 0x11, 0xe1, 0x12, 0xcf, 0xba, + 0xf8, 0xc5, 0xbd, 0x08, 0x86, 0xd7, 0x9c, 0xe9, 0xb4, 0x6c, 0x88, 0xee, 0x77, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x45, 0x96, 0x1a, 0x25, 0x18, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 793470731..105852f02 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -107,25 +107,25 @@ var fileDescriptor_a7b5eedd244355eb = []byte{ // 335 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x31, 0x4e, 0xf3, 0x30, 0x1c, 0xc5, 0x93, 0xb6, 0xaa, 0x3e, 0xb9, 0x1f, 0x20, 0x45, 0x0c, 0xa1, 0x48, 0x4e, 0x61, 0xea, - 0x42, 0x4c, 0xcb, 0xc6, 0x58, 0x10, 0x52, 0xb7, 0xaa, 0x6c, 0x2c, 0x91, 0xe3, 0x9a, 0xd4, 0x6a, + 0x42, 0x4c, 0xe9, 0xc6, 0x58, 0x10, 0x52, 0xb7, 0xaa, 0x6c, 0x2c, 0x91, 0xe3, 0x9a, 0xd4, 0x6a, 0x6c, 0x47, 0xb5, 0x5b, 0x95, 0x5b, 0x30, 0x32, 0x76, 0xe6, 0x06, 0xdc, 0xa0, 0x63, 0x47, 0x26, 0x40, 0xcd, 0xc2, 0x31, 0x90, 0xed, 0x80, 0x38, 0x00, 0x93, 0xad, 0xff, 0x7b, 0xfe, 0xbd, 0x27, 0xff, 0xc1, 0xb1, 0x5e, 0x08, 0x41, 0x73, 0xb4, 0xec, 0xa5, 0x54, 0xe3, 0x1e, 0x2a, 0xf0, 0x1c, 0x73, 0x15, 0x17, 0x73, 0xa9, 0x65, 0xb0, 0xef, 0xc4, 0xb8, 0x12, 0xdb, 0x87, 0x99, 0xcc, 0xa4, 0x95, 0x90, 0xb9, 0x39, 0x57, 0x1b, 0x12, 0xa9, 0xb8, 0x54, 0x28, 0xc5, 0x8a, 0xfe, 0x70, 0x88, 0x64, 0xc2, 0xe9, 0xa7, 0x2f, 0x35, 0xd0, 0x1c, 0x59, 0x6c, 0x90, 0x83, 0x16, 0x67, 0x22, 0x99, - 0xd0, 0x42, 0x2a, 0xa6, 0x43, 0xbf, 0x53, 0xef, 0xb6, 0xfa, 0x47, 0xb1, 0x03, 0xc4, 0x06, 0xf0, - 0x9d, 0x15, 0x5f, 0x49, 0x26, 0x06, 0xe7, 0x9b, 0xb7, 0xc8, 0x7b, 0x7e, 0x8f, 0xba, 0x19, 0xd3, - 0xd3, 0x45, 0x1a, 0x13, 0xc9, 0x51, 0x95, 0xe6, 0x8e, 0x33, 0x35, 0x99, 0x21, 0xfd, 0x50, 0x50, - 0x65, 0x1f, 0xa8, 0x31, 0xe0, 0x4c, 0x5c, 0x3b, 0x7c, 0x70, 0x02, 0xfe, 0x9b, 0x34, 0x26, 0x34, - 0x9d, 0x2f, 0x71, 0x1e, 0xd6, 0x3a, 0x7e, 0xb7, 0x31, 0x36, 0x0d, 0x86, 0xd5, 0x28, 0x88, 0x40, - 0x8b, 0xe3, 0x55, 0xa2, 0x58, 0x26, 0x70, 0xae, 0xc2, 0xba, 0x75, 0x00, 0x8e, 0x57, 0xb7, 0x6e, - 0x12, 0x28, 0x70, 0x60,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00, 0x1c, 0xaf, 0x6e, 0xdd, + 0x24, 0x50, 0xe0, 0xc0, 0xd4, 0x4a, 0x0a, 0x4c, 0x66, 0x54, 0x27, 0xf7, 0x94, 0x86, 0x8d, 0xbf, + 0x6f, 0xbd, 0x67, 0x20, 0x23, 0x1b, 0x71, 0x43, 0xe9, 0xe5, 0xbf, 0xa7, 0x75, 0xe4, 0x7d, 0xae, + 0x23, 0x7f, 0x30, 0xdc, 0xec, 0xa0, 0xbf, 0xdd, 0x41, 0xff, 0x63, 0x07, 0xfd, 0xc7, 0x12, 0x7a, + 0xdb, 0x12, 0x7a, 0xaf, 0x25, 0xf4, 0xee, 0xd0, 0x2f, 0x78, 0x8a, 0xc5, 0xc4, 0xfe, 0x35, 0x91, + 0x39, 0x22, 0x53, 0xcc, 0x04, 0x5a, 0xf6, 0xd1, 0x0a, 0x55, 0xbb, 0xb5, 0x49, 0x69, 0xd3, 0x3a, + 0xfa, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0x31, 0xe2, 0xbc, 0xf2, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 7fcedc8cf..d41e809de 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -790,62 +790,62 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 870 bytes of a gzipped FileDescriptorProto + // 871 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4f, 0x4f, 0x1b, 0x47, 0x18, 0xc6, 0x3d, 0xd4, 0xb5, 0xcd, 0xd0, 0x22, 0x34, 0xa5, 0xe0, 0x2e, 0x74, 0x71, 0xd7, 0xd0, - 0x22, 0x68, 0x77, 0x8a, 0x41, 0x2d, 0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 0x13, 0x74, 0xe8, 0x20, 0x39, 0xa3, 0x1d, 0x8a, 0xd4, 0xe3, 0x25, 0xa1, 0x48, 0xbd, - 0xce, 0x22, 0x89, 0x14, 0x29, 0x89, 0xa6, 0x70, 0xe0, 0x47, 0xde, 0x66, 0xfe, 0xec, 0x42, 0x04, - 0xe7, 0x17, 0x22, 0x78, 0x7f, 0x21, 0x82, 0xa7, 0x97, 0x62, 0xe4, 0xfc, 0x52, 0x8c, 0xbc, 0xbd, - 0x14, 0x23, 0xb7, 0x70, 0x43, 0xb7, 0xf7, 0xdb, 0x55, 0xb9, 0x66, 0x1e, 0xe0, 0xaa, 0x6a, 0xd4, - 0xe9, 0x17, 0x5f, 0xcd, 0x6c, 0xe2, 0xda, 0xbe, 0xaa, 0x1b, 0xf8, 0x28, 0x83, 0xef, 0xba, 0x77, - 0xda, 0xc7, 0x96, 0x46, 0xaa, 0x31, 0xaa, 0x58, 0xfd, 0x18, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xd7, - 0x80, 0x03, 0xdb, 0x0a, 0x00, 0x00, + 0x22, 0x68, 0x77, 0x8a, 0x8d, 0x5a, 0xd4, 0x43, 0x55, 0xfe, 0xd8, 0xc8, 0x2a, 0x75, 0xdd, 0xb5, + 0xe9, 0xa1, 0x17, 0x6b, 0x6d, 0x6f, 0xcd, 0xaa, 0x66, 0x77, 0xf1, 0xac, 0x51, 0x89, 0x45, 0x0e, + 0x51, 0x0e, 0xc9, 0x21, 0x52, 0x50, 0x94, 0x7c, 0x81, 0x48, 0xf9, 0x10, 0xf9, 0x04, 0x1c, 0x91, + 0x72, 0xc9, 0x29, 0x8a, 0x20, 0x1f, 0x24, 0xda, 0x99, 0xd9, 0xb5, 0xd7, 0xd9, 0x35, 0x46, 0x42, + 0xb9, 0xd9, 0x33, 0xcf, 0xcc, 0xfb, 0x7b, 0xdf, 0x77, 0xdf, 0x67, 0x17, 0x0a, 0x76, 0xc7, 0x30, + 0xb4, 0x16, 0x3e, 0x5e, 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, 0x6b, 0x34, 0x72, 0x54, 0xf1, 0xfe, 0x4b, 0x39, 0x5f, 0x79, 0xbd, 0x04, 0x65, 0x18, + 0x63, 0xe4, 0x61, 0x33, 0xc6, 0xf5, 0x5c, 0x25, 0x4d, 0x7b, 0x54, 0x8e, 0x99, 0x72, 0x2a, 0x6f, + 0x80, 0xdd, 0xd5, 0xde, 0x00, 0x33, 0xd3, 0x0d, 0xbf, 0xdc, 0xd9, 0x75, 0x07, 0x98, 0x69, 0x57, + 0xee, 0x03, 0x88, 0x3e, 0x74, 0x50, 0xb4, 0x08, 0x53, 0x95, 0xfd, 0x62, 0x31, 0xb7, 0x57, 0x2d, + 0x57, 0x36, 0x2b, 0xfb, 0xe5, 0x6a, 0xbe, 0xb0, 0x57, 0xc9, 0x29, 0xd5, 0xfd, 0x62, 0xb9, 0x94, + 0xdb, 0x2e, 0xe4, 0x0b, 0xb9, 0x9d, 0xa9, 0x08, 0x5a, 0x80, 0x73, 0x81, 0xaa, 0xcd, 0xed, 0x4a, + 0xe1, 0xef, 0xdc, 0x14, 0x40, 0xdf, 0xc0, 0xaf, 0x03, 0x05, 0x85, 0x22, 0x97, 0x8c, 0x09, 0xd1, + 0x07, 0xcf, 0xc5, 0x48, 0xe6, 0x65, 0x1c, 0x7e, 0x4a, 0x93, 0x42, 0x1d, 0x18, 0xe7, 0xfe, 0x8a, + 0xd2, 0x83, 0x19, 0x04, 0xbc, 0x26, 0x84, 0xc5, 0xe1, 0x22, 0x56, 0x1c, 0x69, 0xe1, 0xde, 0xab, + 0x77, 0x4f, 0xc6, 0xbe, 0x42, 0xb3, 0x38, 0xf0, 0x55, 0x44, 0xd0, 0x5d, 0x18, 0x63, 0x67, 0x90, + 0x34, 0xe4, 0x42, 0x37, 0x68, 0x7a, 0xa8, 0x86, 0xc7, 0x5c, 0xa5, 0x31, 0x97, 0x50, 0x3a, 0x24, + 0x26, 0xee, 0x7a, 0x0f, 0xd7, 0x29, 0x7a, 0x04, 0x60, 0xc2, 0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0xbd, + 0xd3, 0x3e, 0xb1, 0x34, 0x52, 0x8b, 0x51, 0x45, 0xf6, 0x7d, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, + 0xb2, 0xa5, 0x82, 0xdb, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index be96ebe6b..0adaf144c 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - github_com_bandprotocol_chain_v2_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" + github_com_bandprotocol_chain_v3_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" _ "github.com/bandprotocol/chain/v3/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" @@ -686,7 +686,7 @@ func (m *Packet) GetCreatedAt() int64 { // TSSPacketContent is the packet content for TSS type TSSPacketContent struct { // signing_id is the signing ID - SigningID github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" json:"signing_id,omitempty"` + SigningID github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" json:"signing_id,omitempty"` // destination_chain_id is the destination chain ID DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` // destination_contract_address is the destination contract address @@ -726,7 +726,7 @@ func (m *TSSPacketContent) XXX_DiscardUnknown() { var xxx_messageInfo_TSSPacketContent proto.InternalMessageInfo -func (m *TSSPacketContent) GetSigningID() github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID { +func (m *TSSPacketContent) GetSigningID() github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID { if m != nil { return m.SigningID } @@ -829,79 +829,79 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 1140 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xda, 0x8e, 0x63, 0x4f, 0x12, 0xe3, 0x4e, 0xad, 0x66, 0xeb, 0x14, 0xdb, 0xca, 0xc9, - 0x44, 0x8a, 0x37, 0x09, 0x6a, 0x85, 0x72, 0xc2, 0xff, 0xa2, 0xae, 0x0a, 0x89, 0x59, 0x1b, 0x09, - 0x71, 0x59, 0xad, 0x77, 0xc7, 0xce, 0x50, 0x7b, 0xc7, 0xdd, 0x19, 0x47, 0xcd, 0x27, 0xa0, 0xca, - 0x89, 0x2f, 0x10, 0x84, 0x40, 0x88, 0x0a, 0x2e, 0x1c, 0x72, 0xe3, 0x0b, 0x54, 0x39, 0x55, 0x9c, - 0x38, 0x20, 0x83, 0x9c, 0x43, 0xf9, 0x0c, 0x9c, 0xd0, 0xce, 0xcc, 0xfa, 0x5f, 0x13, 0x42, 0x10, - 0x48, 0xbd, 0xd8, 0xfb, 0xfe, 0xce, 0x7b, 0xbf, 0xf7, 0x7b, 0x3b, 0x0b, 0xd6, 0xd8, 0xc0, 0x75, - 0x51, 0x57, 0x3b, 0xda, 0x6e, 0x21, 0x66, 0x6d, 0x6b, 0x42, 0x2c, 0xf6, 0x3d, 0xc2, 0x08, 0x4c, - 0x4a, 0x49, 0x1a, 0x33, 0xb7, 0xac, 0x1e, 0x76, 0x89, 0xc6, 0x7f, 0x85, 0x4b, 0x26, 0x6b, 0x13, - 0xda, 0x23, 0x54, 0x6b, 0x59, 0x14, 0x8d, 0x93, 0xd8, 0x04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0xb0, 0x5e, 0x35, 0xc2, 0xd8, 0x81, 0x19, 0x10, 0xa7, - 0xe8, 0xc9, 0x00, 0xb9, 0x36, 0x12, 0x53, 0x30, 0xc6, 0x32, 0x7c, 0x00, 0x16, 0x3c, 0x7f, 0xe8, - 0x1c, 0xda, 0xa5, 0x9d, 0x74, 0x51, 0x6c, 0x5f, 0x31, 0xd8, 0xbe, 0x62, 0xc9, 0x3d, 0x2e, 0x4f, - 0x71, 0xc3, 0x10, 0xee, 0x70, 0x1b, 0x2c, 0x22, 0xd7, 0x26, 0x0e, 0xf2, 0xd4, 0x68, 0x5e, 0x29, - 0x24, 0x77, 0x56, 0x8b, 0xb3, 0xef, 0x8a, 0x62, 0x4d, 0x98, 0x8d, 0xc0, 0x0f, 0xde, 0x07, 0x89, - 0x36, 0x42, 0x66, 0xdf, 0x3a, 0x46, 0x9e, 0xba, 0x70, 0x0d, 0xa2, 0xf1, 0x36, 0x42, 0x75, 0xdf, - 0x13, 0x1a, 0xe0, 0x96, 0x24, 0xde, 0x98, 0x0b, 0x54, 0x8d, 0x71, 0x6c, 0x73, 0xf3, 0x67, 0xce, - 0x91, 0xb6, 0x1c, 0xf5, 0x11, 0x36, 0x52, 0x74, 0x56, 0x4d, 0x7d, 0x44, 0xb0, 0xcb, 0x90, 0x77, - 0x64, 0x75, 0xd5, 0x45, 0x81, 0x48, 0x20, 0xc3, 0x01, 0x58, 0x61, 0x84, 0xf1, 0xe3, 0xf8, 0x4c, - 0xd5, 0xf8, 0xff, 0x34, 0xc7, 0x65, 0x7e, 0x4c, 0x40, 0xcd, 0x35, 0x90, 0xc0, 0xd4, 0xb4, 0x6c, - 0x86, 0x8f, 0x90, 0x9a, 0xc8, 0x2b, 0x85, 0xb8, 0x11, 0xc7, 0xb4, 0xc4, 0x65, 0xf8, 0x36, 0x00, - 0xb6, 0x87, 0x2c, 0x86, 0x1c, 0xd3, 0x62, 0x2a, 0xc8, 0x2b, 0x85, 0x88, 0x91, 0x90, 0x9a, 0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 0xe2, 0x21, 0xe1, 0x4c, - 0xfa, 0xe4, 0x34, 0xff, 0x9a, 0x3e, 0x13, 0x7d, 0xf6, 0x4d, 0x36, 0x54, 0xfe, 0xf0, 0xf9, 0x28, - 0xab, 0xbc, 0x18, 0x65, 0x95, 0x97, 0xa3, 0xac, 0xf2, 0xfb, 0x28, 0xab, 0x7c, 0x71, 0x91, 0x0d, - 0xbd, 0xbc, 0xc8, 0x86, 0x7e, 0xb9, 0xc8, 0x86, 0x3e, 0xd5, 0xfe, 0x01, 0x31, 0xe5, 0xc7, 0x38, - 0xe7, 0x65, 0x2b, 0xc6, 0x3d, 0xde, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x08, 0x5d, 0x1e, - 0xa3, 0x0b, 0x00, 0x00, + // 1142 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xf7, 0xda, 0x8e, 0x63, 0x4f, 0x12, 0xff, 0xdd, 0xa9, 0xd5, 0x6c, 0x9d, 0xfe, 0x6d, 0x2b, + 0x27, 0x13, 0x29, 0xde, 0x24, 0x55, 0x2b, 0x94, 0x13, 0x7e, 0x8b, 0xba, 0x2a, 0x24, 0x66, 0x6d, + 0x24, 0xc4, 0x65, 0xb5, 0xde, 0x1d, 0x3b, 0x43, 0xed, 0x1d, 0x77, 0x67, 0x1c, 0x35, 0x9f, 0x80, + 0x2a, 0x27, 0xbe, 0x40, 0x10, 0x02, 0x21, 0x2a, 0xb8, 0x70, 0xc8, 0x8d, 0x2f, 0x50, 0xe5, 0x54, + 0x71, 0xe2, 0x80, 0x0c, 0x72, 0x0e, 0xe5, 0x33, 0x70, 0x42, 0x3b, 0x33, 0xeb, 0xb7, 0x26, 0x84, + 0x20, 0x90, 0x7a, 0xb1, 0xf7, 0x79, 0x9d, 0xe7, 0xf9, 0x3d, 0xb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, 0xd4, 0xb5, 0xbc, 0xb7, 0xbb, 0xce, 0x73, 0x05, 0xfc, 0xaf, 0x81, 0x3b, 0xae, 0xd5, + 0xad, 0xa2, 0x23, 0xcc, 0xdd, 0xe1, 0x3b, 0x20, 0x41, 0xb9, 0x6a, 0x52, 0xe0, 0xf2, 0x68, 0x98, + 0x8b, 0x0b, 0x3f, 0xbd, 0x6a, 0xc4, 0x85, 0x59, 0x77, 0x60, 0x19, 0x40, 0x4a, 0xda, 0xcc, 0x74, + 0x82, 0x60, 0xb3, 0xd5, 0x17, 0x25, 0x44, 0xcb, 0xe9, 0xd1, 0x30, 0x97, 0x6a, 0x90, 0x36, 0x1b, + 0x67, 0x2e, 0xd7, 0x1b, 0x46, 0x8a, 0xce, 0x68, 0xfa, 0xd4, 0xcf, 0x71, 0x68, 0x79, 0xce, 0x5c, + 0x8e, 0xc8, 0x24, 0xc7, 0x23, 0xcb, 0x73, 0x66, 0x73, 0x1c, 0xce, 0x68, 0xfa, 0x74, 0x37, 0xfa, + 0xfb, 0x97, 0x39, 0x65, 0xfd, 0x17, 0x05, 0x2c, 0x56, 0x51, 0x9f, 0x50, 0xcc, 0xfc, 0x26, 0x04, + 0xa3, 0x83, 0x26, 0xa2, 0xa2, 0x89, 0x26, 0x57, 0xfa, 0x4d, 0x08, 0xb3, 0xee, 0xc0, 0x87, 0x20, + 0xe1, 0x88, 0x28, 0xe2, 0x09, 0xf8, 0xca, 0xea, 0x4f, 0x67, 0x9b, 0x69, 0xc9, 0x60, 0x09, 0x5b, + 0x83, 0x79, 0xd8, 0xed, 0x18, 0x13, 0x57, 0x78, 0x08, 0x62, 0x56, 0x8f, 0x0c, 0x5c, 0xa6, 0x46, + 0xf2, 0x91, 0xc2, 0xd2, 0xce, 0xdd, 0xa2, 0x8c, 0xf0, 0x17, 0x24, 0x58, 0xa4, 0x62, 0x85, 0x60, + 0xb7, 0xfc, 0xe0, 0xe5, 0x30, 0x17, 0xfa, 0xee, 0xd7, 0x5c, 0xa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xab, 0xe8, 0x7b, + 0x7a, 0xad, 0x9a, 0x0a, 0x65, 0x56, 0x4f, 0x4e, 0xf3, 0x97, 0x99, 0xe0, 0xbb, 0x60, 0x35, 0x50, + 0xef, 0xe9, 0x1f, 0xd7, 0xaa, 0x66, 0xfd, 0x40, 0xdf, 0x6f, 0x9a, 0xa5, 0xb2, 0x9e, 0x52, 0x32, + 0x6b, 0x27, 0xa7, 0xf9, 0xab, 0xcc, 0x70, 0x03, 0xa4, 0x02, 0x53, 0x53, 0xaf, 0x3c, 0xe6, 0x21, + 0xe1, 0x4c, 0xfa, 0xe4, 0x34, 0xff, 0x86, 0x3e, 0x13, 0x7d, 0xfe, 0x75, 0x36, 0x54, 0xfe, 0xe0, + 0xc5, 0x28, 0xab, 0xbc, 0x1c, 0x65, 0x95, 0x57, 0xa3, 0xac, 0xf2, 0xdb, 0x28, 0xab, 0x7c, 0x7e, + 0x91, 0x0d, 0xbd, 0xba, 0xc8, 0x86, 0x7e, 0xbe, 0xc8, 0x86, 0x3e, 0xd1, 0xfe, 0x06, 0x31, 0xe5, + 0xc7, 0x38, 0xe7, 0x65, 0x2b, 0xc6, 0x3d, 0xee, 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0x96, 0x57, + 0xce, 0x28, 0xa3, 0x0b, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -3427,7 +3427,7 @@ func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SigningID |= github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID(b&0x7F) << shift + m.SigningID |= github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 1cdad3eb8..59146a4fd 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -872,70 +872,70 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 1002 bytes of a gzipped FileDescriptorProto + // 1008 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x49, 0x9a, 0x4c, 0xd2, 0xb4, 0x59, 0xd2, 0x7a, 0xbd, 0x11, 0xb6, 0xd9, 0xaa, - 0xaa, 0x13, 0x91, 0x5d, 0xc5, 0x50, 0x84, 0xc2, 0x29, 0xae, 0x7b, 0x88, 0x84, 0x25, 0xb4, 0x2d, - 0xa2, 0x02, 0x89, 0x68, 0xbc, 0x3b, 0xac, 0x47, 0xd8, 0x33, 0xd6, 0xce, 0xd8, 0xad, 0xaf, 0x48, - 0x5c, 0x38, 0xc1, 0x81, 0x13, 0xe2, 0xc2, 0x09, 0xf5, 0x94, 0x43, 0xff, 0x03, 0x2e, 0x85, 0x53, - 0xc5, 0x89, 0x53, 0x40, 0xc9, 0x21, 0x12, 0x7f, 0x05, 0xda, 0xd9, 0xd9, 0x9f, 0x59, 0x9c, 0x14, - 0x55, 0x48, 0xbd, 0x24, 0x9e, 0xf7, 0x7d, 0x6f, 0xf6, 0x9b, 0x6f, 0xde, 0xbc, 0x19, 0x50, 0xe1, - 0x63, 0x42, 0xd0, 0xc0, 0x9a, 0xec, 0xf6, 0x10, 0x87, 0xbb, 0x16, 0x7f, 0x62, 0x8e, 0x7c, 0xca, - 0xa9, 0xba, 0x16, 0x02, 0xa6, 0x04, 0xf4, 0xaa, 0x47, 0xa9, 0x37, 0x40, 0x96, 0x40, 0x7b, 0xe3, - 0x2f, 0x2c, 0x48, 0xa6, 0x21, 0x55, 0xdf, 0xf0, 0xa8, 0x47, 0xc5, 0x4f, 0x2b, 0xf8, 0x25, 0xa3, - 0x9b, 0xb9, 0x99, 0x47, 0xd0, 0x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 0x5f, 0x81, 0x76, 0x76, 0xf6, 0x67, 0x16, 0x27, + 0x45, 0x11, 0x12, 0x97, 0xc4, 0xf3, 0xbe, 0xef, 0xcd, 0x7e, 0xf3, 0xcd, 0x9b, 0x37, 0x03, 0xca, + 0x7c, 0x4c, 0x08, 0x1a, 0x58, 0x93, 0x9d, 0x2e, 0xe2, 0x70, 0xc7, 0xe2, 0xcf, 0xcd, 0x91, 0x47, + 0x39, 0x55, 0x57, 0x03, 0xc0, 0x94, 0x80, 0x5e, 0x71, 0x29, 0x75, 0x07, 0xc8, 0x12, 0x68, 0x77, + 0xfc, 0xb9, 0x05, 0xc9, 0x34, 0xa0, 0xea, 0xeb, 0x2e, 0x75, 0xa9, 0xf8, 0x69, 0xf9, 0xbf, 0x64, + 0x74, 0x23, 0x33, 0xf3, 0x08, 0x7a, 0x70, 0xc8, 0x24, 0x58, 0xe9, 0x51, 0x36, 0xa4, 0xec, 0x20, + 0xc8, 0x0a, 0x06, 0x12, 0xaa, 0x06, 0x23, 0xab, 0x0b, 0x19, 0x8a, 0x92, 0x7b, 0x14, 0x13, 0x89, + 0x97, 0x25, 0x3e, 0x64, 0xae, 0x35, 0xd9, 0xf1, 0xff, 0x49, 0x60, 0x0d, 0x0e, 0x31, 0xa1, 0x96, + 0xf8, 0xfb, 0x0f, 0x1a, 0xe4, 0x9a, 0x04, 0x68, 0xfc, 0x52, 0x04, 0x37, 0x3a, 0xcc, 0x7d, 0xe8, + 0x21, 0xc8, 0xd1, 0x13, 0x81, 0xa8, 0x36, 0x58, 0x63, 0xd8, 0x25, 0x70, 0x70, 0xe0, 0xa0, 0x09, + 0x86, 0x1c, 0x53, 0xc2, 0x34, 0xa5, 0x5e, 0x6c, 0x2c, 0x37, 0x6b, 0x66, 0xda, 0x11, 0xf3, 0xb1, + 0x20, 0xb6, 0x43, 0x5e, 0x6b, 0xfe, 0xd5, 0x71, 0x6d, 0xce, 0xbe, 0xc9, 0xd2, 0x61, 0xa6, 0xea, + 0x60, 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, 0x34, 0xbe, 0x9e, 0xaa, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 0583798f7e1ebfbcdf8a33508f43e9ccb837542d Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 22 Oct 2024 14:32:24 +0700 Subject: [PATCH 181/272] undo --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 08e58d94c..595a73726 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,8 @@ all: install install: go.sum go install -mod=readonly $(BUILD_FLAGS) ./cmd/bandd go install -mod=readonly $(BUILD_FLAGS) ./cmd/yoda + go install -mod=readonly $(BUILD_FLAGS) ./cmd/cylinder + go install -mod=readonly $(BUILD_FLAGS) ./cmd/grogu release: go.sum env GOOS=linux GOARCH=amd64 \ From fd4f140520b3c0608f18a7ad8bebb292c989d6ab Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 28 Oct 2024 14:49:38 +0700 Subject: [PATCH 182/272] add more test case --- x/tunnel/keeper/grpc_query_test.go | 39 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index d3f3fea47..800d0e339 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -68,6 +68,10 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { TunnelID: 1, Sequence: 2, } + packet3 := types.Packet{ + TunnelID: 2, + Sequence: 1, + } err = packet1.SetPacketContent(&types.TSSPacketContent{ SigningID: 1, DestinationChainID: r.DestinationChainID, @@ -80,8 +84,16 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { DestinationContractAddress: r.DestinationContractAddress, }) s.Require().NoError(err) + err = packet3.SetPacketContent(&types.TSSPacketContent{ + SigningID: 3, + DestinationChainID: r.DestinationChainID, + DestinationContractAddress: r.DestinationContractAddress, + }) + s.Require().NoError(err) + k.SetPacket(ctx, packet1) k.SetPacket(ctx, packet2) + k.SetPacket(ctx, packet3) resp, err := q.Packets(ctx, &types.QueryPacketsRequest{ TunnelId: 1, @@ -121,6 +133,18 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { s.Require().NoError(err) k.SetPacket(ctx, packet1) + packet2 := types.Packet{ + TunnelID: 1, + Sequence: 2, + } + err = packet2.SetPacketContent(&types.TSSPacketContent{ + SigningID: 2, + DestinationChainID: r.DestinationChainID, + DestinationContractAddress: r.DestinationContractAddress, + }) + s.Require().NoError(err) + k.SetPacket(ctx, packet2) + res, err := q.Packet(ctx, &types.QueryPacketRequest{ TunnelId: 1, Sequence: 1, @@ -183,18 +207,25 @@ func (s *KeeperTestSuite) TestGRPCQueryDeposit() { s.Require().NoError(err) k.SetTunnel(ctx, tunnel) - deposit := types.Deposit{ + deposit1 := types.Deposit{ + TunnelID: 1, + Depositor: sdk.AccAddress([]byte("depositor")).String(), + Amount: sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))), + } + k.SetDeposit(ctx, deposit1) + + deposit2 := types.Deposit{ TunnelID: 1, Depositor: sdk.AccAddress([]byte("depositor")).String(), Amount: sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))), } - k.SetDeposit(ctx, deposit) + k.SetDeposit(ctx, deposit2) resp, err := q.Deposit(ctx, &types.QueryDepositRequest{ TunnelId: 1, - Depositor: deposit.Depositor, + Depositor: deposit1.Depositor, }) s.Require().NoError(err) s.Require().NotNil(resp) - s.Require().Equal(deposit, resp.Deposit) + s.Require().Equal(deposit1, resp.Deposit) } From 760b3aec8839c845297778105bec2530a5830279 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 28 Oct 2024 16:09:54 +0700 Subject: [PATCH 183/272] fix reviews --- api/tunnel/v1beta1/genesis.pulsar.go | 1210 +++ api/tunnel/v1beta1/params.pulsar.go | 930 ++ api/tunnel/v1beta1/query.pulsar.go | 7707 +++++++++++++++ api/tunnel/v1beta1/query_grpc.pb.go | 345 + api/tunnel/v1beta1/tunnel.pulsar.go | 6529 ++++++++++++ api/tunnel/v1beta1/tx.pulsar.go | 8737 +++++++++++++++++ api/tunnel/v1beta1/tx_grpc.pb.go | 384 + app/ante.go | 5 - app/app.go | 1 - proto/tunnel/v1beta1/genesis.proto | 4 +- proto/tunnel/v1beta1/tunnel.proto | 22 - x/tunnel/abci.go | 3 - x/tunnel/client/cli/tx.go | 16 +- x/tunnel/client/cli/util.go | 3 +- x/tunnel/client/cli/util_test.go | 33 +- x/tunnel/keeper/axelar_packet_handler.go | 16 - x/tunnel/keeper/axelar_packet_handler_test.go | 8 - x/tunnel/keeper/deposit.go | 33 +- x/tunnel/keeper/deposit_test.go | 44 + x/tunnel/keeper/genesis.go | 8 + x/tunnel/keeper/packet.go | 2 - x/tunnel/keeper/packet_test.go | 4 +- x/tunnel/keeper/tunnel.go | 4 +- x/tunnel/types/axelar_route.go | 7 - x/tunnel/types/codec.go | 4 - x/tunnel/types/expected_keepers.go | 2 +- x/tunnel/types/genesis.go | 22 +- x/tunnel/types/genesis.pb.go | 112 +- x/tunnel/types/keys.go | 4 +- x/tunnel/types/msgs.go | 22 - x/tunnel/types/params.go | 4 +- x/tunnel/types/params.pb.go | 26 +- x/tunnel/types/query.pb.go | 108 +- x/tunnel/types/tunnel.pb.go | 707 +- x/tunnel/types/tx.pb.go | 126 +- 35 files changed, 26272 insertions(+), 920 deletions(-) create mode 100644 api/tunnel/v1beta1/genesis.pulsar.go create mode 100644 api/tunnel/v1beta1/params.pulsar.go create mode 100644 api/tunnel/v1beta1/query.pulsar.go create mode 100644 api/tunnel/v1beta1/query_grpc.pb.go create mode 100644 api/tunnel/v1beta1/tunnel.pulsar.go create mode 100644 api/tunnel/v1beta1/tx.pulsar.go create mode 100644 api/tunnel/v1beta1/tx_grpc.pb.go delete mode 100644 x/tunnel/keeper/axelar_packet_handler.go delete mode 100644 x/tunnel/keeper/axelar_packet_handler_test.go delete mode 100644 x/tunnel/types/axelar_route.go diff --git a/api/tunnel/v1beta1/genesis.pulsar.go b/api/tunnel/v1beta1/genesis.pulsar.go new file mode 100644 index 000000000..e96063c72 --- /dev/null +++ b/api/tunnel/v1beta1/genesis.pulsar.go @@ -0,0 +1,1210 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tunnelv1beta1 + +import ( + fmt "fmt" + 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" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_GenesisState_3_list)(nil) + +type _GenesisState_3_list struct { + list *[]*Tunnel +} + +func (x *_GenesisState_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Tunnel) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Tunnel) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(Tunnel) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(Tunnel) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_4_list)(nil) + +type _GenesisState_4_list struct { + list *[]*LatestSignalPrices +} + +func (x *_GenesisState_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*LatestSignalPrices) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*LatestSignalPrices) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { + v := new(LatestSignalPrices) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_4_list) NewElement() protoreflect.Value { + v := new(LatestSignalPrices) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_5_list)(nil) + +type _GenesisState_5_list struct { + list *[]*Deposit +} + +func (x *_GenesisState_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Deposit) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Deposit) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { + v := new(Deposit) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_5_list) NewElement() protoreflect.Value { + v := new(Deposit) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_tunnel_count protoreflect.FieldDescriptor + fd_GenesisState_tunnels protoreflect.FieldDescriptor + fd_GenesisState_latest_signal_prices_list protoreflect.FieldDescriptor + fd_GenesisState_deposits protoreflect.FieldDescriptor + fd_GenesisState_total_fees protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_genesis_proto_init() + md_GenesisState = File_tunnel_v1beta1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_tunnel_count = md_GenesisState.Fields().ByName("tunnel_count") + fd_GenesisState_tunnels = md_GenesisState.Fields().ByName("tunnels") + fd_GenesisState_latest_signal_prices_list = md_GenesisState.Fields().ByName("latest_signal_prices_list") + fd_GenesisState_deposits = md_GenesisState.Fields().ByName("deposits") + fd_GenesisState_total_fees = md_GenesisState.Fields().ByName("total_fees") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_genesis_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_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// 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_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(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_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } + if x.TunnelCount != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelCount) + if !f(fd_GenesisState_tunnel_count, value) { + return + } + } + if len(x.Tunnels) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Tunnels}) + if !f(fd_GenesisState_tunnels, value) { + return + } + } + if len(x.LatestSignalPricesList) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.LatestSignalPricesList}) + if !f(fd_GenesisState_latest_signal_prices_list, value) { + return + } + } + if len(x.Deposits) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.Deposits}) + if !f(fd_GenesisState_deposits, value) { + return + } + } + if x.TotalFees != nil { + value := protoreflect.ValueOfMessage(x.TotalFees.ProtoReflect()) + if !f(fd_GenesisState_total_fees, 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_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.GenesisState.params": + return x.Params != nil + case "tunnel.v1beta1.GenesisState.tunnel_count": + return x.TunnelCount != uint64(0) + case "tunnel.v1beta1.GenesisState.tunnels": + return len(x.Tunnels) != 0 + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + return len(x.LatestSignalPricesList) != 0 + case "tunnel.v1beta1.GenesisState.deposits": + return len(x.Deposits) != 0 + case "tunnel.v1beta1.GenesisState.total_fees": + return x.TotalFees != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState 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_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.GenesisState.params": + x.Params = nil + case "tunnel.v1beta1.GenesisState.tunnel_count": + x.TunnelCount = uint64(0) + case "tunnel.v1beta1.GenesisState.tunnels": + x.Tunnels = nil + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + x.LatestSignalPricesList = nil + case "tunnel.v1beta1.GenesisState.deposits": + x.Deposits = nil + case "tunnel.v1beta1.GenesisState.total_fees": + x.TotalFees = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState 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_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tunnel.v1beta1.GenesisState.tunnel_count": + value := x.TunnelCount + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.GenesisState.tunnels": + if len(x.Tunnels) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) + } + listValue := &_GenesisState_3_list{list: &x.Tunnels} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + if len(x.LatestSignalPricesList) == 0 { + return protoreflect.ValueOfList(&_GenesisState_4_list{}) + } + listValue := &_GenesisState_4_list{list: &x.LatestSignalPricesList} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.GenesisState.deposits": + if len(x.Deposits) == 0 { + return protoreflect.ValueOfList(&_GenesisState_5_list{}) + } + listValue := &_GenesisState_5_list{list: &x.Deposits} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.GenesisState.total_fees": + value := x.TotalFees + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState 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_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + case "tunnel.v1beta1.GenesisState.tunnel_count": + x.TunnelCount = value.Uint() + case "tunnel.v1beta1.GenesisState.tunnels": + lv := value.List() + clv := lv.(*_GenesisState_3_list) + x.Tunnels = *clv.list + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + lv := value.List() + clv := lv.(*_GenesisState_4_list) + x.LatestSignalPricesList = *clv.list + case "tunnel.v1beta1.GenesisState.deposits": + lv := value.List() + clv := lv.(*_GenesisState_5_list) + x.Deposits = *clv.list + case "tunnel.v1beta1.GenesisState.total_fees": + x.TotalFees = value.Message().Interface().(*TotalFees) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState 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_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "tunnel.v1beta1.GenesisState.tunnels": + if x.Tunnels == nil { + x.Tunnels = []*Tunnel{} + } + value := &_GenesisState_3_list{list: &x.Tunnels} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + if x.LatestSignalPricesList == nil { + x.LatestSignalPricesList = []*LatestSignalPrices{} + } + value := &_GenesisState_4_list{list: &x.LatestSignalPricesList} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.GenesisState.deposits": + if x.Deposits == nil { + x.Deposits = []*Deposit{} + } + value := &_GenesisState_5_list{list: &x.Deposits} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.GenesisState.total_fees": + if x.TotalFees == nil { + x.TotalFees = new(TotalFees) + } + return protoreflect.ValueOfMessage(x.TotalFees.ProtoReflect()) + case "tunnel.v1beta1.GenesisState.tunnel_count": + panic(fmt.Errorf("field tunnel_count of message tunnel.v1beta1.GenesisState is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState 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_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tunnel.v1beta1.GenesisState.tunnel_count": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.GenesisState.tunnels": + list := []*Tunnel{} + return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + list := []*LatestSignalPrices{} + return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + case "tunnel.v1beta1.GenesisState.deposits": + list := []*Deposit{} + return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) + case "tunnel.v1beta1.GenesisState.total_fees": + m := new(TotalFees) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + } + panic(fmt.Errorf("message tunnel.v1beta1.GenesisState 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_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.GenesisState", 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_GenesisState) 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_GenesisState) 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_GenesisState) 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_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + 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.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TunnelCount != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelCount)) + } + if len(x.Tunnels) > 0 { + for _, e := range x.Tunnels { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.LatestSignalPricesList) > 0 { + for _, e := range x.LatestSignalPricesList { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Deposits) > 0 { + for _, e := range x.Deposits { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.TotalFees != nil { + l = options.Size(x.TotalFees) + 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().(*GenesisState) + 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 x.TotalFees != nil { + encoded, err := options.Marshal(x.TotalFees) + 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] = 0x32 + } + if len(x.Deposits) > 0 { + for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Deposits[iNdEx]) + 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.LatestSignalPricesList) > 0 { + for iNdEx := len(x.LatestSignalPricesList) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LatestSignalPricesList[iNdEx]) + 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] = 0x22 + } + } + if len(x.Tunnels) > 0 { + for iNdEx := len(x.Tunnels) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Tunnels[iNdEx]) + 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.TunnelCount != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelCount)) + i-- + dAtA[i] = 0x10 + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + 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().(*GenesisState) + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: 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 Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelCount", wireType) + } + x.TunnelCount = 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.TunnelCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tunnels", 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 + } + x.Tunnels = append(x.Tunnels, &Tunnel{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tunnels[len(x.Tunnels)-1]); 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 LatestSignalPricesList", 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 + } + x.LatestSignalPricesList = append(x.LatestSignalPricesList, &LatestSignalPrices{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LatestSignalPricesList[len(x.LatestSignalPricesList)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposits", 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 + } + x.Deposits = append(x.Deposits, &Deposit{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposits[len(x.Deposits)-1]); 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 TotalFees", 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.TotalFees == nil { + x.TotalFees = &TotalFees{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalFees); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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: tunnel/v1beta1/genesis.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) +) + +// GenesisState represents the initial state of the blockchain. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params is all parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + // tunnel_count is the number of tunnels. + TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` + // tunnels is the list of tunnels. + Tunnels []*Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels,omitempty"` + // latest_signal_prices_list is the list of latest signal prices. + LatestSignalPricesList []*LatestSignalPrices `protobuf:"bytes,4,rep,name=latest_signal_prices_list,json=latestSignalPricesList,proto3" json:"latest_signal_prices_list,omitempty"` + // deposits is the list of deposits. + Deposits []*Deposit `protobuf:"bytes,5,rep,name=deposits,proto3" json:"deposits,omitempty"` + // total_fees is the type for the total fees collected by the tunnel + TotalFees *TotalFees `protobuf:"bytes,6,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +func (x *GenesisState) GetTunnelCount() uint64 { + if x != nil { + return x.TunnelCount + } + return 0 +} + +func (x *GenesisState) GetTunnels() []*Tunnel { + if x != nil { + return x.Tunnels + } + return nil +} + +func (x *GenesisState) GetLatestSignalPricesList() []*LatestSignalPrices { + if x != nil { + return x.LatestSignalPricesList + } + return nil +} + +func (x *GenesisState) GetDeposits() []*Deposit { + if x != nil { + return x.Deposits + } + return nil +} + +func (x *GenesisState) GetTotalFees() *TotalFees { + if x != nil { + return x.TotalFees + } + return nil +} + +var File_tunnel_v1beta1_genesis_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, + 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, + 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x12, 0x63, 0x0a, 0x19, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x16, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x12, 0x3e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, + 0x42, 0xbe, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, + 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tunnel_v1beta1_genesis_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_genesis_proto_rawDescData = file_tunnel_v1beta1_genesis_proto_rawDesc +) + +func file_tunnel_v1beta1_genesis_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_genesis_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_genesis_proto_rawDescData) + }) + return file_tunnel_v1beta1_genesis_proto_rawDescData +} + +var file_tunnel_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_tunnel_v1beta1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: tunnel.v1beta1.GenesisState + (*Params)(nil), // 1: tunnel.v1beta1.Params + (*Tunnel)(nil), // 2: tunnel.v1beta1.Tunnel + (*LatestSignalPrices)(nil), // 3: tunnel.v1beta1.LatestSignalPrices + (*Deposit)(nil), // 4: tunnel.v1beta1.Deposit + (*TotalFees)(nil), // 5: tunnel.v1beta1.TotalFees +} +var file_tunnel_v1beta1_genesis_proto_depIdxs = []int32{ + 1, // 0: tunnel.v1beta1.GenesisState.params:type_name -> tunnel.v1beta1.Params + 2, // 1: tunnel.v1beta1.GenesisState.tunnels:type_name -> tunnel.v1beta1.Tunnel + 3, // 2: tunnel.v1beta1.GenesisState.latest_signal_prices_list:type_name -> tunnel.v1beta1.LatestSignalPrices + 4, // 3: tunnel.v1beta1.GenesisState.deposits:type_name -> tunnel.v1beta1.Deposit + 5, // 4: tunnel.v1beta1.GenesisState.total_fees:type_name -> tunnel.v1beta1.TotalFees + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_tunnel_v1beta1_genesis_proto_init() } +func file_tunnel_v1beta1_genesis_proto_init() { + if File_tunnel_v1beta1_genesis_proto != nil { + return + } + file_tunnel_v1beta1_params_proto_init() + file_tunnel_v1beta1_tunnel_proto_init() + if !protoimpl.UnsafeEnabled { + file_tunnel_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); 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_tunnel_v1beta1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tunnel_v1beta1_genesis_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_genesis_proto_depIdxs, + MessageInfos: file_tunnel_v1beta1_genesis_proto_msgTypes, + }.Build() + File_tunnel_v1beta1_genesis_proto = out.File + file_tunnel_v1beta1_genesis_proto_rawDesc = nil + file_tunnel_v1beta1_genesis_proto_goTypes = nil + file_tunnel_v1beta1_genesis_proto_depIdxs = nil +} diff --git a/api/tunnel/v1beta1/params.pulsar.go b/api/tunnel/v1beta1/params.pulsar.go new file mode 100644 index 000000000..a71b206dd --- /dev/null +++ b/api/tunnel/v1beta1/params.pulsar.go @@ -0,0 +1,930 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tunnelv1beta1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + 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" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_Params_1_list)(nil) + +type _Params_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Params_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Params_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Params_4_list)(nil) + +type _Params_4_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Params_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Params_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_4_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_4_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_min_deposit protoreflect.FieldDescriptor + fd_Params_min_interval protoreflect.FieldDescriptor + fd_Params_max_signals protoreflect.FieldDescriptor + fd_Params_base_packet_fee protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_params_proto_init() + md_Params = File_tunnel_v1beta1_params_proto.Messages().ByName("Params") + fd_Params_min_deposit = md_Params.Fields().ByName("min_deposit") + fd_Params_min_interval = md_Params.Fields().ByName("min_interval") + fd_Params_max_signals = md_Params.Fields().ByName("max_signals") + fd_Params_base_packet_fee = md_Params.Fields().ByName("base_packet_fee") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_params_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_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// 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_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(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_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.MinDeposit) != 0 { + value := protoreflect.ValueOfList(&_Params_1_list{list: &x.MinDeposit}) + if !f(fd_Params_min_deposit, value) { + return + } + } + if x.MinInterval != uint64(0) { + value := protoreflect.ValueOfUint64(x.MinInterval) + if !f(fd_Params_min_interval, value) { + return + } + } + if x.MaxSignals != uint64(0) { + value := protoreflect.ValueOfUint64(x.MaxSignals) + if !f(fd_Params_max_signals, value) { + return + } + } + if len(x.BasePacketFee) != 0 { + value := protoreflect.ValueOfList(&_Params_4_list{list: &x.BasePacketFee}) + if !f(fd_Params_base_packet_fee, 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_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + return len(x.MinDeposit) != 0 + case "tunnel.v1beta1.Params.min_interval": + return x.MinInterval != uint64(0) + case "tunnel.v1beta1.Params.max_signals": + return x.MaxSignals != uint64(0) + case "tunnel.v1beta1.Params.base_packet_fee": + return len(x.BasePacketFee) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + x.MinDeposit = nil + case "tunnel.v1beta1.Params.min_interval": + x.MinInterval = uint64(0) + case "tunnel.v1beta1.Params.max_signals": + x.MaxSignals = uint64(0) + case "tunnel.v1beta1.Params.base_packet_fee": + x.BasePacketFee = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + if len(x.MinDeposit) == 0 { + return protoreflect.ValueOfList(&_Params_1_list{}) + } + listValue := &_Params_1_list{list: &x.MinDeposit} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.Params.min_interval": + value := x.MinInterval + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Params.max_signals": + value := x.MaxSignals + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Params.base_packet_fee": + if len(x.BasePacketFee) == 0 { + return protoreflect.ValueOfList(&_Params_4_list{}) + } + listValue := &_Params_4_list{list: &x.BasePacketFee} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + lv := value.List() + clv := lv.(*_Params_1_list) + x.MinDeposit = *clv.list + case "tunnel.v1beta1.Params.min_interval": + x.MinInterval = value.Uint() + case "tunnel.v1beta1.Params.max_signals": + x.MaxSignals = value.Uint() + case "tunnel.v1beta1.Params.base_packet_fee": + lv := value.List() + clv := lv.(*_Params_4_list) + x.BasePacketFee = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + if x.MinDeposit == nil { + x.MinDeposit = []*v1beta1.Coin{} + } + value := &_Params_1_list{list: &x.MinDeposit} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Params.base_packet_fee": + if x.BasePacketFee == nil { + x.BasePacketFee = []*v1beta1.Coin{} + } + value := &_Params_4_list{list: &x.BasePacketFee} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Params.min_interval": + panic(fmt.Errorf("field min_interval of message tunnel.v1beta1.Params is not mutable")) + case "tunnel.v1beta1.Params.max_signals": + panic(fmt.Errorf("field max_signals of message tunnel.v1beta1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Params.min_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Params_1_list{list: &list}) + case "tunnel.v1beta1.Params.min_interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Params.max_signals": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Params.base_packet_fee": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Params_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.MinDeposit) > 0 { + for _, e := range x.MinDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.MinInterval != 0 { + n += 1 + runtime.Sov(uint64(x.MinInterval)) + } + if x.MaxSignals != 0 { + n += 1 + runtime.Sov(uint64(x.MaxSignals)) + } + if len(x.BasePacketFee) > 0 { + for _, e := range x.BasePacketFee { + l = options.Size(e) + 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().(*Params) + 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.BasePacketFee) > 0 { + for iNdEx := len(x.BasePacketFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.BasePacketFee[iNdEx]) + 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] = 0x22 + } + } + if x.MaxSignals != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxSignals)) + i-- + dAtA[i] = 0x18 + } + if x.MinInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MinInterval)) + i-- + dAtA[i] = 0x10 + } + if len(x.MinDeposit) > 0 { + for iNdEx := len(x.MinDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.MinDeposit[iNdEx]) + 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().(*Params) + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: 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 MinDeposit", 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 + } + x.MinDeposit = append(x.MinDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinDeposit[len(x.MinDeposit)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinInterval", wireType) + } + x.MinInterval = 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.MinInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxSignals", wireType) + } + x.MaxSignals = 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.MaxSignals |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BasePacketFee", 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 + } + x.BasePacketFee = append(x.BasePacketFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BasePacketFee[len(x.BasePacketFee)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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: tunnel/v1beta1/params.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) +) + +// Params is the data structure that keeps the parameters of the module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // min_deposit is the minimum deposit required to create a tunnel + MinDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` + // min_interval is the minimum interval in seconds + MinInterval uint64 `protobuf:"varint,2,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` + // max_signals defines the maximum number of signals allowed per tunnel. + MaxSignals uint64 `protobuf:"varint,3,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` + // base_packet_fee is the base fee for each packet + BasePacketFee []*v1beta1.Coin `protobuf:"bytes,4,rep,name=base_packet_fee,json=basePacketFee,proto3" json:"base_packet_fee,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_params_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_params_proto_rawDescGZIP(), []int{0} +} + +func (x *Params) GetMinDeposit() []*v1beta1.Coin { + if x != nil { + return x.MinDeposit + } + return nil +} + +func (x *Params) GetMinInterval() uint64 { + if x != nil { + return x.MinInterval + } + return 0 +} + +func (x *Params) GetMaxSignals() uint64 { + if x != nil { + return x.MaxSignals + } + return 0 +} + +func (x *Params) GetBasePacketFee() []*v1beta1.Coin { + if x != nil { + return x.BasePacketFee + } + return nil +} + +var File_tunnel_v1beta1_params_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_params_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, + 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 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, 0x22, 0xb9, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6c, + 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x03, 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, 0x30, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, + 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, + 0x12, 0x73, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, + 0xbd, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, + 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, + 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tunnel_v1beta1_params_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_params_proto_rawDescData = file_tunnel_v1beta1_params_proto_rawDesc +) + +func file_tunnel_v1beta1_params_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_params_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_params_proto_rawDescData) + }) + return file_tunnel_v1beta1_params_proto_rawDescData +} + +var file_tunnel_v1beta1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_tunnel_v1beta1_params_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: tunnel.v1beta1.Params + (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin +} +var file_tunnel_v1beta1_params_proto_depIdxs = []int32{ + 1, // 0: tunnel.v1beta1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 1, // 1: tunnel.v1beta1.Params.base_packet_fee:type_name -> cosmos.base.v1beta1.Coin + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_tunnel_v1beta1_params_proto_init() } +func file_tunnel_v1beta1_params_proto_init() { + if File_tunnel_v1beta1_params_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tunnel_v1beta1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); 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_tunnel_v1beta1_params_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tunnel_v1beta1_params_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_params_proto_depIdxs, + MessageInfos: file_tunnel_v1beta1_params_proto_msgTypes, + }.Build() + File_tunnel_v1beta1_params_proto = out.File + file_tunnel_v1beta1_params_proto_rawDesc = nil + file_tunnel_v1beta1_params_proto_goTypes = nil + file_tunnel_v1beta1_params_proto_depIdxs = nil +} diff --git a/api/tunnel/v1beta1/query.pulsar.go b/api/tunnel/v1beta1/query.pulsar.go new file mode 100644 index 000000000..2af6c1ab5 --- /dev/null +++ b/api/tunnel/v1beta1/query.pulsar.go @@ -0,0 +1,7707 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tunnelv1beta1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryTunnelsRequest protoreflect.MessageDescriptor + fd_QueryTunnelsRequest_status_filter protoreflect.FieldDescriptor + fd_QueryTunnelsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryTunnelsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelsRequest") + fd_QueryTunnelsRequest_status_filter = md_QueryTunnelsRequest.Fields().ByName("status_filter") + fd_QueryTunnelsRequest_pagination = md_QueryTunnelsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryTunnelsRequest)(nil) + +type fastReflection_QueryTunnelsRequest QueryTunnelsRequest + +func (x *QueryTunnelsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTunnelsRequest)(x) +} + +func (x *QueryTunnelsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_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_QueryTunnelsRequest_messageType fastReflection_QueryTunnelsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryTunnelsRequest_messageType{} + +type fastReflection_QueryTunnelsRequest_messageType struct{} + +func (x fastReflection_QueryTunnelsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTunnelsRequest)(nil) +} +func (x fastReflection_QueryTunnelsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTunnelsRequest) +} +func (x fastReflection_QueryTunnelsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryTunnelsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelsRequest +} + +// 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_QueryTunnelsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryTunnelsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryTunnelsRequest) New() protoreflect.Message { + return new(fastReflection_QueryTunnelsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryTunnelsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryTunnelsRequest)(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_QueryTunnelsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.StatusFilter != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.StatusFilter)) + if !f(fd_QueryTunnelsRequest_status_filter, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryTunnelsRequest_pagination, 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_QueryTunnelsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + return x.StatusFilter != 0 + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest 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_QueryTunnelsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + x.StatusFilter = 0 + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest 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_QueryTunnelsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + value := x.StatusFilter + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest 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_QueryTunnelsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + x.StatusFilter = (TunnelStatusFilter)(value.Enum()) + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest 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_QueryTunnelsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + panic(fmt.Errorf("field status_filter of message tunnel.v1beta1.QueryTunnelsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest 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_QueryTunnelsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + return protoreflect.ValueOfEnum(0) + case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest 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_QueryTunnelsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelsRequest", 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_QueryTunnelsRequest) 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_QueryTunnelsRequest) 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_QueryTunnelsRequest) 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_QueryTunnelsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryTunnelsRequest) + 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.StatusFilter != 0 { + n += 1 + runtime.Sov(uint64(x.StatusFilter)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryTunnelsRequest) + 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 x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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 x.StatusFilter != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.StatusFilter)) + i-- + dAtA[i] = 0x8 + } + 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().(*QueryTunnelsRequest) + 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: QueryTunnelsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StatusFilter", wireType) + } + x.StatusFilter = 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.StatusFilter |= TunnelStatusFilter(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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 _ protoreflect.List = (*_QueryTunnelsResponse_1_list)(nil) + +type _QueryTunnelsResponse_1_list struct { + list *[]*Tunnel +} + +func (x *_QueryTunnelsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryTunnelsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryTunnelsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Tunnel) + (*x.list)[i] = concreteValue +} + +func (x *_QueryTunnelsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Tunnel) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryTunnelsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Tunnel) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryTunnelsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryTunnelsResponse_1_list) NewElement() protoreflect.Value { + v := new(Tunnel) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryTunnelsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryTunnelsResponse protoreflect.MessageDescriptor + fd_QueryTunnelsResponse_tunnels protoreflect.FieldDescriptor + fd_QueryTunnelsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryTunnelsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelsResponse") + fd_QueryTunnelsResponse_tunnels = md_QueryTunnelsResponse.Fields().ByName("tunnels") + fd_QueryTunnelsResponse_pagination = md_QueryTunnelsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryTunnelsResponse)(nil) + +type fastReflection_QueryTunnelsResponse QueryTunnelsResponse + +func (x *QueryTunnelsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTunnelsResponse)(x) +} + +func (x *QueryTunnelsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_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_QueryTunnelsResponse_messageType fastReflection_QueryTunnelsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryTunnelsResponse_messageType{} + +type fastReflection_QueryTunnelsResponse_messageType struct{} + +func (x fastReflection_QueryTunnelsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTunnelsResponse)(nil) +} +func (x fastReflection_QueryTunnelsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTunnelsResponse) +} +func (x fastReflection_QueryTunnelsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryTunnelsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelsResponse +} + +// 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_QueryTunnelsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryTunnelsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryTunnelsResponse) New() protoreflect.Message { + return new(fastReflection_QueryTunnelsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryTunnelsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryTunnelsResponse)(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_QueryTunnelsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Tunnels) != 0 { + value := protoreflect.ValueOfList(&_QueryTunnelsResponse_1_list{list: &x.Tunnels}) + if !f(fd_QueryTunnelsResponse_tunnels, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryTunnelsResponse_pagination, 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_QueryTunnelsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + return len(x.Tunnels) != 0 + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse 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_QueryTunnelsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + x.Tunnels = nil + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse 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_QueryTunnelsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + if len(x.Tunnels) == 0 { + return protoreflect.ValueOfList(&_QueryTunnelsResponse_1_list{}) + } + listValue := &_QueryTunnelsResponse_1_list{list: &x.Tunnels} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse 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_QueryTunnelsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + lv := value.List() + clv := lv.(*_QueryTunnelsResponse_1_list) + x.Tunnels = *clv.list + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse 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_QueryTunnelsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + if x.Tunnels == nil { + x.Tunnels = []*Tunnel{} + } + value := &_QueryTunnelsResponse_1_list{list: &x.Tunnels} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse 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_QueryTunnelsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + list := []*Tunnel{} + return protoreflect.ValueOfList(&_QueryTunnelsResponse_1_list{list: &list}) + case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse 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_QueryTunnelsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelsResponse", 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_QueryTunnelsResponse) 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_QueryTunnelsResponse) 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_QueryTunnelsResponse) 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_QueryTunnelsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryTunnelsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Tunnels) > 0 { + for _, e := range x.Tunnels { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryTunnelsResponse) + 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 x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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.Tunnels) > 0 { + for iNdEx := len(x.Tunnels) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Tunnels[iNdEx]) + 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().(*QueryTunnelsResponse) + 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: QueryTunnelsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelsResponse: 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 Tunnels", 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 + } + x.Tunnels = append(x.Tunnels, &Tunnel{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tunnels[len(x.Tunnels)-1]); 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 Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_QueryTunnelRequest protoreflect.MessageDescriptor + fd_QueryTunnelRequest_tunnel_id protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryTunnelRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelRequest") + fd_QueryTunnelRequest_tunnel_id = md_QueryTunnelRequest.Fields().ByName("tunnel_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryTunnelRequest)(nil) + +type fastReflection_QueryTunnelRequest QueryTunnelRequest + +func (x *QueryTunnelRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTunnelRequest)(x) +} + +func (x *QueryTunnelRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_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_QueryTunnelRequest_messageType fastReflection_QueryTunnelRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryTunnelRequest_messageType{} + +type fastReflection_QueryTunnelRequest_messageType struct{} + +func (x fastReflection_QueryTunnelRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTunnelRequest)(nil) +} +func (x fastReflection_QueryTunnelRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTunnelRequest) +} +func (x fastReflection_QueryTunnelRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryTunnelRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelRequest +} + +// 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_QueryTunnelRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryTunnelRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryTunnelRequest) New() protoreflect.Message { + return new(fastReflection_QueryTunnelRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryTunnelRequest) Interface() protoreflect.ProtoMessage { + return (*QueryTunnelRequest)(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_QueryTunnelRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryTunnelRequest_tunnel_id, 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_QueryTunnelRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + return x.TunnelId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest 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_QueryTunnelRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + x.TunnelId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest 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_QueryTunnelRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest 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_QueryTunnelRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + x.TunnelId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest 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_QueryTunnelRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryTunnelRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest 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_QueryTunnelRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest 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_QueryTunnelRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelRequest", 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_QueryTunnelRequest) 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_QueryTunnelRequest) 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_QueryTunnelRequest) 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_QueryTunnelRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryTunnelRequest) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + 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().(*QueryTunnelRequest) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*QueryTunnelRequest) + 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: QueryTunnelRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_QueryTunnelResponse protoreflect.MessageDescriptor + fd_QueryTunnelResponse_tunnel protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryTunnelResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelResponse") + fd_QueryTunnelResponse_tunnel = md_QueryTunnelResponse.Fields().ByName("tunnel") +} + +var _ protoreflect.Message = (*fastReflection_QueryTunnelResponse)(nil) + +type fastReflection_QueryTunnelResponse QueryTunnelResponse + +func (x *QueryTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTunnelResponse)(x) +} + +func (x *QueryTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_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_QueryTunnelResponse_messageType fastReflection_QueryTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryTunnelResponse_messageType{} + +type fastReflection_QueryTunnelResponse_messageType struct{} + +func (x fastReflection_QueryTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTunnelResponse)(nil) +} +func (x fastReflection_QueryTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTunnelResponse) +} +func (x fastReflection_QueryTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTunnelResponse +} + +// 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_QueryTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryTunnelResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryTunnelResponse) New() protoreflect.Message { + return new(fastReflection_QueryTunnelResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*QueryTunnelResponse)(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_QueryTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Tunnel != nil { + value := protoreflect.ValueOfMessage(x.Tunnel.ProtoReflect()) + if !f(fd_QueryTunnelResponse_tunnel, 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_QueryTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + return x.Tunnel != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse 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_QueryTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + x.Tunnel = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse 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_QueryTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + value := x.Tunnel + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse 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_QueryTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + x.Tunnel = value.Message().Interface().(*Tunnel) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse 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_QueryTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + if x.Tunnel == nil { + x.Tunnel = new(Tunnel) + } + return protoreflect.ValueOfMessage(x.Tunnel.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse 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_QueryTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + m := new(Tunnel) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse 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_QueryTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelResponse", 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_QueryTunnelResponse) 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_QueryTunnelResponse) 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_QueryTunnelResponse) 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_QueryTunnelResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryTunnelResponse) + 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.Tunnel != nil { + l = options.Size(x.Tunnel) + 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().(*QueryTunnelResponse) + 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 x.Tunnel != nil { + encoded, err := options.Marshal(x.Tunnel) + 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().(*QueryTunnelResponse) + 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: QueryTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTunnelResponse: 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 Tunnel", 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.Tunnel == nil { + x.Tunnel = &Tunnel{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Tunnel); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_QueryDepositsRequest protoreflect.MessageDescriptor + fd_QueryDepositsRequest_tunnel_id protoreflect.FieldDescriptor + fd_QueryDepositsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryDepositsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositsRequest") + fd_QueryDepositsRequest_tunnel_id = md_QueryDepositsRequest.Fields().ByName("tunnel_id") + fd_QueryDepositsRequest_pagination = md_QueryDepositsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryDepositsRequest)(nil) + +type fastReflection_QueryDepositsRequest QueryDepositsRequest + +func (x *QueryDepositsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDepositsRequest)(x) +} + +func (x *QueryDepositsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[4] + 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_QueryDepositsRequest_messageType fastReflection_QueryDepositsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDepositsRequest_messageType{} + +type fastReflection_QueryDepositsRequest_messageType struct{} + +func (x fastReflection_QueryDepositsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDepositsRequest)(nil) +} +func (x fastReflection_QueryDepositsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDepositsRequest) +} +func (x fastReflection_QueryDepositsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDepositsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositsRequest +} + +// 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_QueryDepositsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDepositsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDepositsRequest) New() protoreflect.Message { + return new(fastReflection_QueryDepositsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDepositsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDepositsRequest)(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_QueryDepositsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryDepositsRequest_tunnel_id, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryDepositsRequest_pagination, 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_QueryDepositsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryDepositsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.QueryDepositsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest 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_QueryDepositsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositsRequest", 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_QueryDepositsRequest) 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_QueryDepositsRequest) 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_QueryDepositsRequest) 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_QueryDepositsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDepositsRequest) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryDepositsRequest) + 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 x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*QueryDepositsRequest) + 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: QueryDepositsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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 _ protoreflect.List = (*_QueryDepositsResponse_1_list)(nil) + +type _QueryDepositsResponse_1_list struct { + list *[]*Deposit +} + +func (x *_QueryDepositsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryDepositsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryDepositsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Deposit) + (*x.list)[i] = concreteValue +} + +func (x *_QueryDepositsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Deposit) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryDepositsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Deposit) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDepositsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryDepositsResponse_1_list) NewElement() protoreflect.Value { + v := new(Deposit) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryDepositsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryDepositsResponse protoreflect.MessageDescriptor + fd_QueryDepositsResponse_deposits protoreflect.FieldDescriptor + fd_QueryDepositsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryDepositsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositsResponse") + fd_QueryDepositsResponse_deposits = md_QueryDepositsResponse.Fields().ByName("deposits") + fd_QueryDepositsResponse_pagination = md_QueryDepositsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryDepositsResponse)(nil) + +type fastReflection_QueryDepositsResponse QueryDepositsResponse + +func (x *QueryDepositsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDepositsResponse)(x) +} + +func (x *QueryDepositsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[5] + 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_QueryDepositsResponse_messageType fastReflection_QueryDepositsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDepositsResponse_messageType{} + +type fastReflection_QueryDepositsResponse_messageType struct{} + +func (x fastReflection_QueryDepositsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDepositsResponse)(nil) +} +func (x fastReflection_QueryDepositsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDepositsResponse) +} +func (x fastReflection_QueryDepositsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDepositsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositsResponse +} + +// 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_QueryDepositsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDepositsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDepositsResponse) New() protoreflect.Message { + return new(fastReflection_QueryDepositsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDepositsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDepositsResponse)(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_QueryDepositsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Deposits) != 0 { + value := protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &x.Deposits}) + if !f(fd_QueryDepositsResponse_deposits, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryDepositsResponse_pagination, 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_QueryDepositsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + return len(x.Deposits) != 0 + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + x.Deposits = nil + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + if len(x.Deposits) == 0 { + return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{}) + } + listValue := &_QueryDepositsResponse_1_list{list: &x.Deposits} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + lv := value.List() + clv := lv.(*_QueryDepositsResponse_1_list) + x.Deposits = *clv.list + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + if x.Deposits == nil { + x.Deposits = []*Deposit{} + } + value := &_QueryDepositsResponse_1_list{list: &x.Deposits} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositsResponse.deposits": + list := []*Deposit{} + return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &list}) + case "tunnel.v1beta1.QueryDepositsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse 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_QueryDepositsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositsResponse", 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_QueryDepositsResponse) 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_QueryDepositsResponse) 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_QueryDepositsResponse) 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_QueryDepositsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDepositsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Deposits) > 0 { + for _, e := range x.Deposits { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryDepositsResponse) + 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 x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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.Deposits) > 0 { + for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Deposits[iNdEx]) + 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().(*QueryDepositsResponse) + 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: QueryDepositsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositsResponse: 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 Deposits", 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 + } + x.Deposits = append(x.Deposits, &Deposit{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposits[len(x.Deposits)-1]); 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 Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_QueryDepositRequest protoreflect.MessageDescriptor + fd_QueryDepositRequest_tunnel_id protoreflect.FieldDescriptor + fd_QueryDepositRequest_depositor protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryDepositRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositRequest") + fd_QueryDepositRequest_tunnel_id = md_QueryDepositRequest.Fields().ByName("tunnel_id") + fd_QueryDepositRequest_depositor = md_QueryDepositRequest.Fields().ByName("depositor") +} + +var _ protoreflect.Message = (*fastReflection_QueryDepositRequest)(nil) + +type fastReflection_QueryDepositRequest QueryDepositRequest + +func (x *QueryDepositRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDepositRequest)(x) +} + +func (x *QueryDepositRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[6] + 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_QueryDepositRequest_messageType fastReflection_QueryDepositRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryDepositRequest_messageType{} + +type fastReflection_QueryDepositRequest_messageType struct{} + +func (x fastReflection_QueryDepositRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDepositRequest)(nil) +} +func (x fastReflection_QueryDepositRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDepositRequest) +} +func (x fastReflection_QueryDepositRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDepositRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositRequest +} + +// 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_QueryDepositRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryDepositRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDepositRequest) New() protoreflect.Message { + return new(fastReflection_QueryDepositRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDepositRequest) Interface() protoreflect.ProtoMessage { + return (*QueryDepositRequest)(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_QueryDepositRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryDepositRequest_tunnel_id, value) { + return + } + } + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_QueryDepositRequest_depositor, 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_QueryDepositRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.QueryDepositRequest.depositor": + return x.Depositor != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest 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_QueryDepositRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.QueryDepositRequest.depositor": + x.Depositor = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest 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_QueryDepositRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.QueryDepositRequest.depositor": + value := x.Depositor + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest 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_QueryDepositRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.QueryDepositRequest.depositor": + x.Depositor = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest 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_QueryDepositRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryDepositRequest is not mutable")) + case "tunnel.v1beta1.QueryDepositRequest.depositor": + panic(fmt.Errorf("field depositor of message tunnel.v1beta1.QueryDepositRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest 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_QueryDepositRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.QueryDepositRequest.depositor": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest 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_QueryDepositRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositRequest", 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_QueryDepositRequest) 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_QueryDepositRequest) 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_QueryDepositRequest) 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_QueryDepositRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDepositRequest) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + l = len(x.Depositor) + 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().(*QueryDepositRequest) + 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.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) + i-- + dAtA[i] = 0x12 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*QueryDepositRequest) + 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: QueryDepositRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = 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_QueryDepositResponse protoreflect.MessageDescriptor + fd_QueryDepositResponse_deposit protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryDepositResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositResponse") + fd_QueryDepositResponse_deposit = md_QueryDepositResponse.Fields().ByName("deposit") +} + +var _ protoreflect.Message = (*fastReflection_QueryDepositResponse)(nil) + +type fastReflection_QueryDepositResponse QueryDepositResponse + +func (x *QueryDepositResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryDepositResponse)(x) +} + +func (x *QueryDepositResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[7] + 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_QueryDepositResponse_messageType fastReflection_QueryDepositResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryDepositResponse_messageType{} + +type fastReflection_QueryDepositResponse_messageType struct{} + +func (x fastReflection_QueryDepositResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryDepositResponse)(nil) +} +func (x fastReflection_QueryDepositResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryDepositResponse) +} +func (x fastReflection_QueryDepositResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryDepositResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryDepositResponse +} + +// 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_QueryDepositResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryDepositResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryDepositResponse) New() protoreflect.Message { + return new(fastReflection_QueryDepositResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryDepositResponse) Interface() protoreflect.ProtoMessage { + return (*QueryDepositResponse)(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_QueryDepositResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Deposit != nil { + value := protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) + if !f(fd_QueryDepositResponse_deposit, 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_QueryDepositResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + return x.Deposit != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse 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_QueryDepositResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + x.Deposit = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse 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_QueryDepositResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + value := x.Deposit + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse 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_QueryDepositResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + x.Deposit = value.Message().Interface().(*Deposit) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse 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_QueryDepositResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + if x.Deposit == nil { + x.Deposit = new(Deposit) + } + return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse 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_QueryDepositResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryDepositResponse.deposit": + m := new(Deposit) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse 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_QueryDepositResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositResponse", 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_QueryDepositResponse) 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_QueryDepositResponse) 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_QueryDepositResponse) 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_QueryDepositResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryDepositResponse) + 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.Deposit != nil { + l = options.Size(x.Deposit) + 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().(*QueryDepositResponse) + 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 x.Deposit != nil { + encoded, err := options.Marshal(x.Deposit) + 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().(*QueryDepositResponse) + 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: QueryDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositResponse: 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 Deposit", 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.Deposit == nil { + x.Deposit = &Deposit{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposit); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_QueryPacketsRequest protoreflect.MessageDescriptor + fd_QueryPacketsRequest_tunnel_id protoreflect.FieldDescriptor + fd_QueryPacketsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryPacketsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketsRequest") + fd_QueryPacketsRequest_tunnel_id = md_QueryPacketsRequest.Fields().ByName("tunnel_id") + fd_QueryPacketsRequest_pagination = md_QueryPacketsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketsRequest)(nil) + +type fastReflection_QueryPacketsRequest QueryPacketsRequest + +func (x *QueryPacketsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketsRequest)(x) +} + +func (x *QueryPacketsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[8] + 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_QueryPacketsRequest_messageType fastReflection_QueryPacketsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketsRequest_messageType{} + +type fastReflection_QueryPacketsRequest_messageType struct{} + +func (x fastReflection_QueryPacketsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketsRequest)(nil) +} +func (x fastReflection_QueryPacketsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketsRequest) +} +func (x fastReflection_QueryPacketsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketsRequest +} + +// 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_QueryPacketsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketsRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketsRequest)(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_QueryPacketsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryPacketsRequest_tunnel_id, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryPacketsRequest_pagination, 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_QueryPacketsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest 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_QueryPacketsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest 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_QueryPacketsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest 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_QueryPacketsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest 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_QueryPacketsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryPacketsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest 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_QueryPacketsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.QueryPacketsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest 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_QueryPacketsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketsRequest", 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_QueryPacketsRequest) 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_QueryPacketsRequest) 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_QueryPacketsRequest) 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_QueryPacketsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketsRequest) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryPacketsRequest) + 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 x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*QueryPacketsRequest) + 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: QueryPacketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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 _ protoreflect.List = (*_QueryPacketsResponse_1_list)(nil) + +type _QueryPacketsResponse_1_list struct { + list *[]*Packet +} + +func (x *_QueryPacketsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryPacketsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryPacketsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Packet) + (*x.list)[i] = concreteValue +} + +func (x *_QueryPacketsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Packet) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryPacketsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(Packet) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPacketsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryPacketsResponse_1_list) NewElement() protoreflect.Value { + v := new(Packet) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPacketsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryPacketsResponse protoreflect.MessageDescriptor + fd_QueryPacketsResponse_packets protoreflect.FieldDescriptor + fd_QueryPacketsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryPacketsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketsResponse") + fd_QueryPacketsResponse_packets = md_QueryPacketsResponse.Fields().ByName("packets") + fd_QueryPacketsResponse_pagination = md_QueryPacketsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketsResponse)(nil) + +type fastReflection_QueryPacketsResponse QueryPacketsResponse + +func (x *QueryPacketsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketsResponse)(x) +} + +func (x *QueryPacketsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[9] + 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_QueryPacketsResponse_messageType fastReflection_QueryPacketsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketsResponse_messageType{} + +type fastReflection_QueryPacketsResponse_messageType struct{} + +func (x fastReflection_QueryPacketsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketsResponse)(nil) +} +func (x fastReflection_QueryPacketsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketsResponse) +} +func (x fastReflection_QueryPacketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketsResponse +} + +// 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_QueryPacketsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketsResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketsResponse)(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_QueryPacketsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Packets) != 0 { + value := protoreflect.ValueOfList(&_QueryPacketsResponse_1_list{list: &x.Packets}) + if !f(fd_QueryPacketsResponse_packets, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryPacketsResponse_pagination, 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_QueryPacketsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + return len(x.Packets) != 0 + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse 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_QueryPacketsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + x.Packets = nil + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse 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_QueryPacketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + if len(x.Packets) == 0 { + return protoreflect.ValueOfList(&_QueryPacketsResponse_1_list{}) + } + listValue := &_QueryPacketsResponse_1_list{list: &x.Packets} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse 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_QueryPacketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + lv := value.List() + clv := lv.(*_QueryPacketsResponse_1_list) + x.Packets = *clv.list + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse 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_QueryPacketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + if x.Packets == nil { + x.Packets = []*Packet{} + } + value := &_QueryPacketsResponse_1_list{list: &x.Packets} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse 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_QueryPacketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketsResponse.packets": + list := []*Packet{} + return protoreflect.ValueOfList(&_QueryPacketsResponse_1_list{list: &list}) + case "tunnel.v1beta1.QueryPacketsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse 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_QueryPacketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketsResponse", 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_QueryPacketsResponse) 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_QueryPacketsResponse) 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_QueryPacketsResponse) 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_QueryPacketsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Packets) > 0 { + for _, e := range x.Packets { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + 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().(*QueryPacketsResponse) + 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 x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + 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.Packets) > 0 { + for iNdEx := len(x.Packets) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Packets[iNdEx]) + 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().(*QueryPacketsResponse) + 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: QueryPacketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketsResponse: 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 Packets", 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 + } + x.Packets = append(x.Packets, &Packet{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Packets[len(x.Packets)-1]); 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 Pagination", 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.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_QueryPacketRequest protoreflect.MessageDescriptor + fd_QueryPacketRequest_tunnel_id protoreflect.FieldDescriptor + fd_QueryPacketRequest_sequence protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryPacketRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketRequest") + fd_QueryPacketRequest_tunnel_id = md_QueryPacketRequest.Fields().ByName("tunnel_id") + fd_QueryPacketRequest_sequence = md_QueryPacketRequest.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketRequest)(nil) + +type fastReflection_QueryPacketRequest QueryPacketRequest + +func (x *QueryPacketRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketRequest)(x) +} + +func (x *QueryPacketRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[10] + 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_QueryPacketRequest_messageType fastReflection_QueryPacketRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketRequest_messageType{} + +type fastReflection_QueryPacketRequest_messageType struct{} + +func (x fastReflection_QueryPacketRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketRequest)(nil) +} +func (x fastReflection_QueryPacketRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketRequest) +} +func (x fastReflection_QueryPacketRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketRequest +} + +// 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_QueryPacketRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketRequest)(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_QueryPacketRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_QueryPacketRequest_tunnel_id, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_QueryPacketRequest_sequence, 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_QueryPacketRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.QueryPacketRequest.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest 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_QueryPacketRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.QueryPacketRequest.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest 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_QueryPacketRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.QueryPacketRequest.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest 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_QueryPacketRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.QueryPacketRequest.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest 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_QueryPacketRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryPacketRequest is not mutable")) + case "tunnel.v1beta1.QueryPacketRequest.sequence": + panic(fmt.Errorf("field sequence of message tunnel.v1beta1.QueryPacketRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest 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_QueryPacketRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.QueryPacketRequest.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest 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_QueryPacketRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketRequest", 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_QueryPacketRequest) 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_QueryPacketRequest) 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_QueryPacketRequest) 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_QueryPacketRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketRequest) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + 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().(*QueryPacketRequest) + 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 x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x10 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*QueryPacketRequest) + 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: QueryPacketRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_QueryPacketResponse protoreflect.MessageDescriptor + fd_QueryPacketResponse_packet protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryPacketResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketResponse") + fd_QueryPacketResponse_packet = md_QueryPacketResponse.Fields().ByName("packet") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketResponse)(nil) + +type fastReflection_QueryPacketResponse QueryPacketResponse + +func (x *QueryPacketResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketResponse)(x) +} + +func (x *QueryPacketResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[11] + 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_QueryPacketResponse_messageType fastReflection_QueryPacketResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketResponse_messageType{} + +type fastReflection_QueryPacketResponse_messageType struct{} + +func (x fastReflection_QueryPacketResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketResponse)(nil) +} +func (x fastReflection_QueryPacketResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketResponse) +} +func (x fastReflection_QueryPacketResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketResponse +} + +// 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_QueryPacketResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketResponse)(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_QueryPacketResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Packet != nil { + value := protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) + if !f(fd_QueryPacketResponse_packet, 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_QueryPacketResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + return x.Packet != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse 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_QueryPacketResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + x.Packet = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse 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_QueryPacketResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + value := x.Packet + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse 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_QueryPacketResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + x.Packet = value.Message().Interface().(*Packet) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse 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_QueryPacketResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + if x.Packet == nil { + x.Packet = new(Packet) + } + return protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse 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_QueryPacketResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryPacketResponse.packet": + m := new(Packet) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse 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_QueryPacketResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketResponse", 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_QueryPacketResponse) 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_QueryPacketResponse) 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_QueryPacketResponse) 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_QueryPacketResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketResponse) + 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.Packet != nil { + l = options.Size(x.Packet) + 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().(*QueryPacketResponse) + 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 x.Packet != nil { + encoded, err := options.Marshal(x.Packet) + 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().(*QueryPacketResponse) + 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: QueryPacketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketResponse: 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 Packet", 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.Packet == nil { + x.Packet = &Packet{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Packet); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryParamsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) + +type fastReflection_QueryParamsRequest QueryParamsRequest + +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) +} + +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[12] + 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_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} + +type fastReflection_QueryParamsRequest_messageType struct{} + +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) +} +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// 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_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(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_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + 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.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().(*QueryParamsRequest) + 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 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().(*QueryParamsRequest) + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_query_proto_init() + md_QueryParamsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[13] + 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_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// 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_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + 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.Params != nil { + l = options.Size(x.Params) + 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().(*QueryParamsResponse) + 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 x.Params != nil { + encoded, err := options.Marshal(x.Params) + 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().(*QueryParamsResponse) + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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: tunnel/v1beta1/query.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) +) + +// TunnelStatusFilter defines a filter for tunnel status. +type TunnelStatusFilter int32 + +const ( + // TUNNEL_STATUS_FILTER_UNSPECIFIED defines an unspecified status. + TunnelStatusFilter_TUNNEL_STATUS_FILTER_UNSPECIFIED TunnelStatusFilter = 0 + // TUNNEL_STATUS_FILTER_ACTIVE defines an active tunnel. + TunnelStatusFilter_TUNNEL_STATUS_FILTER_ACTIVE TunnelStatusFilter = 1 + // TUNNEL_STATUS_FILTER_INACTIVE defines an inactive tunnel. + TunnelStatusFilter_TUNNEL_STATUS_FILTER_INACTIVE TunnelStatusFilter = 2 +) + +// Enum value maps for TunnelStatusFilter. +var ( + TunnelStatusFilter_name = map[int32]string{ + 0: "TUNNEL_STATUS_FILTER_UNSPECIFIED", + 1: "TUNNEL_STATUS_FILTER_ACTIVE", + 2: "TUNNEL_STATUS_FILTER_INACTIVE", + } + TunnelStatusFilter_value = map[string]int32{ + "TUNNEL_STATUS_FILTER_UNSPECIFIED": 0, + "TUNNEL_STATUS_FILTER_ACTIVE": 1, + "TUNNEL_STATUS_FILTER_INACTIVE": 2, + } +) + +func (x TunnelStatusFilter) Enum() *TunnelStatusFilter { + p := new(TunnelStatusFilter) + *p = x + return p +} + +func (x TunnelStatusFilter) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TunnelStatusFilter) Descriptor() protoreflect.EnumDescriptor { + return file_tunnel_v1beta1_query_proto_enumTypes[0].Descriptor() +} + +func (TunnelStatusFilter) Type() protoreflect.EnumType { + return &file_tunnel_v1beta1_query_proto_enumTypes[0] +} + +func (x TunnelStatusFilter) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TunnelStatusFilter.Descriptor instead. +func (TunnelStatusFilter) EnumDescriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{0} +} + +// QueryTunnelsRequest is the request type for the Query/Tunnels RPC method. +type QueryTunnelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // status_filter is a flag to filter tunnels by status. + StatusFilter TunnelStatusFilter `protobuf:"varint,1,opt,name=status_filter,json=statusFilter,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"status_filter,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryTunnelsRequest) Reset() { + *x = QueryTunnelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryTunnelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTunnelsRequest) ProtoMessage() {} + +// Deprecated: Use QueryTunnelsRequest.ProtoReflect.Descriptor instead. +func (*QueryTunnelsRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryTunnelsRequest) GetStatusFilter() TunnelStatusFilter { + if x != nil { + return x.StatusFilter + } + return TunnelStatusFilter_TUNNEL_STATUS_FILTER_UNSPECIFIED +} + +func (x *QueryTunnelsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryTunnelsResponse is the response type for the Query/Tunnels RPC method. +type QueryTunnelsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Tunnels is a list of tunnels. + Tunnels []*Tunnel `protobuf:"bytes,1,rep,name=tunnels,proto3" json:"tunnels,omitempty"` + // pagination defines an optional pagination for the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryTunnelsResponse) Reset() { + *x = QueryTunnelsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryTunnelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTunnelsResponse) ProtoMessage() {} + +// Deprecated: Use QueryTunnelsResponse.ProtoReflect.Descriptor instead. +func (*QueryTunnelsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryTunnelsResponse) GetTunnels() []*Tunnel { + if x != nil { + return x.Tunnels + } + return nil +} + +func (x *QueryTunnelsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryTunnelRequest is the request type for the Query/Tunnel RPC method. +type QueryTunnelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to query. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` +} + +func (x *QueryTunnelRequest) Reset() { + *x = QueryTunnelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryTunnelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTunnelRequest) ProtoMessage() {} + +// Deprecated: Use QueryTunnelRequest.ProtoReflect.Descriptor instead. +func (*QueryTunnelRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryTunnelRequest) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +// QueryTunnelResponse is the response type for the Query/Tunnel RPC method. +type QueryTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel is the tunnel with the given ID. + Tunnel *Tunnel `protobuf:"bytes,1,opt,name=tunnel,proto3" json:"tunnel,omitempty"` +} + +func (x *QueryTunnelResponse) Reset() { + *x = QueryTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTunnelResponse) ProtoMessage() {} + +// Deprecated: Use QueryTunnelResponse.ProtoReflect.Descriptor instead. +func (*QueryTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryTunnelResponse) GetTunnel() *Tunnel { + if x != nil { + return x.Tunnel + } + return nil +} + +// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +type QueryDepositsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to query deposits. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryDepositsRequest) Reset() { + *x = QueryDepositsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDepositsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDepositsRequest) ProtoMessage() {} + +// Deprecated: Use QueryDepositsRequest.ProtoReflect.Descriptor instead. +func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryDepositsRequest) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *QueryDepositsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +type QueryDepositsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // deposits is a list of deposits. + Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"` + // pagination defines an optional pagination for the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryDepositsResponse) Reset() { + *x = QueryDepositsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDepositsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDepositsResponse) ProtoMessage() {} + +// Deprecated: Use QueryDepositsResponse.ProtoReflect.Descriptor instead. +func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryDepositsResponse) GetDeposits() []*Deposit { + if x != nil { + return x.Deposits + } + return nil +} + +func (x *QueryDepositsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryDepositRequest is the request type for the Query/Deposit RPC method. +type QueryDepositRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to query. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // depositor is the address of the depositor to query. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` +} + +func (x *QueryDepositRequest) Reset() { + *x = QueryDepositRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDepositRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDepositRequest) ProtoMessage() {} + +// Deprecated: Use QueryDepositRequest.ProtoReflect.Descriptor instead. +func (*QueryDepositRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryDepositRequest) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *QueryDepositRequest) GetDepositor() string { + if x != nil { + return x.Depositor + } + return "" +} + +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +type QueryDepositResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // deposit is the deposit with the given tunnel ID and depositor address. + Deposit *Deposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` +} + +func (x *QueryDepositResponse) Reset() { + *x = QueryDepositResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDepositResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDepositResponse) ProtoMessage() {} + +// Deprecated: Use QueryDepositResponse.ProtoReflect.Descriptor instead. +func (*QueryDepositResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryDepositResponse) GetDeposit() *Deposit { + if x != nil { + return x.Deposit + } + return nil +} + +// QueryPacketsRequest is the request type for the Query/Packets RPC method. +type QueryPacketsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to query packets. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // pagination defines an optional pagination for the request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryPacketsRequest) Reset() { + *x = QueryPacketsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketsRequest) ProtoMessage() {} + +// Deprecated: Use QueryPacketsRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketsRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryPacketsRequest) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *QueryPacketsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryPacketsResponse is the response type for the Query/Packets RPC method. +type QueryPacketsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // packets is a list of packets. + Packets []*Packet `protobuf:"bytes,1,rep,name=packets,proto3" json:"packets,omitempty"` + // pagination defines an optional pagination for the response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryPacketsResponse) Reset() { + *x = QueryPacketsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketsResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketsResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryPacketsResponse) GetPackets() []*Packet { + if x != nil { + return x.Packets + } + return nil +} + +func (x *QueryPacketsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryPacketRequest is the request type for the Query/Packet RPC method. +type QueryPacketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to query packets. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // sequence is the sequence of the packet to query. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *QueryPacketRequest) Reset() { + *x = QueryPacketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketRequest) ProtoMessage() {} + +// Deprecated: Use QueryPacketRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryPacketRequest) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *QueryPacketRequest) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +// QueryPacketResponse is the response type for the Query/Packet RPC method. +type QueryPacketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // packet is the packet with the given tunnel ID and sequence. + Packet *Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` +} + +func (x *QueryPacketResponse) Reset() { + *x = QueryPacketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryPacketResponse) GetPacket() *Packet { + if x != nil { + return x.Packet + } + return nil +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{12} +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params is the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +var File_tunnel_v1beta1_query_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_query_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, + 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x91, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x31, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x06, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x22, 0x7b, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x95, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, + 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x4f, 0x0a, 0x14, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7a, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, + 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x30, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, 0x12, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x2a, 0x84, 0x01, 0x0a, 0x12, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x20, 0x54, + 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, + 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, + 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x32, 0xba, 0x07, 0x0a, 0x05, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x75, 0x0a, 0x07, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x7e, 0x0a, 0x06, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, + 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, + 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x96, 0x01, 0x0a, + 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x89, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x91, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0x71, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x12, 0x16, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xbc, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tunnel_v1beta1_query_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_query_proto_rawDescData = file_tunnel_v1beta1_query_proto_rawDesc +) + +func file_tunnel_v1beta1_query_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_query_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_query_proto_rawDescData) + }) + return file_tunnel_v1beta1_query_proto_rawDescData +} + +var file_tunnel_v1beta1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_tunnel_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_tunnel_v1beta1_query_proto_goTypes = []interface{}{ + (TunnelStatusFilter)(0), // 0: tunnel.v1beta1.TunnelStatusFilter + (*QueryTunnelsRequest)(nil), // 1: tunnel.v1beta1.QueryTunnelsRequest + (*QueryTunnelsResponse)(nil), // 2: tunnel.v1beta1.QueryTunnelsResponse + (*QueryTunnelRequest)(nil), // 3: tunnel.v1beta1.QueryTunnelRequest + (*QueryTunnelResponse)(nil), // 4: tunnel.v1beta1.QueryTunnelResponse + (*QueryDepositsRequest)(nil), // 5: tunnel.v1beta1.QueryDepositsRequest + (*QueryDepositsResponse)(nil), // 6: tunnel.v1beta1.QueryDepositsResponse + (*QueryDepositRequest)(nil), // 7: tunnel.v1beta1.QueryDepositRequest + (*QueryDepositResponse)(nil), // 8: tunnel.v1beta1.QueryDepositResponse + (*QueryPacketsRequest)(nil), // 9: tunnel.v1beta1.QueryPacketsRequest + (*QueryPacketsResponse)(nil), // 10: tunnel.v1beta1.QueryPacketsResponse + (*QueryPacketRequest)(nil), // 11: tunnel.v1beta1.QueryPacketRequest + (*QueryPacketResponse)(nil), // 12: tunnel.v1beta1.QueryPacketResponse + (*QueryParamsRequest)(nil), // 13: tunnel.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 14: tunnel.v1beta1.QueryParamsResponse + (*v1beta1.PageRequest)(nil), // 15: cosmos.base.query.v1beta1.PageRequest + (*Tunnel)(nil), // 16: tunnel.v1beta1.Tunnel + (*v1beta1.PageResponse)(nil), // 17: cosmos.base.query.v1beta1.PageResponse + (*Deposit)(nil), // 18: tunnel.v1beta1.Deposit + (*Packet)(nil), // 19: tunnel.v1beta1.Packet + (*Params)(nil), // 20: tunnel.v1beta1.Params +} +var file_tunnel_v1beta1_query_proto_depIdxs = []int32{ + 0, // 0: tunnel.v1beta1.QueryTunnelsRequest.status_filter:type_name -> tunnel.v1beta1.TunnelStatusFilter + 15, // 1: tunnel.v1beta1.QueryTunnelsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 16, // 2: tunnel.v1beta1.QueryTunnelsResponse.tunnels:type_name -> tunnel.v1beta1.Tunnel + 17, // 3: tunnel.v1beta1.QueryTunnelsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 16, // 4: tunnel.v1beta1.QueryTunnelResponse.tunnel:type_name -> tunnel.v1beta1.Tunnel + 15, // 5: tunnel.v1beta1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 6: tunnel.v1beta1.QueryDepositsResponse.deposits:type_name -> tunnel.v1beta1.Deposit + 17, // 7: tunnel.v1beta1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 18, // 8: tunnel.v1beta1.QueryDepositResponse.deposit:type_name -> tunnel.v1beta1.Deposit + 15, // 9: tunnel.v1beta1.QueryPacketsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 19, // 10: tunnel.v1beta1.QueryPacketsResponse.packets:type_name -> tunnel.v1beta1.Packet + 17, // 11: tunnel.v1beta1.QueryPacketsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 19, // 12: tunnel.v1beta1.QueryPacketResponse.packet:type_name -> tunnel.v1beta1.Packet + 20, // 13: tunnel.v1beta1.QueryParamsResponse.params:type_name -> tunnel.v1beta1.Params + 1, // 14: tunnel.v1beta1.Query.Tunnels:input_type -> tunnel.v1beta1.QueryTunnelsRequest + 3, // 15: tunnel.v1beta1.Query.Tunnel:input_type -> tunnel.v1beta1.QueryTunnelRequest + 5, // 16: tunnel.v1beta1.Query.Deposits:input_type -> tunnel.v1beta1.QueryDepositsRequest + 7, // 17: tunnel.v1beta1.Query.Deposit:input_type -> tunnel.v1beta1.QueryDepositRequest + 9, // 18: tunnel.v1beta1.Query.Packets:input_type -> tunnel.v1beta1.QueryPacketsRequest + 11, // 19: tunnel.v1beta1.Query.Packet:input_type -> tunnel.v1beta1.QueryPacketRequest + 13, // 20: tunnel.v1beta1.Query.Params:input_type -> tunnel.v1beta1.QueryParamsRequest + 2, // 21: tunnel.v1beta1.Query.Tunnels:output_type -> tunnel.v1beta1.QueryTunnelsResponse + 4, // 22: tunnel.v1beta1.Query.Tunnel:output_type -> tunnel.v1beta1.QueryTunnelResponse + 6, // 23: tunnel.v1beta1.Query.Deposits:output_type -> tunnel.v1beta1.QueryDepositsResponse + 8, // 24: tunnel.v1beta1.Query.Deposit:output_type -> tunnel.v1beta1.QueryDepositResponse + 10, // 25: tunnel.v1beta1.Query.Packets:output_type -> tunnel.v1beta1.QueryPacketsResponse + 12, // 26: tunnel.v1beta1.Query.Packet:output_type -> tunnel.v1beta1.QueryPacketResponse + 14, // 27: tunnel.v1beta1.Query.Params:output_type -> tunnel.v1beta1.QueryParamsResponse + 21, // [21:28] is the sub-list for method output_type + 14, // [14:21] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_tunnel_v1beta1_query_proto_init() } +func file_tunnel_v1beta1_query_proto_init() { + if File_tunnel_v1beta1_query_proto != nil { + return + } + file_tunnel_v1beta1_params_proto_init() + file_tunnel_v1beta1_tunnel_proto_init() + if !protoimpl.UnsafeEnabled { + file_tunnel_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTunnelsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTunnelsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTunnelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTunnelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDepositsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDepositsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDepositRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDepositResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); 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_tunnel_v1beta1_query_proto_rawDesc, + NumEnums: 1, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tunnel_v1beta1_query_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_query_proto_depIdxs, + EnumInfos: file_tunnel_v1beta1_query_proto_enumTypes, + MessageInfos: file_tunnel_v1beta1_query_proto_msgTypes, + }.Build() + File_tunnel_v1beta1_query_proto = out.File + file_tunnel_v1beta1_query_proto_rawDesc = nil + file_tunnel_v1beta1_query_proto_goTypes = nil + file_tunnel_v1beta1_query_proto_depIdxs = nil +} diff --git a/api/tunnel/v1beta1/query_grpc.pb.go b/api/tunnel/v1beta1/query_grpc.pb.go new file mode 100644 index 000000000..7d905fbe8 --- /dev/null +++ b/api/tunnel/v1beta1/query_grpc.pb.go @@ -0,0 +1,345 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: tunnel/v1beta1/query.proto + +package tunnelv1beta1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_Tunnels_FullMethodName = "/tunnel.v1beta1.Query/Tunnels" + Query_Tunnel_FullMethodName = "/tunnel.v1beta1.Query/Tunnel" + Query_Deposits_FullMethodName = "/tunnel.v1beta1.Query/Deposits" + Query_Deposit_FullMethodName = "/tunnel.v1beta1.Query/Deposit" + Query_Packets_FullMethodName = "/tunnel.v1beta1.Query/Packets" + Query_Packet_FullMethodName = "/tunnel.v1beta1.Query/Packet" + Query_Params_FullMethodName = "/tunnel.v1beta1.Query/Params" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // Tunnels is a RPC method that returns all tunnels. + Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) + // Tunnel is a RPC method that returns a tunnel by its ID. + Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) + // Deposits queries all deposits of a single tunnel. + Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) + // Deposit queries single deposit information based tunnelID, depositAddr. + Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) + // Packets is a RPC method that returns all packets of a tunnel. + Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) + // Packet is a RPC method that returns a packet by its tunnel ID and sequence. + Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) + // Params is a RPC method that returns all parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) { + out := new(QueryTunnelsResponse) + err := c.cc.Invoke(ctx, Query_Tunnels_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) { + out := new(QueryTunnelResponse) + err := c.cc.Invoke(ctx, Query_Tunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) { + out := new(QueryDepositsResponse) + err := c.cc.Invoke(ctx, Query_Deposits_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) { + out := new(QueryDepositResponse) + err := c.cc.Invoke(ctx, Query_Deposit_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) { + out := new(QueryPacketsResponse) + err := c.cc.Invoke(ctx, Query_Packets_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) { + out := new(QueryPacketResponse) + err := c.cc.Invoke(ctx, Query_Packet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // Tunnels is a RPC method that returns all tunnels. + Tunnels(context.Context, *QueryTunnelsRequest) (*QueryTunnelsResponse, error) + // Tunnel is a RPC method that returns a tunnel by its ID. + Tunnel(context.Context, *QueryTunnelRequest) (*QueryTunnelResponse, error) + // Deposits queries all deposits of a single tunnel. + Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) + // Deposit queries single deposit information based tunnelID, depositAddr. + Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) + // Packets is a RPC method that returns all packets of a tunnel. + Packets(context.Context, *QueryPacketsRequest) (*QueryPacketsResponse, error) + // Packet is a RPC method that returns a packet by its tunnel ID and sequence. + Packet(context.Context, *QueryPacketRequest) (*QueryPacketResponse, error) + // Params is a RPC method that returns all parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Tunnels(context.Context, *QueryTunnelsRequest) (*QueryTunnelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tunnels not implemented") +} +func (UnimplementedQueryServer) Tunnel(context.Context, *QueryTunnelRequest) (*QueryTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Tunnel not implemented") +} +func (UnimplementedQueryServer) Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposits not implemented") +} +func (UnimplementedQueryServer) Deposit(context.Context, *QueryDepositRequest) (*QueryDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") +} +func (UnimplementedQueryServer) Packets(context.Context, *QueryPacketsRequest) (*QueryPacketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Packets not implemented") +} +func (UnimplementedQueryServer) Packet(context.Context, *QueryPacketRequest) (*QueryPacketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Packet not implemented") +} +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Tunnels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTunnelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Tunnels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Tunnels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Tunnels(ctx, req.(*QueryTunnelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Tunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTunnelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Tunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Tunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Tunnel(ctx, req.(*QueryTunnelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Deposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Deposits_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deposits(ctx, req.(*QueryDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Deposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Deposit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Deposit(ctx, req.(*QueryDepositRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Packets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Packets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Packets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Packets(ctx, req.(*QueryPacketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Packet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Packet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Packet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Packet(ctx, req.(*QueryPacketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tunnel.v1beta1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Tunnels", + Handler: _Query_Tunnels_Handler, + }, + { + MethodName: "Tunnel", + Handler: _Query_Tunnel_Handler, + }, + { + MethodName: "Deposits", + Handler: _Query_Deposits_Handler, + }, + { + MethodName: "Deposit", + Handler: _Query_Deposit_Handler, + }, + { + MethodName: "Packets", + Handler: _Query_Packets_Handler, + }, + { + MethodName: "Packet", + Handler: _Query_Packet_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tunnel/v1beta1/query.proto", +} diff --git a/api/tunnel/v1beta1/tunnel.pulsar.go b/api/tunnel/v1beta1/tunnel.pulsar.go new file mode 100644 index 000000000..3fe45e870 --- /dev/null +++ b/api/tunnel/v1beta1/tunnel.pulsar.go @@ -0,0 +1,6529 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tunnelv1beta1 + +import ( + _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + _ "github.com/bandprotocol/chain/v3/api/feeds/v1beta1" + _ "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_TSSRoute protoreflect.MessageDescriptor + fd_TSSRoute_destination_chain_id protoreflect.FieldDescriptor + fd_TSSRoute_destination_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_TSSRoute = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSRoute") + fd_TSSRoute_destination_chain_id = md_TSSRoute.Fields().ByName("destination_chain_id") + fd_TSSRoute_destination_contract_address = md_TSSRoute.Fields().ByName("destination_contract_address") +} + +var _ protoreflect.Message = (*fastReflection_TSSRoute)(nil) + +type fastReflection_TSSRoute TSSRoute + +func (x *TSSRoute) ProtoReflect() protoreflect.Message { + return (*fastReflection_TSSRoute)(x) +} + +func (x *TSSRoute) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_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_TSSRoute_messageType fastReflection_TSSRoute_messageType +var _ protoreflect.MessageType = fastReflection_TSSRoute_messageType{} + +type fastReflection_TSSRoute_messageType struct{} + +func (x fastReflection_TSSRoute_messageType) Zero() protoreflect.Message { + return (*fastReflection_TSSRoute)(nil) +} +func (x fastReflection_TSSRoute_messageType) New() protoreflect.Message { + return new(fastReflection_TSSRoute) +} +func (x fastReflection_TSSRoute_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TSSRoute +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TSSRoute) Descriptor() protoreflect.MessageDescriptor { + return md_TSSRoute +} + +// 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_TSSRoute) Type() protoreflect.MessageType { + return _fastReflection_TSSRoute_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TSSRoute) New() protoreflect.Message { + return new(fastReflection_TSSRoute) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TSSRoute) Interface() protoreflect.ProtoMessage { + return (*TSSRoute)(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_TSSRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_TSSRoute_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_TSSRoute_destination_contract_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_TSSRoute) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + return x.DestinationChainId != "" + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + return x.DestinationContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + x.DestinationChainId = "" + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + x.DestinationContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message tunnel.v1beta1.TSSRoute is not mutable")) + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message tunnel.v1beta1.TSSRoute is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TSSRoute.destination_chain_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.TSSRoute.destination_contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute 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_TSSRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TSSRoute", 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_TSSRoute) 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_TSSRoute) 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_TSSRoute) 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_TSSRoute) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TSSRoute) + 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.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + 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().(*TSSRoute) + 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.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + 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().(*TSSRoute) + 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: TSSRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRoute: 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 DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = 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_SignalDeviation protoreflect.MessageDescriptor + fd_SignalDeviation_signal_id protoreflect.FieldDescriptor + fd_SignalDeviation_soft_deviation_bps protoreflect.FieldDescriptor + fd_SignalDeviation_hard_deviation_bps protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_SignalDeviation = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalDeviation") + fd_SignalDeviation_signal_id = md_SignalDeviation.Fields().ByName("signal_id") + fd_SignalDeviation_soft_deviation_bps = md_SignalDeviation.Fields().ByName("soft_deviation_bps") + fd_SignalDeviation_hard_deviation_bps = md_SignalDeviation.Fields().ByName("hard_deviation_bps") +} + +var _ protoreflect.Message = (*fastReflection_SignalDeviation)(nil) + +type fastReflection_SignalDeviation SignalDeviation + +func (x *SignalDeviation) ProtoReflect() protoreflect.Message { + return (*fastReflection_SignalDeviation)(x) +} + +func (x *SignalDeviation) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_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_SignalDeviation_messageType fastReflection_SignalDeviation_messageType +var _ protoreflect.MessageType = fastReflection_SignalDeviation_messageType{} + +type fastReflection_SignalDeviation_messageType struct{} + +func (x fastReflection_SignalDeviation_messageType) Zero() protoreflect.Message { + return (*fastReflection_SignalDeviation)(nil) +} +func (x fastReflection_SignalDeviation_messageType) New() protoreflect.Message { + return new(fastReflection_SignalDeviation) +} +func (x fastReflection_SignalDeviation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SignalDeviation +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SignalDeviation) Descriptor() protoreflect.MessageDescriptor { + return md_SignalDeviation +} + +// 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_SignalDeviation) Type() protoreflect.MessageType { + return _fastReflection_SignalDeviation_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SignalDeviation) New() protoreflect.Message { + return new(fastReflection_SignalDeviation) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SignalDeviation) Interface() protoreflect.ProtoMessage { + return (*SignalDeviation)(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_SignalDeviation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SignalId != "" { + value := protoreflect.ValueOfString(x.SignalId) + if !f(fd_SignalDeviation_signal_id, value) { + return + } + } + if x.SoftDeviationBps != uint64(0) { + value := protoreflect.ValueOfUint64(x.SoftDeviationBps) + if !f(fd_SignalDeviation_soft_deviation_bps, value) { + return + } + } + if x.HardDeviationBps != uint64(0) { + value := protoreflect.ValueOfUint64(x.HardDeviationBps) + if !f(fd_SignalDeviation_hard_deviation_bps, 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_SignalDeviation) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + return x.SignalId != "" + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + return x.SoftDeviationBps != uint64(0) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + return x.HardDeviationBps != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + x.SignalId = "" + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + x.SoftDeviationBps = uint64(0) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + x.HardDeviationBps = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + value := x.SignalId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + value := x.SoftDeviationBps + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + value := x.HardDeviationBps + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + x.SignalId = value.Interface().(string) + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + x.SoftDeviationBps = value.Uint() + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + x.HardDeviationBps = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + panic(fmt.Errorf("field signal_id of message tunnel.v1beta1.SignalDeviation is not mutable")) + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + panic(fmt.Errorf("field soft_deviation_bps of message tunnel.v1beta1.SignalDeviation is not mutable")) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + panic(fmt.Errorf("field hard_deviation_bps of message tunnel.v1beta1.SignalDeviation is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.SignalDeviation.signal_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation 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_SignalDeviation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.SignalDeviation", 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_SignalDeviation) 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_SignalDeviation) 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_SignalDeviation) 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_SignalDeviation) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SignalDeviation) + 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.SignalId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.SoftDeviationBps != 0 { + n += 1 + runtime.Sov(uint64(x.SoftDeviationBps)) + } + if x.HardDeviationBps != 0 { + n += 1 + runtime.Sov(uint64(x.HardDeviationBps)) + } + 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().(*SignalDeviation) + 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 x.HardDeviationBps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.HardDeviationBps)) + i-- + dAtA[i] = 0x18 + } + if x.SoftDeviationBps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SoftDeviationBps)) + i-- + dAtA[i] = 0x10 + } + if len(x.SignalId) > 0 { + i -= len(x.SignalId) + copy(dAtA[i:], x.SignalId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignalId))) + 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().(*SignalDeviation) + 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: SignalDeviation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignalDeviation: 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 SignalId", 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.SignalId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBps", wireType) + } + x.SoftDeviationBps = 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.SoftDeviationBps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBps", wireType) + } + x.HardDeviationBps = 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.HardDeviationBps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 _ protoreflect.List = (*_Deposit_3_list)(nil) + +type _Deposit_3_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Deposit_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Deposit_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Deposit_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Deposit_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Deposit_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Deposit_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Deposit_3_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Deposit_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Deposit protoreflect.MessageDescriptor + fd_Deposit_tunnel_id protoreflect.FieldDescriptor + fd_Deposit_depositor protoreflect.FieldDescriptor + fd_Deposit_amount protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_Deposit = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Deposit") + fd_Deposit_tunnel_id = md_Deposit.Fields().ByName("tunnel_id") + fd_Deposit_depositor = md_Deposit.Fields().ByName("depositor") + fd_Deposit_amount = md_Deposit.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_Deposit)(nil) + +type fastReflection_Deposit Deposit + +func (x *Deposit) ProtoReflect() protoreflect.Message { + return (*fastReflection_Deposit)(x) +} + +func (x *Deposit) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_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_Deposit_messageType fastReflection_Deposit_messageType +var _ protoreflect.MessageType = fastReflection_Deposit_messageType{} + +type fastReflection_Deposit_messageType struct{} + +func (x fastReflection_Deposit_messageType) Zero() protoreflect.Message { + return (*fastReflection_Deposit)(nil) +} +func (x fastReflection_Deposit_messageType) New() protoreflect.Message { + return new(fastReflection_Deposit) +} +func (x fastReflection_Deposit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Deposit +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Deposit) Descriptor() protoreflect.MessageDescriptor { + return md_Deposit +} + +// 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_Deposit) Type() protoreflect.MessageType { + return _fastReflection_Deposit_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Deposit) New() protoreflect.Message { + return new(fastReflection_Deposit) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Deposit) Interface() protoreflect.ProtoMessage { + return (*Deposit)(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_Deposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_Deposit_tunnel_id, value) { + return + } + } + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_Deposit_depositor, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_Deposit_3_list{list: &x.Amount}) + if !f(fd_Deposit_amount, 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_Deposit) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.Deposit.depositor": + return x.Depositor != "" + case "tunnel.v1beta1.Deposit.amount": + return len(x.Amount) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.Deposit.depositor": + x.Depositor = "" + case "tunnel.v1beta1.Deposit.amount": + x.Amount = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Deposit.depositor": + value := x.Depositor + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.Deposit.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_Deposit_3_list{}) + } + listValue := &_Deposit_3_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.Deposit.depositor": + x.Depositor = value.Interface().(string) + case "tunnel.v1beta1.Deposit.amount": + lv := value.List() + clv := lv.(*_Deposit_3_list) + x.Amount = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_Deposit_3_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Deposit.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.Deposit is not mutable")) + case "tunnel.v1beta1.Deposit.depositor": + panic(fmt.Errorf("field depositor of message tunnel.v1beta1.Deposit is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Deposit.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Deposit.depositor": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.Deposit.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Deposit_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Deposit 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_Deposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Deposit", 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_Deposit) 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_Deposit) 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_Deposit) 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_Deposit) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Deposit) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + l = len(x.Depositor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + 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().(*Deposit) + 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.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + 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 len(x.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) + i-- + dAtA[i] = 0x12 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*Deposit) + 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: Deposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = 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 Amount", 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 + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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 _ protoreflect.List = (*_Tunnel_6_list)(nil) + +type _Tunnel_6_list struct { + list *[]*SignalDeviation +} + +func (x *_Tunnel_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Tunnel_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Tunnel_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + (*x.list)[i] = concreteValue +} + +func (x *_Tunnel_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Tunnel_6_list) AppendMutable() protoreflect.Value { + v := new(SignalDeviation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Tunnel_6_list) NewElement() protoreflect.Value { + v := new(SignalDeviation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Tunnel_8_list)(nil) + +type _Tunnel_8_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Tunnel_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Tunnel_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Tunnel_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Tunnel_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Tunnel_8_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Tunnel_8_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_8_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Tunnel protoreflect.MessageDescriptor + fd_Tunnel_id protoreflect.FieldDescriptor + fd_Tunnel_sequence protoreflect.FieldDescriptor + fd_Tunnel_route protoreflect.FieldDescriptor + fd_Tunnel_encoder protoreflect.FieldDescriptor + fd_Tunnel_fee_payer protoreflect.FieldDescriptor + fd_Tunnel_signal_deviations protoreflect.FieldDescriptor + fd_Tunnel_interval protoreflect.FieldDescriptor + fd_Tunnel_total_deposit protoreflect.FieldDescriptor + fd_Tunnel_is_active protoreflect.FieldDescriptor + fd_Tunnel_created_at protoreflect.FieldDescriptor + fd_Tunnel_creator protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_Tunnel = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Tunnel") + fd_Tunnel_id = md_Tunnel.Fields().ByName("id") + fd_Tunnel_sequence = md_Tunnel.Fields().ByName("sequence") + fd_Tunnel_route = md_Tunnel.Fields().ByName("route") + fd_Tunnel_encoder = md_Tunnel.Fields().ByName("encoder") + fd_Tunnel_fee_payer = md_Tunnel.Fields().ByName("fee_payer") + fd_Tunnel_signal_deviations = md_Tunnel.Fields().ByName("signal_deviations") + fd_Tunnel_interval = md_Tunnel.Fields().ByName("interval") + fd_Tunnel_total_deposit = md_Tunnel.Fields().ByName("total_deposit") + fd_Tunnel_is_active = md_Tunnel.Fields().ByName("is_active") + fd_Tunnel_created_at = md_Tunnel.Fields().ByName("created_at") + fd_Tunnel_creator = md_Tunnel.Fields().ByName("creator") +} + +var _ protoreflect.Message = (*fastReflection_Tunnel)(nil) + +type fastReflection_Tunnel Tunnel + +func (x *Tunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_Tunnel)(x) +} + +func (x *Tunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_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_Tunnel_messageType fastReflection_Tunnel_messageType +var _ protoreflect.MessageType = fastReflection_Tunnel_messageType{} + +type fastReflection_Tunnel_messageType struct{} + +func (x fastReflection_Tunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_Tunnel)(nil) +} +func (x fastReflection_Tunnel_messageType) New() protoreflect.Message { + return new(fastReflection_Tunnel) +} +func (x fastReflection_Tunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Tunnel +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Tunnel) Descriptor() protoreflect.MessageDescriptor { + return md_Tunnel +} + +// 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_Tunnel) Type() protoreflect.MessageType { + return _fastReflection_Tunnel_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Tunnel) New() protoreflect.Message { + return new(fastReflection_Tunnel) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Tunnel) Interface() protoreflect.ProtoMessage { + return (*Tunnel)(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_Tunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_Tunnel_id, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_Tunnel_sequence, value) { + return + } + } + if x.Route != nil { + value := protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + if !f(fd_Tunnel_route, value) { + return + } + } + if x.Encoder != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoder)) + if !f(fd_Tunnel_encoder, value) { + return + } + } + if x.FeePayer != "" { + value := protoreflect.ValueOfString(x.FeePayer) + if !f(fd_Tunnel_fee_payer, value) { + return + } + } + if len(x.SignalDeviations) != 0 { + value := protoreflect.ValueOfList(&_Tunnel_6_list{list: &x.SignalDeviations}) + if !f(fd_Tunnel_signal_deviations, value) { + return + } + } + if x.Interval != uint64(0) { + value := protoreflect.ValueOfUint64(x.Interval) + if !f(fd_Tunnel_interval, value) { + return + } + } + if len(x.TotalDeposit) != 0 { + value := protoreflect.ValueOfList(&_Tunnel_8_list{list: &x.TotalDeposit}) + if !f(fd_Tunnel_total_deposit, value) { + return + } + } + if x.IsActive != false { + value := protoreflect.ValueOfBool(x.IsActive) + if !f(fd_Tunnel_is_active, value) { + return + } + } + if x.CreatedAt != int64(0) { + value := protoreflect.ValueOfInt64(x.CreatedAt) + if !f(fd_Tunnel_created_at, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_Tunnel_creator, 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_Tunnel) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.id": + return x.Id != uint64(0) + case "tunnel.v1beta1.Tunnel.sequence": + return x.Sequence != uint64(0) + case "tunnel.v1beta1.Tunnel.route": + return x.Route != nil + case "tunnel.v1beta1.Tunnel.encoder": + return x.Encoder != 0 + case "tunnel.v1beta1.Tunnel.fee_payer": + return x.FeePayer != "" + case "tunnel.v1beta1.Tunnel.signal_deviations": + return len(x.SignalDeviations) != 0 + case "tunnel.v1beta1.Tunnel.interval": + return x.Interval != uint64(0) + case "tunnel.v1beta1.Tunnel.total_deposit": + return len(x.TotalDeposit) != 0 + case "tunnel.v1beta1.Tunnel.is_active": + return x.IsActive != false + case "tunnel.v1beta1.Tunnel.created_at": + return x.CreatedAt != int64(0) + case "tunnel.v1beta1.Tunnel.creator": + return x.Creator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.id": + x.Id = uint64(0) + case "tunnel.v1beta1.Tunnel.sequence": + x.Sequence = uint64(0) + case "tunnel.v1beta1.Tunnel.route": + x.Route = nil + case "tunnel.v1beta1.Tunnel.encoder": + x.Encoder = 0 + case "tunnel.v1beta1.Tunnel.fee_payer": + x.FeePayer = "" + case "tunnel.v1beta1.Tunnel.signal_deviations": + x.SignalDeviations = nil + case "tunnel.v1beta1.Tunnel.interval": + x.Interval = uint64(0) + case "tunnel.v1beta1.Tunnel.total_deposit": + x.TotalDeposit = nil + case "tunnel.v1beta1.Tunnel.is_active": + x.IsActive = false + case "tunnel.v1beta1.Tunnel.created_at": + x.CreatedAt = int64(0) + case "tunnel.v1beta1.Tunnel.creator": + x.Creator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.Tunnel.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Tunnel.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Tunnel.route": + value := x.Route + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tunnel.v1beta1.Tunnel.encoder": + value := x.Encoder + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "tunnel.v1beta1.Tunnel.fee_payer": + value := x.FeePayer + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.Tunnel.signal_deviations": + if len(x.SignalDeviations) == 0 { + return protoreflect.ValueOfList(&_Tunnel_6_list{}) + } + listValue := &_Tunnel_6_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.Tunnel.interval": + value := x.Interval + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Tunnel.total_deposit": + if len(x.TotalDeposit) == 0 { + return protoreflect.ValueOfList(&_Tunnel_8_list{}) + } + listValue := &_Tunnel_8_list{list: &x.TotalDeposit} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.Tunnel.is_active": + value := x.IsActive + return protoreflect.ValueOfBool(value) + case "tunnel.v1beta1.Tunnel.created_at": + value := x.CreatedAt + return protoreflect.ValueOfInt64(value) + case "tunnel.v1beta1.Tunnel.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.id": + x.Id = value.Uint() + case "tunnel.v1beta1.Tunnel.sequence": + x.Sequence = value.Uint() + case "tunnel.v1beta1.Tunnel.route": + x.Route = value.Message().Interface().(*anypb.Any) + case "tunnel.v1beta1.Tunnel.encoder": + x.Encoder = (Encoder)(value.Enum()) + case "tunnel.v1beta1.Tunnel.fee_payer": + x.FeePayer = value.Interface().(string) + case "tunnel.v1beta1.Tunnel.signal_deviations": + lv := value.List() + clv := lv.(*_Tunnel_6_list) + x.SignalDeviations = *clv.list + case "tunnel.v1beta1.Tunnel.interval": + x.Interval = value.Uint() + case "tunnel.v1beta1.Tunnel.total_deposit": + lv := value.List() + clv := lv.(*_Tunnel_8_list) + x.TotalDeposit = *clv.list + case "tunnel.v1beta1.Tunnel.is_active": + x.IsActive = value.Bool() + case "tunnel.v1beta1.Tunnel.created_at": + x.CreatedAt = value.Int() + case "tunnel.v1beta1.Tunnel.creator": + x.Creator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.route": + if x.Route == nil { + x.Route = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + case "tunnel.v1beta1.Tunnel.signal_deviations": + if x.SignalDeviations == nil { + x.SignalDeviations = []*SignalDeviation{} + } + value := &_Tunnel_6_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Tunnel.total_deposit": + if x.TotalDeposit == nil { + x.TotalDeposit = []*v1beta1.Coin{} + } + value := &_Tunnel_8_list{list: &x.TotalDeposit} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Tunnel.id": + panic(fmt.Errorf("field id of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.sequence": + panic(fmt.Errorf("field sequence of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.encoder": + panic(fmt.Errorf("field encoder of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.fee_payer": + panic(fmt.Errorf("field fee_payer of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.interval": + panic(fmt.Errorf("field interval of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.is_active": + panic(fmt.Errorf("field is_active of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.created_at": + panic(fmt.Errorf("field created_at of message tunnel.v1beta1.Tunnel is not mutable")) + case "tunnel.v1beta1.Tunnel.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.Tunnel is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Tunnel.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Tunnel.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Tunnel.route": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tunnel.v1beta1.Tunnel.encoder": + return protoreflect.ValueOfEnum(0) + case "tunnel.v1beta1.Tunnel.fee_payer": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.Tunnel.signal_deviations": + list := []*SignalDeviation{} + return protoreflect.ValueOfList(&_Tunnel_6_list{list: &list}) + case "tunnel.v1beta1.Tunnel.interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Tunnel.total_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Tunnel_8_list{list: &list}) + case "tunnel.v1beta1.Tunnel.is_active": + return protoreflect.ValueOfBool(false) + case "tunnel.v1beta1.Tunnel.created_at": + return protoreflect.ValueOfInt64(int64(0)) + case "tunnel.v1beta1.Tunnel.creator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Tunnel 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_Tunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Tunnel", 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_Tunnel) 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_Tunnel) 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_Tunnel) 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_Tunnel) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Tunnel) + 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.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.Route != nil { + l = options.Size(x.Route) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Encoder != 0 { + n += 1 + runtime.Sov(uint64(x.Encoder)) + } + l = len(x.FeePayer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.SignalDeviations) > 0 { + for _, e := range x.SignalDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Interval != 0 { + n += 1 + runtime.Sov(uint64(x.Interval)) + } + if len(x.TotalDeposit) > 0 { + for _, e := range x.TotalDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.IsActive { + n += 2 + } + if x.CreatedAt != 0 { + n += 1 + runtime.Sov(uint64(x.CreatedAt)) + } + l = len(x.Creator) + 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().(*Tunnel) + 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.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x5a + } + if x.CreatedAt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) + i-- + dAtA[i] = 0x50 + } + if x.IsActive { + i-- + if x.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(x.TotalDeposit) > 0 { + for iNdEx := len(x.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TotalDeposit[iNdEx]) + 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] = 0x42 + } + } + if x.Interval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Interval)) + i-- + dAtA[i] = 0x38 + } + if len(x.SignalDeviations) > 0 { + for iNdEx := len(x.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalDeviations[iNdEx]) + 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] = 0x32 + } + } + if len(x.FeePayer) > 0 { + i -= len(x.FeePayer) + copy(dAtA[i:], x.FeePayer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeePayer))) + i-- + dAtA[i] = 0x2a + } + if x.Encoder != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoder)) + i-- + dAtA[i] = 0x20 + } + if x.Route != nil { + encoded, err := options.Marshal(x.Route) + 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.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x10 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + 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().(*Tunnel) + 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: Tunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Tunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 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.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Route", 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.Route == nil { + x.Route = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Route); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) + } + x.Encoder = 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.Encoder |= Encoder(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 FeePayer", 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.FeePayer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", 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 + } + x.SignalDeviations = append(x.SignalDeviations, &SignalDeviation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalDeviations[len(x.SignalDeviations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + x.Interval = 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.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", 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 + } + x.TotalDeposit = append(x.TotalDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalDeposit[len(x.TotalDeposit)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.IsActive = bool(v != 0) + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + x.CreatedAt = 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.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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 _ protoreflect.List = (*_LatestSignalPrices_2_list)(nil) + +type _LatestSignalPrices_2_list struct { + list *[]*SignalPrice +} + +func (x *_LatestSignalPrices_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_LatestSignalPrices_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_LatestSignalPrices_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalPrice) + (*x.list)[i] = concreteValue +} + +func (x *_LatestSignalPrices_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalPrice) + *x.list = append(*x.list, concreteValue) +} + +func (x *_LatestSignalPrices_2_list) AppendMutable() protoreflect.Value { + v := new(SignalPrice) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_LatestSignalPrices_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_LatestSignalPrices_2_list) NewElement() protoreflect.Value { + v := new(SignalPrice) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_LatestSignalPrices_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_LatestSignalPrices protoreflect.MessageDescriptor + fd_LatestSignalPrices_tunnel_id protoreflect.FieldDescriptor + fd_LatestSignalPrices_signal_prices protoreflect.FieldDescriptor + fd_LatestSignalPrices_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_LatestSignalPrices = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestSignalPrices") + fd_LatestSignalPrices_tunnel_id = md_LatestSignalPrices.Fields().ByName("tunnel_id") + fd_LatestSignalPrices_signal_prices = md_LatestSignalPrices.Fields().ByName("signal_prices") + fd_LatestSignalPrices_timestamp = md_LatestSignalPrices.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_LatestSignalPrices)(nil) + +type fastReflection_LatestSignalPrices LatestSignalPrices + +func (x *LatestSignalPrices) ProtoReflect() protoreflect.Message { + return (*fastReflection_LatestSignalPrices)(x) +} + +func (x *LatestSignalPrices) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[4] + 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_LatestSignalPrices_messageType fastReflection_LatestSignalPrices_messageType +var _ protoreflect.MessageType = fastReflection_LatestSignalPrices_messageType{} + +type fastReflection_LatestSignalPrices_messageType struct{} + +func (x fastReflection_LatestSignalPrices_messageType) Zero() protoreflect.Message { + return (*fastReflection_LatestSignalPrices)(nil) +} +func (x fastReflection_LatestSignalPrices_messageType) New() protoreflect.Message { + return new(fastReflection_LatestSignalPrices) +} +func (x fastReflection_LatestSignalPrices_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LatestSignalPrices +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_LatestSignalPrices) Descriptor() protoreflect.MessageDescriptor { + return md_LatestSignalPrices +} + +// 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_LatestSignalPrices) Type() protoreflect.MessageType { + return _fastReflection_LatestSignalPrices_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_LatestSignalPrices) New() protoreflect.Message { + return new(fastReflection_LatestSignalPrices) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_LatestSignalPrices) Interface() protoreflect.ProtoMessage { + return (*LatestSignalPrices)(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_LatestSignalPrices) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_LatestSignalPrices_tunnel_id, value) { + return + } + } + if len(x.SignalPrices) != 0 { + value := protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &x.SignalPrices}) + if !f(fd_LatestSignalPrices_signal_prices, value) { + return + } + } + if x.Timestamp != int64(0) { + value := protoreflect.ValueOfInt64(x.Timestamp) + if !f(fd_LatestSignalPrices_timestamp, 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_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + return len(x.SignalPrices) != 0 + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + return x.Timestamp != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + x.SignalPrices = nil + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + x.Timestamp = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + if len(x.SignalPrices) == 0 { + return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{}) + } + listValue := &_LatestSignalPrices_2_list{list: &x.SignalPrices} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + value := x.Timestamp + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + lv := value.List() + clv := lv.(*_LatestSignalPrices_2_list) + x.SignalPrices = *clv.list + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + x.Timestamp = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + if x.SignalPrices == nil { + x.SignalPrices = []*SignalPrice{} + } + value := &_LatestSignalPrices_2_list{list: &x.SignalPrices} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.LatestSignalPrices is not mutable")) + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + panic(fmt.Errorf("field timestamp of message tunnel.v1beta1.LatestSignalPrices is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + list := []*SignalPrice{} + return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &list}) + case "tunnel.v1beta1.LatestSignalPrices.timestamp": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + } + panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices 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_LatestSignalPrices) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.LatestSignalPrices", 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_LatestSignalPrices) 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_LatestSignalPrices) 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_LatestSignalPrices) 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_LatestSignalPrices) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*LatestSignalPrices) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.SignalPrices) > 0 { + for _, e := range x.SignalPrices { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Timestamp != 0 { + n += 1 + runtime.Sov(uint64(x.Timestamp)) + } + 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().(*LatestSignalPrices) + 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 x.Timestamp != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) + i-- + dAtA[i] = 0x18 + } + if len(x.SignalPrices) > 0 { + for iNdEx := len(x.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalPrices[iNdEx]) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*LatestSignalPrices) + 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: LatestSignalPrices: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestSignalPrices: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", 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 + } + x.SignalPrices = append(x.SignalPrices, &SignalPrice{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalPrices[len(x.SignalPrices)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + x.Timestamp = 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.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_SignalPrice protoreflect.MessageDescriptor + fd_SignalPrice_signal_id protoreflect.FieldDescriptor + fd_SignalPrice_price protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_SignalPrice = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalPrice") + fd_SignalPrice_signal_id = md_SignalPrice.Fields().ByName("signal_id") + fd_SignalPrice_price = md_SignalPrice.Fields().ByName("price") +} + +var _ protoreflect.Message = (*fastReflection_SignalPrice)(nil) + +type fastReflection_SignalPrice SignalPrice + +func (x *SignalPrice) ProtoReflect() protoreflect.Message { + return (*fastReflection_SignalPrice)(x) +} + +func (x *SignalPrice) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[5] + 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_SignalPrice_messageType fastReflection_SignalPrice_messageType +var _ protoreflect.MessageType = fastReflection_SignalPrice_messageType{} + +type fastReflection_SignalPrice_messageType struct{} + +func (x fastReflection_SignalPrice_messageType) Zero() protoreflect.Message { + return (*fastReflection_SignalPrice)(nil) +} +func (x fastReflection_SignalPrice_messageType) New() protoreflect.Message { + return new(fastReflection_SignalPrice) +} +func (x fastReflection_SignalPrice_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SignalPrice +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SignalPrice) Descriptor() protoreflect.MessageDescriptor { + return md_SignalPrice +} + +// 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_SignalPrice) Type() protoreflect.MessageType { + return _fastReflection_SignalPrice_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SignalPrice) New() protoreflect.Message { + return new(fastReflection_SignalPrice) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SignalPrice) Interface() protoreflect.ProtoMessage { + return (*SignalPrice)(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_SignalPrice) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SignalId != "" { + value := protoreflect.ValueOfString(x.SignalId) + if !f(fd_SignalPrice_signal_id, value) { + return + } + } + if x.Price != uint64(0) { + value := protoreflect.ValueOfUint64(x.Price) + if !f(fd_SignalPrice_price, 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_SignalPrice) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + return x.SignalId != "" + case "tunnel.v1beta1.SignalPrice.price": + return x.Price != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + x.SignalId = "" + case "tunnel.v1beta1.SignalPrice.price": + x.Price = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + value := x.SignalId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.SignalPrice.price": + value := x.Price + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + x.SignalId = value.Interface().(string) + case "tunnel.v1beta1.SignalPrice.price": + x.Price = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + panic(fmt.Errorf("field signal_id of message tunnel.v1beta1.SignalPrice is not mutable")) + case "tunnel.v1beta1.SignalPrice.price": + panic(fmt.Errorf("field price of message tunnel.v1beta1.SignalPrice is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.SignalPrice.signal_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.SignalPrice.price": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + } + panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice 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_SignalPrice) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.SignalPrice", 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_SignalPrice) 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_SignalPrice) 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_SignalPrice) 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_SignalPrice) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SignalPrice) + 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.SignalId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Price != 0 { + n += 1 + runtime.Sov(uint64(x.Price)) + } + 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().(*SignalPrice) + 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 x.Price != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Price)) + i-- + dAtA[i] = 0x10 + } + if len(x.SignalId) > 0 { + i -= len(x.SignalId) + copy(dAtA[i:], x.SignalId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignalId))) + 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().(*SignalPrice) + 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: SignalPrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignalPrice: 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 SignalId", 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.SignalId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + x.Price = 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.Price |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 _ protoreflect.List = (*_TotalFees_1_list)(nil) + +type _TotalFees_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_TotalFees_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_TotalFees_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_TotalFees_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_TotalFees_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_TotalFees_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_TotalFees_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_TotalFees_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_TotalFees_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_TotalFees protoreflect.MessageDescriptor + fd_TotalFees_total_packet_fee protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_TotalFees = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TotalFees") + fd_TotalFees_total_packet_fee = md_TotalFees.Fields().ByName("total_packet_fee") +} + +var _ protoreflect.Message = (*fastReflection_TotalFees)(nil) + +type fastReflection_TotalFees TotalFees + +func (x *TotalFees) ProtoReflect() protoreflect.Message { + return (*fastReflection_TotalFees)(x) +} + +func (x *TotalFees) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[6] + 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_TotalFees_messageType fastReflection_TotalFees_messageType +var _ protoreflect.MessageType = fastReflection_TotalFees_messageType{} + +type fastReflection_TotalFees_messageType struct{} + +func (x fastReflection_TotalFees_messageType) Zero() protoreflect.Message { + return (*fastReflection_TotalFees)(nil) +} +func (x fastReflection_TotalFees_messageType) New() protoreflect.Message { + return new(fastReflection_TotalFees) +} +func (x fastReflection_TotalFees_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TotalFees +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TotalFees) Descriptor() protoreflect.MessageDescriptor { + return md_TotalFees +} + +// 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_TotalFees) Type() protoreflect.MessageType { + return _fastReflection_TotalFees_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TotalFees) New() protoreflect.Message { + return new(fastReflection_TotalFees) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TotalFees) Interface() protoreflect.ProtoMessage { + return (*TotalFees)(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_TotalFees) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.TotalPacketFee) != 0 { + value := protoreflect.ValueOfList(&_TotalFees_1_list{list: &x.TotalPacketFee}) + if !f(fd_TotalFees_total_packet_fee, 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_TotalFees) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + return len(x.TotalPacketFee) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + x.TotalPacketFee = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + if len(x.TotalPacketFee) == 0 { + return protoreflect.ValueOfList(&_TotalFees_1_list{}) + } + listValue := &_TotalFees_1_list{list: &x.TotalPacketFee} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + lv := value.List() + clv := lv.(*_TotalFees_1_list) + x.TotalPacketFee = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + if x.TotalPacketFee == nil { + x.TotalPacketFee = []*v1beta1.Coin{} + } + value := &_TotalFees_1_list{list: &x.TotalPacketFee} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TotalFees.total_packet_fee": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_TotalFees_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TotalFees 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_TotalFees) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TotalFees", 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_TotalFees) 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_TotalFees) 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_TotalFees) 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_TotalFees) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TotalFees) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.TotalPacketFee) > 0 { + for _, e := range x.TotalPacketFee { + l = options.Size(e) + 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().(*TotalFees) + 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.TotalPacketFee) > 0 { + for iNdEx := len(x.TotalPacketFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TotalPacketFee[iNdEx]) + 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().(*TotalFees) + 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: TotalFees: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TotalFees: 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 TotalPacketFee", 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 + } + x.TotalPacketFee = append(x.TotalPacketFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalPacketFee[len(x.TotalPacketFee)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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 _ protoreflect.List = (*_Packet_3_list)(nil) + +type _Packet_3_list struct { + list *[]*SignalPrice +} + +func (x *_Packet_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Packet_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Packet_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalPrice) + (*x.list)[i] = concreteValue +} + +func (x *_Packet_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalPrice) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Packet_3_list) AppendMutable() protoreflect.Value { + v := new(SignalPrice) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Packet_3_list) NewElement() protoreflect.Value { + v := new(SignalPrice) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Packet protoreflect.MessageDescriptor + fd_Packet_tunnel_id protoreflect.FieldDescriptor + fd_Packet_sequence protoreflect.FieldDescriptor + fd_Packet_signal_prices protoreflect.FieldDescriptor + fd_Packet_packet_content protoreflect.FieldDescriptor + fd_Packet_created_at protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_Packet = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Packet") + fd_Packet_tunnel_id = md_Packet.Fields().ByName("tunnel_id") + fd_Packet_sequence = md_Packet.Fields().ByName("sequence") + fd_Packet_signal_prices = md_Packet.Fields().ByName("signal_prices") + fd_Packet_packet_content = md_Packet.Fields().ByName("packet_content") + fd_Packet_created_at = md_Packet.Fields().ByName("created_at") +} + +var _ protoreflect.Message = (*fastReflection_Packet)(nil) + +type fastReflection_Packet Packet + +func (x *Packet) ProtoReflect() protoreflect.Message { + return (*fastReflection_Packet)(x) +} + +func (x *Packet) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[7] + 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_Packet_messageType fastReflection_Packet_messageType +var _ protoreflect.MessageType = fastReflection_Packet_messageType{} + +type fastReflection_Packet_messageType struct{} + +func (x fastReflection_Packet_messageType) Zero() protoreflect.Message { + return (*fastReflection_Packet)(nil) +} +func (x fastReflection_Packet_messageType) New() protoreflect.Message { + return new(fastReflection_Packet) +} +func (x fastReflection_Packet_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Packet +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Packet) Descriptor() protoreflect.MessageDescriptor { + return md_Packet +} + +// 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_Packet) Type() protoreflect.MessageType { + return _fastReflection_Packet_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Packet) New() protoreflect.Message { + return new(fastReflection_Packet) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Packet) Interface() protoreflect.ProtoMessage { + return (*Packet)(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_Packet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_Packet_tunnel_id, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_Packet_sequence, value) { + return + } + } + if len(x.SignalPrices) != 0 { + value := protoreflect.ValueOfList(&_Packet_3_list{list: &x.SignalPrices}) + if !f(fd_Packet_signal_prices, value) { + return + } + } + if x.PacketContent != nil { + value := protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) + if !f(fd_Packet_packet_content, value) { + return + } + } + if x.CreatedAt != int64(0) { + value := protoreflect.ValueOfInt64(x.CreatedAt) + if !f(fd_Packet_created_at, 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_Packet) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.Packet.sequence": + return x.Sequence != uint64(0) + case "tunnel.v1beta1.Packet.signal_prices": + return len(x.SignalPrices) != 0 + case "tunnel.v1beta1.Packet.packet_content": + return x.PacketContent != nil + case "tunnel.v1beta1.Packet.created_at": + return x.CreatedAt != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.Packet.sequence": + x.Sequence = uint64(0) + case "tunnel.v1beta1.Packet.signal_prices": + x.SignalPrices = nil + case "tunnel.v1beta1.Packet.packet_content": + x.PacketContent = nil + case "tunnel.v1beta1.Packet.created_at": + x.CreatedAt = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Packet.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.Packet.signal_prices": + if len(x.SignalPrices) == 0 { + return protoreflect.ValueOfList(&_Packet_3_list{}) + } + listValue := &_Packet_3_list{list: &x.SignalPrices} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.Packet.packet_content": + value := x.PacketContent + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tunnel.v1beta1.Packet.created_at": + value := x.CreatedAt + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.Packet.sequence": + x.Sequence = value.Uint() + case "tunnel.v1beta1.Packet.signal_prices": + lv := value.List() + clv := lv.(*_Packet_3_list) + x.SignalPrices = *clv.list + case "tunnel.v1beta1.Packet.packet_content": + x.PacketContent = value.Message().Interface().(*anypb.Any) + case "tunnel.v1beta1.Packet.created_at": + x.CreatedAt = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.signal_prices": + if x.SignalPrices == nil { + x.SignalPrices = []*SignalPrice{} + } + value := &_Packet_3_list{list: &x.SignalPrices} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.Packet.packet_content": + if x.PacketContent == nil { + x.PacketContent = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) + case "tunnel.v1beta1.Packet.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.Packet is not mutable")) + case "tunnel.v1beta1.Packet.sequence": + panic(fmt.Errorf("field sequence of message tunnel.v1beta1.Packet is not mutable")) + case "tunnel.v1beta1.Packet.created_at": + panic(fmt.Errorf("field created_at of message tunnel.v1beta1.Packet is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.Packet.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Packet.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.Packet.signal_prices": + list := []*SignalPrice{} + return protoreflect.ValueOfList(&_Packet_3_list{list: &list}) + case "tunnel.v1beta1.Packet.packet_content": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tunnel.v1beta1.Packet.created_at": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + } + panic(fmt.Errorf("message tunnel.v1beta1.Packet 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_Packet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Packet", 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_Packet) 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_Packet) 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_Packet) 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_Packet) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Packet) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if len(x.SignalPrices) > 0 { + for _, e := range x.SignalPrices { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.PacketContent != nil { + l = options.Size(x.PacketContent) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.CreatedAt != 0 { + n += 1 + runtime.Sov(uint64(x.CreatedAt)) + } + 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().(*Packet) + 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 x.CreatedAt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) + i-- + dAtA[i] = 0x28 + } + if x.PacketContent != nil { + encoded, err := options.Marshal(x.PacketContent) + 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] = 0x22 + } + if len(x.SignalPrices) > 0 { + for iNdEx := len(x.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalPrices[iNdEx]) + 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.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x10 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*Packet) + 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: Packet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", 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 + } + x.SignalPrices = append(x.SignalPrices, &SignalPrice{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalPrices[len(x.SignalPrices)-1]); 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 PacketContent", 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.PacketContent == nil { + x.PacketContent = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PacketContent); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + x.CreatedAt = 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.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_TSSPacketContent protoreflect.MessageDescriptor + fd_TSSPacketContent_signing_id protoreflect.FieldDescriptor + fd_TSSPacketContent_destination_chain_id protoreflect.FieldDescriptor + fd_TSSPacketContent_destination_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tunnel_proto_init() + md_TSSPacketContent = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSPacketContent") + fd_TSSPacketContent_signing_id = md_TSSPacketContent.Fields().ByName("signing_id") + fd_TSSPacketContent_destination_chain_id = md_TSSPacketContent.Fields().ByName("destination_chain_id") + fd_TSSPacketContent_destination_contract_address = md_TSSPacketContent.Fields().ByName("destination_contract_address") +} + +var _ protoreflect.Message = (*fastReflection_TSSPacketContent)(nil) + +type fastReflection_TSSPacketContent TSSPacketContent + +func (x *TSSPacketContent) ProtoReflect() protoreflect.Message { + return (*fastReflection_TSSPacketContent)(x) +} + +func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[8] + 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_TSSPacketContent_messageType fastReflection_TSSPacketContent_messageType +var _ protoreflect.MessageType = fastReflection_TSSPacketContent_messageType{} + +type fastReflection_TSSPacketContent_messageType struct{} + +func (x fastReflection_TSSPacketContent_messageType) Zero() protoreflect.Message { + return (*fastReflection_TSSPacketContent)(nil) +} +func (x fastReflection_TSSPacketContent_messageType) New() protoreflect.Message { + return new(fastReflection_TSSPacketContent) +} +func (x fastReflection_TSSPacketContent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TSSPacketContent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TSSPacketContent) Descriptor() protoreflect.MessageDescriptor { + return md_TSSPacketContent +} + +// 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_TSSPacketContent) Type() protoreflect.MessageType { + return _fastReflection_TSSPacketContent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TSSPacketContent) New() protoreflect.Message { + return new(fastReflection_TSSPacketContent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TSSPacketContent) Interface() protoreflect.ProtoMessage { + return (*TSSPacketContent)(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_TSSPacketContent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SigningId != uint64(0) { + value := protoreflect.ValueOfUint64(x.SigningId) + if !f(fd_TSSPacketContent_signing_id, value) { + return + } + } + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_TSSPacketContent_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_TSSPacketContent_destination_contract_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_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + return x.SigningId != uint64(0) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + return x.DestinationChainId != "" + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + return x.DestinationContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + x.SigningId = uint64(0) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + x.DestinationChainId = "" + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + x.DestinationContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + value := x.SigningId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + x.SigningId = value.Uint() + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + panic(fmt.Errorf("field signing_id of message tunnel.v1beta1.TSSPacketContent is not mutable")) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message tunnel.v1beta1.TSSPacketContent is not mutable")) + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message tunnel.v1beta1.TSSPacketContent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.TSSPacketContent.signing_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TSSPacketContent", 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_TSSPacketContent) 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_TSSPacketContent) 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_TSSPacketContent) 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_TSSPacketContent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TSSPacketContent) + 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.SigningId != 0 { + n += 1 + runtime.Sov(uint64(x.SigningId)) + } + l = len(x.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + 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().(*TSSPacketContent) + 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.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x1a + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + i-- + dAtA[i] = 0x12 + } + if x.SigningId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SigningId)) + i-- + dAtA[i] = 0x8 + } + 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().(*TSSPacketContent) + 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: TSSPacketContent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigningId", wireType) + } + x.SigningId = 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.SigningId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = 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: tunnel/v1beta1/tunnel.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) +) + +// Encoder is an enumerator that defines the mode of encoding message in tunnel module. +type Encoder int32 + +const ( + // ENCODER_UNSPECIFIED is an unspecified encoder mode. + Encoder_ENCODER_UNSPECIFIED Encoder = 0 + // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). + Encoder_ENCODER_FIXED_POINT_ABI Encoder = 1 + // ENCODER_TICK_ABI is a tick abi encoder. + Encoder_ENCODER_TICK_ABI Encoder = 2 +) + +// Enum value maps for Encoder. +var ( + Encoder_name = map[int32]string{ + 0: "ENCODER_UNSPECIFIED", + 1: "ENCODER_FIXED_POINT_ABI", + 2: "ENCODER_TICK_ABI", + } + Encoder_value = map[string]int32{ + "ENCODER_UNSPECIFIED": 0, + "ENCODER_FIXED_POINT_ABI": 1, + "ENCODER_TICK_ABI": 2, + } +) + +func (x Encoder) Enum() *Encoder { + p := new(Encoder) + *p = x + return p +} + +func (x Encoder) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Encoder) Descriptor() protoreflect.EnumDescriptor { + return file_tunnel_v1beta1_tunnel_proto_enumTypes[0].Descriptor() +} + +func (Encoder) Type() protoreflect.EnumType { + return &file_tunnel_v1beta1_tunnel_proto_enumTypes[0] +} + +func (x Encoder) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Encoder.Descriptor instead. +func (Encoder) EnumDescriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} +} + +// TSSRoute is the type for a TSS route +type TSSRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (x *TSSRoute) Reset() { + *x = TSSRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TSSRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TSSRoute) ProtoMessage() {} + +// Deprecated: Use TSSRoute.ProtoReflect.Descriptor instead. +func (*TSSRoute) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} +} + +func (x *TSSRoute) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *TSSRoute) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +// SignalDeviation is the type for a signal with soft and hard deviation +type SignalDeviation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signal_id is the signal ID + SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // soft_deviation_bps is the soft deviation in basis points + SoftDeviationBps uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` + // hard_deviation_bps is the hard deviation in basis points + HardDeviationBps uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` +} + +func (x *SignalDeviation) Reset() { + *x = SignalDeviation{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalDeviation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalDeviation) ProtoMessage() {} + +// Deprecated: Use SignalDeviation.ProtoReflect.Descriptor instead. +func (*SignalDeviation) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{1} +} + +func (x *SignalDeviation) GetSignalId() string { + if x != nil { + return x.SignalId + } + return "" +} + +func (x *SignalDeviation) GetSoftDeviationBps() uint64 { + if x != nil { + return x.SoftDeviationBps + } + return 0 +} + +func (x *SignalDeviation) GetHardDeviationBps() uint64 { + if x != nil { + return x.HardDeviationBps + } + return 0 +} + +// Deposit defines an amount deposited by an account address to the tunnel. +type Deposit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // depositor defines the deposit addresses from the proposals. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` + // amount to be deposited by depositor. + Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *Deposit) Reset() { + *x = Deposit{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Deposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Deposit) ProtoMessage() {} + +// Deprecated: Use Deposit.ProtoReflect.Descriptor instead. +func (*Deposit) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{2} +} + +func (x *Deposit) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *Deposit) GetDepositor() string { + if x != nil { + return x.Depositor + } + return "" +} + +func (x *Deposit) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// Tunnel is the type for a tunnel +type Tunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the tunnel ID + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // sequence is representing the sequence of the tunnel packet. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // route is the route for delivering the signal prices + Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + // encoder is the mode of encoding price signal data. + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + // fee_payer is the address of the fee payer + FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + // signal_deviations is the list of signal deviations + SignalDeviations []*SignalDeviation `protobuf:"bytes,6,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations,omitempty"` + // interval is the interval for delivering the signal prices + Interval uint64 `protobuf:"varint,7,opt,name=interval,proto3" json:"interval,omitempty"` + // total_deposit is the total deposit on the tunnel. + TotalDeposit []*v1beta1.Coin `protobuf:"bytes,8,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"` + // is_active is the flag to indicate if the tunnel is active + IsActive bool `protobuf:"varint,9,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + // created_at is the timestamp when the tunnel is created + CreatedAt int64 `protobuf:"varint,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // creator is the address of the creator + Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *Tunnel) Reset() { + *x = Tunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tunnel) ProtoMessage() {} + +// Deprecated: Use Tunnel.ProtoReflect.Descriptor instead. +func (*Tunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{3} +} + +func (x *Tunnel) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Tunnel) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *Tunnel) GetRoute() *anypb.Any { + if x != nil { + return x.Route + } + return nil +} + +func (x *Tunnel) GetEncoder() Encoder { + if x != nil { + return x.Encoder + } + return Encoder_ENCODER_UNSPECIFIED +} + +func (x *Tunnel) GetFeePayer() string { + if x != nil { + return x.FeePayer + } + return "" +} + +func (x *Tunnel) GetSignalDeviations() []*SignalDeviation { + if x != nil { + return x.SignalDeviations + } + return nil +} + +func (x *Tunnel) GetInterval() uint64 { + if x != nil { + return x.Interval + } + return 0 +} + +func (x *Tunnel) GetTotalDeposit() []*v1beta1.Coin { + if x != nil { + return x.TotalDeposit + } + return nil +} + +func (x *Tunnel) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *Tunnel) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +func (x *Tunnel) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +// LatestSignalPrices is the type for signal prices that tunnel produces +type LatestSignalPrices struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the tunnel ID + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // signal_prices is the list of signal prices + SignalPrices []*SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` + // timestamp is the timestamp when the signal prices are produced + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *LatestSignalPrices) Reset() { + *x = LatestSignalPrices{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LatestSignalPrices) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LatestSignalPrices) ProtoMessage() {} + +// Deprecated: Use LatestSignalPrices.ProtoReflect.Descriptor instead. +func (*LatestSignalPrices) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{4} +} + +func (x *LatestSignalPrices) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *LatestSignalPrices) GetSignalPrices() []*SignalPrice { + if x != nil { + return x.SignalPrices + } + return nil +} + +func (x *LatestSignalPrices) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +// SignalPrice is the type for a signal price +type SignalPrice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signal_id is the signal ID + SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // price is the price of the signal + Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` +} + +func (x *SignalPrice) Reset() { + *x = SignalPrice{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalPrice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalPrice) ProtoMessage() {} + +// Deprecated: Use SignalPrice.ProtoReflect.Descriptor instead. +func (*SignalPrice) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{5} +} + +func (x *SignalPrice) GetSignalId() string { + if x != nil { + return x.SignalId + } + return "" +} + +func (x *SignalPrice) GetPrice() uint64 { + if x != nil { + return x.Price + } + return 0 +} + +// TotalFees is the type for the total fees collected by the tunnel +type TotalFees struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // total_packet_fee is the total packet fee collected + TotalPacketFee []*v1beta1.Coin `protobuf:"bytes,1,rep,name=total_packet_fee,json=totalPacketFee,proto3" json:"total_packet_fee,omitempty"` +} + +func (x *TotalFees) Reset() { + *x = TotalFees{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TotalFees) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TotalFees) ProtoMessage() {} + +// Deprecated: Use TotalFees.ProtoReflect.Descriptor instead. +func (*TotalFees) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{6} +} + +func (x *TotalFees) GetTotalPacketFee() []*v1beta1.Coin { + if x != nil { + return x.TotalPacketFee + } + return nil +} + +// Packet is the packet that tunnel produces +type Packet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the tunnel ID + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // sequence is representing the sequence of the tunnel packet. + Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // signal_prices is the list of signal prices + SignalPrices []*SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` + // packet_content is the content of the packet that implements PacketContentI + PacketContent *anypb.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + // created_at is the timestamp when the packet is created + CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (x *Packet) Reset() { + *x = Packet{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Packet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Packet) ProtoMessage() {} + +// Deprecated: Use Packet.ProtoReflect.Descriptor instead. +func (*Packet) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{7} +} + +func (x *Packet) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *Packet) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *Packet) GetSignalPrices() []*SignalPrice { + if x != nil { + return x.SignalPrices + } + return nil +} + +func (x *Packet) GetPacketContent() *anypb.Any { + if x != nil { + return x.PacketContent + } + return nil +} + +func (x *Packet) GetCreatedAt() int64 { + if x != nil { + return x.CreatedAt + } + return 0 +} + +// TSSPacketContent is the packet content for TSS +type TSSPacketContent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signing_id is the signing ID + SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (x *TSSPacketContent) Reset() { + *x = TSSPacketContent{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TSSPacketContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TSSPacketContent) ProtoMessage() {} + +// Deprecated: Use TSSPacketContent.ProtoReflect.Descriptor instead. +func (*TSSPacketContent) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{8} +} + +func (x *TSSPacketContent) GetSigningId() uint64 { + if x != nil { + return x.SigningId + } + return 0 +} + +func (x *TSSPacketContent) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *TSSPacketContent) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +var File_tunnel_v1beta1_tunnel_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 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, 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, 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, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, + 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0xca, 0x01, 0x0a, + 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, + 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x12, 0x73, + 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, 0x6f, 0x66, + 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x73, + 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, + 0x42, 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, + 0x10, 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, + 0x53, 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xbb, 0x04, 0x0a, 0x06, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x06, 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x18, 0x03, 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, 0x0a, 0xca, 0xb4, + 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, + 0x31, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x08, 0x66, 0x65, 0x65, 0x50, 0x61, 0x79, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x08, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xab, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, + 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, + 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, + 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, 0x30, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, + 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, + 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x87, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, + 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x04, 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, 0x12, 0xca, + 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, + 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, + 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, + 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, + 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, + 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, + 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, + 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, + 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, + 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, + 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, + 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, + 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, + 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, + 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xc1, 0x01, 0x0a, 0x12, 0x63, + 0x6f, 0x6d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tunnel_v1beta1_tunnel_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_tunnel_proto_rawDescData = file_tunnel_v1beta1_tunnel_proto_rawDesc +) + +func file_tunnel_v1beta1_tunnel_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_tunnel_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_tunnel_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_tunnel_proto_rawDescData) + }) + return file_tunnel_v1beta1_tunnel_proto_rawDescData +} + +var file_tunnel_v1beta1_tunnel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_tunnel_v1beta1_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_tunnel_v1beta1_tunnel_proto_goTypes = []interface{}{ + (Encoder)(0), // 0: tunnel.v1beta1.Encoder + (*TSSRoute)(nil), // 1: tunnel.v1beta1.TSSRoute + (*SignalDeviation)(nil), // 2: tunnel.v1beta1.SignalDeviation + (*Deposit)(nil), // 3: tunnel.v1beta1.Deposit + (*Tunnel)(nil), // 4: tunnel.v1beta1.Tunnel + (*LatestSignalPrices)(nil), // 5: tunnel.v1beta1.LatestSignalPrices + (*SignalPrice)(nil), // 6: tunnel.v1beta1.SignalPrice + (*TotalFees)(nil), // 7: tunnel.v1beta1.TotalFees + (*Packet)(nil), // 8: tunnel.v1beta1.Packet + (*TSSPacketContent)(nil), // 9: tunnel.v1beta1.TSSPacketContent + (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 11: google.protobuf.Any +} +var file_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ + 10, // 0: tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin + 11, // 1: tunnel.v1beta1.Tunnel.route:type_name -> google.protobuf.Any + 0, // 2: tunnel.v1beta1.Tunnel.encoder:type_name -> tunnel.v1beta1.Encoder + 2, // 3: tunnel.v1beta1.Tunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation + 10, // 4: tunnel.v1beta1.Tunnel.total_deposit:type_name -> cosmos.base.v1beta1.Coin + 6, // 5: tunnel.v1beta1.LatestSignalPrices.signal_prices:type_name -> tunnel.v1beta1.SignalPrice + 10, // 6: tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin + 6, // 7: tunnel.v1beta1.Packet.signal_prices:type_name -> tunnel.v1beta1.SignalPrice + 11, // 8: tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_tunnel_v1beta1_tunnel_proto_init() } +func file_tunnel_v1beta1_tunnel_proto_init() { + if File_tunnel_v1beta1_tunnel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tunnel_v1beta1_tunnel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TSSRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalDeviation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Deposit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LatestSignalPrices); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignalPrice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TotalFees); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Packet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tunnel_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TSSPacketContent); 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_tunnel_v1beta1_tunnel_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tunnel_v1beta1_tunnel_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_tunnel_proto_depIdxs, + EnumInfos: file_tunnel_v1beta1_tunnel_proto_enumTypes, + MessageInfos: file_tunnel_v1beta1_tunnel_proto_msgTypes, + }.Build() + File_tunnel_v1beta1_tunnel_proto = out.File + file_tunnel_v1beta1_tunnel_proto_rawDesc = nil + file_tunnel_v1beta1_tunnel_proto_goTypes = nil + file_tunnel_v1beta1_tunnel_proto_depIdxs = nil +} diff --git a/api/tunnel/v1beta1/tx.pulsar.go b/api/tunnel/v1beta1/tx.pulsar.go new file mode 100644 index 000000000..1a164ac77 --- /dev/null +++ b/api/tunnel/v1beta1/tx.pulsar.go @@ -0,0 +1,8737 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tunnelv1beta1 + +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 _ protoreflect.List = (*_MsgCreateTunnel_1_list)(nil) + +type _MsgCreateTunnel_1_list struct { + list *[]*SignalDeviation +} + +func (x *_MsgCreateTunnel_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCreateTunnel_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCreateTunnel_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCreateTunnel_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCreateTunnel_1_list) AppendMutable() protoreflect.Value { + v := new(SignalDeviation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateTunnel_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCreateTunnel_1_list) NewElement() protoreflect.Value { + v := new(SignalDeviation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateTunnel_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgCreateTunnel_5_list)(nil) + +type _MsgCreateTunnel_5_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgCreateTunnel_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCreateTunnel_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCreateTunnel_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCreateTunnel_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCreateTunnel_5_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateTunnel_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCreateTunnel_5_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCreateTunnel_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgCreateTunnel protoreflect.MessageDescriptor + fd_MsgCreateTunnel_signal_deviations protoreflect.FieldDescriptor + fd_MsgCreateTunnel_interval protoreflect.FieldDescriptor + fd_MsgCreateTunnel_route protoreflect.FieldDescriptor + fd_MsgCreateTunnel_encoder protoreflect.FieldDescriptor + fd_MsgCreateTunnel_initial_deposit protoreflect.FieldDescriptor + fd_MsgCreateTunnel_creator protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgCreateTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgCreateTunnel") + fd_MsgCreateTunnel_signal_deviations = md_MsgCreateTunnel.Fields().ByName("signal_deviations") + fd_MsgCreateTunnel_interval = md_MsgCreateTunnel.Fields().ByName("interval") + fd_MsgCreateTunnel_route = md_MsgCreateTunnel.Fields().ByName("route") + fd_MsgCreateTunnel_encoder = md_MsgCreateTunnel.Fields().ByName("encoder") + fd_MsgCreateTunnel_initial_deposit = md_MsgCreateTunnel.Fields().ByName("initial_deposit") + fd_MsgCreateTunnel_creator = md_MsgCreateTunnel.Fields().ByName("creator") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateTunnel)(nil) + +type fastReflection_MsgCreateTunnel MsgCreateTunnel + +func (x *MsgCreateTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateTunnel)(x) +} + +func (x *MsgCreateTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_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_MsgCreateTunnel_messageType fastReflection_MsgCreateTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateTunnel_messageType{} + +type fastReflection_MsgCreateTunnel_messageType struct{} + +func (x fastReflection_MsgCreateTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateTunnel)(nil) +} +func (x fastReflection_MsgCreateTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateTunnel) +} +func (x fastReflection_MsgCreateTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateTunnel +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateTunnel +} + +// 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_MsgCreateTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateTunnel_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateTunnel) New() protoreflect.Message { + return new(fastReflection_MsgCreateTunnel) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgCreateTunnel)(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_MsgCreateTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.SignalDeviations) != 0 { + value := protoreflect.ValueOfList(&_MsgCreateTunnel_1_list{list: &x.SignalDeviations}) + if !f(fd_MsgCreateTunnel_signal_deviations, value) { + return + } + } + if x.Interval != uint64(0) { + value := protoreflect.ValueOfUint64(x.Interval) + if !f(fd_MsgCreateTunnel_interval, value) { + return + } + } + if x.Route != nil { + value := protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + if !f(fd_MsgCreateTunnel_route, value) { + return + } + } + if x.Encoder != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoder)) + if !f(fd_MsgCreateTunnel_encoder, value) { + return + } + } + if len(x.InitialDeposit) != 0 { + value := protoreflect.ValueOfList(&_MsgCreateTunnel_5_list{list: &x.InitialDeposit}) + if !f(fd_MsgCreateTunnel_initial_deposit, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgCreateTunnel_creator, 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_MsgCreateTunnel) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + return len(x.SignalDeviations) != 0 + case "tunnel.v1beta1.MsgCreateTunnel.interval": + return x.Interval != uint64(0) + case "tunnel.v1beta1.MsgCreateTunnel.route": + return x.Route != nil + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + return x.Encoder != 0 + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + return len(x.InitialDeposit) != 0 + case "tunnel.v1beta1.MsgCreateTunnel.creator": + return x.Creator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel 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_MsgCreateTunnel) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + x.SignalDeviations = nil + case "tunnel.v1beta1.MsgCreateTunnel.interval": + x.Interval = uint64(0) + case "tunnel.v1beta1.MsgCreateTunnel.route": + x.Route = nil + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + x.Encoder = 0 + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + x.InitialDeposit = nil + case "tunnel.v1beta1.MsgCreateTunnel.creator": + x.Creator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel 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_MsgCreateTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + if len(x.SignalDeviations) == 0 { + return protoreflect.ValueOfList(&_MsgCreateTunnel_1_list{}) + } + listValue := &_MsgCreateTunnel_1_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgCreateTunnel.interval": + value := x.Interval + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgCreateTunnel.route": + value := x.Route + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + value := x.Encoder + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + if len(x.InitialDeposit) == 0 { + return protoreflect.ValueOfList(&_MsgCreateTunnel_5_list{}) + } + listValue := &_MsgCreateTunnel_5_list{list: &x.InitialDeposit} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgCreateTunnel.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel 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_MsgCreateTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + lv := value.List() + clv := lv.(*_MsgCreateTunnel_1_list) + x.SignalDeviations = *clv.list + case "tunnel.v1beta1.MsgCreateTunnel.interval": + x.Interval = value.Uint() + case "tunnel.v1beta1.MsgCreateTunnel.route": + x.Route = value.Message().Interface().(*anypb.Any) + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + x.Encoder = (Encoder)(value.Enum()) + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + lv := value.List() + clv := lv.(*_MsgCreateTunnel_5_list) + x.InitialDeposit = *clv.list + case "tunnel.v1beta1.MsgCreateTunnel.creator": + x.Creator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel 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_MsgCreateTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + if x.SignalDeviations == nil { + x.SignalDeviations = []*SignalDeviation{} + } + value := &_MsgCreateTunnel_1_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgCreateTunnel.route": + if x.Route == nil { + x.Route = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + if x.InitialDeposit == nil { + x.InitialDeposit = []*v1beta1.Coin{} + } + value := &_MsgCreateTunnel_5_list{list: &x.InitialDeposit} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgCreateTunnel.interval": + panic(fmt.Errorf("field interval of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + panic(fmt.Errorf("field encoder of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) + case "tunnel.v1beta1.MsgCreateTunnel.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel 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_MsgCreateTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + list := []*SignalDeviation{} + return protoreflect.ValueOfList(&_MsgCreateTunnel_1_list{list: &list}) + case "tunnel.v1beta1.MsgCreateTunnel.interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgCreateTunnel.route": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tunnel.v1beta1.MsgCreateTunnel.encoder": + return protoreflect.ValueOfEnum(0) + case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgCreateTunnel_5_list{list: &list}) + case "tunnel.v1beta1.MsgCreateTunnel.creator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel 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_MsgCreateTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgCreateTunnel", 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_MsgCreateTunnel) 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_MsgCreateTunnel) 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_MsgCreateTunnel) 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_MsgCreateTunnel) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateTunnel) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.SignalDeviations) > 0 { + for _, e := range x.SignalDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Interval != 0 { + n += 1 + runtime.Sov(uint64(x.Interval)) + } + if x.Route != nil { + l = options.Size(x.Route) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Encoder != 0 { + n += 1 + runtime.Sov(uint64(x.Encoder)) + } + if len(x.InitialDeposit) > 0 { + for _, e := range x.InitialDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Creator) + 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().(*MsgCreateTunnel) + 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.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x32 + } + if len(x.InitialDeposit) > 0 { + for iNdEx := len(x.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.InitialDeposit[iNdEx]) + 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 x.Encoder != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoder)) + i-- + dAtA[i] = 0x20 + } + if x.Route != nil { + encoded, err := options.Marshal(x.Route) + 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.Interval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Interval)) + i-- + dAtA[i] = 0x10 + } + if len(x.SignalDeviations) > 0 { + for iNdEx := len(x.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalDeviations[iNdEx]) + 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().(*MsgCreateTunnel) + 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: MsgCreateTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTunnel: 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 SignalDeviations", 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 + } + x.SignalDeviations = append(x.SignalDeviations, &SignalDeviation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalDeviations[len(x.SignalDeviations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + x.Interval = 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.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Route", 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.Route == nil { + x.Route = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Route); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) + } + x.Encoder = 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.Encoder |= Encoder(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 InitialDeposit", 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 + } + x.InitialDeposit = append(x.InitialDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InitialDeposit[len(x.InitialDeposit)-1]); 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 Creator", 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.Creator = 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_MsgCreateTunnelResponse protoreflect.MessageDescriptor + fd_MsgCreateTunnelResponse_tunnel_id protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgCreateTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgCreateTunnelResponse") + fd_MsgCreateTunnelResponse_tunnel_id = md_MsgCreateTunnelResponse.Fields().ByName("tunnel_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateTunnelResponse)(nil) + +type fastReflection_MsgCreateTunnelResponse MsgCreateTunnelResponse + +func (x *MsgCreateTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateTunnelResponse)(x) +} + +func (x *MsgCreateTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_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_MsgCreateTunnelResponse_messageType fastReflection_MsgCreateTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateTunnelResponse_messageType{} + +type fastReflection_MsgCreateTunnelResponse_messageType struct{} + +func (x fastReflection_MsgCreateTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateTunnelResponse)(nil) +} +func (x fastReflection_MsgCreateTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateTunnelResponse) +} +func (x fastReflection_MsgCreateTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateTunnelResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateTunnelResponse +} + +// 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_MsgCreateTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateTunnelResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateTunnelResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateTunnelResponse)(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_MsgCreateTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgCreateTunnelResponse_tunnel_id, 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_MsgCreateTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + return x.TunnelId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse 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_MsgCreateTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + x.TunnelId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse 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_MsgCreateTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse 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_MsgCreateTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + x.TunnelId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse 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_MsgCreateTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgCreateTunnelResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse 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_MsgCreateTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse 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_MsgCreateTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgCreateTunnelResponse", 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_MsgCreateTunnelResponse) 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_MsgCreateTunnelResponse) 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_MsgCreateTunnelResponse) 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_MsgCreateTunnelResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateTunnelResponse) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + 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().(*MsgCreateTunnelResponse) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgCreateTunnelResponse) + 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: MsgCreateTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 _ protoreflect.List = (*_MsgEditTunnel_2_list)(nil) + +type _MsgEditTunnel_2_list struct { + list *[]*SignalDeviation +} + +func (x *_MsgEditTunnel_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgEditTunnel_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgEditTunnel_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + (*x.list)[i] = concreteValue +} + +func (x *_MsgEditTunnel_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgEditTunnel_2_list) AppendMutable() protoreflect.Value { + v := new(SignalDeviation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgEditTunnel_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgEditTunnel_2_list) NewElement() protoreflect.Value { + v := new(SignalDeviation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgEditTunnel_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgEditTunnel protoreflect.MessageDescriptor + fd_MsgEditTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgEditTunnel_signal_deviations protoreflect.FieldDescriptor + fd_MsgEditTunnel_interval protoreflect.FieldDescriptor + fd_MsgEditTunnel_creator protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgEditTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnel") + fd_MsgEditTunnel_tunnel_id = md_MsgEditTunnel.Fields().ByName("tunnel_id") + fd_MsgEditTunnel_signal_deviations = md_MsgEditTunnel.Fields().ByName("signal_deviations") + fd_MsgEditTunnel_interval = md_MsgEditTunnel.Fields().ByName("interval") + fd_MsgEditTunnel_creator = md_MsgEditTunnel.Fields().ByName("creator") +} + +var _ protoreflect.Message = (*fastReflection_MsgEditTunnel)(nil) + +type fastReflection_MsgEditTunnel MsgEditTunnel + +func (x *MsgEditTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgEditTunnel)(x) +} + +func (x *MsgEditTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_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_MsgEditTunnel_messageType fastReflection_MsgEditTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgEditTunnel_messageType{} + +type fastReflection_MsgEditTunnel_messageType struct{} + +func (x fastReflection_MsgEditTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgEditTunnel)(nil) +} +func (x fastReflection_MsgEditTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgEditTunnel) +} +func (x fastReflection_MsgEditTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgEditTunnel +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgEditTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgEditTunnel +} + +// 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_MsgEditTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgEditTunnel_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgEditTunnel) New() protoreflect.Message { + return new(fastReflection_MsgEditTunnel) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgEditTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgEditTunnel)(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_MsgEditTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgEditTunnel_tunnel_id, value) { + return + } + } + if len(x.SignalDeviations) != 0 { + value := protoreflect.ValueOfList(&_MsgEditTunnel_2_list{list: &x.SignalDeviations}) + if !f(fd_MsgEditTunnel_signal_deviations, value) { + return + } + } + if x.Interval != uint64(0) { + value := protoreflect.ValueOfUint64(x.Interval) + if !f(fd_MsgEditTunnel_interval, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgEditTunnel_creator, 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_MsgEditTunnel) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + return len(x.SignalDeviations) != 0 + case "tunnel.v1beta1.MsgEditTunnel.interval": + return x.Interval != uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.creator": + return x.Creator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel 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_MsgEditTunnel) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + x.SignalDeviations = nil + case "tunnel.v1beta1.MsgEditTunnel.interval": + x.Interval = uint64(0) + case "tunnel.v1beta1.MsgEditTunnel.creator": + x.Creator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel 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_MsgEditTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + if len(x.SignalDeviations) == 0 { + return protoreflect.ValueOfList(&_MsgEditTunnel_2_list{}) + } + listValue := &_MsgEditTunnel_2_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgEditTunnel.interval": + value := x.Interval + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgEditTunnel.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel 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_MsgEditTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + lv := value.List() + clv := lv.(*_MsgEditTunnel_2_list) + x.SignalDeviations = *clv.list + case "tunnel.v1beta1.MsgEditTunnel.interval": + x.Interval = value.Uint() + case "tunnel.v1beta1.MsgEditTunnel.creator": + x.Creator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel 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_MsgEditTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + if x.SignalDeviations == nil { + x.SignalDeviations = []*SignalDeviation{} + } + value := &_MsgEditTunnel_2_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgEditTunnel is not mutable")) + case "tunnel.v1beta1.MsgEditTunnel.interval": + panic(fmt.Errorf("field interval of message tunnel.v1beta1.MsgEditTunnel is not mutable")) + case "tunnel.v1beta1.MsgEditTunnel.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgEditTunnel is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel 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_MsgEditTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + list := []*SignalDeviation{} + return protoreflect.ValueOfList(&_MsgEditTunnel_2_list{list: &list}) + case "tunnel.v1beta1.MsgEditTunnel.interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgEditTunnel.creator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel 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_MsgEditTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgEditTunnel", 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_MsgEditTunnel) 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_MsgEditTunnel) 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_MsgEditTunnel) 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_MsgEditTunnel) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgEditTunnel) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.SignalDeviations) > 0 { + for _, e := range x.SignalDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Interval != 0 { + n += 1 + runtime.Sov(uint64(x.Interval)) + } + l = len(x.Creator) + 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().(*MsgEditTunnel) + 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.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x22 + } + if x.Interval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Interval)) + i-- + dAtA[i] = 0x18 + } + if len(x.SignalDeviations) > 0 { + for iNdEx := len(x.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalDeviations[iNdEx]) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgEditTunnel) + 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: MsgEditTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", 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 + } + x.SignalDeviations = append(x.SignalDeviations, &SignalDeviation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalDeviations[len(x.SignalDeviations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + x.Interval = 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.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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_MsgEditTunnelResponse protoreflect.MessageDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgEditTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnelResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgEditTunnelResponse)(nil) + +type fastReflection_MsgEditTunnelResponse MsgEditTunnelResponse + +func (x *MsgEditTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgEditTunnelResponse)(x) +} + +func (x *MsgEditTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_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_MsgEditTunnelResponse_messageType fastReflection_MsgEditTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgEditTunnelResponse_messageType{} + +type fastReflection_MsgEditTunnelResponse_messageType struct{} + +func (x fastReflection_MsgEditTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgEditTunnelResponse)(nil) +} +func (x fastReflection_MsgEditTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgEditTunnelResponse) +} +func (x fastReflection_MsgEditTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgEditTunnelResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgEditTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgEditTunnelResponse +} + +// 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_MsgEditTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgEditTunnelResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgEditTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgEditTunnelResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgEditTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgEditTunnelResponse)(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_MsgEditTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgEditTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse 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_MsgEditTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse 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_MsgEditTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse 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_MsgEditTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse 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_MsgEditTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse 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_MsgEditTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse 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_MsgEditTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgEditTunnelResponse", 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_MsgEditTunnelResponse) 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_MsgEditTunnelResponse) 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_MsgEditTunnelResponse) 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_MsgEditTunnelResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgEditTunnelResponse) + 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.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().(*MsgEditTunnelResponse) + 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 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().(*MsgEditTunnelResponse) + 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: MsgEditTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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_MsgActivate protoreflect.MessageDescriptor + fd_MsgActivate_tunnel_id protoreflect.FieldDescriptor + fd_MsgActivate_creator protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgActivate = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgActivate") + fd_MsgActivate_tunnel_id = md_MsgActivate.Fields().ByName("tunnel_id") + fd_MsgActivate_creator = md_MsgActivate.Fields().ByName("creator") +} + +var _ protoreflect.Message = (*fastReflection_MsgActivate)(nil) + +type fastReflection_MsgActivate MsgActivate + +func (x *MsgActivate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgActivate)(x) +} + +func (x *MsgActivate) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[4] + 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_MsgActivate_messageType fastReflection_MsgActivate_messageType +var _ protoreflect.MessageType = fastReflection_MsgActivate_messageType{} + +type fastReflection_MsgActivate_messageType struct{} + +func (x fastReflection_MsgActivate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgActivate)(nil) +} +func (x fastReflection_MsgActivate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgActivate) +} +func (x fastReflection_MsgActivate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgActivate +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgActivate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgActivate +} + +// 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_MsgActivate) Type() protoreflect.MessageType { + return _fastReflection_MsgActivate_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgActivate) New() protoreflect.Message { + return new(fastReflection_MsgActivate) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgActivate) Interface() protoreflect.ProtoMessage { + return (*MsgActivate)(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_MsgActivate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgActivate_tunnel_id, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgActivate_creator, 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_MsgActivate) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgActivate.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgActivate.creator": + return x.Creator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate 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_MsgActivate) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgActivate.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgActivate.creator": + x.Creator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate 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_MsgActivate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgActivate.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgActivate.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate 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_MsgActivate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgActivate.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgActivate.creator": + x.Creator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate 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_MsgActivate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgActivate.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgActivate is not mutable")) + case "tunnel.v1beta1.MsgActivate.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgActivate is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate 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_MsgActivate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgActivate.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgActivate.creator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate 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_MsgActivate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgActivate", 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_MsgActivate) 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_MsgActivate) 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_MsgActivate) 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_MsgActivate) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgActivate) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + l = len(x.Creator) + 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().(*MsgActivate) + 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.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x12 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgActivate) + 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: MsgActivate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgActivate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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_MsgActivateResponse protoreflect.MessageDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgActivateResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgActivateResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgActivateResponse)(nil) + +type fastReflection_MsgActivateResponse MsgActivateResponse + +func (x *MsgActivateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgActivateResponse)(x) +} + +func (x *MsgActivateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[5] + 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_MsgActivateResponse_messageType fastReflection_MsgActivateResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgActivateResponse_messageType{} + +type fastReflection_MsgActivateResponse_messageType struct{} + +func (x fastReflection_MsgActivateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgActivateResponse)(nil) +} +func (x fastReflection_MsgActivateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgActivateResponse) +} +func (x fastReflection_MsgActivateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgActivateResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgActivateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgActivateResponse +} + +// 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_MsgActivateResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgActivateResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgActivateResponse) New() protoreflect.Message { + return new(fastReflection_MsgActivateResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgActivateResponse) Interface() protoreflect.ProtoMessage { + return (*MsgActivateResponse)(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_MsgActivateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgActivateResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse 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_MsgActivateResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse 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_MsgActivateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse 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_MsgActivateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse 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_MsgActivateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse 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_MsgActivateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse 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_MsgActivateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgActivateResponse", 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_MsgActivateResponse) 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_MsgActivateResponse) 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_MsgActivateResponse) 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_MsgActivateResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgActivateResponse) + 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.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().(*MsgActivateResponse) + 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 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().(*MsgActivateResponse) + 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: MsgActivateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgActivateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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_MsgDeactivate protoreflect.MessageDescriptor + fd_MsgDeactivate_tunnel_id protoreflect.FieldDescriptor + fd_MsgDeactivate_creator protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgDeactivate = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDeactivate") + fd_MsgDeactivate_tunnel_id = md_MsgDeactivate.Fields().ByName("tunnel_id") + fd_MsgDeactivate_creator = md_MsgDeactivate.Fields().ByName("creator") +} + +var _ protoreflect.Message = (*fastReflection_MsgDeactivate)(nil) + +type fastReflection_MsgDeactivate MsgDeactivate + +func (x *MsgDeactivate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDeactivate)(x) +} + +func (x *MsgDeactivate) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[6] + 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_MsgDeactivate_messageType fastReflection_MsgDeactivate_messageType +var _ protoreflect.MessageType = fastReflection_MsgDeactivate_messageType{} + +type fastReflection_MsgDeactivate_messageType struct{} + +func (x fastReflection_MsgDeactivate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDeactivate)(nil) +} +func (x fastReflection_MsgDeactivate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDeactivate) +} +func (x fastReflection_MsgDeactivate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeactivate +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDeactivate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeactivate +} + +// 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_MsgDeactivate) Type() protoreflect.MessageType { + return _fastReflection_MsgDeactivate_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDeactivate) New() protoreflect.Message { + return new(fastReflection_MsgDeactivate) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDeactivate) Interface() protoreflect.ProtoMessage { + return (*MsgDeactivate)(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_MsgDeactivate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgDeactivate_tunnel_id, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgDeactivate_creator, 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_MsgDeactivate) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgDeactivate.creator": + return x.Creator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate 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_MsgDeactivate) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgDeactivate.creator": + x.Creator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate 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_MsgDeactivate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgDeactivate.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate 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_MsgDeactivate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgDeactivate.creator": + x.Creator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate 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_MsgDeactivate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgDeactivate is not mutable")) + case "tunnel.v1beta1.MsgDeactivate.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgDeactivate is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate 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_MsgDeactivate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgDeactivate.creator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate 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_MsgDeactivate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDeactivate", 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_MsgDeactivate) 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_MsgDeactivate) 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_MsgDeactivate) 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_MsgDeactivate) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDeactivate) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + l = len(x.Creator) + 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().(*MsgDeactivate) + 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.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x12 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgDeactivate) + 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: MsgDeactivate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeactivate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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_MsgDeactivateResponse protoreflect.MessageDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgDeactivateResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDeactivateResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgDeactivateResponse)(nil) + +type fastReflection_MsgDeactivateResponse MsgDeactivateResponse + +func (x *MsgDeactivateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDeactivateResponse)(x) +} + +func (x *MsgDeactivateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[7] + 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_MsgDeactivateResponse_messageType fastReflection_MsgDeactivateResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDeactivateResponse_messageType{} + +type fastReflection_MsgDeactivateResponse_messageType struct{} + +func (x fastReflection_MsgDeactivateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDeactivateResponse)(nil) +} +func (x fastReflection_MsgDeactivateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDeactivateResponse) +} +func (x fastReflection_MsgDeactivateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeactivateResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDeactivateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDeactivateResponse +} + +// 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_MsgDeactivateResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDeactivateResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDeactivateResponse) New() protoreflect.Message { + return new(fastReflection_MsgDeactivateResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDeactivateResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDeactivateResponse)(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_MsgDeactivateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgDeactivateResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse 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_MsgDeactivateResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse 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_MsgDeactivateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse 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_MsgDeactivateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse 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_MsgDeactivateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse 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_MsgDeactivateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse 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_MsgDeactivateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDeactivateResponse", 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_MsgDeactivateResponse) 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_MsgDeactivateResponse) 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_MsgDeactivateResponse) 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_MsgDeactivateResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDeactivateResponse) + 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.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().(*MsgDeactivateResponse) + 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 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().(*MsgDeactivateResponse) + 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: MsgDeactivateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeactivateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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_MsgTriggerTunnel protoreflect.MessageDescriptor + fd_MsgTriggerTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgTriggerTunnel_creator protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgTriggerTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgTriggerTunnel") + fd_MsgTriggerTunnel_tunnel_id = md_MsgTriggerTunnel.Fields().ByName("tunnel_id") + fd_MsgTriggerTunnel_creator = md_MsgTriggerTunnel.Fields().ByName("creator") +} + +var _ protoreflect.Message = (*fastReflection_MsgTriggerTunnel)(nil) + +type fastReflection_MsgTriggerTunnel MsgTriggerTunnel + +func (x *MsgTriggerTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgTriggerTunnel)(x) +} + +func (x *MsgTriggerTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[8] + 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_MsgTriggerTunnel_messageType fastReflection_MsgTriggerTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgTriggerTunnel_messageType{} + +type fastReflection_MsgTriggerTunnel_messageType struct{} + +func (x fastReflection_MsgTriggerTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgTriggerTunnel)(nil) +} +func (x fastReflection_MsgTriggerTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgTriggerTunnel) +} +func (x fastReflection_MsgTriggerTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTriggerTunnel +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgTriggerTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTriggerTunnel +} + +// 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_MsgTriggerTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgTriggerTunnel_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgTriggerTunnel) New() protoreflect.Message { + return new(fastReflection_MsgTriggerTunnel) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgTriggerTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgTriggerTunnel)(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_MsgTriggerTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgTriggerTunnel_tunnel_id, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_MsgTriggerTunnel_creator, 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_MsgTriggerTunnel) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + return x.Creator != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel 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_MsgTriggerTunnel) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + x.Creator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel 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_MsgTriggerTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel 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_MsgTriggerTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + x.Creator = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel 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_MsgTriggerTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgTriggerTunnel is not mutable")) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgTriggerTunnel is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel 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_MsgTriggerTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgTriggerTunnel.creator": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel 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_MsgTriggerTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgTriggerTunnel", 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_MsgTriggerTunnel) 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_MsgTriggerTunnel) 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_MsgTriggerTunnel) 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_MsgTriggerTunnel) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgTriggerTunnel) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + l = len(x.Creator) + 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().(*MsgTriggerTunnel) + 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.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) + i-- + dAtA[i] = 0x12 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgTriggerTunnel) + 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: MsgTriggerTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTriggerTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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_MsgTriggerTunnelResponse protoreflect.MessageDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgTriggerTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgTriggerTunnelResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgTriggerTunnelResponse)(nil) + +type fastReflection_MsgTriggerTunnelResponse MsgTriggerTunnelResponse + +func (x *MsgTriggerTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgTriggerTunnelResponse)(x) +} + +func (x *MsgTriggerTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[9] + 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_MsgTriggerTunnelResponse_messageType fastReflection_MsgTriggerTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgTriggerTunnelResponse_messageType{} + +type fastReflection_MsgTriggerTunnelResponse_messageType struct{} + +func (x fastReflection_MsgTriggerTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgTriggerTunnelResponse)(nil) +} +func (x fastReflection_MsgTriggerTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgTriggerTunnelResponse) +} +func (x fastReflection_MsgTriggerTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTriggerTunnelResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgTriggerTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTriggerTunnelResponse +} + +// 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_MsgTriggerTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgTriggerTunnelResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgTriggerTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgTriggerTunnelResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgTriggerTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgTriggerTunnelResponse)(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_MsgTriggerTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgTriggerTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse 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_MsgTriggerTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse 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_MsgTriggerTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse 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_MsgTriggerTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse 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_MsgTriggerTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse 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_MsgTriggerTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse 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_MsgTriggerTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgTriggerTunnelResponse", 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_MsgTriggerTunnelResponse) 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_MsgTriggerTunnelResponse) 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_MsgTriggerTunnelResponse) 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_MsgTriggerTunnelResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgTriggerTunnelResponse) + 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.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().(*MsgTriggerTunnelResponse) + 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 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().(*MsgTriggerTunnelResponse) + 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: MsgTriggerTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTriggerTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 _ protoreflect.List = (*_MsgDepositTunnel_2_list)(nil) + +type _MsgDepositTunnel_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgDepositTunnel_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgDepositTunnel_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgDepositTunnel_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgDepositTunnel_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgDepositTunnel_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgDepositTunnel_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgDepositTunnel_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgDepositTunnel_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgDepositTunnel protoreflect.MessageDescriptor + fd_MsgDepositTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgDepositTunnel_amount protoreflect.FieldDescriptor + fd_MsgDepositTunnel_depositor protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgDepositTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnel") + fd_MsgDepositTunnel_tunnel_id = md_MsgDepositTunnel.Fields().ByName("tunnel_id") + fd_MsgDepositTunnel_amount = md_MsgDepositTunnel.Fields().ByName("amount") + fd_MsgDepositTunnel_depositor = md_MsgDepositTunnel.Fields().ByName("depositor") +} + +var _ protoreflect.Message = (*fastReflection_MsgDepositTunnel)(nil) + +type fastReflection_MsgDepositTunnel MsgDepositTunnel + +func (x *MsgDepositTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDepositTunnel)(x) +} + +func (x *MsgDepositTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[10] + 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_MsgDepositTunnel_messageType fastReflection_MsgDepositTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgDepositTunnel_messageType{} + +type fastReflection_MsgDepositTunnel_messageType struct{} + +func (x fastReflection_MsgDepositTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDepositTunnel)(nil) +} +func (x fastReflection_MsgDepositTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDepositTunnel) +} +func (x fastReflection_MsgDepositTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositTunnel +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDepositTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositTunnel +} + +// 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_MsgDepositTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgDepositTunnel_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDepositTunnel) New() protoreflect.Message { + return new(fastReflection_MsgDepositTunnel) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDepositTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgDepositTunnel)(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_MsgDepositTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgDepositTunnel_tunnel_id, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{list: &x.Amount}) + if !f(fd_MsgDepositTunnel_amount, value) { + return + } + } + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_MsgDepositTunnel_depositor, 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_MsgDepositTunnel) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + return len(x.Amount) != 0 + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + return x.Depositor != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel 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_MsgDepositTunnel) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + x.Amount = nil + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + x.Depositor = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel 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_MsgDepositTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{}) + } + listValue := &_MsgDepositTunnel_2_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + value := x.Depositor + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel 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_MsgDepositTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgDepositTunnel.amount": + lv := value.List() + clv := lv.(*_MsgDepositTunnel_2_list) + x.Amount = *clv.list + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + x.Depositor = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel 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_MsgDepositTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDepositTunnel.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgDepositTunnel_2_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgDepositTunnel is not mutable")) + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + panic(fmt.Errorf("field depositor of message tunnel.v1beta1.MsgDepositTunnel is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel 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_MsgDepositTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgDepositTunnel.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{list: &list}) + case "tunnel.v1beta1.MsgDepositTunnel.depositor": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel 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_MsgDepositTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDepositTunnel", 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_MsgDepositTunnel) 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_MsgDepositTunnel) 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_MsgDepositTunnel) 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_MsgDepositTunnel) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDepositTunnel) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Depositor) + 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().(*MsgDepositTunnel) + 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.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) + i-- + dAtA[i] = 0x1a + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgDepositTunnel) + 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: MsgDepositTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); 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 Depositor", 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.Depositor = 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_MsgDepositTunnelResponse protoreflect.MessageDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgDepositTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnelResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgDepositTunnelResponse)(nil) + +type fastReflection_MsgDepositTunnelResponse MsgDepositTunnelResponse + +func (x *MsgDepositTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDepositTunnelResponse)(x) +} + +func (x *MsgDepositTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[11] + 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_MsgDepositTunnelResponse_messageType fastReflection_MsgDepositTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDepositTunnelResponse_messageType{} + +type fastReflection_MsgDepositTunnelResponse_messageType struct{} + +func (x fastReflection_MsgDepositTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDepositTunnelResponse)(nil) +} +func (x fastReflection_MsgDepositTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDepositTunnelResponse) +} +func (x fastReflection_MsgDepositTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositTunnelResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDepositTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositTunnelResponse +} + +// 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_MsgDepositTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDepositTunnelResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDepositTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgDepositTunnelResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDepositTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDepositTunnelResponse)(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_MsgDepositTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgDepositTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse 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_MsgDepositTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse 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_MsgDepositTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse 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_MsgDepositTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse 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_MsgDepositTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse 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_MsgDepositTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse 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_MsgDepositTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDepositTunnelResponse", 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_MsgDepositTunnelResponse) 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_MsgDepositTunnelResponse) 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_MsgDepositTunnelResponse) 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_MsgDepositTunnelResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDepositTunnelResponse) + 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.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().(*MsgDepositTunnelResponse) + 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 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().(*MsgDepositTunnelResponse) + 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: MsgDepositTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 _ protoreflect.List = (*_MsgWithdrawTunnel_2_list)(nil) + +type _MsgWithdrawTunnel_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_MsgWithdrawTunnel_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgWithdrawTunnel_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgWithdrawTunnel_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_MsgWithdrawTunnel_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgWithdrawTunnel_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawTunnel_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgWithdrawTunnel_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgWithdrawTunnel_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgWithdrawTunnel protoreflect.MessageDescriptor + fd_MsgWithdrawTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgWithdrawTunnel_amount protoreflect.FieldDescriptor + fd_MsgWithdrawTunnel_withdrawer protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgWithdrawTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnel") + fd_MsgWithdrawTunnel_tunnel_id = md_MsgWithdrawTunnel.Fields().ByName("tunnel_id") + fd_MsgWithdrawTunnel_amount = md_MsgWithdrawTunnel.Fields().ByName("amount") + fd_MsgWithdrawTunnel_withdrawer = md_MsgWithdrawTunnel.Fields().ByName("withdrawer") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawTunnel)(nil) + +type fastReflection_MsgWithdrawTunnel MsgWithdrawTunnel + +func (x *MsgWithdrawTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawTunnel)(x) +} + +func (x *MsgWithdrawTunnel) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[12] + 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_MsgWithdrawTunnel_messageType fastReflection_MsgWithdrawTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawTunnel_messageType{} + +type fastReflection_MsgWithdrawTunnel_messageType struct{} + +func (x fastReflection_MsgWithdrawTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawTunnel)(nil) +} +func (x fastReflection_MsgWithdrawTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawTunnel) +} +func (x fastReflection_MsgWithdrawTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawTunnel +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawTunnel +} + +// 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_MsgWithdrawTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawTunnel_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawTunnel) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawTunnel) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawTunnel)(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_MsgWithdrawTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_MsgWithdrawTunnel_tunnel_id, value) { + return + } + } + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{list: &x.Amount}) + if !f(fd_MsgWithdrawTunnel_amount, value) { + return + } + } + if x.Withdrawer != "" { + value := protoreflect.ValueOfString(x.Withdrawer) + if !f(fd_MsgWithdrawTunnel_withdrawer, 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_MsgWithdrawTunnel) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + return x.TunnelId != uint64(0) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + return len(x.Amount) != 0 + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + return x.Withdrawer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel 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_MsgWithdrawTunnel) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + x.TunnelId = uint64(0) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + x.Amount = nil + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + x.Withdrawer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel 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_MsgWithdrawTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{}) + } + listValue := &_MsgWithdrawTunnel_2_list{list: &x.Amount} + return protoreflect.ValueOfList(listValue) + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + value := x.Withdrawer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel 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_MsgWithdrawTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + x.TunnelId = value.Uint() + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + lv := value.List() + clv := lv.(*_MsgWithdrawTunnel_2_list) + x.Amount = *clv.list + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + x.Withdrawer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel 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_MsgWithdrawTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} + } + value := &_MsgWithdrawTunnel_2_list{list: &x.Amount} + return protoreflect.ValueOfList(value) + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + panic(fmt.Errorf("field withdrawer of message tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel 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_MsgWithdrawTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{list: &list}) + case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel 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_MsgWithdrawTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgWithdrawTunnel", 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_MsgWithdrawTunnel) 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_MsgWithdrawTunnel) 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_MsgWithdrawTunnel) 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_MsgWithdrawTunnel) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawTunnel) + 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.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.Amount) > 0 { + for _, e := range x.Amount { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Withdrawer) + 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().(*MsgWithdrawTunnel) + 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.Withdrawer) > 0 { + i -= len(x.Withdrawer) + copy(dAtA[i:], x.Withdrawer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Withdrawer))) + i-- + dAtA[i] = 0x1a + } + if len(x.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) + 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 x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*MsgWithdrawTunnel) + 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: MsgWithdrawTunnel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 + } + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); 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 Withdrawer", 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.Withdrawer = 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_MsgWithdrawTunnelResponse protoreflect.MessageDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgWithdrawTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnelResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgWithdrawTunnelResponse)(nil) + +type fastReflection_MsgWithdrawTunnelResponse MsgWithdrawTunnelResponse + +func (x *MsgWithdrawTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawTunnelResponse)(x) +} + +func (x *MsgWithdrawTunnelResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[13] + 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_MsgWithdrawTunnelResponse_messageType fastReflection_MsgWithdrawTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawTunnelResponse_messageType{} + +type fastReflection_MsgWithdrawTunnelResponse_messageType struct{} + +func (x fastReflection_MsgWithdrawTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawTunnelResponse)(nil) +} +func (x fastReflection_MsgWithdrawTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawTunnelResponse) +} +func (x fastReflection_MsgWithdrawTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawTunnelResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgWithdrawTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawTunnelResponse +} + +// 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_MsgWithdrawTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawTunnelResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgWithdrawTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawTunnelResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgWithdrawTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawTunnelResponse)(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_MsgWithdrawTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgWithdrawTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse 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_MsgWithdrawTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse 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_MsgWithdrawTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse 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_MsgWithdrawTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse 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_MsgWithdrawTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse 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_MsgWithdrawTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse 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_MsgWithdrawTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgWithdrawTunnelResponse", 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_MsgWithdrawTunnelResponse) 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_MsgWithdrawTunnelResponse) 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_MsgWithdrawTunnelResponse) 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_MsgWithdrawTunnelResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgWithdrawTunnelResponse) + 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.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().(*MsgWithdrawTunnelResponse) + 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 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().(*MsgWithdrawTunnelResponse) + 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: MsgWithdrawTunnelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgUpdateParams = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[14] + 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_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// 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_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(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_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, 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_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tunnel.v1beta1.MsgUpdateParams.authority": + return x.Authority != "" + case "tunnel.v1beta1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgUpdateParams.authority": + x.Authority = "" + case "tunnel.v1beta1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tunnel.v1beta1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "tunnel.v1beta1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tunnel.v1beta1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "tunnel.v1beta1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams 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_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "tunnel.v1beta1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message tunnel.v1beta1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams 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_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tunnel.v1beta1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "tunnel.v1beta1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams 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_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgUpdateParams", 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + 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.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + 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().(*MsgUpdateParams) + 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 x.Params != nil { + encoded, err := options.Marshal(x.Params) + 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.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgUpdateParams) + 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: 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 Authority", 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.Authority = 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 Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_tunnel_v1beta1_tx_proto_init() + md_MsgUpdateParamsResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[15] + 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_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// 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_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(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_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgUpdateParamsResponse", 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + 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.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().(*MsgUpdateParamsResponse) + 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 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().(*MsgUpdateParamsResponse) + 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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: tunnel/v1beta1/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) +) + +// MsgCreateTunnel is the transaction message to create a new tunnel. +type MsgCreateTunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signal_deviations is the list of signal deviations. + SignalDeviations []*SignalDeviation `protobuf:"bytes,1,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations,omitempty"` + // interval is the interval for delivering the signal prices. + Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` + // route is the route for delivering the signal prices + Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + // encoder is the mode of encoding price signal data. + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + // initial_deposit is the deposit value that must be paid at tunnel creation. + InitialDeposit []*v1beta1.Coin `protobuf:"bytes,5,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *MsgCreateTunnel) Reset() { + *x = MsgCreateTunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateTunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateTunnel) ProtoMessage() {} + +// Deprecated: Use MsgCreateTunnel.ProtoReflect.Descriptor instead. +func (*MsgCreateTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgCreateTunnel) GetSignalDeviations() []*SignalDeviation { + if x != nil { + return x.SignalDeviations + } + return nil +} + +func (x *MsgCreateTunnel) GetInterval() uint64 { + if x != nil { + return x.Interval + } + return 0 +} + +func (x *MsgCreateTunnel) GetRoute() *anypb.Any { + if x != nil { + return x.Route + } + return nil +} + +func (x *MsgCreateTunnel) GetEncoder() Encoder { + if x != nil { + return x.Encoder + } + return Encoder_ENCODER_UNSPECIFIED +} + +func (x *MsgCreateTunnel) GetInitialDeposit() []*v1beta1.Coin { + if x != nil { + return x.InitialDeposit + } + return nil +} + +func (x *MsgCreateTunnel) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +// MsgCreateTunnelResponse is the response type for the Msg/CreateTunnel RPC method. +type MsgCreateTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` +} + +func (x *MsgCreateTunnelResponse) Reset() { + *x = MsgCreateTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateTunnelResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreateTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{1} +} + +func (x *MsgCreateTunnelResponse) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +// MsgEditTunnel is the transaction message to edit a tunnel. +type MsgEditTunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to edit. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // signal_deviations is the list of signal deviations. + SignalDeviations []*SignalDeviation `protobuf:"bytes,2,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations,omitempty"` + // interval is the interval for delivering the signal prices. + Interval uint64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *MsgEditTunnel) Reset() { + *x = MsgEditTunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgEditTunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgEditTunnel) ProtoMessage() {} + +// Deprecated: Use MsgEditTunnel.ProtoReflect.Descriptor instead. +func (*MsgEditTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgEditTunnel) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *MsgEditTunnel) GetSignalDeviations() []*SignalDeviation { + if x != nil { + return x.SignalDeviations + } + return nil +} + +func (x *MsgEditTunnel) GetInterval() uint64 { + if x != nil { + return x.Interval + } + return 0 +} + +func (x *MsgEditTunnel) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +// MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. +type MsgEditTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgEditTunnelResponse) Reset() { + *x = MsgEditTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgEditTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgEditTunnelResponse) ProtoMessage() {} + +// Deprecated: Use MsgEditTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgEditTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{3} +} + +// Activate is the transaction message to activate a tunnel. +type MsgActivate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to activate. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *MsgActivate) Reset() { + *x = MsgActivate{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgActivate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgActivate) ProtoMessage() {} + +// Deprecated: Use MsgActivate.ProtoReflect.Descriptor instead. +func (*MsgActivate) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgActivate) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *MsgActivate) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +// MsgActivateResponse is the response type for the Msg/Activate RPC method. +type MsgActivateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgActivateResponse) Reset() { + *x = MsgActivateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgActivateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgActivateResponse) ProtoMessage() {} + +// Deprecated: Use MsgActivateResponse.ProtoReflect.Descriptor instead. +func (*MsgActivateResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{5} +} + +// MsgDeactivate is the transaction message to deactivate a tunnel. +type MsgDeactivate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to deactivate. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *MsgDeactivate) Reset() { + *x = MsgDeactivate{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDeactivate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDeactivate) ProtoMessage() {} + +// Deprecated: Use MsgDeactivate.ProtoReflect.Descriptor instead. +func (*MsgDeactivate) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgDeactivate) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *MsgDeactivate) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +// MsgDeactivateTunnelResponse is the response type for the Msg/Deactivate RPC method. +type MsgDeactivateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgDeactivateResponse) Reset() { + *x = MsgDeactivateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDeactivateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDeactivateResponse) ProtoMessage() {} + +// Deprecated: Use MsgDeactivateResponse.ProtoReflect.Descriptor instead. +func (*MsgDeactivateResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{7} +} + +// MsgTriggerTunnel is the transaction message to manually trigger a tunnel. +type MsgTriggerTunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id is the ID of the tunnel to manually trigger. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // creator is the address of the creator. + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (x *MsgTriggerTunnel) Reset() { + *x = MsgTriggerTunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgTriggerTunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgTriggerTunnel) ProtoMessage() {} + +// Deprecated: Use MsgTriggerTunnel.ProtoReflect.Descriptor instead. +func (*MsgTriggerTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgTriggerTunnel) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *MsgTriggerTunnel) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +// MsgTriggerTunnelResponse is the response type for the Msg/TriggerTunnel RPC method. +type MsgTriggerTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgTriggerTunnelResponse) Reset() { + *x = MsgTriggerTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgTriggerTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgTriggerTunnelResponse) ProtoMessage() {} + +// Deprecated: Use MsgTriggerTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgTriggerTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{9} +} + +// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. +type MsgDepositTunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // amount to be deposited by depositor. + Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` + // depositor defines the deposit addresses from the tunnel. + Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"` +} + +func (x *MsgDepositTunnel) Reset() { + *x = MsgDepositTunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDepositTunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDepositTunnel) ProtoMessage() {} + +// Deprecated: Use MsgDepositTunnel.ProtoReflect.Descriptor instead. +func (*MsgDepositTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgDepositTunnel) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *MsgDepositTunnel) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *MsgDepositTunnel) GetDepositor() string { + if x != nil { + return x.Depositor + } + return "" +} + +// MsgDepositTunnelResponse defines the Msg/Deposit response type. +type MsgDepositTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgDepositTunnelResponse) Reset() { + *x = MsgDepositTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDepositTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDepositTunnelResponse) ProtoMessage() {} + +// Deprecated: Use MsgDepositTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgDepositTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{11} +} + +// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. +type MsgWithdrawTunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // amount to be withdrawn by withdrawer. + Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` + // withdrawer defines the withdraw addresses from the tunnel. + Withdrawer string `protobuf:"bytes,3,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` +} + +func (x *MsgWithdrawTunnel) Reset() { + *x = MsgWithdrawTunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawTunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawTunnel) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawTunnel.ProtoReflect.Descriptor instead. +func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{12} +} + +func (x *MsgWithdrawTunnel) GetTunnelId() uint64 { + if x != nil { + return x.TunnelId + } + return 0 +} + +func (x *MsgWithdrawTunnel) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +func (x *MsgWithdrawTunnel) GetWithdrawer() string { + if x != nil { + return x.Withdrawer + } + return "" +} + +// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. +type MsgWithdrawTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgWithdrawTunnelResponse) Reset() { + *x = MsgWithdrawTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgWithdrawTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgWithdrawTunnelResponse) ProtoMessage() {} + +// Deprecated: Use MsgWithdrawTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{13} +} + +// MsgUpdateParams is the transaction message to update parameters. +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params is the x/tunnel parameters to update. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{14} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse is the response type for the Msg/UpdateParams RPC method. +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tunnel_v1beta1_tx_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{15} +} + +var File_tunnel_v1beta1_tx_proto protoreflect.FileDescriptor + +var file_tunnel_v1beta1_tx_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 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, 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, 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, 0x11, 0x61, 0x6d, 0x69, + 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x03, 0x0a, 0x0f, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, + 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, + 0x35, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, 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, 0x09, 0xca, 0xb4, 0x2d, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x0f, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x03, + 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, 0x35, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x27, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x22, 0x44, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x09, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x85, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x45, + 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, + 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, + 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, 0x13, + 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4d, + 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, + 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, + 0x02, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1a, + 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x4d, + 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, + 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, + 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, + 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, + 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, + 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x58, 0x0a, 0x0c, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1f, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x27, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x1a, 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x44, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, + 0x28, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x28, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x29, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb9, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, + 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tunnel_v1beta1_tx_proto_rawDescOnce sync.Once + file_tunnel_v1beta1_tx_proto_rawDescData = file_tunnel_v1beta1_tx_proto_rawDesc +) + +func file_tunnel_v1beta1_tx_proto_rawDescGZIP() []byte { + file_tunnel_v1beta1_tx_proto_rawDescOnce.Do(func() { + file_tunnel_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_tx_proto_rawDescData) + }) + return file_tunnel_v1beta1_tx_proto_rawDescData +} + +var file_tunnel_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_tunnel_v1beta1_tx_proto_goTypes = []interface{}{ + (*MsgCreateTunnel)(nil), // 0: tunnel.v1beta1.MsgCreateTunnel + (*MsgCreateTunnelResponse)(nil), // 1: tunnel.v1beta1.MsgCreateTunnelResponse + (*MsgEditTunnel)(nil), // 2: tunnel.v1beta1.MsgEditTunnel + (*MsgEditTunnelResponse)(nil), // 3: tunnel.v1beta1.MsgEditTunnelResponse + (*MsgActivate)(nil), // 4: tunnel.v1beta1.MsgActivate + (*MsgActivateResponse)(nil), // 5: tunnel.v1beta1.MsgActivateResponse + (*MsgDeactivate)(nil), // 6: tunnel.v1beta1.MsgDeactivate + (*MsgDeactivateResponse)(nil), // 7: tunnel.v1beta1.MsgDeactivateResponse + (*MsgTriggerTunnel)(nil), // 8: tunnel.v1beta1.MsgTriggerTunnel + (*MsgTriggerTunnelResponse)(nil), // 9: tunnel.v1beta1.MsgTriggerTunnelResponse + (*MsgDepositTunnel)(nil), // 10: tunnel.v1beta1.MsgDepositTunnel + (*MsgDepositTunnelResponse)(nil), // 11: tunnel.v1beta1.MsgDepositTunnelResponse + (*MsgWithdrawTunnel)(nil), // 12: tunnel.v1beta1.MsgWithdrawTunnel + (*MsgWithdrawTunnelResponse)(nil), // 13: tunnel.v1beta1.MsgWithdrawTunnelResponse + (*MsgUpdateParams)(nil), // 14: tunnel.v1beta1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 15: tunnel.v1beta1.MsgUpdateParamsResponse + (*SignalDeviation)(nil), // 16: tunnel.v1beta1.SignalDeviation + (*anypb.Any)(nil), // 17: google.protobuf.Any + (Encoder)(0), // 18: tunnel.v1beta1.Encoder + (*v1beta1.Coin)(nil), // 19: cosmos.base.v1beta1.Coin + (*Params)(nil), // 20: tunnel.v1beta1.Params +} +var file_tunnel_v1beta1_tx_proto_depIdxs = []int32{ + 16, // 0: tunnel.v1beta1.MsgCreateTunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation + 17, // 1: tunnel.v1beta1.MsgCreateTunnel.route:type_name -> google.protobuf.Any + 18, // 2: tunnel.v1beta1.MsgCreateTunnel.encoder:type_name -> tunnel.v1beta1.Encoder + 19, // 3: tunnel.v1beta1.MsgCreateTunnel.initial_deposit:type_name -> cosmos.base.v1beta1.Coin + 16, // 4: tunnel.v1beta1.MsgEditTunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation + 19, // 5: tunnel.v1beta1.MsgDepositTunnel.amount:type_name -> cosmos.base.v1beta1.Coin + 19, // 6: tunnel.v1beta1.MsgWithdrawTunnel.amount:type_name -> cosmos.base.v1beta1.Coin + 20, // 7: tunnel.v1beta1.MsgUpdateParams.params:type_name -> tunnel.v1beta1.Params + 0, // 8: tunnel.v1beta1.Msg.CreateTunnel:input_type -> tunnel.v1beta1.MsgCreateTunnel + 2, // 9: tunnel.v1beta1.Msg.EditTunnel:input_type -> tunnel.v1beta1.MsgEditTunnel + 4, // 10: tunnel.v1beta1.Msg.Activate:input_type -> tunnel.v1beta1.MsgActivate + 6, // 11: tunnel.v1beta1.Msg.Deactivate:input_type -> tunnel.v1beta1.MsgDeactivate + 8, // 12: tunnel.v1beta1.Msg.TriggerTunnel:input_type -> tunnel.v1beta1.MsgTriggerTunnel + 10, // 13: tunnel.v1beta1.Msg.DepositTunnel:input_type -> tunnel.v1beta1.MsgDepositTunnel + 12, // 14: tunnel.v1beta1.Msg.WithdrawTunnel:input_type -> tunnel.v1beta1.MsgWithdrawTunnel + 14, // 15: tunnel.v1beta1.Msg.UpdateParams:input_type -> tunnel.v1beta1.MsgUpdateParams + 1, // 16: tunnel.v1beta1.Msg.CreateTunnel:output_type -> tunnel.v1beta1.MsgCreateTunnelResponse + 3, // 17: tunnel.v1beta1.Msg.EditTunnel:output_type -> tunnel.v1beta1.MsgEditTunnelResponse + 5, // 18: tunnel.v1beta1.Msg.Activate:output_type -> tunnel.v1beta1.MsgActivateResponse + 7, // 19: tunnel.v1beta1.Msg.Deactivate:output_type -> tunnel.v1beta1.MsgDeactivateResponse + 9, // 20: tunnel.v1beta1.Msg.TriggerTunnel:output_type -> tunnel.v1beta1.MsgTriggerTunnelResponse + 11, // 21: tunnel.v1beta1.Msg.DepositTunnel:output_type -> tunnel.v1beta1.MsgDepositTunnelResponse + 13, // 22: tunnel.v1beta1.Msg.WithdrawTunnel:output_type -> tunnel.v1beta1.MsgWithdrawTunnelResponse + 15, // 23: tunnel.v1beta1.Msg.UpdateParams:output_type -> tunnel.v1beta1.MsgUpdateParamsResponse + 16, // [16:24] is the sub-list for method output_type + 8, // [8:16] 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_tunnel_v1beta1_tx_proto_init() } +func file_tunnel_v1beta1_tx_proto_init() { + if File_tunnel_v1beta1_tx_proto != nil { + return + } + file_tunnel_v1beta1_params_proto_init() + file_tunnel_v1beta1_tunnel_proto_init() + if !protoimpl.UnsafeEnabled { + file_tunnel_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateTunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateTunnelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgEditTunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgEditTunnelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgActivate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgActivateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDeactivate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDeactivateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTriggerTunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTriggerTunnelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDepositTunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDepositTunnelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawTunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgWithdrawTunnelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tunnel_v1beta1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); 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_tunnel_v1beta1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tunnel_v1beta1_tx_proto_goTypes, + DependencyIndexes: file_tunnel_v1beta1_tx_proto_depIdxs, + MessageInfos: file_tunnel_v1beta1_tx_proto_msgTypes, + }.Build() + File_tunnel_v1beta1_tx_proto = out.File + file_tunnel_v1beta1_tx_proto_rawDesc = nil + file_tunnel_v1beta1_tx_proto_goTypes = nil + file_tunnel_v1beta1_tx_proto_depIdxs = nil +} diff --git a/api/tunnel/v1beta1/tx_grpc.pb.go b/api/tunnel/v1beta1/tx_grpc.pb.go new file mode 100644 index 000000000..998a3b664 --- /dev/null +++ b/api/tunnel/v1beta1/tx_grpc.pb.go @@ -0,0 +1,384 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: tunnel/v1beta1/tx.proto + +package tunnelv1beta1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_CreateTunnel_FullMethodName = "/tunnel.v1beta1.Msg/CreateTunnel" + Msg_EditTunnel_FullMethodName = "/tunnel.v1beta1.Msg/EditTunnel" + Msg_Activate_FullMethodName = "/tunnel.v1beta1.Msg/Activate" + Msg_Deactivate_FullMethodName = "/tunnel.v1beta1.Msg/Deactivate" + Msg_TriggerTunnel_FullMethodName = "/tunnel.v1beta1.Msg/TriggerTunnel" + Msg_DepositTunnel_FullMethodName = "/tunnel.v1beta1.Msg/DepositTunnel" + Msg_WithdrawTunnel_FullMethodName = "/tunnel.v1beta1.Msg/WithdrawTunnel" + Msg_UpdateParams_FullMethodName = "/tunnel.v1beta1.Msg/UpdateParams" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // CreateTunnel is a RPC method to create a new tunnel. + CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) + // EditTunnel is a RPC method to edit a tunnel. + EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) + // Activate is a RPC method to activate a tunnel. + Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) + // Deactivate is a RPC method to deactivate a tunnel. + Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) + // TriggerTunnel is a RPC method to manually trigger a tunnel. + TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) + // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. + DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) + // UpdateParams is a RPC method to update parameters + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) { + out := new(MsgCreateTunnelResponse) + err := c.cc.Invoke(ctx, Msg_CreateTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) { + out := new(MsgEditTunnelResponse) + err := c.cc.Invoke(ctx, Msg_EditTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) { + out := new(MsgActivateResponse) + err := c.cc.Invoke(ctx, Msg_Activate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) { + out := new(MsgDeactivateResponse) + err := c.cc.Invoke(ctx, Msg_Deactivate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) { + out := new(MsgTriggerTunnelResponse) + err := c.cc.Invoke(ctx, Msg_TriggerTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) { + out := new(MsgDepositTunnelResponse) + err := c.cc.Invoke(ctx, Msg_DepositTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) { + out := new(MsgWithdrawTunnelResponse) + err := c.cc.Invoke(ctx, Msg_WithdrawTunnel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // CreateTunnel is a RPC method to create a new tunnel. + CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) + // EditTunnel is a RPC method to edit a tunnel. + EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) + // Activate is a RPC method to activate a tunnel. + Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) + // Deactivate is a RPC method to deactivate a tunnel. + Deactivate(context.Context, *MsgDeactivate) (*MsgDeactivateResponse, error) + // TriggerTunnel is a RPC method to manually trigger a tunnel. + TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) + // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. + DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) + // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) + // UpdateParams is a RPC method to update parameters + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTunnel not implemented") +} +func (UnimplementedMsgServer) EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EditTunnel not implemented") +} +func (UnimplementedMsgServer) Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") +} +func (UnimplementedMsgServer) Deactivate(context.Context, *MsgDeactivate) (*MsgDeactivateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deactivate not implemented") +} +func (UnimplementedMsgServer) TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TriggerTunnel not implemented") +} +func (UnimplementedMsgServer) DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositTunnel not implemented") +} +func (UnimplementedMsgServer) WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawTunnel not implemented") +} +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_CreateTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateTunnel(ctx, req.(*MsgCreateTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_EditTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEditTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).EditTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_EditTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).EditTunnel(ctx, req.(*MsgEditTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Activate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgActivate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Activate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Activate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Activate(ctx, req.(*MsgActivate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Deactivate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeactivate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Deactivate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Deactivate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Deactivate(ctx, req.(*MsgDeactivate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTriggerTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TriggerTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_TriggerTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TriggerTunnel(ctx, req.(*MsgTriggerTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DepositTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_DepositTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DepositTunnel(ctx, req.(*MsgDepositTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_WithdrawTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawTunnel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_WithdrawTunnel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawTunnel(ctx, req.(*MsgWithdrawTunnel)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tunnel.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateTunnel", + Handler: _Msg_CreateTunnel_Handler, + }, + { + MethodName: "EditTunnel", + Handler: _Msg_EditTunnel_Handler, + }, + { + MethodName: "Activate", + Handler: _Msg_Activate_Handler, + }, + { + MethodName: "Deactivate", + Handler: _Msg_Deactivate_Handler, + }, + { + MethodName: "TriggerTunnel", + Handler: _Msg_TriggerTunnel_Handler, + }, + { + MethodName: "DepositTunnel", + Handler: _Msg_DepositTunnel_Handler, + }, + { + MethodName: "WithdrawTunnel", + Handler: _Msg_WithdrawTunnel_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tunnel/v1beta1/tx.proto", +} diff --git a/app/ante.go b/app/ante.go index 2d015275e..24b1b5911 100644 --- a/app/ante.go +++ b/app/ante.go @@ -17,7 +17,6 @@ import ( globalfeekeeper "github.com/bandprotocol/chain/v3/x/globalfee/keeper" oraclekeeper "github.com/bandprotocol/chain/v3/x/oracle/keeper" tsskeeper "github.com/bandprotocol/chain/v3/x/tss/keeper" - tunnelkeeper "github.com/bandprotocol/chain/v3/x/tunnel/keeper" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC @@ -33,7 +32,6 @@ type HandlerOptions struct { TSSKeeper *tsskeeper.Keeper BandtssKeeper *bandtsskeeper.Keeper FeedsKeeper *feedskeeper.Keeper - TunnelKeeper *tunnelkeeper.Keeper } func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { @@ -64,9 +62,6 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { if options.FeedsKeeper == nil { return nil, sdkerrors.ErrLogic.Wrap("feeds keeper is required for AnteHandler") } - if options.TunnelKeeper == nil { - return nil, sdkerrors.ErrLogic.Wrap("tunnel keeper is required for AnteHandler") - } if options.IBCKeeper == nil { return nil, sdkerrors.ErrLogic.Wrap("IBC keeper is required for AnteHandler") } diff --git a/app/app.go b/app/app.go index 1e2b9c62a..5c9592d23 100644 --- a/app/app.go +++ b/app/app.go @@ -273,7 +273,6 @@ func NewBandApp( TSSKeeper: app.TSSKeeper, BandtssKeeper: app.BandtssKeeper, FeedsKeeper: &app.FeedsKeeper, - TunnelKeeper: &app.TunnelKeeper, IBCKeeper: app.IBCKeeper, StakingKeeper: app.StakingKeeper, GlobalfeeKeeper: &app.GlobalFeeKeeper, diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/tunnel/v1beta1/genesis.proto index a86058ab0..5d66ecdaa 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/tunnel/v1beta1/genesis.proto @@ -17,6 +17,8 @@ message GenesisState { repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; // latest_signal_prices_list is the list of latest signal prices. repeated LatestSignalPrices latest_signal_prices_list = 4 [(gogoproto.nullable) = false]; + // deposits is the list of deposits. + repeated Deposit deposits = 5 [(gogoproto.nullable) = false]; // total_fees is the type for the total fees collected by the tunnel - TotalFees total_fees = 5 [(gogoproto.nullable) = false]; + TotalFees total_fees = 6 [(gogoproto.nullable) = false]; } diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/tunnel/v1beta1/tunnel.proto index 6a171896f..b28f792c5 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/tunnel/v1beta1/tunnel.proto @@ -22,16 +22,6 @@ message TSSRoute { string destination_contract_address = 2; } -// AxelarRoute is the type for an Axelar route -message AxelarRoute { - option (cosmos_proto.implements_interface) = "RouteI"; - - // destination_chain_id is the destination chain ID - string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; - // destination_contract_address is the destination contract address - string destination_contract_address = 2; -} - // SignalDeviation is the type for a signal with soft and hard deviation message SignalDeviation { option (gogoproto.equal) = true; @@ -152,18 +142,6 @@ message TSSPacketContent { string destination_contract_address = 3; } -// AxelarPacketContent is the packet content for Axelar -message AxelarPacketContent { - option (cosmos_proto.implements_interface) = "PacketContentI"; - - // ibc_queue_id is the IBC queue ID - uint64 ibc_queue_id = 1 [(gogoproto.customname) = "IBCQueueID"]; - // destination_chain_id is the destination chain ID - string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; - // destination_contract_address is the destination contract address - string destination_contract_address = 3; -} - // Encoder is an enumerator that defines the mode of encoding message in tunnel module. enum Encoder { option (gogoproto.goproto_enum_prefix) = false; diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index c9f415f00..6b2df6a6c 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -6,9 +6,6 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/keeper" ) -func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { -} - func EndBlocker(ctx sdk.Context, k keeper.Keeper) error { // produce packets for all tunnels that are active and have passed the interval time trigger // or deviated from the last price to destination route diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index da0dc86d9..ca0b4bb49 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -23,13 +23,15 @@ func GetTxCmd() *cobra.Command { RunE: client.ValidateCmd, } - txCmd.AddCommand(GetTxCmdCreateTunnel()) - txCmd.AddCommand(GetTxCmdEditTunnel()) - txCmd.AddCommand(GetTxCmdActivate()) - txCmd.AddCommand(GetTxCmdDeactivate()) - txCmd.AddCommand(GetTxCmdTriggerTunnel()) - txCmd.AddCommand(GetTxCmdDepositTunnel()) - txCmd.AddCommand(GetTxCmdWithdrawTunnel()) + txCmd.AddCommand( + GetTxCmdCreateTunnel(), + GetTxCmdEditTunnel(), + GetTxCmdActivate(), + GetTxCmdDeactivate(), + GetTxCmdTriggerTunnel(), + GetTxCmdDepositTunnel(), + GetTxCmdWithdrawTunnel(), + ) return txCmd } diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index 75eca435a..117b134c0 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -2,6 +2,7 @@ package cli import ( "encoding/json" + "errors" "os" "github.com/bandprotocol/chain/v3/x/tunnel/types" @@ -38,7 +39,7 @@ func parseSignalDeviations(signalDeviationsFile string) (SignalDeviations, error var signalDeviations SignalDeviations if signalDeviationsFile == "" { - return SignalDeviations{}, nil + return SignalDeviations{}, errors.New("signal deviations file is required") } contents, err := os.ReadFile(signalDeviationsFile) diff --git a/x/tunnel/client/cli/util_test.go b/x/tunnel/client/cli/util_test.go index 6cbfdbab7..809ddcddb 100644 --- a/x/tunnel/client/cli/util_test.go +++ b/x/tunnel/client/cli/util_test.go @@ -9,28 +9,17 @@ import ( ) func TestParseSignalDeviations(t *testing.T) { - // test case for valid signal deviations - t.Run("valid signal deviations", func(t *testing.T) { - signalDeviations := []SignalDeviation{ - {SignalID: "BTC", DeviationBPS: 2000}, - {SignalID: "ETH", DeviationBPS: 4000}, - } - file, cleanup := createTempSignalDeviationFile(signalDeviations) - defer cleanup() - - result, err := parseSignalDeviations(file) - - require.NoError(t, err) - require.Equal(t, signalDeviations, result.SignalDeviations) - }) - - // test case for empty file path - t.Run("empty file path", func(t *testing.T) { - result, err := parseSignalDeviations("") - - require.NoError(t, err) - require.Equal(t, SignalDeviations{}, result) - }) + signalDeviations := []SignalDeviation{ + {SignalID: "BTC", DeviationBPS: 2000}, + {SignalID: "ETH", DeviationBPS: 4000}, + } + file, cleanup := createTempSignalDeviationFile(signalDeviations) + defer cleanup() + + result, err := parseSignalDeviations(file) + + require.NoError(t, err) + require.Equal(t, signalDeviations, result.SignalDeviations) } // Helper function to create a temporary file with signal info JSON content diff --git a/x/tunnel/keeper/axelar_packet_handler.go b/x/tunnel/keeper/axelar_packet_handler.go deleted file mode 100644 index aa0bb25c1..000000000 --- a/x/tunnel/keeper/axelar_packet_handler.go +++ /dev/null @@ -1,16 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/bandprotocol/chain/v3/x/tunnel/types" -) - -// TODO: SendAxelarPacket sends Axelar packet -func (k Keeper) SendAxelarPacket( - ctx sdk.Context, - route *types.AxelarRoute, - packet types.Packet, -) (types.PacketContentI, error) { - return nil, nil -} diff --git a/x/tunnel/keeper/axelar_packet_handler_test.go b/x/tunnel/keeper/axelar_packet_handler_test.go deleted file mode 100644 index e3636c18d..000000000 --- a/x/tunnel/keeper/axelar_packet_handler_test.go +++ /dev/null @@ -1,8 +0,0 @@ -package keeper_test - -import ( - "testing" -) - -// TODO: TestSendAxelarPacket tests SendAxelarPacket -func TestSendAxelarPacket(t *testing.T) {} diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 237d4d5c7..3c48d6859 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -71,7 +71,7 @@ func (k Keeper) GetDeposit( return deposit, true } -// GetDeposits retrieves all deposits for a tunnel +// GetDeposits retrieves all deposits for the tunnel func (k Keeper) GetDeposits(ctx sdk.Context, tunnelID uint64) []types.Deposit { var deposits []types.Deposit iterator := storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.DepositsStoreKey(tunnelID)) @@ -86,6 +86,37 @@ func (k Keeper) GetDeposits(ctx sdk.Context, tunnelID uint64) []types.Deposit { return deposits } +// GetAllDeposits returns all deposits in the store +func (k Keeper) GetAllDeposits(ctx sdk.Context) []types.Deposit { + var deposits []types.Deposit + iterator := storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.DepositStoreKeyPrefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var deposit types.Deposit + k.cdc.MustUnmarshal(iterator.Value(), &deposit) + deposits = append(deposits, deposit) + } + + return deposits +} + +// GetTotalDeposits returns the total deposits in the store +func (k Keeper) GetTotalDeposits(ctx sdk.Context) sdk.Coins { + var amount sdk.Coins + + iterator := storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.DepositStoreKeyPrefix) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var deposit types.Deposit + k.cdc.MustUnmarshal(iterator.Value(), &deposit) + amount = amount.Add(deposit.Amount...) + } + + return amount +} + // DeleteDeposit deletes a deposit from the store func (k Keeper) DeleteDeposit(ctx sdk.Context, tunnelID uint64, depositorAddr sdk.AccAddress) { ctx.KVStore(k.storeKey). diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index 654afd9a6..0cd6a62c2 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -66,6 +66,50 @@ func (s *KeeperTestSuite) TestGetDeposits() { s.Require().Equal(deposit, deposits[0]) } +func (s *KeeperTestSuite) TestGetAllDeposits() { + ctx, k := s.ctx, s.keeper + + tunnelID1 := uint64(1) + depositorAddr1 := sdk.AccAddress([]byte("depositor")) + depositAmount1 := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))) + + deposit1 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr1.String(), Amount: depositAmount1} + k.SetDeposit(ctx, deposit1) + + tunnelID2 := uint64(2) + depositorAddr2 := sdk.AccAddress([]byte("depositor")) + depositAmount2 := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(200))) + + deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr2.String(), Amount: depositAmount2} + k.SetDeposit(ctx, deposit2) + + deposits := k.GetAllDeposits(ctx) + s.Require().Len(deposits, 2) + s.Require().Equal(deposit1, deposits[0]) + s.Require().Equal(deposit2, deposits[1]) +} + +func (s *KeeperTestSuite) TestGetTotalDeposits() { + ctx, k := s.ctx, s.keeper + + tunnelID1 := uint64(1) + depositorAddr1 := sdk.AccAddress([]byte("depositor")) + depositAmount1 := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))) + + deposit := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr1.String(), Amount: depositAmount1} + k.SetDeposit(ctx, deposit) + + tunnelID2 := uint64(2) + depositorAddr2 := sdk.AccAddress([]byte("depositor2")) + depositAmount2 := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(200))) + + deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr2.String(), Amount: depositAmount2} + k.SetDeposit(ctx, deposit2) + + deposits := k.GetTotalDeposits(ctx) + s.Require().Equal(depositAmount1.Add(depositAmount2...), deposits) +} + func (s *KeeperTestSuite) TestDeleteDeposit() { ctx, k := s.ctx, s.keeper diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 2117d9183..662827a46 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -22,6 +22,8 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { // set module account if its balance is zero if balance := k.GetModuleBalance(ctx); balance.IsZero() { k.SetModuleAccount(ctx, moduleAcc) + } else if !balance.Equal(k.GetTotalDeposits(ctx).Add(k.GetTotalFees(ctx).TotalPacketFee...)) { + panic("balance in the module account is not equal to the sum of total fees and total deposits") } // set the tunnel count @@ -40,6 +42,11 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { k.SetLatestSignalPrices(ctx, latestSignalPrices) } + // set the deposits + for _, deposit := range data.Deposits { + k.SetDeposit(ctx, deposit) + } + // set the total fees k.SetTotalFees(ctx, data.TotalFees) } @@ -51,6 +58,7 @@ func ExportGenesis(ctx sdk.Context, k Keeper) *types.GenesisState { TunnelCount: k.GetTunnelCount(ctx), Tunnels: k.GetTunnels(ctx), LatestSignalPricesList: k.GetAllLatestSignalPrices(ctx), + Deposits: k.GetAllDeposits(ctx), TotalFees: k.GetTotalFees(ctx), } } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 99e26b0a5..3f342c04b 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -162,8 +162,6 @@ func (k Keeper) SendPacket( switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: content, err = k.SendTSSPacket(ctx, r, packet) - case *types.AxelarRoute: - content, err = k.SendAxelarPacket(ctx, r, packet) default: return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index a1aa445a2..c42e0010e 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -3,8 +3,6 @@ package keeper_test import ( "go.uber.org/mock/gomock" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" @@ -74,7 +72,7 @@ func (s *KeeperTestSuite) TestProducePacket() { } s.bankKeeper.EXPECT(). - SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(10)))). + SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, k.GetParams(ctx).BasePacketFee). Return(nil) err := tunnel.SetRoute(route) diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 499e79be4..5dfb2cd43 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -233,12 +233,12 @@ func (k Keeper) MustDeactivateTunnel(ctx sdk.Context, tunnelID uint64) { // SetTotalFees sets the total fees in the store func (k Keeper) SetTotalFees(ctx sdk.Context, totalFee types.TotalFees) { - ctx.KVStore(k.storeKey).Set(types.TotalPacketFeeStoreKey, k.cdc.MustMarshal(&totalFee)) + ctx.KVStore(k.storeKey).Set(types.TotalFeeStoreKey, k.cdc.MustMarshal(&totalFee)) } // GetTotalFees retrieves the total fees from the store func (k Keeper) GetTotalFees(ctx sdk.Context) types.TotalFees { - bz := ctx.KVStore(k.storeKey).Get(types.TotalPacketFeeStoreKey) + bz := ctx.KVStore(k.storeKey).Get(types.TotalFeeStoreKey) if bz == nil { return types.TotalFees{} } diff --git a/x/tunnel/types/axelar_route.go b/x/tunnel/types/axelar_route.go deleted file mode 100644 index b380cd5b6..000000000 --- a/x/tunnel/types/axelar_route.go +++ /dev/null @@ -1,7 +0,0 @@ -package types - -var _ RouteI = &AxelarRoute{} - -func (r *AxelarRoute) ValidateBasic() error { - return nil -} diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 303715509..7d6bb9cb8 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -29,10 +29,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterInterface((*RouteI)(nil), nil) cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) - cdc.RegisterConcrete(&AxelarRoute{}, "tunnel/AxelarRoute", nil) cdc.RegisterInterface((*PacketContentI)(nil), nil) cdc.RegisterConcrete(&TSSPacketContent{}, "tunnel/TSSPacketContent", nil) - cdc.RegisterConcrete(&AxelarPacketContent{}, "tunnel/AxelarPacketContent", nil) } // RegisterInterfaces registers the x/tunnel interfaces types with the interface registry @@ -53,14 +51,12 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { "tunnel.v1beta1.RouteI", (*RouteI)(nil), &TSSRoute{}, - &AxelarRoute{}, ) registry.RegisterInterface( "tunnel.v1beta1.PacketContentI", (*PacketContentI)(nil), &TSSPacketContent{}, - &AxelarPacketContent{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 071995aab..11c3834ff 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -14,7 +14,7 @@ import ( type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx context.Context, name string) sdk.ModuleAccountI - SetModuleAccount(context.Context, sdk.ModuleAccountI) + SetModuleAccount(ctx context.Context, moduleAccount sdk.ModuleAccountI) GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI NewAccount(ctx context.Context, account sdk.AccountI) sdk.AccountI diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 8e8e32482..873d41dd0 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -32,10 +32,15 @@ func ValidateGenesis(data GenesisState) error { } // validate the tunnel IDs + tunnelIDMap := make(map[uint64]bool) for _, t := range data.Tunnels { if t.ID > data.TunnelCount { return ErrInvalidGenesis.Wrapf("tunnel count mismatch in tunnels") } + if _, exists := tunnelIDMap[t.ID]; exists { + return ErrInvalidGenesis.Wrapf("duplicate tunnel ID found: %d", t.ID) + } + tunnelIDMap[t.ID] = true } // validate the latest signal prices count @@ -67,24 +72,25 @@ func (tf TotalFees) Validate() error { // validateLastSignalPricesList validates the latest signal prices list. func validateLastSignalPricesList( tunnels []Tunnel, - lsps []LatestSignalPrices, + latestSignalPricesList []LatestSignalPrices, ) error { - if len(tunnels) != len(lsps) { + if len(tunnels) != len(latestSignalPricesList) { return fmt.Errorf("tunnels and latest signal prices list length mismatch") } - tunnelMap := make(map[uint64]bool) + tunnelIDMap := make(map[uint64]bool) for _, t := range tunnels { - tunnelMap[t.ID] = true + tunnelIDMap[t.ID] = true } - for _, lsp := range lsps { - if _, ok := tunnelMap[lsp.TunnelID]; !ok { - return fmt.Errorf("tunnel ID %d not found in tunnels", lsp.TunnelID) + for _, latestSignalPrices := range latestSignalPricesList { + if !tunnelIDMap[latestSignalPrices.TunnelID] { + return fmt.Errorf("tunnel ID %d not found in tunnels", latestSignalPrices.TunnelID) } - if err := lsp.Validate(); err != nil { + if err := latestSignalPrices.Validate(); err != nil { return err } } + return nil } diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 910a41ab6..3f3f2f2b2 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -33,8 +33,10 @@ type GenesisState struct { Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` // latest_signal_prices_list is the list of latest signal prices. LatestSignalPricesList []LatestSignalPrices `protobuf:"bytes,4,rep,name=latest_signal_prices_list,json=latestSignalPricesList,proto3" json:"latest_signal_prices_list"` + // deposits is the list of deposits. + Deposits []Deposit `protobuf:"bytes,5,rep,name=deposits,proto3" json:"deposits"` // total_fees is the type for the total fees collected by the tunnel - TotalFees TotalFees `protobuf:"bytes,5,opt,name=total_fees,json=totalFees,proto3" json:"total_fees"` + TotalFees TotalFees `protobuf:"bytes,6,opt,name=total_fees,json=totalFees,proto3" json:"total_fees"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -98,6 +100,13 @@ func (m *GenesisState) GetLatestSignalPricesList() []LatestSignalPrices { return nil } +func (m *GenesisState) GetDeposits() []Deposit { + if m != nil { + return m.Deposits + } + return nil +} + func (m *GenesisState) GetTotalFees() TotalFees { if m != nil { return m.TotalFees @@ -112,28 +121,29 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } var fileDescriptor_cb87d9373a74da2e = []byte{ - // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0x4f, 0x02, 0x31, - 0x14, 0xc7, 0xef, 0x00, 0x31, 0x16, 0xe2, 0x70, 0x31, 0xe4, 0x40, 0x73, 0x22, 0x13, 0xd3, 0x35, - 0xa0, 0x71, 0x74, 0xd0, 0x44, 0x63, 0xc2, 0x40, 0xc0, 0xc9, 0xe5, 0xd2, 0xab, 0xf5, 0x68, 0x52, - 0xda, 0x0b, 0x7d, 0x10, 0xfd, 0x16, 0x7e, 0x28, 0x07, 0x46, 0x46, 0x27, 0x63, 0xe0, 0x8b, 0x18, - 0xda, 0x4a, 0x22, 0xe8, 0x76, 0xef, 0xfd, 0x7f, 0xef, 0x77, 0xaf, 0x2d, 0x3a, 0x81, 0xa9, 0x94, - 0x4c, 0xe0, 0x59, 0x27, 0x65, 0x40, 0x3a, 0x38, 0x63, 0x92, 0x69, 0xae, 0xe3, 0x7c, 0xa2, 0x40, - 0x05, 0x87, 0x36, 0x8d, 0x5d, 0xda, 0x38, 0xca, 0x54, 0xa6, 0x4c, 0x84, 0xd7, 0x5f, 0x96, 0x6a, - 0x1c, 0x6f, 0x39, 0x72, 0x32, 0x21, 0x63, 0xfd, 0x4f, 0xe8, 0x8c, 0x26, 0x6c, 0xbd, 0x17, 0x50, - 0xf5, 0xce, 0xfe, 0x71, 0x08, 0x04, 0x58, 0x70, 0x81, 0xca, 0x76, 0x3a, 0xf4, 0x9b, 0x7e, 0xbb, - 0xd2, 0xad, 0xc5, 0xbf, 0x37, 0x88, 0xfb, 0x26, 0xbd, 0x2e, 0xcd, 0x3f, 0x4f, 0xbd, 0x81, 0x63, - 0x83, 0x33, 0x54, 0xb5, 0x58, 0x42, 0xd5, 0x54, 0x42, 0x58, 0x68, 0xfa, 0xed, 0xd2, 0xa0, 0x62, - 0x7b, 0x37, 0xeb, 0x56, 0x70, 0x89, 0xf6, 0x6d, 0xa9, 0xc3, 0x62, 0xb3, 0xf8, 0x97, 0xf9, 0xc1, - 0x94, 0xce, 0xfc, 0x03, 0x07, 0x14, 0xd5, 0x05, 0x01, 0xa6, 0x21, 0xd1, 0x3c, 0x93, 0x44, 0x24, - 0xf9, 0x84, 0x53, 0xa6, 0x13, 0xc1, 0x35, 0x84, 0x25, 0x63, 0x6a, 0x6d, 0x9b, 0x7a, 0x66, 0x60, - 0x68, 0xf8, 0xbe, 0xc1, 0x9d, 0xb5, 0x26, 0x76, 0x92, 0x1e, 0xd7, 0x10, 0x5c, 0x21, 0x04, 0x0a, - 0x88, 0x48, 0x9e, 0x19, 0xd3, 0xe1, 0x9e, 0x39, 0x79, 0x7d, 0x67, 0xbf, 0x35, 0x71, 0xcb, 0x36, - 0xb2, 0x03, 0xd8, 0x34, 0xee, 0xe7, 0xcb, 0xc8, 0x5f, 0x2c, 0x23, 0xff, 0x6b, 0x19, 0xf9, 0x6f, - 0xab, 0xc8, 0x5b, 0xac, 0x22, 0xef, 0x63, 0x15, 0x79, 0x8f, 0x38, 0xe3, 0x30, 0x9a, 0xa6, 0x31, - 0x55, 0x63, 0x9c, 0x12, 0xf9, 0x64, 0xae, 0x9d, 0x2a, 0x81, 0xe9, 0x88, 0x70, 0x89, 0x67, 0x5d, - 0xfc, 0xe2, 0x5e, 0x04, 0xc3, 0x6b, 0xce, 0x74, 0x5a, 0x36, 0xc4, 0xf9, 0x77, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x62, 0xf3, 0x3f, 0xa4, 0x18, 0x02, 0x00, 0x00, + // 351 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4f, 0xf2, 0x30, + 0x18, 0x80, 0x37, 0xe0, 0xe3, 0xd3, 0x42, 0x3c, 0x2c, 0x06, 0x07, 0x9a, 0x89, 0x9c, 0x38, 0xad, + 0x41, 0x8c, 0x89, 0x17, 0x0f, 0x6a, 0x34, 0x26, 0x1c, 0x08, 0x78, 0xf2, 0xb2, 0x74, 0xa3, 0x8e, + 0x26, 0xa5, 0x5d, 0xe8, 0x0b, 0xd1, 0x7f, 0xe1, 0xcf, 0xe2, 0xc8, 0xd1, 0x93, 0x31, 0xf0, 0x43, + 0x34, 0xb4, 0x95, 0x44, 0xd0, 0xdb, 0xfa, 0x3e, 0x4f, 0x9f, 0x75, 0x2b, 0x3a, 0x82, 0x89, 0x10, + 0x94, 0xe3, 0x69, 0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, 0x2f, 0xea, 0x9f, 0x56, 0xdd, 0xfa, + 0xb4, 0x95, 0x71, 0x4b, 0xd7, 0xe7, 0xd8, 0x85, 0xf5, 0xe0, 0x7e, 0xb6, 0x08, 0xdc, 0xf9, 0x22, + 0x70, 0x3f, 0x16, 0x81, 0xfb, 0xba, 0x0c, 0x9c, 0xf9, 0x32, 0x70, 0xde, 0x96, 0x81, 0xf3, 0x88, + 0x53, 0x06, 0xc3, 0x49, 0x1c, 0x26, 0x72, 0x84, 0x63, 0x22, 0x06, 0xfa, 0xc6, 0x12, 0xc9, 0x71, + 0x32, 0x24, 0x4c, 0xe0, 0x69, 0x1b, 0x3f, 0xdb, 0xcb, 0xc4, 0xf0, 0x92, 0x51, 0x15, 0x17, 0xb5, + 0xd1, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x61, 0xda, 0x98, 0xcc, 0x53, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -165,7 +175,21 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 + if len(m.Deposits) > 0 { + for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } if len(m.LatestSignalPricesList) > 0 { for iNdEx := len(m.LatestSignalPricesList) - 1; iNdEx >= 0; iNdEx-- { { @@ -246,6 +270,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.Deposits) > 0 { + for _, e := range m.Deposits { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } l = m.TotalFees.Size() n += 1 + l + sovGenesis(uint64(l)) return n @@ -407,6 +437,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deposits = append(m.Deposits, Deposit{}) + if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalFees", wireType) } diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 1f0c55f50..246b872a2 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -30,8 +30,8 @@ const ( var ( // global store keys - TunnelCountStoreKey = []byte{0x00} - TotalPacketFeeStoreKey = []byte{0x01} + TunnelCountStoreKey = []byte{0x00} + TotalFeeStoreKey = []byte{0x01} // store prefixes ActiveTunnelIDStoreKeyPrefix = []byte{0x10} diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 7d970ace4..a7d067448 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -66,28 +66,6 @@ func NewMsgCreateTSSTunnel( return m, nil } -// NewMsgCreateAxelarTunnel creates a new MsgCreateTunnel instance for Axelar tunnel. -func NewMsgCreateAxelarTunnel( - signalDeviations []SignalDeviation, - interval uint64, - destinationChainID string, - destinationContractAddress string, - encoder Encoder, - initialDeposit sdk.Coins, - creator sdk.AccAddress, -) (*MsgCreateTunnel, error) { - r := &AxelarRoute{ - DestinationChainID: destinationChainID, - DestinationContractAddress: destinationContractAddress, - } - m, err := NewMsgCreateTunnel(signalDeviations, interval, r, encoder, initialDeposit, creator) - if err != nil { - return nil, err - } - - return m, nil -} - // Type Implements Msg. func (m MsgCreateTunnel) Type() string { return sdk.MsgTypeURL(&m) } diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index c028f930b..839cb6172 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -10,9 +10,9 @@ import ( var ( DefaultMinInterval = uint64(1) - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 1000000)) + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 1_000_000_000)) DefaultMaxSignals = uint64(100) - DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) + DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10_000)) ) // NewParams creates a new Params instance diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 793470731..105852f02 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -107,25 +107,25 @@ var fileDescriptor_a7b5eedd244355eb = []byte{ // 335 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x31, 0x4e, 0xf3, 0x30, 0x1c, 0xc5, 0x93, 0xb6, 0xaa, 0x3e, 0xb9, 0x1f, 0x20, 0x45, 0x0c, 0xa1, 0x48, 0x4e, 0x61, 0xea, - 0x42, 0x4c, 0xcb, 0xc6, 0x58, 0x10, 0x52, 0xb7, 0xaa, 0x6c, 0x2c, 0x91, 0xe3, 0x9a, 0xd4, 0x6a, + 0x42, 0x4c, 0xe9, 0xc6, 0x58, 0x10, 0x52, 0xb7, 0xaa, 0x6c, 0x2c, 0x91, 0xe3, 0x9a, 0xd4, 0x6a, 0x6c, 0x47, 0xb5, 0x5b, 0x95, 0x5b, 0x30, 0x32, 0x76, 0xe6, 0x06, 0xdc, 0xa0, 0x63, 0x47, 0x26, 0x40, 0xcd, 0xc2, 0x31, 0x90, 0xed, 0x80, 0x38, 0x00, 0x93, 0xad, 0xff, 0x7b, 0xfe, 0xbd, 0x27, 0xff, 0xc1, 0xb1, 0x5e, 0x08, 0x41, 0x73, 0xb4, 0xec, 0xa5, 0x54, 0xe3, 0x1e, 0x2a, 0xf0, 0x1c, 0x73, 0x15, 0x17, 0x73, 0xa9, 0x65, 0xb0, 0xef, 0xc4, 0xb8, 0x12, 0xdb, 0x87, 0x99, 0xcc, 0xa4, 0x95, 0x90, 0xb9, 0x39, 0x57, 0x1b, 0x12, 0xa9, 0xb8, 0x54, 0x28, 0xc5, 0x8a, 0xfe, 0x70, 0x88, 0x64, 0xc2, 0xe9, 0xa7, 0x2f, 0x35, 0xd0, 0x1c, 0x59, 0x6c, 0x90, 0x83, 0x16, 0x67, 0x22, 0x99, - 0xd0, 0x42, 0x2a, 0xa6, 0x43, 0xbf, 0x53, 0xef, 0xb6, 0xfa, 0x47, 0xb1, 0x03, 0xc4, 0x06, 0xf0, - 0x9d, 0x15, 0x5f, 0x49, 0x26, 0x06, 0xe7, 0x9b, 0xb7, 0xc8, 0x7b, 0x7e, 0x8f, 0xba, 0x19, 0xd3, - 0xd3, 0x45, 0x1a, 0x13, 0xc9, 0x51, 0x95, 0xe6, 0x8e, 0x33, 0x35, 0x99, 0x21, 0xfd, 0x50, 0x50, - 0x65, 0x1f, 0xa8, 0x31, 0xe0, 0x4c, 0x5c, 0x3b, 0x7c, 0x70, 0x02, 0xfe, 0x9b, 0x34, 0x26, 0x34, - 0x9d, 0x2f, 0x71, 0x1e, 0xd6, 0x3a, 0x7e, 0xb7, 0x31, 0x36, 0x0d, 0x86, 0xd5, 0x28, 0x88, 0x40, - 0x8b, 0xe3, 0x55, 0xa2, 0x58, 0x26, 0x70, 0xae, 0xc2, 0xba, 0x75, 0x00, 0x8e, 0x57, 0xb7, 0x6e, - 0x12, 0x28,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, 0xeb, 0x00, 0x1c, 0xaf, 0x6e, 0xdd, + 0x24, 0x50, 0xe0, 0xc0, 0xd4, 0x4a, 0x0a, 0x4c, 0x66, 0x54, 0x27, 0xf7, 0x94, 0x86, 0x8d, 0xbf, + 0x6f, 0xbd, 0x67, 0x20, 0x23, 0x1b, 0x71, 0x43, 0xe9, 0xe5, 0xbf, 0xa7, 0x75, 0xe4, 0x7d, 0xae, + 0x23, 0x7f, 0x30, 0xdc, 0xec, 0xa0, 0xbf, 0xdd, 0x41, 0xff, 0x63, 0x07, 0xfd, 0xc7, 0x12, 0x7a, + 0xdb, 0x12, 0x7a, 0xaf, 0x25, 0xf4, 0xee, 0xd0, 0x2f, 0x78, 0x8a, 0xc5, 0xc4, 0xfe, 0x35, 0x91, + 0x39, 0x22, 0x53, 0xcc, 0x04, 0x5a, 0xf6, 0xd1, 0x0a, 0x55, 0xbb, 0xb5, 0x49, 0x69, 0xd3, 0x3a, + 0xfa, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0x31, 0xe2, 0xbc, 0xf2, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index 7fcedc8cf..d41e809de 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -790,62 +790,62 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } var fileDescriptor_220124e1821d297e = []byte{ - // 870 bytes of a gzipped FileDescriptorProto + // 871 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4f, 0x4f, 0x1b, 0x47, 0x18, 0xc6, 0x3d, 0xd4, 0xb5, 0xcd, 0xd0, 0x22, 0x34, 0xa5, 0xe0, 0x2e, 0x74, 0x71, 0xd7, 0xd0, - 0x22, 0x68, 0x77, 0x8a, 0x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0x75, 0x9e, 0x13, 0x74, 0xe8, 0x20, 0x39, 0xa3, 0x1d, 0x8a, 0xd4, 0xe3, 0x25, 0xa1, 0x48, 0xbd, - 0xce, 0x22, 0x89, 0x14, 0x29, 0x89, 0xa6, 0x70, 0xe0, 0x47, 0xde, 0x66, 0xfe, 0xec, 0x42, 0x04, - 0xe7, 0x17, 0x22, 0x78, 0x7f, 0x21, 0x82, 0xa7, 0x97, 0x62, 0xe4, 0xfc, 0x52, 0x8c, 0xbc, 0xbd, - 0x14, 0x23, 0xb7, 0x70, 0x43, 0xb7, 0xf7, 0xdb, 0x55, 0xb9, 0x66, 0x1e, 0xe0, 0xaa, 0x6a, 0xd4, - 0xe9, 0x17, 0x5f, 0xcd, 0x6c, 0xe2, 0xda, 0xbe, 0xaa, 0x1b, 0xf8, 0x28, 0x83, 0xef, 0xba, 0x77, - 0xda, 0xc7, 0x96, 0x46, 0xaa, 0x31, 0xaa, 0x58, 0xfd, 0x18, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xd7, - 0x80, 0x03, 0xdb, 0x0a, 0x00, 0x00, + 0x22, 0x68, 0x77, 0x8a, 0x8d, 0x5a, 0xd4, 0x43, 0x55, 0xfe, 0xd8, 0xc8, 0x2a, 0x75, 0xdd, 0xb5, + 0xe9, 0xa1, 0x17, 0x6b, 0x6d, 0x6f, 0xcd, 0xaa, 0x66, 0x77, 0xf1, 0xac, 0x51, 0x89, 0x45, 0x0e, + 0x51, 0x0e, 0xc9, 0x21, 0x52, 0x50, 0x94, 0x7c, 0x81, 0x48, 0xf9, 0x10, 0xf9, 0x04, 0x1c, 0x91, + 0x72, 0xc9, 0x29, 0x8a, 0x20, 0x1f, 0x24, 0xda, 0x99, 0xd9, 0xb5, 0xd7, 0xd9, 0x35, 0x46, 0x42, + 0xb9, 0xd9, 0x33, 0xcf, 0xcc, 0xfb, 0x7b, 0xdf, 0x77, 0xdf, 0x67, 0x17, 0x0a, 0x76, 0xc7, 0x30, + 0xb4, 0x16, 0x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 0xce, 0xa8, 0x6b, 0x34, 0x72, 0x54, 0xf1, 0xfe, 0x4b, 0x39, 0x5f, 0x79, 0xbd, 0x04, 0x65, 0x18, + 0x63, 0xe4, 0x61, 0x33, 0xc6, 0xf5, 0x5c, 0x25, 0x4d, 0x7b, 0x54, 0x8e, 0x99, 0x72, 0x2a, 0x6f, + 0x80, 0xdd, 0xd5, 0xde, 0x00, 0x33, 0xd3, 0x0d, 0xbf, 0xdc, 0xd9, 0x75, 0x07, 0x98, 0x69, 0x57, + 0xee, 0x03, 0x88, 0x3e, 0x74, 0x50, 0xb4, 0x08, 0x53, 0x95, 0xfd, 0x62, 0x31, 0xb7, 0x57, 0x2d, + 0x57, 0x36, 0x2b, 0xfb, 0xe5, 0x6a, 0xbe, 0xb0, 0x57, 0xc9, 0x29, 0xd5, 0xfd, 0x62, 0xb9, 0x94, + 0xdb, 0x2e, 0xe4, 0x0b, 0xb9, 0x9d, 0xa9, 0x08, 0x5a, 0x80, 0x73, 0x81, 0xaa, 0xcd, 0xed, 0x4a, + 0xe1, 0xef, 0xdc, 0x14, 0x40, 0xdf, 0xc0, 0xaf, 0x03, 0x05, 0x85, 0x22, 0x97, 0x8c, 0x09, 0xd1, + 0x07, 0xcf, 0xc5, 0x48, 0xe6, 0x65, 0x1c, 0x7e, 0x4a, 0x93, 0x42, 0x1d, 0x18, 0xe7, 0xfe, 0x8a, + 0xd2, 0x83, 0x19, 0x04, 0xbc, 0x26, 0x84, 0xc5, 0xe1, 0x22, 0x56, 0x1c, 0x69, 0xe1, 0xde, 0xab, + 0x77, 0x4f, 0xc6, 0xbe, 0x42, 0xb3, 0x38, 0xf0, 0x55, 0x44, 0xd0, 0x5d, 0x18, 0x63, 0x67, 0x90, + 0x34, 0xe4, 0x42, 0x37, 0x68, 0x7a, 0xa8, 0x86, 0xc7, 0x5c, 0xa5, 0x31, 0x97, 0x50, 0x3a, 0x24, + 0x26, 0xee, 0x7a, 0x0f, 0xd7, 0x29, 0x7a, 0x04, 0x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fe, 0xdf, 0xbd, + 0xd3, 0x3e, 0xb1, 0x34, 0x52, 0x8b, 0x51, 0x45, 0xf6, 0x7d, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, + 0xb2, 0xa5, 0x82, 0xdb, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index be96ebe6b..00c3568bd 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - github_com_bandprotocol_chain_v2_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" + github_com_bandprotocol_chain_v3_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" _ "github.com/bandprotocol/chain/v3/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" @@ -117,61 +117,6 @@ func (m *TSSRoute) GetDestinationContractAddress() string { return "" } -// AxelarRoute is the type for an Axelar route -type AxelarRoute struct { - // destination_chain_id is the destination chain ID - DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` -} - -func (m *AxelarRoute) Reset() { *m = AxelarRoute{} } -func (m *AxelarRoute) String() string { return proto.CompactTextString(m) } -func (*AxelarRoute) ProtoMessage() {} -func (*AxelarRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{1} -} -func (m *AxelarRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AxelarRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AxelarRoute.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 *AxelarRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_AxelarRoute.Merge(m, src) -} -func (m *AxelarRoute) XXX_Size() int { - return m.Size() -} -func (m *AxelarRoute) XXX_DiscardUnknown() { - xxx_messageInfo_AxelarRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_AxelarRoute proto.InternalMessageInfo - -func (m *AxelarRoute) GetDestinationChainID() string { - if m != nil { - return m.DestinationChainID - } - return "" -} - -func (m *AxelarRoute) GetDestinationContractAddress() string { - if m != nil { - return m.DestinationContractAddress - } - return "" -} - // SignalDeviation is the type for a signal with soft and hard deviation type SignalDeviation struct { // signal_id is the signal ID @@ -186,7 +131,7 @@ func (m *SignalDeviation) Reset() { *m = SignalDeviation{} } func (m *SignalDeviation) String() string { return proto.CompactTextString(m) } func (*SignalDeviation) ProtoMessage() {} func (*SignalDeviation) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{2} + return fileDescriptor_b5270a56045f1d8a, []int{1} } func (m *SignalDeviation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -250,7 +195,7 @@ func (m *Deposit) Reset() { *m = Deposit{} } func (m *Deposit) String() string { return proto.CompactTextString(m) } func (*Deposit) ProtoMessage() {} func (*Deposit) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{3} + return fileDescriptor_b5270a56045f1d8a, []int{2} } func (m *Deposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +275,7 @@ func (m *Tunnel) Reset() { *m = Tunnel{} } func (m *Tunnel) String() string { return proto.CompactTextString(m) } func (*Tunnel) ProtoMessage() {} func (*Tunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{4} + return fileDescriptor_b5270a56045f1d8a, []int{3} } func (m *Tunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -450,7 +395,7 @@ func (m *LatestSignalPrices) Reset() { *m = LatestSignalPrices{} } func (m *LatestSignalPrices) String() string { return proto.CompactTextString(m) } func (*LatestSignalPrices) ProtoMessage() {} func (*LatestSignalPrices) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{5} + return fileDescriptor_b5270a56045f1d8a, []int{4} } func (m *LatestSignalPrices) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -512,7 +457,7 @@ func (m *SignalPrice) Reset() { *m = SignalPrice{} } func (m *SignalPrice) String() string { return proto.CompactTextString(m) } func (*SignalPrice) ProtoMessage() {} func (*SignalPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{6} + return fileDescriptor_b5270a56045f1d8a, []int{5} } func (m *SignalPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -565,7 +510,7 @@ func (m *TotalFees) Reset() { *m = TotalFees{} } func (m *TotalFees) String() string { return proto.CompactTextString(m) } func (*TotalFees) ProtoMessage() {} func (*TotalFees) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{7} + return fileDescriptor_b5270a56045f1d8a, []int{6} } func (m *TotalFees) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -619,7 +564,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{8} + return fileDescriptor_b5270a56045f1d8a, []int{7} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -686,7 +631,7 @@ func (m *Packet) GetCreatedAt() int64 { // TSSPacketContent is the packet content for TSS type TSSPacketContent struct { // signing_id is the signing ID - SigningID github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" json:"signing_id,omitempty"` + SigningID github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" json:"signing_id,omitempty"` // destination_chain_id is the destination chain ID DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` // destination_contract_address is the destination contract address @@ -697,7 +642,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{9} + return fileDescriptor_b5270a56045f1d8a, []int{8} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -726,7 +671,7 @@ func (m *TSSPacketContent) XXX_DiscardUnknown() { var xxx_messageInfo_TSSPacketContent proto.InternalMessageInfo -func (m *TSSPacketContent) GetSigningID() github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID { +func (m *TSSPacketContent) GetSigningID() github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID { if m != nil { return m.SigningID } @@ -747,74 +692,9 @@ func (m *TSSPacketContent) GetDestinationContractAddress() string { return "" } -// AxelarPacketContent is the packet content for Axelar -type AxelarPacketContent struct { - // ibc_queue_id is the IBC queue ID - IBCQueueID uint64 `protobuf:"varint,1,opt,name=ibc_queue_id,json=ibcQueueId,proto3" json:"ibc_queue_id,omitempty"` - // destination_chain_id is the destination chain ID - DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` -} - -func (m *AxelarPacketContent) Reset() { *m = AxelarPacketContent{} } -func (m *AxelarPacketContent) String() string { return proto.CompactTextString(m) } -func (*AxelarPacketContent) ProtoMessage() {} -func (*AxelarPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{10} -} -func (m *AxelarPacketContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AxelarPacketContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AxelarPacketContent.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 *AxelarPacketContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_AxelarPacketContent.Merge(m, src) -} -func (m *AxelarPacketContent) XXX_Size() int { - return m.Size() -} -func (m *AxelarPacketContent) XXX_DiscardUnknown() { - xxx_messageInfo_AxelarPacketContent.DiscardUnknown(m) -} - -var xxx_messageInfo_AxelarPacketContent proto.InternalMessageInfo - -func (m *AxelarPacketContent) GetIBCQueueID() uint64 { - if m != nil { - return m.IBCQueueID - } - return 0 -} - -func (m *AxelarPacketContent) GetDestinationChainID() string { - if m != nil { - return m.DestinationChainID - } - return "" -} - -func (m *AxelarPacketContent) GetDestinationContractAddress() string { - if m != nil { - return m.DestinationContractAddress - } - return "" -} - func init() { proto.RegisterEnum("tunnel.v1beta1.Encoder", Encoder_name, Encoder_value) proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") - proto.RegisterType((*AxelarRoute)(nil), "tunnel.v1beta1.AxelarRoute") proto.RegisterType((*SignalDeviation)(nil), "tunnel.v1beta1.SignalDeviation") proto.RegisterType((*Deposit)(nil), "tunnel.v1beta1.Deposit") proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") @@ -823,85 +703,80 @@ func init() { proto.RegisterType((*TotalFees)(nil), "tunnel.v1beta1.TotalFees") proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") proto.RegisterType((*TSSPacketContent)(nil), "tunnel.v1beta1.TSSPacketContent") - proto.RegisterType((*AxelarPacketContent)(nil), "tunnel.v1beta1.AxelarPacketContent") } func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } var fileDescriptor_b5270a56045f1d8a = []byte{ - // 1140 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xda, 0x8e, 0x63, 0x4f, 0x12, 0xe3, 0x4e, 0xad, 0x66, 0xeb, 0x14, 0xdb, 0xca, 0xc9, - 0x44, 0x8a, 0x37, 0x09, 0x6a, 0x85, 0x72, 0xc2, 0xff, 0xa2, 0xae, 0x0a, 0x89, 0x59, 0x1b, 0x09, - 0x71, 0x59, 0xad, 0x77, 0xc7, 0xce, 0x50, 0x7b, 0xc7, 0xdd, 0x19, 0x47, 0xcd, 0x27, 0xa0, 0xca, - 0x89, 0x2f, 0x10, 0x84, 0x40, 0x88, 0x0a, 0x2e, 0x1c, 0x72, 0xe3, 0x0b, 0x54, 0x39, 0x55, 0x9c, - 0x38, 0x20, 0x83, 0x9c, 0x43, 0xf9, 0x0c, 0x9c, 0xd0, 0xce, 0xcc, 0xfa, 0x5f, 0x13, 0x42, 0x10, - 0x48, 0xbd, 0xd8, 0xfb, 0xfe, 0xce, 0x7b, 0xbf, 0xf7, 0x7b, 0x3b, 0x0b, 0xd6, 0xd8, 0xc0, 0x75, - 0x51, 0x57, 0x3b, 0xda, 0x6e, 0x21, 0x66, 0x6d, 0x6b, 0x42, 0x2c, 0xf6, 0x3d, 0xc2, 0x08, 0x4c, - 0x4a, 0x49, 0x1a, 0x33, 0xb7, 0xac, 0x1e, 0x76, 0x89, 0xc6, 0x7f, 0x85, 0x4b, 0x26, 0x6b, 0x13, - 0xda, 0x23, 0x54, 0x6b, 0x59, 0x14, 0x8d, 0x93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0x86, 0xb9, 0xb0, 0x5e, 0x35, 0xc2, 0xd8, 0x81, 0x19, 0x10, 0xa7, - 0xe8, 0xc9, 0x00, 0xb9, 0x36, 0x12, 0x53, 0x30, 0xc6, 0x32, 0x7c, 0x00, 0x16, 0x3c, 0x7f, 0xe8, - 0x1c, 0xda, 0xa5, 0x9d, 0x74, 0x51, 0x6c, 0x5f, 0x31, 0xd8, 0xbe, 0x62, 0xc9, 0x3d, 0x2e, 0x4f, - 0x71, 0xc3, 0x10, 0xee, 0x70, 0x1b, 0x2c, 0x22, 0xd7, 0x26, 0x0e, 0xf2, 0xd4, 0x68, 0x5e, 0x29, - 0x24, 0x77, 0x56, 0x8b, 0xb3, 0xef, 0x8a, 0x62, 0x4d, 0x98, 0x8d, 0xc0, 0x0f, 0xde, 0x07, 0x89, - 0x36, 0x42, 0x66, 0xdf, 0x3a, 0x46, 0x9e, 0xba, 0x70, 0x0d, 0xa2, 0xf1, 0x36, 0x42, 0x75, 0xdf, - 0x13, 0x1a, 0xe0, 0x96, 0x24, 0xde, 0x98, 0x0b, 0x54, 0x8d, 0x71, 0x6c, 0x73, 0xf3, 0x67, 0xce, - 0x91, 0xb6, 0x1c, 0xf5, 0x11, 0x36, 0x52, 0x74, 0x56, 0x4d, 0x7d, 0x44, 0xb0, 0xcb, 0x90, 0x77, - 0x64, 0x75, 0xd5, 0x45, 0x81, 0x48, 0x20, 0xc3, 0x01, 0x58, 0x61, 0x84, 0xf1, 0xe3, 0xf8, 0x4c, - 0xd5, 0xf8, 0xff, 0x34, 0xc7, 0x65, 0x7e, 0x4c, 0x40, 0xcd, 0x35, 0x90, 0xc0, 0xd4, 0xb4, 0x6c, - 0x86, 0x8f, 0x90, 0x9a, 0xc8, 0x2b, 0x85, 0xb8, 0x11, 0xc7, 0xb4, 0xc4, 0x65, 0xf8, 0x36, 0x00, - 0xb6, 0x87, 0x2c, 0x86, 0x1c, 0xd3, 0x62, 0x2a, 0xc8, 0x2b, 0x85, 0x88, 0x91, 0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0xaf, 0x3c, 0xe2, 0x21, 0xe1, 0x4c, - 0xfa, 0xe4, 0x34, 0xff, 0x9a, 0x3e, 0x13, 0x7d, 0xf6, 0x4d, 0x36, 0x54, 0xfe, 0xf0, 0xf9, 0x28, - 0xab, 0xbc, 0x18, 0x65, 0x95, 0x97, 0xa3, 0xac, 0xf2, 0xfb, 0x28, 0xab, 0x7c, 0x71, 0x91, 0x0d, - 0xbd, 0xbc, 0xc8, 0x86, 0x7e, 0xb9, 0xc8, 0x86, 0x3e, 0xd5, 0xfe, 0x01, 0x31, 0xe5, 0xc7, 0x38, - 0xe7, 0x65, 0x2b, 0xc6, 0x3d, 0xde, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x08, 0x5d, 0x1e, - 0xa3, 0x0b, 0x00, 0x00, + // 1084 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0xda, 0x8e, 0xe3, 0x9d, 0x7c, 0xe0, 0x0e, 0x56, 0xb3, 0x75, 0x8a, 0x6d, 0xe5, 0x64, + 0x22, 0xc5, 0xdb, 0xa4, 0x6a, 0x85, 0x72, 0x22, 0xfe, 0x88, 0xba, 0x2a, 0x24, 0xd6, 0xda, 0x48, + 0x88, 0xcb, 0x6a, 0xbc, 0x3b, 0x76, 0x96, 0xc6, 0x3b, 0xcb, 0xce, 0xd8, 0x22, 0xbf, 0x80, 0x2a, + 0x27, 0xfe, 0x40, 0x10, 0x82, 0x03, 0x15, 0x5c, 0x38, 0xe4, 0xc6, 0x1f, 0xa8, 0x72, 0xaa, 0x38, + 0x71, 0x40, 0x06, 0x39, 0x07, 0xf8, 0x0d, 0x9c, 0xd0, 0xce, 0xcc, 0xfa, 0xab, 0x09, 0x21, 0x88, + 0x5e, 0x92, 0xbc, 0x9f, 0xf3, 0xbe, 0xcf, 0xf3, 0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 0x3c, 0x97, 0x3d, 0x3d, 0x2b, 0xbe, 0xe6, 0xcf, 0x25, 0x9f, + 0x7f, 0x9b, 0x8f, 0x55, 0x3e, 0x7c, 0x31, 0xca, 0x2b, 0x2f, 0x47, 0x79, 0xe5, 0xd5, 0x28, 0xaf, + 0xfc, 0x3e, 0xca, 0x2b, 0x5f, 0x5e, 0xe6, 0x63, 0xaf, 0x2e, 0xf3, 0xb1, 0x5f, 0x2e, 0xf3, 0xb1, + 0x4f, 0xf4, 0x7f, 0x41, 0x97, 0xfc, 0xd7, 0x8f, 0xb3, 0xd5, 0x4e, 0xf1, 0x8c, 0x87, 0x7f, 0x07, + 0x00, 0x00, 0xff, 0xff, 0xde, 0x3f, 0xc7, 0x78, 0x11, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -931,33 +806,6 @@ func (this *TSSRoute) Equal(that interface{}) bool { } return true } -func (this *AxelarRoute) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AxelarRoute) - if !ok { - that2, ok := that.(AxelarRoute) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.DestinationChainID != that1.DestinationChainID { - return false - } - if this.DestinationContractAddress != that1.DestinationContractAddress { - return false - } - return true -} func (this *SignalDeviation) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1249,36 +1097,6 @@ func (this *TSSPacketContent) Equal(that interface{}) bool { } return true } -func (this *AxelarPacketContent) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AxelarPacketContent) - if !ok { - that2, ok := that.(AxelarPacketContent) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.IBCQueueID != that1.IBCQueueID { - return false - } - if this.DestinationChainID != that1.DestinationChainID { - return false - } - if this.DestinationContractAddress != that1.DestinationContractAddress { - return false - } - return true -} func (m *TSSRoute) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1316,43 +1134,6 @@ func (m *TSSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *AxelarRoute) 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 *AxelarRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AxelarRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DestinationContractAddress) > 0 { - i -= len(m.DestinationContractAddress) - copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DestinationChainID) > 0 { - i -= len(m.DestinationChainID) - copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *SignalDeviation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1779,48 +1560,6 @@ func (m *TSSPacketContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *AxelarPacketContent) 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 *AxelarPacketContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AxelarPacketContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DestinationContractAddress) > 0 { - i -= len(m.DestinationContractAddress) - copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.DestinationChainID) > 0 { - i -= len(m.DestinationChainID) - copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) - i-- - dAtA[i] = 0x12 - } - if m.IBCQueueID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.IBCQueueID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func encodeVarintTunnel(dAtA []byte, offset int, v uint64) int { offset -= sovTunnel(v) base := offset @@ -1849,23 +1588,6 @@ func (m *TSSRoute) Size() (n int) { return n } -func (m *AxelarRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DestinationChainID) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - l = len(m.DestinationContractAddress) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - return n -} - func (m *SignalDeviation) Size() (n int) { if m == nil { return 0 @@ -2058,26 +1780,6 @@ func (m *TSSPacketContent) Size() (n int) { return n } -func (m *AxelarPacketContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IBCQueueID != 0 { - n += 1 + sovTunnel(uint64(m.IBCQueueID)) - } - l = len(m.DestinationChainID) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - l = len(m.DestinationContractAddress) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - return n -} - func sovTunnel(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2198,120 +1900,6 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { } return nil } -func (m *AxelarRoute) 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 ErrIntOverflowTunnel - } - 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: AxelarRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AxelarRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTunnel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *SignalDeviation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3427,140 +3015,7 @@ func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SigningID |= github_com_bandprotocol_chain_v2_x_bandtss_types.SigningID(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTunnel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AxelarPacketContent) 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 ErrIntOverflowTunnel - } - 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: AxelarPacketContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AxelarPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IBCQueueID", wireType) - } - m.IBCQueueID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IBCQueueID |= uint64(b&0x7F) << shift + m.SigningID |= github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 1cdad3eb8..59146a4fd 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -872,70 +872,70 @@ func init() { func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 1002 bytes of a gzipped FileDescriptorProto + // 1008 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x49, 0x9a, 0x4c, 0xd2, 0xb4, 0x59, 0xd2, 0x7a, 0xbd, 0x11, 0xb6, 0xd9, 0xaa, - 0xaa, 0x13, 0x91, 0x5d, 0xc5, 0x50, 0x84, 0xc2, 0x29, 0xae, 0x7b, 0x88, 0x84, 0x25, 0xb4, 0x2d, - 0xa2, 0x02, 0x89, 0x68, 0xbc, 0x3b, 0xac, 0x47, 0xd8, 0x33, 0xd6, 0xce, 0xd8, 0xad, 0xaf, 0x48, - 0x5c, 0x38, 0xc1, 0x81, 0x13, 0xe2, 0xc2, 0x09, 0xf5, 0x94, 0x43, 0xff, 0x03, 0x2e, 0x85, 0x53, - 0xc5, 0x89, 0x53, 0x40, 0xc9, 0x21, 0x12, 0x7f, 0x05, 0xda, 0xd9, 0xd9, 0x9f, 0x59, 0x9c, 0x14, - 0x55, 0x48, 0xbd, 0x24, 0x9e, 0xf7, 0x7d, 0x6f, 0xf6, 0x9b, 0x6f, 0xde, 0xbc, 0x19, 0x50, 0xe1, - 0x63, 0x42, 0xd0, 0xc0, 0x9a, 0xec, 0xf6, 0x10, 0x87, 0xbb, 0x16, 0x7f, 0x62, 0x8e, 0x7c, 0xca, - 0xa9, 0xba, 0x16, 0x02, 0xa6, 0x04, 0xf4, 0xaa, 0x47, 0xa9, 0x37, 0x40, 0x96, 0x40, 0x7b, 0xe3, - 0x2f, 0x2c, 0x48, 0xa6, 0x21, 0x55, 0xdf, 0xf0, 0xa8, 0x47, 0xc5, 0x4f, 0x2b, 0xf8, 0x25, 0xa3, - 0x9b, 0xb9, 0x99, 0x47, 0xd0, 0x87, 0x43, 0x26, 0xc1, 0xaa, 0x43, 0xd9, 0x90, 0xb2, 0xc3, 0x30, - 0x2b, 0x1c, 0x48, 0xa8, 0x16, 0x8e, 0xac, 0x1e, 0x64, 0x28, 0x4e, 0x76, 0x28, 0x26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0x7c, 0x4c, 0x08, 0x1a, 0x58, 0x93, 0x9d, 0x2e, 0xe2, 0x70, 0xc7, 0xe2, 0xcf, 0xcd, 0x91, 0x47, + 0x39, 0x55, 0x57, 0x03, 0xc0, 0x94, 0x80, 0x5e, 0x71, 0x29, 0x75, 0x07, 0xc8, 0x12, 0x68, 0x77, + 0xfc, 0xb9, 0x05, 0xc9, 0x34, 0xa0, 0xea, 0xeb, 0x2e, 0x75, 0xa9, 0xf8, 0x69, 0xf9, 0xbf, 0x64, + 0x74, 0x23, 0x33, 0xf3, 0x08, 0x7a, 0x70, 0xc8, 0x24, 0x58, 0xe9, 0x51, 0x36, 0xa4, 0xec, 0x20, + 0xc8, 0x0a, 0x06, 0x12, 0xaa, 0x06, 0x23, 0xab, 0x0b, 0x19, 0x8a, 0x92, 0x7b, 0x14, 0x13, 0x89, + 0x97, 0x25, 0x3e, 0x64, 0xae, 0x35, 0xd9, 0xf1, 0xff, 0x49, 0x60, 0x0d, 0x0e, 0x31, 0xa1, 0x96, + 0xf8, 0xfb, 0x0f, 0x1a, 0xe4, 0x9a, 0x04, 0x68, 0xfc, 0x52, 0x04, 0x37, 0x3a, 0xcc, 0x7d, 0xe8, + 0x21, 0xc8, 0xd1, 0x13, 0x81, 0xa8, 0x36, 0x58, 0x63, 0xd8, 0x25, 0x70, 0x70, 0xe0, 0xa0, 0x09, + 0x86, 0x1c, 0x53, 0xc2, 0x34, 0xa5, 0x5e, 0x6c, 0x2c, 0x37, 0x6b, 0x66, 0xda, 0x11, 0xf3, 0xb1, + 0x20, 0xb6, 0x43, 0x5e, 0x6b, 0xfe, 0xd5, 0x71, 0x6d, 0xce, 0xbe, 0xc9, 0xd2, 0x61, 0xa6, 0xea, + 0x60, 0x11, 0x13, 0x8e, 0xbc, 0x09, 0x1c, 0x68, 0x85, 0xba, 0xd2, 0x98, 0xb7, 0xa3, 0xb1, 0xfa, + 0x00, 0x94, 0x3c, 0x3a, 0xe6, 0x48, 0x2b, 0xd6, 0x95,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 0x13, 0x8e, 0xe6, 0xfc, 0x00, 0x2c, + 0x46, 0xb7, 0xc1, 0x46, 0x4e, 0x4a, 0x08, 0xea, 0x77, 0x66, 0x80, 0x49, 0x85, 0x89, 0x86, 0x9d, + 0xa7, 0x30, 0x86, 0x73, 0x15, 0x9e, 0xef, 0xab, 0xea, 0xa7, 0xe0, 0x7a, 0xba, 0xa7, 0xd6, 0x73, + 0xf2, 0x52, 0x0c, 0xbd, 0x71, 0x11, 0x23, 0x39, 0x79, 0xba, 0xed, 0xd5, 0x73, 0x45, 0x25, 0x18, + 0xb9, 0x93, 0xe7, 0xf6, 0x06, 0xf5, 0x33, 0xb0, 0x9a, 0xe9, 0x0b, 0x6f, 0xe5, 0xe4, 0xa6, 0x29, + 0xfa, 0xe6, 0x85, 0x94, 0x68, 0xfe, 0xa7, 0x60, 0x25, 0x75, 0x6a, 0xf2, 0x2a, 0x2d, 0x49, 0xc8, + 0xad, 0xb4, 0xbc, 0x5a, 0xd6, 0x4b, 0x5f, 0xfa, 0x7d, 0xa2, 0xb5, 0xff, 0xea, 0xa4, 0xaa, 0x1c, + 0x9d, 0x54, 0x95, 0x3f, 0x4f, 0xaa, 0xca, 0xb7, 0xa7, 0xd5, 0xb9, 0xa3, 0xd3, 0xea, 0xdc, 0xef, + 0xa7, 0xd5, 0xb9, 0x4f, 0xac, 0x44, 0xc3, 0xe9, 0x42, 0xe2, 0x88, 0x97, 0x6e, 0x8f, 0x0e, 0xac, + 0x5e, 0x1f, 0x62, 0x62, 0x4d, 0xee, 0x5b, 0xcf, 0xe5, 0x33, 0x3d, 0xe8, 0x3e, 0xdd, 0x05, 0xc1, + 0xb8, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x52, 0x34, 0xbe, 0x9e, 0xaa, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 82a925273f29fce45d82e95322acc85dd485caf6 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 31 Oct 2024 22:58:32 +0700 Subject: [PATCH 184/272] patch --- .../tunnel/v1beta1/genesis.pulsar.go | 287 ++-- .../tunnel/v1beta1/params.pulsar.go | 214 +-- api/{ => band}/tunnel/v1beta1/query.pulsar.go | 1327 +++++++-------- .../tunnel/v1beta1/query_grpc.pb.go | 20 +- .../tunnel/v1beta1/tunnel.pulsar.go | 1228 +++++++------- api/{ => band}/tunnel/v1beta1/tx.pulsar.go | 1492 +++++++++-------- api/{ => band}/tunnel/v1beta1/tx_grpc.pb.go | 22 +- proto/{ => band}/tunnel/v1beta1/genesis.proto | 7 +- proto/{ => band}/tunnel/v1beta1/params.proto | 2 +- proto/{ => band}/tunnel/v1beta1/query.proto | 7 +- proto/{ => band}/tunnel/v1beta1/tunnel.proto | 4 +- proto/{ => band}/tunnel/v1beta1/tx.proto | 6 +- x/tunnel/types/genesis.pb.go | 57 +- x/tunnel/types/params.pb.go | 55 +- x/tunnel/types/query.pb.go | 218 +-- x/tunnel/types/query.pb.gw.go | 2 +- x/tunnel/types/tunnel.pb.go | 193 +-- x/tunnel/types/tx.pb.go | 243 +-- 18 files changed, 2711 insertions(+), 2673 deletions(-) rename api/{ => band}/tunnel/v1beta1/genesis.pulsar.go (77%) rename api/{ => band}/tunnel/v1beta1/params.pulsar.go (77%) rename api/{ => band}/tunnel/v1beta1/query.pulsar.go (82%) rename api/{ => band}/tunnel/v1beta1/query_grpc.pb.go (95%) rename api/{ => band}/tunnel/v1beta1/tunnel.pulsar.go (82%) rename api/{ => band}/tunnel/v1beta1/tx.pulsar.go (83%) rename api/{ => band}/tunnel/v1beta1/tx_grpc.pb.go (95%) rename proto/{ => band}/tunnel/v1beta1/genesis.proto (88%) rename proto/{ => band}/tunnel/v1beta1/params.proto (97%) rename proto/{ => band}/tunnel/v1beta1/query.proto (98%) rename proto/{ => band}/tunnel/v1beta1/tunnel.proto (98%) rename proto/{ => band}/tunnel/v1beta1/tx.proto (98%) diff --git a/api/tunnel/v1beta1/genesis.pulsar.go b/api/band/tunnel/v1beta1/genesis.pulsar.go similarity index 77% rename from api/tunnel/v1beta1/genesis.pulsar.go rename to api/band/tunnel/v1beta1/genesis.pulsar.go index e96063c72..fcfddd223 100644 --- a/api/tunnel/v1beta1/genesis.pulsar.go +++ b/api/band/tunnel/v1beta1/genesis.pulsar.go @@ -177,8 +177,8 @@ var ( ) func init() { - file_tunnel_v1beta1_genesis_proto_init() - md_GenesisState = File_tunnel_v1beta1_genesis_proto.Messages().ByName("GenesisState") + file_band_tunnel_v1beta1_genesis_proto_init() + md_GenesisState = File_band_tunnel_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_tunnel_count = md_GenesisState.Fields().ByName("tunnel_count") fd_GenesisState_tunnels = md_GenesisState.Fields().ByName("tunnels") @@ -196,7 +196,7 @@ func (x *GenesisState) ProtoReflect() protoreflect.Message { } func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_genesis_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_genesis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -303,23 +303,23 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.GenesisState.params": + case "band.tunnel.v1beta1.GenesisState.params": return x.Params != nil - case "tunnel.v1beta1.GenesisState.tunnel_count": + case "band.tunnel.v1beta1.GenesisState.tunnel_count": return x.TunnelCount != uint64(0) - case "tunnel.v1beta1.GenesisState.tunnels": + case "band.tunnel.v1beta1.GenesisState.tunnels": return len(x.Tunnels) != 0 - case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": return len(x.LatestSignalPricesList) != 0 - case "tunnel.v1beta1.GenesisState.deposits": + case "band.tunnel.v1beta1.GenesisState.deposits": return len(x.Deposits) != 0 - case "tunnel.v1beta1.GenesisState.total_fees": + case "band.tunnel.v1beta1.GenesisState.total_fees": return x.TotalFees != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -331,23 +331,23 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.GenesisState.params": + case "band.tunnel.v1beta1.GenesisState.params": x.Params = nil - case "tunnel.v1beta1.GenesisState.tunnel_count": + case "band.tunnel.v1beta1.GenesisState.tunnel_count": x.TunnelCount = uint64(0) - case "tunnel.v1beta1.GenesisState.tunnels": + case "band.tunnel.v1beta1.GenesisState.tunnels": x.Tunnels = nil - case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": x.LatestSignalPricesList = nil - case "tunnel.v1beta1.GenesisState.deposits": + case "band.tunnel.v1beta1.GenesisState.deposits": x.Deposits = nil - case "tunnel.v1beta1.GenesisState.total_fees": + case "band.tunnel.v1beta1.GenesisState.total_fees": x.TotalFees = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -359,38 +359,38 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.GenesisState.params": + case "band.tunnel.v1beta1.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tunnel.v1beta1.GenesisState.tunnel_count": + case "band.tunnel.v1beta1.GenesisState.tunnel_count": value := x.TunnelCount return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.GenesisState.tunnels": + case "band.tunnel.v1beta1.GenesisState.tunnels": if len(x.Tunnels) == 0 { return protoreflect.ValueOfList(&_GenesisState_3_list{}) } listValue := &_GenesisState_3_list{list: &x.Tunnels} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": if len(x.LatestSignalPricesList) == 0 { return protoreflect.ValueOfList(&_GenesisState_4_list{}) } listValue := &_GenesisState_4_list{list: &x.LatestSignalPricesList} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.GenesisState.deposits": + case "band.tunnel.v1beta1.GenesisState.deposits": if len(x.Deposits) == 0 { return protoreflect.ValueOfList(&_GenesisState_5_list{}) } listValue := &_GenesisState_5_list{list: &x.Deposits} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.GenesisState.total_fees": + case "band.tunnel.v1beta1.GenesisState.total_fees": value := x.TotalFees return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.GenesisState does not contain field %s", descriptor.FullName())) } } @@ -406,29 +406,29 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.GenesisState.params": + case "band.tunnel.v1beta1.GenesisState.params": x.Params = value.Message().Interface().(*Params) - case "tunnel.v1beta1.GenesisState.tunnel_count": + case "band.tunnel.v1beta1.GenesisState.tunnel_count": x.TunnelCount = value.Uint() - case "tunnel.v1beta1.GenesisState.tunnels": + case "band.tunnel.v1beta1.GenesisState.tunnels": lv := value.List() clv := lv.(*_GenesisState_3_list) x.Tunnels = *clv.list - case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": lv := value.List() clv := lv.(*_GenesisState_4_list) x.LatestSignalPricesList = *clv.list - case "tunnel.v1beta1.GenesisState.deposits": + case "band.tunnel.v1beta1.GenesisState.deposits": lv := value.List() clv := lv.(*_GenesisState_5_list) x.Deposits = *clv.list - case "tunnel.v1beta1.GenesisState.total_fees": + case "band.tunnel.v1beta1.GenesisState.total_fees": x.TotalFees = value.Message().Interface().(*TotalFees) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -444,41 +444,41 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.GenesisState.params": + case "band.tunnel.v1beta1.GenesisState.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "tunnel.v1beta1.GenesisState.tunnels": + case "band.tunnel.v1beta1.GenesisState.tunnels": if x.Tunnels == nil { x.Tunnels = []*Tunnel{} } value := &_GenesisState_3_list{list: &x.Tunnels} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": if x.LatestSignalPricesList == nil { x.LatestSignalPricesList = []*LatestSignalPrices{} } value := &_GenesisState_4_list{list: &x.LatestSignalPricesList} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.GenesisState.deposits": + case "band.tunnel.v1beta1.GenesisState.deposits": if x.Deposits == nil { x.Deposits = []*Deposit{} } value := &_GenesisState_5_list{list: &x.Deposits} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.GenesisState.total_fees": + case "band.tunnel.v1beta1.GenesisState.total_fees": if x.TotalFees == nil { x.TotalFees = new(TotalFees) } return protoreflect.ValueOfMessage(x.TotalFees.ProtoReflect()) - case "tunnel.v1beta1.GenesisState.tunnel_count": - panic(fmt.Errorf("field tunnel_count of message tunnel.v1beta1.GenesisState is not mutable")) + case "band.tunnel.v1beta1.GenesisState.tunnel_count": + panic(fmt.Errorf("field tunnel_count of message band.tunnel.v1beta1.GenesisState is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -487,28 +487,28 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.GenesisState.params": + case "band.tunnel.v1beta1.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tunnel.v1beta1.GenesisState.tunnel_count": + case "band.tunnel.v1beta1.GenesisState.tunnel_count": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.GenesisState.tunnels": + case "band.tunnel.v1beta1.GenesisState.tunnels": list := []*Tunnel{} return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "tunnel.v1beta1.GenesisState.latest_signal_prices_list": + case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": list := []*LatestSignalPrices{} return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) - case "tunnel.v1beta1.GenesisState.deposits": + case "band.tunnel.v1beta1.GenesisState.deposits": list := []*Deposit{} return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) - case "tunnel.v1beta1.GenesisState.total_fees": + case "band.tunnel.v1beta1.GenesisState.total_fees": m := new(TotalFees) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.GenesisState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.GenesisState")) } - panic(fmt.Errorf("message tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.GenesisState does not contain field %s", fd.FullName())) } } @@ -518,7 +518,7 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.GenesisState", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.GenesisState", d.FullName())) } panic("unreachable") } @@ -993,7 +993,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: tunnel/v1beta1/genesis.proto +// source: band/tunnel/v1beta1/genesis.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -1025,7 +1025,7 @@ type GenesisState struct { func (x *GenesisState) Reset() { *x = GenesisState{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_genesis_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_genesis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1039,7 +1039,7 @@ func (*GenesisState) ProtoMessage() {} // Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. func (*GenesisState) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_genesis_proto_rawDescGZIP(), []int{0} + return file_band_tunnel_v1beta1_genesis_proto_rawDescGZIP(), []int{0} } func (x *GenesisState) GetParams() *Params { @@ -1084,83 +1084,88 @@ func (x *GenesisState) GetTotalFees() *TotalFees { return nil } -var File_tunnel_v1beta1_genesis_proto protoreflect.FileDescriptor - -var file_tunnel_v1beta1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, - 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, - 0x12, 0x63, 0x0a, 0x19, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x16, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x12, 0x3e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, - 0x42, 0xbe, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, - 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_band_tunnel_v1beta1_genesis_proto protoreflect.FileDescriptor + +var file_band_tunnel_v1beta1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x98, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x68, + 0x0a, 0x19, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x16, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x42, 0xdd, 0x01, + 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, + 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_tunnel_v1beta1_genesis_proto_rawDescOnce sync.Once - file_tunnel_v1beta1_genesis_proto_rawDescData = file_tunnel_v1beta1_genesis_proto_rawDesc + file_band_tunnel_v1beta1_genesis_proto_rawDescOnce sync.Once + file_band_tunnel_v1beta1_genesis_proto_rawDescData = file_band_tunnel_v1beta1_genesis_proto_rawDesc ) -func file_tunnel_v1beta1_genesis_proto_rawDescGZIP() []byte { - file_tunnel_v1beta1_genesis_proto_rawDescOnce.Do(func() { - file_tunnel_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_genesis_proto_rawDescData) +func file_band_tunnel_v1beta1_genesis_proto_rawDescGZIP() []byte { + file_band_tunnel_v1beta1_genesis_proto_rawDescOnce.Do(func() { + file_band_tunnel_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_band_tunnel_v1beta1_genesis_proto_rawDescData) }) - return file_tunnel_v1beta1_genesis_proto_rawDescData -} - -var file_tunnel_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_tunnel_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: tunnel.v1beta1.GenesisState - (*Params)(nil), // 1: tunnel.v1beta1.Params - (*Tunnel)(nil), // 2: tunnel.v1beta1.Tunnel - (*LatestSignalPrices)(nil), // 3: tunnel.v1beta1.LatestSignalPrices - (*Deposit)(nil), // 4: tunnel.v1beta1.Deposit - (*TotalFees)(nil), // 5: tunnel.v1beta1.TotalFees -} -var file_tunnel_v1beta1_genesis_proto_depIdxs = []int32{ - 1, // 0: tunnel.v1beta1.GenesisState.params:type_name -> tunnel.v1beta1.Params - 2, // 1: tunnel.v1beta1.GenesisState.tunnels:type_name -> tunnel.v1beta1.Tunnel - 3, // 2: tunnel.v1beta1.GenesisState.latest_signal_prices_list:type_name -> tunnel.v1beta1.LatestSignalPrices - 4, // 3: tunnel.v1beta1.GenesisState.deposits:type_name -> tunnel.v1beta1.Deposit - 5, // 4: tunnel.v1beta1.GenesisState.total_fees:type_name -> tunnel.v1beta1.TotalFees + return file_band_tunnel_v1beta1_genesis_proto_rawDescData +} + +var file_band_tunnel_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_band_tunnel_v1beta1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: band.tunnel.v1beta1.GenesisState + (*Params)(nil), // 1: band.tunnel.v1beta1.Params + (*Tunnel)(nil), // 2: band.tunnel.v1beta1.Tunnel + (*LatestSignalPrices)(nil), // 3: band.tunnel.v1beta1.LatestSignalPrices + (*Deposit)(nil), // 4: band.tunnel.v1beta1.Deposit + (*TotalFees)(nil), // 5: band.tunnel.v1beta1.TotalFees +} +var file_band_tunnel_v1beta1_genesis_proto_depIdxs = []int32{ + 1, // 0: band.tunnel.v1beta1.GenesisState.params:type_name -> band.tunnel.v1beta1.Params + 2, // 1: band.tunnel.v1beta1.GenesisState.tunnels:type_name -> band.tunnel.v1beta1.Tunnel + 3, // 2: band.tunnel.v1beta1.GenesisState.latest_signal_prices_list:type_name -> band.tunnel.v1beta1.LatestSignalPrices + 4, // 3: band.tunnel.v1beta1.GenesisState.deposits:type_name -> band.tunnel.v1beta1.Deposit + 5, // 4: band.tunnel.v1beta1.GenesisState.total_fees:type_name -> band.tunnel.v1beta1.TotalFees 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -1168,15 +1173,15 @@ var file_tunnel_v1beta1_genesis_proto_depIdxs = []int32{ 0, // [0:5] is the sub-list for field type_name } -func init() { file_tunnel_v1beta1_genesis_proto_init() } -func file_tunnel_v1beta1_genesis_proto_init() { - if File_tunnel_v1beta1_genesis_proto != nil { +func init() { file_band_tunnel_v1beta1_genesis_proto_init() } +func file_band_tunnel_v1beta1_genesis_proto_init() { + if File_band_tunnel_v1beta1_genesis_proto != nil { return } - file_tunnel_v1beta1_params_proto_init() - file_tunnel_v1beta1_tunnel_proto_init() + file_band_tunnel_v1beta1_params_proto_init() + file_band_tunnel_v1beta1_tunnel_proto_init() if !protoimpl.UnsafeEnabled { - file_tunnel_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { case 0: return &v.state @@ -1193,18 +1198,18 @@ func file_tunnel_v1beta1_genesis_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tunnel_v1beta1_genesis_proto_rawDesc, + RawDescriptor: file_band_tunnel_v1beta1_genesis_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_tunnel_v1beta1_genesis_proto_goTypes, - DependencyIndexes: file_tunnel_v1beta1_genesis_proto_depIdxs, - MessageInfos: file_tunnel_v1beta1_genesis_proto_msgTypes, + GoTypes: file_band_tunnel_v1beta1_genesis_proto_goTypes, + DependencyIndexes: file_band_tunnel_v1beta1_genesis_proto_depIdxs, + MessageInfos: file_band_tunnel_v1beta1_genesis_proto_msgTypes, }.Build() - File_tunnel_v1beta1_genesis_proto = out.File - file_tunnel_v1beta1_genesis_proto_rawDesc = nil - file_tunnel_v1beta1_genesis_proto_goTypes = nil - file_tunnel_v1beta1_genesis_proto_depIdxs = nil + File_band_tunnel_v1beta1_genesis_proto = out.File + file_band_tunnel_v1beta1_genesis_proto_rawDesc = nil + file_band_tunnel_v1beta1_genesis_proto_goTypes = nil + file_band_tunnel_v1beta1_genesis_proto_depIdxs = nil } diff --git a/api/tunnel/v1beta1/params.pulsar.go b/api/band/tunnel/v1beta1/params.pulsar.go similarity index 77% rename from api/tunnel/v1beta1/params.pulsar.go rename to api/band/tunnel/v1beta1/params.pulsar.go index a71b206dd..f8a0d229b 100644 --- a/api/tunnel/v1beta1/params.pulsar.go +++ b/api/band/tunnel/v1beta1/params.pulsar.go @@ -125,8 +125,8 @@ var ( ) func init() { - file_tunnel_v1beta1_params_proto_init() - md_Params = File_tunnel_v1beta1_params_proto.Messages().ByName("Params") + file_band_tunnel_v1beta1_params_proto_init() + md_Params = File_band_tunnel_v1beta1_params_proto.Messages().ByName("Params") fd_Params_min_deposit = md_Params.Fields().ByName("min_deposit") fd_Params_min_interval = md_Params.Fields().ByName("min_interval") fd_Params_max_signals = md_Params.Fields().ByName("max_signals") @@ -142,7 +142,7 @@ func (x *Params) ProtoReflect() protoreflect.Message { } func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_params_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_params_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -237,19 +237,19 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.Params.min_deposit": + case "band.tunnel.v1beta1.Params.min_deposit": return len(x.MinDeposit) != 0 - case "tunnel.v1beta1.Params.min_interval": + case "band.tunnel.v1beta1.Params.min_interval": return x.MinInterval != uint64(0) - case "tunnel.v1beta1.Params.max_signals": + case "band.tunnel.v1beta1.Params.max_signals": return x.MaxSignals != uint64(0) - case "tunnel.v1beta1.Params.base_packet_fee": + case "band.tunnel.v1beta1.Params.base_packet_fee": return len(x.BasePacketFee) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) } - panic(fmt.Errorf("message tunnel.v1beta1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Params does not contain field %s", fd.FullName())) } } @@ -261,19 +261,19 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.Params.min_deposit": + case "band.tunnel.v1beta1.Params.min_deposit": x.MinDeposit = nil - case "tunnel.v1beta1.Params.min_interval": + case "band.tunnel.v1beta1.Params.min_interval": x.MinInterval = uint64(0) - case "tunnel.v1beta1.Params.max_signals": + case "band.tunnel.v1beta1.Params.max_signals": x.MaxSignals = uint64(0) - case "tunnel.v1beta1.Params.base_packet_fee": + case "band.tunnel.v1beta1.Params.base_packet_fee": x.BasePacketFee = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) } - panic(fmt.Errorf("message tunnel.v1beta1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Params does not contain field %s", fd.FullName())) } } @@ -285,19 +285,19 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.Params.min_deposit": + case "band.tunnel.v1beta1.Params.min_deposit": if len(x.MinDeposit) == 0 { return protoreflect.ValueOfList(&_Params_1_list{}) } listValue := &_Params_1_list{list: &x.MinDeposit} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.Params.min_interval": + case "band.tunnel.v1beta1.Params.min_interval": value := x.MinInterval return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.Params.max_signals": + case "band.tunnel.v1beta1.Params.max_signals": value := x.MaxSignals return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.Params.base_packet_fee": + case "band.tunnel.v1beta1.Params.base_packet_fee": if len(x.BasePacketFee) == 0 { return protoreflect.ValueOfList(&_Params_4_list{}) } @@ -305,9 +305,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) } - panic(fmt.Errorf("message tunnel.v1beta1.Params does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Params does not contain field %s", descriptor.FullName())) } } @@ -323,23 +323,23 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.Params.min_deposit": + case "band.tunnel.v1beta1.Params.min_deposit": lv := value.List() clv := lv.(*_Params_1_list) x.MinDeposit = *clv.list - case "tunnel.v1beta1.Params.min_interval": + case "band.tunnel.v1beta1.Params.min_interval": x.MinInterval = value.Uint() - case "tunnel.v1beta1.Params.max_signals": + case "band.tunnel.v1beta1.Params.max_signals": x.MaxSignals = value.Uint() - case "tunnel.v1beta1.Params.base_packet_fee": + case "band.tunnel.v1beta1.Params.base_packet_fee": lv := value.List() clv := lv.(*_Params_4_list) x.BasePacketFee = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) } - panic(fmt.Errorf("message tunnel.v1beta1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Params does not contain field %s", fd.FullName())) } } @@ -355,27 +355,27 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.Params.min_deposit": + case "band.tunnel.v1beta1.Params.min_deposit": if x.MinDeposit == nil { x.MinDeposit = []*v1beta1.Coin{} } value := &_Params_1_list{list: &x.MinDeposit} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.Params.base_packet_fee": + case "band.tunnel.v1beta1.Params.base_packet_fee": if x.BasePacketFee == nil { x.BasePacketFee = []*v1beta1.Coin{} } value := &_Params_4_list{list: &x.BasePacketFee} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.Params.min_interval": - panic(fmt.Errorf("field min_interval of message tunnel.v1beta1.Params is not mutable")) - case "tunnel.v1beta1.Params.max_signals": - panic(fmt.Errorf("field max_signals of message tunnel.v1beta1.Params is not mutable")) + case "band.tunnel.v1beta1.Params.min_interval": + panic(fmt.Errorf("field min_interval of message band.tunnel.v1beta1.Params is not mutable")) + case "band.tunnel.v1beta1.Params.max_signals": + panic(fmt.Errorf("field max_signals of message band.tunnel.v1beta1.Params is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) } - panic(fmt.Errorf("message tunnel.v1beta1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Params does not contain field %s", fd.FullName())) } } @@ -384,21 +384,21 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.Params.min_deposit": + case "band.tunnel.v1beta1.Params.min_deposit": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_Params_1_list{list: &list}) - case "tunnel.v1beta1.Params.min_interval": + case "band.tunnel.v1beta1.Params.min_interval": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.Params.max_signals": + case "band.tunnel.v1beta1.Params.max_signals": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.Params.base_packet_fee": + case "band.tunnel.v1beta1.Params.base_packet_fee": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_Params_4_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Params")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) } - panic(fmt.Errorf("message tunnel.v1beta1.Params does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Params does not contain field %s", fd.FullName())) } } @@ -408,7 +408,7 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Params", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Params", d.FullName())) } panic("unreachable") } @@ -746,7 +746,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: tunnel/v1beta1/params.proto +// source: band/tunnel/v1beta1/params.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -774,7 +774,7 @@ type Params struct { func (x *Params) Reset() { *x = Params{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_params_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_params_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -788,7 +788,7 @@ func (*Params) ProtoMessage() {} // Deprecated: Use Params.ProtoReflect.Descriptor instead. func (*Params) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_params_proto_rawDescGZIP(), []int{0} + return file_band_tunnel_v1beta1_params_proto_rawDescGZIP(), []int{0} } func (x *Params) GetMinDeposit() []*v1beta1.Coin { @@ -819,70 +819,72 @@ func (x *Params) GetBasePacketFee() []*v1beta1.Coin { return nil } -var File_tunnel_v1beta1_params_proto protoreflect.FileDescriptor - -var file_tunnel_v1beta1_params_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, - 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 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, 0x22, 0xb9, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6c, - 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, +var File_band_tunnel_v1beta1_params_proto protoreflect.FileDescriptor + +var file_band_tunnel_v1beta1_params_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 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, 0x22, 0xb9, 0x02, + 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6c, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, + 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, + 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, + 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, + 0x6d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x73, 0x0a, 0x0f, 0x62, 0x61, + 0x73, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, - 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, - 0x12, 0x73, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, - 0xbd, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, - 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, + 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xdc, 0x01, 0x0a, 0x17, 0x63, 0x6f, + 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, + 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, + 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_tunnel_v1beta1_params_proto_rawDescOnce sync.Once - file_tunnel_v1beta1_params_proto_rawDescData = file_tunnel_v1beta1_params_proto_rawDesc + file_band_tunnel_v1beta1_params_proto_rawDescOnce sync.Once + file_band_tunnel_v1beta1_params_proto_rawDescData = file_band_tunnel_v1beta1_params_proto_rawDesc ) -func file_tunnel_v1beta1_params_proto_rawDescGZIP() []byte { - file_tunnel_v1beta1_params_proto_rawDescOnce.Do(func() { - file_tunnel_v1beta1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_params_proto_rawDescData) +func file_band_tunnel_v1beta1_params_proto_rawDescGZIP() []byte { + file_band_tunnel_v1beta1_params_proto_rawDescOnce.Do(func() { + file_band_tunnel_v1beta1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_band_tunnel_v1beta1_params_proto_rawDescData) }) - return file_tunnel_v1beta1_params_proto_rawDescData + return file_band_tunnel_v1beta1_params_proto_rawDescData } -var file_tunnel_v1beta1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_tunnel_v1beta1_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: tunnel.v1beta1.Params +var file_band_tunnel_v1beta1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_band_tunnel_v1beta1_params_proto_goTypes = []interface{}{ + (*Params)(nil), // 0: band.tunnel.v1beta1.Params (*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin } -var file_tunnel_v1beta1_params_proto_depIdxs = []int32{ - 1, // 0: tunnel.v1beta1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin - 1, // 1: tunnel.v1beta1.Params.base_packet_fee:type_name -> cosmos.base.v1beta1.Coin +var file_band_tunnel_v1beta1_params_proto_depIdxs = []int32{ + 1, // 0: band.tunnel.v1beta1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 1, // 1: band.tunnel.v1beta1.Params.base_packet_fee:type_name -> cosmos.base.v1beta1.Coin 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -890,13 +892,13 @@ var file_tunnel_v1beta1_params_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_tunnel_v1beta1_params_proto_init() } -func file_tunnel_v1beta1_params_proto_init() { - if File_tunnel_v1beta1_params_proto != nil { +func init() { file_band_tunnel_v1beta1_params_proto_init() } +func file_band_tunnel_v1beta1_params_proto_init() { + if File_band_tunnel_v1beta1_params_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_tunnel_v1beta1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Params); i { case 0: return &v.state @@ -913,18 +915,18 @@ func file_tunnel_v1beta1_params_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tunnel_v1beta1_params_proto_rawDesc, + RawDescriptor: file_band_tunnel_v1beta1_params_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_tunnel_v1beta1_params_proto_goTypes, - DependencyIndexes: file_tunnel_v1beta1_params_proto_depIdxs, - MessageInfos: file_tunnel_v1beta1_params_proto_msgTypes, + GoTypes: file_band_tunnel_v1beta1_params_proto_goTypes, + DependencyIndexes: file_band_tunnel_v1beta1_params_proto_depIdxs, + MessageInfos: file_band_tunnel_v1beta1_params_proto_msgTypes, }.Build() - File_tunnel_v1beta1_params_proto = out.File - file_tunnel_v1beta1_params_proto_rawDesc = nil - file_tunnel_v1beta1_params_proto_goTypes = nil - file_tunnel_v1beta1_params_proto_depIdxs = nil + File_band_tunnel_v1beta1_params_proto = out.File + file_band_tunnel_v1beta1_params_proto_rawDesc = nil + file_band_tunnel_v1beta1_params_proto_goTypes = nil + file_band_tunnel_v1beta1_params_proto_depIdxs = nil } diff --git a/api/tunnel/v1beta1/query.pulsar.go b/api/band/tunnel/v1beta1/query.pulsar.go similarity index 82% rename from api/tunnel/v1beta1/query.pulsar.go rename to api/band/tunnel/v1beta1/query.pulsar.go index 2af6c1ab5..03718c41a 100644 --- a/api/tunnel/v1beta1/query.pulsar.go +++ b/api/band/tunnel/v1beta1/query.pulsar.go @@ -22,8 +22,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryTunnelsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelsRequest") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryTunnelsRequest = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelsRequest") fd_QueryTunnelsRequest_status_filter = md_QueryTunnelsRequest.Fields().ByName("status_filter") fd_QueryTunnelsRequest_pagination = md_QueryTunnelsRequest.Fields().ByName("pagination") } @@ -37,7 +37,7 @@ func (x *QueryTunnelsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryTunnelsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -120,15 +120,15 @@ func (x *fastReflection_QueryTunnelsRequest) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryTunnelsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + case "band.tunnel.v1beta1.QueryTunnelsRequest.status_filter": return x.StatusFilter != 0 - case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + case "band.tunnel.v1beta1.QueryTunnelsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) } } @@ -140,15 +140,15 @@ func (x *fastReflection_QueryTunnelsRequest) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + case "band.tunnel.v1beta1.QueryTunnelsRequest.status_filter": x.StatusFilter = 0 - case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + case "band.tunnel.v1beta1.QueryTunnelsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) } } @@ -160,17 +160,17 @@ func (x *fastReflection_QueryTunnelsRequest) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryTunnelsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + case "band.tunnel.v1beta1.QueryTunnelsRequest.status_filter": value := x.StatusFilter return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + case "band.tunnel.v1beta1.QueryTunnelsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", descriptor.FullName())) } } @@ -186,15 +186,15 @@ func (x *fastReflection_QueryTunnelsRequest) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + case "band.tunnel.v1beta1.QueryTunnelsRequest.status_filter": x.StatusFilter = (TunnelStatusFilter)(value.Enum()) - case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + case "band.tunnel.v1beta1.QueryTunnelsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) } } @@ -210,18 +210,18 @@ func (x *fastReflection_QueryTunnelsRequest) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + case "band.tunnel.v1beta1.QueryTunnelsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": - panic(fmt.Errorf("field status_filter of message tunnel.v1beta1.QueryTunnelsRequest is not mutable")) + case "band.tunnel.v1beta1.QueryTunnelsRequest.status_filter": + panic(fmt.Errorf("field status_filter of message band.tunnel.v1beta1.QueryTunnelsRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) } } @@ -230,16 +230,16 @@ func (x *fastReflection_QueryTunnelsRequest) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryTunnelsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsRequest.status_filter": + case "band.tunnel.v1beta1.QueryTunnelsRequest.status_filter": return protoreflect.ValueOfEnum(0) - case "tunnel.v1beta1.QueryTunnelsRequest.pagination": + case "band.tunnel.v1beta1.QueryTunnelsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsRequest does not contain field %s", fd.FullName())) } } @@ -249,7 +249,7 @@ func (x *fastReflection_QueryTunnelsRequest) NewField(fd protoreflect.FieldDescr func (x *fastReflection_QueryTunnelsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryTunnelsRequest", d.FullName())) } panic("unreachable") } @@ -556,8 +556,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryTunnelsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelsResponse") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryTunnelsResponse = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelsResponse") fd_QueryTunnelsResponse_tunnels = md_QueryTunnelsResponse.Fields().ByName("tunnels") fd_QueryTunnelsResponse_pagination = md_QueryTunnelsResponse.Fields().ByName("pagination") } @@ -571,7 +571,7 @@ func (x *QueryTunnelsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryTunnelsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[1] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -654,15 +654,15 @@ func (x *fastReflection_QueryTunnelsResponse) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryTunnelsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + case "band.tunnel.v1beta1.QueryTunnelsResponse.tunnels": return len(x.Tunnels) != 0 - case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + case "band.tunnel.v1beta1.QueryTunnelsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) } } @@ -674,15 +674,15 @@ func (x *fastReflection_QueryTunnelsResponse) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + case "band.tunnel.v1beta1.QueryTunnelsResponse.tunnels": x.Tunnels = nil - case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + case "band.tunnel.v1beta1.QueryTunnelsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) } } @@ -694,20 +694,20 @@ func (x *fastReflection_QueryTunnelsResponse) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryTunnelsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + case "band.tunnel.v1beta1.QueryTunnelsResponse.tunnels": if len(x.Tunnels) == 0 { return protoreflect.ValueOfList(&_QueryTunnelsResponse_1_list{}) } listValue := &_QueryTunnelsResponse_1_list{list: &x.Tunnels} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + case "band.tunnel.v1beta1.QueryTunnelsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", descriptor.FullName())) } } @@ -723,17 +723,17 @@ func (x *fastReflection_QueryTunnelsResponse) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + case "band.tunnel.v1beta1.QueryTunnelsResponse.tunnels": lv := value.List() clv := lv.(*_QueryTunnelsResponse_1_list) x.Tunnels = *clv.list - case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + case "band.tunnel.v1beta1.QueryTunnelsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) } } @@ -749,22 +749,22 @@ func (x *fastReflection_QueryTunnelsResponse) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + case "band.tunnel.v1beta1.QueryTunnelsResponse.tunnels": if x.Tunnels == nil { x.Tunnels = []*Tunnel{} } value := &_QueryTunnelsResponse_1_list{list: &x.Tunnels} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + case "band.tunnel.v1beta1.QueryTunnelsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) } } @@ -773,17 +773,17 @@ func (x *fastReflection_QueryTunnelsResponse) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryTunnelsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelsResponse.tunnels": + case "band.tunnel.v1beta1.QueryTunnelsResponse.tunnels": list := []*Tunnel{} return protoreflect.ValueOfList(&_QueryTunnelsResponse_1_list{list: &list}) - case "tunnel.v1beta1.QueryTunnelsResponse.pagination": + case "band.tunnel.v1beta1.QueryTunnelsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelsResponse does not contain field %s", fd.FullName())) } } @@ -793,7 +793,7 @@ func (x *fastReflection_QueryTunnelsResponse) NewField(fd protoreflect.FieldDesc func (x *fastReflection_QueryTunnelsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryTunnelsResponse", d.FullName())) } panic("unreachable") } @@ -1077,8 +1077,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryTunnelRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelRequest") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryTunnelRequest = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelRequest") fd_QueryTunnelRequest_tunnel_id = md_QueryTunnelRequest.Fields().ByName("tunnel_id") } @@ -1091,7 +1091,7 @@ func (x *QueryTunnelRequest) ProtoReflect() protoreflect.Message { } func (x *QueryTunnelRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[2] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1168,13 +1168,13 @@ func (x *fastReflection_QueryTunnelRequest) Range(f func(protoreflect.FieldDescr // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryTunnelRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryTunnelRequest.tunnel_id": return x.TunnelId != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) } } @@ -1186,13 +1186,13 @@ func (x *fastReflection_QueryTunnelRequest) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryTunnelRequest.tunnel_id": x.TunnelId = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) } } @@ -1204,14 +1204,14 @@ func (x *fastReflection_QueryTunnelRequest) Clear(fd protoreflect.FieldDescripto // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryTunnelRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryTunnelRequest.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelRequest does not contain field %s", descriptor.FullName())) } } @@ -1227,13 +1227,13 @@ func (x *fastReflection_QueryTunnelRequest) Get(descriptor protoreflect.FieldDes // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryTunnelRequest.tunnel_id": x.TunnelId = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) } } @@ -1249,13 +1249,13 @@ func (x *fastReflection_QueryTunnelRequest) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryTunnelRequest is not mutable")) + case "band.tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.QueryTunnelRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) } } @@ -1264,13 +1264,13 @@ func (x *fastReflection_QueryTunnelRequest) Mutable(fd protoreflect.FieldDescrip // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryTunnelRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryTunnelRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelRequest does not contain field %s", fd.FullName())) } } @@ -1280,7 +1280,7 @@ func (x *fastReflection_QueryTunnelRequest) NewField(fd protoreflect.FieldDescri func (x *fastReflection_QueryTunnelRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryTunnelRequest", d.FullName())) } panic("unreachable") } @@ -1481,8 +1481,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryTunnelResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelResponse") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryTunnelResponse = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryTunnelResponse") fd_QueryTunnelResponse_tunnel = md_QueryTunnelResponse.Fields().ByName("tunnel") } @@ -1495,7 +1495,7 @@ func (x *QueryTunnelResponse) ProtoReflect() protoreflect.Message { } func (x *QueryTunnelResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[3] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1572,13 +1572,13 @@ func (x *fastReflection_QueryTunnelResponse) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + case "band.tunnel.v1beta1.QueryTunnelResponse.tunnel": return x.Tunnel != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1590,13 +1590,13 @@ func (x *fastReflection_QueryTunnelResponse) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + case "band.tunnel.v1beta1.QueryTunnelResponse.tunnel": x.Tunnel = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1608,14 +1608,14 @@ func (x *fastReflection_QueryTunnelResponse) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + case "band.tunnel.v1beta1.QueryTunnelResponse.tunnel": value := x.Tunnel return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -1631,13 +1631,13 @@ func (x *fastReflection_QueryTunnelResponse) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + case "band.tunnel.v1beta1.QueryTunnelResponse.tunnel": x.Tunnel = value.Message().Interface().(*Tunnel) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1653,16 +1653,16 @@ func (x *fastReflection_QueryTunnelResponse) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + case "band.tunnel.v1beta1.QueryTunnelResponse.tunnel": if x.Tunnel == nil { x.Tunnel = new(Tunnel) } return protoreflect.ValueOfMessage(x.Tunnel.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1671,14 +1671,14 @@ func (x *fastReflection_QueryTunnelResponse) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryTunnelResponse.tunnel": + case "band.tunnel.v1beta1.QueryTunnelResponse.tunnel": m := new(Tunnel) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1688,7 +1688,7 @@ func (x *fastReflection_QueryTunnelResponse) NewField(fd protoreflect.FieldDescr func (x *fastReflection_QueryTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryTunnelResponse", d.FullName())) } panic("unreachable") } @@ -1917,8 +1917,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryDepositsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositsRequest") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryDepositsRequest = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositsRequest") fd_QueryDepositsRequest_tunnel_id = md_QueryDepositsRequest.Fields().ByName("tunnel_id") fd_QueryDepositsRequest_pagination = md_QueryDepositsRequest.Fields().ByName("pagination") } @@ -1932,7 +1932,7 @@ func (x *QueryDepositsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryDepositsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[4] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2015,15 +2015,15 @@ func (x *fastReflection_QueryDepositsRequest) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDepositsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositsRequest.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.QueryDepositsRequest.pagination": + case "band.tunnel.v1beta1.QueryDepositsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) } } @@ -2035,15 +2035,15 @@ func (x *fastReflection_QueryDepositsRequest) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositsRequest.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.QueryDepositsRequest.pagination": + case "band.tunnel.v1beta1.QueryDepositsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) } } @@ -2055,17 +2055,17 @@ func (x *fastReflection_QueryDepositsRequest) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDepositsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositsRequest.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.QueryDepositsRequest.pagination": + case "band.tunnel.v1beta1.QueryDepositsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsRequest does not contain field %s", descriptor.FullName())) } } @@ -2081,15 +2081,15 @@ func (x *fastReflection_QueryDepositsRequest) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositsRequest.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.QueryDepositsRequest.pagination": + case "band.tunnel.v1beta1.QueryDepositsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) } } @@ -2105,18 +2105,18 @@ func (x *fastReflection_QueryDepositsRequest) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsRequest.pagination": + case "band.tunnel.v1beta1.QueryDepositsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryDepositsRequest is not mutable")) + case "band.tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.QueryDepositsRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) } } @@ -2125,16 +2125,16 @@ func (x *fastReflection_QueryDepositsRequest) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDepositsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositsRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.QueryDepositsRequest.pagination": + case "band.tunnel.v1beta1.QueryDepositsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsRequest does not contain field %s", fd.FullName())) } } @@ -2144,7 +2144,7 @@ func (x *fastReflection_QueryDepositsRequest) NewField(fd protoreflect.FieldDesc func (x *fastReflection_QueryDepositsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryDepositsRequest", d.FullName())) } panic("unreachable") } @@ -2451,8 +2451,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryDepositsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositsResponse") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryDepositsResponse = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositsResponse") fd_QueryDepositsResponse_deposits = md_QueryDepositsResponse.Fields().ByName("deposits") fd_QueryDepositsResponse_pagination = md_QueryDepositsResponse.Fields().ByName("pagination") } @@ -2466,7 +2466,7 @@ func (x *QueryDepositsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryDepositsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[5] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2549,15 +2549,15 @@ func (x *fastReflection_QueryDepositsResponse) Range(f func(protoreflect.FieldDe // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDepositsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsResponse.deposits": + case "band.tunnel.v1beta1.QueryDepositsResponse.deposits": return len(x.Deposits) != 0 - case "tunnel.v1beta1.QueryDepositsResponse.pagination": + case "band.tunnel.v1beta1.QueryDepositsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) } } @@ -2569,15 +2569,15 @@ func (x *fastReflection_QueryDepositsResponse) Has(fd protoreflect.FieldDescript // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsResponse.deposits": + case "band.tunnel.v1beta1.QueryDepositsResponse.deposits": x.Deposits = nil - case "tunnel.v1beta1.QueryDepositsResponse.pagination": + case "band.tunnel.v1beta1.QueryDepositsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) } } @@ -2589,20 +2589,20 @@ func (x *fastReflection_QueryDepositsResponse) Clear(fd protoreflect.FieldDescri // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDepositsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryDepositsResponse.deposits": + case "band.tunnel.v1beta1.QueryDepositsResponse.deposits": if len(x.Deposits) == 0 { return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{}) } listValue := &_QueryDepositsResponse_1_list{list: &x.Deposits} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.QueryDepositsResponse.pagination": + case "band.tunnel.v1beta1.QueryDepositsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsResponse does not contain field %s", descriptor.FullName())) } } @@ -2618,17 +2618,17 @@ func (x *fastReflection_QueryDepositsResponse) Get(descriptor protoreflect.Field // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsResponse.deposits": + case "band.tunnel.v1beta1.QueryDepositsResponse.deposits": lv := value.List() clv := lv.(*_QueryDepositsResponse_1_list) x.Deposits = *clv.list - case "tunnel.v1beta1.QueryDepositsResponse.pagination": + case "band.tunnel.v1beta1.QueryDepositsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) } } @@ -2644,22 +2644,22 @@ func (x *fastReflection_QueryDepositsResponse) Set(fd protoreflect.FieldDescript // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsResponse.deposits": + case "band.tunnel.v1beta1.QueryDepositsResponse.deposits": if x.Deposits == nil { x.Deposits = []*Deposit{} } value := &_QueryDepositsResponse_1_list{list: &x.Deposits} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.QueryDepositsResponse.pagination": + case "band.tunnel.v1beta1.QueryDepositsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) } } @@ -2668,17 +2668,17 @@ func (x *fastReflection_QueryDepositsResponse) Mutable(fd protoreflect.FieldDesc // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDepositsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositsResponse.deposits": + case "band.tunnel.v1beta1.QueryDepositsResponse.deposits": list := []*Deposit{} return protoreflect.ValueOfList(&_QueryDepositsResponse_1_list{list: &list}) - case "tunnel.v1beta1.QueryDepositsResponse.pagination": + case "band.tunnel.v1beta1.QueryDepositsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositsResponse does not contain field %s", fd.FullName())) } } @@ -2688,7 +2688,7 @@ func (x *fastReflection_QueryDepositsResponse) NewField(fd protoreflect.FieldDes func (x *fastReflection_QueryDepositsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryDepositsResponse", d.FullName())) } panic("unreachable") } @@ -2973,8 +2973,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryDepositRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositRequest") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryDepositRequest = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositRequest") fd_QueryDepositRequest_tunnel_id = md_QueryDepositRequest.Fields().ByName("tunnel_id") fd_QueryDepositRequest_depositor = md_QueryDepositRequest.Fields().ByName("depositor") } @@ -2988,7 +2988,7 @@ func (x *QueryDepositRequest) ProtoReflect() protoreflect.Message { } func (x *QueryDepositRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3071,15 +3071,15 @@ func (x *fastReflection_QueryDepositRequest) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDepositRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositRequest.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.QueryDepositRequest.depositor": + case "band.tunnel.v1beta1.QueryDepositRequest.depositor": return x.Depositor != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) } } @@ -3091,15 +3091,15 @@ func (x *fastReflection_QueryDepositRequest) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositRequest.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.QueryDepositRequest.depositor": + case "band.tunnel.v1beta1.QueryDepositRequest.depositor": x.Depositor = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) } } @@ -3111,17 +3111,17 @@ func (x *fastReflection_QueryDepositRequest) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDepositRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositRequest.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.QueryDepositRequest.depositor": + case "band.tunnel.v1beta1.QueryDepositRequest.depositor": value := x.Depositor return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositRequest does not contain field %s", descriptor.FullName())) } } @@ -3137,15 +3137,15 @@ func (x *fastReflection_QueryDepositRequest) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositRequest.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.QueryDepositRequest.depositor": + case "band.tunnel.v1beta1.QueryDepositRequest.depositor": x.Depositor = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) } } @@ -3161,15 +3161,15 @@ func (x *fastReflection_QueryDepositRequest) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryDepositRequest is not mutable")) - case "tunnel.v1beta1.QueryDepositRequest.depositor": - panic(fmt.Errorf("field depositor of message tunnel.v1beta1.QueryDepositRequest is not mutable")) + case "band.tunnel.v1beta1.QueryDepositRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.QueryDepositRequest is not mutable")) + case "band.tunnel.v1beta1.QueryDepositRequest.depositor": + panic(fmt.Errorf("field depositor of message band.tunnel.v1beta1.QueryDepositRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) } } @@ -3178,15 +3178,15 @@ func (x *fastReflection_QueryDepositRequest) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDepositRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryDepositRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.QueryDepositRequest.depositor": + case "band.tunnel.v1beta1.QueryDepositRequest.depositor": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositRequest does not contain field %s", fd.FullName())) } } @@ -3196,7 +3196,7 @@ func (x *fastReflection_QueryDepositRequest) NewField(fd protoreflect.FieldDescr func (x *fastReflection_QueryDepositRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryDepositRequest", d.FullName())) } panic("unreachable") } @@ -3440,8 +3440,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryDepositResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositResponse") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryDepositResponse = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryDepositResponse") fd_QueryDepositResponse_deposit = md_QueryDepositResponse.Fields().ByName("deposit") } @@ -3454,7 +3454,7 @@ func (x *QueryDepositResponse) ProtoReflect() protoreflect.Message { } func (x *QueryDepositResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3531,13 +3531,13 @@ func (x *fastReflection_QueryDepositResponse) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDepositResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositResponse.deposit": + case "band.tunnel.v1beta1.QueryDepositResponse.deposit": return x.Deposit != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) } } @@ -3549,13 +3549,13 @@ func (x *fastReflection_QueryDepositResponse) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositResponse.deposit": + case "band.tunnel.v1beta1.QueryDepositResponse.deposit": x.Deposit = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) } } @@ -3567,14 +3567,14 @@ func (x *fastReflection_QueryDepositResponse) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDepositResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryDepositResponse.deposit": + case "band.tunnel.v1beta1.QueryDepositResponse.deposit": value := x.Deposit return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositResponse does not contain field %s", descriptor.FullName())) } } @@ -3590,13 +3590,13 @@ func (x *fastReflection_QueryDepositResponse) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositResponse.deposit": + case "band.tunnel.v1beta1.QueryDepositResponse.deposit": x.Deposit = value.Message().Interface().(*Deposit) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) } } @@ -3612,16 +3612,16 @@ func (x *fastReflection_QueryDepositResponse) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDepositResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositResponse.deposit": + case "band.tunnel.v1beta1.QueryDepositResponse.deposit": if x.Deposit == nil { x.Deposit = new(Deposit) } return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) } } @@ -3630,14 +3630,14 @@ func (x *fastReflection_QueryDepositResponse) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDepositResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryDepositResponse.deposit": + case "band.tunnel.v1beta1.QueryDepositResponse.deposit": m := new(Deposit) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryDepositResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryDepositResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryDepositResponse does not contain field %s", fd.FullName())) } } @@ -3647,7 +3647,7 @@ func (x *fastReflection_QueryDepositResponse) NewField(fd protoreflect.FieldDesc func (x *fastReflection_QueryDepositResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryDepositResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryDepositResponse", d.FullName())) } panic("unreachable") } @@ -3876,8 +3876,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryPacketsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketsRequest") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryPacketsRequest = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketsRequest") fd_QueryPacketsRequest_tunnel_id = md_QueryPacketsRequest.Fields().ByName("tunnel_id") fd_QueryPacketsRequest_pagination = md_QueryPacketsRequest.Fields().ByName("pagination") } @@ -3891,7 +3891,7 @@ func (x *QueryPacketsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryPacketsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[8] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3974,15 +3974,15 @@ func (x *fastReflection_QueryPacketsRequest) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPacketsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketsRequest.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.QueryPacketsRequest.pagination": + case "band.tunnel.v1beta1.QueryPacketsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) } } @@ -3994,15 +3994,15 @@ func (x *fastReflection_QueryPacketsRequest) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketsRequest.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.QueryPacketsRequest.pagination": + case "band.tunnel.v1beta1.QueryPacketsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) } } @@ -4014,17 +4014,17 @@ func (x *fastReflection_QueryPacketsRequest) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPacketsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketsRequest.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.QueryPacketsRequest.pagination": + case "band.tunnel.v1beta1.QueryPacketsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsRequest does not contain field %s", descriptor.FullName())) } } @@ -4040,15 +4040,15 @@ func (x *fastReflection_QueryPacketsRequest) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketsRequest.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.QueryPacketsRequest.pagination": + case "band.tunnel.v1beta1.QueryPacketsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) } } @@ -4064,18 +4064,18 @@ func (x *fastReflection_QueryPacketsRequest) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsRequest.pagination": + case "band.tunnel.v1beta1.QueryPacketsRequest.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageRequest) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryPacketsRequest is not mutable")) + case "band.tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.QueryPacketsRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) } } @@ -4084,16 +4084,16 @@ func (x *fastReflection_QueryPacketsRequest) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPacketsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketsRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.QueryPacketsRequest.pagination": + case "band.tunnel.v1beta1.QueryPacketsRequest.pagination": m := new(v1beta1.PageRequest) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsRequest does not contain field %s", fd.FullName())) } } @@ -4103,7 +4103,7 @@ func (x *fastReflection_QueryPacketsRequest) NewField(fd protoreflect.FieldDescr func (x *fastReflection_QueryPacketsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryPacketsRequest", d.FullName())) } panic("unreachable") } @@ -4410,8 +4410,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryPacketsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketsResponse") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryPacketsResponse = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketsResponse") fd_QueryPacketsResponse_packets = md_QueryPacketsResponse.Fields().ByName("packets") fd_QueryPacketsResponse_pagination = md_QueryPacketsResponse.Fields().ByName("pagination") } @@ -4425,7 +4425,7 @@ func (x *QueryPacketsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryPacketsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[9] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4508,15 +4508,15 @@ func (x *fastReflection_QueryPacketsResponse) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPacketsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsResponse.packets": + case "band.tunnel.v1beta1.QueryPacketsResponse.packets": return len(x.Packets) != 0 - case "tunnel.v1beta1.QueryPacketsResponse.pagination": + case "band.tunnel.v1beta1.QueryPacketsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) } } @@ -4528,15 +4528,15 @@ func (x *fastReflection_QueryPacketsResponse) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsResponse.packets": + case "band.tunnel.v1beta1.QueryPacketsResponse.packets": x.Packets = nil - case "tunnel.v1beta1.QueryPacketsResponse.pagination": + case "band.tunnel.v1beta1.QueryPacketsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) } } @@ -4548,20 +4548,20 @@ func (x *fastReflection_QueryPacketsResponse) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPacketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryPacketsResponse.packets": + case "band.tunnel.v1beta1.QueryPacketsResponse.packets": if len(x.Packets) == 0 { return protoreflect.ValueOfList(&_QueryPacketsResponse_1_list{}) } listValue := &_QueryPacketsResponse_1_list{list: &x.Packets} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.QueryPacketsResponse.pagination": + case "band.tunnel.v1beta1.QueryPacketsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsResponse does not contain field %s", descriptor.FullName())) } } @@ -4577,17 +4577,17 @@ func (x *fastReflection_QueryPacketsResponse) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsResponse.packets": + case "band.tunnel.v1beta1.QueryPacketsResponse.packets": lv := value.List() clv := lv.(*_QueryPacketsResponse_1_list) x.Packets = *clv.list - case "tunnel.v1beta1.QueryPacketsResponse.pagination": + case "band.tunnel.v1beta1.QueryPacketsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) } } @@ -4603,22 +4603,22 @@ func (x *fastReflection_QueryPacketsResponse) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsResponse.packets": + case "band.tunnel.v1beta1.QueryPacketsResponse.packets": if x.Packets == nil { x.Packets = []*Packet{} } value := &_QueryPacketsResponse_1_list{list: &x.Packets} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.QueryPacketsResponse.pagination": + case "band.tunnel.v1beta1.QueryPacketsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) } } @@ -4627,17 +4627,17 @@ func (x *fastReflection_QueryPacketsResponse) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPacketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketsResponse.packets": + case "band.tunnel.v1beta1.QueryPacketsResponse.packets": list := []*Packet{} return protoreflect.ValueOfList(&_QueryPacketsResponse_1_list{list: &list}) - case "tunnel.v1beta1.QueryPacketsResponse.pagination": + case "band.tunnel.v1beta1.QueryPacketsResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketsResponse does not contain field %s", fd.FullName())) } } @@ -4647,7 +4647,7 @@ func (x *fastReflection_QueryPacketsResponse) NewField(fd protoreflect.FieldDesc func (x *fastReflection_QueryPacketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryPacketsResponse", d.FullName())) } panic("unreachable") } @@ -4932,8 +4932,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryPacketRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketRequest") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryPacketRequest = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketRequest") fd_QueryPacketRequest_tunnel_id = md_QueryPacketRequest.Fields().ByName("tunnel_id") fd_QueryPacketRequest_sequence = md_QueryPacketRequest.Fields().ByName("sequence") } @@ -4947,7 +4947,7 @@ func (x *QueryPacketRequest) ProtoReflect() protoreflect.Message { } func (x *QueryPacketRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[10] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5030,15 +5030,15 @@ func (x *fastReflection_QueryPacketRequest) Range(f func(protoreflect.FieldDescr // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPacketRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketRequest.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.QueryPacketRequest.sequence": + case "band.tunnel.v1beta1.QueryPacketRequest.sequence": return x.Sequence != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) } } @@ -5050,15 +5050,15 @@ func (x *fastReflection_QueryPacketRequest) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketRequest.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.QueryPacketRequest.sequence": + case "band.tunnel.v1beta1.QueryPacketRequest.sequence": x.Sequence = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) } } @@ -5070,17 +5070,17 @@ func (x *fastReflection_QueryPacketRequest) Clear(fd protoreflect.FieldDescripto // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPacketRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketRequest.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.QueryPacketRequest.sequence": + case "band.tunnel.v1beta1.QueryPacketRequest.sequence": value := x.Sequence return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketRequest does not contain field %s", descriptor.FullName())) } } @@ -5096,15 +5096,15 @@ func (x *fastReflection_QueryPacketRequest) Get(descriptor protoreflect.FieldDes // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketRequest.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.QueryPacketRequest.sequence": + case "band.tunnel.v1beta1.QueryPacketRequest.sequence": x.Sequence = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) } } @@ -5120,15 +5120,15 @@ func (x *fastReflection_QueryPacketRequest) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.QueryPacketRequest is not mutable")) - case "tunnel.v1beta1.QueryPacketRequest.sequence": - panic(fmt.Errorf("field sequence of message tunnel.v1beta1.QueryPacketRequest is not mutable")) + case "band.tunnel.v1beta1.QueryPacketRequest.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.QueryPacketRequest is not mutable")) + case "band.tunnel.v1beta1.QueryPacketRequest.sequence": + panic(fmt.Errorf("field sequence of message band.tunnel.v1beta1.QueryPacketRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) } } @@ -5137,15 +5137,15 @@ func (x *fastReflection_QueryPacketRequest) Mutable(fd protoreflect.FieldDescrip // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPacketRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketRequest.tunnel_id": + case "band.tunnel.v1beta1.QueryPacketRequest.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.QueryPacketRequest.sequence": + case "band.tunnel.v1beta1.QueryPacketRequest.sequence": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketRequest does not contain field %s", fd.FullName())) } } @@ -5155,7 +5155,7 @@ func (x *fastReflection_QueryPacketRequest) NewField(fd protoreflect.FieldDescri func (x *fastReflection_QueryPacketRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryPacketRequest", d.FullName())) } panic("unreachable") } @@ -5383,8 +5383,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryPacketResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketResponse") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryPacketResponse = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryPacketResponse") fd_QueryPacketResponse_packet = md_QueryPacketResponse.Fields().ByName("packet") } @@ -5397,7 +5397,7 @@ func (x *QueryPacketResponse) ProtoReflect() protoreflect.Message { } func (x *QueryPacketResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[11] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5474,13 +5474,13 @@ func (x *fastReflection_QueryPacketResponse) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryPacketResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketResponse.packet": + case "band.tunnel.v1beta1.QueryPacketResponse.packet": return x.Packet != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) } } @@ -5492,13 +5492,13 @@ func (x *fastReflection_QueryPacketResponse) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketResponse.packet": + case "band.tunnel.v1beta1.QueryPacketResponse.packet": x.Packet = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) } } @@ -5510,14 +5510,14 @@ func (x *fastReflection_QueryPacketResponse) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryPacketResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryPacketResponse.packet": + case "band.tunnel.v1beta1.QueryPacketResponse.packet": value := x.Packet return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketResponse does not contain field %s", descriptor.FullName())) } } @@ -5533,13 +5533,13 @@ func (x *fastReflection_QueryPacketResponse) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketResponse.packet": + case "band.tunnel.v1beta1.QueryPacketResponse.packet": x.Packet = value.Message().Interface().(*Packet) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) } } @@ -5555,16 +5555,16 @@ func (x *fastReflection_QueryPacketResponse) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryPacketResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketResponse.packet": + case "band.tunnel.v1beta1.QueryPacketResponse.packet": if x.Packet == nil { x.Packet = new(Packet) } return protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) } } @@ -5573,14 +5573,14 @@ func (x *fastReflection_QueryPacketResponse) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryPacketResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryPacketResponse.packet": + case "band.tunnel.v1beta1.QueryPacketResponse.packet": m := new(Packet) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryPacketResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryPacketResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryPacketResponse does not contain field %s", fd.FullName())) } } @@ -5590,7 +5590,7 @@ func (x *fastReflection_QueryPacketResponse) NewField(fd protoreflect.FieldDescr func (x *fastReflection_QueryPacketResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryPacketResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryPacketResponse", d.FullName())) } panic("unreachable") } @@ -5817,8 +5817,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryParamsRequest = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryParamsRequest = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") } var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) @@ -5830,7 +5830,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[12] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5903,9 +5903,9 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -5919,9 +5919,9 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -5935,9 +5935,9 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsRequest does not contain field %s", descriptor.FullName())) } } @@ -5955,9 +5955,9 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -5975,9 +5975,9 @@ func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescrip switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -5988,9 +5988,9 @@ func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsRequest")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) } } @@ -6000,7 +6000,7 @@ func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescri func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryParamsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryParamsRequest", d.FullName())) } panic("unreachable") } @@ -6174,8 +6174,8 @@ var ( ) func init() { - file_tunnel_v1beta1_query_proto_init() - md_QueryParamsResponse = File_tunnel_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") + file_band_tunnel_v1beta1_query_proto_init() + md_QueryParamsResponse = File_band_tunnel_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } @@ -6188,7 +6188,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[13] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6265,13 +6265,13 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.QueryParamsResponse.params": + case "band.tunnel.v1beta1.QueryParamsResponse.params": return x.Params != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -6283,13 +6283,13 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.QueryParamsResponse.params": + case "band.tunnel.v1beta1.QueryParamsResponse.params": x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -6301,14 +6301,14 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.QueryParamsResponse.params": + case "band.tunnel.v1beta1.QueryParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsResponse does not contain field %s", descriptor.FullName())) } } @@ -6324,13 +6324,13 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.QueryParamsResponse.params": + case "band.tunnel.v1beta1.QueryParamsResponse.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -6346,16 +6346,16 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryParamsResponse.params": + case "band.tunnel.v1beta1.QueryParamsResponse.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -6364,14 +6364,14 @@ func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.QueryParamsResponse.params": + case "band.tunnel.v1beta1.QueryParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.QueryParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) } } @@ -6381,7 +6381,7 @@ func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescr func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.QueryParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.QueryParamsResponse", d.FullName())) } panic("unreachable") } @@ -6607,7 +6607,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: tunnel/v1beta1/query.proto +// source: band/tunnel/v1beta1/query.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -6653,11 +6653,11 @@ func (x TunnelStatusFilter) String() string { } func (TunnelStatusFilter) Descriptor() protoreflect.EnumDescriptor { - return file_tunnel_v1beta1_query_proto_enumTypes[0].Descriptor() + return file_band_tunnel_v1beta1_query_proto_enumTypes[0].Descriptor() } func (TunnelStatusFilter) Type() protoreflect.EnumType { - return &file_tunnel_v1beta1_query_proto_enumTypes[0] + return &file_band_tunnel_v1beta1_query_proto_enumTypes[0] } func (x TunnelStatusFilter) Number() protoreflect.EnumNumber { @@ -6666,7 +6666,7 @@ func (x TunnelStatusFilter) Number() protoreflect.EnumNumber { // Deprecated: Use TunnelStatusFilter.Descriptor instead. func (TunnelStatusFilter) EnumDescriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{0} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{0} } // QueryTunnelsRequest is the request type for the Query/Tunnels RPC method. @@ -6676,7 +6676,7 @@ type QueryTunnelsRequest struct { unknownFields protoimpl.UnknownFields // status_filter is a flag to filter tunnels by status. - StatusFilter TunnelStatusFilter `protobuf:"varint,1,opt,name=status_filter,json=statusFilter,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"status_filter,omitempty"` + StatusFilter TunnelStatusFilter `protobuf:"varint,1,opt,name=status_filter,json=statusFilter,proto3,enum=band.tunnel.v1beta1.TunnelStatusFilter" json:"status_filter,omitempty"` // pagination defines an optional pagination for the request. Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -6684,7 +6684,7 @@ type QueryTunnelsRequest struct { func (x *QueryTunnelsRequest) Reset() { *x = QueryTunnelsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6698,7 +6698,7 @@ func (*QueryTunnelsRequest) ProtoMessage() {} // Deprecated: Use QueryTunnelsRequest.ProtoReflect.Descriptor instead. func (*QueryTunnelsRequest) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{0} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{0} } func (x *QueryTunnelsRequest) GetStatusFilter() TunnelStatusFilter { @@ -6730,7 +6730,7 @@ type QueryTunnelsResponse struct { func (x *QueryTunnelsResponse) Reset() { *x = QueryTunnelsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[1] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6744,7 +6744,7 @@ func (*QueryTunnelsResponse) ProtoMessage() {} // Deprecated: Use QueryTunnelsResponse.ProtoReflect.Descriptor instead. func (*QueryTunnelsResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{1} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{1} } func (x *QueryTunnelsResponse) GetTunnels() []*Tunnel { @@ -6774,7 +6774,7 @@ type QueryTunnelRequest struct { func (x *QueryTunnelRequest) Reset() { *x = QueryTunnelRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[2] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6788,7 +6788,7 @@ func (*QueryTunnelRequest) ProtoMessage() {} // Deprecated: Use QueryTunnelRequest.ProtoReflect.Descriptor instead. func (*QueryTunnelRequest) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{2} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{2} } func (x *QueryTunnelRequest) GetTunnelId() uint64 { @@ -6811,7 +6811,7 @@ type QueryTunnelResponse struct { func (x *QueryTunnelResponse) Reset() { *x = QueryTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[3] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6825,7 +6825,7 @@ func (*QueryTunnelResponse) ProtoMessage() {} // Deprecated: Use QueryTunnelResponse.ProtoReflect.Descriptor instead. func (*QueryTunnelResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{3} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryTunnelResponse) GetTunnel() *Tunnel { @@ -6850,7 +6850,7 @@ type QueryDepositsRequest struct { func (x *QueryDepositsRequest) Reset() { *x = QueryDepositsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[4] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6864,7 +6864,7 @@ func (*QueryDepositsRequest) ProtoMessage() {} // Deprecated: Use QueryDepositsRequest.ProtoReflect.Descriptor instead. func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{4} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{4} } func (x *QueryDepositsRequest) GetTunnelId() uint64 { @@ -6896,7 +6896,7 @@ type QueryDepositsResponse struct { func (x *QueryDepositsResponse) Reset() { *x = QueryDepositsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[5] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6910,7 +6910,7 @@ func (*QueryDepositsResponse) ProtoMessage() {} // Deprecated: Use QueryDepositsResponse.ProtoReflect.Descriptor instead. func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{5} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{5} } func (x *QueryDepositsResponse) GetDeposits() []*Deposit { @@ -6942,7 +6942,7 @@ type QueryDepositRequest struct { func (x *QueryDepositRequest) Reset() { *x = QueryDepositRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6956,7 +6956,7 @@ func (*QueryDepositRequest) ProtoMessage() {} // Deprecated: Use QueryDepositRequest.ProtoReflect.Descriptor instead. func (*QueryDepositRequest) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{6} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{6} } func (x *QueryDepositRequest) GetTunnelId() uint64 { @@ -6986,7 +6986,7 @@ type QueryDepositResponse struct { func (x *QueryDepositResponse) Reset() { *x = QueryDepositResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7000,7 +7000,7 @@ func (*QueryDepositResponse) ProtoMessage() {} // Deprecated: Use QueryDepositResponse.ProtoReflect.Descriptor instead. func (*QueryDepositResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{7} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{7} } func (x *QueryDepositResponse) GetDeposit() *Deposit { @@ -7025,7 +7025,7 @@ type QueryPacketsRequest struct { func (x *QueryPacketsRequest) Reset() { *x = QueryPacketsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[8] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7039,7 +7039,7 @@ func (*QueryPacketsRequest) ProtoMessage() {} // Deprecated: Use QueryPacketsRequest.ProtoReflect.Descriptor instead. func (*QueryPacketsRequest) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{8} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{8} } func (x *QueryPacketsRequest) GetTunnelId() uint64 { @@ -7071,7 +7071,7 @@ type QueryPacketsResponse struct { func (x *QueryPacketsResponse) Reset() { *x = QueryPacketsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[9] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7085,7 +7085,7 @@ func (*QueryPacketsResponse) ProtoMessage() {} // Deprecated: Use QueryPacketsResponse.ProtoReflect.Descriptor instead. func (*QueryPacketsResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{9} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{9} } func (x *QueryPacketsResponse) GetPackets() []*Packet { @@ -7117,7 +7117,7 @@ type QueryPacketRequest struct { func (x *QueryPacketRequest) Reset() { *x = QueryPacketRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[10] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7131,7 +7131,7 @@ func (*QueryPacketRequest) ProtoMessage() {} // Deprecated: Use QueryPacketRequest.ProtoReflect.Descriptor instead. func (*QueryPacketRequest) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{10} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{10} } func (x *QueryPacketRequest) GetTunnelId() uint64 { @@ -7161,7 +7161,7 @@ type QueryPacketResponse struct { func (x *QueryPacketResponse) Reset() { *x = QueryPacketResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[11] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7175,7 +7175,7 @@ func (*QueryPacketResponse) ProtoMessage() {} // Deprecated: Use QueryPacketResponse.ProtoReflect.Descriptor instead. func (*QueryPacketResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{11} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{11} } func (x *QueryPacketResponse) GetPacket() *Packet { @@ -7195,7 +7195,7 @@ type QueryParamsRequest struct { func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[12] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7209,7 +7209,7 @@ func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{12} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{12} } // QueryParamsResponse is the response type for the Query/Params RPC method. @@ -7225,7 +7225,7 @@ type QueryParamsResponse struct { func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_query_proto_msgTypes[13] + mi := &file_band_tunnel_v1beta1_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7239,7 +7239,7 @@ func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{13} + return file_band_tunnel_v1beta1_query_proto_rawDescGZIP(), []int{13} } func (x *QueryParamsResponse) GetParams() *Params { @@ -7249,258 +7249,269 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } -var File_tunnel_v1beta1_query_proto protoreflect.FileDescriptor - -var file_tunnel_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, - 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x91, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x31, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, - 0x06, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x22, 0x7b, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, +var File_band_tunnel_v1beta1_query_proto protoreflect.FileDescriptor + +var file_band_tunnel_v1beta1_query_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, + 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x95, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, - 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x31, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x7b, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x22, 0x54, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7a, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x4f, 0x0a, 0x14, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7a, 0x0a, 0x13, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, - 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x30, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, 0x12, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2a, 0x84, 0x01, 0x0a, 0x12, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x20, 0x54, - 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, - 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, - 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, - 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x32, 0xba, 0x07, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x75, 0x0a, 0x07, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, - 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x7e, 0x0a, 0x06, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, - 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, - 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, + 0x07, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x07, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, + 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x4a, 0x0a, 0x13, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, + 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x2a, 0x84, 0x01, 0x0a, 0x12, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x55, 0x4e, 0x4e, 0x45, + 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, + 0x1b, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, + 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x21, + 0x0a, 0x1d, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, + 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x32, 0x81, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x7f, 0x0a, 0x07, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x28, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x27, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x97, 0x01, + 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, - 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x96, 0x01, 0x0a, - 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, + 0x12, 0x38, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, 0x7b, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x07, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x12, 0x9b, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, + 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0x7b, + 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x89, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x12, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x73, 0x12, 0x91, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0x71, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x22, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x12, 0x16, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xbc, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xdb, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, + 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, + 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, + 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( - file_tunnel_v1beta1_query_proto_rawDescOnce sync.Once - file_tunnel_v1beta1_query_proto_rawDescData = file_tunnel_v1beta1_query_proto_rawDesc + file_band_tunnel_v1beta1_query_proto_rawDescOnce sync.Once + file_band_tunnel_v1beta1_query_proto_rawDescData = file_band_tunnel_v1beta1_query_proto_rawDesc ) -func file_tunnel_v1beta1_query_proto_rawDescGZIP() []byte { - file_tunnel_v1beta1_query_proto_rawDescOnce.Do(func() { - file_tunnel_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_query_proto_rawDescData) +func file_band_tunnel_v1beta1_query_proto_rawDescGZIP() []byte { + file_band_tunnel_v1beta1_query_proto_rawDescOnce.Do(func() { + file_band_tunnel_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_band_tunnel_v1beta1_query_proto_rawDescData) }) - return file_tunnel_v1beta1_query_proto_rawDescData -} - -var file_tunnel_v1beta1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_tunnel_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_tunnel_v1beta1_query_proto_goTypes = []interface{}{ - (TunnelStatusFilter)(0), // 0: tunnel.v1beta1.TunnelStatusFilter - (*QueryTunnelsRequest)(nil), // 1: tunnel.v1beta1.QueryTunnelsRequest - (*QueryTunnelsResponse)(nil), // 2: tunnel.v1beta1.QueryTunnelsResponse - (*QueryTunnelRequest)(nil), // 3: tunnel.v1beta1.QueryTunnelRequest - (*QueryTunnelResponse)(nil), // 4: tunnel.v1beta1.QueryTunnelResponse - (*QueryDepositsRequest)(nil), // 5: tunnel.v1beta1.QueryDepositsRequest - (*QueryDepositsResponse)(nil), // 6: tunnel.v1beta1.QueryDepositsResponse - (*QueryDepositRequest)(nil), // 7: tunnel.v1beta1.QueryDepositRequest - (*QueryDepositResponse)(nil), // 8: tunnel.v1beta1.QueryDepositResponse - (*QueryPacketsRequest)(nil), // 9: tunnel.v1beta1.QueryPacketsRequest - (*QueryPacketsResponse)(nil), // 10: tunnel.v1beta1.QueryPacketsResponse - (*QueryPacketRequest)(nil), // 11: tunnel.v1beta1.QueryPacketRequest - (*QueryPacketResponse)(nil), // 12: tunnel.v1beta1.QueryPacketResponse - (*QueryParamsRequest)(nil), // 13: tunnel.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 14: tunnel.v1beta1.QueryParamsResponse + return file_band_tunnel_v1beta1_query_proto_rawDescData +} + +var file_band_tunnel_v1beta1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_band_tunnel_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_band_tunnel_v1beta1_query_proto_goTypes = []interface{}{ + (TunnelStatusFilter)(0), // 0: band.tunnel.v1beta1.TunnelStatusFilter + (*QueryTunnelsRequest)(nil), // 1: band.tunnel.v1beta1.QueryTunnelsRequest + (*QueryTunnelsResponse)(nil), // 2: band.tunnel.v1beta1.QueryTunnelsResponse + (*QueryTunnelRequest)(nil), // 3: band.tunnel.v1beta1.QueryTunnelRequest + (*QueryTunnelResponse)(nil), // 4: band.tunnel.v1beta1.QueryTunnelResponse + (*QueryDepositsRequest)(nil), // 5: band.tunnel.v1beta1.QueryDepositsRequest + (*QueryDepositsResponse)(nil), // 6: band.tunnel.v1beta1.QueryDepositsResponse + (*QueryDepositRequest)(nil), // 7: band.tunnel.v1beta1.QueryDepositRequest + (*QueryDepositResponse)(nil), // 8: band.tunnel.v1beta1.QueryDepositResponse + (*QueryPacketsRequest)(nil), // 9: band.tunnel.v1beta1.QueryPacketsRequest + (*QueryPacketsResponse)(nil), // 10: band.tunnel.v1beta1.QueryPacketsResponse + (*QueryPacketRequest)(nil), // 11: band.tunnel.v1beta1.QueryPacketRequest + (*QueryPacketResponse)(nil), // 12: band.tunnel.v1beta1.QueryPacketResponse + (*QueryParamsRequest)(nil), // 13: band.tunnel.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 14: band.tunnel.v1beta1.QueryParamsResponse (*v1beta1.PageRequest)(nil), // 15: cosmos.base.query.v1beta1.PageRequest - (*Tunnel)(nil), // 16: tunnel.v1beta1.Tunnel + (*Tunnel)(nil), // 16: band.tunnel.v1beta1.Tunnel (*v1beta1.PageResponse)(nil), // 17: cosmos.base.query.v1beta1.PageResponse - (*Deposit)(nil), // 18: tunnel.v1beta1.Deposit - (*Packet)(nil), // 19: tunnel.v1beta1.Packet - (*Params)(nil), // 20: tunnel.v1beta1.Params -} -var file_tunnel_v1beta1_query_proto_depIdxs = []int32{ - 0, // 0: tunnel.v1beta1.QueryTunnelsRequest.status_filter:type_name -> tunnel.v1beta1.TunnelStatusFilter - 15, // 1: tunnel.v1beta1.QueryTunnelsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 16, // 2: tunnel.v1beta1.QueryTunnelsResponse.tunnels:type_name -> tunnel.v1beta1.Tunnel - 17, // 3: tunnel.v1beta1.QueryTunnelsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 16, // 4: tunnel.v1beta1.QueryTunnelResponse.tunnel:type_name -> tunnel.v1beta1.Tunnel - 15, // 5: tunnel.v1beta1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 18, // 6: tunnel.v1beta1.QueryDepositsResponse.deposits:type_name -> tunnel.v1beta1.Deposit - 17, // 7: tunnel.v1beta1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 18, // 8: tunnel.v1beta1.QueryDepositResponse.deposit:type_name -> tunnel.v1beta1.Deposit - 15, // 9: tunnel.v1beta1.QueryPacketsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 10: tunnel.v1beta1.QueryPacketsResponse.packets:type_name -> tunnel.v1beta1.Packet - 17, // 11: tunnel.v1beta1.QueryPacketsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 19, // 12: tunnel.v1beta1.QueryPacketResponse.packet:type_name -> tunnel.v1beta1.Packet - 20, // 13: tunnel.v1beta1.QueryParamsResponse.params:type_name -> tunnel.v1beta1.Params - 1, // 14: tunnel.v1beta1.Query.Tunnels:input_type -> tunnel.v1beta1.QueryTunnelsRequest - 3, // 15: tunnel.v1beta1.Query.Tunnel:input_type -> tunnel.v1beta1.QueryTunnelRequest - 5, // 16: tunnel.v1beta1.Query.Deposits:input_type -> tunnel.v1beta1.QueryDepositsRequest - 7, // 17: tunnel.v1beta1.Query.Deposit:input_type -> tunnel.v1beta1.QueryDepositRequest - 9, // 18: tunnel.v1beta1.Query.Packets:input_type -> tunnel.v1beta1.QueryPacketsRequest - 11, // 19: tunnel.v1beta1.Query.Packet:input_type -> tunnel.v1beta1.QueryPacketRequest - 13, // 20: tunnel.v1beta1.Query.Params:input_type -> tunnel.v1beta1.QueryParamsRequest - 2, // 21: tunnel.v1beta1.Query.Tunnels:output_type -> tunnel.v1beta1.QueryTunnelsResponse - 4, // 22: tunnel.v1beta1.Query.Tunnel:output_type -> tunnel.v1beta1.QueryTunnelResponse - 6, // 23: tunnel.v1beta1.Query.Deposits:output_type -> tunnel.v1beta1.QueryDepositsResponse - 8, // 24: tunnel.v1beta1.Query.Deposit:output_type -> tunnel.v1beta1.QueryDepositResponse - 10, // 25: tunnel.v1beta1.Query.Packets:output_type -> tunnel.v1beta1.QueryPacketsResponse - 12, // 26: tunnel.v1beta1.Query.Packet:output_type -> tunnel.v1beta1.QueryPacketResponse - 14, // 27: tunnel.v1beta1.Query.Params:output_type -> tunnel.v1beta1.QueryParamsResponse + (*Deposit)(nil), // 18: band.tunnel.v1beta1.Deposit + (*Packet)(nil), // 19: band.tunnel.v1beta1.Packet + (*Params)(nil), // 20: band.tunnel.v1beta1.Params +} +var file_band_tunnel_v1beta1_query_proto_depIdxs = []int32{ + 0, // 0: band.tunnel.v1beta1.QueryTunnelsRequest.status_filter:type_name -> band.tunnel.v1beta1.TunnelStatusFilter + 15, // 1: band.tunnel.v1beta1.QueryTunnelsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 16, // 2: band.tunnel.v1beta1.QueryTunnelsResponse.tunnels:type_name -> band.tunnel.v1beta1.Tunnel + 17, // 3: band.tunnel.v1beta1.QueryTunnelsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 16, // 4: band.tunnel.v1beta1.QueryTunnelResponse.tunnel:type_name -> band.tunnel.v1beta1.Tunnel + 15, // 5: band.tunnel.v1beta1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 6: band.tunnel.v1beta1.QueryDepositsResponse.deposits:type_name -> band.tunnel.v1beta1.Deposit + 17, // 7: band.tunnel.v1beta1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 18, // 8: band.tunnel.v1beta1.QueryDepositResponse.deposit:type_name -> band.tunnel.v1beta1.Deposit + 15, // 9: band.tunnel.v1beta1.QueryPacketsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 19, // 10: band.tunnel.v1beta1.QueryPacketsResponse.packets:type_name -> band.tunnel.v1beta1.Packet + 17, // 11: band.tunnel.v1beta1.QueryPacketsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 19, // 12: band.tunnel.v1beta1.QueryPacketResponse.packet:type_name -> band.tunnel.v1beta1.Packet + 20, // 13: band.tunnel.v1beta1.QueryParamsResponse.params:type_name -> band.tunnel.v1beta1.Params + 1, // 14: band.tunnel.v1beta1.Query.Tunnels:input_type -> band.tunnel.v1beta1.QueryTunnelsRequest + 3, // 15: band.tunnel.v1beta1.Query.Tunnel:input_type -> band.tunnel.v1beta1.QueryTunnelRequest + 5, // 16: band.tunnel.v1beta1.Query.Deposits:input_type -> band.tunnel.v1beta1.QueryDepositsRequest + 7, // 17: band.tunnel.v1beta1.Query.Deposit:input_type -> band.tunnel.v1beta1.QueryDepositRequest + 9, // 18: band.tunnel.v1beta1.Query.Packets:input_type -> band.tunnel.v1beta1.QueryPacketsRequest + 11, // 19: band.tunnel.v1beta1.Query.Packet:input_type -> band.tunnel.v1beta1.QueryPacketRequest + 13, // 20: band.tunnel.v1beta1.Query.Params:input_type -> band.tunnel.v1beta1.QueryParamsRequest + 2, // 21: band.tunnel.v1beta1.Query.Tunnels:output_type -> band.tunnel.v1beta1.QueryTunnelsResponse + 4, // 22: band.tunnel.v1beta1.Query.Tunnel:output_type -> band.tunnel.v1beta1.QueryTunnelResponse + 6, // 23: band.tunnel.v1beta1.Query.Deposits:output_type -> band.tunnel.v1beta1.QueryDepositsResponse + 8, // 24: band.tunnel.v1beta1.Query.Deposit:output_type -> band.tunnel.v1beta1.QueryDepositResponse + 10, // 25: band.tunnel.v1beta1.Query.Packets:output_type -> band.tunnel.v1beta1.QueryPacketsResponse + 12, // 26: band.tunnel.v1beta1.Query.Packet:output_type -> band.tunnel.v1beta1.QueryPacketResponse + 14, // 27: band.tunnel.v1beta1.Query.Params:output_type -> band.tunnel.v1beta1.QueryParamsResponse 21, // [21:28] is the sub-list for method output_type 14, // [14:21] is the sub-list for method input_type 14, // [14:14] is the sub-list for extension type_name @@ -7508,15 +7519,15 @@ var file_tunnel_v1beta1_query_proto_depIdxs = []int32{ 0, // [0:14] is the sub-list for field type_name } -func init() { file_tunnel_v1beta1_query_proto_init() } -func file_tunnel_v1beta1_query_proto_init() { - if File_tunnel_v1beta1_query_proto != nil { +func init() { file_band_tunnel_v1beta1_query_proto_init() } +func file_band_tunnel_v1beta1_query_proto_init() { + if File_band_tunnel_v1beta1_query_proto != nil { return } - file_tunnel_v1beta1_params_proto_init() - file_tunnel_v1beta1_tunnel_proto_init() + file_band_tunnel_v1beta1_params_proto_init() + file_band_tunnel_v1beta1_tunnel_proto_init() if !protoimpl.UnsafeEnabled { - file_tunnel_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryTunnelsRequest); i { case 0: return &v.state @@ -7528,7 +7539,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryTunnelsResponse); i { case 0: return &v.state @@ -7540,7 +7551,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryTunnelRequest); i { case 0: return &v.state @@ -7552,7 +7563,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryTunnelResponse); i { case 0: return &v.state @@ -7564,7 +7575,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDepositsRequest); i { case 0: return &v.state @@ -7576,7 +7587,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDepositsResponse); i { case 0: return &v.state @@ -7588,7 +7599,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDepositRequest); i { case 0: return &v.state @@ -7600,7 +7611,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryDepositResponse); i { case 0: return &v.state @@ -7612,7 +7623,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPacketsRequest); i { case 0: return &v.state @@ -7624,7 +7635,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPacketsResponse); i { case 0: return &v.state @@ -7636,7 +7647,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPacketRequest); i { case 0: return &v.state @@ -7648,7 +7659,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPacketResponse); i { case 0: return &v.state @@ -7660,7 +7671,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { case 0: return &v.state @@ -7672,7 +7683,7 @@ func file_tunnel_v1beta1_query_proto_init() { return nil } } - file_tunnel_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state @@ -7689,19 +7700,19 @@ func file_tunnel_v1beta1_query_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tunnel_v1beta1_query_proto_rawDesc, + RawDescriptor: file_band_tunnel_v1beta1_query_proto_rawDesc, NumEnums: 1, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_tunnel_v1beta1_query_proto_goTypes, - DependencyIndexes: file_tunnel_v1beta1_query_proto_depIdxs, - EnumInfos: file_tunnel_v1beta1_query_proto_enumTypes, - MessageInfos: file_tunnel_v1beta1_query_proto_msgTypes, + GoTypes: file_band_tunnel_v1beta1_query_proto_goTypes, + DependencyIndexes: file_band_tunnel_v1beta1_query_proto_depIdxs, + EnumInfos: file_band_tunnel_v1beta1_query_proto_enumTypes, + MessageInfos: file_band_tunnel_v1beta1_query_proto_msgTypes, }.Build() - File_tunnel_v1beta1_query_proto = out.File - file_tunnel_v1beta1_query_proto_rawDesc = nil - file_tunnel_v1beta1_query_proto_goTypes = nil - file_tunnel_v1beta1_query_proto_depIdxs = nil + File_band_tunnel_v1beta1_query_proto = out.File + file_band_tunnel_v1beta1_query_proto_rawDesc = nil + file_band_tunnel_v1beta1_query_proto_goTypes = nil + file_band_tunnel_v1beta1_query_proto_depIdxs = nil } diff --git a/api/tunnel/v1beta1/query_grpc.pb.go b/api/band/tunnel/v1beta1/query_grpc.pb.go similarity index 95% rename from api/tunnel/v1beta1/query_grpc.pb.go rename to api/band/tunnel/v1beta1/query_grpc.pb.go index 7d905fbe8..12e87be91 100644 --- a/api/tunnel/v1beta1/query_grpc.pb.go +++ b/api/band/tunnel/v1beta1/query_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) -// source: tunnel/v1beta1/query.proto +// source: band/tunnel/v1beta1/query.proto package tunnelv1beta1 @@ -19,13 +19,13 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Tunnels_FullMethodName = "/tunnel.v1beta1.Query/Tunnels" - Query_Tunnel_FullMethodName = "/tunnel.v1beta1.Query/Tunnel" - Query_Deposits_FullMethodName = "/tunnel.v1beta1.Query/Deposits" - Query_Deposit_FullMethodName = "/tunnel.v1beta1.Query/Deposit" - Query_Packets_FullMethodName = "/tunnel.v1beta1.Query/Packets" - Query_Packet_FullMethodName = "/tunnel.v1beta1.Query/Packet" - Query_Params_FullMethodName = "/tunnel.v1beta1.Query/Params" + Query_Tunnels_FullMethodName = "/band.tunnel.v1beta1.Query/Tunnels" + Query_Tunnel_FullMethodName = "/band.tunnel.v1beta1.Query/Tunnel" + Query_Deposits_FullMethodName = "/band.tunnel.v1beta1.Query/Deposits" + Query_Deposit_FullMethodName = "/band.tunnel.v1beta1.Query/Deposit" + Query_Packets_FullMethodName = "/band.tunnel.v1beta1.Query/Packets" + Query_Packet_FullMethodName = "/band.tunnel.v1beta1.Query/Packet" + Query_Params_FullMethodName = "/band.tunnel.v1beta1.Query/Params" ) // QueryClient is the client API for Query service. @@ -308,7 +308,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "tunnel.v1beta1.Query", + ServiceName: "band.tunnel.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -341,5 +341,5 @@ var Query_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "tunnel/v1beta1/query.proto", + Metadata: "band/tunnel/v1beta1/query.proto", } diff --git a/api/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go similarity index 82% rename from api/tunnel/v1beta1/tunnel.pulsar.go rename to api/band/tunnel/v1beta1/tunnel.pulsar.go index 3fe45e870..cfac423e0 100644 --- a/api/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -5,7 +5,7 @@ import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" - _ "github.com/bandprotocol/chain/v3/api/feeds/v1beta1" + _ "github.com/bandprotocol/chain/v3/api/band/feeds/v1beta1" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -25,8 +25,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_TSSRoute = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSRoute") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_TSSRoute = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSRoute") fd_TSSRoute_destination_chain_id = md_TSSRoute.Fields().ByName("destination_chain_id") fd_TSSRoute_destination_contract_address = md_TSSRoute.Fields().ByName("destination_contract_address") } @@ -40,7 +40,7 @@ func (x *TSSRoute) ProtoReflect() protoreflect.Message { } func (x *TSSRoute) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -123,15 +123,15 @@ func (x *fastReflection_TSSRoute) Range(f func(protoreflect.FieldDescriptor, pro // a repeated field is populated if it is non-empty. func (x *fastReflection_TSSRoute) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.TSSRoute.destination_chain_id": + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": return x.DestinationChainId != "" - case "tunnel.v1beta1.TSSRoute.destination_contract_address": + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": return x.DestinationContractAddress != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) } } @@ -143,15 +143,15 @@ func (x *fastReflection_TSSRoute) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TSSRoute) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.TSSRoute.destination_chain_id": + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": x.DestinationChainId = "" - case "tunnel.v1beta1.TSSRoute.destination_contract_address": + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": x.DestinationContractAddress = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) } } @@ -163,17 +163,17 @@ func (x *fastReflection_TSSRoute) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TSSRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.TSSRoute.destination_chain_id": + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": value := x.DestinationChainId return protoreflect.ValueOfString(value) - case "tunnel.v1beta1.TSSRoute.destination_contract_address": + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": value := x.DestinationContractAddress return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", descriptor.FullName())) } } @@ -189,15 +189,15 @@ func (x *fastReflection_TSSRoute) Get(descriptor protoreflect.FieldDescriptor) p // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TSSRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.TSSRoute.destination_chain_id": + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": x.DestinationChainId = value.Interface().(string) - case "tunnel.v1beta1.TSSRoute.destination_contract_address": + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": x.DestinationContractAddress = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) } } @@ -213,15 +213,15 @@ func (x *fastReflection_TSSRoute) Set(fd protoreflect.FieldDescriptor, value pro // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TSSRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.TSSRoute.destination_chain_id": - panic(fmt.Errorf("field destination_chain_id of message tunnel.v1beta1.TSSRoute is not mutable")) - case "tunnel.v1beta1.TSSRoute.destination_contract_address": - panic(fmt.Errorf("field destination_contract_address of message tunnel.v1beta1.TSSRoute is not mutable")) + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message band.tunnel.v1beta1.TSSRoute is not mutable")) + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message band.tunnel.v1beta1.TSSRoute is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) } } @@ -230,15 +230,15 @@ func (x *fastReflection_TSSRoute) Mutable(fd protoreflect.FieldDescriptor) proto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TSSRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.TSSRoute.destination_chain_id": + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": return protoreflect.ValueOfString("") - case "tunnel.v1beta1.TSSRoute.destination_contract_address": + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) } } @@ -248,7 +248,7 @@ func (x *fastReflection_TSSRoute) NewField(fd protoreflect.FieldDescriptor) prot func (x *fastReflection_TSSRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TSSRoute", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSRoute", d.FullName())) } panic("unreachable") } @@ -510,8 +510,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_SignalDeviation = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalDeviation") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_SignalDeviation = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalDeviation") fd_SignalDeviation_signal_id = md_SignalDeviation.Fields().ByName("signal_id") fd_SignalDeviation_soft_deviation_bps = md_SignalDeviation.Fields().ByName("soft_deviation_bps") fd_SignalDeviation_hard_deviation_bps = md_SignalDeviation.Fields().ByName("hard_deviation_bps") @@ -526,7 +526,7 @@ func (x *SignalDeviation) ProtoReflect() protoreflect.Message { } func (x *SignalDeviation) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[1] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -615,17 +615,17 @@ func (x *fastReflection_SignalDeviation) Range(f func(protoreflect.FieldDescript // a repeated field is populated if it is non-empty. func (x *fastReflection_SignalDeviation) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.SignalDeviation.signal_id": + case "band.tunnel.v1beta1.SignalDeviation.signal_id": return x.SignalId != "" - case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": return x.SoftDeviationBps != uint64(0) - case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": return x.HardDeviationBps != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) } } @@ -637,17 +637,17 @@ func (x *fastReflection_SignalDeviation) Has(fd protoreflect.FieldDescriptor) bo // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignalDeviation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.SignalDeviation.signal_id": + case "band.tunnel.v1beta1.SignalDeviation.signal_id": x.SignalId = "" - case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": x.SoftDeviationBps = uint64(0) - case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": x.HardDeviationBps = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) } } @@ -659,20 +659,20 @@ func (x *fastReflection_SignalDeviation) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SignalDeviation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.SignalDeviation.signal_id": + case "band.tunnel.v1beta1.SignalDeviation.signal_id": value := x.SignalId return protoreflect.ValueOfString(value) - case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": value := x.SoftDeviationBps return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": value := x.HardDeviationBps return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", descriptor.FullName())) } } @@ -688,17 +688,17 @@ func (x *fastReflection_SignalDeviation) Get(descriptor protoreflect.FieldDescri // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignalDeviation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.SignalDeviation.signal_id": + case "band.tunnel.v1beta1.SignalDeviation.signal_id": x.SignalId = value.Interface().(string) - case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": x.SoftDeviationBps = value.Uint() - case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": x.HardDeviationBps = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) } } @@ -714,17 +714,17 @@ func (x *fastReflection_SignalDeviation) Set(fd protoreflect.FieldDescriptor, va // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignalDeviation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.SignalDeviation.signal_id": - panic(fmt.Errorf("field signal_id of message tunnel.v1beta1.SignalDeviation is not mutable")) - case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": - panic(fmt.Errorf("field soft_deviation_bps of message tunnel.v1beta1.SignalDeviation is not mutable")) - case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": - panic(fmt.Errorf("field hard_deviation_bps of message tunnel.v1beta1.SignalDeviation is not mutable")) + case "band.tunnel.v1beta1.SignalDeviation.signal_id": + panic(fmt.Errorf("field signal_id of message band.tunnel.v1beta1.SignalDeviation is not mutable")) + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + panic(fmt.Errorf("field soft_deviation_bps of message band.tunnel.v1beta1.SignalDeviation is not mutable")) + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + panic(fmt.Errorf("field hard_deviation_bps of message band.tunnel.v1beta1.SignalDeviation is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) } } @@ -733,17 +733,17 @@ func (x *fastReflection_SignalDeviation) Mutable(fd protoreflect.FieldDescriptor // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SignalDeviation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.SignalDeviation.signal_id": + case "band.tunnel.v1beta1.SignalDeviation.signal_id": return protoreflect.ValueOfString("") - case "tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) } } @@ -753,7 +753,7 @@ func (x *fastReflection_SignalDeviation) NewField(fd protoreflect.FieldDescripto func (x *fastReflection_SignalDeviation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.SignalDeviation", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.SignalDeviation", d.FullName())) } panic("unreachable") } @@ -1077,8 +1077,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_Deposit = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Deposit") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_Deposit = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Deposit") fd_Deposit_tunnel_id = md_Deposit.Fields().ByName("tunnel_id") fd_Deposit_depositor = md_Deposit.Fields().ByName("depositor") fd_Deposit_amount = md_Deposit.Fields().ByName("amount") @@ -1093,7 +1093,7 @@ func (x *Deposit) ProtoReflect() protoreflect.Message { } func (x *Deposit) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[2] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1182,17 +1182,17 @@ func (x *fastReflection_Deposit) Range(f func(protoreflect.FieldDescriptor, prot // a repeated field is populated if it is non-empty. func (x *fastReflection_Deposit) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.Deposit.tunnel_id": + case "band.tunnel.v1beta1.Deposit.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.Deposit.depositor": + case "band.tunnel.v1beta1.Deposit.depositor": return x.Depositor != "" - case "tunnel.v1beta1.Deposit.amount": + case "band.tunnel.v1beta1.Deposit.amount": return len(x.Amount) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) } } @@ -1204,17 +1204,17 @@ func (x *fastReflection_Deposit) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Deposit) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.Deposit.tunnel_id": + case "band.tunnel.v1beta1.Deposit.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.Deposit.depositor": + case "band.tunnel.v1beta1.Deposit.depositor": x.Depositor = "" - case "tunnel.v1beta1.Deposit.amount": + case "band.tunnel.v1beta1.Deposit.amount": x.Amount = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) } } @@ -1226,13 +1226,13 @@ func (x *fastReflection_Deposit) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Deposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.Deposit.tunnel_id": + case "band.tunnel.v1beta1.Deposit.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.Deposit.depositor": + case "band.tunnel.v1beta1.Deposit.depositor": value := x.Depositor return protoreflect.ValueOfString(value) - case "tunnel.v1beta1.Deposit.amount": + case "band.tunnel.v1beta1.Deposit.amount": if len(x.Amount) == 0 { return protoreflect.ValueOfList(&_Deposit_3_list{}) } @@ -1240,9 +1240,9 @@ func (x *fastReflection_Deposit) Get(descriptor protoreflect.FieldDescriptor) pr return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message tunnel.v1beta1.Deposit does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", descriptor.FullName())) } } @@ -1258,19 +1258,19 @@ func (x *fastReflection_Deposit) Get(descriptor protoreflect.FieldDescriptor) pr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Deposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.Deposit.tunnel_id": + case "band.tunnel.v1beta1.Deposit.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.Deposit.depositor": + case "band.tunnel.v1beta1.Deposit.depositor": x.Depositor = value.Interface().(string) - case "tunnel.v1beta1.Deposit.amount": + case "band.tunnel.v1beta1.Deposit.amount": lv := value.List() clv := lv.(*_Deposit_3_list) x.Amount = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) } } @@ -1286,21 +1286,21 @@ func (x *fastReflection_Deposit) Set(fd protoreflect.FieldDescriptor, value prot // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Deposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.Deposit.amount": + case "band.tunnel.v1beta1.Deposit.amount": if x.Amount == nil { x.Amount = []*v1beta1.Coin{} } value := &_Deposit_3_list{list: &x.Amount} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.Deposit.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.Deposit is not mutable")) - case "tunnel.v1beta1.Deposit.depositor": - panic(fmt.Errorf("field depositor of message tunnel.v1beta1.Deposit is not mutable")) + case "band.tunnel.v1beta1.Deposit.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.Deposit is not mutable")) + case "band.tunnel.v1beta1.Deposit.depositor": + panic(fmt.Errorf("field depositor of message band.tunnel.v1beta1.Deposit is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) } } @@ -1309,18 +1309,18 @@ func (x *fastReflection_Deposit) Mutable(fd protoreflect.FieldDescriptor) protor // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Deposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.Deposit.tunnel_id": + case "band.tunnel.v1beta1.Deposit.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.Deposit.depositor": + case "band.tunnel.v1beta1.Deposit.depositor": return protoreflect.ValueOfString("") - case "tunnel.v1beta1.Deposit.amount": + case "band.tunnel.v1beta1.Deposit.amount": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_Deposit_3_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Deposit")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) } } @@ -1330,7 +1330,7 @@ func (x *fastReflection_Deposit) NewField(fd protoreflect.FieldDescriptor) proto func (x *fastReflection_Deposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Deposit", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Deposit", d.FullName())) } panic("unreachable") } @@ -1742,8 +1742,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_Tunnel = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Tunnel") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_Tunnel = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Tunnel") fd_Tunnel_id = md_Tunnel.Fields().ByName("id") fd_Tunnel_sequence = md_Tunnel.Fields().ByName("sequence") fd_Tunnel_route = md_Tunnel.Fields().ByName("route") @@ -1766,7 +1766,7 @@ func (x *Tunnel) ProtoReflect() protoreflect.Message { } func (x *Tunnel) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[3] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1903,33 +1903,33 @@ func (x *fastReflection_Tunnel) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Tunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.Tunnel.id": + case "band.tunnel.v1beta1.Tunnel.id": return x.Id != uint64(0) - case "tunnel.v1beta1.Tunnel.sequence": + case "band.tunnel.v1beta1.Tunnel.sequence": return x.Sequence != uint64(0) - case "tunnel.v1beta1.Tunnel.route": + case "band.tunnel.v1beta1.Tunnel.route": return x.Route != nil - case "tunnel.v1beta1.Tunnel.encoder": + case "band.tunnel.v1beta1.Tunnel.encoder": return x.Encoder != 0 - case "tunnel.v1beta1.Tunnel.fee_payer": + case "band.tunnel.v1beta1.Tunnel.fee_payer": return x.FeePayer != "" - case "tunnel.v1beta1.Tunnel.signal_deviations": + case "band.tunnel.v1beta1.Tunnel.signal_deviations": return len(x.SignalDeviations) != 0 - case "tunnel.v1beta1.Tunnel.interval": + case "band.tunnel.v1beta1.Tunnel.interval": return x.Interval != uint64(0) - case "tunnel.v1beta1.Tunnel.total_deposit": + case "band.tunnel.v1beta1.Tunnel.total_deposit": return len(x.TotalDeposit) != 0 - case "tunnel.v1beta1.Tunnel.is_active": + case "band.tunnel.v1beta1.Tunnel.is_active": return x.IsActive != false - case "tunnel.v1beta1.Tunnel.created_at": + case "band.tunnel.v1beta1.Tunnel.created_at": return x.CreatedAt != int64(0) - case "tunnel.v1beta1.Tunnel.creator": + case "band.tunnel.v1beta1.Tunnel.creator": return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) } } @@ -1941,33 +1941,33 @@ func (x *fastReflection_Tunnel) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Tunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.Tunnel.id": + case "band.tunnel.v1beta1.Tunnel.id": x.Id = uint64(0) - case "tunnel.v1beta1.Tunnel.sequence": + case "band.tunnel.v1beta1.Tunnel.sequence": x.Sequence = uint64(0) - case "tunnel.v1beta1.Tunnel.route": + case "band.tunnel.v1beta1.Tunnel.route": x.Route = nil - case "tunnel.v1beta1.Tunnel.encoder": + case "band.tunnel.v1beta1.Tunnel.encoder": x.Encoder = 0 - case "tunnel.v1beta1.Tunnel.fee_payer": + case "band.tunnel.v1beta1.Tunnel.fee_payer": x.FeePayer = "" - case "tunnel.v1beta1.Tunnel.signal_deviations": + case "band.tunnel.v1beta1.Tunnel.signal_deviations": x.SignalDeviations = nil - case "tunnel.v1beta1.Tunnel.interval": + case "band.tunnel.v1beta1.Tunnel.interval": x.Interval = uint64(0) - case "tunnel.v1beta1.Tunnel.total_deposit": + case "band.tunnel.v1beta1.Tunnel.total_deposit": x.TotalDeposit = nil - case "tunnel.v1beta1.Tunnel.is_active": + case "band.tunnel.v1beta1.Tunnel.is_active": x.IsActive = false - case "tunnel.v1beta1.Tunnel.created_at": + case "band.tunnel.v1beta1.Tunnel.created_at": x.CreatedAt = int64(0) - case "tunnel.v1beta1.Tunnel.creator": + case "band.tunnel.v1beta1.Tunnel.creator": x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) } } @@ -1979,50 +1979,50 @@ func (x *fastReflection_Tunnel) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Tunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.Tunnel.id": + case "band.tunnel.v1beta1.Tunnel.id": value := x.Id return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.Tunnel.sequence": + case "band.tunnel.v1beta1.Tunnel.sequence": value := x.Sequence return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.Tunnel.route": + case "band.tunnel.v1beta1.Tunnel.route": value := x.Route return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tunnel.v1beta1.Tunnel.encoder": + case "band.tunnel.v1beta1.Tunnel.encoder": value := x.Encoder return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "tunnel.v1beta1.Tunnel.fee_payer": + case "band.tunnel.v1beta1.Tunnel.fee_payer": value := x.FeePayer return protoreflect.ValueOfString(value) - case "tunnel.v1beta1.Tunnel.signal_deviations": + case "band.tunnel.v1beta1.Tunnel.signal_deviations": if len(x.SignalDeviations) == 0 { return protoreflect.ValueOfList(&_Tunnel_6_list{}) } listValue := &_Tunnel_6_list{list: &x.SignalDeviations} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.Tunnel.interval": + case "band.tunnel.v1beta1.Tunnel.interval": value := x.Interval return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.Tunnel.total_deposit": + case "band.tunnel.v1beta1.Tunnel.total_deposit": if len(x.TotalDeposit) == 0 { return protoreflect.ValueOfList(&_Tunnel_8_list{}) } listValue := &_Tunnel_8_list{list: &x.TotalDeposit} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.Tunnel.is_active": + case "band.tunnel.v1beta1.Tunnel.is_active": value := x.IsActive return protoreflect.ValueOfBool(value) - case "tunnel.v1beta1.Tunnel.created_at": + case "band.tunnel.v1beta1.Tunnel.created_at": value := x.CreatedAt return protoreflect.ValueOfInt64(value) - case "tunnel.v1beta1.Tunnel.creator": + case "band.tunnel.v1beta1.Tunnel.creator": value := x.Creator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.Tunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel does not contain field %s", descriptor.FullName())) } } @@ -2038,37 +2038,37 @@ func (x *fastReflection_Tunnel) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Tunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.Tunnel.id": + case "band.tunnel.v1beta1.Tunnel.id": x.Id = value.Uint() - case "tunnel.v1beta1.Tunnel.sequence": + case "band.tunnel.v1beta1.Tunnel.sequence": x.Sequence = value.Uint() - case "tunnel.v1beta1.Tunnel.route": + case "band.tunnel.v1beta1.Tunnel.route": x.Route = value.Message().Interface().(*anypb.Any) - case "tunnel.v1beta1.Tunnel.encoder": + case "band.tunnel.v1beta1.Tunnel.encoder": x.Encoder = (Encoder)(value.Enum()) - case "tunnel.v1beta1.Tunnel.fee_payer": + case "band.tunnel.v1beta1.Tunnel.fee_payer": x.FeePayer = value.Interface().(string) - case "tunnel.v1beta1.Tunnel.signal_deviations": + case "band.tunnel.v1beta1.Tunnel.signal_deviations": lv := value.List() clv := lv.(*_Tunnel_6_list) x.SignalDeviations = *clv.list - case "tunnel.v1beta1.Tunnel.interval": + case "band.tunnel.v1beta1.Tunnel.interval": x.Interval = value.Uint() - case "tunnel.v1beta1.Tunnel.total_deposit": + case "band.tunnel.v1beta1.Tunnel.total_deposit": lv := value.List() clv := lv.(*_Tunnel_8_list) x.TotalDeposit = *clv.list - case "tunnel.v1beta1.Tunnel.is_active": + case "band.tunnel.v1beta1.Tunnel.is_active": x.IsActive = value.Bool() - case "tunnel.v1beta1.Tunnel.created_at": + case "band.tunnel.v1beta1.Tunnel.created_at": x.CreatedAt = value.Int() - case "tunnel.v1beta1.Tunnel.creator": + case "band.tunnel.v1beta1.Tunnel.creator": x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) } } @@ -2084,44 +2084,44 @@ func (x *fastReflection_Tunnel) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Tunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.Tunnel.route": + case "band.tunnel.v1beta1.Tunnel.route": if x.Route == nil { x.Route = new(anypb.Any) } return protoreflect.ValueOfMessage(x.Route.ProtoReflect()) - case "tunnel.v1beta1.Tunnel.signal_deviations": + case "band.tunnel.v1beta1.Tunnel.signal_deviations": if x.SignalDeviations == nil { x.SignalDeviations = []*SignalDeviation{} } value := &_Tunnel_6_list{list: &x.SignalDeviations} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.Tunnel.total_deposit": + case "band.tunnel.v1beta1.Tunnel.total_deposit": if x.TotalDeposit == nil { x.TotalDeposit = []*v1beta1.Coin{} } value := &_Tunnel_8_list{list: &x.TotalDeposit} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.Tunnel.id": - panic(fmt.Errorf("field id of message tunnel.v1beta1.Tunnel is not mutable")) - case "tunnel.v1beta1.Tunnel.sequence": - panic(fmt.Errorf("field sequence of message tunnel.v1beta1.Tunnel is not mutable")) - case "tunnel.v1beta1.Tunnel.encoder": - panic(fmt.Errorf("field encoder of message tunnel.v1beta1.Tunnel is not mutable")) - case "tunnel.v1beta1.Tunnel.fee_payer": - panic(fmt.Errorf("field fee_payer of message tunnel.v1beta1.Tunnel is not mutable")) - case "tunnel.v1beta1.Tunnel.interval": - panic(fmt.Errorf("field interval of message tunnel.v1beta1.Tunnel is not mutable")) - case "tunnel.v1beta1.Tunnel.is_active": - panic(fmt.Errorf("field is_active of message tunnel.v1beta1.Tunnel is not mutable")) - case "tunnel.v1beta1.Tunnel.created_at": - panic(fmt.Errorf("field created_at of message tunnel.v1beta1.Tunnel is not mutable")) - case "tunnel.v1beta1.Tunnel.creator": - panic(fmt.Errorf("field creator of message tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.id": + panic(fmt.Errorf("field id of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.sequence": + panic(fmt.Errorf("field sequence of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.encoder": + panic(fmt.Errorf("field encoder of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.fee_payer": + panic(fmt.Errorf("field fee_payer of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.interval": + panic(fmt.Errorf("field interval of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.is_active": + panic(fmt.Errorf("field is_active of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.created_at": + panic(fmt.Errorf("field created_at of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.creator": + panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.Tunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) } } @@ -2130,36 +2130,36 @@ func (x *fastReflection_Tunnel) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Tunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.Tunnel.id": + case "band.tunnel.v1beta1.Tunnel.id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.Tunnel.sequence": + case "band.tunnel.v1beta1.Tunnel.sequence": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.Tunnel.route": + case "band.tunnel.v1beta1.Tunnel.route": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tunnel.v1beta1.Tunnel.encoder": + case "band.tunnel.v1beta1.Tunnel.encoder": return protoreflect.ValueOfEnum(0) - case "tunnel.v1beta1.Tunnel.fee_payer": + case "band.tunnel.v1beta1.Tunnel.fee_payer": return protoreflect.ValueOfString("") - case "tunnel.v1beta1.Tunnel.signal_deviations": + case "band.tunnel.v1beta1.Tunnel.signal_deviations": list := []*SignalDeviation{} return protoreflect.ValueOfList(&_Tunnel_6_list{list: &list}) - case "tunnel.v1beta1.Tunnel.interval": + case "band.tunnel.v1beta1.Tunnel.interval": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.Tunnel.total_deposit": + case "band.tunnel.v1beta1.Tunnel.total_deposit": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_Tunnel_8_list{list: &list}) - case "tunnel.v1beta1.Tunnel.is_active": + case "band.tunnel.v1beta1.Tunnel.is_active": return protoreflect.ValueOfBool(false) - case "tunnel.v1beta1.Tunnel.created_at": + case "band.tunnel.v1beta1.Tunnel.created_at": return protoreflect.ValueOfInt64(int64(0)) - case "tunnel.v1beta1.Tunnel.creator": + case "band.tunnel.v1beta1.Tunnel.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Tunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) } } @@ -2169,7 +2169,7 @@ func (x *fastReflection_Tunnel) NewField(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Tunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Tunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Tunnel", d.FullName())) } panic("unreachable") } @@ -2816,8 +2816,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_LatestSignalPrices = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestSignalPrices") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_LatestSignalPrices = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestSignalPrices") fd_LatestSignalPrices_tunnel_id = md_LatestSignalPrices.Fields().ByName("tunnel_id") fd_LatestSignalPrices_signal_prices = md_LatestSignalPrices.Fields().ByName("signal_prices") fd_LatestSignalPrices_timestamp = md_LatestSignalPrices.Fields().ByName("timestamp") @@ -2832,7 +2832,7 @@ func (x *LatestSignalPrices) ProtoReflect() protoreflect.Message { } func (x *LatestSignalPrices) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[4] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2921,17 +2921,17 @@ func (x *fastReflection_LatestSignalPrices) Range(f func(protoreflect.FieldDescr // a repeated field is populated if it is non-empty. func (x *fastReflection_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": return len(x.SignalPrices) != 0 - case "tunnel.v1beta1.LatestSignalPrices.timestamp": + case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": return x.Timestamp != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) } - panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) } } @@ -2943,17 +2943,17 @@ func (x *fastReflection_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LatestSignalPrices) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": x.SignalPrices = nil - case "tunnel.v1beta1.LatestSignalPrices.timestamp": + case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": x.Timestamp = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) } - panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) } } @@ -2965,23 +2965,23 @@ func (x *fastReflection_LatestSignalPrices) Clear(fd protoreflect.FieldDescripto // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_LatestSignalPrices) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": if len(x.SignalPrices) == 0 { return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{}) } listValue := &_LatestSignalPrices_2_list{list: &x.SignalPrices} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.LatestSignalPrices.timestamp": + case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": value := x.Timestamp return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) } - panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", descriptor.FullName())) } } @@ -2997,19 +2997,19 @@ func (x *fastReflection_LatestSignalPrices) Get(descriptor protoreflect.FieldDes // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": lv := value.List() clv := lv.(*_LatestSignalPrices_2_list) x.SignalPrices = *clv.list - case "tunnel.v1beta1.LatestSignalPrices.timestamp": + case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": x.Timestamp = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) } - panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) } } @@ -3025,21 +3025,21 @@ func (x *fastReflection_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_LatestSignalPrices) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": if x.SignalPrices == nil { x.SignalPrices = []*SignalPrice{} } value := &_LatestSignalPrices_2_list{list: &x.SignalPrices} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.LatestSignalPrices is not mutable")) - case "tunnel.v1beta1.LatestSignalPrices.timestamp": - panic(fmt.Errorf("field timestamp of message tunnel.v1beta1.LatestSignalPrices is not mutable")) + case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) + case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": + panic(fmt.Errorf("field timestamp of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) } - panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) } } @@ -3048,18 +3048,18 @@ func (x *fastReflection_LatestSignalPrices) Mutable(fd protoreflect.FieldDescrip // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_LatestSignalPrices) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.LatestSignalPrices.signal_prices": + case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": list := []*SignalPrice{} return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &list}) - case "tunnel.v1beta1.LatestSignalPrices.timestamp": + case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) } - panic(fmt.Errorf("message tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) } } @@ -3069,7 +3069,7 @@ func (x *fastReflection_LatestSignalPrices) NewField(fd protoreflect.FieldDescri func (x *fastReflection_LatestSignalPrices) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.LatestSignalPrices", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.LatestSignalPrices", d.FullName())) } panic("unreachable") } @@ -3354,8 +3354,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_SignalPrice = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalPrice") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_SignalPrice = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalPrice") fd_SignalPrice_signal_id = md_SignalPrice.Fields().ByName("signal_id") fd_SignalPrice_price = md_SignalPrice.Fields().ByName("price") } @@ -3369,7 +3369,7 @@ func (x *SignalPrice) ProtoReflect() protoreflect.Message { } func (x *SignalPrice) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[5] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3452,15 +3452,15 @@ func (x *fastReflection_SignalPrice) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_SignalPrice) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.SignalPrice.signal_id": + case "band.tunnel.v1beta1.SignalPrice.signal_id": return x.SignalId != "" - case "tunnel.v1beta1.SignalPrice.price": + case "band.tunnel.v1beta1.SignalPrice.price": return x.Price != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) } } @@ -3472,15 +3472,15 @@ func (x *fastReflection_SignalPrice) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignalPrice) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.SignalPrice.signal_id": + case "band.tunnel.v1beta1.SignalPrice.signal_id": x.SignalId = "" - case "tunnel.v1beta1.SignalPrice.price": + case "band.tunnel.v1beta1.SignalPrice.price": x.Price = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) } } @@ -3492,17 +3492,17 @@ func (x *fastReflection_SignalPrice) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SignalPrice) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.SignalPrice.signal_id": + case "band.tunnel.v1beta1.SignalPrice.signal_id": value := x.SignalId return protoreflect.ValueOfString(value) - case "tunnel.v1beta1.SignalPrice.price": + case "band.tunnel.v1beta1.SignalPrice.price": value := x.Price return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice does not contain field %s", descriptor.FullName())) } } @@ -3518,15 +3518,15 @@ func (x *fastReflection_SignalPrice) Get(descriptor protoreflect.FieldDescriptor // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignalPrice) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.SignalPrice.signal_id": + case "band.tunnel.v1beta1.SignalPrice.signal_id": x.SignalId = value.Interface().(string) - case "tunnel.v1beta1.SignalPrice.price": + case "band.tunnel.v1beta1.SignalPrice.price": x.Price = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) } } @@ -3542,15 +3542,15 @@ func (x *fastReflection_SignalPrice) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SignalPrice) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.SignalPrice.signal_id": - panic(fmt.Errorf("field signal_id of message tunnel.v1beta1.SignalPrice is not mutable")) - case "tunnel.v1beta1.SignalPrice.price": - panic(fmt.Errorf("field price of message tunnel.v1beta1.SignalPrice is not mutable")) + case "band.tunnel.v1beta1.SignalPrice.signal_id": + panic(fmt.Errorf("field signal_id of message band.tunnel.v1beta1.SignalPrice is not mutable")) + case "band.tunnel.v1beta1.SignalPrice.price": + panic(fmt.Errorf("field price of message band.tunnel.v1beta1.SignalPrice is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) } } @@ -3559,15 +3559,15 @@ func (x *fastReflection_SignalPrice) Mutable(fd protoreflect.FieldDescriptor) pr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SignalPrice) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.SignalPrice.signal_id": + case "band.tunnel.v1beta1.SignalPrice.signal_id": return protoreflect.ValueOfString("") - case "tunnel.v1beta1.SignalPrice.price": + case "band.tunnel.v1beta1.SignalPrice.price": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.SignalPrice")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) } - panic(fmt.Errorf("message tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice does not contain field %s", fd.FullName())) } } @@ -3577,7 +3577,7 @@ func (x *fastReflection_SignalPrice) NewField(fd protoreflect.FieldDescriptor) p func (x *fastReflection_SignalPrice) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.SignalPrice", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.SignalPrice", d.FullName())) } panic("unreachable") } @@ -3872,8 +3872,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_TotalFees = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TotalFees") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_TotalFees = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("TotalFees") fd_TotalFees_total_packet_fee = md_TotalFees.Fields().ByName("total_packet_fee") } @@ -3886,7 +3886,7 @@ func (x *TotalFees) ProtoReflect() protoreflect.Message { } func (x *TotalFees) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3963,13 +3963,13 @@ func (x *fastReflection_TotalFees) Range(f func(protoreflect.FieldDescriptor, pr // a repeated field is populated if it is non-empty. func (x *fastReflection_TotalFees) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.TotalFees.total_packet_fee": + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": return len(x.TotalPacketFee) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) } } @@ -3981,13 +3981,13 @@ func (x *fastReflection_TotalFees) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TotalFees) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.TotalFees.total_packet_fee": + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": x.TotalPacketFee = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) } } @@ -3999,7 +3999,7 @@ func (x *fastReflection_TotalFees) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TotalFees) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.TotalFees.total_packet_fee": + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": if len(x.TotalPacketFee) == 0 { return protoreflect.ValueOfList(&_TotalFees_1_list{}) } @@ -4007,9 +4007,9 @@ func (x *fastReflection_TotalFees) Get(descriptor protoreflect.FieldDescriptor) return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message tunnel.v1beta1.TotalFees does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", descriptor.FullName())) } } @@ -4025,15 +4025,15 @@ func (x *fastReflection_TotalFees) Get(descriptor protoreflect.FieldDescriptor) // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TotalFees) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.TotalFees.total_packet_fee": + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": lv := value.List() clv := lv.(*_TotalFees_1_list) x.TotalPacketFee = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) } } @@ -4049,7 +4049,7 @@ func (x *fastReflection_TotalFees) Set(fd protoreflect.FieldDescriptor, value pr // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TotalFees) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.TotalFees.total_packet_fee": + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": if x.TotalPacketFee == nil { x.TotalPacketFee = []*v1beta1.Coin{} } @@ -4057,9 +4057,9 @@ func (x *fastReflection_TotalFees) Mutable(fd protoreflect.FieldDescriptor) prot return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) } } @@ -4068,14 +4068,14 @@ func (x *fastReflection_TotalFees) Mutable(fd protoreflect.FieldDescriptor) prot // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TotalFees) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.TotalFees.total_packet_fee": + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_TotalFees_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) } } @@ -4085,7 +4085,7 @@ func (x *fastReflection_TotalFees) NewField(fd protoreflect.FieldDescriptor) pro func (x *fastReflection_TotalFees) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TotalFees", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TotalFees", d.FullName())) } panic("unreachable") } @@ -4370,8 +4370,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_Packet = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("Packet") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_Packet = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Packet") fd_Packet_tunnel_id = md_Packet.Fields().ByName("tunnel_id") fd_Packet_sequence = md_Packet.Fields().ByName("sequence") fd_Packet_signal_prices = md_Packet.Fields().ByName("signal_prices") @@ -4388,7 +4388,7 @@ func (x *Packet) ProtoReflect() protoreflect.Message { } func (x *Packet) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4489,21 +4489,21 @@ func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.Packet.tunnel_id": + case "band.tunnel.v1beta1.Packet.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.Packet.sequence": + case "band.tunnel.v1beta1.Packet.sequence": return x.Sequence != uint64(0) - case "tunnel.v1beta1.Packet.signal_prices": + case "band.tunnel.v1beta1.Packet.signal_prices": return len(x.SignalPrices) != 0 - case "tunnel.v1beta1.Packet.packet_content": + case "band.tunnel.v1beta1.Packet.packet_content": return x.PacketContent != nil - case "tunnel.v1beta1.Packet.created_at": + case "band.tunnel.v1beta1.Packet.created_at": return x.CreatedAt != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) } } @@ -4515,21 +4515,21 @@ func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.Packet.tunnel_id": + case "band.tunnel.v1beta1.Packet.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.Packet.sequence": + case "band.tunnel.v1beta1.Packet.sequence": x.Sequence = uint64(0) - case "tunnel.v1beta1.Packet.signal_prices": + case "band.tunnel.v1beta1.Packet.signal_prices": x.SignalPrices = nil - case "tunnel.v1beta1.Packet.packet_content": + case "band.tunnel.v1beta1.Packet.packet_content": x.PacketContent = nil - case "tunnel.v1beta1.Packet.created_at": + case "band.tunnel.v1beta1.Packet.created_at": x.CreatedAt = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) } } @@ -4541,29 +4541,29 @@ func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.Packet.tunnel_id": + case "band.tunnel.v1beta1.Packet.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.Packet.sequence": + case "band.tunnel.v1beta1.Packet.sequence": value := x.Sequence return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.Packet.signal_prices": + case "band.tunnel.v1beta1.Packet.signal_prices": if len(x.SignalPrices) == 0 { return protoreflect.ValueOfList(&_Packet_3_list{}) } listValue := &_Packet_3_list{list: &x.SignalPrices} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.Packet.packet_content": + case "band.tunnel.v1beta1.Packet.packet_content": value := x.PacketContent return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tunnel.v1beta1.Packet.created_at": + case "band.tunnel.v1beta1.Packet.created_at": value := x.CreatedAt return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message tunnel.v1beta1.Packet does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", descriptor.FullName())) } } @@ -4579,23 +4579,23 @@ func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.Packet.tunnel_id": + case "band.tunnel.v1beta1.Packet.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.Packet.sequence": + case "band.tunnel.v1beta1.Packet.sequence": x.Sequence = value.Uint() - case "tunnel.v1beta1.Packet.signal_prices": + case "band.tunnel.v1beta1.Packet.signal_prices": lv := value.List() clv := lv.(*_Packet_3_list) x.SignalPrices = *clv.list - case "tunnel.v1beta1.Packet.packet_content": + case "band.tunnel.v1beta1.Packet.packet_content": x.PacketContent = value.Message().Interface().(*anypb.Any) - case "tunnel.v1beta1.Packet.created_at": + case "band.tunnel.v1beta1.Packet.created_at": x.CreatedAt = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) } } @@ -4611,28 +4611,28 @@ func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.Packet.signal_prices": + case "band.tunnel.v1beta1.Packet.signal_prices": if x.SignalPrices == nil { x.SignalPrices = []*SignalPrice{} } value := &_Packet_3_list{list: &x.SignalPrices} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.Packet.packet_content": + case "band.tunnel.v1beta1.Packet.packet_content": if x.PacketContent == nil { x.PacketContent = new(anypb.Any) } return protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) - case "tunnel.v1beta1.Packet.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.Packet is not mutable")) - case "tunnel.v1beta1.Packet.sequence": - panic(fmt.Errorf("field sequence of message tunnel.v1beta1.Packet is not mutable")) - case "tunnel.v1beta1.Packet.created_at": - panic(fmt.Errorf("field created_at of message tunnel.v1beta1.Packet is not mutable")) + case "band.tunnel.v1beta1.Packet.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.Packet is not mutable")) + case "band.tunnel.v1beta1.Packet.sequence": + panic(fmt.Errorf("field sequence of message band.tunnel.v1beta1.Packet is not mutable")) + case "band.tunnel.v1beta1.Packet.created_at": + panic(fmt.Errorf("field created_at of message band.tunnel.v1beta1.Packet is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) } } @@ -4641,23 +4641,23 @@ func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Packet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.Packet.tunnel_id": + case "band.tunnel.v1beta1.Packet.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.Packet.sequence": + case "band.tunnel.v1beta1.Packet.sequence": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.Packet.signal_prices": + case "band.tunnel.v1beta1.Packet.signal_prices": list := []*SignalPrice{} return protoreflect.ValueOfList(&_Packet_3_list{list: &list}) - case "tunnel.v1beta1.Packet.packet_content": + case "band.tunnel.v1beta1.Packet.packet_content": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tunnel.v1beta1.Packet.created_at": + case "band.tunnel.v1beta1.Packet.created_at": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) } } @@ -4667,7 +4667,7 @@ func (x *fastReflection_Packet) NewField(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Packet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.Packet", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Packet", d.FullName())) } panic("unreachable") } @@ -5034,8 +5034,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tunnel_proto_init() - md_TSSPacketContent = File_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSPacketContent") + file_band_tunnel_v1beta1_tunnel_proto_init() + md_TSSPacketContent = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSPacketContent") fd_TSSPacketContent_signing_id = md_TSSPacketContent.Fields().ByName("signing_id") fd_TSSPacketContent_destination_chain_id = md_TSSPacketContent.Fields().ByName("destination_chain_id") fd_TSSPacketContent_destination_contract_address = md_TSSPacketContent.Fields().ByName("destination_contract_address") @@ -5050,7 +5050,7 @@ func (x *TSSPacketContent) ProtoReflect() protoreflect.Message { } func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[8] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5139,17 +5139,17 @@ func (x *fastReflection_TSSPacketContent) Range(f func(protoreflect.FieldDescrip // a repeated field is populated if it is non-empty. func (x *fastReflection_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": return x.SigningId != uint64(0) - case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": return x.DestinationChainId != "" - case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": return x.DestinationContractAddress != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) } } @@ -5161,17 +5161,17 @@ func (x *fastReflection_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) b // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": x.SigningId = uint64(0) - case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": x.DestinationChainId = "" - case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": x.DestinationContractAddress = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) } } @@ -5183,20 +5183,20 @@ func (x *fastReflection_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TSSPacketContent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": value := x.SigningId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": value := x.DestinationChainId return protoreflect.ValueOfString(value) - case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": value := x.DestinationContractAddress return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", descriptor.FullName())) } } @@ -5212,17 +5212,17 @@ func (x *fastReflection_TSSPacketContent) Get(descriptor protoreflect.FieldDescr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": x.SigningId = value.Uint() - case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": x.DestinationChainId = value.Interface().(string) - case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": x.DestinationContractAddress = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) } } @@ -5238,17 +5238,17 @@ func (x *fastReflection_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TSSPacketContent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.TSSPacketContent.signing_id": - panic(fmt.Errorf("field signing_id of message tunnel.v1beta1.TSSPacketContent is not mutable")) - case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": - panic(fmt.Errorf("field destination_chain_id of message tunnel.v1beta1.TSSPacketContent is not mutable")) - case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": - panic(fmt.Errorf("field destination_contract_address of message tunnel.v1beta1.TSSPacketContent is not mutable")) + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + panic(fmt.Errorf("field signing_id of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) } } @@ -5257,17 +5257,17 @@ func (x *fastReflection_TSSPacketContent) Mutable(fd protoreflect.FieldDescripto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TSSPacketContent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.TSSPacketContent.destination_chain_id": + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": return protoreflect.ValueOfString("") - case "tunnel.v1beta1.TSSPacketContent.destination_contract_address": + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) } - panic(fmt.Errorf("message tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) } } @@ -5277,7 +5277,7 @@ func (x *fastReflection_TSSPacketContent) NewField(fd protoreflect.FieldDescript func (x *fastReflection_TSSPacketContent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.TSSPacketContent", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSPacketContent", d.FullName())) } panic("unreachable") } @@ -5562,7 +5562,7 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: tunnel/v1beta1/tunnel.proto +// source: band/tunnel/v1beta1/tunnel.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -5608,11 +5608,11 @@ func (x Encoder) String() string { } func (Encoder) Descriptor() protoreflect.EnumDescriptor { - return file_tunnel_v1beta1_tunnel_proto_enumTypes[0].Descriptor() + return file_band_tunnel_v1beta1_tunnel_proto_enumTypes[0].Descriptor() } func (Encoder) Type() protoreflect.EnumType { - return &file_tunnel_v1beta1_tunnel_proto_enumTypes[0] + return &file_band_tunnel_v1beta1_tunnel_proto_enumTypes[0] } func (x Encoder) Number() protoreflect.EnumNumber { @@ -5621,7 +5621,7 @@ func (x Encoder) Number() protoreflect.EnumNumber { // Deprecated: Use Encoder.Descriptor instead. func (Encoder) EnumDescriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} } // TSSRoute is the type for a TSS route @@ -5639,7 +5639,7 @@ type TSSRoute struct { func (x *TSSRoute) Reset() { *x = TSSRoute{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5653,7 +5653,7 @@ func (*TSSRoute) ProtoMessage() {} // Deprecated: Use TSSRoute.ProtoReflect.Descriptor instead. func (*TSSRoute) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} } func (x *TSSRoute) GetDestinationChainId() string { @@ -5687,7 +5687,7 @@ type SignalDeviation struct { func (x *SignalDeviation) Reset() { *x = SignalDeviation{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[1] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5701,7 +5701,7 @@ func (*SignalDeviation) ProtoMessage() {} // Deprecated: Use SignalDeviation.ProtoReflect.Descriptor instead. func (*SignalDeviation) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{1} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{1} } func (x *SignalDeviation) GetSignalId() string { @@ -5742,7 +5742,7 @@ type Deposit struct { func (x *Deposit) Reset() { *x = Deposit{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[2] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5756,7 +5756,7 @@ func (*Deposit) ProtoMessage() {} // Deprecated: Use Deposit.ProtoReflect.Descriptor instead. func (*Deposit) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{2} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{2} } func (x *Deposit) GetTunnelId() uint64 { @@ -5793,7 +5793,7 @@ type Tunnel struct { // route is the route for delivering the signal prices Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.tunnel.v1beta1.Encoder" json:"encoder,omitempty"` // fee_payer is the address of the fee payer FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` // signal_deviations is the list of signal deviations @@ -5813,7 +5813,7 @@ type Tunnel struct { func (x *Tunnel) Reset() { *x = Tunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[3] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5827,7 +5827,7 @@ func (*Tunnel) ProtoMessage() {} // Deprecated: Use Tunnel.ProtoReflect.Descriptor instead. func (*Tunnel) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{3} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{3} } func (x *Tunnel) GetId() uint64 { @@ -5924,7 +5924,7 @@ type LatestSignalPrices struct { func (x *LatestSignalPrices) Reset() { *x = LatestSignalPrices{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[4] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5938,7 +5938,7 @@ func (*LatestSignalPrices) ProtoMessage() {} // Deprecated: Use LatestSignalPrices.ProtoReflect.Descriptor instead. func (*LatestSignalPrices) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{4} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{4} } func (x *LatestSignalPrices) GetTunnelId() uint64 { @@ -5977,7 +5977,7 @@ type SignalPrice struct { func (x *SignalPrice) Reset() { *x = SignalPrice{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[5] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5991,7 +5991,7 @@ func (*SignalPrice) ProtoMessage() {} // Deprecated: Use SignalPrice.ProtoReflect.Descriptor instead. func (*SignalPrice) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{5} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{5} } func (x *SignalPrice) GetSignalId() string { @@ -6021,7 +6021,7 @@ type TotalFees struct { func (x *TotalFees) Reset() { *x = TotalFees{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6035,7 +6035,7 @@ func (*TotalFees) ProtoMessage() {} // Deprecated: Use TotalFees.ProtoReflect.Descriptor instead. func (*TotalFees) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{6} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{6} } func (x *TotalFees) GetTotalPacketFee() []*v1beta1.Coin { @@ -6066,7 +6066,7 @@ type Packet struct { func (x *Packet) Reset() { *x = Packet{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6080,7 +6080,7 @@ func (*Packet) ProtoMessage() {} // Deprecated: Use Packet.ProtoReflect.Descriptor instead. func (*Packet) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{7} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{7} } func (x *Packet) GetTunnelId() uint64 { @@ -6135,7 +6135,7 @@ type TSSPacketContent struct { func (x *TSSPacketContent) Reset() { *x = TSSPacketContent{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tunnel_proto_msgTypes[8] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6149,7 +6149,7 @@ func (*TSSPacketContent) ProtoMessage() {} // Deprecated: Use TSSPacketContent.ProtoReflect.Descriptor instead. func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{8} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{8} } func (x *TSSPacketContent) GetSigningId() uint64 { @@ -6173,218 +6173,222 @@ func (x *TSSPacketContent) GetDestinationContractAddress() string { return "" } -var File_tunnel_v1beta1_tunnel_proto protoreflect.FileDescriptor - -var file_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, - 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 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, 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, 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, 0x66, 0x65, - 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, - 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0xca, 0x01, 0x0a, - 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, - 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x12, 0x73, - 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, 0x6f, 0x66, - 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x73, - 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, - 0x42, 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, - 0x10, 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, - 0x53, 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, - 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xbb, 0x04, 0x0a, 0x06, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x06, 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x18, 0x03, 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, 0x0a, 0xca, 0xb4, - 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, - 0x31, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x08, 0x66, 0x65, 0x65, 0x50, 0x61, 0x79, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, +var File_band_tunnel_v1beta1_tunnel_proto protoreflect.FileDescriptor + +var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 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, 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, 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, 0x1e, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, + 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, + 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0xca, 0x01, 0x0a, 0x0f, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, + 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x12, 0x73, 0x6f, + 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, 0x6f, 0x66, 0x74, + 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x73, 0x6f, + 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, 0x42, + 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, + 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, + 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, + 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc5, 0x04, 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x06, + 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, + 0x03, 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, 0x0a, 0xca, 0xb4, 0x2d, + 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x36, + 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, + 0x79, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x08, 0x66, 0x65, 0x65, 0x50, 0x61, 0x79, 0x65, 0x72, 0x12, 0x57, 0x0a, + 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x18, 0x08, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, + 0xb0, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x64, 0x12, 0x4b, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, + 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, + 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xab, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, - 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, - 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, - 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, - 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, 0x30, 0xc8, - 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, - 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, - 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x87, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, - 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x04, 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, 0x12, 0xca, - 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, - 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, - 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, - 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, - 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, - 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, - 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, - 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, - 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, - 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, - 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, - 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, - 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, - 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xc1, 0x01, 0x0a, 0x12, 0x63, - 0x6f, 0x6d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, - 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, + 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, + 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, + 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, + 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, + 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, + 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, + 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, + 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, + 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, + 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, + 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, + 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, + 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, + 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, + 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_tunnel_v1beta1_tunnel_proto_rawDescOnce sync.Once - file_tunnel_v1beta1_tunnel_proto_rawDescData = file_tunnel_v1beta1_tunnel_proto_rawDesc + file_band_tunnel_v1beta1_tunnel_proto_rawDescOnce sync.Once + file_band_tunnel_v1beta1_tunnel_proto_rawDescData = file_band_tunnel_v1beta1_tunnel_proto_rawDesc ) -func file_tunnel_v1beta1_tunnel_proto_rawDescGZIP() []byte { - file_tunnel_v1beta1_tunnel_proto_rawDescOnce.Do(func() { - file_tunnel_v1beta1_tunnel_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_tunnel_proto_rawDescData) +func file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP() []byte { + file_band_tunnel_v1beta1_tunnel_proto_rawDescOnce.Do(func() { + file_band_tunnel_v1beta1_tunnel_proto_rawDescData = protoimpl.X.CompressGZIP(file_band_tunnel_v1beta1_tunnel_proto_rawDescData) }) - return file_tunnel_v1beta1_tunnel_proto_rawDescData -} - -var file_tunnel_v1beta1_tunnel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_tunnel_v1beta1_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_tunnel_v1beta1_tunnel_proto_goTypes = []interface{}{ - (Encoder)(0), // 0: tunnel.v1beta1.Encoder - (*TSSRoute)(nil), // 1: tunnel.v1beta1.TSSRoute - (*SignalDeviation)(nil), // 2: tunnel.v1beta1.SignalDeviation - (*Deposit)(nil), // 3: tunnel.v1beta1.Deposit - (*Tunnel)(nil), // 4: tunnel.v1beta1.Tunnel - (*LatestSignalPrices)(nil), // 5: tunnel.v1beta1.LatestSignalPrices - (*SignalPrice)(nil), // 6: tunnel.v1beta1.SignalPrice - (*TotalFees)(nil), // 7: tunnel.v1beta1.TotalFees - (*Packet)(nil), // 8: tunnel.v1beta1.Packet - (*TSSPacketContent)(nil), // 9: tunnel.v1beta1.TSSPacketContent + return file_band_tunnel_v1beta1_tunnel_proto_rawDescData +} + +var file_band_tunnel_v1beta1_tunnel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_band_tunnel_v1beta1_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_band_tunnel_v1beta1_tunnel_proto_goTypes = []interface{}{ + (Encoder)(0), // 0: band.tunnel.v1beta1.Encoder + (*TSSRoute)(nil), // 1: band.tunnel.v1beta1.TSSRoute + (*SignalDeviation)(nil), // 2: band.tunnel.v1beta1.SignalDeviation + (*Deposit)(nil), // 3: band.tunnel.v1beta1.Deposit + (*Tunnel)(nil), // 4: band.tunnel.v1beta1.Tunnel + (*LatestSignalPrices)(nil), // 5: band.tunnel.v1beta1.LatestSignalPrices + (*SignalPrice)(nil), // 6: band.tunnel.v1beta1.SignalPrice + (*TotalFees)(nil), // 7: band.tunnel.v1beta1.TotalFees + (*Packet)(nil), // 8: band.tunnel.v1beta1.Packet + (*TSSPacketContent)(nil), // 9: band.tunnel.v1beta1.TSSPacketContent (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin (*anypb.Any)(nil), // 11: google.protobuf.Any } -var file_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ - 10, // 0: tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin - 11, // 1: tunnel.v1beta1.Tunnel.route:type_name -> google.protobuf.Any - 0, // 2: tunnel.v1beta1.Tunnel.encoder:type_name -> tunnel.v1beta1.Encoder - 2, // 3: tunnel.v1beta1.Tunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation - 10, // 4: tunnel.v1beta1.Tunnel.total_deposit:type_name -> cosmos.base.v1beta1.Coin - 6, // 5: tunnel.v1beta1.LatestSignalPrices.signal_prices:type_name -> tunnel.v1beta1.SignalPrice - 10, // 6: tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin - 6, // 7: tunnel.v1beta1.Packet.signal_prices:type_name -> tunnel.v1beta1.SignalPrice - 11, // 8: tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any +var file_band_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ + 10, // 0: band.tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin + 11, // 1: band.tunnel.v1beta1.Tunnel.route:type_name -> google.protobuf.Any + 0, // 2: band.tunnel.v1beta1.Tunnel.encoder:type_name -> band.tunnel.v1beta1.Encoder + 2, // 3: band.tunnel.v1beta1.Tunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation + 10, // 4: band.tunnel.v1beta1.Tunnel.total_deposit:type_name -> cosmos.base.v1beta1.Coin + 6, // 5: band.tunnel.v1beta1.LatestSignalPrices.signal_prices:type_name -> band.tunnel.v1beta1.SignalPrice + 10, // 6: band.tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin + 6, // 7: band.tunnel.v1beta1.Packet.signal_prices:type_name -> band.tunnel.v1beta1.SignalPrice + 11, // 8: band.tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any 9, // [9:9] is the sub-list for method output_type 9, // [9:9] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name @@ -6392,13 +6396,13 @@ var file_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ 0, // [0:9] is the sub-list for field type_name } -func init() { file_tunnel_v1beta1_tunnel_proto_init() } -func file_tunnel_v1beta1_tunnel_proto_init() { - if File_tunnel_v1beta1_tunnel_proto != nil { +func init() { file_band_tunnel_v1beta1_tunnel_proto_init() } +func file_band_tunnel_v1beta1_tunnel_proto_init() { + if File_band_tunnel_v1beta1_tunnel_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_tunnel_v1beta1_tunnel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TSSRoute); i { case 0: return &v.state @@ -6410,7 +6414,7 @@ func file_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_tunnel_v1beta1_tunnel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignalDeviation); i { case 0: return &v.state @@ -6422,7 +6426,7 @@ func file_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_tunnel_v1beta1_tunnel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Deposit); i { case 0: return &v.state @@ -6434,7 +6438,7 @@ func file_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_tunnel_v1beta1_tunnel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Tunnel); i { case 0: return &v.state @@ -6446,7 +6450,7 @@ func file_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_tunnel_v1beta1_tunnel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LatestSignalPrices); i { case 0: return &v.state @@ -6458,7 +6462,7 @@ func file_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_tunnel_v1beta1_tunnel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SignalPrice); i { case 0: return &v.state @@ -6470,7 +6474,7 @@ func file_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_tunnel_v1beta1_tunnel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TotalFees); i { case 0: return &v.state @@ -6482,7 +6486,7 @@ func file_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_tunnel_v1beta1_tunnel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Packet); i { case 0: return &v.state @@ -6494,7 +6498,7 @@ func file_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_tunnel_v1beta1_tunnel_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TSSPacketContent); i { case 0: return &v.state @@ -6511,19 +6515,19 @@ func file_tunnel_v1beta1_tunnel_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tunnel_v1beta1_tunnel_proto_rawDesc, + RawDescriptor: file_band_tunnel_v1beta1_tunnel_proto_rawDesc, NumEnums: 1, NumMessages: 9, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_tunnel_v1beta1_tunnel_proto_goTypes, - DependencyIndexes: file_tunnel_v1beta1_tunnel_proto_depIdxs, - EnumInfos: file_tunnel_v1beta1_tunnel_proto_enumTypes, - MessageInfos: file_tunnel_v1beta1_tunnel_proto_msgTypes, + GoTypes: file_band_tunnel_v1beta1_tunnel_proto_goTypes, + DependencyIndexes: file_band_tunnel_v1beta1_tunnel_proto_depIdxs, + EnumInfos: file_band_tunnel_v1beta1_tunnel_proto_enumTypes, + MessageInfos: file_band_tunnel_v1beta1_tunnel_proto_msgTypes, }.Build() - File_tunnel_v1beta1_tunnel_proto = out.File - file_tunnel_v1beta1_tunnel_proto_rawDesc = nil - file_tunnel_v1beta1_tunnel_proto_goTypes = nil - file_tunnel_v1beta1_tunnel_proto_depIdxs = nil + File_band_tunnel_v1beta1_tunnel_proto = out.File + file_band_tunnel_v1beta1_tunnel_proto_rawDesc = nil + file_band_tunnel_v1beta1_tunnel_proto_goTypes = nil + file_band_tunnel_v1beta1_tunnel_proto_depIdxs = nil } diff --git a/api/tunnel/v1beta1/tx.pulsar.go b/api/band/tunnel/v1beta1/tx.pulsar.go similarity index 83% rename from api/tunnel/v1beta1/tx.pulsar.go rename to api/band/tunnel/v1beta1/tx.pulsar.go index 1a164ac77..25189e2ef 100644 --- a/api/tunnel/v1beta1/tx.pulsar.go +++ b/api/band/tunnel/v1beta1/tx.pulsar.go @@ -131,8 +131,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgCreateTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgCreateTunnel") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgCreateTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgCreateTunnel") fd_MsgCreateTunnel_signal_deviations = md_MsgCreateTunnel.Fields().ByName("signal_deviations") fd_MsgCreateTunnel_interval = md_MsgCreateTunnel.Fields().ByName("interval") fd_MsgCreateTunnel_route = md_MsgCreateTunnel.Fields().ByName("route") @@ -150,7 +150,7 @@ func (x *MsgCreateTunnel) ProtoReflect() protoreflect.Message { } func (x *MsgCreateTunnel) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -257,23 +257,23 @@ func (x *fastReflection_MsgCreateTunnel) Range(f func(protoreflect.FieldDescript // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCreateTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations": return len(x.SignalDeviations) != 0 - case "tunnel.v1beta1.MsgCreateTunnel.interval": + case "band.tunnel.v1beta1.MsgCreateTunnel.interval": return x.Interval != uint64(0) - case "tunnel.v1beta1.MsgCreateTunnel.route": + case "band.tunnel.v1beta1.MsgCreateTunnel.route": return x.Route != nil - case "tunnel.v1beta1.MsgCreateTunnel.encoder": + case "band.tunnel.v1beta1.MsgCreateTunnel.encoder": return x.Encoder != 0 - case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + case "band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit": return len(x.InitialDeposit) != 0 - case "tunnel.v1beta1.MsgCreateTunnel.creator": + case "band.tunnel.v1beta1.MsgCreateTunnel.creator": return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) } } @@ -285,23 +285,23 @@ func (x *fastReflection_MsgCreateTunnel) Has(fd protoreflect.FieldDescriptor) bo // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations": x.SignalDeviations = nil - case "tunnel.v1beta1.MsgCreateTunnel.interval": + case "band.tunnel.v1beta1.MsgCreateTunnel.interval": x.Interval = uint64(0) - case "tunnel.v1beta1.MsgCreateTunnel.route": + case "band.tunnel.v1beta1.MsgCreateTunnel.route": x.Route = nil - case "tunnel.v1beta1.MsgCreateTunnel.encoder": + case "band.tunnel.v1beta1.MsgCreateTunnel.encoder": x.Encoder = 0 - case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + case "band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit": x.InitialDeposit = nil - case "tunnel.v1beta1.MsgCreateTunnel.creator": + case "band.tunnel.v1beta1.MsgCreateTunnel.creator": x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) } } @@ -313,35 +313,35 @@ func (x *fastReflection_MsgCreateTunnel) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCreateTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations": if len(x.SignalDeviations) == 0 { return protoreflect.ValueOfList(&_MsgCreateTunnel_1_list{}) } listValue := &_MsgCreateTunnel_1_list{list: &x.SignalDeviations} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.MsgCreateTunnel.interval": + case "band.tunnel.v1beta1.MsgCreateTunnel.interval": value := x.Interval return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.MsgCreateTunnel.route": + case "band.tunnel.v1beta1.MsgCreateTunnel.route": value := x.Route return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "tunnel.v1beta1.MsgCreateTunnel.encoder": + case "band.tunnel.v1beta1.MsgCreateTunnel.encoder": value := x.Encoder return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + case "band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit": if len(x.InitialDeposit) == 0 { return protoreflect.ValueOfList(&_MsgCreateTunnel_5_list{}) } listValue := &_MsgCreateTunnel_5_list{list: &x.InitialDeposit} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.MsgCreateTunnel.creator": + case "band.tunnel.v1beta1.MsgCreateTunnel.creator": value := x.Creator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnel does not contain field %s", descriptor.FullName())) } } @@ -357,27 +357,27 @@ func (x *fastReflection_MsgCreateTunnel) Get(descriptor protoreflect.FieldDescri // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations": lv := value.List() clv := lv.(*_MsgCreateTunnel_1_list) x.SignalDeviations = *clv.list - case "tunnel.v1beta1.MsgCreateTunnel.interval": + case "band.tunnel.v1beta1.MsgCreateTunnel.interval": x.Interval = value.Uint() - case "tunnel.v1beta1.MsgCreateTunnel.route": + case "band.tunnel.v1beta1.MsgCreateTunnel.route": x.Route = value.Message().Interface().(*anypb.Any) - case "tunnel.v1beta1.MsgCreateTunnel.encoder": + case "band.tunnel.v1beta1.MsgCreateTunnel.encoder": x.Encoder = (Encoder)(value.Enum()) - case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + case "band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit": lv := value.List() clv := lv.(*_MsgCreateTunnel_5_list) x.InitialDeposit = *clv.list - case "tunnel.v1beta1.MsgCreateTunnel.creator": + case "band.tunnel.v1beta1.MsgCreateTunnel.creator": x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) } } @@ -393,34 +393,34 @@ func (x *fastReflection_MsgCreateTunnel) Set(fd protoreflect.FieldDescriptor, va // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations": if x.SignalDeviations == nil { x.SignalDeviations = []*SignalDeviation{} } value := &_MsgCreateTunnel_1_list{list: &x.SignalDeviations} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.MsgCreateTunnel.route": + case "band.tunnel.v1beta1.MsgCreateTunnel.route": if x.Route == nil { x.Route = new(anypb.Any) } return protoreflect.ValueOfMessage(x.Route.ProtoReflect()) - case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + case "band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit": if x.InitialDeposit == nil { x.InitialDeposit = []*v1beta1.Coin{} } value := &_MsgCreateTunnel_5_list{list: &x.InitialDeposit} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.MsgCreateTunnel.interval": - panic(fmt.Errorf("field interval of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) - case "tunnel.v1beta1.MsgCreateTunnel.encoder": - panic(fmt.Errorf("field encoder of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) - case "tunnel.v1beta1.MsgCreateTunnel.creator": - panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgCreateTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgCreateTunnel.interval": + panic(fmt.Errorf("field interval of message band.tunnel.v1beta1.MsgCreateTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgCreateTunnel.encoder": + panic(fmt.Errorf("field encoder of message band.tunnel.v1beta1.MsgCreateTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgCreateTunnel.creator": + panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.MsgCreateTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) } } @@ -429,26 +429,26 @@ func (x *fastReflection_MsgCreateTunnel) Mutable(fd protoreflect.FieldDescriptor // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCreateTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations": list := []*SignalDeviation{} return protoreflect.ValueOfList(&_MsgCreateTunnel_1_list{list: &list}) - case "tunnel.v1beta1.MsgCreateTunnel.interval": + case "band.tunnel.v1beta1.MsgCreateTunnel.interval": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.MsgCreateTunnel.route": + case "band.tunnel.v1beta1.MsgCreateTunnel.route": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "tunnel.v1beta1.MsgCreateTunnel.encoder": + case "band.tunnel.v1beta1.MsgCreateTunnel.encoder": return protoreflect.ValueOfEnum(0) - case "tunnel.v1beta1.MsgCreateTunnel.initial_deposit": + case "band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_MsgCreateTunnel_5_list{list: &list}) - case "tunnel.v1beta1.MsgCreateTunnel.creator": + case "band.tunnel.v1beta1.MsgCreateTunnel.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnel does not contain field %s", fd.FullName())) } } @@ -458,7 +458,7 @@ func (x *fastReflection_MsgCreateTunnel) NewField(fd protoreflect.FieldDescripto func (x *fastReflection_MsgCreateTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgCreateTunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgCreateTunnel", d.FullName())) } panic("unreachable") } @@ -895,8 +895,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgCreateTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgCreateTunnelResponse") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgCreateTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgCreateTunnelResponse") fd_MsgCreateTunnelResponse_tunnel_id = md_MsgCreateTunnelResponse.Fields().ByName("tunnel_id") } @@ -909,7 +909,7 @@ func (x *MsgCreateTunnelResponse) ProtoReflect() protoreflect.Message { } func (x *MsgCreateTunnelResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[1] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -986,13 +986,13 @@ func (x *fastReflection_MsgCreateTunnelResponse) Range(f func(protoreflect.Field // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgCreateTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + case "band.tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": return x.TunnelId != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1004,13 +1004,13 @@ func (x *fastReflection_MsgCreateTunnelResponse) Has(fd protoreflect.FieldDescri // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + case "band.tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": x.TunnelId = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1022,14 +1022,14 @@ func (x *fastReflection_MsgCreateTunnelResponse) Clear(fd protoreflect.FieldDesc // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgCreateTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + case "band.tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -1045,13 +1045,13 @@ func (x *fastReflection_MsgCreateTunnelResponse) Get(descriptor protoreflect.Fie // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + case "band.tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": x.TunnelId = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1067,13 +1067,13 @@ func (x *fastReflection_MsgCreateTunnelResponse) Set(fd protoreflect.FieldDescri // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgCreateTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgCreateTunnelResponse is not mutable")) + case "band.tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgCreateTunnelResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1082,13 +1082,13 @@ func (x *fastReflection_MsgCreateTunnelResponse) Mutable(fd protoreflect.FieldDe // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgCreateTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": + case "band.tunnel.v1beta1.MsgCreateTunnelResponse.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgCreateTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgCreateTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgCreateTunnelResponse does not contain field %s", fd.FullName())) } } @@ -1098,7 +1098,7 @@ func (x *fastReflection_MsgCreateTunnelResponse) NewField(fd protoreflect.FieldD func (x *fastReflection_MsgCreateTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgCreateTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgCreateTunnelResponse", d.FullName())) } panic("unreachable") } @@ -1353,8 +1353,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgEditTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnel") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgEditTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnel") fd_MsgEditTunnel_tunnel_id = md_MsgEditTunnel.Fields().ByName("tunnel_id") fd_MsgEditTunnel_signal_deviations = md_MsgEditTunnel.Fields().ByName("signal_deviations") fd_MsgEditTunnel_interval = md_MsgEditTunnel.Fields().ByName("interval") @@ -1370,7 +1370,7 @@ func (x *MsgEditTunnel) ProtoReflect() protoreflect.Message { } func (x *MsgEditTunnel) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[2] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1465,19 +1465,19 @@ func (x *fastReflection_MsgEditTunnel) Range(f func(protoreflect.FieldDescriptor // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgEditTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": return len(x.SignalDeviations) != 0 - case "tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgEditTunnel.interval": return x.Interval != uint64(0) - case "tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgEditTunnel.creator": return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) } } @@ -1489,19 +1489,19 @@ func (x *fastReflection_MsgEditTunnel) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": x.SignalDeviations = nil - case "tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgEditTunnel.interval": x.Interval = uint64(0) - case "tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgEditTunnel.creator": x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) } } @@ -1513,26 +1513,26 @@ func (x *fastReflection_MsgEditTunnel) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgEditTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": if len(x.SignalDeviations) == 0 { return protoreflect.ValueOfList(&_MsgEditTunnel_2_list{}) } listValue := &_MsgEditTunnel_2_list{list: &x.SignalDeviations} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgEditTunnel.interval": value := x.Interval return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgEditTunnel.creator": value := x.Creator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", descriptor.FullName())) } } @@ -1548,21 +1548,21 @@ func (x *fastReflection_MsgEditTunnel) Get(descriptor protoreflect.FieldDescript // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": lv := value.List() clv := lv.(*_MsgEditTunnel_2_list) x.SignalDeviations = *clv.list - case "tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgEditTunnel.interval": x.Interval = value.Uint() - case "tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgEditTunnel.creator": x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) } } @@ -1578,23 +1578,23 @@ func (x *fastReflection_MsgEditTunnel) Set(fd protoreflect.FieldDescriptor, valu // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgEditTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": if x.SignalDeviations == nil { x.SignalDeviations = []*SignalDeviation{} } value := &_MsgEditTunnel_2_list{list: &x.SignalDeviations} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgEditTunnel is not mutable")) - case "tunnel.v1beta1.MsgEditTunnel.interval": - panic(fmt.Errorf("field interval of message tunnel.v1beta1.MsgEditTunnel is not mutable")) - case "tunnel.v1beta1.MsgEditTunnel.creator": - panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgEditTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgEditTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgEditTunnel.interval": + panic(fmt.Errorf("field interval of message band.tunnel.v1beta1.MsgEditTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgEditTunnel.creator": + panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.MsgEditTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) } } @@ -1603,20 +1603,20 @@ func (x *fastReflection_MsgEditTunnel) Mutable(fd protoreflect.FieldDescriptor) // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgEditTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": list := []*SignalDeviation{} return protoreflect.ValueOfList(&_MsgEditTunnel_2_list{list: &list}) - case "tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgEditTunnel.interval": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgEditTunnel.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) } } @@ -1626,7 +1626,7 @@ func (x *fastReflection_MsgEditTunnel) NewField(fd protoreflect.FieldDescriptor) func (x *fastReflection_MsgEditTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgEditTunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgEditTunnel", d.FullName())) } panic("unreachable") } @@ -1952,8 +1952,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgEditTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnelResponse") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgEditTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnelResponse") } var _ protoreflect.Message = (*fastReflection_MsgEditTunnelResponse)(nil) @@ -1965,7 +1965,7 @@ func (x *MsgEditTunnelResponse) ProtoReflect() protoreflect.Message { } func (x *MsgEditTunnelResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[3] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2038,9 +2038,9 @@ func (x *fastReflection_MsgEditTunnelResponse) Has(fd protoreflect.FieldDescript switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) } } @@ -2054,9 +2054,9 @@ func (x *fastReflection_MsgEditTunnelResponse) Clear(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) } } @@ -2070,9 +2070,9 @@ func (x *fastReflection_MsgEditTunnelResponse) Get(descriptor protoreflect.Field switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -2090,9 +2090,9 @@ func (x *fastReflection_MsgEditTunnelResponse) Set(fd protoreflect.FieldDescript switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) } } @@ -2110,9 +2110,9 @@ func (x *fastReflection_MsgEditTunnelResponse) Mutable(fd protoreflect.FieldDesc switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) } } @@ -2123,9 +2123,9 @@ func (x *fastReflection_MsgEditTunnelResponse) NewField(fd protoreflect.FieldDes switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) } } @@ -2135,7 +2135,7 @@ func (x *fastReflection_MsgEditTunnelResponse) NewField(fd protoreflect.FieldDes func (x *fastReflection_MsgEditTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgEditTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgEditTunnelResponse", d.FullName())) } panic("unreachable") } @@ -2310,8 +2310,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgActivate = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgActivate") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgActivate = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgActivate") fd_MsgActivate_tunnel_id = md_MsgActivate.Fields().ByName("tunnel_id") fd_MsgActivate_creator = md_MsgActivate.Fields().ByName("creator") } @@ -2325,7 +2325,7 @@ func (x *MsgActivate) ProtoReflect() protoreflect.Message { } func (x *MsgActivate) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[4] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2408,15 +2408,15 @@ func (x *fastReflection_MsgActivate) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgActivate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgActivate.tunnel_id": + case "band.tunnel.v1beta1.MsgActivate.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.MsgActivate.creator": + case "band.tunnel.v1beta1.MsgActivate.creator": return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) } } @@ -2428,15 +2428,15 @@ func (x *fastReflection_MsgActivate) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgActivate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgActivate.tunnel_id": + case "band.tunnel.v1beta1.MsgActivate.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.MsgActivate.creator": + case "band.tunnel.v1beta1.MsgActivate.creator": x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) } } @@ -2448,17 +2448,17 @@ func (x *fastReflection_MsgActivate) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgActivate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgActivate.tunnel_id": + case "band.tunnel.v1beta1.MsgActivate.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.MsgActivate.creator": + case "band.tunnel.v1beta1.MsgActivate.creator": value := x.Creator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivate does not contain field %s", descriptor.FullName())) } } @@ -2474,15 +2474,15 @@ func (x *fastReflection_MsgActivate) Get(descriptor protoreflect.FieldDescriptor // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgActivate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgActivate.tunnel_id": + case "band.tunnel.v1beta1.MsgActivate.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.MsgActivate.creator": + case "band.tunnel.v1beta1.MsgActivate.creator": x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) } } @@ -2498,15 +2498,15 @@ func (x *fastReflection_MsgActivate) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgActivate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgActivate.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgActivate is not mutable")) - case "tunnel.v1beta1.MsgActivate.creator": - panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgActivate is not mutable")) + case "band.tunnel.v1beta1.MsgActivate.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgActivate is not mutable")) + case "band.tunnel.v1beta1.MsgActivate.creator": + panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.MsgActivate is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) } } @@ -2515,15 +2515,15 @@ func (x *fastReflection_MsgActivate) Mutable(fd protoreflect.FieldDescriptor) pr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgActivate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgActivate.tunnel_id": + case "band.tunnel.v1beta1.MsgActivate.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.MsgActivate.creator": + case "band.tunnel.v1beta1.MsgActivate.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivate does not contain field %s", fd.FullName())) } } @@ -2533,7 +2533,7 @@ func (x *fastReflection_MsgActivate) NewField(fd protoreflect.FieldDescriptor) p func (x *fastReflection_MsgActivate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgActivate", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgActivate", d.FullName())) } panic("unreachable") } @@ -2776,8 +2776,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgActivateResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgActivateResponse") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgActivateResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgActivateResponse") } var _ protoreflect.Message = (*fastReflection_MsgActivateResponse)(nil) @@ -2789,7 +2789,7 @@ func (x *MsgActivateResponse) ProtoReflect() protoreflect.Message { } func (x *MsgActivateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[5] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2862,9 +2862,9 @@ func (x *fastReflection_MsgActivateResponse) Has(fd protoreflect.FieldDescriptor switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) } } @@ -2878,9 +2878,9 @@ func (x *fastReflection_MsgActivateResponse) Clear(fd protoreflect.FieldDescript switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) } } @@ -2894,9 +2894,9 @@ func (x *fastReflection_MsgActivateResponse) Get(descriptor protoreflect.FieldDe switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivateResponse does not contain field %s", descriptor.FullName())) } } @@ -2914,9 +2914,9 @@ func (x *fastReflection_MsgActivateResponse) Set(fd protoreflect.FieldDescriptor switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) } } @@ -2934,9 +2934,9 @@ func (x *fastReflection_MsgActivateResponse) Mutable(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) } } @@ -2947,9 +2947,9 @@ func (x *fastReflection_MsgActivateResponse) NewField(fd protoreflect.FieldDescr switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgActivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgActivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgActivateResponse does not contain field %s", fd.FullName())) } } @@ -2959,7 +2959,7 @@ func (x *fastReflection_MsgActivateResponse) NewField(fd protoreflect.FieldDescr func (x *fastReflection_MsgActivateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgActivateResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgActivateResponse", d.FullName())) } panic("unreachable") } @@ -3134,8 +3134,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgDeactivate = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDeactivate") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgDeactivate = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDeactivate") fd_MsgDeactivate_tunnel_id = md_MsgDeactivate.Fields().ByName("tunnel_id") fd_MsgDeactivate_creator = md_MsgDeactivate.Fields().ByName("creator") } @@ -3149,7 +3149,7 @@ func (x *MsgDeactivate) ProtoReflect() protoreflect.Message { } func (x *MsgDeactivate) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3232,15 +3232,15 @@ func (x *fastReflection_MsgDeactivate) Range(f func(protoreflect.FieldDescriptor // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgDeactivate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + case "band.tunnel.v1beta1.MsgDeactivate.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.MsgDeactivate.creator": + case "band.tunnel.v1beta1.MsgDeactivate.creator": return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) } } @@ -3252,15 +3252,15 @@ func (x *fastReflection_MsgDeactivate) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDeactivate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + case "band.tunnel.v1beta1.MsgDeactivate.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.MsgDeactivate.creator": + case "band.tunnel.v1beta1.MsgDeactivate.creator": x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) } } @@ -3272,17 +3272,17 @@ func (x *fastReflection_MsgDeactivate) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgDeactivate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + case "band.tunnel.v1beta1.MsgDeactivate.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.MsgDeactivate.creator": + case "band.tunnel.v1beta1.MsgDeactivate.creator": value := x.Creator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivate does not contain field %s", descriptor.FullName())) } } @@ -3298,15 +3298,15 @@ func (x *fastReflection_MsgDeactivate) Get(descriptor protoreflect.FieldDescript // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDeactivate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + case "band.tunnel.v1beta1.MsgDeactivate.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.MsgDeactivate.creator": + case "band.tunnel.v1beta1.MsgDeactivate.creator": x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) } } @@ -3322,15 +3322,15 @@ func (x *fastReflection_MsgDeactivate) Set(fd protoreflect.FieldDescriptor, valu // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDeactivate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgDeactivate.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgDeactivate is not mutable")) - case "tunnel.v1beta1.MsgDeactivate.creator": - panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgDeactivate is not mutable")) + case "band.tunnel.v1beta1.MsgDeactivate.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgDeactivate is not mutable")) + case "band.tunnel.v1beta1.MsgDeactivate.creator": + panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.MsgDeactivate is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) } } @@ -3339,15 +3339,15 @@ func (x *fastReflection_MsgDeactivate) Mutable(fd protoreflect.FieldDescriptor) // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgDeactivate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgDeactivate.tunnel_id": + case "band.tunnel.v1beta1.MsgDeactivate.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.MsgDeactivate.creator": + case "band.tunnel.v1beta1.MsgDeactivate.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivate")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivate does not contain field %s", fd.FullName())) } } @@ -3357,7 +3357,7 @@ func (x *fastReflection_MsgDeactivate) NewField(fd protoreflect.FieldDescriptor) func (x *fastReflection_MsgDeactivate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDeactivate", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgDeactivate", d.FullName())) } panic("unreachable") } @@ -3600,8 +3600,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgDeactivateResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDeactivateResponse") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgDeactivateResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDeactivateResponse") } var _ protoreflect.Message = (*fastReflection_MsgDeactivateResponse)(nil) @@ -3613,7 +3613,7 @@ func (x *MsgDeactivateResponse) ProtoReflect() protoreflect.Message { } func (x *MsgDeactivateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3686,9 +3686,9 @@ func (x *fastReflection_MsgDeactivateResponse) Has(fd protoreflect.FieldDescript switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) } } @@ -3702,9 +3702,9 @@ func (x *fastReflection_MsgDeactivateResponse) Clear(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) } } @@ -3718,9 +3718,9 @@ func (x *fastReflection_MsgDeactivateResponse) Get(descriptor protoreflect.Field switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", descriptor.FullName())) } } @@ -3738,9 +3738,9 @@ func (x *fastReflection_MsgDeactivateResponse) Set(fd protoreflect.FieldDescript switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) } } @@ -3758,9 +3758,9 @@ func (x *fastReflection_MsgDeactivateResponse) Mutable(fd protoreflect.FieldDesc switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) } } @@ -3771,9 +3771,9 @@ func (x *fastReflection_MsgDeactivateResponse) NewField(fd protoreflect.FieldDes switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDeactivateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDeactivateResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDeactivateResponse does not contain field %s", fd.FullName())) } } @@ -3783,7 +3783,7 @@ func (x *fastReflection_MsgDeactivateResponse) NewField(fd protoreflect.FieldDes func (x *fastReflection_MsgDeactivateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDeactivateResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgDeactivateResponse", d.FullName())) } panic("unreachable") } @@ -3958,8 +3958,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgTriggerTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgTriggerTunnel") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgTriggerTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgTriggerTunnel") fd_MsgTriggerTunnel_tunnel_id = md_MsgTriggerTunnel.Fields().ByName("tunnel_id") fd_MsgTriggerTunnel_creator = md_MsgTriggerTunnel.Fields().ByName("creator") } @@ -3973,7 +3973,7 @@ func (x *MsgTriggerTunnel) ProtoReflect() protoreflect.Message { } func (x *MsgTriggerTunnel) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[8] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4056,15 +4056,15 @@ func (x *fastReflection_MsgTriggerTunnel) Range(f func(protoreflect.FieldDescrip // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgTriggerTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.MsgTriggerTunnel.creator": + case "band.tunnel.v1beta1.MsgTriggerTunnel.creator": return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) } } @@ -4076,15 +4076,15 @@ func (x *fastReflection_MsgTriggerTunnel) Has(fd protoreflect.FieldDescriptor) b // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgTriggerTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.MsgTriggerTunnel.creator": + case "band.tunnel.v1beta1.MsgTriggerTunnel.creator": x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) } } @@ -4096,17 +4096,17 @@ func (x *fastReflection_MsgTriggerTunnel) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgTriggerTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.MsgTriggerTunnel.creator": + case "band.tunnel.v1beta1.MsgTriggerTunnel.creator": value := x.Creator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", descriptor.FullName())) } } @@ -4122,15 +4122,15 @@ func (x *fastReflection_MsgTriggerTunnel) Get(descriptor protoreflect.FieldDescr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgTriggerTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.MsgTriggerTunnel.creator": + case "band.tunnel.v1beta1.MsgTriggerTunnel.creator": x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) } } @@ -4146,15 +4146,15 @@ func (x *fastReflection_MsgTriggerTunnel) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgTriggerTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgTriggerTunnel is not mutable")) - case "tunnel.v1beta1.MsgTriggerTunnel.creator": - panic(fmt.Errorf("field creator of message tunnel.v1beta1.MsgTriggerTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgTriggerTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgTriggerTunnel.creator": + panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.MsgTriggerTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) } } @@ -4163,15 +4163,15 @@ func (x *fastReflection_MsgTriggerTunnel) Mutable(fd protoreflect.FieldDescripto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgTriggerTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgTriggerTunnel.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.MsgTriggerTunnel.creator": + case "band.tunnel.v1beta1.MsgTriggerTunnel.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnel does not contain field %s", fd.FullName())) } } @@ -4181,7 +4181,7 @@ func (x *fastReflection_MsgTriggerTunnel) NewField(fd protoreflect.FieldDescript func (x *fastReflection_MsgTriggerTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgTriggerTunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgTriggerTunnel", d.FullName())) } panic("unreachable") } @@ -4424,8 +4424,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgTriggerTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgTriggerTunnelResponse") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgTriggerTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgTriggerTunnelResponse") } var _ protoreflect.Message = (*fastReflection_MsgTriggerTunnelResponse)(nil) @@ -4437,7 +4437,7 @@ func (x *MsgTriggerTunnelResponse) ProtoReflect() protoreflect.Message { } func (x *MsgTriggerTunnelResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[9] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4510,9 +4510,9 @@ func (x *fastReflection_MsgTriggerTunnelResponse) Has(fd protoreflect.FieldDescr switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) } } @@ -4526,9 +4526,9 @@ func (x *fastReflection_MsgTriggerTunnelResponse) Clear(fd protoreflect.FieldDes switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) } } @@ -4542,9 +4542,9 @@ func (x *fastReflection_MsgTriggerTunnelResponse) Get(descriptor protoreflect.Fi switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -4562,9 +4562,9 @@ func (x *fastReflection_MsgTriggerTunnelResponse) Set(fd protoreflect.FieldDescr switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) } } @@ -4582,9 +4582,9 @@ func (x *fastReflection_MsgTriggerTunnelResponse) Mutable(fd protoreflect.FieldD switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) } } @@ -4595,9 +4595,9 @@ func (x *fastReflection_MsgTriggerTunnelResponse) NewField(fd protoreflect.Field switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgTriggerTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgTriggerTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgTriggerTunnelResponse does not contain field %s", fd.FullName())) } } @@ -4607,7 +4607,7 @@ func (x *fastReflection_MsgTriggerTunnelResponse) NewField(fd protoreflect.Field func (x *fastReflection_MsgTriggerTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgTriggerTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgTriggerTunnelResponse", d.FullName())) } panic("unreachable") } @@ -4834,8 +4834,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgDepositTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnel") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgDepositTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnel") fd_MsgDepositTunnel_tunnel_id = md_MsgDepositTunnel.Fields().ByName("tunnel_id") fd_MsgDepositTunnel_amount = md_MsgDepositTunnel.Fields().ByName("amount") fd_MsgDepositTunnel_depositor = md_MsgDepositTunnel.Fields().ByName("depositor") @@ -4850,7 +4850,7 @@ func (x *MsgDepositTunnel) ProtoReflect() protoreflect.Message { } func (x *MsgDepositTunnel) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[10] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4939,17 +4939,17 @@ func (x *fastReflection_MsgDepositTunnel) Range(f func(protoreflect.FieldDescrip // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgDepositTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositTunnel.amount": return len(x.Amount) != 0 - case "tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": return x.Depositor != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) } } @@ -4961,17 +4961,17 @@ func (x *fastReflection_MsgDepositTunnel) Has(fd protoreflect.FieldDescriptor) b // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDepositTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositTunnel.amount": x.Amount = nil - case "tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": x.Depositor = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) } } @@ -4983,23 +4983,23 @@ func (x *fastReflection_MsgDepositTunnel) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgDepositTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositTunnel.amount": if len(x.Amount) == 0 { return protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{}) } listValue := &_MsgDepositTunnel_2_list{list: &x.Amount} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": value := x.Depositor return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", descriptor.FullName())) } } @@ -5015,19 +5015,19 @@ func (x *fastReflection_MsgDepositTunnel) Get(descriptor protoreflect.FieldDescr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDepositTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositTunnel.amount": lv := value.List() clv := lv.(*_MsgDepositTunnel_2_list) x.Amount = *clv.list - case "tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": x.Depositor = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) } } @@ -5043,21 +5043,21 @@ func (x *fastReflection_MsgDepositTunnel) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgDepositTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositTunnel.amount": if x.Amount == nil { x.Amount = []*v1beta1.Coin{} } value := &_MsgDepositTunnel_2_list{list: &x.Amount} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgDepositTunnel is not mutable")) - case "tunnel.v1beta1.MsgDepositTunnel.depositor": - panic(fmt.Errorf("field depositor of message tunnel.v1beta1.MsgDepositTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgDepositTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": + panic(fmt.Errorf("field depositor of message band.tunnel.v1beta1.MsgDepositTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) } } @@ -5066,18 +5066,18 @@ func (x *fastReflection_MsgDepositTunnel) Mutable(fd protoreflect.FieldDescripto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgDepositTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositTunnel.amount": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{list: &list}) - case "tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) } } @@ -5087,7 +5087,7 @@ func (x *fastReflection_MsgDepositTunnel) NewField(fd protoreflect.FieldDescript func (x *fastReflection_MsgDepositTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDepositTunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgDepositTunnel", d.FullName())) } panic("unreachable") } @@ -5386,8 +5386,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgDepositTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnelResponse") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgDepositTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnelResponse") } var _ protoreflect.Message = (*fastReflection_MsgDepositTunnelResponse)(nil) @@ -5399,7 +5399,7 @@ func (x *MsgDepositTunnelResponse) ProtoReflect() protoreflect.Message { } func (x *MsgDepositTunnelResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[11] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5472,9 +5472,9 @@ func (x *fastReflection_MsgDepositTunnelResponse) Has(fd protoreflect.FieldDescr switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5488,9 +5488,9 @@ func (x *fastReflection_MsgDepositTunnelResponse) Clear(fd protoreflect.FieldDes switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5504,9 +5504,9 @@ func (x *fastReflection_MsgDepositTunnelResponse) Get(descriptor protoreflect.Fi switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -5524,9 +5524,9 @@ func (x *fastReflection_MsgDepositTunnelResponse) Set(fd protoreflect.FieldDescr switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5544,9 +5544,9 @@ func (x *fastReflection_MsgDepositTunnelResponse) Mutable(fd protoreflect.FieldD switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5557,9 +5557,9 @@ func (x *fastReflection_MsgDepositTunnelResponse) NewField(fd protoreflect.Field switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5569,7 +5569,7 @@ func (x *fastReflection_MsgDepositTunnelResponse) NewField(fd protoreflect.Field func (x *fastReflection_MsgDepositTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgDepositTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgDepositTunnelResponse", d.FullName())) } panic("unreachable") } @@ -5796,8 +5796,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgWithdrawTunnel = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnel") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgWithdrawTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnel") fd_MsgWithdrawTunnel_tunnel_id = md_MsgWithdrawTunnel.Fields().ByName("tunnel_id") fd_MsgWithdrawTunnel_amount = md_MsgWithdrawTunnel.Fields().ByName("amount") fd_MsgWithdrawTunnel_withdrawer = md_MsgWithdrawTunnel.Fields().ByName("withdrawer") @@ -5812,7 +5812,7 @@ func (x *MsgWithdrawTunnel) ProtoReflect() protoreflect.Message { } func (x *MsgWithdrawTunnel) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[12] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5901,17 +5901,17 @@ func (x *fastReflection_MsgWithdrawTunnel) Range(f func(protoreflect.FieldDescri // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgWithdrawTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": return x.TunnelId != uint64(0) - case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": return len(x.Amount) != 0 - case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": return x.Withdrawer != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) } } @@ -5923,17 +5923,17 @@ func (x *fastReflection_MsgWithdrawTunnel) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgWithdrawTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": x.TunnelId = uint64(0) - case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": x.Amount = nil - case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": x.Withdrawer = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) } } @@ -5945,23 +5945,23 @@ func (x *fastReflection_MsgWithdrawTunnel) Clear(fd protoreflect.FieldDescriptor // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgWithdrawTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": if len(x.Amount) == 0 { return protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{}) } listValue := &_MsgWithdrawTunnel_2_list{list: &x.Amount} return protoreflect.ValueOfList(listValue) - case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": value := x.Withdrawer return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", descriptor.FullName())) } } @@ -5977,19 +5977,19 @@ func (x *fastReflection_MsgWithdrawTunnel) Get(descriptor protoreflect.FieldDesc // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgWithdrawTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": x.TunnelId = value.Uint() - case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": lv := value.List() clv := lv.(*_MsgWithdrawTunnel_2_list) x.Amount = *clv.list - case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": x.Withdrawer = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) } } @@ -6005,21 +6005,21 @@ func (x *fastReflection_MsgWithdrawTunnel) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgWithdrawTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": if x.Amount == nil { x.Amount = []*v1beta1.Coin{} } value := &_MsgWithdrawTunnel_2_list{list: &x.Amount} return protoreflect.ValueOfList(value) - case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) - case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": - panic(fmt.Errorf("field withdrawer of message tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + panic(fmt.Errorf("field withdrawer of message band.tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) } } @@ -6028,18 +6028,18 @@ func (x *fastReflection_MsgWithdrawTunnel) Mutable(fd protoreflect.FieldDescript // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgWithdrawTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": list := []*v1beta1.Coin{} return protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{list: &list}) - case "tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) } } @@ -6049,7 +6049,7 @@ func (x *fastReflection_MsgWithdrawTunnel) NewField(fd protoreflect.FieldDescrip func (x *fastReflection_MsgWithdrawTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgWithdrawTunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgWithdrawTunnel", d.FullName())) } panic("unreachable") } @@ -6348,8 +6348,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgWithdrawTunnelResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnelResponse") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgWithdrawTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnelResponse") } var _ protoreflect.Message = (*fastReflection_MsgWithdrawTunnelResponse)(nil) @@ -6361,7 +6361,7 @@ func (x *MsgWithdrawTunnelResponse) ProtoReflect() protoreflect.Message { } func (x *MsgWithdrawTunnelResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[13] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6434,9 +6434,9 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Has(fd protoreflect.FieldDesc switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6450,9 +6450,9 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Clear(fd protoreflect.FieldDe switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6466,9 +6466,9 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Get(descriptor protoreflect.F switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -6486,9 +6486,9 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Set(fd protoreflect.FieldDesc switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6506,9 +6506,9 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Mutable(fd protoreflect.Field switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6519,9 +6519,9 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) NewField(fd protoreflect.Fiel switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6531,7 +6531,7 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) NewField(fd protoreflect.Fiel func (x *fastReflection_MsgWithdrawTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgWithdrawTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgWithdrawTunnelResponse", d.FullName())) } panic("unreachable") } @@ -6706,8 +6706,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgUpdateParams = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgUpdateParams = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateParams") fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") } @@ -6721,7 +6721,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[14] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6804,15 +6804,15 @@ func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescript // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "tunnel.v1beta1.MsgUpdateParams.authority": + case "band.tunnel.v1beta1.MsgUpdateParams.authority": return x.Authority != "" - case "tunnel.v1beta1.MsgUpdateParams.params": + case "band.tunnel.v1beta1.MsgUpdateParams.params": return x.Params != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -6824,15 +6824,15 @@ func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bo // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "tunnel.v1beta1.MsgUpdateParams.authority": + case "band.tunnel.v1beta1.MsgUpdateParams.authority": x.Authority = "" - case "tunnel.v1beta1.MsgUpdateParams.params": + case "band.tunnel.v1beta1.MsgUpdateParams.params": x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -6844,17 +6844,17 @@ func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "tunnel.v1beta1.MsgUpdateParams.authority": + case "band.tunnel.v1beta1.MsgUpdateParams.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "tunnel.v1beta1.MsgUpdateParams.params": + case "band.tunnel.v1beta1.MsgUpdateParams.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParams does not contain field %s", descriptor.FullName())) } } @@ -6870,15 +6870,15 @@ func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescri // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "tunnel.v1beta1.MsgUpdateParams.authority": + case "band.tunnel.v1beta1.MsgUpdateParams.authority": x.Authority = value.Interface().(string) - case "tunnel.v1beta1.MsgUpdateParams.params": + case "band.tunnel.v1beta1.MsgUpdateParams.params": x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -6894,18 +6894,18 @@ func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, va // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgUpdateParams.params": + case "band.tunnel.v1beta1.MsgUpdateParams.params": if x.Params == nil { x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "tunnel.v1beta1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message tunnel.v1beta1.MsgUpdateParams is not mutable")) + case "band.tunnel.v1beta1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message band.tunnel.v1beta1.MsgUpdateParams is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -6914,16 +6914,16 @@ func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "tunnel.v1beta1.MsgUpdateParams.authority": + case "band.tunnel.v1beta1.MsgUpdateParams.authority": return protoreflect.ValueOfString("") - case "tunnel.v1beta1.MsgUpdateParams.params": + case "band.tunnel.v1beta1.MsgUpdateParams.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParams")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParams does not contain field %s", fd.FullName())) } } @@ -6933,7 +6933,7 @@ func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescripto func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgUpdateParams", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgUpdateParams", d.FullName())) } panic("unreachable") } @@ -7203,8 +7203,8 @@ var ( ) func init() { - file_tunnel_v1beta1_tx_proto_init() - md_MsgUpdateParamsResponse = File_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") + file_band_tunnel_v1beta1_tx_proto_init() + md_MsgUpdateParamsResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) @@ -7216,7 +7216,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[15] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7289,9 +7289,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -7305,9 +7305,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDesc switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -7321,9 +7321,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.Fie switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) } } @@ -7341,9 +7341,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescri switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -7361,9 +7361,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDe switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -7374,9 +7374,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldD switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: tunnel.v1beta1.MsgUpdateParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateParamsResponse")) } - panic(fmt.Errorf("message tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) } } @@ -7386,7 +7386,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldD func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in tunnel.v1beta1.MsgUpdateParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgUpdateParamsResponse", d.FullName())) } panic("unreachable") } @@ -7558,7 +7558,7 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: tunnel/v1beta1/tx.proto +// source: band/tunnel/v1beta1/tx.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -7580,7 +7580,7 @@ type MsgCreateTunnel struct { // route is the route for delivering the signal prices Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.tunnel.v1beta1.Encoder" json:"encoder,omitempty"` // initial_deposit is the deposit value that must be paid at tunnel creation. InitialDeposit []*v1beta1.Coin `protobuf:"bytes,5,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"` // creator is the address of the creator. @@ -7590,7 +7590,7 @@ type MsgCreateTunnel struct { func (x *MsgCreateTunnel) Reset() { *x = MsgCreateTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[0] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7604,7 +7604,7 @@ func (*MsgCreateTunnel) ProtoMessage() {} // Deprecated: Use MsgCreateTunnel.ProtoReflect.Descriptor instead. func (*MsgCreateTunnel) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{0} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgCreateTunnel) GetSignalDeviations() []*SignalDeviation { @@ -7661,7 +7661,7 @@ type MsgCreateTunnelResponse struct { func (x *MsgCreateTunnelResponse) Reset() { *x = MsgCreateTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[1] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7675,7 +7675,7 @@ func (*MsgCreateTunnelResponse) ProtoMessage() {} // Deprecated: Use MsgCreateTunnelResponse.ProtoReflect.Descriptor instead. func (*MsgCreateTunnelResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{1} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{1} } func (x *MsgCreateTunnelResponse) GetTunnelId() uint64 { @@ -7704,7 +7704,7 @@ type MsgEditTunnel struct { func (x *MsgEditTunnel) Reset() { *x = MsgEditTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[2] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7718,7 +7718,7 @@ func (*MsgEditTunnel) ProtoMessage() {} // Deprecated: Use MsgEditTunnel.ProtoReflect.Descriptor instead. func (*MsgEditTunnel) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{2} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{2} } func (x *MsgEditTunnel) GetTunnelId() uint64 { @@ -7759,7 +7759,7 @@ type MsgEditTunnelResponse struct { func (x *MsgEditTunnelResponse) Reset() { *x = MsgEditTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[3] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7773,7 +7773,7 @@ func (*MsgEditTunnelResponse) ProtoMessage() {} // Deprecated: Use MsgEditTunnelResponse.ProtoReflect.Descriptor instead. func (*MsgEditTunnelResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{3} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{3} } // Activate is the transaction message to activate a tunnel. @@ -7791,7 +7791,7 @@ type MsgActivate struct { func (x *MsgActivate) Reset() { *x = MsgActivate{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[4] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7805,7 +7805,7 @@ func (*MsgActivate) ProtoMessage() {} // Deprecated: Use MsgActivate.ProtoReflect.Descriptor instead. func (*MsgActivate) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{4} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgActivate) GetTunnelId() uint64 { @@ -7832,7 +7832,7 @@ type MsgActivateResponse struct { func (x *MsgActivateResponse) Reset() { *x = MsgActivateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[5] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7846,7 +7846,7 @@ func (*MsgActivateResponse) ProtoMessage() {} // Deprecated: Use MsgActivateResponse.ProtoReflect.Descriptor instead. func (*MsgActivateResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{5} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{5} } // MsgDeactivate is the transaction message to deactivate a tunnel. @@ -7864,7 +7864,7 @@ type MsgDeactivate struct { func (x *MsgDeactivate) Reset() { *x = MsgDeactivate{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7878,7 +7878,7 @@ func (*MsgDeactivate) ProtoMessage() {} // Deprecated: Use MsgDeactivate.ProtoReflect.Descriptor instead. func (*MsgDeactivate) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{6} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgDeactivate) GetTunnelId() uint64 { @@ -7905,7 +7905,7 @@ type MsgDeactivateResponse struct { func (x *MsgDeactivateResponse) Reset() { *x = MsgDeactivateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7919,7 +7919,7 @@ func (*MsgDeactivateResponse) ProtoMessage() {} // Deprecated: Use MsgDeactivateResponse.ProtoReflect.Descriptor instead. func (*MsgDeactivateResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{7} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{7} } // MsgTriggerTunnel is the transaction message to manually trigger a tunnel. @@ -7937,7 +7937,7 @@ type MsgTriggerTunnel struct { func (x *MsgTriggerTunnel) Reset() { *x = MsgTriggerTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[8] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7951,7 +7951,7 @@ func (*MsgTriggerTunnel) ProtoMessage() {} // Deprecated: Use MsgTriggerTunnel.ProtoReflect.Descriptor instead. func (*MsgTriggerTunnel) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{8} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgTriggerTunnel) GetTunnelId() uint64 { @@ -7978,7 +7978,7 @@ type MsgTriggerTunnelResponse struct { func (x *MsgTriggerTunnelResponse) Reset() { *x = MsgTriggerTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[9] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7992,7 +7992,7 @@ func (*MsgTriggerTunnelResponse) ProtoMessage() {} // Deprecated: Use MsgTriggerTunnelResponse.ProtoReflect.Descriptor instead. func (*MsgTriggerTunnelResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{9} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{9} } // MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. @@ -8012,7 +8012,7 @@ type MsgDepositTunnel struct { func (x *MsgDepositTunnel) Reset() { *x = MsgDepositTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[10] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8026,7 +8026,7 @@ func (*MsgDepositTunnel) ProtoMessage() {} // Deprecated: Use MsgDepositTunnel.ProtoReflect.Descriptor instead. func (*MsgDepositTunnel) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{10} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{10} } func (x *MsgDepositTunnel) GetTunnelId() uint64 { @@ -8060,7 +8060,7 @@ type MsgDepositTunnelResponse struct { func (x *MsgDepositTunnelResponse) Reset() { *x = MsgDepositTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[11] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8074,7 +8074,7 @@ func (*MsgDepositTunnelResponse) ProtoMessage() {} // Deprecated: Use MsgDepositTunnelResponse.ProtoReflect.Descriptor instead. func (*MsgDepositTunnelResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{11} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{11} } // MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. @@ -8094,7 +8094,7 @@ type MsgWithdrawTunnel struct { func (x *MsgWithdrawTunnel) Reset() { *x = MsgWithdrawTunnel{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[12] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8108,7 +8108,7 @@ func (*MsgWithdrawTunnel) ProtoMessage() {} // Deprecated: Use MsgWithdrawTunnel.ProtoReflect.Descriptor instead. func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{12} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{12} } func (x *MsgWithdrawTunnel) GetTunnelId() uint64 { @@ -8142,7 +8142,7 @@ type MsgWithdrawTunnelResponse struct { func (x *MsgWithdrawTunnelResponse) Reset() { *x = MsgWithdrawTunnelResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[13] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8156,7 +8156,7 @@ func (*MsgWithdrawTunnelResponse) ProtoMessage() {} // Deprecated: Use MsgWithdrawTunnelResponse.ProtoReflect.Descriptor instead. func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{13} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{13} } // MsgUpdateParams is the transaction message to update parameters. @@ -8174,7 +8174,7 @@ type MsgUpdateParams struct { func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[14] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8188,7 +8188,7 @@ func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{14} + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{14} } func (x *MsgUpdateParams) GetAuthority() string { @@ -8215,7 +8215,7 @@ type MsgUpdateParamsResponse struct { func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_tunnel_v1beta1_tx_proto_msgTypes[15] + mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8229,113 +8229,135 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{15} -} - -var File_tunnel_v1beta1_tx_proto protoreflect.FileDescriptor - -var file_tunnel_v1beta1_tx_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 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, 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, 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, 0x11, 0x61, 0x6d, 0x69, - 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x03, 0x0a, 0x0f, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, - 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, - 0x35, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, 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, 0x09, 0xca, 0xb4, 0x2d, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, - 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x0f, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x03, - 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, 0x35, 0xc8, - 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x27, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x22, 0x44, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x09, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x85, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x45, - 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, - 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x64, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, - 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, - 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, - 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, + return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{15} +} + +var File_band_tunnel_v1beta1_tx_proto protoreflect.FileDescriptor + +var file_band_tunnel_v1beta1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 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, 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, + 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, + 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, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, 0x61, 0x6e, + 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, + 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xcd, 0x03, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x57, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x18, 0x03, 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, 0x09, 0xca, + 0xb4, 0x2d, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, + 0x36, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x27, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, + 0x44, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, + 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x8a, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, + 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, + 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, + 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, + 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, + 0x15, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x44, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, 0x13, - 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, - 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, - 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, - 0x02, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x17, + 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x28, 0x82, 0xe7, 0xb0, + 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x9d, 0x02, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x03, 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, 0x35, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, + 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x02, + 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, @@ -8346,168 +8368,156 @@ var file_tunnel_v1beta1_tx_proto_rawDesc = []byte{ 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1a, - 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x4d, - 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, - 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, - 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, - 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, - 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, - 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, - 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x58, 0x0a, 0x0c, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1f, 0x2e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x27, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x1a, 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x1a, 0x23, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0a, 0x44, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x25, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, - 0x28, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x2e, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x28, 0x2e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x29, 0x2e, 0x74, 0x75, + 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x65, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xaf, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa0, 0x06, 0x0a, + 0x03, 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, 0x45, 0x64, 0x69, 0x74, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb9, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, - 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x54, - 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, + 0x0a, 0x0a, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0e, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x26, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, + 0xd8, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, + 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, + 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_tunnel_v1beta1_tx_proto_rawDescOnce sync.Once - file_tunnel_v1beta1_tx_proto_rawDescData = file_tunnel_v1beta1_tx_proto_rawDesc + file_band_tunnel_v1beta1_tx_proto_rawDescOnce sync.Once + file_band_tunnel_v1beta1_tx_proto_rawDescData = file_band_tunnel_v1beta1_tx_proto_rawDesc ) -func file_tunnel_v1beta1_tx_proto_rawDescGZIP() []byte { - file_tunnel_v1beta1_tx_proto_rawDescOnce.Do(func() { - file_tunnel_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_v1beta1_tx_proto_rawDescData) +func file_band_tunnel_v1beta1_tx_proto_rawDescGZIP() []byte { + file_band_tunnel_v1beta1_tx_proto_rawDescOnce.Do(func() { + file_band_tunnel_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_band_tunnel_v1beta1_tx_proto_rawDescData) }) - return file_tunnel_v1beta1_tx_proto_rawDescData -} - -var file_tunnel_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_tunnel_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgCreateTunnel)(nil), // 0: tunnel.v1beta1.MsgCreateTunnel - (*MsgCreateTunnelResponse)(nil), // 1: tunnel.v1beta1.MsgCreateTunnelResponse - (*MsgEditTunnel)(nil), // 2: tunnel.v1beta1.MsgEditTunnel - (*MsgEditTunnelResponse)(nil), // 3: tunnel.v1beta1.MsgEditTunnelResponse - (*MsgActivate)(nil), // 4: tunnel.v1beta1.MsgActivate - (*MsgActivateResponse)(nil), // 5: tunnel.v1beta1.MsgActivateResponse - (*MsgDeactivate)(nil), // 6: tunnel.v1beta1.MsgDeactivate - (*MsgDeactivateResponse)(nil), // 7: tunnel.v1beta1.MsgDeactivateResponse - (*MsgTriggerTunnel)(nil), // 8: tunnel.v1beta1.MsgTriggerTunnel - (*MsgTriggerTunnelResponse)(nil), // 9: tunnel.v1beta1.MsgTriggerTunnelResponse - (*MsgDepositTunnel)(nil), // 10: tunnel.v1beta1.MsgDepositTunnel - (*MsgDepositTunnelResponse)(nil), // 11: tunnel.v1beta1.MsgDepositTunnelResponse - (*MsgWithdrawTunnel)(nil), // 12: tunnel.v1beta1.MsgWithdrawTunnel - (*MsgWithdrawTunnelResponse)(nil), // 13: tunnel.v1beta1.MsgWithdrawTunnelResponse - (*MsgUpdateParams)(nil), // 14: tunnel.v1beta1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 15: tunnel.v1beta1.MsgUpdateParamsResponse - (*SignalDeviation)(nil), // 16: tunnel.v1beta1.SignalDeviation + return file_band_tunnel_v1beta1_tx_proto_rawDescData +} + +var file_band_tunnel_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_band_tunnel_v1beta1_tx_proto_goTypes = []interface{}{ + (*MsgCreateTunnel)(nil), // 0: band.tunnel.v1beta1.MsgCreateTunnel + (*MsgCreateTunnelResponse)(nil), // 1: band.tunnel.v1beta1.MsgCreateTunnelResponse + (*MsgEditTunnel)(nil), // 2: band.tunnel.v1beta1.MsgEditTunnel + (*MsgEditTunnelResponse)(nil), // 3: band.tunnel.v1beta1.MsgEditTunnelResponse + (*MsgActivate)(nil), // 4: band.tunnel.v1beta1.MsgActivate + (*MsgActivateResponse)(nil), // 5: band.tunnel.v1beta1.MsgActivateResponse + (*MsgDeactivate)(nil), // 6: band.tunnel.v1beta1.MsgDeactivate + (*MsgDeactivateResponse)(nil), // 7: band.tunnel.v1beta1.MsgDeactivateResponse + (*MsgTriggerTunnel)(nil), // 8: band.tunnel.v1beta1.MsgTriggerTunnel + (*MsgTriggerTunnelResponse)(nil), // 9: band.tunnel.v1beta1.MsgTriggerTunnelResponse + (*MsgDepositTunnel)(nil), // 10: band.tunnel.v1beta1.MsgDepositTunnel + (*MsgDepositTunnelResponse)(nil), // 11: band.tunnel.v1beta1.MsgDepositTunnelResponse + (*MsgWithdrawTunnel)(nil), // 12: band.tunnel.v1beta1.MsgWithdrawTunnel + (*MsgWithdrawTunnelResponse)(nil), // 13: band.tunnel.v1beta1.MsgWithdrawTunnelResponse + (*MsgUpdateParams)(nil), // 14: band.tunnel.v1beta1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 15: band.tunnel.v1beta1.MsgUpdateParamsResponse + (*SignalDeviation)(nil), // 16: band.tunnel.v1beta1.SignalDeviation (*anypb.Any)(nil), // 17: google.protobuf.Any - (Encoder)(0), // 18: tunnel.v1beta1.Encoder + (Encoder)(0), // 18: band.tunnel.v1beta1.Encoder (*v1beta1.Coin)(nil), // 19: cosmos.base.v1beta1.Coin - (*Params)(nil), // 20: tunnel.v1beta1.Params -} -var file_tunnel_v1beta1_tx_proto_depIdxs = []int32{ - 16, // 0: tunnel.v1beta1.MsgCreateTunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation - 17, // 1: tunnel.v1beta1.MsgCreateTunnel.route:type_name -> google.protobuf.Any - 18, // 2: tunnel.v1beta1.MsgCreateTunnel.encoder:type_name -> tunnel.v1beta1.Encoder - 19, // 3: tunnel.v1beta1.MsgCreateTunnel.initial_deposit:type_name -> cosmos.base.v1beta1.Coin - 16, // 4: tunnel.v1beta1.MsgEditTunnel.signal_deviations:type_name -> tunnel.v1beta1.SignalDeviation - 19, // 5: tunnel.v1beta1.MsgDepositTunnel.amount:type_name -> cosmos.base.v1beta1.Coin - 19, // 6: tunnel.v1beta1.MsgWithdrawTunnel.amount:type_name -> cosmos.base.v1beta1.Coin - 20, // 7: tunnel.v1beta1.MsgUpdateParams.params:type_name -> tunnel.v1beta1.Params - 0, // 8: tunnel.v1beta1.Msg.CreateTunnel:input_type -> tunnel.v1beta1.MsgCreateTunnel - 2, // 9: tunnel.v1beta1.Msg.EditTunnel:input_type -> tunnel.v1beta1.MsgEditTunnel - 4, // 10: tunnel.v1beta1.Msg.Activate:input_type -> tunnel.v1beta1.MsgActivate - 6, // 11: tunnel.v1beta1.Msg.Deactivate:input_type -> tunnel.v1beta1.MsgDeactivate - 8, // 12: tunnel.v1beta1.Msg.TriggerTunnel:input_type -> tunnel.v1beta1.MsgTriggerTunnel - 10, // 13: tunnel.v1beta1.Msg.DepositTunnel:input_type -> tunnel.v1beta1.MsgDepositTunnel - 12, // 14: tunnel.v1beta1.Msg.WithdrawTunnel:input_type -> tunnel.v1beta1.MsgWithdrawTunnel - 14, // 15: tunnel.v1beta1.Msg.UpdateParams:input_type -> tunnel.v1beta1.MsgUpdateParams - 1, // 16: tunnel.v1beta1.Msg.CreateTunnel:output_type -> tunnel.v1beta1.MsgCreateTunnelResponse - 3, // 17: tunnel.v1beta1.Msg.EditTunnel:output_type -> tunnel.v1beta1.MsgEditTunnelResponse - 5, // 18: tunnel.v1beta1.Msg.Activate:output_type -> tunnel.v1beta1.MsgActivateResponse - 7, // 19: tunnel.v1beta1.Msg.Deactivate:output_type -> tunnel.v1beta1.MsgDeactivateResponse - 9, // 20: tunnel.v1beta1.Msg.TriggerTunnel:output_type -> tunnel.v1beta1.MsgTriggerTunnelResponse - 11, // 21: tunnel.v1beta1.Msg.DepositTunnel:output_type -> tunnel.v1beta1.MsgDepositTunnelResponse - 13, // 22: tunnel.v1beta1.Msg.WithdrawTunnel:output_type -> tunnel.v1beta1.MsgWithdrawTunnelResponse - 15, // 23: tunnel.v1beta1.Msg.UpdateParams:output_type -> tunnel.v1beta1.MsgUpdateParamsResponse + (*Params)(nil), // 20: band.tunnel.v1beta1.Params +} +var file_band_tunnel_v1beta1_tx_proto_depIdxs = []int32{ + 16, // 0: band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation + 17, // 1: band.tunnel.v1beta1.MsgCreateTunnel.route:type_name -> google.protobuf.Any + 18, // 2: band.tunnel.v1beta1.MsgCreateTunnel.encoder:type_name -> band.tunnel.v1beta1.Encoder + 19, // 3: band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit:type_name -> cosmos.base.v1beta1.Coin + 16, // 4: band.tunnel.v1beta1.MsgEditTunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation + 19, // 5: band.tunnel.v1beta1.MsgDepositTunnel.amount:type_name -> cosmos.base.v1beta1.Coin + 19, // 6: band.tunnel.v1beta1.MsgWithdrawTunnel.amount:type_name -> cosmos.base.v1beta1.Coin + 20, // 7: band.tunnel.v1beta1.MsgUpdateParams.params:type_name -> band.tunnel.v1beta1.Params + 0, // 8: band.tunnel.v1beta1.Msg.CreateTunnel:input_type -> band.tunnel.v1beta1.MsgCreateTunnel + 2, // 9: band.tunnel.v1beta1.Msg.EditTunnel:input_type -> band.tunnel.v1beta1.MsgEditTunnel + 4, // 10: band.tunnel.v1beta1.Msg.Activate:input_type -> band.tunnel.v1beta1.MsgActivate + 6, // 11: band.tunnel.v1beta1.Msg.Deactivate:input_type -> band.tunnel.v1beta1.MsgDeactivate + 8, // 12: band.tunnel.v1beta1.Msg.TriggerTunnel:input_type -> band.tunnel.v1beta1.MsgTriggerTunnel + 10, // 13: band.tunnel.v1beta1.Msg.DepositTunnel:input_type -> band.tunnel.v1beta1.MsgDepositTunnel + 12, // 14: band.tunnel.v1beta1.Msg.WithdrawTunnel:input_type -> band.tunnel.v1beta1.MsgWithdrawTunnel + 14, // 15: band.tunnel.v1beta1.Msg.UpdateParams:input_type -> band.tunnel.v1beta1.MsgUpdateParams + 1, // 16: band.tunnel.v1beta1.Msg.CreateTunnel:output_type -> band.tunnel.v1beta1.MsgCreateTunnelResponse + 3, // 17: band.tunnel.v1beta1.Msg.EditTunnel:output_type -> band.tunnel.v1beta1.MsgEditTunnelResponse + 5, // 18: band.tunnel.v1beta1.Msg.Activate:output_type -> band.tunnel.v1beta1.MsgActivateResponse + 7, // 19: band.tunnel.v1beta1.Msg.Deactivate:output_type -> band.tunnel.v1beta1.MsgDeactivateResponse + 9, // 20: band.tunnel.v1beta1.Msg.TriggerTunnel:output_type -> band.tunnel.v1beta1.MsgTriggerTunnelResponse + 11, // 21: band.tunnel.v1beta1.Msg.DepositTunnel:output_type -> band.tunnel.v1beta1.MsgDepositTunnelResponse + 13, // 22: band.tunnel.v1beta1.Msg.WithdrawTunnel:output_type -> band.tunnel.v1beta1.MsgWithdrawTunnelResponse + 15, // 23: band.tunnel.v1beta1.Msg.UpdateParams:output_type -> band.tunnel.v1beta1.MsgUpdateParamsResponse 16, // [16:24] is the sub-list for method output_type 8, // [8:16] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -8515,15 +8525,15 @@ var file_tunnel_v1beta1_tx_proto_depIdxs = []int32{ 0, // [0:8] is the sub-list for field type_name } -func init() { file_tunnel_v1beta1_tx_proto_init() } -func file_tunnel_v1beta1_tx_proto_init() { - if File_tunnel_v1beta1_tx_proto != nil { +func init() { file_band_tunnel_v1beta1_tx_proto_init() } +func file_band_tunnel_v1beta1_tx_proto_init() { + if File_band_tunnel_v1beta1_tx_proto != nil { return } - file_tunnel_v1beta1_params_proto_init() - file_tunnel_v1beta1_tunnel_proto_init() + file_band_tunnel_v1beta1_params_proto_init() + file_band_tunnel_v1beta1_tunnel_proto_init() if !protoimpl.UnsafeEnabled { - file_tunnel_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreateTunnel); i { case 0: return &v.state @@ -8535,7 +8545,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreateTunnelResponse); i { case 0: return &v.state @@ -8547,7 +8557,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgEditTunnel); i { case 0: return &v.state @@ -8559,7 +8569,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgEditTunnelResponse); i { case 0: return &v.state @@ -8571,7 +8581,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgActivate); i { case 0: return &v.state @@ -8583,7 +8593,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgActivateResponse); i { case 0: return &v.state @@ -8595,7 +8605,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgDeactivate); i { case 0: return &v.state @@ -8607,7 +8617,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgDeactivateResponse); i { case 0: return &v.state @@ -8619,7 +8629,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgTriggerTunnel); i { case 0: return &v.state @@ -8631,7 +8641,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgTriggerTunnelResponse); i { case 0: return &v.state @@ -8643,7 +8653,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgDepositTunnel); i { case 0: return &v.state @@ -8655,7 +8665,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgDepositTunnelResponse); i { case 0: return &v.state @@ -8667,7 +8677,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgWithdrawTunnel); i { case 0: return &v.state @@ -8679,7 +8689,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgWithdrawTunnelResponse); i { case 0: return &v.state @@ -8691,7 +8701,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { case 0: return &v.state @@ -8703,7 +8713,7 @@ func file_tunnel_v1beta1_tx_proto_init() { return nil } } - file_tunnel_v1beta1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state @@ -8720,18 +8730,18 @@ func file_tunnel_v1beta1_tx_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_tunnel_v1beta1_tx_proto_rawDesc, + RawDescriptor: file_band_tunnel_v1beta1_tx_proto_rawDesc, NumEnums: 0, NumMessages: 16, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_tunnel_v1beta1_tx_proto_goTypes, - DependencyIndexes: file_tunnel_v1beta1_tx_proto_depIdxs, - MessageInfos: file_tunnel_v1beta1_tx_proto_msgTypes, + GoTypes: file_band_tunnel_v1beta1_tx_proto_goTypes, + DependencyIndexes: file_band_tunnel_v1beta1_tx_proto_depIdxs, + MessageInfos: file_band_tunnel_v1beta1_tx_proto_msgTypes, }.Build() - File_tunnel_v1beta1_tx_proto = out.File - file_tunnel_v1beta1_tx_proto_rawDesc = nil - file_tunnel_v1beta1_tx_proto_goTypes = nil - file_tunnel_v1beta1_tx_proto_depIdxs = nil + File_band_tunnel_v1beta1_tx_proto = out.File + file_band_tunnel_v1beta1_tx_proto_rawDesc = nil + file_band_tunnel_v1beta1_tx_proto_goTypes = nil + file_band_tunnel_v1beta1_tx_proto_depIdxs = nil } diff --git a/api/tunnel/v1beta1/tx_grpc.pb.go b/api/band/tunnel/v1beta1/tx_grpc.pb.go similarity index 95% rename from api/tunnel/v1beta1/tx_grpc.pb.go rename to api/band/tunnel/v1beta1/tx_grpc.pb.go index 998a3b664..8fd375786 100644 --- a/api/tunnel/v1beta1/tx_grpc.pb.go +++ b/api/band/tunnel/v1beta1/tx_grpc.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) -// source: tunnel/v1beta1/tx.proto +// source: band/tunnel/v1beta1/tx.proto package tunnelv1beta1 @@ -19,14 +19,14 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_CreateTunnel_FullMethodName = "/tunnel.v1beta1.Msg/CreateTunnel" - Msg_EditTunnel_FullMethodName = "/tunnel.v1beta1.Msg/EditTunnel" - Msg_Activate_FullMethodName = "/tunnel.v1beta1.Msg/Activate" - Msg_Deactivate_FullMethodName = "/tunnel.v1beta1.Msg/Deactivate" - Msg_TriggerTunnel_FullMethodName = "/tunnel.v1beta1.Msg/TriggerTunnel" - Msg_DepositTunnel_FullMethodName = "/tunnel.v1beta1.Msg/DepositTunnel" - Msg_WithdrawTunnel_FullMethodName = "/tunnel.v1beta1.Msg/WithdrawTunnel" - Msg_UpdateParams_FullMethodName = "/tunnel.v1beta1.Msg/UpdateParams" + Msg_CreateTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/CreateTunnel" + Msg_EditTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/EditTunnel" + Msg_Activate_FullMethodName = "/band.tunnel.v1beta1.Msg/Activate" + Msg_Deactivate_FullMethodName = "/band.tunnel.v1beta1.Msg/Deactivate" + Msg_TriggerTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/TriggerTunnel" + Msg_DepositTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/DepositTunnel" + Msg_WithdrawTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/WithdrawTunnel" + Msg_UpdateParams_FullMethodName = "/band.tunnel.v1beta1.Msg/UpdateParams" ) // MsgClient is the client API for Msg service. @@ -343,7 +343,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "tunnel.v1beta1.Msg", + ServiceName: "band.tunnel.v1beta1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -380,5 +380,5 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "tunnel/v1beta1/tx.proto", + Metadata: "band/tunnel/v1beta1/tx.proto", } diff --git a/proto/tunnel/v1beta1/genesis.proto b/proto/band/tunnel/v1beta1/genesis.proto similarity index 88% rename from proto/tunnel/v1beta1/genesis.proto rename to proto/band/tunnel/v1beta1/genesis.proto index 5d66ecdaa..a5c9fe1de 100644 --- a/proto/tunnel/v1beta1/genesis.proto +++ b/proto/band/tunnel/v1beta1/genesis.proto @@ -1,11 +1,12 @@ syntax = "proto3"; -package tunnel.v1beta1; +package band.tunnel.v1beta1; option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; import "gogoproto/gogo.proto"; -import "tunnel/v1beta1/params.proto"; -import "tunnel/v1beta1/tunnel.proto"; + +import "band/tunnel/v1beta1/params.proto"; +import "band/tunnel/v1beta1/tunnel.proto"; // GenesisState represents the initial state of the blockchain. message GenesisState { diff --git a/proto/tunnel/v1beta1/params.proto b/proto/band/tunnel/v1beta1/params.proto similarity index 97% rename from proto/tunnel/v1beta1/params.proto rename to proto/band/tunnel/v1beta1/params.proto index b49b035b6..096ee6fa1 100644 --- a/proto/tunnel/v1beta1/params.proto +++ b/proto/band/tunnel/v1beta1/params.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package tunnel.v1beta1; +package band.tunnel.v1beta1; option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; diff --git a/proto/tunnel/v1beta1/query.proto b/proto/band/tunnel/v1beta1/query.proto similarity index 98% rename from proto/tunnel/v1beta1/query.proto rename to proto/band/tunnel/v1beta1/query.proto index 461c1f2d9..0f04cadbc 100644 --- a/proto/tunnel/v1beta1/query.proto +++ b/proto/band/tunnel/v1beta1/query.proto @@ -1,13 +1,14 @@ syntax = "proto3"; -package tunnel.v1beta1; +package band.tunnel.v1beta1; option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; -import "tunnel/v1beta1/params.proto"; -import "tunnel/v1beta1/tunnel.proto"; + +import "band/tunnel/v1beta1/params.proto"; +import "band/tunnel/v1beta1/tunnel.proto"; // Query service defines the gRPC querier service. service Query { diff --git a/proto/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto similarity index 98% rename from proto/tunnel/v1beta1/tunnel.proto rename to proto/band/tunnel/v1beta1/tunnel.proto index b28f792c5..364d9fcaf 100644 --- a/proto/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package tunnel.v1beta1; +package band.tunnel.v1beta1; import "amino/amino.proto"; import "cosmos/base/v1beta1/coin.proto"; @@ -7,7 +7,7 @@ import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -import "feeds/v1beta1/feeds.proto"; +import "band/feeds/v1beta1/feeds.proto"; option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; option (gogoproto.equal_all) = true; diff --git a/proto/tunnel/v1beta1/tx.proto b/proto/band/tunnel/v1beta1/tx.proto similarity index 98% rename from proto/tunnel/v1beta1/tx.proto rename to proto/band/tunnel/v1beta1/tx.proto index 417532ca3..37f96e463 100644 --- a/proto/tunnel/v1beta1/tx.proto +++ b/proto/band/tunnel/v1beta1/tx.proto @@ -1,17 +1,17 @@ syntax = "proto3"; -package tunnel.v1beta1; +package band.tunnel.v1beta1; option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; -import "tunnel/v1beta1/params.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; -import "tunnel/v1beta1/tunnel.proto"; +import "band/tunnel/v1beta1/params.proto"; +import "band/tunnel/v1beta1/tunnel.proto"; // Service definition for Msg. service Msg { diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index 3f3f2f2b2..e0550b6a7 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: tunnel/v1beta1/genesis.proto +// source: band/tunnel/v1beta1/genesis.proto package types @@ -43,7 +43,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_cb87d9373a74da2e, []int{0} + return fileDescriptor_e920a50d5f95d889, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -115,35 +115,36 @@ func (m *GenesisState) GetTotalFees() TotalFees { } func init() { - proto.RegisterType((*GenesisState)(nil), "tunnel.v1beta1.GenesisState") + proto.RegisterType((*GenesisState)(nil), "band.tunnel.v1beta1.GenesisState") } -func init() { proto.RegisterFile("tunnel/v1beta1/genesis.proto", fileDescriptor_cb87d9373a74da2e) } +func init() { proto.RegisterFile("band/tunnel/v1beta1/genesis.proto", fileDescriptor_e920a50d5f95d889) } -var fileDescriptor_cb87d9373a74da2e = []byte{ - // 351 bytes of a gzipped FileDescriptorProto - 0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x66, 0xa9, 0xfc, 0x7c, 0x3d, 0xff, 0x5b, 0xf9, 0x41, - 0x2f, 0x6d, 0xf9, 0x5b, 0xf6, 0x12, 0x54, 0xe5, 0x04, 0xa8, 0x82, 0x48, 0xb1, 0x54, 0x10, 0x1e, - 0x65, 0x63, 0x96, 0x50, 0x15, 0x71, 0xa6, 0xc0, 0x2f, 0xe8, 0x52, 0x63, 0xb3, 0xd4, 0xd1, 0x1b, - 0xfa, 0xda, 0xef, 0x6a, 0xdd, 0x56, 0x2b, 0x7c, 0x8b, 0x74, 0x98, 0x02, 0xef, 0x02, 0xed, 0x0c, - 0x68, 0x26, 0x15, 0x03, 0xe5, 0xff, 0xd3, 0xcd, 0x83, 0xcd, 0xe6, 0x8d, 0xe1, 0x36, 0xb4, 0xd6, - 0xbd, 0x4b, 0x84, 0x40, 0x02, 0xe1, 0xd1, 0x13, 0xa5, 0xca, 0x2f, 0xea, 0x9f, 0x56, 0xdd, 0xfa, - 0xb4, 0x95, 0x71, 0x4b, 0xd7, 0xe7, 0xd8, 0x85, 0xf5, 0xe0, 0x7e, 0xb6, 0x08, 0xdc, 0xf9, 0x22, - 0x70, 0x3f, 0x16, 0x81, 0xfb, 0xba, 0x0c, 0x9c, 0xf9, 0x32, 0x70, 0xde, 0x96, 0x81, 0xf3, 0x88, - 0x53, 0x06, 0xc3, 0x49, 0x1c, 0x26, 0x72, 0x84, 0x63, 0x22, 0x06, 0xfa, 0xc6, 0x12, 0xc9, 0x71, - 0x32, 0x24, 0x4c, 0xe0, 0x69, 0x1b, 0x3f, 0xdb, 0xcb, 0xc4, 0xf0, 0x92, 0x51, 0x15, 0x17, 0xb5, - 0xd1, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x61, 0xda, 0x98, 0xcc, 0x53, 0x02, 0x00, 0x00, +var fileDescriptor_e920a50d5f95d889 = []byte{ + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,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, + 0x8f, 0x2d, 0xb5, 0x5f, 0x09, 0x2a, 0xdf, 0xea, 0xef, 0x4d, 0x59, 0xe8, 0xb7, 0x09, 0x6f, 0x82, + 0x0e, 0x04, 0x05, 0xa6, 0x21, 0xd2, 0x3c, 0x95, 0x54, 0x44, 0xd9, 0x8c, 0x27, 0x4c, 0x47, 0x82, + 0x6b, 0xf0, 0xab, 0x46, 0x77, 0x5a, 0xaa, 0xeb, 0x9b, 0xd4, 0xc8, 0x84, 0x06, 0x26, 0x53, 0xa8, + 0xf7, 0xc5, 0x97, 0x49, 0x9f, 0x6b, 0xf0, 0x2e, 0xd1, 0xdf, 0x31, 0xcb, 0x94, 0xe6, 0xa0, 0xfd, + 0xdf, 0x46, 0x7c, 0x54, 0x2a, 0xbe, 0xb6, 0x50, 0x61, 0xdb, 0x65, 0xbc, 0x1e, 0x42, 0xa0, 0x80, + 0x8a, 0xe8, 0x91, 0x31, 0xed, 0xd7, 0xcc, 0x43, 0xe2, 0xf2, 0x3f, 0xcd, 0xb1, 0x1b, 0xb6, 0xdb, + 0xe8, 0x1f, 0xec, 0x1a, 0x77, 0xcb, 0x35, 0x76, 0x57, 0x6b, 0xec, 0x7e, 0xac, 0xb1, 0xfb, 0xb2, + 0xc1, 0xce, 0x6a, 0x83, 0x9d, 0xb7, 0x0d, 0x76, 0x1e, 0x48, 0xca, 0x61, 0x32, 0x8f, 0xc3, 0x44, + 0x4d, 0x49, 0x2e, 0x35, 0xa7, 0x4c, 0x94, 0x20, 0xc9, 0x84, 0x72, 0x49, 0x16, 0x5d, 0xf2, 0xb4, + 0x3d, 0x3a, 0x3c, 0x67, 0x4c, 0xc7, 0x35, 0x43, 0x74, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x12, + 0xa8, 0xd1, 0xca, 0x80, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 105852f02..624410038 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: tunnel/v1beta1/params.proto +// source: band/tunnel/v1beta1/params.proto package types @@ -40,7 +40,7 @@ type Params struct { func (m *Params) Reset() { *m = Params{} } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_a7b5eedd244355eb, []int{0} + return fileDescriptor_842b3bf03f22bf82, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -98,34 +98,35 @@ func (m *Params) GetBasePacketFee() github_com_cosmos_cosmos_sdk_types.Coins { } func init() { - proto.RegisterType((*Params)(nil), "tunnel.v1beta1.Params") + proto.RegisterType((*Params)(nil), "band.tunnel.v1beta1.Params") } -func init() { proto.RegisterFile("tunnel/v1beta1/params.proto", fileDescriptor_a7b5eedd244355eb) } +func init() { proto.RegisterFile("band/tunnel/v1beta1/params.proto", fileDescriptor_842b3bf03f22bf82) } -var fileDescriptor_a7b5eedd244355eb = []byte{ - // 335 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x31, 0x4e, 0xf3, 0x30, - 0x1c, 0xc5, 0x93, 0xb6, 0xaa, 0x3e, 0xb9, 0x1f, 0x20, 0x45, 0x0c, 0xa1, 0x48, 0x4e, 0x61, 0xea, - 0x42, 0x4c, 0xe9, 0xc6, 0x58, 0x10, 0x52, 0xb7, 0xaa, 0x6c, 0x2c, 0x91, 0xe3, 0x9a, 0xd4, 0x6a, - 0x6c, 0x47, 0xb5, 0x5b, 0x95, 0x5b, 0x30, 0x32, 0x76, 0xe6, 0x06, 0xdc, 0xa0, 0x63, 0x47, 0x26, - 0x40, 0xcd, 0xc2, 0x31, 0x90, 0xed, 0x80, 0x38, 0x00, 0x93, 0xad, 0xff, 0x7b, 0xfe, 0xbd, 0x27, - 0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x43, 0xe9, 0xe5, 0xbf, 0xa7, 0x75, 0xe4, 0x7d, 0xae, - 0x23, 0x7f, 0x30, 0xdc, 0xec, 0xa0, 0xbf, 0xdd, 0x41, 0xff, 0x63, 0x07, 0xfd, 0xc7, 0x12, 0x7a, - 0xdb, 0x12, 0x7a, 0xaf, 0x25, 0xf4, 0xee, 0xd0, 0x2f, 0x78, 0x8a, 0xc5, 0xc4, 0xfe, 0x35, 0x91, - 0x39, 0x22, 0x53, 0xcc, 0x04, 0x5a, 0xf6, 0xd1, 0x0a, 0x55, 0xbb, 0xb5, 0x49, 0x69, 0xd3, 0x3a, - 0xfa, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0x31, 0xe2, 0xbc, 0xf2, 0x01, 0x00, 0x00, +var fileDescriptor_842b3bf03f22bf82 = []byte{ + // 338 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x31, 0x4f, 0x32, 0x31, + 0x18, 0xc7, 0xef, 0x80, 0x90, 0x37, 0xe5, 0x35, 0x26, 0xa7, 0xc3, 0xc9, 0xd0, 0x43, 0x27, 0x16, + 0x5b, 0x91, 0xcd, 0x11, 0x8d, 0x09, 0x1b, 0xc1, 0xcd, 0xe5, 0xd2, 0x2b, 0xf5, 0x68, 0xb8, 0xb6, + 0x17, 0x5a, 0x08, 0x7e, 0x0b, 0x47, 0x47, 0x66, 0xbf, 0x81, 0xdf, 0x80, 0x91, 0xd1, 0x49, 0x0d, + 0x2c, 0x7e, 0x0c, 0xd3, 0x16, 0x8c, 0x1f, 0xc0, 0xa9, 0xcd, 0xf3, 0xfc, 0xfa, 0xfb, 0x3f, 0xe9, + 0x03, 0x5a, 0x19, 0x91, 0x23, 0x6c, 0x66, 0x52, 0xb2, 0x02, 0xcf, 0x3b, 0x19, 0x33, 0xa4, 0x83, + 0x4b, 0x32, 0x25, 0x42, 0xa3, 0x72, 0xaa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0x1b, 0x18, 0x7e, 0x6e, + 0x60, 0xf8, 0xb4, 0x85, 0xc1, 0x7a, 0x0b, 0x83, 0xb7, 0x2d, 0x0c, 0xee, 0xf1, 0x2f, 0xb9, 0xdd, + 0x95, 0xfb, 0x6b, 0xaa, 0x0a, 0x4c, 0xc7, 0x84, 0x4b, 0x3c, 0xef, 0xe2, 0xc5, 0x7e, 0xc1, 0x2e, + 0x29, 0xab, 0x3b, 0xa2, 0xfb, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x49, 0xf4, 0xe8, 0xfc, 0x01, + 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/tunnel/types/query.pb.go b/x/tunnel/types/query.pb.go index d41e809de..73aa0786e 100644 --- a/x/tunnel/types/query.pb.go +++ b/x/tunnel/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: tunnel/v1beta1/query.proto +// source: band/tunnel/v1beta1/query.proto package types @@ -59,13 +59,13 @@ func (x TunnelStatusFilter) String() string { } func (TunnelStatusFilter) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{0} + return fileDescriptor_f80b85392d1440ac, []int{0} } // QueryTunnelsRequest is the request type for the Query/Tunnels RPC method. type QueryTunnelsRequest struct { // status_filter is a flag to filter tunnels by status. - StatusFilter TunnelStatusFilter `protobuf:"varint,1,opt,name=status_filter,json=statusFilter,proto3,enum=tunnel.v1beta1.TunnelStatusFilter" json:"status_filter,omitempty"` + StatusFilter TunnelStatusFilter `protobuf:"varint,1,opt,name=status_filter,json=statusFilter,proto3,enum=band.tunnel.v1beta1.TunnelStatusFilter" json:"status_filter,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -74,7 +74,7 @@ func (m *QueryTunnelsRequest) Reset() { *m = QueryTunnelsRequest{} } func (m *QueryTunnelsRequest) String() string { return proto.CompactTextString(m) } func (*QueryTunnelsRequest) ProtoMessage() {} func (*QueryTunnelsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{0} + return fileDescriptor_f80b85392d1440ac, []int{0} } func (m *QueryTunnelsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -129,7 +129,7 @@ func (m *QueryTunnelsResponse) Reset() { *m = QueryTunnelsResponse{} } func (m *QueryTunnelsResponse) String() string { return proto.CompactTextString(m) } func (*QueryTunnelsResponse) ProtoMessage() {} func (*QueryTunnelsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{1} + return fileDescriptor_f80b85392d1440ac, []int{1} } func (m *QueryTunnelsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -182,7 +182,7 @@ func (m *QueryTunnelRequest) Reset() { *m = QueryTunnelRequest{} } func (m *QueryTunnelRequest) String() string { return proto.CompactTextString(m) } func (*QueryTunnelRequest) ProtoMessage() {} func (*QueryTunnelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{2} + return fileDescriptor_f80b85392d1440ac, []int{2} } func (m *QueryTunnelRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -228,7 +228,7 @@ func (m *QueryTunnelResponse) Reset() { *m = QueryTunnelResponse{} } func (m *QueryTunnelResponse) String() string { return proto.CompactTextString(m) } func (*QueryTunnelResponse) ProtoMessage() {} func (*QueryTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{3} + return fileDescriptor_f80b85392d1440ac, []int{3} } func (m *QueryTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -276,7 +276,7 @@ func (m *QueryDepositsRequest) Reset() { *m = QueryDepositsRequest{} } func (m *QueryDepositsRequest) String() string { return proto.CompactTextString(m) } func (*QueryDepositsRequest) ProtoMessage() {} func (*QueryDepositsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{4} + return fileDescriptor_f80b85392d1440ac, []int{4} } func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ func (m *QueryDepositsResponse) Reset() { *m = QueryDepositsResponse{} } func (m *QueryDepositsResponse) String() string { return proto.CompactTextString(m) } func (*QueryDepositsResponse) ProtoMessage() {} func (*QueryDepositsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{5} + return fileDescriptor_f80b85392d1440ac, []int{5} } func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ func (m *QueryDepositRequest) Reset() { *m = QueryDepositRequest{} } func (m *QueryDepositRequest) String() string { return proto.CompactTextString(m) } func (*QueryDepositRequest) ProtoMessage() {} func (*QueryDepositRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{6} + return fileDescriptor_f80b85392d1440ac, []int{6} } func (m *QueryDepositRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -439,7 +439,7 @@ func (m *QueryDepositResponse) Reset() { *m = QueryDepositResponse{} } func (m *QueryDepositResponse) String() string { return proto.CompactTextString(m) } func (*QueryDepositResponse) ProtoMessage() {} func (*QueryDepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{7} + return fileDescriptor_f80b85392d1440ac, []int{7} } func (m *QueryDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -487,7 +487,7 @@ func (m *QueryPacketsRequest) Reset() { *m = QueryPacketsRequest{} } func (m *QueryPacketsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketsRequest) ProtoMessage() {} func (*QueryPacketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{8} + return fileDescriptor_f80b85392d1440ac, []int{8} } func (m *QueryPacketsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -542,7 +542,7 @@ func (m *QueryPacketsResponse) Reset() { *m = QueryPacketsResponse{} } func (m *QueryPacketsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketsResponse) ProtoMessage() {} func (*QueryPacketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{9} + return fileDescriptor_f80b85392d1440ac, []int{9} } func (m *QueryPacketsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -597,7 +597,7 @@ func (m *QueryPacketRequest) Reset() { *m = QueryPacketRequest{} } func (m *QueryPacketRequest) String() string { return proto.CompactTextString(m) } func (*QueryPacketRequest) ProtoMessage() {} func (*QueryPacketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{10} + return fileDescriptor_f80b85392d1440ac, []int{10} } func (m *QueryPacketRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -650,7 +650,7 @@ func (m *QueryPacketResponse) Reset() { *m = QueryPacketResponse{} } func (m *QueryPacketResponse) String() string { return proto.CompactTextString(m) } func (*QueryPacketResponse) ProtoMessage() {} func (*QueryPacketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{11} + return fileDescriptor_f80b85392d1440ac, []int{11} } func (m *QueryPacketResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +694,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{12} + return fileDescriptor_f80b85392d1440ac, []int{12} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -733,7 +733,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_220124e1821d297e, []int{13} + return fileDescriptor_f80b85392d1440ac, []int{13} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -770,82 +770,82 @@ func (m *QueryParamsResponse) GetParams() Params { } func init() { - proto.RegisterEnum("tunnel.v1beta1.TunnelStatusFilter", TunnelStatusFilter_name, TunnelStatusFilter_value) - proto.RegisterType((*QueryTunnelsRequest)(nil), "tunnel.v1beta1.QueryTunnelsRequest") - proto.RegisterType((*QueryTunnelsResponse)(nil), "tunnel.v1beta1.QueryTunnelsResponse") - proto.RegisterType((*QueryTunnelRequest)(nil), "tunnel.v1beta1.QueryTunnelRequest") - proto.RegisterType((*QueryTunnelResponse)(nil), "tunnel.v1beta1.QueryTunnelResponse") - proto.RegisterType((*QueryDepositsRequest)(nil), "tunnel.v1beta1.QueryDepositsRequest") - proto.RegisterType((*QueryDepositsResponse)(nil), "tunnel.v1beta1.QueryDepositsResponse") - proto.RegisterType((*QueryDepositRequest)(nil), "tunnel.v1beta1.QueryDepositRequest") - proto.RegisterType((*QueryDepositResponse)(nil), "tunnel.v1beta1.QueryDepositResponse") - proto.RegisterType((*QueryPacketsRequest)(nil), "tunnel.v1beta1.QueryPacketsRequest") - proto.RegisterType((*QueryPacketsResponse)(nil), "tunnel.v1beta1.QueryPacketsResponse") - proto.RegisterType((*QueryPacketRequest)(nil), "tunnel.v1beta1.QueryPacketRequest") - proto.RegisterType((*QueryPacketResponse)(nil), "tunnel.v1beta1.QueryPacketResponse") - proto.RegisterType((*QueryParamsRequest)(nil), "tunnel.v1beta1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "tunnel.v1beta1.QueryParamsResponse") -} - -func init() { proto.RegisterFile("tunnel/v1beta1/query.proto", fileDescriptor_220124e1821d297e) } - -var fileDescriptor_220124e1821d297e = []byte{ - // 871 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x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x60, 0xb1, 0xd4, 0xb6, - 0x7a, 0x18, 0xb6, 0xc9, 0xd9, 0xe8, 0xa6, 0xf4, 0x02, 0xc0, 0x2f, 0xfe, 0x72, 0x42, 0x57, 0xe8, - 0x2a, 0x51, 0xb4, 0xa3, 0x8e, 0x46, 0x6c, 0xb4, 0x0b, 0x3f, 0x27, 0xb6, 0x6a, 0x77, 0x48, 0xf5, - 0x5f, 0xbd, 0x65, 0x6b, 0xed, 0x24, 0x48, 0x81, 0xe5, 0xc9, 0x8c, 0x24, 0xfb, 0x33, 0x93, 0xd9, - 0xb1, 0x32, 0x95, 0xe6, 0xa9, 0x52, 0xf9, 0x8c, 0xf4, 0xfd, 0x43, 0x79, 0x08, 0x7b, 0xc9, 0x24, - 0xc7, 0x52, 0x60, 0x79, 0x22, 0xf3, 0xad, 0xcc, 0x32, 0x97, 0x9d, 0xcc, 0x65, 0x56, 0x38, 0xf7, - 0xc2, 0x92, 0xda, 0xd4, 0x38, 0x84, 0xd2, 0x77, 0x52, 0x3a, 0x03, 0x70, 0xda, 0x0f, 0x4a, 0x2c, - 0xd3, 0x20, 0x1a, 0xfa, 0x11, 0xc6, 0x19, 0x13, 0x49, 0x82, 0xd4, 0x27, 0xcb, 0x13, 0x99, 0x99, - 0x60, 0x46, 0xc5, 0x95, 0xa1, 0xdd, 0x00, 0xa4, 0xef, 0xae, 0x45, 0x62, 0xe1, 0x7c, 0x4c, 0x6b, - 0x10, 0xf5, 0x21, 0xb9, 0xa5, 0x9b, 0x83, 0xe3, 0x2c, 0x52, 0x55, 0x6f, 0xd0, 0xb2, 0x45, 0x95, - 0x04, 0x5b, 0x28, 0x34, 0xa4, 0xdf, 0x7d, 0xe5, 0xf6, 0x92, 0x58, 0x87, 0x31, 0x26, 0xa1, 0x07, - 0x42, 0x73, 0xd8, 0x8a, 0x9e, 0xbf, 0x59, 0x88, 0x28, 0x5c, 0x2b, 0x75, 0x79, 0x49, 0x76, 0x34, - 0xcb, 0x24, 0xba, 0x4d, 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, 0x8e, 0x02, 0xe6, 0xda, 0xcf, 0x19, 0x80, 0x31, 0x76, 0x51, 0xc8, 0x53, 0xe3, 0xb3, - 0x13, 0x21, 0x3d, 0x54, 0xc3, 0x41, 0x7e, 0xa5, 0x20, 0x1b, 0xe8, 0xa7, 0x1b, 0x80, 0xe0, 0xae, - 0xeb, 0x3c, 0xa7, 0xe8, 0xc8, 0x41, 0x72, 0x46, 0x3b, 0x14, 0xa9, 0xcf, 0x4b, 0x42, 0x91, 0xfa, - 0x9d, 0x45, 0x12, 0x29, 0x52, 0x12, 0xcd, 0xe0, 0xc0, 0x8f, 0xbc, 0xad, 0xc2, 0xf9, 0xa5, 0x08, - 0x2e, 0x2e, 0x45, 0xf0, 0xf6, 0x52, 0x04, 0x8f, 0xaf, 0xc4, 0xc8, 0xc5, 0x95, 0x18, 0x79, 0x7d, - 0x25, 0x46, 0xfe, 0xc1, 0x4d, 0xdd, 0x3e, 0xe8, 0xd4, 0xe4, 0xba, 0x79, 0x88, 0x6b, 0xaa, 0xd1, - 0xa0, 0x5f, 0x7c, 0x75, 0xb3, 0x85, 0xeb, 0x07, 0xaa, 0x6e, 0xe0, 0xe3, 0x2c, 0xfe, 0xdf, 0xbd, - 0xd3, 0x3e, 0xb1, 0x34, 0x52, 0x8b, 0x51, 0x45, 0xf6, 0x7d, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, - 0xb2, 0xa5, 0x82, 0xdb, 0x0a, 0x00, 0x00, + proto.RegisterEnum("band.tunnel.v1beta1.TunnelStatusFilter", TunnelStatusFilter_name, TunnelStatusFilter_value) + proto.RegisterType((*QueryTunnelsRequest)(nil), "band.tunnel.v1beta1.QueryTunnelsRequest") + proto.RegisterType((*QueryTunnelsResponse)(nil), "band.tunnel.v1beta1.QueryTunnelsResponse") + proto.RegisterType((*QueryTunnelRequest)(nil), "band.tunnel.v1beta1.QueryTunnelRequest") + proto.RegisterType((*QueryTunnelResponse)(nil), "band.tunnel.v1beta1.QueryTunnelResponse") + proto.RegisterType((*QueryDepositsRequest)(nil), "band.tunnel.v1beta1.QueryDepositsRequest") + proto.RegisterType((*QueryDepositsResponse)(nil), "band.tunnel.v1beta1.QueryDepositsResponse") + proto.RegisterType((*QueryDepositRequest)(nil), "band.tunnel.v1beta1.QueryDepositRequest") + proto.RegisterType((*QueryDepositResponse)(nil), "band.tunnel.v1beta1.QueryDepositResponse") + proto.RegisterType((*QueryPacketsRequest)(nil), "band.tunnel.v1beta1.QueryPacketsRequest") + proto.RegisterType((*QueryPacketsResponse)(nil), "band.tunnel.v1beta1.QueryPacketsResponse") + proto.RegisterType((*QueryPacketRequest)(nil), "band.tunnel.v1beta1.QueryPacketRequest") + proto.RegisterType((*QueryPacketResponse)(nil), "band.tunnel.v1beta1.QueryPacketResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "band.tunnel.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "band.tunnel.v1beta1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("band/tunnel/v1beta1/query.proto", fileDescriptor_f80b85392d1440ac) } + +var fileDescriptor_f80b85392d1440ac = []byte{ + // 875 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xdf, 0x6f, 0xda, 0x56, + 0x14, 0xc7, 0xb9, 0x19, 0x03, 0x72, 0xb3, 0x4d, 0xd1, 0x4d, 0xb6, 0x31, 0x27, 0x33, 0xcc, 0xfb, + 0x11, 0x92, 0x6c, 0xbe, 0x0a, 0x6c, 0x53, 0x36, 0x4d, 0xd3, 0xf2, 0x03, 0x26, 0xa6, 0x0c, 0x51, + 0x43, 0xfa, 0xd0, 0x17, 0x64, 0xc0, 0x25, 0x56, 0x89, 0xed, 0x70, 0x4d, 0xd4, 0x14, 0x45, 0x55, + 0xab, 0x3e, 0xe4, 0xb1, 0x52, 0xa4, 0x56, 0x6a, 0x5f, 0x2a, 0xf5, 0xb1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37, + 0x54, 0x82, 0x70, 0x58, 0x5b, 0x7a, 0x22, 0x0b, 0x72, 0x53, 0xf9, 0x9f, 0x64, 0xd6, 0x08, 0xd9, + 0x69, 0x84, 0xcc, 0x9a, 0xe9, 0x5e, 0x58, 0x55, 0x3b, 0x1a, 0x27, 0x51, 0x46, 0x22, 0xa5, 0x47, + 0x00, 0xce, 0xfa, 0x69, 0x89, 0x65, 0x1a, 0x44, 0x43, 0xbf, 0xc1, 0x24, 0x63, 0x22, 0x69, 0x90, + 0xfd, 0x24, 0x37, 0x95, 0x9f, 0x0b, 0x01, 0x55, 0x5c, 0x2d, 0xfa, 0x37, 0x80, 0x6b, 0x61, 0x2c, + 0x17, 0xcb, 0xe9, 0x03, 0x5b, 0x81, 0x68, 0x84, 0xcb, 0x6d, 0xe2, 0x1c, 0x9c, 0x64, 0x99, 0x1a, + 0x7a, 0x9b, 0x36, 0x30, 0xae, 0xa4, 0xd8, 0x41, 0xb9, 0x2d, 0x55, 0x7d, 0x8d, 0xf7, 0x2a, 0xf9, + 0x03, 0x26, 0x98, 0x84, 0x06, 0x84, 0x17, 0xb2, 0x1e, 0x3f, 0x79, 0x9d, 0x89, 0x29, 0x3c, 0x40, + 0x1a, 0xf0, 0xe6, 0x6c, 0x6a, 0x96, 0x49, 0x74, 0x9b, 0x44, 0xc1, 0xb8, 0xb2, 0xd1, 0x3c, 0x01, + 0xf0, 0xcb, 0x0b, 0xd9, 0x79, 0x45, 0xab, 0x30, 0xd5, 0xe6, 0x67, 0x7c, 0x38, 0xf3, 0x81, 0x35, + 0xf1, 0x40, 0xc5, 0x53, 0x5f, 0xdd, 0x78, 0xdc, 0x5e, 0xbb, 0x29, 0xa2, 0x34, 0x66, 0x1e, 0x4e, + 0x72, 0x10, 0xb3, 0x47, 0x73, 0x4f, 0x2a, 0xc3, 0x03, 0xa9, 0xee, 0xef, 0xb5, 0x57, 0xec, 0x5f, + 0x30, 0xc9, 0x45, 0x7c, 0x7e, 0xa1, 0xb5, 0x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, 0x13, 0xc1, 0xe9, 0x99, 0x08, 0xde, 0x9c, 0x89, 0xe0, 0xe1, 0xb9, 0x18, + 0x3b, 0x3d, 0x17, 0x63, 0xaf, 0xce, 0xc5, 0xd8, 0x0d, 0xdc, 0xd1, 0xed, 0x9d, 0x7e, 0x53, 0x6e, + 0x99, 0xbb, 0xd8, 0xc9, 0x46, 0xff, 0x60, 0xb6, 0xcc, 0x2e, 0x6e, 0xed, 0xa8, 0xba, 0x81, 0xf7, + 0x0b, 0xf8, 0xb6, 0x7b, 0xa7, 0x7d, 0x60, 0x69, 0xa4, 0x99, 0xa0, 0x8a, 0xc2, 0xbb, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xd9, 0x91, 0x82, 0xf7, 0x5e, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -886,7 +886,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts ...grpc.CallOption) (*QueryTunnelsResponse, error) { out := new(QueryTunnelsResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Tunnels", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Query/Tunnels", in, out, opts...) if err != nil { return nil, err } @@ -895,7 +895,7 @@ func (c *queryClient) Tunnels(ctx context.Context, in *QueryTunnelsRequest, opts func (c *queryClient) Tunnel(ctx context.Context, in *QueryTunnelRequest, opts ...grpc.CallOption) (*QueryTunnelResponse, error) { out := new(QueryTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Tunnel", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Query/Tunnel", in, out, opts...) if err != nil { return nil, err } @@ -904,7 +904,7 @@ func (c *queryClient) Tunnel(ctx context.Context, in *QueryTunnelRequest, opts . func (c *queryClient) Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error) { out := new(QueryDepositsResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Deposits", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Query/Deposits", in, out, opts...) if err != nil { return nil, err } @@ -913,7 +913,7 @@ func (c *queryClient) Deposits(ctx context.Context, in *QueryDepositsRequest, op func (c *queryClient) Deposit(ctx context.Context, in *QueryDepositRequest, opts ...grpc.CallOption) (*QueryDepositResponse, error) { out := new(QueryDepositResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Deposit", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Query/Deposit", in, out, opts...) if err != nil { return nil, err } @@ -922,7 +922,7 @@ func (c *queryClient) Deposit(ctx context.Context, in *QueryDepositRequest, opts func (c *queryClient) Packets(ctx context.Context, in *QueryPacketsRequest, opts ...grpc.CallOption) (*QueryPacketsResponse, error) { out := new(QueryPacketsResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Packets", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Query/Packets", in, out, opts...) if err != nil { return nil, err } @@ -931,7 +931,7 @@ func (c *queryClient) Packets(ctx context.Context, in *QueryPacketsRequest, opts func (c *queryClient) Packet(ctx context.Context, in *QueryPacketRequest, opts ...grpc.CallOption) (*QueryPacketResponse, error) { out := new(QueryPacketResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Packet", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Query/Packet", in, out, opts...) if err != nil { return nil, err } @@ -940,7 +940,7 @@ func (c *queryClient) Packet(ctx context.Context, in *QueryPacketRequest, opts . func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -1005,7 +1005,7 @@ func _Query_Tunnels_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Query/Tunnels", + FullMethod: "/band.tunnel.v1beta1.Query/Tunnels", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Tunnels(ctx, req.(*QueryTunnelsRequest)) @@ -1023,7 +1023,7 @@ func _Query_Tunnel_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Query/Tunnel", + FullMethod: "/band.tunnel.v1beta1.Query/Tunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Tunnel(ctx, req.(*QueryTunnelRequest)) @@ -1041,7 +1041,7 @@ func _Query_Deposits_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Query/Deposits", + FullMethod: "/band.tunnel.v1beta1.Query/Deposits", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Deposits(ctx, req.(*QueryDepositsRequest)) @@ -1059,7 +1059,7 @@ func _Query_Deposit_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Query/Deposit", + FullMethod: "/band.tunnel.v1beta1.Query/Deposit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Deposit(ctx, req.(*QueryDepositRequest)) @@ -1077,7 +1077,7 @@ func _Query_Packets_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Query/Packets", + FullMethod: "/band.tunnel.v1beta1.Query/Packets", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Packets(ctx, req.(*QueryPacketsRequest)) @@ -1095,7 +1095,7 @@ func _Query_Packet_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Query/Packet", + FullMethod: "/band.tunnel.v1beta1.Query/Packet", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Packet(ctx, req.(*QueryPacketRequest)) @@ -1113,7 +1113,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Query/Params", + FullMethod: "/band.tunnel.v1beta1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -1122,7 +1122,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tunnel.v1beta1.Query", + ServiceName: "band.tunnel.v1beta1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1155,7 +1155,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "tunnel/v1beta1/query.proto", + Metadata: "band/tunnel/v1beta1/query.proto", } func (m *QueryTunnelsRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/tunnel/types/query.pb.gw.go b/x/tunnel/types/query.pb.gw.go index 1b3937aa6..8e8fa69a0 100644 --- a/x/tunnel/types/query.pb.gw.go +++ b/x/tunnel/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: tunnel/v1beta1/query.proto +// source: band/tunnel/v1beta1/query.proto /* Package types is a reverse proxy. diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 00c3568bd..b151b0234 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: tunnel/v1beta1/tunnel.proto +// source: band/tunnel/v1beta1/tunnel.proto package types @@ -59,7 +59,7 @@ func (x Encoder) String() string { } func (Encoder) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{0} + return fileDescriptor_6bb6151451ba2f25, []int{0} } // TSSRoute is the type for a TSS route @@ -74,7 +74,7 @@ func (m *TSSRoute) Reset() { *m = TSSRoute{} } func (m *TSSRoute) String() string { return proto.CompactTextString(m) } func (*TSSRoute) ProtoMessage() {} func (*TSSRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{0} + return fileDescriptor_6bb6151451ba2f25, []int{0} } func (m *TSSRoute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,7 +131,7 @@ func (m *SignalDeviation) Reset() { *m = SignalDeviation{} } func (m *SignalDeviation) String() string { return proto.CompactTextString(m) } func (*SignalDeviation) ProtoMessage() {} func (*SignalDeviation) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{1} + return fileDescriptor_6bb6151451ba2f25, []int{1} } func (m *SignalDeviation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -195,7 +195,7 @@ func (m *Deposit) Reset() { *m = Deposit{} } func (m *Deposit) String() string { return proto.CompactTextString(m) } func (*Deposit) ProtoMessage() {} func (*Deposit) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{2} + return fileDescriptor_6bb6151451ba2f25, []int{2} } func (m *Deposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,7 +254,7 @@ type Tunnel struct { // route is the route for delivering the signal prices Route *types1.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.tunnel.v1beta1.Encoder" json:"encoder,omitempty"` // fee_payer is the address of the fee payer FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` // signal_deviations is the list of signal deviations @@ -275,7 +275,7 @@ func (m *Tunnel) Reset() { *m = Tunnel{} } func (m *Tunnel) String() string { return proto.CompactTextString(m) } func (*Tunnel) ProtoMessage() {} func (*Tunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{3} + return fileDescriptor_6bb6151451ba2f25, []int{3} } func (m *Tunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -395,7 +395,7 @@ func (m *LatestSignalPrices) Reset() { *m = LatestSignalPrices{} } func (m *LatestSignalPrices) String() string { return proto.CompactTextString(m) } func (*LatestSignalPrices) ProtoMessage() {} func (*LatestSignalPrices) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{4} + return fileDescriptor_6bb6151451ba2f25, []int{4} } func (m *LatestSignalPrices) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -457,7 +457,7 @@ func (m *SignalPrice) Reset() { *m = SignalPrice{} } func (m *SignalPrice) String() string { return proto.CompactTextString(m) } func (*SignalPrice) ProtoMessage() {} func (*SignalPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{5} + return fileDescriptor_6bb6151451ba2f25, []int{5} } func (m *SignalPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -510,7 +510,7 @@ func (m *TotalFees) Reset() { *m = TotalFees{} } func (m *TotalFees) String() string { return proto.CompactTextString(m) } func (*TotalFees) ProtoMessage() {} func (*TotalFees) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{6} + return fileDescriptor_6bb6151451ba2f25, []int{6} } func (m *TotalFees) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -564,7 +564,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{7} + return fileDescriptor_6bb6151451ba2f25, []int{7} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -642,7 +642,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_b5270a56045f1d8a, []int{8} + return fileDescriptor_6bb6151451ba2f25, []int{8} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -693,90 +693,91 @@ func (m *TSSPacketContent) GetDestinationContractAddress() string { } func init() { - proto.RegisterEnum("tunnel.v1beta1.Encoder", Encoder_name, Encoder_value) - proto.RegisterType((*TSSRoute)(nil), "tunnel.v1beta1.TSSRoute") - proto.RegisterType((*SignalDeviation)(nil), "tunnel.v1beta1.SignalDeviation") - proto.RegisterType((*Deposit)(nil), "tunnel.v1beta1.Deposit") - proto.RegisterType((*Tunnel)(nil), "tunnel.v1beta1.Tunnel") - proto.RegisterType((*LatestSignalPrices)(nil), "tunnel.v1beta1.LatestSignalPrices") - proto.RegisterType((*SignalPrice)(nil), "tunnel.v1beta1.SignalPrice") - proto.RegisterType((*TotalFees)(nil), "tunnel.v1beta1.TotalFees") - proto.RegisterType((*Packet)(nil), "tunnel.v1beta1.Packet") - proto.RegisterType((*TSSPacketContent)(nil), "tunnel.v1beta1.TSSPacketContent") -} - -func init() { proto.RegisterFile("tunnel/v1beta1/tunnel.proto", fileDescriptor_b5270a56045f1d8a) } - -var fileDescriptor_b5270a56045f1d8a = []byte{ - // 1084 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,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0x7b, 0x36, 0x71, 0x70, 0xa0, 0x25, - 0x8b, 0x4a, 0x69, 0x75, 0x67, 0xad, 0x3c, 0x7b, 0x07, 0xcb, 0x75, 0x11, 0x36, 0xa3, 0x3c, 0xf8, - 0x08, 0xa8, 0x1d, 0x8c, 0x2d, 0x1f, 0x9d, 0xe0, 0x40, 0x5b, 0xb8, 0x01, 0xd1, 0x74, 0x07, 0xe3, - 0x46, 0x98, 0x09, 0x4d, 0x70, 0x47, 0x0a, 0x6f, 0xac, 0x05, 0xaa, 0xa5, 0x38, 0xb6, 0x85, 0xf9, - 0x33, 0xe7, 0x44, 0x5b, 0x49, 0x86, 0x08, 0x9b, 0x19, 0x3a, 0xeb, 0xa6, 0x21, 0x22, 0xae, 0xc7, - 0x70, 0x30, 0x40, 0xc7, 0xda, 0xa2, 0x40, 0x24, 0xb2, 0x61, 0x1f, 0xac, 0x30, 0xc2, 0xf8, 0x71, - 0x9c, 0x53, 0x2d, 0xfd, 0x86, 0x78, 0x5c, 0xe6, 0xc7, 0x44, 0xd2, 0x5c, 0x07, 0xaa, 0x4b, 0x2d, - 0x64, 0x33, 0x77, 0x80, 0x35, 0xb5, 0xa8, 0x94, 0xd2, 0x66, 0xda, 0xa5, 0x7b, 0xdc, 0x86, 0xef, - 0x00, 0x60, 0x07, 0x18, 0x31, 0xec, 0x58, 0x88, 0x69, 0xa0, 0xa8, 0x94, 0x12, 0xa6, 0x2a, 0x3d, - 0x7b, 0x0c, 0xee, 0x80, 0x45, 0x6e, 0x90, 0x40, 0x5b, 0xba, 0x01, 0xd7, 0x28, 0x51, 0xaa, 0xe7, - 0x07, 0x05, 0xc0, 0x0f, 0x10, 0xc3, 0x94, 0x09, 0xe8, 0x1a, 0x81, 0x6b, 0x63, 0x7a, 0x9b, 0x7b, - 0xb2, 0x0f, 0x56, 0x24, 0x3d, 0x3e, 0xaf, 0xd5, 0xe2, 0x1c, 0xae, 0xf5, 0xab, 0xa9, 0xe1, 0xfd, - 0x25, 0x2d, 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 0x23, 0xe3, 0x6a, 0x53, 0x95, 0xed, 0x0d, 0xe7, 0xda, - 0xb7, 0x39, 0xfe, 0xbf, 0xbf, 0xcd, 0x89, 0x1b, 0xdf, 0xe6, 0x2b, 0xe0, 0xdc, 0xfc, 0x4e, 0x01, - 0x8b, 0xf2, 0x13, 0x0b, 0x1f, 0x80, 0xb7, 0xeb, 0x07, 0xd5, 0xc3, 0x5a, 0xdd, 0xb4, 0x3e, 0x3a, - 0x68, 0x36, 0xea, 0x55, 0x63, 0xdf, 0xa8, 0xd7, 0x32, 0xb1, 0xdc, 0xda, 0xe9, 0x59, 0xf1, 0xaa, - 0x10, 0x7c, 0x0f, 0xac, 0x45, 0xee, 0x7d, 0xe3, 0xe3, 0x7a, 0xcd, 0x6a, 0x1c, 0x1a, 0x07, 0x2d, - 0x6b, 0xaf, 0x62, 0x64, 0x94, 0xdc, 0xfa, 0xe9, 0x59, 0xf1, 0xba, 0x30, 0xdc, 0x04, 0x99, 0x28, - 0xd4, 0x32, 0xaa, 0x4f, 0x79, 0x49, 0x3c, 0x97, 0x3d, 0x3d, 0x2b, 0xbe, 0xe6, 0xcf, 0x25, 0x9f, - 0x7f, 0x9b, 0x8f, 0x55, 0x3e, 0x7c, 0x31, 0xca, 0x2b, 0x2f, 0x47, 0x79, 0xe5, 0xd5, 0x28, 0xaf, - 0xfc, 0x3e, 0xca, 0x2b, 0x5f, 0x5e, 0xe6, 0x63, 0xaf, 0x2e, 0xf3, 0xb1, 0x5f, 0x2e, 0xf3, 0xb1, - 0x4f, 0xf4, 0x7f, 0x41, 0x97, 0xfc, 0xd7, 0x8f, 0xb3, 0xd5, 0x4e, 0xf1, 0x8c, 0x87, 0x7f, 0x07, - 0x00, 0x00, 0xff, 0xff, 0xde, 0x3f, 0xc7, 0x78, 0x11, 0x0a, 0x00, 0x00, + proto.RegisterEnum("band.tunnel.v1beta1.Encoder", Encoder_name, Encoder_value) + proto.RegisterType((*TSSRoute)(nil), "band.tunnel.v1beta1.TSSRoute") + proto.RegisterType((*SignalDeviation)(nil), "band.tunnel.v1beta1.SignalDeviation") + proto.RegisterType((*Deposit)(nil), "band.tunnel.v1beta1.Deposit") + proto.RegisterType((*Tunnel)(nil), "band.tunnel.v1beta1.Tunnel") + proto.RegisterType((*LatestSignalPrices)(nil), "band.tunnel.v1beta1.LatestSignalPrices") + proto.RegisterType((*SignalPrice)(nil), "band.tunnel.v1beta1.SignalPrice") + proto.RegisterType((*TotalFees)(nil), "band.tunnel.v1beta1.TotalFees") + proto.RegisterType((*Packet)(nil), "band.tunnel.v1beta1.Packet") + proto.RegisterType((*TSSPacketContent)(nil), "band.tunnel.v1beta1.TSSPacketContent") +} + +func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } + +var fileDescriptor_6bb6151451ba2f25 = []byte{ + // 1092 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4b, 0x6f, 0x1b, 0x45, + 0x1c, 0xf7, 0xda, 0x8e, 0xe3, 0x9d, 0x3c, 0x70, 0xa7, 0x56, 0xbb, 0x75, 0x83, 0x6d, 0x45, 0x1c, + 0x4c, 0xa4, 0x78, 0xdb, 0x54, 0x8d, 0x50, 0x4e, 0xc4, 0x8f, 0xa8, 0xab, 0x40, 0x62, 0xad, 0x8d, + 0x40, 0x5c, 0x56, 0xe3, 0xdd, 0xb1, 0xb3, 0x34, 0xde, 0x59, 0x76, 0xc6, 0x11, 0xf9, 0x06, 0x55, + 0xc4, 0x81, 0x2f, 0x10, 0x84, 0xe0, 0x40, 0xc5, 0xa9, 0x87, 0x7c, 0x05, 0xa4, 0x2a, 0xa7, 0x8a, + 0x13, 0x07, 0x64, 0x90, 0x73, 0x80, 0xcf, 0xc0, 0x09, 0xed, 0xcc, 0xac, 0x5f, 0x4d, 0x1a, 0x22, + 0xe8, 0xc5, 0xf6, 0xff, 0xfd, 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, 0x47, 0x57, 0x4b, 0xbf, 0x25, 0x44, 0x17, + 0x79, 0x99, 0x88, 0xa4, 0xf7, 0x81, 0xea, 0x52, 0x0b, 0xd9, 0xcc, 0x3d, 0xc2, 0x9a, 0x5a, 0x54, + 0x4a, 0x69, 0x33, 0xed, 0xd2, 0x6d, 0x2e, 0xc3, 0x77, 0x01, 0xb0, 0x03, 0x8c, 0x18, 0x76, 0x2c, + 0xc4, 0x34, 0x50, 0x54, 0x4a, 0x09, 0x53, 0x95, 0x9a, 0x6d, 0x06, 0x37, 0xc0, 0x3c, 0x17, 0x48, + 0xa0, 0x2d, 0x5c, 0xb3, 0xdc, 0xc8, 0x51, 0xf2, 0xe8, 0x85, 0x02, 0xe0, 0x47, 0x88, 0x61, 0xca, + 0xc4, 0xea, 0x1a, 0x81, 0x6b, 0x63, 0x7a, 0x93, 0x13, 0xb3, 0x0b, 0x96, 0x24, 0x46, 0x3e, 0x8f, + 0xd5, 0xe2, 0x7c, 0x5d, 0xc5, 0x37, 0xe0, 0xc3, 0x8b, 0x48, 0x6c, 0x16, 0xe9, 0x64, 0xdd, 0x15, + 0xa0, 0x32, 0xb7, 0x87, 0x29, 0x43, 0x3d, 0x9f, 0x73, 0x33, 0x61, 0x8e, 0x15, 0xb2, 0xe5, 0x16, + 0x58, 0x98, 0x48, 0x73, 0x93, 0x1b, 0x2a, 0x0b, 0xe6, 0x78, 0x8f, 0xf2, 0x38, 0x08, 0x41, 0x66, + 0x7d, 0xa6, 0x00, 0xb5, 0x15, 0xe2, 0xb1, 0x83, 0x31, 0x85, 0x7d, 0x90, 0x11, 0x1c, 0xf0, 0x91, + 0xfd, 0x14, 0x33, 0xab, 0x83, 0xb1, 0xa6, 0x5c, 0x47, 0x83, 0x07, 0x37, 0xa5, 0x81, 0xb9, 0xcc, + 0x8b, 0x34, 0x78, 0x8d, 0x1d, 0x1c, 0xb5, 0xf2, 0x75, 0x1c, 0xa4, 0x84, 0xee, 0x26, 0x38, 0xbc, + 0xe9,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 0x0d, 0x64, 0x22, 0x53, 0xcb, 0xa8, 0xee, 0xf2, 0x90, 0x78, 0x2e, + 0x7b, 0x72, 0x5a, 0x7c, 0x4d, 0x9f, 0x4b, 0x3e, 0xfb, 0x21, 0x1f, 0xab, 0x7c, 0xfc, 0x7c, 0x98, + 0x57, 0x5e, 0x0e, 0xf3, 0xca, 0xab, 0x61, 0x5e, 0xf9, 0x63, 0x98, 0x57, 0xbe, 0xb9, 0xc8, 0xc7, + 0x5e, 0x5d, 0xe4, 0x63, 0xbf, 0x5e, 0xe4, 0x63, 0x9f, 0xeb, 0xff, 0x02, 0x2e, 0xf9, 0xc7, 0x90, + 0xa3, 0xd5, 0x4e, 0x71, 0x8f, 0x47, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xce, 0x6b, 0xe8, 0x73, + 0x34, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 59146a4fd..16ea3e0d6 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: tunnel/v1beta1/tx.proto +// source: band/tunnel/v1beta1/tx.proto package types @@ -43,7 +43,7 @@ type MsgCreateTunnel struct { // route is the route for delivering the signal prices Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.tunnel.v1beta1.Encoder" json:"encoder,omitempty"` // initial_deposit is the deposit value that must be paid at tunnel creation. InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit"` // creator is the address of the creator. @@ -54,7 +54,7 @@ func (m *MsgCreateTunnel) Reset() { *m = MsgCreateTunnel{} } func (m *MsgCreateTunnel) String() string { return proto.CompactTextString(m) } func (*MsgCreateTunnel) ProtoMessage() {} func (*MsgCreateTunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{0} + return fileDescriptor_d18351d83b4705d0, []int{0} } func (m *MsgCreateTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ func (m *MsgCreateTunnelResponse) Reset() { *m = MsgCreateTunnelResponse func (m *MsgCreateTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreateTunnelResponse) ProtoMessage() {} func (*MsgCreateTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{1} + return fileDescriptor_d18351d83b4705d0, []int{1} } func (m *MsgCreateTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ func (m *MsgEditTunnel) Reset() { *m = MsgEditTunnel{} } func (m *MsgEditTunnel) String() string { return proto.CompactTextString(m) } func (*MsgEditTunnel) ProtoMessage() {} func (*MsgEditTunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{2} + return fileDescriptor_d18351d83b4705d0, []int{2} } func (m *MsgEditTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -251,7 +251,7 @@ func (m *MsgEditTunnelResponse) Reset() { *m = MsgEditTunnelResponse{} } func (m *MsgEditTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgEditTunnelResponse) ProtoMessage() {} func (*MsgEditTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{3} + return fileDescriptor_d18351d83b4705d0, []int{3} } func (m *MsgEditTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -292,7 +292,7 @@ func (m *MsgActivate) Reset() { *m = MsgActivate{} } func (m *MsgActivate) String() string { return proto.CompactTextString(m) } func (*MsgActivate) ProtoMessage() {} func (*MsgActivate) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{4} + return fileDescriptor_d18351d83b4705d0, []int{4} } func (m *MsgActivate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -343,7 +343,7 @@ func (m *MsgActivateResponse) Reset() { *m = MsgActivateResponse{} } func (m *MsgActivateResponse) String() string { return proto.CompactTextString(m) } func (*MsgActivateResponse) ProtoMessage() {} func (*MsgActivateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{5} + return fileDescriptor_d18351d83b4705d0, []int{5} } func (m *MsgActivateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +384,7 @@ func (m *MsgDeactivate) Reset() { *m = MsgDeactivate{} } func (m *MsgDeactivate) String() string { return proto.CompactTextString(m) } func (*MsgDeactivate) ProtoMessage() {} func (*MsgDeactivate) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{6} + return fileDescriptor_d18351d83b4705d0, []int{6} } func (m *MsgDeactivate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -435,7 +435,7 @@ func (m *MsgDeactivateResponse) Reset() { *m = MsgDeactivateResponse{} } func (m *MsgDeactivateResponse) String() string { return proto.CompactTextString(m) } func (*MsgDeactivateResponse) ProtoMessage() {} func (*MsgDeactivateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{7} + return fileDescriptor_d18351d83b4705d0, []int{7} } func (m *MsgDeactivateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -476,7 +476,7 @@ func (m *MsgTriggerTunnel) Reset() { *m = MsgTriggerTunnel{} } func (m *MsgTriggerTunnel) String() string { return proto.CompactTextString(m) } func (*MsgTriggerTunnel) ProtoMessage() {} func (*MsgTriggerTunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{8} + return fileDescriptor_d18351d83b4705d0, []int{8} } func (m *MsgTriggerTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ func (m *MsgTriggerTunnelResponse) Reset() { *m = MsgTriggerTunnelRespon func (m *MsgTriggerTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgTriggerTunnelResponse) ProtoMessage() {} func (*MsgTriggerTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{9} + return fileDescriptor_d18351d83b4705d0, []int{9} } func (m *MsgTriggerTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -570,7 +570,7 @@ func (m *MsgDepositTunnel) Reset() { *m = MsgDepositTunnel{} } func (m *MsgDepositTunnel) String() string { return proto.CompactTextString(m) } func (*MsgDepositTunnel) ProtoMessage() {} func (*MsgDepositTunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{10} + return fileDescriptor_d18351d83b4705d0, []int{10} } func (m *MsgDepositTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -628,7 +628,7 @@ func (m *MsgDepositTunnelResponse) Reset() { *m = MsgDepositTunnelRespon func (m *MsgDepositTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgDepositTunnelResponse) ProtoMessage() {} func (*MsgDepositTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{11} + return fileDescriptor_d18351d83b4705d0, []int{11} } func (m *MsgDepositTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -671,7 +671,7 @@ func (m *MsgWithdrawTunnel) Reset() { *m = MsgWithdrawTunnel{} } func (m *MsgWithdrawTunnel) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawTunnel) ProtoMessage() {} func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{12} + return fileDescriptor_d18351d83b4705d0, []int{12} } func (m *MsgWithdrawTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -729,7 +729,7 @@ func (m *MsgWithdrawTunnelResponse) Reset() { *m = MsgWithdrawTunnelResp func (m *MsgWithdrawTunnelResponse) String() string { return proto.CompactTextString(m) } func (*MsgWithdrawTunnelResponse) ProtoMessage() {} func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{13} + return fileDescriptor_d18351d83b4705d0, []int{13} } func (m *MsgWithdrawTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -770,7 +770,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{14} + return fileDescriptor_d18351d83b4705d0, []int{14} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -821,7 +821,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_747f2bf21e50fad9, []int{15} + return fileDescriptor_d18351d83b4705d0, []int{15} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -851,91 +851,92 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgCreateTunnel)(nil), "tunnel.v1beta1.MsgCreateTunnel") - proto.RegisterType((*MsgCreateTunnelResponse)(nil), "tunnel.v1beta1.MsgCreateTunnelResponse") - proto.RegisterType((*MsgEditTunnel)(nil), "tunnel.v1beta1.MsgEditTunnel") - proto.RegisterType((*MsgEditTunnelResponse)(nil), "tunnel.v1beta1.MsgEditTunnelResponse") - proto.RegisterType((*MsgActivate)(nil), "tunnel.v1beta1.MsgActivate") - proto.RegisterType((*MsgActivateResponse)(nil), "tunnel.v1beta1.MsgActivateResponse") - proto.RegisterType((*MsgDeactivate)(nil), "tunnel.v1beta1.MsgDeactivate") - proto.RegisterType((*MsgDeactivateResponse)(nil), "tunnel.v1beta1.MsgDeactivateResponse") - proto.RegisterType((*MsgTriggerTunnel)(nil), "tunnel.v1beta1.MsgTriggerTunnel") - proto.RegisterType((*MsgTriggerTunnelResponse)(nil), "tunnel.v1beta1.MsgTriggerTunnelResponse") - proto.RegisterType((*MsgDepositTunnel)(nil), "tunnel.v1beta1.MsgDepositTunnel") - proto.RegisterType((*MsgDepositTunnelResponse)(nil), "tunnel.v1beta1.MsgDepositTunnelResponse") - proto.RegisterType((*MsgWithdrawTunnel)(nil), "tunnel.v1beta1.MsgWithdrawTunnel") - proto.RegisterType((*MsgWithdrawTunnelResponse)(nil), "tunnel.v1beta1.MsgWithdrawTunnelResponse") - proto.RegisterType((*MsgUpdateParams)(nil), "tunnel.v1beta1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "tunnel.v1beta1.MsgUpdateParamsResponse") -} - -func init() { proto.RegisterFile("tunnel/v1beta1/tx.proto", fileDescriptor_747f2bf21e50fad9) } - -var fileDescriptor_747f2bf21e50fad9 = []byte{ - // 1008 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x71, 0x9a, 0x4c, 0xd2, 0xb4, 0x59, 0xd2, 0x7a, 0xbd, 0x11, 0xb6, 0xd9, 0xaa, - 0xaa, 0x13, 0x91, 0x5d, 0xc5, 0xa5, 0x08, 0x85, 0x53, 0x5c, 0xf7, 0x10, 0x09, 0x4b, 0x68, 0x5b, - 0x44, 0x05, 0x12, 0xd1, 0xd8, 0x3b, 0xac, 0x47, 0xd8, 0x33, 0xd6, 0xce, 0xd8, 0xad, 0x6f, 0x08, - 0x89, 0x0b, 0x27, 0x38, 0x70, 0x42, 0x5c, 0x38, 0xa1, 0x9e, 0x72, 0xe8, 0x7f, 0xc0, 0xa5, 0xe2, - 0x14, 0x71, 0xe2, 0x14, 0x50, 0x72, 0x88, 0xc4, 0x5f, 0x81, 0x76, 0x76, 0xf6, 0x67, 0x16, 0x27, - 0x45, 0x11, 0x12, 0x97, 0xc4, 0xf3, 0xbe, 0xef, 0xcd, 0x7e, 0xf3, 0xcd, 0x9b, 0x37, 0x03, 0xca, - 0x7c, 0x4c, 0x08, 0x1a, 0x58, 0x93, 0x9d, 0x2e, 0xe2, 0x70, 0xc7, 0xe2, 0xcf, 0xcd, 0x91, 0x47, - 0x39, 0x55, 0x57, 0x03, 0xc0, 0x94, 0x80, 0x5e, 0x71, 0x29, 0x75, 0x07, 0xc8, 0x12, 0x68, 0x77, - 0xfc, 0xb9, 0x05, 0xc9, 0x34, 0xa0, 0xea, 0xeb, 0x2e, 0x75, 0xa9, 0xf8, 0x69, 0xf9, 0xbf, 0x64, - 0x74, 0x23, 0x33, 0xf3, 0x08, 0x7a, 0x70, 0xc8, 0x24, 0x58, 0xe9, 0x51, 0x36, 0xa4, 0xec, 0x20, - 0xc8, 0x0a, 0x06, 0x12, 0xaa, 0x06, 0x23, 0xab, 0x0b, 0x19, 0x8a, 0x92, 0x7b, 0x14, 0x13, 0x89, - 0x97, 0x25, 0x3e, 0x64, 0xae, 0x35, 0xd9, 0xf1, 0xff, 0x49, 0x60, 0x0d, 0x0e, 0x31, 0xa1, 0x96, - 0xf8, 0xfb, 0x0f, 0x1a, 0xe4, 0x9a, 0x04, 0x68, 0xfc, 0x52, 0x04, 0x37, 0x3a, 0xcc, 0x7d, 0x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b7, 0xa7, 0xd5, 0xb9, 0xa3, 0xd3, 0xea, 0xdc, 0xef, - 0xa7, 0xd5, 0xb9, 0x4f, 0xac, 0x44, 0xc3, 0xe9, 0x42, 0xe2, 0x88, 0x97, 0x6e, 0x8f, 0x0e, 0xac, - 0x5e, 0x1f, 0x62, 0x62, 0x4d, 0xee, 0x5b, 0xcf, 0xe5, 0x33, 0x3d, 0xe8, 0x3e, 0xdd, 0x05, 0xc1, - 0xb8, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x52, 0x34, 0xbe, 0x9e, 0xaa, 0x0c, 0x00, 0x00, + proto.RegisterType((*MsgCreateTunnel)(nil), "band.tunnel.v1beta1.MsgCreateTunnel") + proto.RegisterType((*MsgCreateTunnelResponse)(nil), "band.tunnel.v1beta1.MsgCreateTunnelResponse") + proto.RegisterType((*MsgEditTunnel)(nil), "band.tunnel.v1beta1.MsgEditTunnel") + proto.RegisterType((*MsgEditTunnelResponse)(nil), "band.tunnel.v1beta1.MsgEditTunnelResponse") + proto.RegisterType((*MsgActivate)(nil), "band.tunnel.v1beta1.MsgActivate") + proto.RegisterType((*MsgActivateResponse)(nil), "band.tunnel.v1beta1.MsgActivateResponse") + proto.RegisterType((*MsgDeactivate)(nil), "band.tunnel.v1beta1.MsgDeactivate") + proto.RegisterType((*MsgDeactivateResponse)(nil), "band.tunnel.v1beta1.MsgDeactivateResponse") + proto.RegisterType((*MsgTriggerTunnel)(nil), "band.tunnel.v1beta1.MsgTriggerTunnel") + proto.RegisterType((*MsgTriggerTunnelResponse)(nil), "band.tunnel.v1beta1.MsgTriggerTunnelResponse") + proto.RegisterType((*MsgDepositTunnel)(nil), "band.tunnel.v1beta1.MsgDepositTunnel") + proto.RegisterType((*MsgDepositTunnelResponse)(nil), "band.tunnel.v1beta1.MsgDepositTunnelResponse") + proto.RegisterType((*MsgWithdrawTunnel)(nil), "band.tunnel.v1beta1.MsgWithdrawTunnel") + proto.RegisterType((*MsgWithdrawTunnelResponse)(nil), "band.tunnel.v1beta1.MsgWithdrawTunnelResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "band.tunnel.v1beta1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "band.tunnel.v1beta1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("band/tunnel/v1beta1/tx.proto", fileDescriptor_d18351d83b4705d0) } + +var fileDescriptor_d18351d83b4705d0 = []byte{ + // 1016 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xda, 0x89, 0x9b, 0x4c, 0xd2, 0xb4, 0xd9, 0xa6, 0x64, 0xbd, 0xad, 0x1c, 0x6b, 0x21, + 0xe0, 0x5a, 0xcd, 0xae, 0xe2, 0xaa, 0x15, 0x84, 0x53, 0x5c, 0xf7, 0x90, 0x83, 0x25, 0xb4, 0x2d, + 0x54, 0x42, 0x48, 0xd1, 0xd8, 0x3b, 0xac, 0x47, 0xd8, 0x33, 0xd6, 0xce, 0xd8, 0xad, 0x6f, 0x88, + 0x63, 0x4f, 0x70, 0xe0, 0x84, 0x90, 0x10, 0x27, 0xc4, 0x85, 0x1c, 0xfa, 0x47, 0x54, 0x48, 0x48, + 0x15, 0x27, 0x4e, 0x01, 0x25, 0x87, 0x48, 0xfc, 0x15, 0x68, 0x67, 0x67, 0x7f, 0xc6, 0x9b, 0xb8, + 0x28, 0x42, 0xe2, 0x12, 0xef, 0xbc, 0xf7, 0xcd, 0xcc, 0x37, 0xdf, 0x7b, 0xf3, 0xde, 0x04, 0xdc, + 0xee, 0x40, 0xe2, 0x58, 0x7c, 0x44, 0x08, 0xea, 0x5b, 0xe3, 0x9d, 0x0e, 0xe2, 0x70, 0xc7, 0xe2, + 0xcf, 0xcd, 0xa1, 0x47, 0x39, 0x55, 0x6f, 0xf8, 0x5e, 0x33, 0xf0, 0x9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, 0x27, 0x6a, 0x7a, 0x2e, 0xeb, 0x18, 0x93, 0xcf, 0xfa, 0x6c, + 0x11, 0x56, 0x11, 0xb8, 0x9a, 0x2e, 0xc0, 0x5b, 0x79, 0x93, 0x53, 0x30, 0x7d, 0x7b, 0x26, 0x58, + 0x72, 0x9b, 0x74, 0xb5, 0xdc, 0xca, 0xe7, 0x98, 0x80, 0xe5, 0x6f, 0x33, 0xb5, 0xb8, 0xa8, 0x3d, + 0xb0, 0x9a, 0x29, 0x2c, 0xef, 0xe6, 0x2d, 0x90, 0xc6, 0xe9, 0xe6, 0x6c, 0xb8, 0x68, 0xa7, 0x0e, + 0x58, 0x49, 0x5d, 0xc0, 0xdc, 0x7c, 0x4d, 0xa2, 0xf2, 0xf3, 0x75, 0xda, 0xdd, 0xd0, 0x17, 0xbe, + 0xf4, 0x8b, 0x4f, 0x73, 0xff, 0xd5, 0x71, 0x45, 0x79, 0x7d, 0x5c, 0x51, 0xfe, 0x3a, 0xae, 0x28, + 0x5f, 0x9f, 0x54, 0xe6, 0x5e, 0x9f, 0x54, 0xe6, 0xfe, 0x38, 0xa9, 0xcc, 0x7d, 0x6a, 0x25, 0xaa, + 0x98, 0xbf, 0xb0, 0x78, 0x48, 0x77, 0x69, 0xdf, 0xea, 0xf6, 0x20, 0x26, 0xd6, 0xf8, 0x9e, 0xf5, + 0x3c, 0xfc, 0xcf, 0x40, 0x94, 0xb4, 0x4e, 0x49, 0x20, 0xee, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, + 0xa5, 0xab, 0x48, 0xa4, 0x22, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -978,7 +979,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) { out := new(MsgCreateTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/CreateTunnel", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/CreateTunnel", in, out, opts...) if err != nil { return nil, err } @@ -987,7 +988,7 @@ func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts func (c *msgClient) EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) { out := new(MsgEditTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/EditTunnel", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/EditTunnel", in, out, opts...) if err != nil { return nil, err } @@ -996,7 +997,7 @@ func (c *msgClient) EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...g func (c *msgClient) Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) { out := new(MsgActivateResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/Activate", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/Activate", in, out, opts...) if err != nil { return nil, err } @@ -1005,7 +1006,7 @@ func (c *msgClient) Activate(ctx context.Context, in *MsgActivate, opts ...grpc. func (c *msgClient) Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) { out := new(MsgDeactivateResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/Deactivate", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/Deactivate", in, out, opts...) if err != nil { return nil, err } @@ -1014,7 +1015,7 @@ func (c *msgClient) Deactivate(ctx context.Context, in *MsgDeactivate, opts ...g func (c *msgClient) TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) { out := new(MsgTriggerTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/TriggerTunnel", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/TriggerTunnel", in, out, opts...) if err != nil { return nil, err } @@ -1023,7 +1024,7 @@ func (c *msgClient) TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opt func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) { out := new(MsgDepositTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/DepositTunnel", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/DepositTunnel", in, out, opts...) if err != nil { return nil, err } @@ -1032,7 +1033,7 @@ func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opt func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) { out := new(MsgWithdrawTunnelResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/WithdrawTunnel", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/WithdrawTunnel", in, out, opts...) if err != nil { return nil, err } @@ -1041,7 +1042,7 @@ func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, o func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/tunnel.v1beta1.Msg/UpdateParams", in, out, opts...) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } @@ -1111,7 +1112,7 @@ func _Msg_CreateTunnel_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/CreateTunnel", + FullMethod: "/band.tunnel.v1beta1.Msg/CreateTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreateTunnel(ctx, req.(*MsgCreateTunnel)) @@ -1129,7 +1130,7 @@ func _Msg_EditTunnel_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/EditTunnel", + FullMethod: "/band.tunnel.v1beta1.Msg/EditTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).EditTunnel(ctx, req.(*MsgEditTunnel)) @@ -1147,7 +1148,7 @@ func _Msg_Activate_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/Activate", + FullMethod: "/band.tunnel.v1beta1.Msg/Activate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Activate(ctx, req.(*MsgActivate)) @@ -1165,7 +1166,7 @@ func _Msg_Deactivate_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/Deactivate", + FullMethod: "/band.tunnel.v1beta1.Msg/Deactivate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Deactivate(ctx, req.(*MsgDeactivate)) @@ -1183,7 +1184,7 @@ func _Msg_TriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/TriggerTunnel", + FullMethod: "/band.tunnel.v1beta1.Msg/TriggerTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).TriggerTunnel(ctx, req.(*MsgTriggerTunnel)) @@ -1201,7 +1202,7 @@ func _Msg_DepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/DepositTunnel", + FullMethod: "/band.tunnel.v1beta1.Msg/DepositTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).DepositTunnel(ctx, req.(*MsgDepositTunnel)) @@ -1219,7 +1220,7 @@ func _Msg_WithdrawTunnel_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/WithdrawTunnel", + FullMethod: "/band.tunnel.v1beta1.Msg/WithdrawTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).WithdrawTunnel(ctx, req.(*MsgWithdrawTunnel)) @@ -1237,7 +1238,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/tunnel.v1beta1.Msg/UpdateParams", + FullMethod: "/band.tunnel.v1beta1.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) @@ -1246,7 +1247,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "tunnel.v1beta1.Msg", + ServiceName: "band.tunnel.v1beta1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1283,7 +1284,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "tunnel/v1beta1/tx.proto", + Metadata: "band/tunnel/v1beta1/tx.proto", } func (m *MsgCreateTunnel) Marshal() (dAtA []byte, err error) { From 83f11f9d3fd4931cb6ec580e847db29b155b34c7 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 31 Oct 2024 23:04:40 +0700 Subject: [PATCH 185/272] remove stringer on param --- api/band/tunnel/v1beta1/params.pulsar.go | 32 +++++++-------- proto/band/tunnel/v1beta1/params.proto | 3 +- x/tunnel/types/params.go | 8 ---- x/tunnel/types/params.pb.go | 50 ++++++++++++------------ 4 files changed, 42 insertions(+), 51 deletions(-) diff --git a/api/band/tunnel/v1beta1/params.pulsar.go b/api/band/tunnel/v1beta1/params.pulsar.go index f8a0d229b..a861c3785 100644 --- a/api/band/tunnel/v1beta1/params.pulsar.go +++ b/api/band/tunnel/v1beta1/params.pulsar.go @@ -828,7 +828,7 @@ var file_band_tunnel_v1beta1_params_proto_rawDesc = []byte{ 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 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, 0x22, 0xb9, 0x02, + 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6c, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, @@ -848,21 +848,21 @@ var file_band_tunnel_v1beta1_params_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, - 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xdc, 0x01, 0x0a, 0x17, 0x63, 0x6f, - 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, - 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xdc, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, + 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, + 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, + 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/band/tunnel/v1beta1/params.proto b/proto/band/tunnel/v1beta1/params.proto index 096ee6fa1..59a954202 100644 --- a/proto/band/tunnel/v1beta1/params.proto +++ b/proto/band/tunnel/v1beta1/params.proto @@ -8,8 +8,7 @@ import "cosmos/base/v1beta1/coin.proto"; // Params is the data structure that keeps the parameters of the module. message Params { - option (gogoproto.equal) = true; // Use gogoproto.equal for proto3 message equality checks - option (gogoproto.goproto_stringer) = false; // Disable stringer generation for better control + option (gogoproto.equal) = true; // Use gogoproto.equal for proto3 message equality checks // min_deposit is the minimum deposit required to create a tunnel repeated cosmos.base.v1beta1.Coin min_deposit = 1 diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 839cb6172..fde56d942 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -3,8 +3,6 @@ package types import ( "fmt" - "gopkg.in/yaml.v2" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -65,12 +63,6 @@ func (p Params) Validate() error { return nil } -// String implements the Stringer interface. -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} - // validateUint64 validates if a given number is a valid uint64. func validateUint64(name string, positiveOnly bool) func(interface{}) error { return func(i interface{}) error { diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 624410038..67996ab45 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -37,8 +37,9 @@ type Params struct { BasePacketFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_packet_fee,json=basePacketFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_packet_fee"` } -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_842b3bf03f22bf82, []int{0} } @@ -104,29 +105,28 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/params.proto", fileDescriptor_842b3bf03f22bf82) } var fileDescriptor_842b3bf03f22bf82 = []byte{ - // 338 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0x31, 0x4f, 0x32, 0x31, - 0x18, 0xc7, 0xef, 0x80, 0x90, 0x37, 0xe5, 0x35, 0x26, 0xa7, 0xc3, 0xc9, 0xd0, 0x43, 0x27, 0x16, - 0x5b, 0x91, 0xcd, 0x11, 0x8d, 0x09, 0x1b, 0xc1, 0xcd, 0xe5, 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d, 0xa0, - 0xbf, 0x2b, 0x45, 0x09, 0x68, 0x08, 0xb2, 0x48, 0x35, 0xcf, 0x25, 0x29, 0x74, 0x5c, 0x75, 0x04, - 0x10, 0x64, 0x71, 0xe7, 0x2b, 0x91, 0x06, 0x87, 0x76, 0xac, 0xb4, 0x24, 0x74, 0xc2, 0x4c, 0xfa, - 0xc0, 0x58, 0x5c, 0xfb, 0xfb, 0xa9, 0x0f, 0xac, 0x64, 0xe0, 0x22, 0x6e, 0x19, 0xbb, 0xfa, 0xf7, - 0xbc, 0x4c, 0x82, 0xaf, 0x65, 0x12, 0xf6, 0xfa, 0xab, 0x0d, 0x0c, 0xd7, 0x1b, 0x18, 0x7e, 0x6e, - 0x60, 0xf8, 0xb4, 0x85, 0xc1, 0x7a, 0x0b, 0x83, 0xb7, 0x2d, 0x0c, 0xee, 0xf1, 0x2f, 0xb9, 0xdd, - 0x95, 0xfb, 0x6b, 0xaa, 0x0a, 0x4c, 0xc7, 0x84, 0x4b, 0x3c, 0xef, 0xe2, 0xc5, 0x7e, 0xc1, 0x2e, - 0x29, 0xab, 0x3b, 0xa2, 0xfb, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x49, 0xf4, 0xe8, 0xfc, 0x01, - 0x00, 0x00, + // 332 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xb1, 0x4e, 0x02, 0x31, + 0x18, 0xc7, 0xef, 0x80, 0x30, 0x14, 0x8d, 0xc9, 0xe9, 0x70, 0x32, 0xf4, 0xd0, 0x89, 0xc5, 0x56, + 0x64, 0x73, 0x44, 0x63, 0xc2, 0x46, 0x70, 0x73, 0xb9, 0xf4, 0x4a, 0x3d, 0x1a, 0xae, 0xed, 0x85, + 0x16, 0x82, 0x6f, 0xe1, 0x23, 0x38, 0xbb, 0xfb, 0x0e, 0x8c, 0x8c, 0x4e, 0x6a, 0x60, 0xf1, 0x31, + 0x4c, 0xdb, 0xc3, 0xf8, 0x00, 0x4e, 0x6d, 0xbe, 0xef, 0xd7, 0xdf, 0xff, 0x4b, 0x3f, 0xd0, 0xc9, + 0x88, 0x9c, 0x60, 0xb3, 0x90, 0x92, 0x15, 0x78, 0xd9, 0xcb, 0x98, 0x21, 0x3d, 0x5c, 0x92, 0x39, + 0x11, 0x1a, 0x95, 0x73, 0x65, 0x54, 0x74, 0x6c, 0x09, 0xe4, 0x09, 0x54, 0x11, 0xed, 0x93, 0x5c, + 0xe5, 0xca, 0xf5, 0xb1, 0xbd, 0x79, 0xb4, 0x0d, 0xa9, 0xd2, 0x42, 0x69, 0x9c, 0x11, 0xcd, 0x7e, + 0x65, 0x54, 0x71, 0xe9, 0xfb, 0xe7, 0x6f, 0x35, 0xd0, 0x1c, 0x39, 0x77, 0x54, 0x80, 0x96, 0xe0, + 0x32, 0x9d, 0xb0, 0x52, 0x69, 0x6e, 0xe2, 0xb0, 0x53, 0xef, 0xb6, 0xae, 0x4e, 0x91, 0x17, 0x20, + 0x2b, 0xd8, 0x67, 0xa1, 0x1b, 0xc5, 0xe5, 0xe0, 0x72, 0xfd, 0x91, 0x04, 0xaf, 0x9f, 0x49, 0x37, + 0xe7, 0x66, 0xba, 0xc8, 0x10, 0x55, 0x02, 0x57, 0x69, 0xfe, 0xb8, 0xd0, 0x93, 0x19, 0x36, 0x4f, + 0x25, 0xd3, 0xee, 0x81, 0x1e, 0x03, 0xc1, 0xe5, 0xad, 0xd7, 0x47, 0x67, 0xe0, 0xc0, 0xa6, 0x71, + 0x69, 0xd8, 0x7c, 0x49, 0x8a, 0xb8, 0xd6, 0x09, 0xbb, 0x8d, 0xb1, 0x9d, 0x60, 0x58, 0x95, 0xa2, + 0x04, 0xb4, 0x04, 0x59, 0xa5, 0x9a, 0xe7, 0x92, 0x14, 0x3a, 0xae, 0x3b, 0x02, 0x08, 0xb2, 0xba, + 0xf7, 0x95, 0x48, 0x83, 0x23, 0x3b, 0x56, 0x5a, 0x12, 0x3a, 0x63, 0x26, 0x7d, 0x64, 0x2c, 0x6e, + 0xfc, 0xff, 0xd4, 0x87, 0x56, 0x32, 0x72, 0x11, 0x77, 0x8c, 0x5d, 0x37, 0xbe, 0x5f, 0x92, 0x70, + 0x30, 0x5c, 0x6f, 0x61, 0xb8, 0xd9, 0xc2, 0xf0, 0x6b, 0x0b, 0xc3, 0xe7, 0x1d, 0x0c, 0x36, 0x3b, + 0x18, 0xbc, 0xef, 0x60, 0xf0, 0x80, 0xff, 0x88, 0xed, 0x9e, 0xdc, 0x3f, 0x53, 0x55, 0x60, 0x3a, + 0x25, 0x5c, 0xe2, 0x65, 0x1f, 0xaf, 0xf6, 0xcb, 0x75, 0x29, 0x59, 0xd3, 0x11, 0xfd, 0x9f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x24, 0xea, 0x35, 0x13, 0xf8, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { From 4e7536012cef263c00b58c43a934eca94d406851 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 31 Oct 2024 23:07:58 +0700 Subject: [PATCH 186/272] fix path --- x/tunnel/autocli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/autocli.go b/x/tunnel/autocli.go index 540bbb72e..a1916c07f 100644 --- a/x/tunnel/autocli.go +++ b/x/tunnel/autocli.go @@ -3,7 +3,7 @@ package tunnel import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - tunnelv1beta1 "github.com/bandprotocol/chain/v3/api/tunnel/v1beta1" + tunnelv1beta1 "github.com/bandprotocol/chain/v3/api/band/tunnel/v1beta1" ) // AutoCLIOptions returns the AutoCLI options for the tunnel module From 48f4f2e83ea5b4fed625eff7da3b4dc365a675a7 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 31 Oct 2024 23:29:02 +0700 Subject: [PATCH 187/272] adjust --- x/tunnel/autocli.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/x/tunnel/autocli.go b/x/tunnel/autocli.go index a1916c07f..5b3bc6459 100644 --- a/x/tunnel/autocli.go +++ b/x/tunnel/autocli.go @@ -21,9 +21,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { RpcMethod: "Tunnels", Use: "tunnels", Short: "Query all tunnels", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - {ProtoField: "status_filter", Optional: true}, - }, }, { RpcMethod: "Tunnel", From 8fe5fb1d86f10c8ca2a953b1db6aa7cf7223d2ca Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 1 Nov 2024 00:01:58 +0700 Subject: [PATCH 188/272] patch --- api/band/tunnel/v1beta1/tunnel.pulsar.go | 219 +++---- api/band/tunnel/v1beta1/tx.pulsar.go | 756 ++++++++++++----------- api/band/tunnel/v1beta1/tx_grpc.pb.go | 48 +- 3 files changed, 515 insertions(+), 508 deletions(-) diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index cfac423e0..fbd84e5d2 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -2809,10 +2809,10 @@ func (x *_LatestSignalPrices_2_list) IsValid() bool { } var ( - md_LatestSignalPrices protoreflect.MessageDescriptor - fd_LatestSignalPrices_tunnel_id protoreflect.FieldDescriptor - fd_LatestSignalPrices_signal_prices protoreflect.FieldDescriptor - fd_LatestSignalPrices_timestamp protoreflect.FieldDescriptor + md_LatestSignalPrices protoreflect.MessageDescriptor + fd_LatestSignalPrices_tunnel_id protoreflect.FieldDescriptor + fd_LatestSignalPrices_signal_prices protoreflect.FieldDescriptor + fd_LatestSignalPrices_last_interval_timestamp protoreflect.FieldDescriptor ) func init() { @@ -2820,7 +2820,7 @@ func init() { md_LatestSignalPrices = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestSignalPrices") fd_LatestSignalPrices_tunnel_id = md_LatestSignalPrices.Fields().ByName("tunnel_id") fd_LatestSignalPrices_signal_prices = md_LatestSignalPrices.Fields().ByName("signal_prices") - fd_LatestSignalPrices_timestamp = md_LatestSignalPrices.Fields().ByName("timestamp") + fd_LatestSignalPrices_last_interval_timestamp = md_LatestSignalPrices.Fields().ByName("last_interval_timestamp") } var _ protoreflect.Message = (*fastReflection_LatestSignalPrices)(nil) @@ -2900,9 +2900,9 @@ func (x *fastReflection_LatestSignalPrices) Range(f func(protoreflect.FieldDescr return } } - if x.Timestamp != int64(0) { - value := protoreflect.ValueOfInt64(x.Timestamp) - if !f(fd_LatestSignalPrices_timestamp, value) { + if x.LastIntervalTimestamp != int64(0) { + value := protoreflect.ValueOfInt64(x.LastIntervalTimestamp) + if !f(fd_LatestSignalPrices_last_interval_timestamp, value) { return } } @@ -2925,8 +2925,8 @@ func (x *fastReflection_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) return x.TunnelId != uint64(0) case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": return len(x.SignalPrices) != 0 - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - return x.Timestamp != int64(0) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": + return x.LastIntervalTimestamp != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -2947,8 +2947,8 @@ func (x *fastReflection_LatestSignalPrices) Clear(fd protoreflect.FieldDescripto x.TunnelId = uint64(0) case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": x.SignalPrices = nil - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - x.Timestamp = int64(0) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": + x.LastIntervalTimestamp = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -2974,8 +2974,8 @@ func (x *fastReflection_LatestSignalPrices) Get(descriptor protoreflect.FieldDes } listValue := &_LatestSignalPrices_2_list{list: &x.SignalPrices} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - value := x.Timestamp + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": + value := x.LastIntervalTimestamp return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { @@ -3003,8 +3003,8 @@ func (x *fastReflection_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, lv := value.List() clv := lv.(*_LatestSignalPrices_2_list) x.SignalPrices = *clv.list - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - x.Timestamp = value.Int() + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": + x.LastIntervalTimestamp = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -3033,8 +3033,8 @@ func (x *fastReflection_LatestSignalPrices) Mutable(fd protoreflect.FieldDescrip return protoreflect.ValueOfList(value) case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - panic(fmt.Errorf("field timestamp of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": + panic(fmt.Errorf("field last_interval_timestamp of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -3053,7 +3053,7 @@ func (x *fastReflection_LatestSignalPrices) NewField(fd protoreflect.FieldDescri case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": list := []*SignalPrice{} return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &list}) - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { @@ -3133,8 +3133,8 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.Timestamp != 0 { - n += 1 + runtime.Sov(uint64(x.Timestamp)) + if x.LastIntervalTimestamp != 0 { + n += 1 + runtime.Sov(uint64(x.LastIntervalTimestamp)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -3165,8 +3165,8 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Timestamp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) + if x.LastIntervalTimestamp != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.LastIntervalTimestamp)) i-- dAtA[i] = 0x18 } @@ -3295,9 +3295,9 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastIntervalTimestamp", wireType) } - x.Timestamp = 0 + x.LastIntervalTimestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3307,7 +3307,7 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Timestamp |= int64(b&0x7F) << shift + x.LastIntervalTimestamp |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -5917,8 +5917,9 @@ type LatestSignalPrices struct { TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // signal_prices is the list of signal prices SignalPrices []*SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` - // timestamp is the timestamp when the signal prices are produced - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // last_interval_timestamp is the timestamp when the signal prices were updated + // because the specified interval was reached. + LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` } func (x *LatestSignalPrices) Reset() { @@ -5955,9 +5956,9 @@ func (x *LatestSignalPrices) GetSignalPrices() []*SignalPrice { return nil } -func (x *LatestSignalPrices) GetTimestamp() int64 { +func (x *LatestSignalPrices) GetLastIntervalTimestamp() int64 { if x != nil { - return x.Timestamp + return x.LastIntervalTimestamp } return 0 } @@ -6263,7 +6264,7 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, - 0xb0, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0xca, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, @@ -6271,84 +6272,86 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, - 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, - 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, - 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, - 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, - 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, - 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, - 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, - 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, - 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, - 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, - 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, - 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, - 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, - 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, - 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, + 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x36, + 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x15, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, + 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, + 0x1f, 0x01, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, + 0x12, 0x75, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x02, + 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, + 0x4b, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, + 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, + 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, + 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, + 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, + 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, + 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, + 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, + 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, + 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, + 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, + 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, + 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, + 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/api/band/tunnel/v1beta1/tx.pulsar.go b/api/band/tunnel/v1beta1/tx.pulsar.go index 25189e2ef..c3a884f6a 100644 --- a/api/band/tunnel/v1beta1/tx.pulsar.go +++ b/api/band/tunnel/v1beta1/tx.pulsar.go @@ -1293,83 +1293,83 @@ func (x *fastReflection_MsgCreateTunnelResponse) ProtoMethods() *protoiface.Meth } } -var _ protoreflect.List = (*_MsgEditTunnel_2_list)(nil) +var _ protoreflect.List = (*_MsgUpdateAndResetTunnel_2_list)(nil) -type _MsgEditTunnel_2_list struct { +type _MsgUpdateAndResetTunnel_2_list struct { list *[]*SignalDeviation } -func (x *_MsgEditTunnel_2_list) Len() int { +func (x *_MsgUpdateAndResetTunnel_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgEditTunnel_2_list) Get(i int) protoreflect.Value { +func (x *_MsgUpdateAndResetTunnel_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgEditTunnel_2_list) Set(i int, value protoreflect.Value) { +func (x *_MsgUpdateAndResetTunnel_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*SignalDeviation) (*x.list)[i] = concreteValue } -func (x *_MsgEditTunnel_2_list) Append(value protoreflect.Value) { +func (x *_MsgUpdateAndResetTunnel_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*SignalDeviation) *x.list = append(*x.list, concreteValue) } -func (x *_MsgEditTunnel_2_list) AppendMutable() protoreflect.Value { +func (x *_MsgUpdateAndResetTunnel_2_list) AppendMutable() protoreflect.Value { v := new(SignalDeviation) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgEditTunnel_2_list) Truncate(n int) { +func (x *_MsgUpdateAndResetTunnel_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgEditTunnel_2_list) NewElement() protoreflect.Value { +func (x *_MsgUpdateAndResetTunnel_2_list) NewElement() protoreflect.Value { v := new(SignalDeviation) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgEditTunnel_2_list) IsValid() bool { +func (x *_MsgUpdateAndResetTunnel_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgEditTunnel protoreflect.MessageDescriptor - fd_MsgEditTunnel_tunnel_id protoreflect.FieldDescriptor - fd_MsgEditTunnel_signal_deviations protoreflect.FieldDescriptor - fd_MsgEditTunnel_interval protoreflect.FieldDescriptor - fd_MsgEditTunnel_creator protoreflect.FieldDescriptor + md_MsgUpdateAndResetTunnel protoreflect.MessageDescriptor + fd_MsgUpdateAndResetTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgUpdateAndResetTunnel_signal_deviations protoreflect.FieldDescriptor + fd_MsgUpdateAndResetTunnel_interval protoreflect.FieldDescriptor + fd_MsgUpdateAndResetTunnel_creator protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tx_proto_init() - md_MsgEditTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnel") - fd_MsgEditTunnel_tunnel_id = md_MsgEditTunnel.Fields().ByName("tunnel_id") - fd_MsgEditTunnel_signal_deviations = md_MsgEditTunnel.Fields().ByName("signal_deviations") - fd_MsgEditTunnel_interval = md_MsgEditTunnel.Fields().ByName("interval") - fd_MsgEditTunnel_creator = md_MsgEditTunnel.Fields().ByName("creator") + md_MsgUpdateAndResetTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateAndResetTunnel") + fd_MsgUpdateAndResetTunnel_tunnel_id = md_MsgUpdateAndResetTunnel.Fields().ByName("tunnel_id") + fd_MsgUpdateAndResetTunnel_signal_deviations = md_MsgUpdateAndResetTunnel.Fields().ByName("signal_deviations") + fd_MsgUpdateAndResetTunnel_interval = md_MsgUpdateAndResetTunnel.Fields().ByName("interval") + fd_MsgUpdateAndResetTunnel_creator = md_MsgUpdateAndResetTunnel.Fields().ByName("creator") } -var _ protoreflect.Message = (*fastReflection_MsgEditTunnel)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpdateAndResetTunnel)(nil) -type fastReflection_MsgEditTunnel MsgEditTunnel +type fastReflection_MsgUpdateAndResetTunnel MsgUpdateAndResetTunnel -func (x *MsgEditTunnel) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgEditTunnel)(x) +func (x *MsgUpdateAndResetTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateAndResetTunnel)(x) } -func (x *MsgEditTunnel) slowProtoReflect() protoreflect.Message { +func (x *MsgUpdateAndResetTunnel) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1381,43 +1381,43 @@ func (x *MsgEditTunnel) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgEditTunnel_messageType fastReflection_MsgEditTunnel_messageType -var _ protoreflect.MessageType = fastReflection_MsgEditTunnel_messageType{} +var _fastReflection_MsgUpdateAndResetTunnel_messageType fastReflection_MsgUpdateAndResetTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateAndResetTunnel_messageType{} -type fastReflection_MsgEditTunnel_messageType struct{} +type fastReflection_MsgUpdateAndResetTunnel_messageType struct{} -func (x fastReflection_MsgEditTunnel_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgEditTunnel)(nil) +func (x fastReflection_MsgUpdateAndResetTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateAndResetTunnel)(nil) } -func (x fastReflection_MsgEditTunnel_messageType) New() protoreflect.Message { - return new(fastReflection_MsgEditTunnel) +func (x fastReflection_MsgUpdateAndResetTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateAndResetTunnel) } -func (x fastReflection_MsgEditTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgEditTunnel +func (x fastReflection_MsgUpdateAndResetTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateAndResetTunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgEditTunnel) Descriptor() protoreflect.MessageDescriptor { - return md_MsgEditTunnel +func (x *fastReflection_MsgUpdateAndResetTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateAndResetTunnel } // 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_MsgEditTunnel) Type() protoreflect.MessageType { - return _fastReflection_MsgEditTunnel_messageType +func (x *fastReflection_MsgUpdateAndResetTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateAndResetTunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgEditTunnel) New() protoreflect.Message { - return new(fastReflection_MsgEditTunnel) +func (x *fastReflection_MsgUpdateAndResetTunnel) New() protoreflect.Message { + return new(fastReflection_MsgUpdateAndResetTunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgEditTunnel) Interface() protoreflect.ProtoMessage { - return (*MsgEditTunnel)(x) +func (x *fastReflection_MsgUpdateAndResetTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateAndResetTunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -1425,28 +1425,28 @@ func (x *fastReflection_MsgEditTunnel) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgEditTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgUpdateAndResetTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TunnelId != uint64(0) { value := protoreflect.ValueOfUint64(x.TunnelId) - if !f(fd_MsgEditTunnel_tunnel_id, value) { + if !f(fd_MsgUpdateAndResetTunnel_tunnel_id, value) { return } } if len(x.SignalDeviations) != 0 { - value := protoreflect.ValueOfList(&_MsgEditTunnel_2_list{list: &x.SignalDeviations}) - if !f(fd_MsgEditTunnel_signal_deviations, value) { + value := protoreflect.ValueOfList(&_MsgUpdateAndResetTunnel_2_list{list: &x.SignalDeviations}) + if !f(fd_MsgUpdateAndResetTunnel_signal_deviations, value) { return } } if x.Interval != uint64(0) { value := protoreflect.ValueOfUint64(x.Interval) - if !f(fd_MsgEditTunnel_interval, value) { + if !f(fd_MsgUpdateAndResetTunnel_interval, value) { return } } if x.Creator != "" { value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgEditTunnel_creator, value) { + if !f(fd_MsgUpdateAndResetTunnel_creator, value) { return } } @@ -1463,21 +1463,21 @@ func (x *fastReflection_MsgEditTunnel) Range(f func(protoreflect.FieldDescriptor // 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_MsgEditTunnel) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateAndResetTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.tunnel_id": return x.TunnelId != uint64(0) - case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations": return len(x.SignalDeviations) != 0 - case "band.tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.interval": return x.Interval != uint64(0) - case "band.tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.creator": return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnel does not contain field %s", fd.FullName())) } } @@ -1487,21 +1487,21 @@ func (x *fastReflection_MsgEditTunnel) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgEditTunnel) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpdateAndResetTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.tunnel_id": x.TunnelId = uint64(0) - case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations": x.SignalDeviations = nil - case "band.tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.interval": x.Interval = uint64(0) - case "band.tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.creator": x.Creator = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnel does not contain field %s", fd.FullName())) } } @@ -1511,28 +1511,28 @@ func (x *fastReflection_MsgEditTunnel) Clear(fd protoreflect.FieldDescriptor) { // 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_MsgEditTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateAndResetTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations": if len(x.SignalDeviations) == 0 { - return protoreflect.ValueOfList(&_MsgEditTunnel_2_list{}) + return protoreflect.ValueOfList(&_MsgUpdateAndResetTunnel_2_list{}) } - listValue := &_MsgEditTunnel_2_list{list: &x.SignalDeviations} + listValue := &_MsgUpdateAndResetTunnel_2_list{list: &x.SignalDeviations} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.interval": value := x.Interval return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.creator": value := x.Creator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnel does not contain field %s", descriptor.FullName())) } } @@ -1546,23 +1546,23 @@ func (x *fastReflection_MsgEditTunnel) Get(descriptor protoreflect.FieldDescript // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgEditTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpdateAndResetTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.tunnel_id": x.TunnelId = value.Uint() - case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations": lv := value.List() - clv := lv.(*_MsgEditTunnel_2_list) + clv := lv.(*_MsgUpdateAndResetTunnel_2_list) x.SignalDeviations = *clv.list - case "band.tunnel.v1beta1.MsgEditTunnel.interval": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.interval": x.Interval = value.Uint() - case "band.tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.creator": x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnel does not contain field %s", fd.FullName())) } } @@ -1576,57 +1576,57 @@ func (x *fastReflection_MsgEditTunnel) Set(fd protoreflect.FieldDescriptor, valu // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgEditTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateAndResetTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations": if x.SignalDeviations == nil { x.SignalDeviations = []*SignalDeviation{} } - value := &_MsgEditTunnel_2_list{list: &x.SignalDeviations} + value := &_MsgUpdateAndResetTunnel_2_list{list: &x.SignalDeviations} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgEditTunnel is not mutable")) - case "band.tunnel.v1beta1.MsgEditTunnel.interval": - panic(fmt.Errorf("field interval of message band.tunnel.v1beta1.MsgEditTunnel is not mutable")) - case "band.tunnel.v1beta1.MsgEditTunnel.creator": - panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.MsgEditTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgUpdateAndResetTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.interval": + panic(fmt.Errorf("field interval of message band.tunnel.v1beta1.MsgUpdateAndResetTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.creator": + panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.MsgUpdateAndResetTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnel 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_MsgEditTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateAndResetTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgEditTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.MsgEditTunnel.signal_deviations": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations": list := []*SignalDeviation{} - return protoreflect.ValueOfList(&_MsgEditTunnel_2_list{list: &list}) - case "band.tunnel.v1beta1.MsgEditTunnel.interval": + return protoreflect.ValueOfList(&_MsgUpdateAndResetTunnel_2_list{list: &list}) + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.interval": return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.MsgEditTunnel.creator": + case "band.tunnel.v1beta1.MsgUpdateAndResetTunnel.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnel 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_MsgEditTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpdateAndResetTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgEditTunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgUpdateAndResetTunnel", d.FullName())) } panic("unreachable") } @@ -1634,7 +1634,7 @@ func (x *fastReflection_MsgEditTunnel) WhichOneof(d protoreflect.OneofDescriptor // 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_MsgEditTunnel) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpdateAndResetTunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1645,7 +1645,7 @@ func (x *fastReflection_MsgEditTunnel) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgEditTunnel) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpdateAndResetTunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1657,7 +1657,7 @@ func (x *fastReflection_MsgEditTunnel) SetUnknown(fields protoreflect.RawFields) // 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_MsgEditTunnel) IsValid() bool { +func (x *fastReflection_MsgUpdateAndResetTunnel) IsValid() bool { return x != nil } @@ -1667,9 +1667,9 @@ func (x *fastReflection_MsgEditTunnel) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgEditTunnel) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpdateAndResetTunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgEditTunnel) + x := input.Message.Interface().(*MsgUpdateAndResetTunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1707,7 +1707,7 @@ func (x *fastReflection_MsgEditTunnel) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgEditTunnel) + x := input.Message.Interface().(*MsgUpdateAndResetTunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1770,7 +1770,7 @@ func (x *fastReflection_MsgEditTunnel) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgEditTunnel) + x := input.Message.Interface().(*MsgUpdateAndResetTunnel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1802,10 +1802,10 @@ func (x *fastReflection_MsgEditTunnel) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnel: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateAndResetTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateAndResetTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1948,23 +1948,23 @@ func (x *fastReflection_MsgEditTunnel) ProtoMethods() *protoiface.Methods { } var ( - md_MsgEditTunnelResponse protoreflect.MessageDescriptor + md_MsgUpdateAndResetTunnelResponse protoreflect.MessageDescriptor ) func init() { file_band_tunnel_v1beta1_tx_proto_init() - md_MsgEditTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgEditTunnelResponse") + md_MsgUpdateAndResetTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgUpdateAndResetTunnelResponse") } -var _ protoreflect.Message = (*fastReflection_MsgEditTunnelResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgUpdateAndResetTunnelResponse)(nil) -type fastReflection_MsgEditTunnelResponse MsgEditTunnelResponse +type fastReflection_MsgUpdateAndResetTunnelResponse MsgUpdateAndResetTunnelResponse -func (x *MsgEditTunnelResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgEditTunnelResponse)(x) +func (x *MsgUpdateAndResetTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateAndResetTunnelResponse)(x) } -func (x *MsgEditTunnelResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgUpdateAndResetTunnelResponse) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1976,43 +1976,43 @@ func (x *MsgEditTunnelResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgEditTunnelResponse_messageType fastReflection_MsgEditTunnelResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgEditTunnelResponse_messageType{} +var _fastReflection_MsgUpdateAndResetTunnelResponse_messageType fastReflection_MsgUpdateAndResetTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateAndResetTunnelResponse_messageType{} -type fastReflection_MsgEditTunnelResponse_messageType struct{} +type fastReflection_MsgUpdateAndResetTunnelResponse_messageType struct{} -func (x fastReflection_MsgEditTunnelResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgEditTunnelResponse)(nil) +func (x fastReflection_MsgUpdateAndResetTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateAndResetTunnelResponse)(nil) } -func (x fastReflection_MsgEditTunnelResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgEditTunnelResponse) +func (x fastReflection_MsgUpdateAndResetTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateAndResetTunnelResponse) } -func (x fastReflection_MsgEditTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgEditTunnelResponse +func (x fastReflection_MsgUpdateAndResetTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateAndResetTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgEditTunnelResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgEditTunnelResponse +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateAndResetTunnelResponse } // 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_MsgEditTunnelResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgEditTunnelResponse_messageType +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateAndResetTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgEditTunnelResponse) New() protoreflect.Message { - return new(fastReflection_MsgEditTunnelResponse) +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateAndResetTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgEditTunnelResponse) Interface() protoreflect.ProtoMessage { - return (*MsgEditTunnelResponse)(x) +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateAndResetTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2020,7 +2020,7 @@ func (x *fastReflection_MsgEditTunnelResponse) Interface() protoreflect.ProtoMes // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgEditTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -2034,13 +2034,13 @@ func (x *fastReflection_MsgEditTunnelResponse) Range(f func(protoreflect.FieldDe // 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_MsgEditTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse does not contain field %s", fd.FullName())) } } @@ -2050,13 +2050,13 @@ func (x *fastReflection_MsgEditTunnelResponse) Has(fd protoreflect.FieldDescript // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgEditTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse does not contain field %s", fd.FullName())) } } @@ -2066,13 +2066,13 @@ func (x *fastReflection_MsgEditTunnelResponse) Clear(fd protoreflect.FieldDescri // 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_MsgEditTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -2086,13 +2086,13 @@ func (x *fastReflection_MsgEditTunnelResponse) Get(descriptor protoreflect.Field // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgEditTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse does not contain field %s", fd.FullName())) } } @@ -2106,36 +2106,36 @@ func (x *fastReflection_MsgEditTunnelResponse) Set(fd protoreflect.FieldDescript // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgEditTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse 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_MsgEditTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgEditTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgEditTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse 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_MsgEditTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgEditTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse", d.FullName())) } panic("unreachable") } @@ -2143,7 +2143,7 @@ func (x *fastReflection_MsgEditTunnelResponse) WhichOneof(d protoreflect.OneofDe // 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_MsgEditTunnelResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2154,7 +2154,7 @@ func (x *fastReflection_MsgEditTunnelResponse) GetUnknown() protoreflect.RawFiel // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgEditTunnelResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2166,7 +2166,7 @@ func (x *fastReflection_MsgEditTunnelResponse) SetUnknown(fields protoreflect.Ra // 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_MsgEditTunnelResponse) IsValid() bool { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) IsValid() bool { return x != nil } @@ -2176,9 +2176,9 @@ func (x *fastReflection_MsgEditTunnelResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgEditTunnelResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgUpdateAndResetTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgEditTunnelResponse) + x := input.Message.Interface().(*MsgUpdateAndResetTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2200,7 +2200,7 @@ func (x *fastReflection_MsgEditTunnelResponse) ProtoMethods() *protoiface.Method } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgEditTunnelResponse) + x := input.Message.Interface().(*MsgUpdateAndResetTunnelResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2230,7 +2230,7 @@ func (x *fastReflection_MsgEditTunnelResponse) ProtoMethods() *protoiface.Method }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgEditTunnelResponse) + x := input.Message.Interface().(*MsgUpdateAndResetTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2262,10 +2262,10 @@ func (x *fastReflection_MsgEditTunnelResponse) ProtoMethods() *protoiface.Method fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnelResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateAndResetTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgEditTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateAndResetTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -7685,8 +7685,9 @@ func (x *MsgCreateTunnelResponse) GetTunnelId() uint64 { return 0 } -// MsgEditTunnel is the transaction message to edit a tunnel. -type MsgEditTunnel struct { +// MsgUpdateAndResetTunnel is the transaction message to update a tunnel information +// and reset the interval. +type MsgUpdateAndResetTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -7701,8 +7702,8 @@ type MsgEditTunnel struct { Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` } -func (x *MsgEditTunnel) Reset() { - *x = MsgEditTunnel{} +func (x *MsgUpdateAndResetTunnel) Reset() { + *x = MsgUpdateAndResetTunnel{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7710,54 +7711,54 @@ func (x *MsgEditTunnel) Reset() { } } -func (x *MsgEditTunnel) String() string { +func (x *MsgUpdateAndResetTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgEditTunnel) ProtoMessage() {} +func (*MsgUpdateAndResetTunnel) ProtoMessage() {} -// Deprecated: Use MsgEditTunnel.ProtoReflect.Descriptor instead. -func (*MsgEditTunnel) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgUpdateAndResetTunnel.ProtoReflect.Descriptor instead. +func (*MsgUpdateAndResetTunnel) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{2} } -func (x *MsgEditTunnel) GetTunnelId() uint64 { +func (x *MsgUpdateAndResetTunnel) GetTunnelId() uint64 { if x != nil { return x.TunnelId } return 0 } -func (x *MsgEditTunnel) GetSignalDeviations() []*SignalDeviation { +func (x *MsgUpdateAndResetTunnel) GetSignalDeviations() []*SignalDeviation { if x != nil { return x.SignalDeviations } return nil } -func (x *MsgEditTunnel) GetInterval() uint64 { +func (x *MsgUpdateAndResetTunnel) GetInterval() uint64 { if x != nil { return x.Interval } return 0 } -func (x *MsgEditTunnel) GetCreator() string { +func (x *MsgUpdateAndResetTunnel) GetCreator() string { if x != nil { return x.Creator } return "" } -// MsgEditTunnelResponse is the response type for the Msg/EditTunnel RPC method. -type MsgEditTunnelResponse struct { +// MsgUpdateAndResetTunnelResponse is the response type for the Msg/UpdateAndResetTunnel RPC method. +type MsgUpdateAndResetTunnelResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgEditTunnelResponse) Reset() { - *x = MsgEditTunnelResponse{} +func (x *MsgUpdateAndResetTunnelResponse) Reset() { + *x = MsgUpdateAndResetTunnelResponse{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7765,14 +7766,14 @@ func (x *MsgEditTunnelResponse) Reset() { } } -func (x *MsgEditTunnelResponse) String() string { +func (x *MsgUpdateAndResetTunnelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgEditTunnelResponse) ProtoMessage() {} +func (*MsgUpdateAndResetTunnelResponse) ProtoMessage() {} -// Deprecated: Use MsgEditTunnelResponse.ProtoReflect.Descriptor instead. -func (*MsgEditTunnelResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgUpdateAndResetTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateAndResetTunnelResponse) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{3} } @@ -8285,176 +8286,179 @@ var file_band_tunnel_v1beta1_tx_proto_rawDesc = []byte{ 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x8a, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, - 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, - 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, - 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, - 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, - 0x15, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x44, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, - 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x17, - 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x28, 0x82, 0xe7, 0xb0, - 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x9d, 0x02, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x03, 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, 0x35, - 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, - 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x02, - 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, - 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x65, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xaf, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x9e, 0x02, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x4d, 0x73, + 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, + 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, + 0x13, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, + 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x17, 0x0a, 0x15, + 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, + 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa0, 0x06, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, 0x45, 0x64, 0x69, 0x74, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x64, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, - 0x0a, 0x0a, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, + 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x9d, 0x02, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, + 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, + 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, + 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x11, + 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, + 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x65, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, + 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x01, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbe, 0x06, 0x0a, 0x03, 0x4d, + 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2c, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x34, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0e, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x26, 0x2e, 0x62, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x20, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, 0x44, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, - 0xd8, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, - 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x65, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x1a, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd8, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, + 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, + 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8471,39 +8475,39 @@ func file_band_tunnel_v1beta1_tx_proto_rawDescGZIP() []byte { var file_band_tunnel_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_band_tunnel_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgCreateTunnel)(nil), // 0: band.tunnel.v1beta1.MsgCreateTunnel - (*MsgCreateTunnelResponse)(nil), // 1: band.tunnel.v1beta1.MsgCreateTunnelResponse - (*MsgEditTunnel)(nil), // 2: band.tunnel.v1beta1.MsgEditTunnel - (*MsgEditTunnelResponse)(nil), // 3: band.tunnel.v1beta1.MsgEditTunnelResponse - (*MsgActivate)(nil), // 4: band.tunnel.v1beta1.MsgActivate - (*MsgActivateResponse)(nil), // 5: band.tunnel.v1beta1.MsgActivateResponse - (*MsgDeactivate)(nil), // 6: band.tunnel.v1beta1.MsgDeactivate - (*MsgDeactivateResponse)(nil), // 7: band.tunnel.v1beta1.MsgDeactivateResponse - (*MsgTriggerTunnel)(nil), // 8: band.tunnel.v1beta1.MsgTriggerTunnel - (*MsgTriggerTunnelResponse)(nil), // 9: band.tunnel.v1beta1.MsgTriggerTunnelResponse - (*MsgDepositTunnel)(nil), // 10: band.tunnel.v1beta1.MsgDepositTunnel - (*MsgDepositTunnelResponse)(nil), // 11: band.tunnel.v1beta1.MsgDepositTunnelResponse - (*MsgWithdrawTunnel)(nil), // 12: band.tunnel.v1beta1.MsgWithdrawTunnel - (*MsgWithdrawTunnelResponse)(nil), // 13: band.tunnel.v1beta1.MsgWithdrawTunnelResponse - (*MsgUpdateParams)(nil), // 14: band.tunnel.v1beta1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 15: band.tunnel.v1beta1.MsgUpdateParamsResponse - (*SignalDeviation)(nil), // 16: band.tunnel.v1beta1.SignalDeviation - (*anypb.Any)(nil), // 17: google.protobuf.Any - (Encoder)(0), // 18: band.tunnel.v1beta1.Encoder - (*v1beta1.Coin)(nil), // 19: cosmos.base.v1beta1.Coin - (*Params)(nil), // 20: band.tunnel.v1beta1.Params + (*MsgCreateTunnel)(nil), // 0: band.tunnel.v1beta1.MsgCreateTunnel + (*MsgCreateTunnelResponse)(nil), // 1: band.tunnel.v1beta1.MsgCreateTunnelResponse + (*MsgUpdateAndResetTunnel)(nil), // 2: band.tunnel.v1beta1.MsgUpdateAndResetTunnel + (*MsgUpdateAndResetTunnelResponse)(nil), // 3: band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse + (*MsgActivate)(nil), // 4: band.tunnel.v1beta1.MsgActivate + (*MsgActivateResponse)(nil), // 5: band.tunnel.v1beta1.MsgActivateResponse + (*MsgDeactivate)(nil), // 6: band.tunnel.v1beta1.MsgDeactivate + (*MsgDeactivateResponse)(nil), // 7: band.tunnel.v1beta1.MsgDeactivateResponse + (*MsgTriggerTunnel)(nil), // 8: band.tunnel.v1beta1.MsgTriggerTunnel + (*MsgTriggerTunnelResponse)(nil), // 9: band.tunnel.v1beta1.MsgTriggerTunnelResponse + (*MsgDepositTunnel)(nil), // 10: band.tunnel.v1beta1.MsgDepositTunnel + (*MsgDepositTunnelResponse)(nil), // 11: band.tunnel.v1beta1.MsgDepositTunnelResponse + (*MsgWithdrawTunnel)(nil), // 12: band.tunnel.v1beta1.MsgWithdrawTunnel + (*MsgWithdrawTunnelResponse)(nil), // 13: band.tunnel.v1beta1.MsgWithdrawTunnelResponse + (*MsgUpdateParams)(nil), // 14: band.tunnel.v1beta1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 15: band.tunnel.v1beta1.MsgUpdateParamsResponse + (*SignalDeviation)(nil), // 16: band.tunnel.v1beta1.SignalDeviation + (*anypb.Any)(nil), // 17: google.protobuf.Any + (Encoder)(0), // 18: band.tunnel.v1beta1.Encoder + (*v1beta1.Coin)(nil), // 19: cosmos.base.v1beta1.Coin + (*Params)(nil), // 20: band.tunnel.v1beta1.Params } var file_band_tunnel_v1beta1_tx_proto_depIdxs = []int32{ 16, // 0: band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation 17, // 1: band.tunnel.v1beta1.MsgCreateTunnel.route:type_name -> google.protobuf.Any 18, // 2: band.tunnel.v1beta1.MsgCreateTunnel.encoder:type_name -> band.tunnel.v1beta1.Encoder 19, // 3: band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit:type_name -> cosmos.base.v1beta1.Coin - 16, // 4: band.tunnel.v1beta1.MsgEditTunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation + 16, // 4: band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation 19, // 5: band.tunnel.v1beta1.MsgDepositTunnel.amount:type_name -> cosmos.base.v1beta1.Coin 19, // 6: band.tunnel.v1beta1.MsgWithdrawTunnel.amount:type_name -> cosmos.base.v1beta1.Coin 20, // 7: band.tunnel.v1beta1.MsgUpdateParams.params:type_name -> band.tunnel.v1beta1.Params 0, // 8: band.tunnel.v1beta1.Msg.CreateTunnel:input_type -> band.tunnel.v1beta1.MsgCreateTunnel - 2, // 9: band.tunnel.v1beta1.Msg.EditTunnel:input_type -> band.tunnel.v1beta1.MsgEditTunnel + 2, // 9: band.tunnel.v1beta1.Msg.UpdateAndResetTunnel:input_type -> band.tunnel.v1beta1.MsgUpdateAndResetTunnel 4, // 10: band.tunnel.v1beta1.Msg.Activate:input_type -> band.tunnel.v1beta1.MsgActivate 6, // 11: band.tunnel.v1beta1.Msg.Deactivate:input_type -> band.tunnel.v1beta1.MsgDeactivate 8, // 12: band.tunnel.v1beta1.Msg.TriggerTunnel:input_type -> band.tunnel.v1beta1.MsgTriggerTunnel @@ -8511,7 +8515,7 @@ var file_band_tunnel_v1beta1_tx_proto_depIdxs = []int32{ 12, // 14: band.tunnel.v1beta1.Msg.WithdrawTunnel:input_type -> band.tunnel.v1beta1.MsgWithdrawTunnel 14, // 15: band.tunnel.v1beta1.Msg.UpdateParams:input_type -> band.tunnel.v1beta1.MsgUpdateParams 1, // 16: band.tunnel.v1beta1.Msg.CreateTunnel:output_type -> band.tunnel.v1beta1.MsgCreateTunnelResponse - 3, // 17: band.tunnel.v1beta1.Msg.EditTunnel:output_type -> band.tunnel.v1beta1.MsgEditTunnelResponse + 3, // 17: band.tunnel.v1beta1.Msg.UpdateAndResetTunnel:output_type -> band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse 5, // 18: band.tunnel.v1beta1.Msg.Activate:output_type -> band.tunnel.v1beta1.MsgActivateResponse 7, // 19: band.tunnel.v1beta1.Msg.Deactivate:output_type -> band.tunnel.v1beta1.MsgDeactivateResponse 9, // 20: band.tunnel.v1beta1.Msg.TriggerTunnel:output_type -> band.tunnel.v1beta1.MsgTriggerTunnelResponse @@ -8558,7 +8562,7 @@ func file_band_tunnel_v1beta1_tx_proto_init() { } } file_band_tunnel_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgEditTunnel); i { + switch v := v.(*MsgUpdateAndResetTunnel); i { case 0: return &v.state case 1: @@ -8570,7 +8574,7 @@ func file_band_tunnel_v1beta1_tx_proto_init() { } } file_band_tunnel_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgEditTunnelResponse); i { + switch v := v.(*MsgUpdateAndResetTunnelResponse); i { case 0: return &v.state case 1: diff --git a/api/band/tunnel/v1beta1/tx_grpc.pb.go b/api/band/tunnel/v1beta1/tx_grpc.pb.go index 8fd375786..b747806ff 100644 --- a/api/band/tunnel/v1beta1/tx_grpc.pb.go +++ b/api/band/tunnel/v1beta1/tx_grpc.pb.go @@ -19,14 +19,14 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_CreateTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/CreateTunnel" - Msg_EditTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/EditTunnel" - Msg_Activate_FullMethodName = "/band.tunnel.v1beta1.Msg/Activate" - Msg_Deactivate_FullMethodName = "/band.tunnel.v1beta1.Msg/Deactivate" - Msg_TriggerTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/TriggerTunnel" - Msg_DepositTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/DepositTunnel" - Msg_WithdrawTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/WithdrawTunnel" - Msg_UpdateParams_FullMethodName = "/band.tunnel.v1beta1.Msg/UpdateParams" + Msg_CreateTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/CreateTunnel" + Msg_UpdateAndResetTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/UpdateAndResetTunnel" + Msg_Activate_FullMethodName = "/band.tunnel.v1beta1.Msg/Activate" + Msg_Deactivate_FullMethodName = "/band.tunnel.v1beta1.Msg/Deactivate" + Msg_TriggerTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/TriggerTunnel" + Msg_DepositTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/DepositTunnel" + Msg_WithdrawTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/WithdrawTunnel" + Msg_UpdateParams_FullMethodName = "/band.tunnel.v1beta1.Msg/UpdateParams" ) // MsgClient is the client API for Msg service. @@ -35,8 +35,8 @@ const ( type MsgClient interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts ...grpc.CallOption) (*MsgCreateTunnelResponse, error) - // EditTunnel is a RPC method to edit a tunnel. - EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) + // UpdateAndResetTunnel is a RPC method to update a tunnel information and reset the interval. + UpdateAndResetTunnel(ctx context.Context, in *MsgUpdateAndResetTunnel, opts ...grpc.CallOption) (*MsgUpdateAndResetTunnelResponse, error) // Activate is a RPC method to activate a tunnel. Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) // Deactivate is a RPC method to deactivate a tunnel. @@ -68,9 +68,9 @@ func (c *msgClient) CreateTunnel(ctx context.Context, in *MsgCreateTunnel, opts return out, nil } -func (c *msgClient) EditTunnel(ctx context.Context, in *MsgEditTunnel, opts ...grpc.CallOption) (*MsgEditTunnelResponse, error) { - out := new(MsgEditTunnelResponse) - err := c.cc.Invoke(ctx, Msg_EditTunnel_FullMethodName, in, out, opts...) +func (c *msgClient) UpdateAndResetTunnel(ctx context.Context, in *MsgUpdateAndResetTunnel, opts ...grpc.CallOption) (*MsgUpdateAndResetTunnelResponse, error) { + out := new(MsgUpdateAndResetTunnelResponse) + err := c.cc.Invoke(ctx, Msg_UpdateAndResetTunnel_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -137,8 +137,8 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts type MsgServer interface { // CreateTunnel is a RPC method to create a new tunnel. CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) - // EditTunnel is a RPC method to edit a tunnel. - EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) + // UpdateAndResetTunnel is a RPC method to update a tunnel information and reset the interval. + UpdateAndResetTunnel(context.Context, *MsgUpdateAndResetTunnel) (*MsgUpdateAndResetTunnelResponse, error) // Activate is a RPC method to activate a tunnel. Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) // Deactivate is a RPC method to deactivate a tunnel. @@ -161,8 +161,8 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) CreateTunnel(context.Context, *MsgCreateTunnel) (*MsgCreateTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTunnel not implemented") } -func (UnimplementedMsgServer) EditTunnel(context.Context, *MsgEditTunnel) (*MsgEditTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EditTunnel not implemented") +func (UnimplementedMsgServer) UpdateAndResetTunnel(context.Context, *MsgUpdateAndResetTunnel) (*MsgUpdateAndResetTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAndResetTunnel not implemented") } func (UnimplementedMsgServer) Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") @@ -213,20 +213,20 @@ func _Msg_CreateTunnel_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_EditTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEditTunnel) +func _Msg_UpdateAndResetTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateAndResetTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).EditTunnel(ctx, in) + return srv.(MsgServer).UpdateAndResetTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_EditTunnel_FullMethodName, + FullMethod: Msg_UpdateAndResetTunnel_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EditTunnel(ctx, req.(*MsgEditTunnel)) + return srv.(MsgServer).UpdateAndResetTunnel(ctx, req.(*MsgUpdateAndResetTunnel)) } return interceptor(ctx, in, info, handler) } @@ -351,8 +351,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_CreateTunnel_Handler, }, { - MethodName: "EditTunnel", - Handler: _Msg_EditTunnel_Handler, + MethodName: "UpdateAndResetTunnel", + Handler: _Msg_UpdateAndResetTunnel_Handler, }, { MethodName: "Activate", From 01e4ed952c52c130871a51fa7191cb50d310eb8f Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 1 Nov 2024 00:15:54 +0700 Subject: [PATCH 189/272] fix test --- x/tunnel/types/axelar_route.go | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 x/tunnel/types/axelar_route.go diff --git a/x/tunnel/types/axelar_route.go b/x/tunnel/types/axelar_route.go deleted file mode 100644 index b3ac4f9d1..000000000 --- a/x/tunnel/types/axelar_route.go +++ /dev/null @@ -1,13 +0,0 @@ -package types - -import sdk "github.com/cosmos/cosmos-sdk/types" - -var _ RouteI = &AxelarRoute{} - -func (r *AxelarRoute) ValidateBasic() error { - return nil -} - -func (r *AxelarRoute) Fee() (sdk.Coins, error) { - return sdk.NewCoins(), nil -} From c083771cfdee1c45cf997d049d8912ade6f49ae1 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 1 Nov 2024 00:52:11 +0700 Subject: [PATCH 190/272] add mockgen for tunnel --- scripts/mockgen.sh | 1 + ...pected_keepers.go => expected_keepers_mocks.go} | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) rename x/tunnel/testutil/{mock_expected_keepers.go => expected_keepers_mocks.go} (95%) diff --git a/scripts/mockgen.sh b/scripts/mockgen.sh index d8183b990..76dd0756b 100755 --- a/scripts/mockgen.sh +++ b/scripts/mockgen.sh @@ -6,6 +6,7 @@ $mockgen_cmd -source=x/feeds/types/expected_keepers.go -package testutil -destin $mockgen_cmd -source=x/restake/types/expected_keepers.go -package testutil -destination x/restake/testutil/expected_keepers_mocks.go $mockgen_cmd -source=x/bandtss/types/expected_keepers.go -package testutil -destination x/bandtss/testutil/expected_keepers_mocks.go $mockgen_cmd -source=x/tss/types/expected_keepers.go -package testutil -destination x/tss/testutil/expected_keepers_mocks.go +$mockgen_cmd -source=x/tunnel/types/expected_keepers.go -package testutil -destination x/tunnel/testutil/expected_keepers_mocks.go $mockgen_cmd -source=grogu/submitter/expected_types.go -package testutil -destination grogu/submitter/testutil/expected_types_mock.go $mockgen_cmd -source=grogu/signaller/expected_types.go -package testutil -destination grogu/signaller/testutil/expected_types_mock.go diff --git a/x/tunnel/testutil/mock_expected_keepers.go b/x/tunnel/testutil/expected_keepers_mocks.go similarity index 95% rename from x/tunnel/testutil/mock_expected_keepers.go rename to x/tunnel/testutil/expected_keepers_mocks.go index b5781dccd..71bd9105c 100644 --- a/x/tunnel/testutil/mock_expected_keepers.go +++ b/x/tunnel/testutil/expected_keepers_mocks.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen --destination x/tunnel/testutil/mock_expected_keepers.go --source x/tunnel/types/expected_keepers.go --package testutil +// mockgen -source=x/tunnel/types/expected_keepers.go -package testutil -destination x/tunnel/testutil/expected_keepers_mocks.go // // Package testutil is a generated GoMock package. @@ -24,6 +24,7 @@ import ( type MockAccountKeeper struct { ctrl *gomock.Controller recorder *MockAccountKeeperMockRecorder + isgomock struct{} } // MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. @@ -112,21 +113,22 @@ func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, account any) *gomock.Ca } // SetModuleAccount mocks base method. -func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types2.ModuleAccountI) { +func (m *MockAccountKeeper) SetModuleAccount(ctx context.Context, moduleAccount types2.ModuleAccountI) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetModuleAccount", arg0, arg1) + m.ctrl.Call(m, "SetModuleAccount", ctx, moduleAccount) } // SetModuleAccount indicates an expected call of SetModuleAccount. -func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 any) *gomock.Call { +func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(ctx, moduleAccount any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetModuleAccount), ctx, moduleAccount) } // MockBankKeeper is a mock of BankKeeper interface. type MockBankKeeper struct { ctrl *gomock.Controller recorder *MockBankKeeperMockRecorder + isgomock struct{} } // MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. @@ -206,6 +208,7 @@ func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call type MockFeedsKeeper struct { ctrl *gomock.Controller recorder *MockFeedsKeeperMockRecorder + isgomock struct{} } // MockFeedsKeeperMockRecorder is the mock recorder for MockFeedsKeeper. @@ -243,6 +246,7 @@ func (mr *MockFeedsKeeperMockRecorder) GetAllCurrentPrices(ctx any) *gomock.Call type MockBandtssKeeper struct { ctrl *gomock.Controller recorder *MockBandtssKeeperMockRecorder + isgomock struct{} } // MockBandtssKeeperMockRecorder is the mock recorder for MockBandtssKeeper. From aaaecfad13bca50aad04527686a469a6510f8e22 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 1 Nov 2024 14:22:54 +0700 Subject: [PATCH 191/272] fix review --- api/band/tunnel/v1beta1/tunnel.pulsar.go | 3 - proto/band/tunnel/v1beta1/tunnel.proto | 2 - x/tunnel/README.md | 14 --- x/tunnel/types/tunnel.pb.go | 140 +++++++++++------------ 4 files changed, 69 insertions(+), 90 deletions(-) diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index cfac423e0..df22a1198 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -5,7 +5,6 @@ import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" - _ "github.com/bandprotocol/chain/v3/api/band/feeds/v1beta1" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -6187,8 +6186,6 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x1e, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index 364d9fcaf..f2d38bfad 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -7,8 +7,6 @@ import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -import "band/feeds/v1beta1/feeds.proto"; - option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; option (gogoproto.equal_all) = true; diff --git a/x/tunnel/README.md b/x/tunnel/README.md index a5e33fc7f..a58b385a7 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -14,8 +14,6 @@ The Tunnel module is designed to decentralize the creation of push-based price d - [Route](#route) - [IBC Route](#ibc-route) - [TSS Route](#tss-route) - - [Axelar Route](#axelar-route) - - [Hyperlane Stride Route](#hyperlane-stride-route) - [Packet](#packet) - [Packet Generation](#packet-generation) - [State](#state) @@ -105,18 +103,6 @@ bandd tx tunnel create-tunnel ibc [channel-id] [encoder] [initial-deposit] [inte #### TSS Route -#### Axelar Route - -#### Hyperlane Stride Route - -The Hyperlane Stride Route enables the transmission of data from BandChain to EVM-compatible chains via the Stride chain using Hyperlane bridge. This route sends an IBC transfer to the Stride chain through IBC hooks, which then utilizes the Hyperlane bridge to forward the data to the destination EVM-compatible chain. This method ensures secure and efficient cross-chain communication. - -To create a Hyperlane Stride tunnel, use the following CLI command: - -```bash -bandd tx tunnel create-tunnel hyperlane-stride [channel-id] [contract] [dispatchDestDomain] [dispatchRecipientAddr] [fund] [encoder] [initial-deposit] [interval] [signalDeviations-json-file] -``` - ### Packet A Packet is the data unit produced and sent to the destination chain based on the specified route. diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index b151b0234..248278bf6 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" github_com_bandprotocol_chain_v3_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" - _ "github.com/bandprotocol/chain/v3/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -708,76 +707,75 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 1092 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4b, 0x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d, 0x41, 0x59, 0xfd, 0x4d, 0x01, 0xf3, - 0x35, 0xec, 0x13, 0xea, 0xb2, 0x70, 0x08, 0x41, 0x97, 0x68, 0x88, 0xa4, 0x18, 0xa2, 0xc5, 0x95, - 0xe1, 0x10, 0xc2, 0x6c, 0x38, 0x70, 0x13, 0xa8, 0x8e, 0x88, 0x22, 0x81, 0x58, 0x5f, 0x45, 0xfb, - 0xe5, 0x6c, 0x3d, 0x2b, 0xe9, 0x21, 0xd7, 0xd6, 0x64, 0x81, 0xeb, 0x75, 0xcd, 0xb1, 0x2b, 0x3c, - 0x00, 0x29, 0xd4, 0x23, 0x7d, 0x8f, 0x69, 0x89, 0x62, 0xa2, 0xb4, 0xb0, 0x71, 0xaf, 0x2c, 0x23, - 0x42, 0xf6, 0x45, 0x2c, 0x2d, 0x57, 0x89, 0xeb, 0x55, 0x1e, 0xbf, 0x1c, 0x14, 0x62, 0x3f, 0xfd, - 0x5e, 0x28, 0x75, 0x5d, 0x76, 0xd0, 0x6f, 0x97, 0x6d, 0xd2, 0x93, 0xec, 0x93, 0x5f, 0xeb, 0xd4, - 0x79, 0xaa, 0xb3, 0x63, 0x1f, 0x53, 0x1e, 0x40, 0x9f, 0xff, 0xf9, 0x62, 0x4d, 0x31, 0x65, 0x7e, - 0x39, 0xde, 0xcf, 0x49, 0x90, 0x12, 0xed, 0xc3, 0x3b, 0x20, 0x3e, 0x1a, 0x2b, 0x35, 0x1c, 0x14, - 0xe2, 0x46, 0xcd, 0x8c, 0xbb, 0x0e, 0xcc, 0x81, 0x34, 0xc5, 0x5f, 0xf6, 0xb1, 0x67, 0x63, 0x81, - 0x82, 0x39, 0x92, 0xe1, 0x26, 0x98, 0x0b, 0x42, 0xd0, 0xf9, 0x6a, 0x17, 0x36, 0xb2, 0x65, 0x41, - 0xed, 0x72, 0x44, 0xed, 0xf2, 0xb6, 0x77, 0x5c, 0x99, 0xe0, 0x86, 0x29, 0xdc, 0xe1, 0x26, 0x98, - 0xc7, 0x9e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2c, - 0xa3, 0x68, 0x53, 0x95, 0xe9, 0x0d, 0xe7, 0xca, 0xf7, 0x3a, 0xfe, 0xbf, 0xbf, 0xd7, 0x89, 0x6b, - 0xdf, 0xeb, 0x4b, 0xd6, 0xb9, 0xf6, 0xa3, 0x02, 0xe6, 0xe5, 0x8d, 0x0b, 0x1f, 0x80, 0xdb, 0xf5, - 0xbd, 0xea, 0x7e, 0xad, 0x6e, 0x5a, 0x9f, 0xec, 0x35, 0x1b, 0xf5, 0xaa, 0xb1, 0x63, 0xd4, 0x6b, - 0x99, 0x58, 0xee, 0xee, 0xc9, 0x69, 0xf1, 0x32, 0x13, 0xfc, 0x00, 0xdc, 0x8d, 0xd4, 0x3b, 0xc6, - 0x67, 0xf5, 0x9a, 0xd5, 0xd8, 0x37, 0xf6, 0x5a, 0xd6, 0x76, 0xc5, 0xc8, 0x28, 0xb9, 0xfb, 0x27, - 0xa7, 0xc5, 0xab, 0xcc, 0x70, 0x0d, 0x64, 0x22, 0x53, 0xcb, 0xa8, 0xee, 0xf2, 0x90, 0x78, 0x2e, - 0x7b, 0x72, 0x5a, 0x7c, 0x4d, 0x9f, 0x4b, 0x3e, 0xfb, 0x21, 0x1f, 0xab, 0x7c, 0xfc, 0x7c, 0x98, - 0x57, 0x5e, 0x0e, 0xf3, 0xca, 0xab, 0x61, 0x5e, 0xf9, 0x63, 0x98, 0x57, 0xbe, 0xb9, 0xc8, 0xc7, - 0x5e, 0x5d, 0xe4, 0x63, 0xbf, 0x5e, 0xe4, 0x63, 0x9f, 0xeb, 0xff, 0x02, 0x2e, 0xf9, 0xc7, 0x90, - 0xa3, 0xd5, 0x4e, 0x71, 0x8f, 0x47, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xce, 0x6b, 0xe8, 0x73, - 0x34, 0x0a, 0x00, 0x00, + // 1086 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56,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52, 0x5a, 0xde, 0x58, 0x29, 0x5f, 0xf2, 0xb5, 0x95, 0xeb, 0x02, 0x63, 0x46, 0x60, 0xf8, + 0x18, 0xa8, 0x1d, 0x8c, 0x2d, 0x1f, 0x1d, 0xe3, 0x40, 0x9b, 0xbb, 0x66, 0xad, 0xe9, 0x0e, 0xc6, + 0x8d, 0x10, 0x09, 0x3f, 0x05, 0xb7, 0xa4, 0xfa, 0x46, 0x82, 0xa0, 0x5a, 0x8a, 0x2f, 0xf8, 0xbd, + 0x4b, 0x0f, 0x9e, 0x91, 0x6f, 0x25, 0x19, 0xee, 0xda, 0xcc, 0xd0, 0x69, 0x37, 0x0d, 0x77, 0xe3, + 0x7a, 0x0c, 0x07, 0x47, 0xe8, 0x50, 0x9b, 0x17, 0xbb, 0x89, 0x6c, 0xd8, 0x07, 0x4b, 0x8c, 0x30, + 0x7e, 0x26, 0x67, 0x57, 0x4b, 0xbf, 0x25, 0x46, 0x17, 0xf9, 0x31, 0x91, 0x48, 0xef, 0x03, 0xd5, + 0xa5, 0x16, 0xb2, 0x99, 0x7b, 0x84, 0x35, 0xb5, 0xa8, 0x94, 0xd2, 0x66, 0xda, 0xa5, 0xdb, 0xdc, + 0x86, 0xef, 0x02, 0x60, 0x07, 0x18, 0x31, 0xec, 0x58, 0x88, 0x69, 0xa0, 0xa8, 0x94, 0x12, 0xa6, + 0x2a, 0x3d, 0xdb, 0x0c, 0x6e, 0x80, 0x79, 0x6e, 0x90, 0x40, 0x5b, 0xb8, 0x66, 0xb9, 0x11, 0x50, + 0xea, 0xe8, 0x85, 0x02, 0xe0, 0x47, 0x88, 0x61, 0xca, 0xc4, 0xea, 0x1a, 0x81, 0x6b, 0x63, 0x7a, + 0x93, 0x2f, 0x66, 0x17, 0x2c, 0x49, 0x8e, 0x7c, 0x9e, 0xab, 0xc5, 0xf9, 0xba, 0x8a, 0x6f, 0xe0, + 0x87, 0x1f, 0x22, 0xb9, 0x59, 0xa4, 0x93, 0xe7, 0xae, 0x00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 0xb9, 0xf2, 0xbd, 0x8e, 0xff, 0xef, 0xef, 0x75, 0xe2, 0xda, 0xf7, 0xfa, 0x92, 0x75, 0xae, 0xfd, + 0xa8, 0x80, 0x79, 0x79, 0xe3, 0xc2, 0x07, 0xe0, 0x76, 0x7d, 0xaf, 0xba, 0x5f, 0xab, 0x9b, 0xd6, + 0x27, 0x7b, 0xcd, 0x46, 0xbd, 0x6a, 0xec, 0x18, 0xf5, 0x5a, 0x26, 0x96, 0xbb, 0x7b, 0x72, 0x5a, + 0xbc, 0x2c, 0x04, 0x3f, 0x00, 0x77, 0x23, 0xf7, 0x8e, 0xf1, 0x59, 0xbd, 0x66, 0x35, 0xf6, 0x8d, + 0xbd, 0x96, 0xb5, 0x5d, 0x31, 0x32, 0x4a, 0xee, 0xfe, 0xc9, 0x69, 0xf1, 0xaa, 0x30, 0x5c, 0x03, + 0x99, 0x28, 0xd4, 0x32, 0xaa, 0xbb, 0x3c, 0x25, 0x9e, 0xcb, 0x9e, 0x9c, 0x16, 0x5f, 0xf3, 0xe7, + 0x92, 0xcf, 0x7e, 0xc8, 0xc7, 0x2a, 0x1f, 0x3f, 0x1f, 0xe6, 0x95, 0x97, 0xc3, 0xbc, 0xf2, 0x6a, + 0x98, 0x57, 0xfe, 0x18, 0xe6, 0x95, 0x6f, 0x2e, 0xf2, 0xb1, 0x57, 0x17, 0xf9, 0xd8, 0xaf, 0x17, + 0xf9, 0xd8, 0xe7, 0xfa, 0xbf, 0xa0, 0x4b, 0xfe, 0xe3, 0xc7, 0xd9, 0x6a, 0xa7, 0x38, 0xe2, 0xd1, + 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x55, 0x17, 0x84, 0x14, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { From 2694247a9984206ba301445a4bb879b2e455b3fe Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 1 Nov 2024 14:27:19 +0700 Subject: [PATCH 192/272] rename timestamp to last interval --- api/band/tunnel/v1beta1/tunnel.pulsar.go | 212 +++++++++++------------ proto/band/tunnel/v1beta1/tunnel.proto | 4 +- x/tunnel/keeper/genesis_test.go | 2 +- x/tunnel/keeper/packet.go | 4 +- x/tunnel/keeper/tunnel_test.go | 2 +- x/tunnel/types/signal.go | 8 +- x/tunnel/types/tunnel.pb.go | 162 ++++++++--------- 7 files changed, 197 insertions(+), 197 deletions(-) diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index df22a1198..8ad4e9c45 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -2811,7 +2811,7 @@ var ( md_LatestSignalPrices protoreflect.MessageDescriptor fd_LatestSignalPrices_tunnel_id protoreflect.FieldDescriptor fd_LatestSignalPrices_signal_prices protoreflect.FieldDescriptor - fd_LatestSignalPrices_timestamp protoreflect.FieldDescriptor + fd_LatestSignalPrices_last_interval protoreflect.FieldDescriptor ) func init() { @@ -2819,7 +2819,7 @@ func init() { md_LatestSignalPrices = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestSignalPrices") fd_LatestSignalPrices_tunnel_id = md_LatestSignalPrices.Fields().ByName("tunnel_id") fd_LatestSignalPrices_signal_prices = md_LatestSignalPrices.Fields().ByName("signal_prices") - fd_LatestSignalPrices_timestamp = md_LatestSignalPrices.Fields().ByName("timestamp") + fd_LatestSignalPrices_last_interval = md_LatestSignalPrices.Fields().ByName("last_interval") } var _ protoreflect.Message = (*fastReflection_LatestSignalPrices)(nil) @@ -2899,9 +2899,9 @@ func (x *fastReflection_LatestSignalPrices) Range(f func(protoreflect.FieldDescr return } } - if x.Timestamp != int64(0) { - value := protoreflect.ValueOfInt64(x.Timestamp) - if !f(fd_LatestSignalPrices_timestamp, value) { + if x.LastInterval != int64(0) { + value := protoreflect.ValueOfInt64(x.LastInterval) + if !f(fd_LatestSignalPrices_last_interval, value) { return } } @@ -2924,8 +2924,8 @@ func (x *fastReflection_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) return x.TunnelId != uint64(0) case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": return len(x.SignalPrices) != 0 - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - return x.Timestamp != int64(0) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + return x.LastInterval != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -2946,8 +2946,8 @@ func (x *fastReflection_LatestSignalPrices) Clear(fd protoreflect.FieldDescripto x.TunnelId = uint64(0) case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": x.SignalPrices = nil - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - x.Timestamp = int64(0) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + x.LastInterval = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -2973,8 +2973,8 @@ func (x *fastReflection_LatestSignalPrices) Get(descriptor protoreflect.FieldDes } listValue := &_LatestSignalPrices_2_list{list: &x.SignalPrices} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - value := x.Timestamp + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + value := x.LastInterval return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { @@ -3002,8 +3002,8 @@ func (x *fastReflection_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, lv := value.List() clv := lv.(*_LatestSignalPrices_2_list) x.SignalPrices = *clv.list - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - x.Timestamp = value.Int() + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + x.LastInterval = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -3032,8 +3032,8 @@ func (x *fastReflection_LatestSignalPrices) Mutable(fd protoreflect.FieldDescrip return protoreflect.ValueOfList(value) case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": - panic(fmt.Errorf("field timestamp of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + panic(fmt.Errorf("field last_interval of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -3052,7 +3052,7 @@ func (x *fastReflection_LatestSignalPrices) NewField(fd protoreflect.FieldDescri case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": list := []*SignalPrice{} return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &list}) - case "band.tunnel.v1beta1.LatestSignalPrices.timestamp": + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { @@ -3132,8 +3132,8 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.Timestamp != 0 { - n += 1 + runtime.Sov(uint64(x.Timestamp)) + if x.LastInterval != 0 { + n += 1 + runtime.Sov(uint64(x.LastInterval)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -3164,8 +3164,8 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Timestamp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Timestamp)) + if x.LastInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.LastInterval)) i-- dAtA[i] = 0x18 } @@ -3294,9 +3294,9 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastInterval", wireType) } - x.Timestamp = 0 + x.LastInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3306,7 +3306,7 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Timestamp |= int64(b&0x7F) << shift + x.LastInterval |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -5916,8 +5916,8 @@ type LatestSignalPrices struct { TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // signal_prices is the list of signal prices SignalPrices []*SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` - // timestamp is the timestamp when the signal prices are produced - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // last_interval is the last interval when the signal prices are produced by interval trigger + LastInterval int64 `protobuf:"varint,3,opt,name=last_interval,json=lastInterval,proto3" json:"last_interval,omitempty"` } func (x *LatestSignalPrices) Reset() { @@ -5954,9 +5954,9 @@ func (x *LatestSignalPrices) GetSignalPrices() []*SignalPrice { return nil } -func (x *LatestSignalPrices) GetTimestamp() int64 { +func (x *LatestSignalPrices) GetLastInterval() int64 { if x != nil { - return x.Timestamp + return x.LastInterval } return 0 } @@ -6260,7 +6260,7 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, - 0xb0, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0xb7, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, @@ -6268,84 +6268,84 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, - 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, - 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, - 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, - 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, - 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, - 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, - 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, - 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, - 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, - 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, - 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, - 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, - 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, - 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, - 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, - 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, + 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, + 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, + 0x65, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x02, 0x0a, 0x06, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0d, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, + 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, + 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, + 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, + 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, + 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, + 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, + 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, + 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, + 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, + 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, + 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, + 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, + 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, + 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index f2d38bfad..f3fcb4b1e 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -88,8 +88,8 @@ message LatestSignalPrices { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // signal_prices is the list of signal prices repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; - // timestamp is the timestamp when the signal prices are produced - int64 timestamp = 3; + // last_interval is the last interval when the signal prices are produced by interval trigger + int64 last_interval = 3; } // SignalPrice is the type for a signal price diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index ec6f27418..10ec2f03c 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -160,7 +160,7 @@ func (s *KeeperTestSuite) TestInitExportGenesis() { SignalPrices: []types.SignalPrice{ {SignalID: "ETH", Price: 5000}, }, - Timestamp: 0, + LastInterval: 0, }, }, TotalFees: types.TotalFees{ diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 3f342c04b..5ea179247 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -103,7 +103,7 @@ func (k Keeper) ProducePacket( latestSignalPrices := k.MustGetLatestSignalPrices(ctx, tunnelID) // check if the interval has passed - isIntervalReached := unixNow >= int64(tunnel.Interval)+latestSignalPrices.Timestamp + isIntervalReached := unixNow >= int64(tunnel.Interval)+latestSignalPrices.LastInterval triggerAll = triggerAll || isIntervalReached // generate new signal prices @@ -140,7 +140,7 @@ func (k Keeper) ProducePacket( // update signal prices info latestSignalPrices.UpdateSignalPrices(nsps) if triggerAll { - latestSignalPrices.Timestamp = unixNow + latestSignalPrices.LastInterval = unixNow } k.SetLatestSignalPrices(ctx, latestSignalPrices) diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 93ed10f2b..a45a78ca3 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -42,7 +42,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { {SignalID: "BTC", Price: 0}, {SignalID: "ETH", Price: 0}, }, - Timestamp: 0, + LastInterval: 0, } s.accountKeeper.EXPECT(). diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 29f28e5b8..3236314da 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -19,12 +19,12 @@ func NewSignalDeviation( func NewLatestSignalPrices( tunnelID uint64, signalPrices []SignalPrice, - timestamp int64, + lastInterval int64, ) LatestSignalPrices { return LatestSignalPrices{ TunnelID: tunnelID, SignalPrices: signalPrices, - Timestamp: timestamp, + LastInterval: lastInterval, } } @@ -36,8 +36,8 @@ func (l LatestSignalPrices) Validate() error { if len(l.SignalPrices) == 0 { return fmt.Errorf("signal prices cannot be empty") } - if l.Timestamp < 0 { - return fmt.Errorf("timestamp cannot be negative") + if l.LastInterval < 0 { + return fmt.Errorf("last interval cannot be negative") } return nil } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 248278bf6..5acbd53d7 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -386,8 +386,8 @@ type LatestSignalPrices struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // signal_prices is the list of signal prices SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` - // timestamp is the timestamp when the signal prices are produced - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // last_interval is the last interval when the signal prices are produced by interval trigger + LastInterval int64 `protobuf:"varint,3,opt,name=last_interval,json=lastInterval,proto3" json:"last_interval,omitempty"` } func (m *LatestSignalPrices) Reset() { *m = LatestSignalPrices{} } @@ -437,9 +437,9 @@ func (m *LatestSignalPrices) GetSignalPrices() []SignalPrice { return nil } -func (m *LatestSignalPrices) GetTimestamp() int64 { +func (m *LatestSignalPrices) GetLastInterval() int64 { if m != nil { - return m.Timestamp + return m.LastInterval } return 0 } @@ -707,75 +707,75 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 1086 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xda, 0x8e, 0xe3, 0x9d, 0xfc, 0xc1, 0x9d, 0x5a, 0xed, 0xd6, 0x0d, 0xb6, 0x15, 0x71, - 0x30, 0x91, 0xe2, 0x6d, 0x53, 0x35, 0x42, 0x39, 0x11, 0xff, 0x89, 0xba, 0x0a, 0x24, 0xd6, 0xda, - 0x08, 0xc4, 0x65, 0x35, 0xde, 0x1d, 0x3b, 0x4b, 0xe3, 0x9d, 0x65, 0x67, 0x1c, 0x91, 0x6f, 0x50, - 0x45, 0x1c, 0xf8, 0x02, 0x41, 0x08, 0x0e, 0x54, 0x9c, 0x7a, 0xc8, 0x57, 0x40, 0xaa, 0x72, 0xaa, - 0x38, 0x71, 0x40, 0x06, 0x39, 0x07, 0xf8, 0x0c, 0x9c, 0xd0, 0xce, 0xcc, 0xfa, 0x5f, 0x93, 0x86, - 0x08, 0x7a, 0x49, 0xf2, 0xde, 0xfb, 0xbd, 0x37, 0xef, 0xbd, 0xdf, 0x6f, 0x67, 0x02, 0x8a, 0x6d, - 0xe4, 0x39, 0x3a, 0xeb, 0x7b, 0x1e, 0x3e, 0xd4, 0x8f, 0x1e, 0xb6, 0x31, 0x43, 0x0f, 0xa5, 0x59, - 0xf6, 0x03, 0xc2, 0x08, 0xbc, 0x1d, 0x22, 0xca, 0xd2, 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 0xf9, 0xd8, 0xaf, 0x17, - 0xf9, 0xd8, 0xe7, 0xfa, 0xbf, 0xa0, 0x4b, 0xfe, 0xe3, 0xc7, 0xd9, 0x6a, 0xa7, 0x38, 0xe2, 0xd1, - 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x55, 0x17, 0x84, 0x14, 0x0a, 0x00, 0x00, + // 1088 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0xda, 0x8e, 0x63, 0x4f, 0x3e, 0x70, 0xa7, 0x56, 0xbb, 0x75, 0x8b, 0x6d, 0x05, 0x0e, + 0xa6, 0x52, 0xbc, 0x6d, 0xaa, 0x46, 0x28, 0x27, 0xe2, 0x8f, 0xa8, 0xab, 0x40, 0x62, 0xad, 0x8d, + 0x40, 0x5c, 0x56, 0xe3, 0xdd, 0xb1, 0xb3, 0xd4, 0x99, 0x59, 0x76, 0xc6, 0x11, 0xf9, 0x07, 0x55, + 0xc4, 0x81, 0x3f, 0x10, 0x84, 0xe0, 0x40, 0xc5, 0x89, 0x43, 0x24, 0x7e, 0x01, 0x52, 0x95, 0x53, + 0xc5, 0x89, 0x03, 0x32, 0xc8, 0x39, 0xc0, 0x6f, 0xe0, 0x84, 0x76, 0x66, 0xd6, 0xb1, 0xdd, 0xa4, + 0x21, 0x02, 0x2e, 0x49, 0xde, 0xe7, 0xfd, 0x98, 0xf7, 0x7d, 0x9f, 0x67, 0x67, 0x02, 0x4a, 0x1d, + 0x44, 0x5c, 0x83, 0x0f, 0x08, 0xc1, 0x7d, 0xe3, 0xe0, 0x61, 0x07, 0x73, 0xf4, 0x50, 0x99, 0x15, + 0x3f, 0xa0, 0x9c, 0xc2, 0x9b, 0x61, 0x44, 0x45, 0x41, 0x2a, 0x22, 0x7f, 0x03, 0xed, 0x7b, 0x84, + 0x1a, 0xe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 0x0a, 0xb1, 0x97, 0x67, 0x85, 0xd8, + 0x2f, 0x67, 0x85, 0xd8, 0x27, 0xc6, 0x3f, 0xa0, 0x4b, 0xfd, 0xff, 0x27, 0xd8, 0xea, 0xa4, 0x44, + 0xc4, 0xa3, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xae, 0xc9, 0x76, 0x58, 0x1b, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -964,7 +964,7 @@ func (this *LatestSignalPrices) Equal(that interface{}) bool { return false } } - if this.Timestamp != that1.Timestamp { + if this.LastInterval != that1.LastInterval { return false } return true @@ -1354,8 +1354,8 @@ func (m *LatestSignalPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Timestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Timestamp)) + if m.LastInterval != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.LastInterval)) i-- dAtA[i] = 0x18 } @@ -1694,8 +1694,8 @@ func (m *LatestSignalPrices) Size() (n int) { n += 1 + l + sovTunnel(uint64(l)) } } - if m.Timestamp != 0 { - n += 1 + sovTunnel(uint64(m.Timestamp)) + if m.LastInterval != 0 { + n += 1 + sovTunnel(uint64(m.LastInterval)) } return n } @@ -2571,9 +2571,9 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastInterval", wireType) } - m.Timestamp = 0 + m.LastInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2583,7 +2583,7 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Timestamp |= int64(b&0x7F) << shift + m.LastInterval |= int64(b&0x7F) << shift if b < 0x80 { break } From 05983b68d9089c3a76f73a35658f6c2be878c79a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 4 Nov 2024 16:37:42 +0700 Subject: [PATCH 193/272] add produce packet event --- x/tunnel/keeper/packet.go | 8 ++++++++ x/tunnel/types/events.go | 16 +++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 5ea179247..50c1e9c5a 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -147,6 +147,13 @@ func (k Keeper) ProducePacket( // update sequence number k.SetTunnel(ctx, tunnel) + // emit an event + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeProducePacketSuccess, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", tunnel.Sequence)), + )) + return nil } @@ -178,6 +185,7 @@ func (k Keeper) SendPacket( // set the packet in the store k.SetPacket(ctx, packet) + return nil } diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 00082c269..a388cc81e 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -2,16 +2,18 @@ package types // events const ( - EventTypeUpdateParams = "update_params" - EventTypeCreateTunnel = "create_tunnel" - EventTypeEditTunnel = "edit_tunnel" - EventTypeActivate = "activate" - EventTypeDeactivate = "deactivate" - EventTypeTriggerTunnel = "trigger_tunnel" - EventTypeProducePacketFail = "produce_packet_fail" + EventTypeUpdateParams = "update_params" + EventTypeCreateTunnel = "create_tunnel" + EventTypeEditTunnel = "edit_tunnel" + EventTypeActivate = "activate" + EventTypeDeactivate = "deactivate" + EventTypeTriggerTunnel = "trigger_tunnel" + EventTypeProducePacketFail = "produce_packet_fail" + EventTypeProducePacketSuccess = "produce_packet_success" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" + AttributeKeySequence = "sequence" AttributeKeyInterval = "interval" AttributeKeyRoute = "route" AttributeKeyEncoder = "encoder" From d07e0c773e01684ad3a8434db6649e0d99bd9153 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 4 Nov 2024 23:47:27 +0700 Subject: [PATCH 194/272] fix import --- x/tunnel/types/expected_keepers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 11c3834ff..654239a17 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" sdk "github.com/cosmos/cosmos-sdk/types" From 6cb830166ec1707ce46bad711377dd418a3138e1 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 5 Nov 2024 00:06:41 +0700 Subject: [PATCH 195/272] add more test-case --- x/tunnel/keeper/deposit_test.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index 0cd6a62c2..61deaae95 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -54,16 +54,24 @@ func (s *KeeperTestSuite) TestGetSetDeposit() { func (s *KeeperTestSuite) TestGetDeposits() { ctx, k := s.ctx, s.keeper - tunnelID := uint64(1) + tunnelID1 := uint64(1) + tunnelID2 := uint64(2) + depositorAddr := sdk.AccAddress([]byte("depositor")) depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))) - deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} - k.SetDeposit(ctx, deposit) + // add a deposit + deposit1 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr.String(), Amount: depositAmount} + k.SetDeposit(ctx, deposit1) + + // add another deposit + deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr.String(), Amount: depositAmount} + k.SetDeposit(ctx, deposit2) - deposits := k.GetDeposits(ctx, tunnelID) + deposits := k.GetDeposits(ctx, tunnelID2) s.Require().Len(deposits, 1) - s.Require().Equal(deposit, deposits[0]) + s.Require().Equal(deposit1, deposits[0]) + s.Require().Equal(deposit2, deposits[1]) } func (s *KeeperTestSuite) TestGetAllDeposits() { From 1afe1684caea95c9933cfc4027d6d7ef5285c44e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 5 Nov 2024 00:47:49 +0700 Subject: [PATCH 196/272] update test --- x/tunnel/keeper/deposit_test.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index 61deaae95..713a63241 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -55,21 +55,22 @@ func (s *KeeperTestSuite) TestGetDeposits() { ctx, k := s.ctx, s.keeper tunnelID1 := uint64(1) - tunnelID2 := uint64(2) - depositorAddr := sdk.AccAddress([]byte("depositor")) + depositorAddr1 := sdk.AccAddress([]byte("depositor1")) + depositorAddr2 := sdk.AccAddress([]byte("depositor2")) + depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))) // add a deposit - deposit1 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr.String(), Amount: depositAmount} + deposit1 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr1.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit1) // add another deposit - deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr.String(), Amount: depositAmount} + deposit2 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr2.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit2) - deposits := k.GetDeposits(ctx, tunnelID2) - s.Require().Len(deposits, 1) + deposits := k.GetDeposits(ctx, tunnelID1) + s.Require().Len(deposits, 2) s.Require().Equal(deposit1, deposits[0]) s.Require().Equal(deposit2, deposits[1]) } @@ -85,7 +86,7 @@ func (s *KeeperTestSuite) TestGetAllDeposits() { k.SetDeposit(ctx, deposit1) tunnelID2 := uint64(2) - depositorAddr2 := sdk.AccAddress([]byte("depositor")) + depositorAddr2 := sdk.AccAddress([]byte("depositor2")) depositAmount2 := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(200))) deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr2.String(), Amount: depositAmount2} From ba59ed5de03c4aba6d43d3829fb6d429ad5fa350 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 1 Nov 2024 14:22:54 +0700 Subject: [PATCH 197/272] fix review --- api/band/tunnel/v1beta1/tunnel.pulsar.go | 3 - proto/band/tunnel/v1beta1/tunnel.proto | 2 - x/tunnel/README.md | 14 --- x/tunnel/types/tunnel.pb.go | 142 +++++++++++------------ 4 files changed, 70 insertions(+), 91 deletions(-) diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index fbd84e5d2..03b8a4b03 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -5,7 +5,6 @@ import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" - _ "github.com/bandprotocol/chain/v3/api/band/feeds/v1beta1" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -6188,8 +6187,6 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x1e, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index 006a35971..46ca0d1ff 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -7,8 +7,6 @@ import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -import "band/feeds/v1beta1/feeds.proto"; - option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; option (gogoproto.equal_all) = true; diff --git a/x/tunnel/README.md b/x/tunnel/README.md index a5e33fc7f..a58b385a7 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -14,8 +14,6 @@ The Tunnel module is designed to decentralize the creation of push-based price d - [Route](#route) - [IBC Route](#ibc-route) - [TSS Route](#tss-route) - - [Axelar Route](#axelar-route) - - [Hyperlane Stride Route](#hyperlane-stride-route) - [Packet](#packet) - [Packet Generation](#packet-generation) - [State](#state) @@ -105,18 +103,6 @@ bandd tx tunnel create-tunnel ibc [channel-id] [encoder] [initial-deposit] [inte #### TSS Route -#### Axelar Route - -#### Hyperlane Stride Route - -The Hyperlane Stride Route enables the transmission of data from BandChain to EVM-compatible chains via the Stride chain using Hyperlane bridge. This route sends an IBC transfer to the Stride chain through IBC hooks, which then utilizes the Hyperlane bridge to forward the data to the destination EVM-compatible chain. This method ensures secure and efficient cross-chain communication. - -To create a Hyperlane Stride tunnel, use the following CLI command: - -```bash -bandd tx tunnel create-tunnel hyperlane-stride [channel-id] [contract] [dispatchDestDomain] [dispatchRecipientAddr] [fund] [encoder] [initial-deposit] [interval] [signalDeviations-json-file] -``` - ### Packet A Packet is the data unit produced and sent to the destination chain based on the specified route. diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 3be573cfd..2969264cf 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" github_com_bandprotocol_chain_v3_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" - _ "github.com/bandprotocol/chain/v3/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -709,77 +708,76 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 1105 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0x1b, 0x45, - 0x1c, 0xf7, 0xda, 0x8e, 0x63, 0x4f, 0x3e, 0x70, 0xa7, 0xa6, 0xd9, 0xba, 0xc5, 0xb6, 0x22, 0x0e, - 0x26, 0x52, 0xbc, 0x6d, 0xaa, 0x46, 0x28, 0x27, 0xe2, 0x8f, 0xa8, 0xab, 0x40, 0x62, 0xed, 0x1a, - 0x81, 0xb8, 0xac, 0xc6,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x6b, 0xba, 0x83, 0x71, 0x33, 0xf4, 0x84, 0x9f, 0x80, 0x5b, 0x92, 0x7d, - 0x63, 0x42, 0x50, 0x35, 0xc5, 0x17, 0xfc, 0xee, 0xa5, 0x85, 0x67, 0xe8, 0x5b, 0x4d, 0x86, 0xbb, - 0x36, 0xb2, 0x74, 0x5a, 0x4d, 0xc3, 0xdd, 0xb8, 0x1e, 0xc3, 0xc1, 0x21, 0xea, 0xa9, 0xf3, 0x62, - 0x37, 0x91, 0x0c, 0x07, 0x60, 0x89, 0x11, 0xc6, 0x6b, 0x72, 0x74, 0xd5, 0xf4, 0x1b, 0x42, 0x74, - 0x91, 0x97, 0x89, 0x48, 0x7a, 0x0f, 0x64, 0x5c, 0x6a, 0x21, 0x9b, 0xb9, 0x87, 0x58, 0xcd, 0x94, - 0x94, 0x72, 0xda, 0x48, 0xbb, 0x74, 0x9b, 0xcb, 0xf0, 0x1d, 0x00, 0xec, 0x00, 0x23, 0x86, 0x1d, - 0x0b, 0x31, 0x15, 0x94, 0x94, 0x72, 0xc2, 0xc8, 0x48, 0xcd, 0x36, 0x83, 0x1b, 0x60, 0x9e, 0x0b, - 0x24, 0x50, 0x17, 0xae, 0x59, 0x6e, 0xe4, 0x28, 0x79, 0x74, 0xa6, 0x00, 0xf8, 0x21, 0x62, 0x98, - 0x32, 0xb1, 0xba, 0x66, 0xe0, 0xda, 0x98, 0xde, 0xe4, 0xc4, 0xec, 0x82, 0x25, 0x89, 0x91, 0xcf, - 0x63, 0xd5, 0x38, 0x5f, 0x57, 0xe9, 0x35, 0xf8, 0xf0, 0x22, 0x12, 0x9b, 0x45, 0x3a, 0x59, 0x77, - 0x13, 0xac, 0xf4, 0x10, 0x65, 0x56, 0x04, 0x86, 0xc5, 0xdc, 0x3e, 0xa6, 0x0c, 0xf5, 0x7d, 0xce, - 0xd4, 0x84, 0xf1, 0x76, 0x68, 0xd6, 0xa5, 0xb5, 0x15, 0x19, 0xe5, 0x30, 0x2d, 0xb0, 0x30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, 0x97, 0x77, 0x31, 0x7c, 0x00, 0x6e, 0x37, 0xf6, 0x6a, 0xfb, - 0xf5, 0x86, 0x61, 0x7d, 0xbc, 0x67, 0x36, 0x1b, 0x35, 0x7d, 0x47, 0x6f, 0xd4, 0xb3, 0xb1, 0xfc, - 0xca, 0xf1, 0x49, 0xe9, 0x32, 0x13, 0x7c, 0x1f, 0xac, 0x44, 0xea, 0x1d, 0xfd, 0xd3, 0x46, 0xdd, - 0x6a, 0xee, 0xeb, 0x7b, 0x2d, 0x6b, 0xbb, 0xaa, 0x67, 0x95, 0xfc, 0xbd, 0xe3, 0x93, 0xd2, 0x55, - 0x66, 0xb8, 0x06, 0xb2, 0x91, 0xa9, 0xa5, 0xd7, 0x76, 0x79, 0x48, 0x3c, 0x9f, 0x3b, 0x3e, 0x29, - 0xbd, 0xa2, 0xcf, 0x27, 0x9f, 0x7d, 0x5f, 0x88, 0x55, 0x3f, 0x7a, 0x3e, 0x2a, 0x28, 0x2f, 0x46, - 0x05, 0xe5, 0xe5, 0xa8, 0xa0, 0xfc, 0x31, 0x2a, 0x28, 0x5f, 0x9f, 0x17, 0x62, 0x2f, 0xcf, 0x0b, - 0xb1, 0x5f, 0xcf, 0x0b, 0xb1, 0xcf, 0xb4, 0x7f, 0x01, 0x97, 0xfc, 0xcb, 0xc8, 0xd1, 0x6a, 0xa7, - 0xb8, 0xc7, 0xa3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x64, 0x23, 0x8c, 0x4e, 0x0a, 0x00, - 0x00, + // 1098 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xda, 0x8e, 0x63, 0x4f, 0xfe, 0xe0, 0x4e, 0x4d, 0xb3, 0x75, 0x8b, 0x6d, 0x45, 0x1c, + 0x4c, 0xa4, 0x78, 0xdb, 0x54,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 0x40, 0xae, 0x67, 0xb9, 0x8e, + 0xaa, 0x94, 0x94, 0x72, 0xa6, 0x7a, 0x67, 0x34, 0x2c, 0xc2, 0xfa, 0x45, 0xbc, 0x16, 0x86, 0xf5, + 0xba, 0x01, 0x9d, 0x59, 0x9f, 0x03, 0x3f, 0x00, 0xf7, 0xa7, 0x2a, 0x11, 0x8f, 0x05, 0xc8, 0x66, + 0x16, 0x72, 0x9c, 0x00, 0x53, 0xaa, 0xc6, 0xc3, 0x8a, 0x46, 0x7e, 0x32, 0x53, 0x42, 0xb6, 0x05, + 0x62, 0x0b, 0x9c, 0x9d, 0xae, 0xa7, 0x78, 0x5b, 0xfa, 0xea, 0x99, 0x02, 0xde, 0x32, 0xdd, 0xae, + 0x87, 0x7a, 0x75, 0x7c, 0xe8, 0x72, 0x38, 0x7c, 0x0f, 0x64, 0x28, 0x77, 0x5d, 0x34, 0xb8, 0x38, + 0x1a, 0x16, 0xd3, 0x02, 0xa7, 0xd7, 0x8d, 0xb4, 0x08, 0xeb, 0x0e, 0xac, 0x02, 0x48, 0x49, 0x87, + 0x59, 0x4e, 0x94, 0x6c, 0xb5, 0x7d, 0xd1, 0x42, 0xb2, 0x9a, 0x1b, 0x0d, 0x8b, 0x59, 0x93, 0x74, + 0xd8, 0xb8, 0x72, 0xb5, 0x69, 0x1a, 0x59, 0x3a, 0xe5, 0xf1, 0x69, 0x58, 0xe3, 0x00, 0x05, 0xce, + 0x4c, 0x8d, 0xc4, 0x45, 0x8d, 0x27, 0x28, 0x70, 0xa6, 0x6b, 0x1c, 0x4c, 0x79, 0x7c, 0xba, 0x95, + 0xfc, 0xeb, 0xdb, 0xa2, 0xb2, 0xfa, 0x9b, 0x02, 0xe6, 0xeb, 0xd8, 0x27, 0xd4, 0x65, 0xe1, 0x10, + 0x42, 0x0e, 0xd1, 0x10, 0x49, 0x31, 0x44, 0x8b, 0x3b, 0xc3, 0x21, 0x44, 0x58, 0x77, 0xe0, 0x26, + 0xc8, 0x38, 0x22, 0x8b, 0x04, 0x62, 0x7d, 0x55, 0xf5, 0x97, 0xd3, 0xf5, 0x9c, 0xa4, 0x5f, 0xae, + 0xcd, 0x64, 0x81, 0xeb, 0x75, 0x8d, 0x0b, 0x28, 0x3c, 0x00, 0x29, 0xd4, 0x27, 0x03, 0x8f, 0xa9, + 0x89, 0x52, 0xa2, 0xbc, 0xb0, 0x71, 0xb7, 0x22, 0x33, 0x42, 0x75, 0x45, 0x2a, 0xac, 0xd4, 0x88, + 0xeb, 0x55, 0x1f, 0xbf, 0x18, 0x16, 0x63, 0x3f, 0xfe, 0x5e, 0x2c, 0x77, 0x5d, 0x76, 0x30, 0x68, + 0x57, 0x6c, 0xd2, 0x97, 0xea, 0x92, 0xbf, 0xd6, 0xa9, 0xf3, 0x54, 0x63, 0x47, 0x3e, 0xa6, 0x3c, + 0x81, 0x3e, 0xff, 0xf3, 0xa7, 0x35, 0xc5, 0x90, 0xf5, 0xe5, 0x78, 0x3f, 0x27, 0x41, 0x4a, 0xb4, + 0x0f, 0xef, 0x80, 0xf8, 0x78, 0xac, 0xd4, 0x68, 0x58, 0x8c, 0xeb, 0x75, 0x23, 0xee, 0x3a, 0x30, + 0x0f, 0xd2, 0x14, 0x7f, 0x31, 0xc0, 0x9e, 0x8d, 0x05, 0x0b, 0xc6, 0xd8, 0x86, 0x9b, 0x60, 0x2e, + 0x08, 0x49, 0xe7, 0xab, 0x5d, 0xd8, 0xc8, 0x55, 0x84, 0x74, 0x2b, 0x91, 0x74, 0x2b, 0xdb, 0xde, + 0x51, 0x75, 0x42, 0x1b, 0x86, 0x80, 0xc3, 0x4d, 0x30, 0x8f, 0x3d, 0x9b, 0x38, 0x38, 0x50, 0x93, + 0x25, 0xa5, 0xbc, 0xbc, 0x71, 0xbf, 0x72, 0xc9, 0xd7, 0x56, 0x69, 0x08, 0x8c, 0x11, 0x81, 0xe1, + 0x63, 0x90, 0xe9, 0x60, 0x6c, 0xf9, 0xe8, 0x08, 0x07, 0xea, 0xdc, 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97, 0xfc, 0x92, 0x75, 0xae, 0xfd, 0xa0, 0x80, 0x79, + 0x79, 0x17, 0xc3, 0x07, 0xe0, 0x76, 0x63, 0xaf, 0xb6, 0x5f, 0x6f, 0x18, 0xd6, 0xc7, 0x7b, 0x66, + 0xb3, 0x51, 0xd3, 0x77, 0xf4, 0x46, 0x3d, 0x1b, 0xcb, 0xaf, 0x1c, 0x9f, 0x94, 0x2e, 0x0b, 0xc1, + 0xf7, 0xc1, 0x4a, 0xe4, 0xde, 0xd1, 0x3f, 0x6d, 0xd4, 0xad, 0xe6, 0xbe, 0xbe, 0xd7, 0xb2, 0xb6, + 0xab, 0x7a, 0x56, 0xc9, 0xdf, 0x3b, 0x3e, 0x29, 0x5d, 0x15, 0x86, 0x6b, 0x20, 0x1b, 0x85, 0x5a, + 0x7a, 0x6d, 0x97, 0xa7, 0xc4, 0xf3, 0xb9, 0xe3, 0x93, 0xd2, 0x2b, 0xfe, 0x7c, 0xf2, 0xd9, 0xf7, + 0x85, 0x58, 0xf5, 0xa3, 0xe7, 0xa3, 0x82, 0xf2, 0x62, 0x54, 0x50, 0x5e, 0x8e, 0x0a, 0xca, 0x1f, + 0xa3, 0x82, 0xf2, 0xf5, 0x79, 0x21, 0xf6, 0xf2, 0xbc, 0x10, 0xfb, 0xf5, 0xbc, 0x10, 0xfb, 0x4c, + 0xfb, 0x17, 0x74, 0xc9, 0x7f, 0x09, 0x39, 0x5b, 0xed, 0x14, 0x47, 0x3c, 0xfa, 0x27, 0x00, 0x00, + 0xff, 0xff, 0xf3, 0x4d, 0xa4, 0x54, 0x2e, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { From 73ac482d8baa30fb7a987735eaddf88bac813e1f Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 1 Nov 2024 14:27:19 +0700 Subject: [PATCH 198/272] rename timestamp to last interval --- api/band/tunnel/v1beta1/tunnel.pulsar.go | 221 +++++++++++------------ proto/band/tunnel/v1beta1/tunnel.proto | 5 +- x/tunnel/keeper/genesis_test.go | 2 +- x/tunnel/keeper/latest_signal_prices.go | 2 +- x/tunnel/keeper/packet.go | 2 +- x/tunnel/keeper/tunnel_test.go | 2 +- x/tunnel/types/signal.go | 12 +- x/tunnel/types/tunnel.pb.go | 164 +++++++++-------- 8 files changed, 202 insertions(+), 208 deletions(-) diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index 03b8a4b03..8ad4e9c45 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -2808,10 +2808,10 @@ func (x *_LatestSignalPrices_2_list) IsValid() bool { } var ( - md_LatestSignalPrices protoreflect.MessageDescriptor - fd_LatestSignalPrices_tunnel_id protoreflect.FieldDescriptor - fd_LatestSignalPrices_signal_prices protoreflect.FieldDescriptor - fd_LatestSignalPrices_last_interval_timestamp protoreflect.FieldDescriptor + md_LatestSignalPrices protoreflect.MessageDescriptor + fd_LatestSignalPrices_tunnel_id protoreflect.FieldDescriptor + fd_LatestSignalPrices_signal_prices protoreflect.FieldDescriptor + fd_LatestSignalPrices_last_interval protoreflect.FieldDescriptor ) func init() { @@ -2819,7 +2819,7 @@ func init() { md_LatestSignalPrices = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestSignalPrices") fd_LatestSignalPrices_tunnel_id = md_LatestSignalPrices.Fields().ByName("tunnel_id") fd_LatestSignalPrices_signal_prices = md_LatestSignalPrices.Fields().ByName("signal_prices") - fd_LatestSignalPrices_last_interval_timestamp = md_LatestSignalPrices.Fields().ByName("last_interval_timestamp") + fd_LatestSignalPrices_last_interval = md_LatestSignalPrices.Fields().ByName("last_interval") } var _ protoreflect.Message = (*fastReflection_LatestSignalPrices)(nil) @@ -2899,9 +2899,9 @@ func (x *fastReflection_LatestSignalPrices) Range(f func(protoreflect.FieldDescr return } } - if x.LastIntervalTimestamp != int64(0) { - value := protoreflect.ValueOfInt64(x.LastIntervalTimestamp) - if !f(fd_LatestSignalPrices_last_interval_timestamp, value) { + if x.LastInterval != int64(0) { + value := protoreflect.ValueOfInt64(x.LastInterval) + if !f(fd_LatestSignalPrices_last_interval, value) { return } } @@ -2924,8 +2924,8 @@ func (x *fastReflection_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) return x.TunnelId != uint64(0) case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": return len(x.SignalPrices) != 0 - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": - return x.LastIntervalTimestamp != int64(0) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + return x.LastInterval != int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -2946,8 +2946,8 @@ func (x *fastReflection_LatestSignalPrices) Clear(fd protoreflect.FieldDescripto x.TunnelId = uint64(0) case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": x.SignalPrices = nil - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": - x.LastIntervalTimestamp = int64(0) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + x.LastInterval = int64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -2973,8 +2973,8 @@ func (x *fastReflection_LatestSignalPrices) Get(descriptor protoreflect.FieldDes } listValue := &_LatestSignalPrices_2_list{list: &x.SignalPrices} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": - value := x.LastIntervalTimestamp + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + value := x.LastInterval return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { @@ -3002,8 +3002,8 @@ func (x *fastReflection_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, lv := value.List() clv := lv.(*_LatestSignalPrices_2_list) x.SignalPrices = *clv.list - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": - x.LastIntervalTimestamp = value.Int() + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + x.LastInterval = value.Int() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -3032,8 +3032,8 @@ func (x *fastReflection_LatestSignalPrices) Mutable(fd protoreflect.FieldDescrip return protoreflect.ValueOfList(value) case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": - panic(fmt.Errorf("field last_interval_timestamp of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + panic(fmt.Errorf("field last_interval of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) @@ -3052,7 +3052,7 @@ func (x *fastReflection_LatestSignalPrices) NewField(fd protoreflect.FieldDescri case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": list := []*SignalPrice{} return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &list}) - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval_timestamp": + case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { @@ -3132,8 +3132,8 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.LastIntervalTimestamp != 0 { - n += 1 + runtime.Sov(uint64(x.LastIntervalTimestamp)) + if x.LastInterval != 0 { + n += 1 + runtime.Sov(uint64(x.LastInterval)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -3164,8 +3164,8 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.LastIntervalTimestamp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.LastIntervalTimestamp)) + if x.LastInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.LastInterval)) i-- dAtA[i] = 0x18 } @@ -3294,9 +3294,9 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastIntervalTimestamp", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastInterval", wireType) } - x.LastIntervalTimestamp = 0 + x.LastInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3306,7 +3306,7 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.LastIntervalTimestamp |= int64(b&0x7F) << shift + x.LastInterval |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -5916,9 +5916,8 @@ type LatestSignalPrices struct { TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // signal_prices is the list of signal prices SignalPrices []*SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` - // last_interval_timestamp is the timestamp when the signal prices were updated - // because the specified interval was reached. - LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` + // last_interval is the last interval when the signal prices are produced by interval trigger + LastInterval int64 `protobuf:"varint,3,opt,name=last_interval,json=lastInterval,proto3" json:"last_interval,omitempty"` } func (x *LatestSignalPrices) Reset() { @@ -5955,9 +5954,9 @@ func (x *LatestSignalPrices) GetSignalPrices() []*SignalPrice { return nil } -func (x *LatestSignalPrices) GetLastIntervalTimestamp() int64 { +func (x *LatestSignalPrices) GetLastInterval() int64 { if x != nil { - return x.LastIntervalTimestamp + return x.LastInterval } return 0 } @@ -6261,7 +6260,7 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, - 0xca, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0xb7, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, @@ -6269,86 +6268,84 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x36, - 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x15, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, - 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, - 0x1f, 0x01, 0x22, 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, - 0x12, 0x75, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, - 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x02, - 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, - 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x4b, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, - 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, - 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, - 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, - 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, - 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, - 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, - 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, - 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, - 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, - 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, - 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, - 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, - 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, - 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, - 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, - 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, - 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, + 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, + 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, + 0x65, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x02, 0x0a, 0x06, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0d, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, + 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, + 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, + 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, + 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, + 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, + 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, + 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, + 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, + 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, + 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, + 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, + 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, + 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, + 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index 46ca0d1ff..f3fcb4b1e 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -88,9 +88,8 @@ message LatestSignalPrices { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // signal_prices is the list of signal prices repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; - // last_interval_timestamp is the timestamp when the signal prices were updated - // because the specified interval was reached. - int64 last_interval_timestamp = 3; + // last_interval is the last interval when the signal prices are produced by interval trigger + int64 last_interval = 3; } // SignalPrice is the type for a signal price diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index 00ce6b15d..10ec2f03c 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -160,7 +160,7 @@ func (s *KeeperTestSuite) TestInitExportGenesis() { SignalPrices: []types.SignalPrice{ {SignalID: "ETH", Price: 5000}, }, - LastIntervalTimestamp: 0, + LastInterval: 0, }, }, TotalFees: types.TotalFees{ diff --git a/x/tunnel/keeper/latest_signal_prices.go b/x/tunnel/keeper/latest_signal_prices.go index 2fb892deb..dbbb2e4c2 100644 --- a/x/tunnel/keeper/latest_signal_prices.go +++ b/x/tunnel/keeper/latest_signal_prices.go @@ -56,7 +56,7 @@ func (k Keeper) UpdateLastInterval(ctx sdk.Context, tunnelID uint64, timestamp i return err } - latestSignalPrices.LastIntervalTimestamp = timestamp + latestSignalPrices.LastInterval = timestamp k.SetLatestSignalPrices(ctx, latestSignalPrices) return nil diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 92e7e0cc8..97e094890 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -109,7 +109,7 @@ func (k Keeper) ProducePacket( } // check if the interval has passed - isIntervalReached := unixNow >= int64(tunnel.Interval)+latestSignalPrices.LastIntervalTimestamp + isIntervalReached := unixNow >= int64(tunnel.Interval)+latestSignalPrices.LastInterval sendAll = sendAll || isIntervalReached // generate new signal prices; if no new signal prices, stop the process. diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/tunnel_test.go index 834a6a70f..922b7d832 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/tunnel_test.go @@ -42,7 +42,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { {SignalID: "BTC", Price: 0}, {SignalID: "ETH", Price: 0}, }, - LastIntervalTimestamp: 0, + LastInterval: 0, } s.accountKeeper.EXPECT(). diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index d6991d7c8..3236314da 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -19,12 +19,12 @@ func NewSignalDeviation( func NewLatestSignalPrices( tunnelID uint64, signalPrices []SignalPrice, - lastIntervalTimestamp int64, + lastInterval int64, ) LatestSignalPrices { return LatestSignalPrices{ - TunnelID: tunnelID, - SignalPrices: signalPrices, - LastIntervalTimestamp: lastIntervalTimestamp, + TunnelID: tunnelID, + SignalPrices: signalPrices, + LastInterval: lastInterval, } } @@ -36,8 +36,8 @@ func (l LatestSignalPrices) Validate() error { if len(l.SignalPrices) == 0 { return fmt.Errorf("signal prices cannot be empty") } - if l.LastIntervalTimestamp < 0 { - return fmt.Errorf("timestamp cannot be negative") + if l.LastInterval < 0 { + return fmt.Errorf("last interval cannot be negative") } return nil } diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 2969264cf..5acbd53d7 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -386,9 +386,8 @@ type LatestSignalPrices struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // signal_prices is the list of signal prices SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` - // last_interval_timestamp is the timestamp when the signal prices were updated - // because the specified interval was reached. - LastIntervalTimestamp int64 `protobuf:"varint,3,opt,name=last_interval_timestamp,json=lastIntervalTimestamp,proto3" json:"last_interval_timestamp,omitempty"` + // last_interval is the last interval when the signal prices are produced by interval trigger + LastInterval int64 `protobuf:"varint,3,opt,name=last_interval,json=lastInterval,proto3" json:"last_interval,omitempty"` } func (m *LatestSignalPrices) Reset() { *m = LatestSignalPrices{} } @@ -438,9 +437,9 @@ func (m *LatestSignalPrices) GetSignalPrices() []SignalPrice { return nil } -func (m *LatestSignalPrices) GetLastIntervalTimestamp() int64 { +func (m *LatestSignalPrices) GetLastInterval() int64 { if m != nil { - return m.LastIntervalTimestamp + return m.LastInterval } return 0 } @@ -708,76 +707,75 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 1098 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 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 0xd4, 0x65, 0xe1, 0x10, - 0x42, 0x0e, 0xd1, 0x10, 0x49, 0x31, 0x44, 0x8b, 0x3b, 0xc3, 0x21, 0x44, 0x58, 0x77, 0xe0, 0x26, - 0xc8, 0x38, 0x22, 0x8b, 0x04, 0x62, 0x7d, 0x55, 0xf5, 0x97, 0xd3, 0xf5, 0x9c, 0xa4, 0x5f, 0xae, - 0xcd, 0x64, 0x81, 0xeb, 0x75, 0x8d, 0x0b, 0x28, 0x3c, 0x00, 0x29, 0xd4, 0x27, 0x03, 0x8f, 0xa9, - 0x89, 0x52, 0xa2, 0xbc, 0xb0, 0x71, 0xb7, 0x22, 0x33, 0x42, 0x75, 0x45, 0x2a, 0xac, 0xd4, 0x88, - 0xeb, 0x55, 0x1f, 0xbf, 0x18, 0x16, 0x63, 0x3f, 0xfe, 0x5e, 0x2c, 0x77, 0x5d, 0x76, 0x30, 0x68, - 0x57, 0x6c, 0xd2, 0x97, 0xea, 0x92, 0xbf, 0xd6, 0xa9, 0xf3, 0x54, 0x63, 0x47, 0x3e, 0xa6, 0x3c, - 0x81, 0x3e, 0xff, 0xf3, 0xa7, 0x35, 0xc5, 0x90, 0xf5, 0xe5, 0x78, 0x3f, 0x27, 0x41, 0x4a, 0xb4, - 0x0f, 0xef, 0x80, 0xf8, 0x78, 0xac, 0xd4, 0x68, 0x58, 0x8c, 0xeb, 0x75, 0x23, 0xee, 0x3a, 0x30, - 0x0f, 0xd2, 0x14, 0x7f, 0x31, 0xc0, 0x9e, 0x8d, 0x05, 0x0b, 0xc6, 0xd8, 0x86, 0x9b, 0x60, 0x2e, - 0x08, 0x49, 0xe7, 0xab, 0x5d, 0xd8, 0xc8, 0x55, 0x84, 0x74, 0x2b, 0x91, 0x74, 0x2b, 0xdb, 0xde, - 0x51, 0x75, 0x42, 0x1b, 0x86, 0x80, 0xc3, 0x4d, 0x30, 0x8f, 0x3d, 0x9b, 0x38, 0x38, 0x50, 0x93, - 0x25, 0xa5, 0xbc, 0xbc, 0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0xe4, 0x7e, 0x46, 0xa9, 0xa4, 0x65, 0x9c, 0x6d, 0x64, 0x64, 0x79, 0xdd, 0xb9, 0xf2, 0x25, - 0x8f, 0xff, 0xef, 0x2f, 0x79, 0xe2, 0xda, 0x97, 0xfc, 0x92, 0x75, 0xae, 0xfd, 0xa0, 0x80, 0x79, - 0x79, 0x17, 0xc3, 0x07, 0xe0, 0x76, 0x63, 0xaf, 0xb6, 0x5f, 0x6f, 0x18, 0xd6, 0xc7, 0x7b, 0x66, - 0xb3, 0x51, 0xd3, 0x77, 0xf4, 0x46, 0x3d, 0x1b, 0xcb, 0xaf, 0x1c, 0x9f, 0x94, 0x2e, 0x0b, 0xc1, - 0xf7, 0xc1, 0x4a, 0xe4, 0xde, 0xd1, 0x3f, 0x6d, 0xd4, 0xad, 0xe6, 0xbe, 0xbe, 0xd7, 0xb2, 0xb6, - 0xab, 0x7a, 0x56, 0xc9, 0xdf, 0x3b, 0x3e, 0x29, 0x5d, 0x15, 0x86, 0x6b, 0x20, 0x1b, 0x85, 0x5a, - 0x7a, 0x6d, 0x97, 0xa7, 0xc4, 0xf3, 0xb9, 0xe3, 0x93, 0xd2, 0x2b, 0xfe, 0x7c, 0xf2, 0xd9, 0xf7, - 0x85, 0x58, 0xf5, 0xa3, 0xe7, 0xa3, 0x82, 0xf2, 0x62, 0x54, 0x50, 0x5e, 0x8e, 0x0a, 0xca, 0x1f, - 0xa3, 0x82, 0xf2, 0xf5, 0x79, 0x21, 0xf6, 0xf2, 0xbc, 0x10, 0xfb, 0xf5, 0xbc, 0x10, 0xfb, 0x4c, - 0xfb, 0x17, 0x74, 0xc9, 0x7f, 0x09, 0x39, 0x5b, 0xed, 0x14, 0x47, 0x3c, 0xfa, 0x27, 0x00, 0x00, - 0xff, 0xff, 0xf3, 0x4d, 0xa4, 0x54, 0x2e, 0x0a, 0x00, 0x00, + // 1088 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0xda, 0x8e, 0x63, 0x4f, 0x3e, 0x70, 0xa7, 0x56, 0xbb, 0x75, 0x8b, 0x6d, 0x05, 0x0e, + 0xa6, 0x52, 0xbc, 0x6d, 0xaa, 0x46, 0x28, 0x27, 0xe2, 0x8f, 0xa8, 0xab, 0x40, 0x62, 0xad, 0x8d, + 0x40, 0x5c, 0x56, 0xe3, 0xdd, 0xb1, 0xb3, 0xd4, 0x99, 0x59, 0x76, 0xc6, 0x11, 0xf9, 0x07, 0x55, + 0xc4, 0x81, 0x3f, 0x10, 0x84, 0xe0, 0x40, 0xc5, 0x89, 0x43, 0x24, 0x7e, 0x01, 0x52, 0x95, 0x53, + 0xc5, 0x89, 0x03, 0x32, 0xc8, 0x39, 0xc0, 0x6f, 0xe0, 0x84, 0x76, 0x66, 0xd6, 0xb1, 0xdd, 0xa4, + 0x21, 0x02, 0x2e, 0x49, 0xde, 0xe7, 0xfd, 0x98, 0xf7, 0x7d, 0x9f, 0x67, 0x67, 0x02, 0x4a, 0x1d, + 0x44, 0x5c, 0x83, 0x0f, 0x08, 0xc1, 0x7d, 0xe3, 0xe0, 0x61, 0x07, 0x73, 0xf4, 0x50, 0x99, 0x15, + 0x3f, 0xa0, 0x9c, 0xc2, 0x9b, 0x61, 0x44, 0x45, 0x41, 0x2a, 0x22, 0x7f, 0x03, 0xed, 0x7b, 0x84, + 0x1a, 0xe2, 0xa7, 0x8c, 0xcb, 0x17, 0x1c, 0xca, 0xf6, 0x29, 0x33, 0x3a, 0x88, 0xe1, 0x71, 0x25, + 0x87, 0x7a, 0x44, 0xf9, 0xef, 0x48, 0xbf, 0x2d, 0x2c, 0x43, 0x1a, 0xca, 0x95, 0xeb, 0xd1, 0x1e, + 0x95, 0x78, 0xf8, 0x57, 0x94, 0xd0, 0xa3, 0xb4, 0xd7, 0xc7, 0x86, 0xb0, 0x3a, 0x83, 0xae, 0x81,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78, 0x64, 0x7c, 0x2e, 0x70, 0xce, 0x98, 0xa2, 0x65, 0x9c, 0x6d, 0x65, 0x54, + 0x79, 0xd3, 0xbd, 0xf4, 0xd9, 0x8e, 0xff, 0xe7, 0xcf, 0x76, 0xe2, 0xca, 0x67, 0xfb, 0x82, 0x75, + 0xde, 0xff, 0x4e, 0x03, 0xf3, 0xea, 0xe2, 0x85, 0x0f, 0xc0, 0xcd, 0xc6, 0x4e, 0x6d, 0xb7, 0xde, + 0xb0, 0xec, 0x0f, 0x77, 0x5a, 0xcd, 0x46, 0xcd, 0xdc, 0x32, 0x1b, 0xf5, 0x6c, 0x2c, 0x7f, 0xfb, + 0xe8, 0xb8, 0x74, 0x91, 0x0b, 0xbe, 0x0b, 0x6e, 0x47, 0xf0, 0x96, 0xf9, 0x71, 0xa3, 0x6e, 0x37, + 0x77, 0xcd, 0x9d, 0xb6, 0xbd, 0x59, 0x35, 0xb3, 0x5a, 0xfe, 0xee, 0xd1, 0x71, 0xe9, 0x32, 0x37, + 0xbc, 0x0f, 0xb2, 0x91, 0xab, 0x6d, 0xd6, 0xb6, 0x45, 0x4a, 0x3c, 0x9f, 0x3b, 0x3a, 0x2e, 0xbd, + 0x82, 0xe7, 0x93, 0xcf, 0xbe, 0x2d, 0xc4, 0xaa, 0x1f, 0x3c, 0x1f, 0x15, 0xb4, 0x17, 0xa3, 0x82, + 0xf6, 0x72, 0x54, 0xd0, 0x7e, 0x1f, 0x15, 0xb4, 0x2f, 0xcf, 0x0a, 0xb1, 0x97, 0x67, 0x85, 0xd8, + 0x2f, 0x67, 0x85, 0xd8, 0x27, 0xc6, 0x3f, 0xa0, 0x4b, 0xfd, 0xff, 0x27, 0xd8, 0xea, 0xa4, 0x44, + 0xc4, 0xa3, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xae, 0xc9, 0x76, 0x58, 0x1b, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -966,7 +964,7 @@ func (this *LatestSignalPrices) Equal(that interface{}) bool { return false } } - if this.LastIntervalTimestamp != that1.LastIntervalTimestamp { + if this.LastInterval != that1.LastInterval { return false } return true @@ -1356,8 +1354,8 @@ func (m *LatestSignalPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.LastIntervalTimestamp != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.LastIntervalTimestamp)) + if m.LastInterval != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.LastInterval)) i-- dAtA[i] = 0x18 } @@ -1696,8 +1694,8 @@ func (m *LatestSignalPrices) Size() (n int) { n += 1 + l + sovTunnel(uint64(l)) } } - if m.LastIntervalTimestamp != 0 { - n += 1 + sovTunnel(uint64(m.LastIntervalTimestamp)) + if m.LastInterval != 0 { + n += 1 + sovTunnel(uint64(m.LastInterval)) } return n } @@ -2573,9 +2571,9 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastIntervalTimestamp", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastInterval", wireType) } - m.LastIntervalTimestamp = 0 + m.LastInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2585,7 +2583,7 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastIntervalTimestamp |= int64(b&0x7F) << shift + m.LastInterval |= int64(b&0x7F) << shift if b < 0x80 { break } From 42d4513c2e60df013ac38d9288c9cf4992d3e2f7 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 4 Nov 2024 16:37:42 +0700 Subject: [PATCH 199/272] add produce packet event --- x/tunnel/keeper/packet.go | 7 +++++++ x/tunnel/types/events.go | 2 ++ 2 files changed, 9 insertions(+) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 97e094890..b70b7a56a 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -142,6 +142,13 @@ func (k Keeper) ProducePacket( } } + // emit an event + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeProducePacketSuccess, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", tunnel.Sequence)), + )) + return nil } diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 28f0e08f9..06dd19a45 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -9,9 +9,11 @@ const ( EventTypeDeactivate = "deactivate" EventTypeTriggerTunnel = "trigger_tunnel" EventTypeProducePacketFail = "produce_packet_fail" + EventTypeProducePacketSuccess = "produce_packet_success" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" + AttributeKeySequence = "sequence" AttributeKeyInterval = "interval" AttributeKeyRoute = "route" AttributeKeyEncoder = "encoder" From 369df1987488b83a681836b847c81411da9050f3 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 4 Nov 2024 23:47:27 +0700 Subject: [PATCH 200/272] fix import --- x/tunnel/types/expected_keepers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index b281238db..e7bdca41f 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -1,7 +1,7 @@ package types import ( - context "context" + "context" sdk "github.com/cosmos/cosmos-sdk/types" From c4dd726febc66c2453b44fab52a7d7f138ccef85 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 5 Nov 2024 00:06:41 +0700 Subject: [PATCH 201/272] add more test-case --- x/tunnel/keeper/deposit_test.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index 0cd6a62c2..61deaae95 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -54,16 +54,24 @@ func (s *KeeperTestSuite) TestGetSetDeposit() { func (s *KeeperTestSuite) TestGetDeposits() { ctx, k := s.ctx, s.keeper - tunnelID := uint64(1) + tunnelID1 := uint64(1) + tunnelID2 := uint64(2) + depositorAddr := sdk.AccAddress([]byte("depositor")) depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))) - deposit := types.Deposit{TunnelID: tunnelID, Depositor: depositorAddr.String(), Amount: depositAmount} - k.SetDeposit(ctx, deposit) + // add a deposit + deposit1 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr.String(), Amount: depositAmount} + k.SetDeposit(ctx, deposit1) + + // add another deposit + deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr.String(), Amount: depositAmount} + k.SetDeposit(ctx, deposit2) - deposits := k.GetDeposits(ctx, tunnelID) + deposits := k.GetDeposits(ctx, tunnelID2) s.Require().Len(deposits, 1) - s.Require().Equal(deposit, deposits[0]) + s.Require().Equal(deposit1, deposits[0]) + s.Require().Equal(deposit2, deposits[1]) } func (s *KeeperTestSuite) TestGetAllDeposits() { From 02b98bc92da205179c36c338f880aaff2f1aea30 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 5 Nov 2024 00:47:49 +0700 Subject: [PATCH 202/272] update test --- x/tunnel/keeper/deposit_test.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index 61deaae95..713a63241 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -55,21 +55,22 @@ func (s *KeeperTestSuite) TestGetDeposits() { ctx, k := s.ctx, s.keeper tunnelID1 := uint64(1) - tunnelID2 := uint64(2) - depositorAddr := sdk.AccAddress([]byte("depositor")) + depositorAddr1 := sdk.AccAddress([]byte("depositor1")) + depositorAddr2 := sdk.AccAddress([]byte("depositor2")) + depositAmount := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))) // add a deposit - deposit1 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr.String(), Amount: depositAmount} + deposit1 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr1.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit1) // add another deposit - deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr.String(), Amount: depositAmount} + deposit2 := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr2.String(), Amount: depositAmount} k.SetDeposit(ctx, deposit2) - deposits := k.GetDeposits(ctx, tunnelID2) - s.Require().Len(deposits, 1) + deposits := k.GetDeposits(ctx, tunnelID1) + s.Require().Len(deposits, 2) s.Require().Equal(deposit1, deposits[0]) s.Require().Equal(deposit2, deposits[1]) } @@ -85,7 +86,7 @@ func (s *KeeperTestSuite) TestGetAllDeposits() { k.SetDeposit(ctx, deposit1) tunnelID2 := uint64(2) - depositorAddr2 := sdk.AccAddress([]byte("depositor")) + depositorAddr2 := sdk.AccAddress([]byte("depositor2")) depositAmount2 := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(200))) deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr2.String(), Amount: depositAmount2} From c6e082cc26126eac5a9bf28feadf075ebc42b0d9 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Mon, 4 Nov 2024 16:53:52 +0700 Subject: [PATCH 203/272] fix address prefix --- x/bandtss/types/genesis_test.go | 10 +++++++++- x/bandtss/types/msgs_test.go | 6 +++--- x/tss/types/genesis_test.go | 13 ++++++++++--- x/tss/types/msgs_test.go | 2 +- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/x/bandtss/types/genesis_test.go b/x/bandtss/types/genesis_test.go index 48bc39e41..78801b211 100644 --- a/x/bandtss/types/genesis_test.go +++ b/x/bandtss/types/genesis_test.go @@ -5,13 +5,21 @@ import ( "github.com/stretchr/testify/require" + sdk "github.com/cosmos/cosmos-sdk/types" + + band "github.com/bandprotocol/chain/v3/app" "github.com/bandprotocol/chain/v3/x/bandtss/types" ) +func init() { + band.SetBech32AddressPrefixesAndBip44CoinTypeAndSeal(sdk.GetConfig()) + sdk.DefaultBondDenom = "uband" +} + func TestGenesisStateValidate(t *testing.T) { validMembers := []types.Member{ { - Address: "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8", + Address: "band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs", GroupID: 1, }, } diff --git a/x/bandtss/types/msgs_test.go b/x/bandtss/types/msgs_test.go index 8bdd5c470..7c69f49fd 100644 --- a/x/bandtss/types/msgs_test.go +++ b/x/bandtss/types/msgs_test.go @@ -14,11 +14,11 @@ import ( var ( validMembers = []string{ - "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8", - "cosmos1quh7acmun7tx6ywkvqr53m3fe39gxu9k00t4ds", + "band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs", + "band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun", } - validSender = "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8" + validSender = "band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs" ) // ==================================== diff --git a/x/tss/types/genesis_test.go b/x/tss/types/genesis_test.go index fd7520561..68b980b40 100644 --- a/x/tss/types/genesis_test.go +++ b/x/tss/types/genesis_test.go @@ -5,19 +5,26 @@ import ( "github.com/stretchr/testify/require" + sdk "github.com/cosmos/cosmos-sdk/types" + + band "github.com/bandprotocol/chain/v3/app" "github.com/bandprotocol/chain/v3/pkg/tss" "github.com/bandprotocol/chain/v3/pkg/tss/testutil" "github.com/bandprotocol/chain/v3/x/tss/types" ) +func init() { + band.SetBech32AddressPrefixesAndBip44CoinTypeAndSeal(sdk.GetConfig()) +} + func TestGenesisStateValidate(t *testing.T) { validTssPoint2 := tss.Point( testutil.HexDecode("02117a767c77af0b9630991393ccbfe96930008987ee315ce205ae8b004795ad41"), ) validMemberAddrs := []string{ - "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8", - "cosmos13jt28pf6s8rgjddv8wwj8v3ngrfsccpgsdhjhw", + "band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs", + "band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun", } validGroups := []types.Group{ @@ -46,7 +53,7 @@ func TestGenesisStateValidate(t *testing.T) { }, }, { - Address: "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8", + Address: "band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs", DE: types.DE{ PubD: validTssPoint2, PubE: validTssPoint2, diff --git a/x/tss/types/msgs_test.go b/x/tss/types/msgs_test.go index 80e145d59..9ab4f2aac 100644 --- a/x/tss/types/msgs_test.go +++ b/x/tss/types/msgs_test.go @@ -11,7 +11,7 @@ import ( ) var ( - validSender = "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8" + validSender = "band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs" validTssPoint = tss.Point( testutil.HexDecode("03a50a76f243836311dd2fbaaf8b5185f5f7f34bd4cb99ac7309af18f89703960b"), From 6e3cc1f4125b37f3163cead7eab949697c3f9519 Mon Sep 17 00:00:00 2001 From: colmazia Date: Fri, 1 Nov 2024 14:37:49 +0700 Subject: [PATCH 204/272] implement push txhash to bothan monitoring --- cmd/grogu/cmd/run.go | 1 + grogu/submitter/expected_types.go | 6 ++ grogu/submitter/submitter.go | 7 ++ grogu/submitter/submitter_test.go | 4 + .../submitter/testutil/expected_types_mock.go | 84 +++++++++++++++++++ 5 files changed, 102 insertions(+) diff --git a/cmd/grogu/cmd/run.go b/cmd/grogu/cmd/run.go index 34b153d61..d40b4166e 100644 --- a/cmd/grogu/cmd/run.go +++ b/cmd/grogu/cmd/run.go @@ -175,6 +175,7 @@ func createRunE(ctx *context.Context) func(cmd *cobra.Command, args []string) er submitterService, err := submitter.New( clientCtx, clients, + bothanService, l, submitSignalPriceCh, authQuerier, diff --git a/grogu/submitter/expected_types.go b/grogu/submitter/expected_types.go index 0df9b0f20..792a37011 100644 --- a/grogu/submitter/expected_types.go +++ b/grogu/submitter/expected_types.go @@ -5,12 +5,18 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" auth "github.com/cosmos/cosmos-sdk/x/auth/types" + + bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client" ) type RemoteClient interface { rpcclient.RemoteClient } +type BothanClient interface { + bothan.Client +} + type AuthQuerier interface { QueryAccount(address sdk.Address) (*auth.QueryAccountResponse, error) } diff --git a/grogu/submitter/submitter.go b/grogu/submitter/submitter.go index 661d9e358..55da26c92 100644 --- a/grogu/submitter/submitter.go +++ b/grogu/submitter/submitter.go @@ -28,6 +28,7 @@ type SignalPriceSubmission struct { type Submitter struct { clientCtx client.Context clients []rpcclient.RemoteClient + bothanClient BothanClient logger *logger.Logger submitSignalPriceCh <-chan SignalPriceSubmission authQuerier AuthQuerier @@ -46,6 +47,7 @@ type Submitter struct { func New( clientCtx client.Context, clients []rpcclient.RemoteClient, + bothanClient BothanClient, logger *logger.Logger, submitSignalPriceCh <-chan SignalPriceSubmission, authQuerier AuthQuerier, @@ -78,6 +80,7 @@ func New( return &Submitter{ clientCtx: clientCtx, clients: clients, + bothanClient: bothanClient, logger: logger, submitSignalPriceCh: submitSignalPriceCh, authQuerier: authQuerier, @@ -156,6 +159,10 @@ func (s *Submitter) submitPrice(pricesSubmission SignalPriceSubmission, keyID st switch { case finalizedTxResp.Code == 0: s.logger.Info("[Submitter] price submitted at %v", finalizedTxResp.TxHash) + err = s.bothanClient.PushMonitoringRecords(uuid, finalizedTxResp.TxHash) + if err != nil { + s.logger.Error("[Submitter] failed to push monitoring records: %v", err) + } return case finalizedTxResp.Codespace == sdkerrors.RootCodespace && finalizedTxResp.Code == sdkerrors.ErrOutOfGas.ABCICode(): s.logger.Info("[Submitter] transaction is out of gas, retrying with increased gas adjustment") diff --git a/grogu/submitter/submitter_test.go b/grogu/submitter/submitter_test.go index 5e78fc0bc..f0c61958a 100644 --- a/grogu/submitter/submitter_test.go +++ b/grogu/submitter/submitter_test.go @@ -124,6 +124,9 @@ func (s *SubmitterTestSuite) SetupTest() { mockRPCClients := []rpcclient.RemoteClient{mockClient} + mockBothanClient := testutil.NewMockBothanClient(ctrl) + mockBothanClient.EXPECT().PushMonitoringRecords(gomock.Any(), gomock.Any()).AnyTimes() + mockAuthQuerier := testutil.NewMockAuthQuerier(ctrl) mockAuthQuerier.EXPECT(). QueryAccount(gomock.Any()). @@ -157,6 +160,7 @@ func (s *SubmitterTestSuite) SetupTest() { submitterInstance, err := New( clientCtx, mockRPCClients, + mockBothanClient, l, submitSignalPriceCh, mockAuthQuerier, diff --git a/grogu/submitter/testutil/expected_types_mock.go b/grogu/submitter/testutil/expected_types_mock.go index a3fd5ff74..40e4ba8ed 100644 --- a/grogu/submitter/testutil/expected_types_mock.go +++ b/grogu/submitter/testutil/expected_types_mock.go @@ -13,6 +13,8 @@ import ( context "context" reflect "reflect" + price "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/price" + signal "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/signal" bytes "github.com/cometbft/cometbft/libs/bytes" log "github.com/cometbft/cometbft/libs/log" client "github.com/cometbft/cometbft/rpc/client" @@ -680,6 +682,88 @@ func (mr *MockRemoteClientMockRecorder) Validators(ctx, height, page, perPage an return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validators", reflect.TypeOf((*MockRemoteClient)(nil).Validators), ctx, height, page, perPage) } +// MockBothanClient is a mock of BothanClient interface. +type MockBothanClient struct { + ctrl *gomock.Controller + recorder *MockBothanClientMockRecorder + isgomock struct{} +} + +// MockBothanClientMockRecorder is the mock recorder for MockBothanClient. +type MockBothanClientMockRecorder struct { + mock *MockBothanClient +} + +// NewMockBothanClient creates a new mock instance. +func NewMockBothanClient(ctrl *gomock.Controller) *MockBothanClient { + mock := &MockBothanClient{ctrl: ctrl} + mock.recorder = &MockBothanClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBothanClient) EXPECT() *MockBothanClientMockRecorder { + return m.recorder +} + +// GetInfo mocks base method. +func (m *MockBothanClient) GetInfo() (*signal.GetInfoResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetInfo") + ret0, _ := ret[0].(*signal.GetInfoResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetInfo indicates an expected call of GetInfo. +func (mr *MockBothanClientMockRecorder) GetInfo() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInfo", reflect.TypeOf((*MockBothanClient)(nil).GetInfo)) +} + +// GetPrices mocks base method. +func (m *MockBothanClient) GetPrices(signalIDs []string) (*price.GetPricesResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPrices", signalIDs) + ret0, _ := ret[0].(*price.GetPricesResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetPrices indicates an expected call of GetPrices. +func (mr *MockBothanClientMockRecorder) GetPrices(signalIDs any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrices", reflect.TypeOf((*MockBothanClient)(nil).GetPrices), signalIDs) +} + +// PushMonitoringRecords mocks base method. +func (m *MockBothanClient) PushMonitoringRecords(uuid, txHash string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "PushMonitoringRecords", uuid, txHash) + ret0, _ := ret[0].(error) + return ret0 +} + +// PushMonitoringRecords indicates an expected call of PushMonitoringRecords. +func (mr *MockBothanClientMockRecorder) PushMonitoringRecords(uuid, txHash any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushMonitoringRecords", reflect.TypeOf((*MockBothanClient)(nil).PushMonitoringRecords), uuid, txHash) +} + +// UpdateRegistry mocks base method. +func (m *MockBothanClient) UpdateRegistry(ipfsHash, version string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateRegistry", ipfsHash, version) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateRegistry indicates an expected call of UpdateRegistry. +func (mr *MockBothanClientMockRecorder) UpdateRegistry(ipfsHash, version any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRegistry", reflect.TypeOf((*MockBothanClient)(nil).UpdateRegistry), ipfsHash, version) +} + // MockAuthQuerier is a mock of AuthQuerier interface. type MockAuthQuerier struct { ctrl *gomock.Controller From 98187787866c717c6468bfaa655bb62d1fe26e80 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 1 Nov 2024 18:15:10 +0700 Subject: [PATCH 205/272] fix address --- x/feeds/types/msgs_test.go | 15 ++++++++++----- x/restake/types/msgs_test.go | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/x/feeds/types/msgs_test.go b/x/feeds/types/msgs_test.go index 4b96fdd6f..2ee200f80 100644 --- a/x/feeds/types/msgs_test.go +++ b/x/feeds/types/msgs_test.go @@ -4,14 +4,19 @@ import ( "testing" "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" ) var ( - ValidValidator = "cosmosvaloper1vdhhxmt0wdmxzmr0wpjhyzzdttz" - ValidAuthority = "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8" - ValidAdmin = "cosmos1quh7acmun7tx6ywkvqr53m3fe39gxu9k00t4ds" - ValidDelegator = "cosmos13jt28pf6s8rgjddv8wwj8v3ngrfsccpgsdhjhw" - ValidSignals = []Signal{ + ValidAuthority = sdk.AccAddress("636f736d6f7331787963726763336838396e72737671776539337a63").String() + + ValidAdmin = sdk.AccAddress("1000000001").String() + ValidDelegator = sdk.AccAddress("1000000002").String() + + ValidValidator = sdk.ValAddress("2000000001").String() + + ValidSignals = []Signal{ { ID: "CS:BAND-USD", Power: 10000000000, diff --git a/x/restake/types/msgs_test.go b/x/restake/types/msgs_test.go index c80dfd59d..131498b0e 100644 --- a/x/restake/types/msgs_test.go +++ b/x/restake/types/msgs_test.go @@ -11,8 +11,8 @@ import ( ) var ( - ValidAddress = "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8" - ValidAuthority = "cosmos13jt28pf6s8rgjddv8wwj8v3ngrfsccpgsdhjhw" + ValidAddress = sdk.AccAddress("1000000001").String() + ValidAuthority = sdk.AccAddress("636f736d6f7331787963726763336838396e72737671776539337a63").String() ValidParams = Params{ AllowedDenoms: []string{"uband"}, } From 263eec9831b4cec4a0d76fe180f32a3e44df3510 Mon Sep 17 00:00:00 2001 From: colmazia Date: Fri, 1 Nov 2024 18:20:55 +0700 Subject: [PATCH 206/272] add push records to submitter --- cmd/grogu/cmd/run.go | 4 +-- go.mod | 16 +++++----- go.sum | 32 +++++++++---------- grogu/signaller/expected_types.go | 4 +-- grogu/signaller/signaller.go | 2 +- grogu/signaller/signaller_test.go | 10 +++--- .../signaller/testutil/expected_types_mock.go | 11 +++---- grogu/signaller/utils.go | 8 ++--- grogu/signaller/utils_test.go | 8 ++--- grogu/submitter/expected_types.go | 4 +-- grogu/submitter/submitter.go | 26 ++++++++++++--- grogu/submitter/submitter_test.go | 3 ++ .../submitter/testutil/expected_types_mock.go | 11 +++---- grogu/updater/expected_types.go | 4 +-- 14 files changed, 81 insertions(+), 62 deletions(-) diff --git a/cmd/grogu/cmd/run.go b/cmd/grogu/cmd/run.go index d40b4166e..21adecab3 100644 --- a/cmd/grogu/cmd/run.go +++ b/cmd/grogu/cmd/run.go @@ -18,7 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" - bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client" + bothanclient "github.com/bandprotocol/bothan/bothan-api/client/go-client" "github.com/bandprotocol/chain/v3/grogu/context" "github.com/bandprotocol/chain/v3/grogu/querier" @@ -123,7 +123,7 @@ func createRunE(ctx *context.Context) func(cmd *cobra.Command, args []string) er if err != nil { return err } - bothanService, err := bothan.NewGrpcClient(ctx.Config.Bothan, timeout) + bothanService, err := bothanclient.NewGrpcClient(ctx.Config.Bothan, timeout) if err != nil { return err } diff --git a/go.mod b/go.mod index 40085d407..587e4e0ee 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( cosmossdk.io/x/tx v0.13.5 cosmossdk.io/x/upgrade v0.1.4 github.com/Masterminds/semver/v3 v3.3.0 - github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.5 + github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.6 github.com/bandprotocol/go-owasm v0.3.1 github.com/bytecodealliance/wasmtime-go/v20 v20.0.0 github.com/cometbft/cometbft v0.38.12 @@ -48,8 +48,8 @@ require ( github.com/stretchr/testify v1.9.0 go.uber.org/mock v0.5.0 golang.org/x/crypto v0.26.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d - google.golang.org/grpc v1.66.2 + google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.35.1 ) @@ -57,7 +57,7 @@ require ( cloud.google.com/go v0.115.0 // indirect cloud.google.com/go/auth v0.6.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect cloud.google.com/go/iam v1.1.9 // indirect cloud.google.com/go/storage v1.41.0 // indirect cosmossdk.io/depinject v1.0.0 // indirect @@ -113,7 +113,7 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.2.1 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -129,7 +129,7 @@ require ( github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.5 // indirect @@ -201,7 +201,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/net v0.28.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.24.0 // indirect golang.org/x/term v0.23.0 // indirect @@ -209,7 +209,7 @@ require ( golang.org/x/time v0.5.0 // indirect google.golang.org/api v0.186.0 // indirect google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 91fd05c09..665d2ce7d 100644 --- a/go.sum +++ b/go.sum @@ -72,8 +72,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -266,8 +266,8 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.5 h1:m7iZwtZs4wQojDbdOm3UdtlFdv+bxAb/p2VzSz3KwlQ= -github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.5/go.mod h1:1rmnpKHjLxJ26zzcG8+v/L8AGXWR/bQm3s0qiB3t4L0= +github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.6 h1:xq2Pf48GQwxxzNFt7URfzDKIJL2ITC5lbMluG0g0H3M= +github.com/bandprotocol/bothan/bothan-api/client/go-client v0.0.1-alpha.6/go.mod h1:Qt5LDLwrFhLDQbLVBRd/yKyf2CNzHJlT+F+DEhnyqVE= github.com/bandprotocol/go-owasm v0.3.1 h1:L38qAEmb0KyTICHBHJaBoo6yy5+BlbOzQeQ+ioUV5Uw= github.com/bandprotocol/go-owasm v0.3.1/go.mod h1:SAzGihlBl8eZDXA1dO2aeAZLm8J2QkNd+KvnA2Dw9Kg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -533,8 +533,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -673,8 +673,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= @@ -1275,8 +1275,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1666,10 +1666,10 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 h1:6whtk83KtD3FkGrVb2hFXuQ+ZMbCNdakARIn/aHMmG8= google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094/go.mod h1:Zs4wYw8z1zr6RNF4cwYb31mvN/EGaKAdQjNCF3DW6K4= -google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d h1:Aqf0fiIdUQEj0Gn9mKFFXoQfTTEaNopWpfVyYADxiSg= -google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Od4k8V1LQSizPRUK4OzZ7TBE/20k+jPczUDAEyvn69Y= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1:2oV8dfuIkM1Ti7DwXc0BJfnwr9csz4TDXI9EmiI+Rbw= +google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1711,8 +1711,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/grogu/signaller/expected_types.go b/grogu/signaller/expected_types.go index 742bc8c19..9e4c41c0c 100644 --- a/grogu/signaller/expected_types.go +++ b/grogu/signaller/expected_types.go @@ -3,13 +3,13 @@ package signaller import ( sdk "github.com/cosmos/cosmos-sdk/types" - bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client" + bothanclient "github.com/bandprotocol/bothan/bothan-api/client/go-client" feeds "github.com/bandprotocol/chain/v3/x/feeds/types" ) type BothanClient interface { - bothan.Client + bothanclient.Client } type FeedQuerier interface { diff --git a/grogu/signaller/signaller.go b/grogu/signaller/signaller.go index 25431b516..398eb94e6 100644 --- a/grogu/signaller/signaller.go +++ b/grogu/signaller/signaller.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/price" + bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/bothan/v1" "github.com/bandprotocol/chain/v3/grogu/submitter" "github.com/bandprotocol/chain/v3/pkg/logger" diff --git a/grogu/signaller/signaller_test.go b/grogu/signaller/signaller_test.go index f2959521a..e70edc044 100644 --- a/grogu/signaller/signaller_test.go +++ b/grogu/signaller/signaller_test.go @@ -12,7 +12,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/price" + bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/bothan/v1" "github.com/bandprotocol/chain/v3/grogu/signaller/testutil" "github.com/bandprotocol/chain/v3/grogu/submitter" @@ -79,7 +79,7 @@ func (s *SignallerTestSuite) SetupTest() { { SignalId: "signal1", Price: 10000, - Status: bothan.Status_AVAILABLE, + Status: bothan.Status_STATUS_AVAILABLE, }, }, Uuid: "uuid1", @@ -134,7 +134,7 @@ func (s *SignallerTestSuite) TestFilterAndPrepareSubmitPrices() { { SignalId: "signal1", Price: 10000, - Status: bothan.Status_AVAILABLE, + Status: bothan.Status_STATUS_AVAILABLE, }, } @@ -158,7 +158,7 @@ func (s *SignallerTestSuite) TestFilterAndPrepareSubmitPrices() { { SignalId: "signal1", Price: 10000, - Status: bothan.Status_UNAVAILABLE, + Status: bothan.Status_STATUS_UNAVAILABLE, }, } @@ -228,7 +228,7 @@ func (s *SignallerTestSuite) TestIsPriceValid() { priceData := &bothan.Price{ SignalId: "signal1", Price: 10000, - Status: bothan.Status_AVAILABLE, + Status: bothan.Status_STATUS_AVAILABLE, } // Test with time before the assigned time diff --git a/grogu/signaller/testutil/expected_types_mock.go b/grogu/signaller/testutil/expected_types_mock.go index 7bbcaee0c..36f131942 100644 --- a/grogu/signaller/testutil/expected_types_mock.go +++ b/grogu/signaller/testutil/expected_types_mock.go @@ -12,8 +12,7 @@ package testutil import ( reflect "reflect" - price "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/price" - signal "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/signal" + proto "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/bothan/v1" types "github.com/bandprotocol/chain/v3/x/feeds/types" types0 "github.com/cosmos/cosmos-sdk/types" gomock "go.uber.org/mock/gomock" @@ -44,10 +43,10 @@ func (m *MockBothanClient) EXPECT() *MockBothanClientMockRecorder { } // GetInfo mocks base method. -func (m *MockBothanClient) GetInfo() (*signal.GetInfoResponse, error) { +func (m *MockBothanClient) GetInfo() (*proto.GetInfoResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetInfo") - ret0, _ := ret[0].(*signal.GetInfoResponse) + ret0, _ := ret[0].(*proto.GetInfoResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -59,10 +58,10 @@ func (mr *MockBothanClientMockRecorder) GetInfo() *gomock.Call { } // GetPrices mocks base method. -func (m *MockBothanClient) GetPrices(signalIDs []string) (*price.GetPricesResponse, error) { +func (m *MockBothanClient) GetPrices(signalIDs []string) (*proto.GetPricesResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPrices", signalIDs) - ret0, _ := ret[0].(*price.GetPricesResponse) + ret0, _ := ret[0].(*proto.GetPricesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/grogu/signaller/utils.go b/grogu/signaller/utils.go index adfcc745d..1fea80d55 100644 --- a/grogu/signaller/utils.go +++ b/grogu/signaller/utils.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/price" + bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/bothan/v1" "github.com/bandprotocol/chain/v3/x/feeds/types" ) @@ -41,19 +41,19 @@ func isDeviated(deviationBasisPoint int64, oldPrice uint64, newPrice uint64) boo func convertPriceData(price *bothan.Price) (types.SignalPrice, error) { switch price.Status { - case bothan.Status_UNSUPPORTED: + case bothan.Status_STATUS_UNSUPPORTED: return types.NewSignalPrice( types.PriceStatusUnsupported, price.SignalId, 0, ), nil - case bothan.Status_UNAVAILABLE: + case bothan.Status_STATUS_UNAVAILABLE: return types.NewSignalPrice( types.PriceStatusUnavailable, price.SignalId, 0, ), nil - case bothan.Status_AVAILABLE: + case bothan.Status_STATUS_AVAILABLE: return types.NewSignalPrice( types.PriceStatusAvailable, price.SignalId, diff --git a/grogu/signaller/utils_test.go b/grogu/signaller/utils_test.go index 2b906aaf2..b292f3689 100644 --- a/grogu/signaller/utils_test.go +++ b/grogu/signaller/utils_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/price" + bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/bothan/v1" "github.com/bandprotocol/chain/v3/x/feeds/types" ) @@ -43,20 +43,20 @@ func TestConvertPriceData(t *testing.T) { }{ { "Unsupported price status", - &bothan.Price{Status: bothan.Status_UNSUPPORTED, SignalId: "signal1"}, + &bothan.Price{Status: bothan.Status_STATUS_UNSUPPORTED, SignalId: "signal1"}, types.SignalPrice{PriceStatus: types.PriceStatusUnsupported, SignalID: "signal1", Price: 0}, false, }, { "Unavailable price status", - &bothan.Price{Status: bothan.Status_UNAVAILABLE, SignalId: "signal2"}, + &bothan.Price{Status: bothan.Status_STATUS_UNAVAILABLE, SignalId: "signal2"}, types.SignalPrice{PriceStatus: types.PriceStatusUnavailable, SignalID: "signal2", Price: 0}, false, }, { "Available price status", &bothan.Price{ - Status: bothan.Status_AVAILABLE, + Status: bothan.Status_STATUS_AVAILABLE, SignalId: "signal3", Price: 123456000000, }, diff --git a/grogu/submitter/expected_types.go b/grogu/submitter/expected_types.go index 792a37011..a222bb006 100644 --- a/grogu/submitter/expected_types.go +++ b/grogu/submitter/expected_types.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" auth "github.com/cosmos/cosmos-sdk/x/auth/types" - bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client" + bothanclient "github.com/bandprotocol/bothan/bothan-api/client/go-client" ) type RemoteClient interface { @@ -14,7 +14,7 @@ type RemoteClient interface { } type BothanClient interface { - bothan.Client + bothanclient.Client } type AuthQuerier interface { diff --git a/grogu/submitter/submitter.go b/grogu/submitter/submitter.go index 55da26c92..c1f4d8616 100644 --- a/grogu/submitter/submitter.go +++ b/grogu/submitter/submitter.go @@ -159,10 +159,7 @@ func (s *Submitter) submitPrice(pricesSubmission SignalPriceSubmission, keyID st switch { case finalizedTxResp.Code == 0: s.logger.Info("[Submitter] price submitted at %v", finalizedTxResp.TxHash) - err = s.bothanClient.PushMonitoringRecords(uuid, finalizedTxResp.TxHash) - if err != nil { - s.logger.Error("[Submitter] failed to push monitoring records: %v", err) - } + s.pushMonitoringRecords(uuid, finalizedTxResp.TxHash) return case finalizedTxResp.Codespace == sdkerrors.RootCodespace && finalizedTxResp.Code == sdkerrors.ErrOutOfGas.ABCICode(): s.logger.Info("[Submitter] transaction is out of gas, retrying with increased gas adjustment") @@ -175,6 +172,27 @@ func (s *Submitter) submitPrice(pricesSubmission SignalPriceSubmission, keyID st s.logger.Error("[Submitter] failed to submit price") } +func (s *Submitter) pushMonitoringRecords(uuid, txHash string) { + bothanInfo, err := s.bothanClient.GetInfo() + if err != nil { + s.logger.Error("[Updater] failed to query Bothan info: %v", err) + return + } + + if !bothanInfo.MonitoringEnabled { + s.logger.Debug("[Updater] monitoring is not enabled, skipping push") + return + } + + err = s.bothanClient.PushMonitoringRecords(uuid, txHash) + if err != nil { + s.logger.Error("[Updater] failed to push monitoring records to Bothan: %v", err) + return + } + + s.logger.Info("[Updater] successfully pushed monitoring records to Bothan") +} + func (s *Submitter) getAccountFromKey(key *keyring.Record) (client.Account, error) { addr, err := key.GetAddress() if err != nil { diff --git a/grogu/submitter/submitter_test.go b/grogu/submitter/submitter_test.go index f0c61958a..b323b0208 100644 --- a/grogu/submitter/submitter_test.go +++ b/grogu/submitter/submitter_test.go @@ -30,6 +30,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" auth "github.com/cosmos/cosmos-sdk/x/auth/types" + bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/bothan/v1" + band "github.com/bandprotocol/chain/v3/app" "github.com/bandprotocol/chain/v3/grogu/submitter/testutil" "github.com/bandprotocol/chain/v3/pkg/logger" @@ -125,6 +127,7 @@ func (s *SubmitterTestSuite) SetupTest() { mockRPCClients := []rpcclient.RemoteClient{mockClient} mockBothanClient := testutil.NewMockBothanClient(ctrl) + mockBothanClient.EXPECT().GetInfo().Return(&bothan.GetInfoResponse{MonitoringEnabled: true}, nil).AnyTimes() mockBothanClient.EXPECT().PushMonitoringRecords(gomock.Any(), gomock.Any()).AnyTimes() mockAuthQuerier := testutil.NewMockAuthQuerier(ctrl) diff --git a/grogu/submitter/testutil/expected_types_mock.go b/grogu/submitter/testutil/expected_types_mock.go index 40e4ba8ed..393669792 100644 --- a/grogu/submitter/testutil/expected_types_mock.go +++ b/grogu/submitter/testutil/expected_types_mock.go @@ -13,8 +13,7 @@ import ( context "context" reflect "reflect" - price "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/price" - signal "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/signal" + proto "github.com/bandprotocol/bothan/bothan-api/client/go-client/proto/bothan/v1" bytes "github.com/cometbft/cometbft/libs/bytes" log "github.com/cometbft/cometbft/libs/log" client "github.com/cometbft/cometbft/rpc/client" @@ -707,10 +706,10 @@ func (m *MockBothanClient) EXPECT() *MockBothanClientMockRecorder { } // GetInfo mocks base method. -func (m *MockBothanClient) GetInfo() (*signal.GetInfoResponse, error) { +func (m *MockBothanClient) GetInfo() (*proto.GetInfoResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetInfo") - ret0, _ := ret[0].(*signal.GetInfoResponse) + ret0, _ := ret[0].(*proto.GetInfoResponse) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -722,10 +721,10 @@ func (mr *MockBothanClientMockRecorder) GetInfo() *gomock.Call { } // GetPrices mocks base method. -func (m *MockBothanClient) GetPrices(signalIDs []string) (*price.GetPricesResponse, error) { +func (m *MockBothanClient) GetPrices(signalIDs []string) (*proto.GetPricesResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPrices", signalIDs) - ret0, _ := ret[0].(*price.GetPricesResponse) + ret0, _ := ret[0].(*proto.GetPricesResponse) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/grogu/updater/expected_types.go b/grogu/updater/expected_types.go index 066d4b39a..719b688f6 100644 --- a/grogu/updater/expected_types.go +++ b/grogu/updater/expected_types.go @@ -3,13 +3,13 @@ package updater import ( rpcclient "github.com/cometbft/cometbft/rpc/client" - bothan "github.com/bandprotocol/bothan/bothan-api/client/go-client" + bothanclient "github.com/bandprotocol/bothan/bothan-api/client/go-client" feeds "github.com/bandprotocol/chain/v3/x/feeds/types" ) type BothanClient interface { - bothan.Client + bothanclient.Client } type FeedQuerier interface { From 8cdf3aad077648e32630402ca71acb75a80a7214 Mon Sep 17 00:00:00 2001 From: colmazia Date: Mon, 4 Nov 2024 11:12:35 +0700 Subject: [PATCH 207/272] change back sleep time in script --- scripts/start_grogu.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/start_grogu.sh b/scripts/start_grogu.sh index 9900eab0b..e651e96df 100755 --- a/scripts/start_grogu.sh +++ b/scripts/start_grogu.sh @@ -29,7 +29,7 @@ grogu config max-try 5 echo "y" | bandd tx oracle activate --from validator --gas-prices 0.0025uband --keyring-backend test --chain-id bandchain # wait for activation transaction success -sleep 5 +sleep 3 for i in $(eval echo {1..4}) do @@ -37,18 +37,18 @@ do grogu keys add feeder$i done -sleep 5 +sleep 3 # send band tokens to feeders echo "y" | bandd tx bank multi-send validator $(grogu keys list -a) 1000000uband --gas-prices 0.0025uband --keyring-backend test --chain-id bandchain # wait for sending band tokens transaction success -sleep 5 +sleep 3 # add feeder to bandchain echo "y" | bandd tx feeds add-feeders $(grogu keys list -a) --from validator --gas-prices 0.0025uband --keyring-backend test --chain-id bandchain # wait for addding feeder transaction success -sleep 5 +sleep 3 # run grogu grogu run From afcef88f348277f68cf8bf368b1a3a7e3392074f Mon Sep 17 00:00:00 2001 From: taobun Date: Fri, 1 Nov 2024 18:05:31 +0700 Subject: [PATCH 208/272] reword delegator to voter --- api/band/feeds/v1beta1/feeds.pulsar.go | 566 ++++++------ api/band/feeds/v1beta1/genesis.pulsar.go | 132 ++- api/band/feeds/v1beta1/query.pulsar.go | 823 +++++++++--------- api/band/feeds/v1beta1/query_grpc.pb.go | 34 +- api/band/feeds/v1beta1/tx.pulsar.go | 566 ++++++------ api/band/feeds/v1beta1/tx_grpc.pb.go | 34 +- proto/band/feeds/v1beta1/feeds.proto | 10 +- proto/band/feeds/v1beta1/genesis.proto | 4 +- proto/band/feeds/v1beta1/query.proto | 20 +- proto/band/feeds/v1beta1/tx.proto | 20 +- x/feeds/README.md | 111 ++- x/feeds/autocli.go | 8 +- x/feeds/client/cli/tx.go | 18 +- x/feeds/keeper/genesis.go | 4 +- x/feeds/keeper/genesis_test.go | 22 +- x/feeds/keeper/grpc_query.go | 14 +- x/feeds/keeper/grpc_query_test.go | 14 +- x/feeds/keeper/keeper_signal.go | 80 +- x/feeds/keeper/keeper_signal_test.go | 12 +- x/feeds/keeper/keeper_test.go | 10 +- x/feeds/keeper/msg_server.go | 18 +- x/feeds/keeper/msg_server_test.go | 30 +- x/feeds/types/codec.go | 4 +- x/feeds/types/feeds.pb.go | 214 ++--- x/feeds/types/genesis.go | 10 +- x/feeds/types/genesis.pb.go | 63 +- x/feeds/types/genesis_test.go | 6 +- x/feeds/types/keys.go | 8 +- x/feeds/types/keys_test.go | 6 +- x/feeds/types/msgs.go | 28 +- x/feeds/types/msgs_test.go | 35 +- x/feeds/types/query.pb.go | 309 ++++--- x/feeds/types/query.pb.gw.go | 44 +- x/feeds/types/tx.pb.go | 235 ++--- .../types/{delegator_signals.go => vote.go} | 20 +- 35 files changed, 1756 insertions(+), 1776 deletions(-) rename x/feeds/types/{delegator_signals.go => vote.go} (52%) diff --git a/api/band/feeds/v1beta1/feeds.pulsar.go b/api/band/feeds/v1beta1/feeds.pulsar.go index 868cdb7ae..1bb3320b1 100644 --- a/api/band/feeds/v1beta1/feeds.pulsar.go +++ b/api/band/feeds/v1beta1/feeds.pulsar.go @@ -482,79 +482,79 @@ func (x *fastReflection_Signal) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_DelegatorSignals_2_list)(nil) +var _ protoreflect.List = (*_Vote_2_list)(nil) -type _DelegatorSignals_2_list struct { +type _Vote_2_list struct { list *[]*Signal } -func (x *_DelegatorSignals_2_list) Len() int { +func (x *_Vote_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_DelegatorSignals_2_list) Get(i int) protoreflect.Value { +func (x *_Vote_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_DelegatorSignals_2_list) Set(i int, value protoreflect.Value) { +func (x *_Vote_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Signal) (*x.list)[i] = concreteValue } -func (x *_DelegatorSignals_2_list) Append(value protoreflect.Value) { +func (x *_Vote_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Signal) *x.list = append(*x.list, concreteValue) } -func (x *_DelegatorSignals_2_list) AppendMutable() protoreflect.Value { +func (x *_Vote_2_list) AppendMutable() protoreflect.Value { v := new(Signal) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_DelegatorSignals_2_list) Truncate(n int) { +func (x *_Vote_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_DelegatorSignals_2_list) NewElement() protoreflect.Value { +func (x *_Vote_2_list) NewElement() protoreflect.Value { v := new(Signal) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_DelegatorSignals_2_list) IsValid() bool { +func (x *_Vote_2_list) IsValid() bool { return x.list != nil } var ( - md_DelegatorSignals protoreflect.MessageDescriptor - fd_DelegatorSignals_delegator protoreflect.FieldDescriptor - fd_DelegatorSignals_signals protoreflect.FieldDescriptor + md_Vote protoreflect.MessageDescriptor + fd_Vote_voter protoreflect.FieldDescriptor + fd_Vote_signals protoreflect.FieldDescriptor ) func init() { file_band_feeds_v1beta1_feeds_proto_init() - md_DelegatorSignals = File_band_feeds_v1beta1_feeds_proto.Messages().ByName("DelegatorSignals") - fd_DelegatorSignals_delegator = md_DelegatorSignals.Fields().ByName("delegator") - fd_DelegatorSignals_signals = md_DelegatorSignals.Fields().ByName("signals") + md_Vote = File_band_feeds_v1beta1_feeds_proto.Messages().ByName("Vote") + fd_Vote_voter = md_Vote.Fields().ByName("voter") + fd_Vote_signals = md_Vote.Fields().ByName("signals") } -var _ protoreflect.Message = (*fastReflection_DelegatorSignals)(nil) +var _ protoreflect.Message = (*fastReflection_Vote)(nil) -type fastReflection_DelegatorSignals DelegatorSignals +type fastReflection_Vote Vote -func (x *DelegatorSignals) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelegatorSignals)(x) +func (x *Vote) ProtoReflect() protoreflect.Message { + return (*fastReflection_Vote)(x) } -func (x *DelegatorSignals) slowProtoReflect() protoreflect.Message { +func (x *Vote) slowProtoReflect() protoreflect.Message { mi := &file_band_feeds_v1beta1_feeds_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -566,43 +566,43 @@ func (x *DelegatorSignals) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_DelegatorSignals_messageType fastReflection_DelegatorSignals_messageType -var _ protoreflect.MessageType = fastReflection_DelegatorSignals_messageType{} +var _fastReflection_Vote_messageType fastReflection_Vote_messageType +var _ protoreflect.MessageType = fastReflection_Vote_messageType{} -type fastReflection_DelegatorSignals_messageType struct{} +type fastReflection_Vote_messageType struct{} -func (x fastReflection_DelegatorSignals_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelegatorSignals)(nil) +func (x fastReflection_Vote_messageType) Zero() protoreflect.Message { + return (*fastReflection_Vote)(nil) } -func (x fastReflection_DelegatorSignals_messageType) New() protoreflect.Message { - return new(fastReflection_DelegatorSignals) +func (x fastReflection_Vote_messageType) New() protoreflect.Message { + return new(fastReflection_Vote) } -func (x fastReflection_DelegatorSignals_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorSignals +func (x fastReflection_Vote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Vote } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_DelegatorSignals) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorSignals +func (x *fastReflection_Vote) Descriptor() protoreflect.MessageDescriptor { + return md_Vote } // 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_DelegatorSignals) Type() protoreflect.MessageType { - return _fastReflection_DelegatorSignals_messageType +func (x *fastReflection_Vote) Type() protoreflect.MessageType { + return _fastReflection_Vote_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelegatorSignals) New() protoreflect.Message { - return new(fastReflection_DelegatorSignals) +func (x *fastReflection_Vote) New() protoreflect.Message { + return new(fastReflection_Vote) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_DelegatorSignals) Interface() protoreflect.ProtoMessage { - return (*DelegatorSignals)(x) +func (x *fastReflection_Vote) Interface() protoreflect.ProtoMessage { + return (*Vote)(x) } // Range iterates over every populated field in an undefined order, @@ -610,16 +610,16 @@ func (x *fastReflection_DelegatorSignals) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_DelegatorSignals) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Delegator != "" { - value := protoreflect.ValueOfString(x.Delegator) - if !f(fd_DelegatorSignals_delegator, value) { +func (x *fastReflection_Vote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Voter != "" { + value := protoreflect.ValueOfString(x.Voter) + if !f(fd_Vote_voter, value) { return } } if len(x.Signals) != 0 { - value := protoreflect.ValueOfList(&_DelegatorSignals_2_list{list: &x.Signals}) - if !f(fd_DelegatorSignals_signals, value) { + value := protoreflect.ValueOfList(&_Vote_2_list{list: &x.Signals}) + if !f(fd_Vote_signals, value) { return } } @@ -636,17 +636,17 @@ func (x *fastReflection_DelegatorSignals) Range(f func(protoreflect.FieldDescrip // 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_DelegatorSignals) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Vote) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.feeds.v1beta1.DelegatorSignals.delegator": - return x.Delegator != "" - case "band.feeds.v1beta1.DelegatorSignals.signals": + case "band.feeds.v1beta1.Vote.voter": + return x.Voter != "" + case "band.feeds.v1beta1.Vote.signals": return len(x.Signals) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.DelegatorSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.Vote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.DelegatorSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.Vote does not contain field %s", fd.FullName())) } } @@ -656,17 +656,17 @@ func (x *fastReflection_DelegatorSignals) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegatorSignals) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Vote) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.feeds.v1beta1.DelegatorSignals.delegator": - x.Delegator = "" - case "band.feeds.v1beta1.DelegatorSignals.signals": + case "band.feeds.v1beta1.Vote.voter": + x.Voter = "" + case "band.feeds.v1beta1.Vote.signals": x.Signals = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.DelegatorSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.Vote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.DelegatorSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.Vote does not contain field %s", fd.FullName())) } } @@ -676,22 +676,22 @@ func (x *fastReflection_DelegatorSignals) Clear(fd protoreflect.FieldDescriptor) // 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_DelegatorSignals) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Vote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.feeds.v1beta1.DelegatorSignals.delegator": - value := x.Delegator + case "band.feeds.v1beta1.Vote.voter": + value := x.Voter return protoreflect.ValueOfString(value) - case "band.feeds.v1beta1.DelegatorSignals.signals": + case "band.feeds.v1beta1.Vote.signals": if len(x.Signals) == 0 { - return protoreflect.ValueOfList(&_DelegatorSignals_2_list{}) + return protoreflect.ValueOfList(&_Vote_2_list{}) } - listValue := &_DelegatorSignals_2_list{list: &x.Signals} + listValue := &_Vote_2_list{list: &x.Signals} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.DelegatorSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.Vote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.DelegatorSignals does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.Vote does not contain field %s", descriptor.FullName())) } } @@ -705,19 +705,19 @@ func (x *fastReflection_DelegatorSignals) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegatorSignals) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Vote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.feeds.v1beta1.DelegatorSignals.delegator": - x.Delegator = value.Interface().(string) - case "band.feeds.v1beta1.DelegatorSignals.signals": + case "band.feeds.v1beta1.Vote.voter": + x.Voter = value.Interface().(string) + case "band.feeds.v1beta1.Vote.signals": lv := value.List() - clv := lv.(*_DelegatorSignals_2_list) + clv := lv.(*_Vote_2_list) x.Signals = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.DelegatorSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.Vote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.DelegatorSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.Vote does not contain field %s", fd.FullName())) } } @@ -731,49 +731,49 @@ func (x *fastReflection_DelegatorSignals) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegatorSignals) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Vote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.DelegatorSignals.signals": + case "band.feeds.v1beta1.Vote.signals": if x.Signals == nil { x.Signals = []*Signal{} } - value := &_DelegatorSignals_2_list{list: &x.Signals} + value := &_Vote_2_list{list: &x.Signals} return protoreflect.ValueOfList(value) - case "band.feeds.v1beta1.DelegatorSignals.delegator": - panic(fmt.Errorf("field delegator of message band.feeds.v1beta1.DelegatorSignals is not mutable")) + case "band.feeds.v1beta1.Vote.voter": + panic(fmt.Errorf("field voter of message band.feeds.v1beta1.Vote is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.DelegatorSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.Vote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.DelegatorSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.Vote 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_DelegatorSignals) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Vote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.DelegatorSignals.delegator": + case "band.feeds.v1beta1.Vote.voter": return protoreflect.ValueOfString("") - case "band.feeds.v1beta1.DelegatorSignals.signals": + case "band.feeds.v1beta1.Vote.signals": list := []*Signal{} - return protoreflect.ValueOfList(&_DelegatorSignals_2_list{list: &list}) + return protoreflect.ValueOfList(&_Vote_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.DelegatorSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.Vote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.DelegatorSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.Vote 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_DelegatorSignals) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Vote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.DelegatorSignals", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.Vote", d.FullName())) } panic("unreachable") } @@ -781,7 +781,7 @@ func (x *fastReflection_DelegatorSignals) WhichOneof(d protoreflect.OneofDescrip // 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_DelegatorSignals) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Vote) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -792,7 +792,7 @@ func (x *fastReflection_DelegatorSignals) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegatorSignals) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Vote) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -804,7 +804,7 @@ func (x *fastReflection_DelegatorSignals) SetUnknown(fields protoreflect.RawFiel // 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_DelegatorSignals) IsValid() bool { +func (x *fastReflection_Vote) IsValid() bool { return x != nil } @@ -814,9 +814,9 @@ func (x *fastReflection_DelegatorSignals) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_DelegatorSignals) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Vote) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelegatorSignals) + x := input.Message.Interface().(*Vote) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -828,7 +828,7 @@ func (x *fastReflection_DelegatorSignals) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Delegator) + l = len(x.Voter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -848,7 +848,7 @@ func (x *fastReflection_DelegatorSignals) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DelegatorSignals) + x := input.Message.Interface().(*Vote) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -883,10 +883,10 @@ func (x *fastReflection_DelegatorSignals) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x12 } } - if len(x.Delegator) > 0 { - i -= len(x.Delegator) - copy(dAtA[i:], x.Delegator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Delegator))) + if len(x.Voter) > 0 { + i -= len(x.Voter) + copy(dAtA[i:], x.Voter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) i-- dAtA[i] = 0xa } @@ -901,7 +901,7 @@ func (x *fastReflection_DelegatorSignals) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DelegatorSignals) + x := input.Message.Interface().(*Vote) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -933,15 +933,15 @@ func (x *fastReflection_DelegatorSignals) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorSignals: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Vote: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorSignals: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Vote: 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 Delegator", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -969,7 +969,7 @@ func (x *fastReflection_DelegatorSignals) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Delegator = string(dAtA[iNdEx:postIndex]) + x.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -7337,20 +7337,20 @@ func (x *Signal) GetPower() int64 { return 0 } -// DelegatorSignals is the data structure that contains array of signals of a delegator. -type DelegatorSignals struct { +// Vote is the data structure that contains array of signals of a voter. +type Vote struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // delegator is the address of the delegator of this signals. - Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty"` - // signals is a list of signals submit by the delegator. + // voter is the address of the voter of this signals. + Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` + // signals is a list of signals submit by the voter. Signals []*Signal `protobuf:"bytes,2,rep,name=signals,proto3" json:"signals,omitempty"` } -func (x *DelegatorSignals) Reset() { - *x = DelegatorSignals{} +func (x *Vote) Reset() { + *x = Vote{} if protoimpl.UnsafeEnabled { mi := &file_band_feeds_v1beta1_feeds_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7358,25 +7358,25 @@ func (x *DelegatorSignals) Reset() { } } -func (x *DelegatorSignals) String() string { +func (x *Vote) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DelegatorSignals) ProtoMessage() {} +func (*Vote) ProtoMessage() {} -// Deprecated: Use DelegatorSignals.ProtoReflect.Descriptor instead. -func (*DelegatorSignals) Descriptor() ([]byte, []int) { +// Deprecated: Use Vote.ProtoReflect.Descriptor instead. +func (*Vote) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_feeds_proto_rawDescGZIP(), []int{1} } -func (x *DelegatorSignals) GetDelegator() string { +func (x *Vote) GetVoter() string { if x != nil { - return x.Delegator + return x.Voter } return "" } -func (x *DelegatorSignals) GetSignals() []*Signal { +func (x *Vote) GetSignals() []*Signal { if x != nil { return x.Signals } @@ -8012,172 +8012,170 @@ var file_band_feeds_v1beta1_feeds_proto_rawDesc = []byte{ 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x04, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x3a, 0x04, 0xe8, 0xa0, - 0x1f, 0x01, 0x22, 0x69, 0x0a, 0x04, 0x46, 0x65, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, - 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xaa, 0x01, - 0x0a, 0x11, 0x46, 0x65, 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, - 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, - 0x73, 0x69, 0x73, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x13, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x69, 0x73, 0x50, - 0x6f, 0x69, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x46, 0x65, 0x65, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc4, 0x01, 0x0a, 0x19, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x76, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x57, 0x69, - 0x74, 0x68, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x11, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xb0, - 0x01, 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, - 0x01, 0x22, 0x98, 0x01, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x9d, 0x02, 0x0a, - 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, - 0x42, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xb0, 0x01, 0x0a, - 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x53, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, - 0x8c, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x12, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x49, 0x50, 0x46, 0x53, 0x48, 0x61, 0x73, 0x68, 0x52, 0x10, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x79, 0x49, 0x70, 0x66, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, - 0x10, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x7f, - 0x0a, 0x0e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x49, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, - 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, - 0x80, 0x01, 0x0a, 0x13, 0x46, 0x65, 0x65, 0x64, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0d, 0xe2, 0xde, 0x1f, - 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x73, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x49, 0x64, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, - 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x3a, 0x04, 0x88, 0xa0, - 0x1f, 0x00, 0x2a, 0xf7, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x1a, 0x1a, 0x8a, 0x9d, 0x20, 0x16, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, - 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, - 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x1a, 0x1a, 0x8a, 0x9d, 0x20, 0x16, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, - 0x4c, 0x45, 0x10, 0x02, 0x1a, 0x1a, 0x8a, 0x9d, 0x20, 0x16, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x34, 0x0a, 0x16, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x1a, 0x18, 0x8a, 0x9d, - 0x20, 0x14, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0xa7, 0x01, 0x0a, - 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, - 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, - 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, - 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, - 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, - 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, - 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, - 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, - 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x62, + 0xa0, 0x1f, 0x01, 0x22, 0x78, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x76, + 0x6f, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x07, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, - 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64, 0x73, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, 0x02, 0x12, 0x42, 0x61, - 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, - 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x46, - 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x69, 0x0a, + 0x04, 0x46, 0x65, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xaa, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x65, + 0x64, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, + 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x15, 0x64, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x73, 0x5f, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x64, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x73, 0x69, 0x73, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x3a, + 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x15, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x04, 0xe8, 0xa0, + 0x1f, 0x01, 0x22, 0xc4, 0x01, 0x0a, 0x19, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, + 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x41, 0x0a, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, 0x44, 0x65, 0x76, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xb0, 0x01, 0x0a, 0x05, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x98, 0x01, 0x0a, + 0x0b, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0c, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, + 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x9d, 0x02, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3f, + 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, + 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, + 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xb0, 0x01, 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, + 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x53, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x15, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x12, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x5f, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x49, 0x50, + 0x46, 0x53, 0x48, 0x61, 0x73, 0x68, 0x52, 0x10, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x49, 0x70, 0x66, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x7f, 0x0a, 0x0e, 0x46, 0x65, 0x65, + 0x64, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, 0x0c, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x80, 0x01, 0x0a, 0x13, 0x46, + 0x65, 0x65, 0x64, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0d, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x49, 0x44, 0x73, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, + 0x12, 0x35, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x2a, 0xf7, 0x01, + 0x0a, 0x0b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, + 0x18, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x1a, 0x8a, 0x9d, 0x20, + 0x16, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x6e, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x50, 0x52, 0x49, 0x43, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, + 0x54, 0x45, 0x44, 0x10, 0x01, 0x1a, 0x1a, 0x8a, 0x9d, 0x20, 0x16, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x12, 0x38, 0x0a, 0x18, 0x50, 0x52, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x1a, + 0x1a, 0x8a, 0x9d, 0x20, 0x16, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x50, + 0x52, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x56, 0x41, 0x49, + 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x1a, 0x18, 0x8a, 0x9d, 0x20, 0x14, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x17, 0x8a, 0x9d, + 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, + 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, + 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, + 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x49, 0x12, + 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, + 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, 0x88, 0xa3, 0x1e, + 0x00, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x46, 0x65, + 0x65, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, + 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, + 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8198,7 +8196,7 @@ var file_band_feeds_v1beta1_feeds_proto_goTypes = []interface{}{ (PriceStatus)(0), // 0: band.feeds.v1beta1.PriceStatus (Encoder)(0), // 1: band.feeds.v1beta1.Encoder (*Signal)(nil), // 2: band.feeds.v1beta1.Signal - (*DelegatorSignals)(nil), // 3: band.feeds.v1beta1.DelegatorSignals + (*Vote)(nil), // 3: band.feeds.v1beta1.Vote (*Feed)(nil), // 4: band.feeds.v1beta1.Feed (*FeedWithDeviation)(nil), // 5: band.feeds.v1beta1.FeedWithDeviation (*CurrentFeeds)(nil), // 6: band.feeds.v1beta1.CurrentFeeds @@ -8212,7 +8210,7 @@ var file_band_feeds_v1beta1_feeds_proto_goTypes = []interface{}{ (*FeedsSignatureOrder)(nil), // 14: band.feeds.v1beta1.FeedsSignatureOrder } var file_band_feeds_v1beta1_feeds_proto_depIdxs = []int32{ - 2, // 0: band.feeds.v1beta1.DelegatorSignals.signals:type_name -> band.feeds.v1beta1.Signal + 2, // 0: band.feeds.v1beta1.Vote.signals:type_name -> band.feeds.v1beta1.Signal 4, // 1: band.feeds.v1beta1.CurrentFeeds.feeds:type_name -> band.feeds.v1beta1.Feed 5, // 2: band.feeds.v1beta1.CurrentFeedWithDeviations.feeds:type_name -> band.feeds.v1beta1.FeedWithDeviation 0, // 3: band.feeds.v1beta1.Price.price_status:type_name -> band.feeds.v1beta1.PriceStatus @@ -8247,7 +8245,7 @@ func file_band_feeds_v1beta1_feeds_proto_init() { } } file_band_feeds_v1beta1_feeds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegatorSignals); i { + switch v := v.(*Vote); i { case 0: return &v.state case 1: diff --git a/api/band/feeds/v1beta1/genesis.pulsar.go b/api/band/feeds/v1beta1/genesis.pulsar.go index 4a2faadda..4139f4b55 100644 --- a/api/band/feeds/v1beta1/genesis.pulsar.go +++ b/api/band/feeds/v1beta1/genesis.pulsar.go @@ -16,7 +16,7 @@ import ( var _ protoreflect.List = (*_GenesisState_2_list)(nil) type _GenesisState_2_list struct { - list *[]*DelegatorSignals + list *[]*Vote } func (x *_GenesisState_2_list) Len() int { @@ -32,18 +32,18 @@ func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegatorSignals) + concreteValue := valueUnwrapped.Interface().(*Vote) (*x.list)[i] = concreteValue } func (x *_GenesisState_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DelegatorSignals) + concreteValue := valueUnwrapped.Interface().(*Vote) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { - v := new(DelegatorSignals) + v := new(Vote) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -56,7 +56,7 @@ func (x *_GenesisState_2_list) Truncate(n int) { } func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := new(DelegatorSignals) + v := new(Vote) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -67,7 +67,7 @@ func (x *_GenesisState_2_list) IsValid() bool { var ( md_GenesisState protoreflect.MessageDescriptor fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_delegator_signals protoreflect.FieldDescriptor + fd_GenesisState_votes protoreflect.FieldDescriptor fd_GenesisState_reference_source_config protoreflect.FieldDescriptor ) @@ -75,7 +75,7 @@ func init() { file_band_feeds_v1beta1_genesis_proto_init() md_GenesisState = File_band_feeds_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_delegator_signals = md_GenesisState.Fields().ByName("delegator_signals") + fd_GenesisState_votes = md_GenesisState.Fields().ByName("votes") fd_GenesisState_reference_source_config = md_GenesisState.Fields().ByName("reference_source_config") } @@ -150,9 +150,9 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } - if len(x.DelegatorSignals) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.DelegatorSignals}) - if !f(fd_GenesisState_delegator_signals, value) { + if len(x.Votes) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Votes}) + if !f(fd_GenesisState_votes, value) { return } } @@ -179,8 +179,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "band.feeds.v1beta1.GenesisState.params": return x.Params != nil - case "band.feeds.v1beta1.GenesisState.delegator_signals": - return len(x.DelegatorSignals) != 0 + case "band.feeds.v1beta1.GenesisState.votes": + return len(x.Votes) != 0 case "band.feeds.v1beta1.GenesisState.reference_source_config": return x.ReferenceSourceConfig != nil default: @@ -201,8 +201,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "band.feeds.v1beta1.GenesisState.params": x.Params = nil - case "band.feeds.v1beta1.GenesisState.delegator_signals": - x.DelegatorSignals = nil + case "band.feeds.v1beta1.GenesisState.votes": + x.Votes = nil case "band.feeds.v1beta1.GenesisState.reference_source_config": x.ReferenceSourceConfig = nil default: @@ -224,11 +224,11 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto case "band.feeds.v1beta1.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "band.feeds.v1beta1.GenesisState.delegator_signals": - if len(x.DelegatorSignals) == 0 { + case "band.feeds.v1beta1.GenesisState.votes": + if len(x.Votes) == 0 { return protoreflect.ValueOfList(&_GenesisState_2_list{}) } - listValue := &_GenesisState_2_list{list: &x.DelegatorSignals} + listValue := &_GenesisState_2_list{list: &x.Votes} return protoreflect.ValueOfList(listValue) case "band.feeds.v1beta1.GenesisState.reference_source_config": value := x.ReferenceSourceConfig @@ -255,10 +255,10 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value switch fd.FullName() { case "band.feeds.v1beta1.GenesisState.params": x.Params = value.Message().Interface().(*Params) - case "band.feeds.v1beta1.GenesisState.delegator_signals": + case "band.feeds.v1beta1.GenesisState.votes": lv := value.List() clv := lv.(*_GenesisState_2_list) - x.DelegatorSignals = *clv.list + x.Votes = *clv.list case "band.feeds.v1beta1.GenesisState.reference_source_config": x.ReferenceSourceConfig = value.Message().Interface().(*ReferenceSourceConfig) default: @@ -286,11 +286,11 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "band.feeds.v1beta1.GenesisState.delegator_signals": - if x.DelegatorSignals == nil { - x.DelegatorSignals = []*DelegatorSignals{} + case "band.feeds.v1beta1.GenesisState.votes": + if x.Votes == nil { + x.Votes = []*Vote{} } - value := &_GenesisState_2_list{list: &x.DelegatorSignals} + value := &_GenesisState_2_list{list: &x.Votes} return protoreflect.ValueOfList(value) case "band.feeds.v1beta1.GenesisState.reference_source_config": if x.ReferenceSourceConfig == nil { @@ -313,8 +313,8 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "band.feeds.v1beta1.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "band.feeds.v1beta1.GenesisState.delegator_signals": - list := []*DelegatorSignals{} + case "band.feeds.v1beta1.GenesisState.votes": + list := []*Vote{} return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) case "band.feeds.v1beta1.GenesisState.reference_source_config": m := new(ReferenceSourceConfig) @@ -392,8 +392,8 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.DelegatorSignals) > 0 { - for _, e := range x.DelegatorSignals { + if len(x.Votes) > 0 { + for _, e := range x.Votes { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } @@ -445,9 +445,9 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x1a } - if len(x.DelegatorSignals) > 0 { - for iNdEx := len(x.DelegatorSignals) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegatorSignals[iNdEx]) + if len(x.Votes) > 0 { + for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Votes[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -562,7 +562,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatorSignals", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -589,8 +589,8 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.DelegatorSignals = append(x.DelegatorSignals, &DelegatorSignals{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatorSignals[len(x.DelegatorSignals)-1]); err != nil { + x.Votes = append(x.Votes, &Vote{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -686,8 +686,8 @@ type GenesisState struct { // params is all parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - // delegator_signals is a list of delegator signals submitted by delegators. - DelegatorSignals []*DelegatorSignals `protobuf:"bytes,2,rep,name=delegator_signals,json=delegatorSignals,proto3" json:"delegator_signals,omitempty"` + // votes is a list of voter signals. + Votes []*Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` // reference_source_config is the information about reference price config. ReferenceSourceConfig *ReferenceSourceConfig `protobuf:"bytes,3,opt,name=reference_source_config,json=referenceSourceConfig,proto3" json:"reference_source_config,omitempty"` } @@ -719,9 +719,9 @@ func (x *GenesisState) GetParams() *Params { return nil } -func (x *GenesisState) GetDelegatorSignals() []*DelegatorSignals { +func (x *GenesisState) GetVotes() []*Vote { if x != nil { - return x.DelegatorSignals + return x.Votes } return nil } @@ -744,38 +744,36 @@ var file_band_feeds_v1beta1_genesis_proto_rawDesc = []byte{ 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x02, + 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x57, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x73, 0x12, 0x67, 0x0a, 0x17, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x15, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xd6, 0x01, 0x0a, 0x16, 0x63, - 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, - 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, - 0x58, 0xaa, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, - 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, - 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, - 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x74, + 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x67, + 0x0a, 0x17, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x15, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xd6, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, 0x02, + 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, 0x5c, + 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, + 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -794,12 +792,12 @@ var file_band_feeds_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInf var file_band_feeds_v1beta1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: band.feeds.v1beta1.GenesisState (*Params)(nil), // 1: band.feeds.v1beta1.Params - (*DelegatorSignals)(nil), // 2: band.feeds.v1beta1.DelegatorSignals + (*Vote)(nil), // 2: band.feeds.v1beta1.Vote (*ReferenceSourceConfig)(nil), // 3: band.feeds.v1beta1.ReferenceSourceConfig } var file_band_feeds_v1beta1_genesis_proto_depIdxs = []int32{ 1, // 0: band.feeds.v1beta1.GenesisState.params:type_name -> band.feeds.v1beta1.Params - 2, // 1: band.feeds.v1beta1.GenesisState.delegator_signals:type_name -> band.feeds.v1beta1.DelegatorSignals + 2, // 1: band.feeds.v1beta1.GenesisState.votes:type_name -> band.feeds.v1beta1.Vote 3, // 2: band.feeds.v1beta1.GenesisState.reference_source_config:type_name -> band.feeds.v1beta1.ReferenceSourceConfig 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type diff --git a/api/band/feeds/v1beta1/query.pulsar.go b/api/band/feeds/v1beta1/query.pulsar.go index fa7418901..83db8e973 100644 --- a/api/band/feeds/v1beta1/query.pulsar.go +++ b/api/band/feeds/v1beta1/query.pulsar.go @@ -2632,25 +2632,25 @@ func (x *fastReflection_QueryCurrentPricesResponse) ProtoMethods() *protoiface.M } var ( - md_QueryDelegatorSignalsRequest protoreflect.MessageDescriptor - fd_QueryDelegatorSignalsRequest_delegator_address protoreflect.FieldDescriptor + md_QueryVoteRequest protoreflect.MessageDescriptor + fd_QueryVoteRequest_voter protoreflect.FieldDescriptor ) func init() { file_band_feeds_v1beta1_query_proto_init() - md_QueryDelegatorSignalsRequest = File_band_feeds_v1beta1_query_proto.Messages().ByName("QueryDelegatorSignalsRequest") - fd_QueryDelegatorSignalsRequest_delegator_address = md_QueryDelegatorSignalsRequest.Fields().ByName("delegator_address") + md_QueryVoteRequest = File_band_feeds_v1beta1_query_proto.Messages().ByName("QueryVoteRequest") + fd_QueryVoteRequest_voter = md_QueryVoteRequest.Fields().ByName("voter") } -var _ protoreflect.Message = (*fastReflection_QueryDelegatorSignalsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryVoteRequest)(nil) -type fastReflection_QueryDelegatorSignalsRequest QueryDelegatorSignalsRequest +type fastReflection_QueryVoteRequest QueryVoteRequest -func (x *QueryDelegatorSignalsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorSignalsRequest)(x) +func (x *QueryVoteRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryVoteRequest)(x) } -func (x *QueryDelegatorSignalsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryVoteRequest) slowProtoReflect() protoreflect.Message { mi := &file_band_feeds_v1beta1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2662,43 +2662,43 @@ func (x *QueryDelegatorSignalsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryDelegatorSignalsRequest_messageType fastReflection_QueryDelegatorSignalsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorSignalsRequest_messageType{} +var _fastReflection_QueryVoteRequest_messageType fastReflection_QueryVoteRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryVoteRequest_messageType{} -type fastReflection_QueryDelegatorSignalsRequest_messageType struct{} +type fastReflection_QueryVoteRequest_messageType struct{} -func (x fastReflection_QueryDelegatorSignalsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorSignalsRequest)(nil) +func (x fastReflection_QueryVoteRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryVoteRequest)(nil) } -func (x fastReflection_QueryDelegatorSignalsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorSignalsRequest) +func (x fastReflection_QueryVoteRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryVoteRequest) } -func (x fastReflection_QueryDelegatorSignalsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorSignalsRequest +func (x fastReflection_QueryVoteRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryVoteRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryDelegatorSignalsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorSignalsRequest +func (x *fastReflection_QueryVoteRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryVoteRequest } // 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_QueryDelegatorSignalsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorSignalsRequest_messageType +func (x *fastReflection_QueryVoteRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryVoteRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorSignalsRequest) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorSignalsRequest) +func (x *fastReflection_QueryVoteRequest) New() protoreflect.Message { + return new(fastReflection_QueryVoteRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorSignalsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorSignalsRequest)(x) +func (x *fastReflection_QueryVoteRequest) Interface() protoreflect.ProtoMessage { + return (*QueryVoteRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -2706,10 +2706,10 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) Interface() protoreflect.P // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryDelegatorSignalsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DelegatorAddress != "" { - value := protoreflect.ValueOfString(x.DelegatorAddress) - if !f(fd_QueryDelegatorSignalsRequest_delegator_address, value) { +func (x *fastReflection_QueryVoteRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Voter != "" { + value := protoreflect.ValueOfString(x.Voter) + if !f(fd_QueryVoteRequest_voter, value) { return } } @@ -2726,15 +2726,15 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) Range(f func(protoreflect. // 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_QueryDelegatorSignalsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryVoteRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsRequest.delegator_address": - return x.DelegatorAddress != "" + case "band.feeds.v1beta1.QueryVoteRequest.voter": + return x.Voter != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteRequest")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteRequest does not contain field %s", fd.FullName())) } } @@ -2744,15 +2744,15 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) Has(fd protoreflect.FieldD // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDelegatorSignalsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryVoteRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsRequest.delegator_address": - x.DelegatorAddress = "" + case "band.feeds.v1beta1.QueryVoteRequest.voter": + x.Voter = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteRequest")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteRequest does not contain field %s", fd.FullName())) } } @@ -2762,16 +2762,16 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) Clear(fd protoreflect.Fiel // 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_QueryDelegatorSignalsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryVoteRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsRequest.delegator_address": - value := x.DelegatorAddress + case "band.feeds.v1beta1.QueryVoteRequest.voter": + value := x.Voter return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteRequest")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteRequest does not contain field %s", descriptor.FullName())) } } @@ -2785,15 +2785,15 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) Get(descriptor protoreflec // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDelegatorSignalsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryVoteRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsRequest.delegator_address": - x.DelegatorAddress = value.Interface().(string) + case "band.feeds.v1beta1.QueryVoteRequest.voter": + x.Voter = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteRequest")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteRequest does not contain field %s", fd.FullName())) } } @@ -2807,40 +2807,40 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) Set(fd protoreflect.FieldD // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDelegatorSignalsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryVoteRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsRequest.delegator_address": - panic(fmt.Errorf("field delegator_address of message band.feeds.v1beta1.QueryDelegatorSignalsRequest is not mutable")) + case "band.feeds.v1beta1.QueryVoteRequest.voter": + panic(fmt.Errorf("field voter of message band.feeds.v1beta1.QueryVoteRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteRequest")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteRequest 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_QueryDelegatorSignalsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryVoteRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsRequest.delegator_address": + case "band.feeds.v1beta1.QueryVoteRequest.voter": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteRequest")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteRequest 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_QueryDelegatorSignalsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryVoteRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.QueryDelegatorSignalsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.QueryVoteRequest", d.FullName())) } panic("unreachable") } @@ -2848,7 +2848,7 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) WhichOneof(d protoreflect. // 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_QueryDelegatorSignalsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryVoteRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2859,7 +2859,7 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) GetUnknown() protoreflect. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDelegatorSignalsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryVoteRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2871,7 +2871,7 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) SetUnknown(fields protoref // 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_QueryDelegatorSignalsRequest) IsValid() bool { +func (x *fastReflection_QueryVoteRequest) IsValid() bool { return x != nil } @@ -2881,9 +2881,9 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryDelegatorSignalsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryVoteRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorSignalsRequest) + x := input.Message.Interface().(*QueryVoteRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2895,7 +2895,7 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) ProtoMethods() *protoiface var n int var l int _ = l - l = len(x.DelegatorAddress) + l = len(x.Voter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2909,7 +2909,7 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) ProtoMethods() *protoiface } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorSignalsRequest) + x := input.Message.Interface().(*QueryVoteRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2928,10 +2928,10 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) ProtoMethods() *protoiface i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.DelegatorAddress) > 0 { - i -= len(x.DelegatorAddress) - copy(dAtA[i:], x.DelegatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegatorAddress))) + if len(x.Voter) > 0 { + i -= len(x.Voter) + copy(dAtA[i:], x.Voter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) i-- dAtA[i] = 0xa } @@ -2946,7 +2946,7 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) ProtoMethods() *protoiface }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorSignalsRequest) + x := input.Message.Interface().(*QueryVoteRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2978,15 +2978,15 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) ProtoMethods() *protoiface fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorSignalsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorSignalsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteRequest: 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 DelegatorAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3014,7 +3014,7 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) ProtoMethods() *protoiface if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + x.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3051,77 +3051,77 @@ func (x *fastReflection_QueryDelegatorSignalsRequest) ProtoMethods() *protoiface } } -var _ protoreflect.List = (*_QueryDelegatorSignalsResponse_1_list)(nil) +var _ protoreflect.List = (*_QueryVoteResponse_1_list)(nil) -type _QueryDelegatorSignalsResponse_1_list struct { +type _QueryVoteResponse_1_list struct { list *[]*Signal } -func (x *_QueryDelegatorSignalsResponse_1_list) Len() int { +func (x *_QueryVoteResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_QueryDelegatorSignalsResponse_1_list) Get(i int) protoreflect.Value { +func (x *_QueryVoteResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_QueryDelegatorSignalsResponse_1_list) Set(i int, value protoreflect.Value) { +func (x *_QueryVoteResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Signal) (*x.list)[i] = concreteValue } -func (x *_QueryDelegatorSignalsResponse_1_list) Append(value protoreflect.Value) { +func (x *_QueryVoteResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Signal) *x.list = append(*x.list, concreteValue) } -func (x *_QueryDelegatorSignalsResponse_1_list) AppendMutable() protoreflect.Value { +func (x *_QueryVoteResponse_1_list) AppendMutable() protoreflect.Value { v := new(Signal) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryDelegatorSignalsResponse_1_list) Truncate(n int) { +func (x *_QueryVoteResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_QueryDelegatorSignalsResponse_1_list) NewElement() protoreflect.Value { +func (x *_QueryVoteResponse_1_list) NewElement() protoreflect.Value { v := new(Signal) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryDelegatorSignalsResponse_1_list) IsValid() bool { +func (x *_QueryVoteResponse_1_list) IsValid() bool { return x.list != nil } var ( - md_QueryDelegatorSignalsResponse protoreflect.MessageDescriptor - fd_QueryDelegatorSignalsResponse_signals protoreflect.FieldDescriptor + md_QueryVoteResponse protoreflect.MessageDescriptor + fd_QueryVoteResponse_signals protoreflect.FieldDescriptor ) func init() { file_band_feeds_v1beta1_query_proto_init() - md_QueryDelegatorSignalsResponse = File_band_feeds_v1beta1_query_proto.Messages().ByName("QueryDelegatorSignalsResponse") - fd_QueryDelegatorSignalsResponse_signals = md_QueryDelegatorSignalsResponse.Fields().ByName("signals") + md_QueryVoteResponse = File_band_feeds_v1beta1_query_proto.Messages().ByName("QueryVoteResponse") + fd_QueryVoteResponse_signals = md_QueryVoteResponse.Fields().ByName("signals") } -var _ protoreflect.Message = (*fastReflection_QueryDelegatorSignalsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryVoteResponse)(nil) -type fastReflection_QueryDelegatorSignalsResponse QueryDelegatorSignalsResponse +type fastReflection_QueryVoteResponse QueryVoteResponse -func (x *QueryDelegatorSignalsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDelegatorSignalsResponse)(x) +func (x *QueryVoteResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryVoteResponse)(x) } -func (x *QueryDelegatorSignalsResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryVoteResponse) slowProtoReflect() protoreflect.Message { mi := &file_band_feeds_v1beta1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3133,43 +3133,43 @@ func (x *QueryDelegatorSignalsResponse) slowProtoReflect() protoreflect.Message return mi.MessageOf(x) } -var _fastReflection_QueryDelegatorSignalsResponse_messageType fastReflection_QueryDelegatorSignalsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDelegatorSignalsResponse_messageType{} +var _fastReflection_QueryVoteResponse_messageType fastReflection_QueryVoteResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryVoteResponse_messageType{} -type fastReflection_QueryDelegatorSignalsResponse_messageType struct{} +type fastReflection_QueryVoteResponse_messageType struct{} -func (x fastReflection_QueryDelegatorSignalsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDelegatorSignalsResponse)(nil) +func (x fastReflection_QueryVoteResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryVoteResponse)(nil) } -func (x fastReflection_QueryDelegatorSignalsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorSignalsResponse) +func (x fastReflection_QueryVoteResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryVoteResponse) } -func (x fastReflection_QueryDelegatorSignalsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorSignalsResponse +func (x fastReflection_QueryVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryVoteResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryDelegatorSignalsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDelegatorSignalsResponse +func (x *fastReflection_QueryVoteResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryVoteResponse } // 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_QueryDelegatorSignalsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDelegatorSignalsResponse_messageType +func (x *fastReflection_QueryVoteResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryVoteResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDelegatorSignalsResponse) New() protoreflect.Message { - return new(fastReflection_QueryDelegatorSignalsResponse) +func (x *fastReflection_QueryVoteResponse) New() protoreflect.Message { + return new(fastReflection_QueryVoteResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDelegatorSignalsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDelegatorSignalsResponse)(x) +func (x *fastReflection_QueryVoteResponse) Interface() protoreflect.ProtoMessage { + return (*QueryVoteResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3177,10 +3177,10 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) Interface() protoreflect. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryDelegatorSignalsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryVoteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Signals) != 0 { - value := protoreflect.ValueOfList(&_QueryDelegatorSignalsResponse_1_list{list: &x.Signals}) - if !f(fd_QueryDelegatorSignalsResponse_signals, value) { + value := protoreflect.ValueOfList(&_QueryVoteResponse_1_list{list: &x.Signals}) + if !f(fd_QueryVoteResponse_signals, value) { return } } @@ -3197,15 +3197,15 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) Range(f func(protoreflect // 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_QueryDelegatorSignalsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsResponse.signals": + case "band.feeds.v1beta1.QueryVoteResponse.signals": return len(x.Signals) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteResponse does not contain field %s", fd.FullName())) } } @@ -3215,15 +3215,15 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) Has(fd protoreflect.Field // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDelegatorSignalsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryVoteResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsResponse.signals": + case "band.feeds.v1beta1.QueryVoteResponse.signals": x.Signals = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteResponse does not contain field %s", fd.FullName())) } } @@ -3233,19 +3233,19 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) Clear(fd protoreflect.Fie // 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_QueryDelegatorSignalsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsResponse.signals": + case "band.feeds.v1beta1.QueryVoteResponse.signals": if len(x.Signals) == 0 { - return protoreflect.ValueOfList(&_QueryDelegatorSignalsResponse_1_list{}) + return protoreflect.ValueOfList(&_QueryVoteResponse_1_list{}) } - listValue := &_QueryDelegatorSignalsResponse_1_list{list: &x.Signals} + listValue := &_QueryVoteResponse_1_list{list: &x.Signals} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteResponse does not contain field %s", descriptor.FullName())) } } @@ -3259,17 +3259,17 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) Get(descriptor protorefle // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDelegatorSignalsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryVoteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsResponse.signals": + case "band.feeds.v1beta1.QueryVoteResponse.signals": lv := value.List() - clv := lv.(*_QueryDelegatorSignalsResponse_1_list) + clv := lv.(*_QueryVoteResponse_1_list) x.Signals = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteResponse does not contain field %s", fd.FullName())) } } @@ -3283,45 +3283,45 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) Set(fd protoreflect.Field // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDelegatorSignalsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsResponse.signals": + case "band.feeds.v1beta1.QueryVoteResponse.signals": if x.Signals == nil { x.Signals = []*Signal{} } - value := &_QueryDelegatorSignalsResponse_1_list{list: &x.Signals} + value := &_QueryVoteResponse_1_list{list: &x.Signals} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteResponse 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_QueryDelegatorSignalsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryDelegatorSignalsResponse.signals": + case "band.feeds.v1beta1.QueryVoteResponse.signals": list := []*Signal{} - return protoreflect.ValueOfList(&_QueryDelegatorSignalsResponse_1_list{list: &list}) + return protoreflect.ValueOfList(&_QueryVoteResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryDelegatorSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.QueryDelegatorSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.QueryVoteResponse 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_QueryDelegatorSignalsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.QueryDelegatorSignalsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.QueryVoteResponse", d.FullName())) } panic("unreachable") } @@ -3329,7 +3329,7 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) WhichOneof(d protoreflect // 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_QueryDelegatorSignalsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryVoteResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3340,7 +3340,7 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) GetUnknown() protoreflect // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDelegatorSignalsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryVoteResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3352,7 +3352,7 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) SetUnknown(fields protore // 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_QueryDelegatorSignalsResponse) IsValid() bool { +func (x *fastReflection_QueryVoteResponse) IsValid() bool { return x != nil } @@ -3362,9 +3362,9 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryDelegatorSignalsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryVoteResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDelegatorSignalsResponse) + x := input.Message.Interface().(*QueryVoteResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3392,7 +3392,7 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) ProtoMethods() *protoifac } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorSignalsResponse) + x := input.Message.Interface().(*QueryVoteResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3438,7 +3438,7 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) ProtoMethods() *protoifac }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDelegatorSignalsResponse) + x := input.Message.Interface().(*QueryVoteResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3470,10 +3470,10 @@ func (x *fastReflection_QueryDelegatorSignalsResponse) ProtoMethods() *protoifac fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorSignalsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDelegatorSignalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -11223,18 +11223,18 @@ func (x *QueryCurrentPricesResponse) GetPrices() []*Price { return nil } -// QueryDelegatorSignalsRequest is the request type for the Query/DelegatorSignals RPC method. -type QueryDelegatorSignalsRequest struct { +// QueryVoteRequest is the request type for the Query/Vote RPC method. +type QueryVoteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // delegator_address is the delegator address to query signal for. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // voter is the voter address to query signal for. + Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` } -func (x *QueryDelegatorSignalsRequest) Reset() { - *x = QueryDelegatorSignalsRequest{} +func (x *QueryVoteRequest) Reset() { + *x = QueryVoteRequest{} if protoimpl.UnsafeEnabled { mi := &file_band_feeds_v1beta1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11242,36 +11242,36 @@ func (x *QueryDelegatorSignalsRequest) Reset() { } } -func (x *QueryDelegatorSignalsRequest) String() string { +func (x *QueryVoteRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryDelegatorSignalsRequest) ProtoMessage() {} +func (*QueryVoteRequest) ProtoMessage() {} -// Deprecated: Use QueryDelegatorSignalsRequest.ProtoReflect.Descriptor instead. -func (*QueryDelegatorSignalsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryVoteRequest.ProtoReflect.Descriptor instead. +func (*QueryVoteRequest) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_query_proto_rawDescGZIP(), []int{6} } -func (x *QueryDelegatorSignalsRequest) GetDelegatorAddress() string { +func (x *QueryVoteRequest) GetVoter() string { if x != nil { - return x.DelegatorAddress + return x.Voter } return "" } -// QueryDelegatorSignalsResponse is the response type for the Query/DelegatorSignals RPC method. -type QueryDelegatorSignalsResponse struct { +// QueryVoteResponse is the response type for the Query/Vote RPC method. +type QueryVoteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // signals is a list of signals submitted by the delegator. + // signals is a list of signals submitted by the voter. Signals []*Signal `protobuf:"bytes,1,rep,name=signals,proto3" json:"signals,omitempty"` } -func (x *QueryDelegatorSignalsResponse) Reset() { - *x = QueryDelegatorSignalsResponse{} +func (x *QueryVoteResponse) Reset() { + *x = QueryVoteResponse{} if protoimpl.UnsafeEnabled { mi := &file_band_feeds_v1beta1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -11279,18 +11279,18 @@ func (x *QueryDelegatorSignalsResponse) Reset() { } } -func (x *QueryDelegatorSignalsResponse) String() string { +func (x *QueryVoteResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryDelegatorSignalsResponse) ProtoMessage() {} +func (*QueryVoteResponse) ProtoMessage() {} -// Deprecated: Use QueryDelegatorSignalsResponse.ProtoReflect.Descriptor instead. -func (*QueryDelegatorSignalsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryVoteResponse.ProtoReflect.Descriptor instead. +func (*QueryVoteResponse) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_query_proto_rawDescGZIP(), []int{7} } -func (x *QueryDelegatorSignalsResponse) GetSignals() []*Signal { +func (x *QueryVoteResponse) GetSignals() []*Signal { if x != nil { return x.Signals } @@ -11967,252 +11967,245 @@ var file_band_feeds_v1beta1_query_proto_rawDesc = []byte{ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x22, 0x65, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x45, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x5b, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x73, 0x22, 0x6a, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, - 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x65, 0x65, - 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x34, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, - 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, - 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x13, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x30, 0x0a, - 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x22, - 0x4b, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x7b, 0x0a, 0x12, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, - 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x06, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x23, 0x0a, - 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x17, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, 0x6e, + 0x22, 0x42, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x05, 0x76, + 0x6f, 0x74, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x15, 0x72, 0x65, 0x66, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x22, 0x6a, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, + 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, + 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x65, + 0x65, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x34, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, + 0x5f, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, + 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, + 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x30, + 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, + 0x22, 0x4b, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x7b, 0x0a, + 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, + 0x64, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x06, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x23, + 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x22, 0x86, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x49, 0x64, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x1e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, - 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, - 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, - 0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x17, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x15, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x86, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x49, 0x64, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb5, 0x01, 0x0a, + 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4a, 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, + 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x33, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x32, 0xba, 0x0e, 0x0a, 0x05, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa2, 0x01, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x2d, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x6c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, - 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x33, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x32, 0xf9, 0x0e, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0xa2, 0x01, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, + 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x62, 0x61, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, + 0x12, 0x1c, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x66, 0x65, 0x65, 0x64, 0x73, 0x12, 0xa2, + 0x01, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, + 0x12, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, + 0x64, 0x73, 0x7d, 0x12, 0x78, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x2d, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x2d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x62, 0x61, 0x6e, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, + 0x12, 0x1b, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x12, 0xa3, 0x01, + 0x0a, 0x08, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, - 0x1c, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x66, 0x65, 0x65, 0x64, 0x73, 0x12, 0xa2, 0x01, - 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, - 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x2f, 0x7b, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x7d, 0x2f, 0x7b, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x81, 0x01, + 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x70, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, + 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x73, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, - 0x7b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x7d, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0xa3, 0x01, 0x0a, 0x08, - 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, - 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, - 0x2f, 0x7b, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, + 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x05, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x15, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, - 0x78, 0x0a, 0x06, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x17, 0x12, 0x15, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x15, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x61, 0x6e, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0xa6, 0x01, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0xa6, 0x01, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, + 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, + 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x2d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0xa3, 0x01, + 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x2f, + 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, - 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, - 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2d, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x2d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0xa3, 0x01, 0x0a, 0x0e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2e, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x2f, 0x7b, 0x76, + 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x36, 0x12, 0x34, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, - 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, - 0x12, 0x34, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, - 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64, 0x73, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, 0x02, 0x12, 0x42, 0x61, - 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, - 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x46, - 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x7d, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, + 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, 0x02, 0x12, + 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, + 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x3a, + 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -12235,8 +12228,8 @@ var file_band_feeds_v1beta1_query_proto_goTypes = []interface{}{ (*QueryCurrentFeedsResponse)(nil), // 3: band.feeds.v1beta1.QueryCurrentFeedsResponse (*QueryCurrentPricesRequest)(nil), // 4: band.feeds.v1beta1.QueryCurrentPricesRequest (*QueryCurrentPricesResponse)(nil), // 5: band.feeds.v1beta1.QueryCurrentPricesResponse - (*QueryDelegatorSignalsRequest)(nil), // 6: band.feeds.v1beta1.QueryDelegatorSignalsRequest - (*QueryDelegatorSignalsResponse)(nil), // 7: band.feeds.v1beta1.QueryDelegatorSignalsResponse + (*QueryVoteRequest)(nil), // 6: band.feeds.v1beta1.QueryVoteRequest + (*QueryVoteResponse)(nil), // 7: band.feeds.v1beta1.QueryVoteResponse (*QueryIsFeederRequest)(nil), // 8: band.feeds.v1beta1.QueryIsFeederRequest (*QueryIsFeederResponse)(nil), // 9: band.feeds.v1beta1.QueryIsFeederResponse (*QueryParamsRequest)(nil), // 10: band.feeds.v1beta1.QueryParamsRequest @@ -12266,7 +12259,7 @@ var file_band_feeds_v1beta1_query_proto_depIdxs = []int32{ 24, // 0: band.feeds.v1beta1.QueryAllCurrentPricesResponse.prices:type_name -> band.feeds.v1beta1.Price 25, // 1: band.feeds.v1beta1.QueryCurrentFeedsResponse.current_feeds:type_name -> band.feeds.v1beta1.CurrentFeedWithDeviations 24, // 2: band.feeds.v1beta1.QueryCurrentPricesResponse.prices:type_name -> band.feeds.v1beta1.Price - 26, // 3: band.feeds.v1beta1.QueryDelegatorSignalsResponse.signals:type_name -> band.feeds.v1beta1.Signal + 26, // 3: band.feeds.v1beta1.QueryVoteResponse.signals:type_name -> band.feeds.v1beta1.Signal 27, // 4: band.feeds.v1beta1.QueryParamsResponse.params:type_name -> band.feeds.v1beta1.Params 24, // 5: band.feeds.v1beta1.QueryPriceResponse.price:type_name -> band.feeds.v1beta1.Price 28, // 6: band.feeds.v1beta1.QueryPricesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest @@ -12280,7 +12273,7 @@ var file_band_feeds_v1beta1_query_proto_depIdxs = []int32{ 0, // 14: band.feeds.v1beta1.Query.AllCurrentPrices:input_type -> band.feeds.v1beta1.QueryAllCurrentPricesRequest 2, // 15: band.feeds.v1beta1.Query.CurrentFeeds:input_type -> band.feeds.v1beta1.QueryCurrentFeedsRequest 4, // 16: band.feeds.v1beta1.Query.CurrentPrices:input_type -> band.feeds.v1beta1.QueryCurrentPricesRequest - 6, // 17: band.feeds.v1beta1.Query.DelegatorSignals:input_type -> band.feeds.v1beta1.QueryDelegatorSignalsRequest + 6, // 17: band.feeds.v1beta1.Query.Vote:input_type -> band.feeds.v1beta1.QueryVoteRequest 8, // 18: band.feeds.v1beta1.Query.IsFeeder:input_type -> band.feeds.v1beta1.QueryIsFeederRequest 10, // 19: band.feeds.v1beta1.Query.Params:input_type -> band.feeds.v1beta1.QueryParamsRequest 12, // 20: band.feeds.v1beta1.Query.Price:input_type -> band.feeds.v1beta1.QueryPriceRequest @@ -12292,7 +12285,7 @@ var file_band_feeds_v1beta1_query_proto_depIdxs = []int32{ 1, // 26: band.feeds.v1beta1.Query.AllCurrentPrices:output_type -> band.feeds.v1beta1.QueryAllCurrentPricesResponse 3, // 27: band.feeds.v1beta1.Query.CurrentFeeds:output_type -> band.feeds.v1beta1.QueryCurrentFeedsResponse 5, // 28: band.feeds.v1beta1.Query.CurrentPrices:output_type -> band.feeds.v1beta1.QueryCurrentPricesResponse - 7, // 29: band.feeds.v1beta1.Query.DelegatorSignals:output_type -> band.feeds.v1beta1.QueryDelegatorSignalsResponse + 7, // 29: band.feeds.v1beta1.Query.Vote:output_type -> band.feeds.v1beta1.QueryVoteResponse 9, // 30: band.feeds.v1beta1.Query.IsFeeder:output_type -> band.feeds.v1beta1.QueryIsFeederResponse 11, // 31: band.feeds.v1beta1.Query.Params:output_type -> band.feeds.v1beta1.QueryParamsResponse 13, // 32: band.feeds.v1beta1.Query.Price:output_type -> band.feeds.v1beta1.QueryPriceResponse @@ -12389,7 +12382,7 @@ func file_band_feeds_v1beta1_query_proto_init() { } } file_band_feeds_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorSignalsRequest); i { + switch v := v.(*QueryVoteRequest); i { case 0: return &v.state case 1: @@ -12401,7 +12394,7 @@ func file_band_feeds_v1beta1_query_proto_init() { } } file_band_feeds_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDelegatorSignalsResponse); i { + switch v := v.(*QueryVoteResponse); i { case 0: return &v.state case 1: diff --git a/api/band/feeds/v1beta1/query_grpc.pb.go b/api/band/feeds/v1beta1/query_grpc.pb.go index 049e594ee..c9252242a 100644 --- a/api/band/feeds/v1beta1/query_grpc.pb.go +++ b/api/band/feeds/v1beta1/query_grpc.pb.go @@ -22,7 +22,7 @@ const ( Query_AllCurrentPrices_FullMethodName = "/band.feeds.v1beta1.Query/AllCurrentPrices" Query_CurrentFeeds_FullMethodName = "/band.feeds.v1beta1.Query/CurrentFeeds" Query_CurrentPrices_FullMethodName = "/band.feeds.v1beta1.Query/CurrentPrices" - Query_DelegatorSignals_FullMethodName = "/band.feeds.v1beta1.Query/DelegatorSignals" + Query_Vote_FullMethodName = "/band.feeds.v1beta1.Query/Vote" Query_IsFeeder_FullMethodName = "/band.feeds.v1beta1.Query/IsFeeder" Query_Params_FullMethodName = "/band.feeds.v1beta1.Query/Params" Query_Price_FullMethodName = "/band.feeds.v1beta1.Query/Price" @@ -43,8 +43,8 @@ type QueryClient interface { CurrentFeeds(ctx context.Context, in *QueryCurrentFeedsRequest, opts ...grpc.CallOption) (*QueryCurrentFeedsResponse, error) // CurrentPrices is an RPC method that returns a list of current prices. CurrentPrices(ctx context.Context, in *QueryCurrentPricesRequest, opts ...grpc.CallOption) (*QueryCurrentPricesResponse, error) - // DelegatorSignals is an RPC method that returns signals of a delegator. - DelegatorSignals(ctx context.Context, in *QueryDelegatorSignalsRequest, opts ...grpc.CallOption) (*QueryDelegatorSignalsResponse, error) + // Vote is an RPC method that returns signals of a voter. + Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) // IsFeeder is an RPC method that returns whether an account is a feeder for a specified validator. IsFeeder(ctx context.Context, in *QueryIsFeederRequest, opts ...grpc.CallOption) (*QueryIsFeederResponse, error) // Params is an RPC method that returns all parameters of the module. @@ -99,9 +99,9 @@ func (c *queryClient) CurrentPrices(ctx context.Context, in *QueryCurrentPricesR return out, nil } -func (c *queryClient) DelegatorSignals(ctx context.Context, in *QueryDelegatorSignalsRequest, opts ...grpc.CallOption) (*QueryDelegatorSignalsResponse, error) { - out := new(QueryDelegatorSignalsResponse) - err := c.cc.Invoke(ctx, Query_DelegatorSignals_FullMethodName, in, out, opts...) +func (c *queryClient) Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) { + out := new(QueryVoteResponse) + err := c.cc.Invoke(ctx, Query_Vote_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -190,8 +190,8 @@ type QueryServer interface { CurrentFeeds(context.Context, *QueryCurrentFeedsRequest) (*QueryCurrentFeedsResponse, error) // CurrentPrices is an RPC method that returns a list of current prices. CurrentPrices(context.Context, *QueryCurrentPricesRequest) (*QueryCurrentPricesResponse, error) - // DelegatorSignals is an RPC method that returns signals of a delegator. - DelegatorSignals(context.Context, *QueryDelegatorSignalsRequest) (*QueryDelegatorSignalsResponse, error) + // Vote is an RPC method that returns signals of a voter. + Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error) // IsFeeder is an RPC method that returns whether an account is a feeder for a specified validator. IsFeeder(context.Context, *QueryIsFeederRequest) (*QueryIsFeederResponse, error) // Params is an RPC method that returns all parameters of the module. @@ -225,8 +225,8 @@ func (UnimplementedQueryServer) CurrentFeeds(context.Context, *QueryCurrentFeeds func (UnimplementedQueryServer) CurrentPrices(context.Context, *QueryCurrentPricesRequest) (*QueryCurrentPricesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CurrentPrices not implemented") } -func (UnimplementedQueryServer) DelegatorSignals(context.Context, *QueryDelegatorSignalsRequest) (*QueryDelegatorSignalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorSignals not implemented") +func (UnimplementedQueryServer) Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") } func (UnimplementedQueryServer) IsFeeder(context.Context, *QueryIsFeederRequest) (*QueryIsFeederResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IsFeeder not implemented") @@ -319,20 +319,20 @@ func _Query_CurrentPrices_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_DelegatorSignals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorSignalsRequest) +func _Query_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVoteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).DelegatorSignals(ctx, in) + return srv.(QueryServer).Vote(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_DelegatorSignals_FullMethodName, + FullMethod: Query_Vote_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorSignals(ctx, req.(*QueryDelegatorSignalsRequest)) + return srv.(QueryServer).Vote(ctx, req.(*QueryVoteRequest)) } return interceptor(ctx, in, info, handler) } @@ -501,8 +501,8 @@ var Query_ServiceDesc = grpc.ServiceDesc{ Handler: _Query_CurrentPrices_Handler, }, { - MethodName: "DelegatorSignals", - Handler: _Query_DelegatorSignals_Handler, + MethodName: "Vote", + Handler: _Query_Vote_Handler, }, { MethodName: "IsFeeder", diff --git a/api/band/feeds/v1beta1/tx.pulsar.go b/api/band/feeds/v1beta1/tx.pulsar.go index 4e64e24b1..9ec1c32fb 100644 --- a/api/band/feeds/v1beta1/tx.pulsar.go +++ b/api/band/feeds/v1beta1/tx.pulsar.go @@ -16,79 +16,79 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_MsgSubmitSignals_2_list)(nil) +var _ protoreflect.List = (*_MsgVoteSignals_2_list)(nil) -type _MsgSubmitSignals_2_list struct { +type _MsgVoteSignals_2_list struct { list *[]*Signal } -func (x *_MsgSubmitSignals_2_list) Len() int { +func (x *_MsgVoteSignals_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgSubmitSignals_2_list) Get(i int) protoreflect.Value { +func (x *_MsgVoteSignals_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgSubmitSignals_2_list) Set(i int, value protoreflect.Value) { +func (x *_MsgVoteSignals_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Signal) (*x.list)[i] = concreteValue } -func (x *_MsgSubmitSignals_2_list) Append(value protoreflect.Value) { +func (x *_MsgVoteSignals_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Signal) *x.list = append(*x.list, concreteValue) } -func (x *_MsgSubmitSignals_2_list) AppendMutable() protoreflect.Value { +func (x *_MsgVoteSignals_2_list) AppendMutable() protoreflect.Value { v := new(Signal) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgSubmitSignals_2_list) Truncate(n int) { +func (x *_MsgVoteSignals_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgSubmitSignals_2_list) NewElement() protoreflect.Value { +func (x *_MsgVoteSignals_2_list) NewElement() protoreflect.Value { v := new(Signal) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgSubmitSignals_2_list) IsValid() bool { +func (x *_MsgVoteSignals_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgSubmitSignals protoreflect.MessageDescriptor - fd_MsgSubmitSignals_delegator protoreflect.FieldDescriptor - fd_MsgSubmitSignals_signals protoreflect.FieldDescriptor + md_MsgVoteSignals protoreflect.MessageDescriptor + fd_MsgVoteSignals_voter protoreflect.FieldDescriptor + fd_MsgVoteSignals_signals protoreflect.FieldDescriptor ) func init() { file_band_feeds_v1beta1_tx_proto_init() - md_MsgSubmitSignals = File_band_feeds_v1beta1_tx_proto.Messages().ByName("MsgSubmitSignals") - fd_MsgSubmitSignals_delegator = md_MsgSubmitSignals.Fields().ByName("delegator") - fd_MsgSubmitSignals_signals = md_MsgSubmitSignals.Fields().ByName("signals") + md_MsgVoteSignals = File_band_feeds_v1beta1_tx_proto.Messages().ByName("MsgVoteSignals") + fd_MsgVoteSignals_voter = md_MsgVoteSignals.Fields().ByName("voter") + fd_MsgVoteSignals_signals = md_MsgVoteSignals.Fields().ByName("signals") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitSignals)(nil) +var _ protoreflect.Message = (*fastReflection_MsgVoteSignals)(nil) -type fastReflection_MsgSubmitSignals MsgSubmitSignals +type fastReflection_MsgVoteSignals MsgVoteSignals -func (x *MsgSubmitSignals) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitSignals)(x) +func (x *MsgVoteSignals) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteSignals)(x) } -func (x *MsgSubmitSignals) slowProtoReflect() protoreflect.Message { +func (x *MsgVoteSignals) slowProtoReflect() protoreflect.Message { mi := &file_band_feeds_v1beta1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100,43 +100,43 @@ func (x *MsgSubmitSignals) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitSignals_messageType fastReflection_MsgSubmitSignals_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitSignals_messageType{} +var _fastReflection_MsgVoteSignals_messageType fastReflection_MsgVoteSignals_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteSignals_messageType{} -type fastReflection_MsgSubmitSignals_messageType struct{} +type fastReflection_MsgVoteSignals_messageType struct{} -func (x fastReflection_MsgSubmitSignals_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitSignals)(nil) +func (x fastReflection_MsgVoteSignals_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteSignals)(nil) } -func (x fastReflection_MsgSubmitSignals_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitSignals) +func (x fastReflection_MsgVoteSignals_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteSignals) } -func (x fastReflection_MsgSubmitSignals_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitSignals +func (x fastReflection_MsgVoteSignals_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteSignals } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitSignals) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitSignals +func (x *fastReflection_MsgVoteSignals) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteSignals } // 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_MsgSubmitSignals) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitSignals_messageType +func (x *fastReflection_MsgVoteSignals) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteSignals_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitSignals) New() protoreflect.Message { - return new(fastReflection_MsgSubmitSignals) +func (x *fastReflection_MsgVoteSignals) New() protoreflect.Message { + return new(fastReflection_MsgVoteSignals) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitSignals) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitSignals)(x) +func (x *fastReflection_MsgVoteSignals) Interface() protoreflect.ProtoMessage { + return (*MsgVoteSignals)(x) } // Range iterates over every populated field in an undefined order, @@ -144,16 +144,16 @@ func (x *fastReflection_MsgSubmitSignals) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitSignals) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Delegator != "" { - value := protoreflect.ValueOfString(x.Delegator) - if !f(fd_MsgSubmitSignals_delegator, value) { +func (x *fastReflection_MsgVoteSignals) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Voter != "" { + value := protoreflect.ValueOfString(x.Voter) + if !f(fd_MsgVoteSignals_voter, value) { return } } if len(x.Signals) != 0 { - value := protoreflect.ValueOfList(&_MsgSubmitSignals_2_list{list: &x.Signals}) - if !f(fd_MsgSubmitSignals_signals, value) { + value := protoreflect.ValueOfList(&_MsgVoteSignals_2_list{list: &x.Signals}) + if !f(fd_MsgVoteSignals_signals, value) { return } } @@ -170,17 +170,17 @@ func (x *fastReflection_MsgSubmitSignals) Range(f func(protoreflect.FieldDescrip // 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_MsgSubmitSignals) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgVoteSignals) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.feeds.v1beta1.MsgSubmitSignals.delegator": - return x.Delegator != "" - case "band.feeds.v1beta1.MsgSubmitSignals.signals": + case "band.feeds.v1beta1.MsgVoteSignals.voter": + return x.Voter != "" + case "band.feeds.v1beta1.MsgVoteSignals.signals": return len(x.Signals) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", fd.FullName())) } } @@ -190,17 +190,17 @@ func (x *fastReflection_MsgSubmitSignals) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignals) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgVoteSignals) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.feeds.v1beta1.MsgSubmitSignals.delegator": - x.Delegator = "" - case "band.feeds.v1beta1.MsgSubmitSignals.signals": + case "band.feeds.v1beta1.MsgVoteSignals.voter": + x.Voter = "" + case "band.feeds.v1beta1.MsgVoteSignals.signals": x.Signals = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", fd.FullName())) } } @@ -210,22 +210,22 @@ func (x *fastReflection_MsgSubmitSignals) Clear(fd protoreflect.FieldDescriptor) // 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_MsgSubmitSignals) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteSignals) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.feeds.v1beta1.MsgSubmitSignals.delegator": - value := x.Delegator + case "band.feeds.v1beta1.MsgVoteSignals.voter": + value := x.Voter return protoreflect.ValueOfString(value) - case "band.feeds.v1beta1.MsgSubmitSignals.signals": + case "band.feeds.v1beta1.MsgVoteSignals.signals": if len(x.Signals) == 0 { - return protoreflect.ValueOfList(&_MsgSubmitSignals_2_list{}) + return protoreflect.ValueOfList(&_MsgVoteSignals_2_list{}) } - listValue := &_MsgSubmitSignals_2_list{list: &x.Signals} + listValue := &_MsgVoteSignals_2_list{list: &x.Signals} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignals does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", descriptor.FullName())) } } @@ -239,19 +239,19 @@ func (x *fastReflection_MsgSubmitSignals) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignals) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgVoteSignals) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.feeds.v1beta1.MsgSubmitSignals.delegator": - x.Delegator = value.Interface().(string) - case "band.feeds.v1beta1.MsgSubmitSignals.signals": + case "band.feeds.v1beta1.MsgVoteSignals.voter": + x.Voter = value.Interface().(string) + case "band.feeds.v1beta1.MsgVoteSignals.signals": lv := value.List() - clv := lv.(*_MsgSubmitSignals_2_list) + clv := lv.(*_MsgVoteSignals_2_list) x.Signals = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", fd.FullName())) } } @@ -265,49 +265,49 @@ func (x *fastReflection_MsgSubmitSignals) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignals) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteSignals) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.MsgSubmitSignals.signals": + case "band.feeds.v1beta1.MsgVoteSignals.signals": if x.Signals == nil { x.Signals = []*Signal{} } - value := &_MsgSubmitSignals_2_list{list: &x.Signals} + value := &_MsgVoteSignals_2_list{list: &x.Signals} return protoreflect.ValueOfList(value) - case "band.feeds.v1beta1.MsgSubmitSignals.delegator": - panic(fmt.Errorf("field delegator of message band.feeds.v1beta1.MsgSubmitSignals is not mutable")) + case "band.feeds.v1beta1.MsgVoteSignals.voter": + panic(fmt.Errorf("field voter of message band.feeds.v1beta1.MsgVoteSignals is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals 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_MsgSubmitSignals) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteSignals) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.MsgSubmitSignals.delegator": + case "band.feeds.v1beta1.MsgVoteSignals.voter": return protoreflect.ValueOfString("") - case "band.feeds.v1beta1.MsgSubmitSignals.signals": + case "band.feeds.v1beta1.MsgVoteSignals.signals": list := []*Signal{} - return protoreflect.ValueOfList(&_MsgSubmitSignals_2_list{list: &list}) + return protoreflect.ValueOfList(&_MsgVoteSignals_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals 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_MsgSubmitSignals) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgVoteSignals) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.MsgSubmitSignals", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.MsgVoteSignals", d.FullName())) } panic("unreachable") } @@ -315,7 +315,7 @@ func (x *fastReflection_MsgSubmitSignals) WhichOneof(d protoreflect.OneofDescrip // 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_MsgSubmitSignals) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgVoteSignals) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -326,7 +326,7 @@ func (x *fastReflection_MsgSubmitSignals) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignals) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgVoteSignals) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -338,7 +338,7 @@ func (x *fastReflection_MsgSubmitSignals) SetUnknown(fields protoreflect.RawFiel // 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_MsgSubmitSignals) IsValid() bool { +func (x *fastReflection_MsgVoteSignals) IsValid() bool { return x != nil } @@ -348,9 +348,9 @@ func (x *fastReflection_MsgSubmitSignals) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitSignals) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgVoteSignals) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitSignals) + x := input.Message.Interface().(*MsgVoteSignals) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -362,7 +362,7 @@ func (x *fastReflection_MsgSubmitSignals) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Delegator) + l = len(x.Voter) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -382,7 +382,7 @@ func (x *fastReflection_MsgSubmitSignals) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitSignals) + x := input.Message.Interface().(*MsgVoteSignals) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -417,10 +417,10 @@ func (x *fastReflection_MsgSubmitSignals) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x12 } } - if len(x.Delegator) > 0 { - i -= len(x.Delegator) - copy(dAtA[i:], x.Delegator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Delegator))) + if len(x.Voter) > 0 { + i -= len(x.Voter) + copy(dAtA[i:], x.Voter) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Voter))) i-- dAtA[i] = 0xa } @@ -435,7 +435,7 @@ func (x *fastReflection_MsgSubmitSignals) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitSignals) + x := input.Message.Interface().(*MsgVoteSignals) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -467,15 +467,15 @@ func (x *fastReflection_MsgSubmitSignals) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitSignals: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteSignals: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitSignals: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteSignals: 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 Delegator", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -503,7 +503,7 @@ func (x *fastReflection_MsgSubmitSignals) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Delegator = string(dAtA[iNdEx:postIndex]) + x.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -575,23 +575,23 @@ func (x *fastReflection_MsgSubmitSignals) ProtoMethods() *protoiface.Methods { } var ( - md_MsgSubmitSignalsResponse protoreflect.MessageDescriptor + md_MsgVoteSignalsResponse protoreflect.MessageDescriptor ) func init() { file_band_feeds_v1beta1_tx_proto_init() - md_MsgSubmitSignalsResponse = File_band_feeds_v1beta1_tx_proto.Messages().ByName("MsgSubmitSignalsResponse") + md_MsgVoteSignalsResponse = File_band_feeds_v1beta1_tx_proto.Messages().ByName("MsgVoteSignalsResponse") } -var _ protoreflect.Message = (*fastReflection_MsgSubmitSignalsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgVoteSignalsResponse)(nil) -type fastReflection_MsgSubmitSignalsResponse MsgSubmitSignalsResponse +type fastReflection_MsgVoteSignalsResponse MsgVoteSignalsResponse -func (x *MsgSubmitSignalsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitSignalsResponse)(x) +func (x *MsgVoteSignalsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteSignalsResponse)(x) } -func (x *MsgSubmitSignalsResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgVoteSignalsResponse) slowProtoReflect() protoreflect.Message { mi := &file_band_feeds_v1beta1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -603,43 +603,43 @@ func (x *MsgSubmitSignalsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgSubmitSignalsResponse_messageType fastReflection_MsgSubmitSignalsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitSignalsResponse_messageType{} +var _fastReflection_MsgVoteSignalsResponse_messageType fastReflection_MsgVoteSignalsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteSignalsResponse_messageType{} -type fastReflection_MsgSubmitSignalsResponse_messageType struct{} +type fastReflection_MsgVoteSignalsResponse_messageType struct{} -func (x fastReflection_MsgSubmitSignalsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitSignalsResponse)(nil) +func (x fastReflection_MsgVoteSignalsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteSignalsResponse)(nil) } -func (x fastReflection_MsgSubmitSignalsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitSignalsResponse) +func (x fastReflection_MsgVoteSignalsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteSignalsResponse) } -func (x fastReflection_MsgSubmitSignalsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitSignalsResponse +func (x fastReflection_MsgVoteSignalsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteSignalsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgSubmitSignalsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitSignalsResponse +func (x *fastReflection_MsgVoteSignalsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteSignalsResponse } // 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_MsgSubmitSignalsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitSignalsResponse_messageType +func (x *fastReflection_MsgVoteSignalsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteSignalsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitSignalsResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitSignalsResponse) +func (x *fastReflection_MsgVoteSignalsResponse) New() protoreflect.Message { + return new(fastReflection_MsgVoteSignalsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitSignalsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitSignalsResponse)(x) +func (x *fastReflection_MsgVoteSignalsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgVoteSignalsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -647,7 +647,7 @@ func (x *fastReflection_MsgSubmitSignalsResponse) Interface() protoreflect.Proto // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgSubmitSignalsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgVoteSignalsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -661,13 +661,13 @@ func (x *fastReflection_MsgSubmitSignalsResponse) Range(f func(protoreflect.Fiel // 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_MsgSubmitSignalsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgVoteSignalsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", fd.FullName())) } } @@ -677,13 +677,13 @@ func (x *fastReflection_MsgSubmitSignalsResponse) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignalsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgVoteSignalsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", fd.FullName())) } } @@ -693,13 +693,13 @@ func (x *fastReflection_MsgSubmitSignalsResponse) Clear(fd protoreflect.FieldDes // 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_MsgSubmitSignalsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteSignalsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignalsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", descriptor.FullName())) } } @@ -713,13 +713,13 @@ func (x *fastReflection_MsgSubmitSignalsResponse) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignalsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgVoteSignalsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", fd.FullName())) } } @@ -733,36 +733,36 @@ func (x *fastReflection_MsgSubmitSignalsResponse) Set(fd protoreflect.FieldDescr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignalsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteSignalsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse 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_MsgSubmitSignalsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteSignalsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgSubmitSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgSubmitSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse 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_MsgSubmitSignalsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgVoteSignalsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.MsgSubmitSignalsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.MsgVoteSignalsResponse", d.FullName())) } panic("unreachable") } @@ -770,7 +770,7 @@ func (x *fastReflection_MsgSubmitSignalsResponse) WhichOneof(d protoreflect.Oneo // 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_MsgSubmitSignalsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgVoteSignalsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -781,7 +781,7 @@ func (x *fastReflection_MsgSubmitSignalsResponse) GetUnknown() protoreflect.RawF // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitSignalsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgVoteSignalsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -793,7 +793,7 @@ func (x *fastReflection_MsgSubmitSignalsResponse) SetUnknown(fields protoreflect // 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_MsgSubmitSignalsResponse) IsValid() bool { +func (x *fastReflection_MsgVoteSignalsResponse) IsValid() bool { return x != nil } @@ -803,9 +803,9 @@ func (x *fastReflection_MsgSubmitSignalsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitSignalsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgVoteSignalsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitSignalsResponse) + x := input.Message.Interface().(*MsgVoteSignalsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -827,7 +827,7 @@ func (x *fastReflection_MsgSubmitSignalsResponse) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitSignalsResponse) + x := input.Message.Interface().(*MsgVoteSignalsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -857,7 +857,7 @@ func (x *fastReflection_MsgSubmitSignalsResponse) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitSignalsResponse) + x := input.Message.Interface().(*MsgVoteSignalsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -889,10 +889,10 @@ func (x *fastReflection_MsgSubmitSignalsResponse) ProtoMethods() *protoiface.Met fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitSignalsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteSignalsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitSignalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteSignalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3615,20 +3615,20 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// MsgSubmitSignals is the transaction message to submit signals. -type MsgSubmitSignals struct { +// MsgVoteSignals is the transaction message to vote signals. +type MsgVoteSignals struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // delegator is the address of the delegator that wants to submit signals. - Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty"` + // voter is the address of the voter that wants to vote signals. + Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` // signals is a list of submitted signals. Signals []*Signal `protobuf:"bytes,2,rep,name=signals,proto3" json:"signals,omitempty"` } -func (x *MsgSubmitSignals) Reset() { - *x = MsgSubmitSignals{} +func (x *MsgVoteSignals) Reset() { + *x = MsgVoteSignals{} if protoimpl.UnsafeEnabled { mi := &file_band_feeds_v1beta1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3636,40 +3636,40 @@ func (x *MsgSubmitSignals) Reset() { } } -func (x *MsgSubmitSignals) String() string { +func (x *MsgVoteSignals) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitSignals) ProtoMessage() {} +func (*MsgVoteSignals) ProtoMessage() {} -// Deprecated: Use MsgSubmitSignals.ProtoReflect.Descriptor instead. -func (*MsgSubmitSignals) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgVoteSignals.ProtoReflect.Descriptor instead. +func (*MsgVoteSignals) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_tx_proto_rawDescGZIP(), []int{0} } -func (x *MsgSubmitSignals) GetDelegator() string { +func (x *MsgVoteSignals) GetVoter() string { if x != nil { - return x.Delegator + return x.Voter } return "" } -func (x *MsgSubmitSignals) GetSignals() []*Signal { +func (x *MsgVoteSignals) GetSignals() []*Signal { if x != nil { return x.Signals } return nil } -// MsgSubmitSignalsResponse is the response type for the Msg/SubmitSignals RPC method. -type MsgSubmitSignalsResponse struct { +// MsgVoteSignalsResponse is the response type for the Msg/VoteSignals RPC method. +type MsgVoteSignalsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgSubmitSignalsResponse) Reset() { - *x = MsgSubmitSignalsResponse{} +func (x *MsgVoteSignalsResponse) Reset() { + *x = MsgVoteSignalsResponse{} if protoimpl.UnsafeEnabled { mi := &file_band_feeds_v1beta1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3677,14 +3677,14 @@ func (x *MsgSubmitSignalsResponse) Reset() { } } -func (x *MsgSubmitSignalsResponse) String() string { +func (x *MsgVoteSignalsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgSubmitSignalsResponse) ProtoMessage() {} +func (*MsgVoteSignalsResponse) ProtoMessage() {} -// Deprecated: Use MsgSubmitSignalsResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitSignalsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgVoteSignalsResponse.ProtoReflect.Descriptor instead. +func (*MsgVoteSignalsResponse) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_tx_proto_rawDescGZIP(), []int{1} } @@ -3932,110 +3932,108 @@ var file_band_feeds_v1beta1_tx_proto_rawDesc = []byte{ 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, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xb1, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x07, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xe5, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, - 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x06, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xee, 0x01, 0x0a, 0x1e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x05, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x67, 0x0a, 0x17, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x15, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x8a, 0xe7, 0xb0, 0x2a, 0x24, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0xa1, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 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, 0x05, 0x76, 0x6f, 0x74, + 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x3a, 0x23, + 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, 0x01, + 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, + 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xee, 0x01, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x28, 0x0a, 0x26, 0x4d, 0x73, 0x67, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x67, 0x0a, 0x17, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x15, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x8a, 0xe7, + 0xb0, 0x2a, 0x24, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x28, 0x0a, 0x26, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xad, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd1, 0x03, 0x0a, + 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5d, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x73, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x1a, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, - 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x66, 0x65, - 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd7, - 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x63, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x3a, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x1a, 0x2c, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x73, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x31, 0x2e, 0x62, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x8d, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x1a, 0x3a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x60, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x23, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64, 0x73, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, 0x02, 0x12, 0x42, 0x61, 0x6e, - 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, - 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x46, 0x65, - 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, + 0x42, 0xd1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x66, 0x65, 0x65, 0x64, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, + 0x46, 0x58, 0xaa, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, + 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, + 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, + 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4052,8 +4050,8 @@ func file_band_feeds_v1beta1_tx_proto_rawDescGZIP() []byte { var file_band_feeds_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_band_feeds_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgSubmitSignals)(nil), // 0: band.feeds.v1beta1.MsgSubmitSignals - (*MsgSubmitSignalsResponse)(nil), // 1: band.feeds.v1beta1.MsgSubmitSignalsResponse + (*MsgVoteSignals)(nil), // 0: band.feeds.v1beta1.MsgVoteSignals + (*MsgVoteSignalsResponse)(nil), // 1: band.feeds.v1beta1.MsgVoteSignalsResponse (*MsgSubmitSignalPrices)(nil), // 2: band.feeds.v1beta1.MsgSubmitSignalPrices (*MsgSubmitSignalPricesResponse)(nil), // 3: band.feeds.v1beta1.MsgSubmitSignalPricesResponse (*MsgUpdateReferenceSourceConfig)(nil), // 4: band.feeds.v1beta1.MsgUpdateReferenceSourceConfig @@ -4066,15 +4064,15 @@ var file_band_feeds_v1beta1_tx_proto_goTypes = []interface{}{ (*Params)(nil), // 11: band.feeds.v1beta1.Params } var file_band_feeds_v1beta1_tx_proto_depIdxs = []int32{ - 8, // 0: band.feeds.v1beta1.MsgSubmitSignals.signals:type_name -> band.feeds.v1beta1.Signal + 8, // 0: band.feeds.v1beta1.MsgVoteSignals.signals:type_name -> band.feeds.v1beta1.Signal 9, // 1: band.feeds.v1beta1.MsgSubmitSignalPrices.prices:type_name -> band.feeds.v1beta1.SignalPrice 10, // 2: band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.reference_source_config:type_name -> band.feeds.v1beta1.ReferenceSourceConfig 11, // 3: band.feeds.v1beta1.MsgUpdateParams.params:type_name -> band.feeds.v1beta1.Params - 0, // 4: band.feeds.v1beta1.Msg.SubmitSignals:input_type -> band.feeds.v1beta1.MsgSubmitSignals + 0, // 4: band.feeds.v1beta1.Msg.VoteSignals:input_type -> band.feeds.v1beta1.MsgVoteSignals 2, // 5: band.feeds.v1beta1.Msg.SubmitSignalPrices:input_type -> band.feeds.v1beta1.MsgSubmitSignalPrices 4, // 6: band.feeds.v1beta1.Msg.UpdateReferenceSourceConfig:input_type -> band.feeds.v1beta1.MsgUpdateReferenceSourceConfig 6, // 7: band.feeds.v1beta1.Msg.UpdateParams:input_type -> band.feeds.v1beta1.MsgUpdateParams - 1, // 8: band.feeds.v1beta1.Msg.SubmitSignals:output_type -> band.feeds.v1beta1.MsgSubmitSignalsResponse + 1, // 8: band.feeds.v1beta1.Msg.VoteSignals:output_type -> band.feeds.v1beta1.MsgVoteSignalsResponse 3, // 9: band.feeds.v1beta1.Msg.SubmitSignalPrices:output_type -> band.feeds.v1beta1.MsgSubmitSignalPricesResponse 5, // 10: band.feeds.v1beta1.Msg.UpdateReferenceSourceConfig:output_type -> band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse 7, // 11: band.feeds.v1beta1.Msg.UpdateParams:output_type -> band.feeds.v1beta1.MsgUpdateParamsResponse @@ -4094,7 +4092,7 @@ func file_band_feeds_v1beta1_tx_proto_init() { file_band_feeds_v1beta1_params_proto_init() if !protoimpl.UnsafeEnabled { file_band_feeds_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitSignals); i { + switch v := v.(*MsgVoteSignals); i { case 0: return &v.state case 1: @@ -4106,7 +4104,7 @@ func file_band_feeds_v1beta1_tx_proto_init() { } } file_band_feeds_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitSignalsResponse); i { + switch v := v.(*MsgVoteSignalsResponse); i { case 0: return &v.state case 1: diff --git a/api/band/feeds/v1beta1/tx_grpc.pb.go b/api/band/feeds/v1beta1/tx_grpc.pb.go index e11002d81..8e7a1f02d 100644 --- a/api/band/feeds/v1beta1/tx_grpc.pb.go +++ b/api/band/feeds/v1beta1/tx_grpc.pb.go @@ -19,7 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_SubmitSignals_FullMethodName = "/band.feeds.v1beta1.Msg/SubmitSignals" + Msg_VoteSignals_FullMethodName = "/band.feeds.v1beta1.Msg/VoteSignals" Msg_SubmitSignalPrices_FullMethodName = "/band.feeds.v1beta1.Msg/SubmitSignalPrices" Msg_UpdateReferenceSourceConfig_FullMethodName = "/band.feeds.v1beta1.Msg/UpdateReferenceSourceConfig" Msg_UpdateParams_FullMethodName = "/band.feeds.v1beta1.Msg/UpdateParams" @@ -29,8 +29,8 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MsgClient interface { - // SubmitSignals is an RPC method to submit signal ids and their powers. - SubmitSignals(ctx context.Context, in *MsgSubmitSignals, opts ...grpc.CallOption) (*MsgSubmitSignalsResponse, error) + // VoteSignals is an RPC method to vote signal ids and their powers. + VoteSignals(ctx context.Context, in *MsgVoteSignals, opts ...grpc.CallOption) (*MsgVoteSignalsResponse, error) // SubmitSignalPrices is an RPC method to submit signal prices. SubmitSignalPrices(ctx context.Context, in *MsgSubmitSignalPrices, opts ...grpc.CallOption) (*MsgSubmitSignalPricesResponse, error) // UpdateReferenceSourceConfig is an RPC method to update reference price source configuration. @@ -47,9 +47,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } -func (c *msgClient) SubmitSignals(ctx context.Context, in *MsgSubmitSignals, opts ...grpc.CallOption) (*MsgSubmitSignalsResponse, error) { - out := new(MsgSubmitSignalsResponse) - err := c.cc.Invoke(ctx, Msg_SubmitSignals_FullMethodName, in, out, opts...) +func (c *msgClient) VoteSignals(ctx context.Context, in *MsgVoteSignals, opts ...grpc.CallOption) (*MsgVoteSignalsResponse, error) { + out := new(MsgVoteSignalsResponse) + err := c.cc.Invoke(ctx, Msg_VoteSignals_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -87,8 +87,8 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // All implementations must embed UnimplementedMsgServer // for forward compatibility type MsgServer interface { - // SubmitSignals is an RPC method to submit signal ids and their powers. - SubmitSignals(context.Context, *MsgSubmitSignals) (*MsgSubmitSignalsResponse, error) + // VoteSignals is an RPC method to vote signal ids and their powers. + VoteSignals(context.Context, *MsgVoteSignals) (*MsgVoteSignalsResponse, error) // SubmitSignalPrices is an RPC method to submit signal prices. SubmitSignalPrices(context.Context, *MsgSubmitSignalPrices) (*MsgSubmitSignalPricesResponse, error) // UpdateReferenceSourceConfig is an RPC method to update reference price source configuration. @@ -102,8 +102,8 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (UnimplementedMsgServer) SubmitSignals(context.Context, *MsgSubmitSignals) (*MsgSubmitSignalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitSignals not implemented") +func (UnimplementedMsgServer) VoteSignals(context.Context, *MsgVoteSignals) (*MsgVoteSignalsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteSignals not implemented") } func (UnimplementedMsgServer) SubmitSignalPrices(context.Context, *MsgSubmitSignalPrices) (*MsgSubmitSignalPricesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitSignalPrices not implemented") @@ -127,20 +127,20 @@ func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { s.RegisterService(&Msg_ServiceDesc, srv) } -func _Msg_SubmitSignals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitSignals) +func _Msg_VoteSignals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteSignals) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SubmitSignals(ctx, in) + return srv.(MsgServer).VoteSignals(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_SubmitSignals_FullMethodName, + FullMethod: Msg_VoteSignals_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitSignals(ctx, req.(*MsgSubmitSignals)) + return srv.(MsgServer).VoteSignals(ctx, req.(*MsgVoteSignals)) } return interceptor(ctx, in, info, handler) } @@ -207,8 +207,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "SubmitSignals", - Handler: _Msg_SubmitSignals_Handler, + MethodName: "VoteSignals", + Handler: _Msg_VoteSignals_Handler, }, { MethodName: "SubmitSignalPrices", diff --git a/proto/band/feeds/v1beta1/feeds.proto b/proto/band/feeds/v1beta1/feeds.proto index c206a187e..835d1ed95 100644 --- a/proto/band/feeds/v1beta1/feeds.proto +++ b/proto/band/feeds/v1beta1/feeds.proto @@ -17,14 +17,14 @@ message Signal { int64 power = 2; } -// DelegatorSignals is the data structure that contains array of signals of a delegator. -message DelegatorSignals { +// Vote is the data structure that contains array of signals of a voter. +message Vote { option (gogoproto.equal) = true; - // delegator is the address of the delegator of this signals. - string delegator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // voter is the address of the voter of this signals. + string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // signals is a list of signals submit by the delegator. + // signals is a list of signals submit by the voter. repeated Signal signals = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/band/feeds/v1beta1/genesis.proto b/proto/band/feeds/v1beta1/genesis.proto index 376879bbe..0604f75b2 100644 --- a/proto/band/feeds/v1beta1/genesis.proto +++ b/proto/band/feeds/v1beta1/genesis.proto @@ -12,8 +12,8 @@ message GenesisState { // params is all parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; - // delegator_signals is a list of delegator signals submitted by delegators. - repeated DelegatorSignals delegator_signals = 2 [(gogoproto.nullable) = false]; + // votes is a list of voter signals. + repeated Vote votes = 2 [(gogoproto.nullable) = false]; // reference_source_config is the information about reference price config. ReferenceSourceConfig reference_source_config = 3 [(gogoproto.nullable) = false]; diff --git a/proto/band/feeds/v1beta1/query.proto b/proto/band/feeds/v1beta1/query.proto index fd9bbeed9..a7312a100 100644 --- a/proto/band/feeds/v1beta1/query.proto +++ b/proto/band/feeds/v1beta1/query.proto @@ -27,9 +27,9 @@ service Query { option (google.api.http).get = "/feeds/v1beta1/current-prices/{signal_ids}"; } - // DelegatorSignals is an RPC method that returns signals of a delegator. - rpc DelegatorSignals(QueryDelegatorSignalsRequest) returns (QueryDelegatorSignalsResponse) { - option (google.api.http).get = "/feeds/v1beta1/delegators/{delegator_address}/signals"; + // Vote is an RPC method that returns signals of a voter. + rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { + option (google.api.http).get = "/feeds/v1beta1/vote/{voter}"; } // IsFeeder is an RPC method that returns whether an account is a feeder for a specified validator. @@ -104,15 +104,15 @@ message QueryCurrentPricesResponse { repeated Price prices = 1 [(gogoproto.nullable) = false]; } -// QueryDelegatorSignalsRequest is the request type for the Query/DelegatorSignals RPC method. -message QueryDelegatorSignalsRequest { - // delegator_address is the delegator address to query signal for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +// QueryVoteRequest is the request type for the Query/Vote RPC method. +message QueryVoteRequest { + // voter is the voter address to query signal for. + string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// QueryDelegatorSignalsResponse is the response type for the Query/DelegatorSignals RPC method. -message QueryDelegatorSignalsResponse { - // signals is a list of signals submitted by the delegator. +// QueryVoteResponse is the response type for the Query/Vote RPC method. +message QueryVoteResponse { + // signals is a list of signals submitted by the voter. repeated Signal signals = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/band/feeds/v1beta1/tx.proto b/proto/band/feeds/v1beta1/tx.proto index 1aa694fe2..dcb2af03d 100644 --- a/proto/band/feeds/v1beta1/tx.proto +++ b/proto/band/feeds/v1beta1/tx.proto @@ -13,8 +13,8 @@ import "amino/amino.proto"; // Msg defines the feeds Msg service. service Msg { option (cosmos.msg.v1.service) = true; - // SubmitSignals is an RPC method to submit signal ids and their powers. - rpc SubmitSignals(MsgSubmitSignals) returns (MsgSubmitSignalsResponse); + // VoteSignals is an RPC method to vote signal ids and their powers. + rpc VoteSignals(MsgVoteSignals) returns (MsgVoteSignalsResponse); // SubmitSignalPrices is an RPC method to submit signal prices. rpc SubmitSignalPrices(MsgSubmitSignalPrices) returns (MsgSubmitSignalPricesResponse); @@ -26,20 +26,20 @@ service Msg { rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } -// MsgSubmitSignals is the transaction message to submit signals. -message MsgSubmitSignals { - option (cosmos.msg.v1.signer) = "delegator"; - option (amino.name) = "feeds/MsgSubmitSignals"; +// MsgVoteSignals is the transaction message to vote signals. +message MsgVoteSignals { + option (cosmos.msg.v1.signer) = "voter"; + option (amino.name) = "feeds/MsgVoteSignals"; - // delegator is the address of the delegator that wants to submit signals. - string delegator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // voter is the address of the voter that wants to vote signals. + string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // signals is a list of submitted signals. repeated Signal signals = 2 [(gogoproto.nullable) = false]; } -// MsgSubmitSignalsResponse is the response type for the Msg/SubmitSignals RPC method. -message MsgSubmitSignalsResponse {} +// MsgVoteSignalsResponse is the response type for the Msg/VoteSignals RPC method. +message MsgVoteSignalsResponse {} // MsgSubmitSignalPrices is the transaction message to submit multiple signal prices. message MsgSubmitSignalPrices { diff --git a/x/feeds/README.md b/x/feeds/README.md index 112b168ee..955098314 100644 --- a/x/feeds/README.md +++ b/x/feeds/README.md @@ -10,11 +10,11 @@ This module is used in the BandChain. ## Contents -- [`x/feeds`](#xfeeds) - - [Abstract](#abstract) - - [Contents](#contents) - - [Concepts](#concepts) - - [Delegator Signal](#delegator-signal) +* [`x/feeds`](#xfeeds) + + [Abstract](#abstract) + + [Contents](#contents) + + [Concepts](#concepts) + - [Vote](#vote) - [Feed](#feed) - [Feed Interval](#feed-interval) - [Feed Deviation](#feed-deviation) @@ -23,43 +23,42 @@ This module is used in the BandChain. - [Validator Price](#validator-price) - [Price](#price) - [Reference Source Config](#reference-source-config) - - [State](#state) + + [State](#state) - [ReferenceSourceConfig](#referencesourceconfig) - [CurrentFeeds](#currentfeeds) - [ValidatorPriceList](#validatorpricelist) - [Price](#price-1) - - [DelegatorSignals](#delegatorsignals) + - [Vote](#vote-1) - [SignalTotalPower](#signaltotalpower) - [SignalTotalPowerByPowerIndex](#signaltotalpowerbypowerindex) - [Params](#params) - - [Messages](#messages) - - [MsgSubmitSignals](#msgsubmitsignals) + + [Messages](#messages) + - [MsgVoteSignals](#msgvotesignals) - [MsgSubmitSignalPrices](#msgsubmitsignalprices) - [MsgUpdateReferenceSourceConfig](#msgupdatereferencesourceconfig) - [MsgUpdateParams](#msgupdateparams) - - [End-Block](#end-block) + + [End-Block](#end-block) - [Update Prices](#update-prices) - [Input](#input) - [Objective](#objective) - [Assumption](#assumption) - [Procedure](#procedure) - [Update current feeds](#update-current-feeds) - - [Events](#events) + + [Events](#events) - [EndBlocker](#endblocker) - [Handlers](#handlers) - [MsgSubmitSignalPrices](#msgsubmitsignalprices-1) - [MsgUpdateReferenceSourceConfig](#msgupdatereferencesourceconfig-1) - [MsgUpdateParams](#msgupdateparams-1) - - [MsgSubmitSignals](#msgsubmitsignals-1) - + - [MsgVoteSignals](#msgvotesignals-1) ## Concepts -### Delegator Signal +### Vote -A Delegator Signal is a vote from a delegator, instructing the chain to provide feed service for the designated ID. +A Vote is a vote from a voter, instructing the chain to provide feed service for the designated ID. -A Delegator Signal consists of an ID and the power associated with that ID. The feeding interval and deviation are reduced by the sum of the power of the ID. The total power of a delegator cannot exceed their total bonded delegation. +A Vote consists of an ID and the power associated with that ID. The feeding interval and deviation are reduced by the sum of the power of the ID. The total power of a voter cannot exceed their total bonded delegation and staked tokens. ### Feed @@ -67,26 +66,26 @@ A Feed is a data structure containing a signal ID and calculated interval and de #### Feed Interval -The interval is calculated based on the total power of the signal ID; the greater the power, the shorter the interval. The total power of a signal is the sum of the power of its signal IDs received from the delegators. The minimum and maximum intervals are determined by parameters called `MinInterval` and `MaxInterval`, respectively. +The interval is calculated based on the total power of the signal ID; the greater the power, the shorter the interval. The total power of a signal is the sum of the power of its signal IDs received from the voters. The minimum and maximum intervals are determined by parameters called `MinInterval` and `MaxInterval` , respectively. #### Feed Deviation -Deviation follows a similar logic to interval. On-chain deviation is measured in basis point, meaning a deviation of 1 indicates a price tolerance within 0.01%. The minimum and maximum deviations are determined by parameters called `MinDeviationBasisPoint` and `MaxDeviationBasisPoint`, respectively. +Deviation follows a similar logic to interval. On-chain deviation is measured in basis point, meaning a deviation of 1 indicates a price tolerance within 0.01%. The minimum and maximum deviations are determined by parameters called `MinDeviationBasisPoint` and `MaxDeviationBasisPoint` , respectively. It should be noted that while feed deviation is calculated, it is only used as a reference value for the price service. This is because the chain cannot penalize validators for not reporting on price deviations, unlike time intervals. #### How Feed Interval and Deviation are calculated -- Power is registered after surpassing the `PowerStepThreshold`. -- Then, the power factor is calculated as the floor(Power / `PowerStepThreshold`). -- Subsequently, the interval is calculated as the maximum of `MinInterval` or the floor(`MaxInterval` / power factor). -- The deviation is then calculated as the max(`MinDeviationBasisPoint`, (`MaxDeviationBasisPoint` / power factor). +* Power is registered after surpassing the `PowerStepThreshold`. +* Then, the power factor is calculated as the floor(Power / `PowerStepThreshold`). +* Subsequently, the interval is calculated as the maximum of `MinInterval` or the floor(`MaxInterval` / power factor). +* The deviation is then calculated as the max(`MinDeviationBasisPoint`, (`MaxDeviationBasisPoint` / power factor). You can visualize the interval/deviation as resembling the harmonic series times MaxInterval/MaxDeviationBasisPoint, with the step of PowerStepThreshold. #### Current Feeds -The list of currently supported feeds includes those with power exceeding the PowerStepThreshold parameter and ranking within the top `MaxCurrentFeeds`. The current feeds will be re-calculated on every `CurrentFeedsUpdateInterval` block(s). Validators are only required to submit their prices for the current feeds. +The list of currently supported feeds includes those with power exceeding the PowerStepThreshold parameter and ranking within the top `MaxCurrentFeeds` . The current feeds will be re-calculated on every `CurrentFeedsUpdateInterval` block(s). Validators are only required to submit their prices for the current feeds. ### Validator Price @@ -132,11 +131,11 @@ The Price is a space for holding the current price information of signals. * Price: `0x11 -> ProtocolBuffer(Price)` -### DelegatorSignals +### Vote -The DelegatorSignals is a space for holding current Delegator Signals information of delegators. +The Vote is a space for holding current vote information of voters. -* DelegatorSignals: `0x12 -> ProtocolBuffer(DelegatorSignals)` +* Vote: `0x12 -> ProtocolBuffer(Vote)` ### SignalTotalPower @@ -147,11 +146,11 @@ The SignalTotalPower is a space for holding the total power of signals. #### SignalTotalPowerByPowerIndex `SignalTotalPowerByPowerIndex` allow to retrieve SignalTotalPower by power: -`0x80| BigEndian(Power) | SignalIDLen (1 byte) | SignalID -> SignalID` + `0x80| BigEndian(Power) | SignalIDLen (1 byte) | SignalID -> SignalID` ### Params -The feeds module stores its params in state with the prefix of `0x10`, +The feeds module stores its params in state with the prefix of `0x10` , it can be updated with governance proposal or the address with authority. * Params: `0x90 | ProtocolBuffer(Params)` @@ -206,21 +205,21 @@ message Params { In this section, we describe the processing of the `feeds` messages and the corresponding updates to the state. All created/modified state objects specified by each message are defined within the [state](#state) section. -### MsgSubmitSignals +### MsgVoteSignals -Delegator Signals are submitted as a batch using the MsgSubmitSignals message. +Vote contain a batch of signal and power. -Batched Signals replace the previous Signals of the same delegator as a batch. +Batched Signals replace the previous Signals of the same voter as a batch. Signals are registered, and their power is added to the SignalTotalPower of the same SignalID. ```protobuf -// MsgSubmitSignals is the transaction message to submit signals. -message MsgSubmitSignals { - option (cosmos.msg.v1.signer) = "delegator"; - option (amino.name) = "feeds/MsgSubmitSignals"; +// MsgVoteSignals is the transaction message to submit signals. +message MsgVoteSignals { + option (cosmos.msg.v1.signer) = "voter"; + option (amino.name) = "feeds/MsgVoteSignals"; - // delegator is the address of the delegator that wants to submit signals. - string delegator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // voter is the address of the voter that wants to vote signals. + string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // signals is a list of submitted signals. repeated Signal signals = 2 [(gogoproto.nullable) = false]; @@ -229,8 +228,8 @@ message MsgSubmitSignals { The message handling can fail if: -* The delegator's address is not correct. -* The delegator has less delegation than the sum of the Powers. +* The voter's address is not correct. +* The voter has less power than the sum of the Powers. * The signal is not valid. (e.g. too long signal ID, power is a negative value). * The size of the list of signal is too large. @@ -265,6 +264,7 @@ This message is expected to fail if: * the price is submitted in the `CooldownTime` param. * the signals of the prices are not in the current feeds. + ### MsgUpdateReferenceSourceConfig Reference Source can be updated with the `MsgUpdateReferenceSourceConfig` message. @@ -326,14 +326,14 @@ The median price is then set as the Price. Here is the price aggregation logic: #### Input A list of PriceFeedInfo objects, each containing: -- `Price`: The reported price from the feeder -- `Deviation`: The price deviation -- `Power`: The feeder's power -- `Timestamp`: The time at which the price is reported +* `Price`: The reported price from the feeder +* `Deviation`: The price deviation +* `Power`: The feeder's power +* `Timestamp`: The time at which the price is reported #### Objective -- An aggregated price from the list of priceFeedInfo. +* An aggregated price from the list of priceFeedInfo. #### Assumption @@ -343,35 +343,35 @@ A list of PriceFeedInfo objects, each containing: 1. Order the List: -- Sort the list by `Timestamp` in descending order (latest timestamp first). -- For entries with the same `Timestamp`, sort by `Power` in descending order. +* Sort the list by `Timestamp` in descending order (latest timestamp first). +* For entries with the same `Timestamp`, sort by `Power` in descending order. 2. Apply Power Weights: -- Calculate the total power from the list. -- Assign weights to the powers in segments as follows: +* Calculate the total power from the list. +* Assign weights to the powers in segments as follows: - The first 1/32 of the total power is multiplied by 6. - The next 1/16 of the total power is multiplied by 4. - The next 1/8 of the total power is multiplied by 2. - The next 1/4 of the total power is multiplied by 1.1. -- If PriceFeedInfo overlaps between segments, split it into parts corresponding to each segment and assign the respective multiplier. -- Any power that falls outside these segments will have a multiplier of 1. +* If PriceFeedInfo overlaps between segments, split it into parts corresponding to each segment and assign the respective multiplier. +* Any power that falls outside these segments will have a multiplier of 1. 3. Generate Points: -- For each PriceFeedInfo (or its parts if split), generate three points: +* For each PriceFeedInfo (or its parts if split), generate three points: - One at the `Price` with the assigned `Power`. - One at `Price + Deviation` with the assigned `Power`. - One at `Price - Deviation` with the assigned `Power`. 4. Calculating Weight Median -- Compute the weighted median of the generated points to determine the final aggregated price. -- The weighted median price is the price at which the cumulative power (sorted by increasing price) crosses half of the total weighted power. +* Compute the weighted median of the generated points to determine the final aggregated price. +* The weighted median price is the price at which the cumulative power (sorted by increasing price) crosses half of the total weighted power. ### Update current feeds -At every `BlocksPerFeedsUpdate` block(s), the current feeds will be re-calculated based on the parameters of the module (e.g. `MinInterval`, `MaxCurrentFeeds`). +At every `BlocksPerFeedsUpdate` block(s), the current feeds will be re-calculated based on the parameters of the module (e.g. `MinInterval` , `MaxCurrentFeeds` ). ## Events @@ -401,7 +401,6 @@ The feeds module emits the following events: | submit_signal_price | price | {price} | | submit_signal_price | timestamp | {timestamp} | - #### MsgUpdateReferenceSourceConfig | Type | Attribute Key | Attribute Value | @@ -416,7 +415,7 @@ The feeds module emits the following events: | ------------- | ------------- | --------------- | | update_params | params | {params} | -#### MsgSubmitSignals +#### MsgVoteSignals | Type | Attribute Key | Attribute Value | | ------------------------- | ------------- | --------------- | diff --git a/x/feeds/autocli.go b/x/feeds/autocli.go index 88946437a..c56466585 100644 --- a/x/feeds/autocli.go +++ b/x/feeds/autocli.go @@ -29,10 +29,10 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "signal_ids"}}, }, { - RpcMethod: "DelegatorSignals", - Use: "delegator-signals [delegator-address]", - Short: "Get signals submitted by a delegator", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "delegator_address"}}, + RpcMethod: "Vote", + Use: "vote [voter]", + Short: "Get signals submitted by a voter", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "voter"}}, }, { RpcMethod: "IsFeeder", diff --git a/x/feeds/client/cli/tx.go b/x/feeds/client/cli/tx.go index a89772caa..e3fac7d62 100644 --- a/x/feeds/client/cli/tx.go +++ b/x/feeds/client/cli/tx.go @@ -43,24 +43,24 @@ func GetTxCmd() *cobra.Command { txCmd.AddCommand( GetTxCmdAddFeeders(), GetTxCmdRemoveFeeders(), - GetTxCmdSubmitSignals(), + GetTxCmdVoteSignals(), GetTxCmdUpdateReferenceSourceConfig(), ) return txCmd } -// GetTxCmdSubmitSignals creates a CLI command for submitting signals -func GetTxCmdSubmitSignals() *cobra.Command { +// GetTxCmdVoteSignals creates a CLI command for voting signals +func GetTxCmdVoteSignals() *cobra.Command { cmd := &cobra.Command{ - Use: "signal [signal_id1],[power1] [signal_id2],[power2] ...", - Short: "Signal signal ids and their powers", + Use: "vote [signal_id1],[power1] [signal_id2],[power2] ...", + Short: "Vote signal ids and their powers", Args: cobra.MinimumNArgs(0), Long: strings.TrimSpace( fmt.Sprintf( - `Signal signal ids and their power. + `Vote signal ids and their power. Example: -$ %s tx feeds signal BTC,1000000 --from mykey +$ %s tx feeds vote BTC,1000000 --from mykey `, version.AppName, ), @@ -71,7 +71,7 @@ $ %s tx feeds signal BTC,1000000 --from mykey return err } - delegator := clientCtx.GetFromAddress() + voter := clientCtx.GetFromAddress() var signals []types.Signal for i, arg := range args { idAndPower := strings.SplitN(arg, ",", 2) @@ -90,7 +90,7 @@ $ %s tx feeds signal BTC,1000000 --from mykey ) } - msg := types.NewMsgSubmitSignals(delegator.String(), signals) + msg := types.NewMsgVoteSignals(voter.String(), signals) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, diff --git a/x/feeds/keeper/genesis.go b/x/feeds/keeper/genesis.go index 3a7b3b30f..a84629b55 100644 --- a/x/feeds/keeper/genesis.go +++ b/x/feeds/keeper/genesis.go @@ -12,7 +12,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { panic(err) } - k.SetAllDelegatorSignals(ctx, genState.DelegatorSignals) + k.SetAllVotes(ctx, genState.Votes) signalTotalPowers := k.CalculateNewSignalTotalPowers(ctx) k.SetSignalTotalPowers(ctx, signalTotalPowers) @@ -27,5 +27,5 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { // ExportGenesis returns the module's exported genesis func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { - return types.NewGenesisState(k.GetParams(ctx), k.GetAllDelegatorSignals(ctx), k.GetReferenceSourceConfig(ctx)) + return types.NewGenesisState(k.GetParams(ctx), k.GetAllVotes(ctx), k.GetReferenceSourceConfig(ctx)) } diff --git a/x/feeds/keeper/genesis_test.go b/x/feeds/keeper/genesis_test.go index 8e42a1e94..d0d02bfad 100644 --- a/x/feeds/keeper/genesis_test.go +++ b/x/feeds/keeper/genesis_test.go @@ -15,9 +15,9 @@ func (suite *KeeperTestSuite) TestExportGenesis() { err = suite.feedsKeeper.SetReferenceSourceConfig(ctx, types.DefaultReferenceSourceConfig()) suite.Require().NoError(err) - delegatorSignals := []types.DelegatorSignals{ + votes := []types.Vote{ { - Delegator: ValidDelegator.String(), + Voter: ValidVoter.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -30,7 +30,7 @@ func (suite *KeeperTestSuite) TestExportGenesis() { }, }, { - Delegator: ValidDelegator2.String(), + Voter: ValidVoter2.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -43,22 +43,22 @@ func (suite *KeeperTestSuite) TestExportGenesis() { }, }, } - suite.feedsKeeper.SetAllDelegatorSignals(ctx, delegatorSignals) + suite.feedsKeeper.SetAllVotes(ctx, votes) exportGenesis := suite.feedsKeeper.ExportGenesis(ctx) suite.Require().Equal(types.DefaultParams(), exportGenesis.Params) suite.Require().Equal(types.DefaultReferenceSourceConfig(), exportGenesis.ReferenceSourceConfig) - suite.Require().Equal(delegatorSignals, exportGenesis.DelegatorSignals) + suite.Require().Equal(votes, exportGenesis.Votes) } func (suite *KeeperTestSuite) TestInitGenesis() { ctx := suite.ctx params := types.DefaultParams() - delegatorSignals := []types.DelegatorSignals{ + votes := []types.Vote{ { - Delegator: ValidDelegator.String(), + Voter: ValidVoter.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -71,7 +71,7 @@ func (suite *KeeperTestSuite) TestInitGenesis() { }, }, { - Delegator: ValidDelegator2.String(), + Voter: ValidVoter2.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -86,16 +86,16 @@ func (suite *KeeperTestSuite) TestInitGenesis() { } g := types.DefaultGenesisState() - g.DelegatorSignals = delegatorSignals + g.Votes = votes g.Params = params suite.feedsKeeper.InitGenesis(suite.ctx, *g) suite.Require().Equal(types.DefaultReferenceSourceConfig(), suite.feedsKeeper.GetReferenceSourceConfig(ctx)) suite.Require().Equal(params, suite.feedsKeeper.GetParams(ctx)) - for _, ds := range delegatorSignals { + for _, v := range votes { suite.Require(). - Equal(ds.Signals, suite.feedsKeeper.GetDelegatorSignals(ctx, sdk.MustAccAddressFromBech32(ds.Delegator))) + Equal(v.Signals, suite.feedsKeeper.GetVoteSignals(ctx, sdk.MustAccAddressFromBech32(v.Voter))) } stpBand, err := suite.feedsKeeper.GetSignalTotalPower(ctx, "CS:BAND-USD") diff --git a/x/feeds/keeper/grpc_query.go b/x/feeds/keeper/grpc_query.go index f970ae9fd..b400d75a4 100644 --- a/x/feeds/keeper/grpc_query.go +++ b/x/feeds/keeper/grpc_query.go @@ -26,20 +26,20 @@ func NewQueryServer(k Keeper) types.QueryServer { } } -// DelegatorSignals queries all signals submitted by a delegator. -func (q queryServer) DelegatorSignals( - goCtx context.Context, req *types.QueryDelegatorSignalsRequest, -) (*types.QueryDelegatorSignalsResponse, error) { +// Vote queries all signals vote by a voter. +func (q queryServer) Vote( + goCtx context.Context, req *types.QueryVoteRequest, +) (*types.QueryVoteResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - delegator, err := sdk.AccAddressFromBech32(req.DelegatorAddress) + voter, err := sdk.AccAddressFromBech32(req.Voter) if err != nil { return nil, err } - signals := q.keeper.GetDelegatorSignals(ctx, delegator) + signals := q.keeper.GetVoteSignals(ctx, voter) - return &types.QueryDelegatorSignalsResponse{Signals: signals}, nil + return &types.QueryVoteResponse{Signals: signals}, nil } // Prices queries all current prices. diff --git a/x/feeds/keeper/grpc_query_test.go b/x/feeds/keeper/grpc_query_test.go index 0ae17cb6c..d50d956ab 100644 --- a/x/feeds/keeper/grpc_query_test.go +++ b/x/feeds/keeper/grpc_query_test.go @@ -106,7 +106,7 @@ func (suite *KeeperTestSuite) TestQueryCurrentPrices() { }, res) } -func (suite *KeeperTestSuite) TestQueryDelegatorSignals() { +func (suite *KeeperTestSuite) TestQueryVote() { ctx, queryClient := suite.ctx, suite.queryClient // setup @@ -120,18 +120,18 @@ func (suite *KeeperTestSuite) TestQueryDelegatorSignals() { Power: 1e9, }, } - _, err := suite.msgServer.SubmitSignals(ctx, &types.MsgSubmitSignals{ - Delegator: ValidDelegator.String(), - Signals: signals, + _, err := suite.msgServer.VoteSignals(ctx, &types.MsgVoteSignals{ + Voter: ValidVoter.String(), + Signals: signals, }) suite.Require().NoError(err) // query and check - res, err := queryClient.DelegatorSignals(context.Background(), &types.QueryDelegatorSignalsRequest{ - DelegatorAddress: ValidDelegator.String(), + res, err := queryClient.Vote(context.Background(), &types.QueryVoteRequest{ + Voter: ValidVoter.String(), }) suite.Require().NoError(err) - suite.Require().Equal(&types.QueryDelegatorSignalsResponse{ + suite.Require().Equal(&types.QueryVoteResponse{ Signals: signals, }, res) } diff --git a/x/feeds/keeper/keeper_signal.go b/x/feeds/keeper/keeper_signal.go index d83b3f3b4..0eb87a150 100644 --- a/x/feeds/keeper/keeper_signal.go +++ b/x/feeds/keeper/keeper_signal.go @@ -13,53 +13,53 @@ import ( "github.com/bandprotocol/chain/v3/x/feeds/types" ) -// GetDelegatorSignals returns a list of all signals of a delegator. -func (k Keeper) GetDelegatorSignals(ctx sdk.Context, delegator sdk.AccAddress) []types.Signal { - bz := ctx.KVStore(k.storeKey).Get(types.DelegatorSignalsStoreKey(delegator)) +// GetVoteSignals returns a list of all signals of a voter. +func (k Keeper) GetVoteSignals(ctx sdk.Context, voter sdk.AccAddress) []types.Signal { + bz := ctx.KVStore(k.storeKey).Get(types.VoteStoreKey(voter)) if bz == nil { return nil } - var s types.DelegatorSignals - k.cdc.MustUnmarshal(bz, &s) + var v types.Vote + k.cdc.MustUnmarshal(bz, &v) - return s.Signals + return v.Signals } -// DeleteDelegatorSignals deletes all signals of a delegator. -func (k Keeper) DeleteDelegatorSignals(ctx sdk.Context, delegator sdk.AccAddress) { - ctx.KVStore(k.storeKey).Delete(types.DelegatorSignalsStoreKey(delegator)) +// DeleteVote deletes all signals of a voter. +func (k Keeper) DeleteVote(ctx sdk.Context, voter sdk.AccAddress) { + ctx.KVStore(k.storeKey).Delete(types.VoteStoreKey(voter)) } -// SetDelegatorSignals sets multiple signals of a delegator. -func (k Keeper) SetDelegatorSignals(ctx sdk.Context, signals types.DelegatorSignals) { +// SetVote sets multiple signals of a voter. +func (k Keeper) SetVote(ctx sdk.Context, vote types.Vote) { ctx.KVStore(k.storeKey). - Set(types.DelegatorSignalsStoreKey(sdk.MustAccAddressFromBech32(signals.Delegator)), k.cdc.MustMarshal(&signals)) + Set(types.VoteStoreKey(sdk.MustAccAddressFromBech32(vote.Voter)), k.cdc.MustMarshal(&vote)) } -// GetDelegatorSignalsIterator returns an iterator of the delegator-signals store. -func (k Keeper) GetDelegatorSignalsIterator(ctx sdk.Context) dbm.Iterator { - return storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.DelegatorSignalsStoreKeyPrefix) +// GetVoteIterator returns an iterator of the vote store. +func (k Keeper) GetVoteIterator(ctx sdk.Context) dbm.Iterator { + return storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.VoteStoreKeyPrefix) } -// GetAllDelegatorSignals returns a list of all delegator-signals. -func (k Keeper) GetAllDelegatorSignals(ctx sdk.Context) (delegatorSignalsList []types.DelegatorSignals) { - iterator := k.GetDelegatorSignalsIterator(ctx) +// GetAllVotes returns a list of all votes. +func (k Keeper) GetAllVotes(ctx sdk.Context) (votes []types.Vote) { + iterator := k.GetVoteIterator(ctx) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - var ds types.DelegatorSignals - k.cdc.MustUnmarshal(iterator.Value(), &ds) - delegatorSignalsList = append(delegatorSignalsList, ds) + var v types.Vote + k.cdc.MustUnmarshal(iterator.Value(), &v) + votes = append(votes, v) } - return delegatorSignalsList + return } -// SetAllDelegatorSignals sets multiple delegator-signals. -func (k Keeper) SetAllDelegatorSignals(ctx sdk.Context, delegatorSignalsList []types.DelegatorSignals) { - for _, ds := range delegatorSignalsList { - k.SetDelegatorSignals(ctx, ds) +// SetAllVotes sets multiple votes. +func (k Keeper) SetAllVotes(ctx sdk.Context, votes []types.Vote) { + for _, v := range votes { + k.SetVote(ctx, v) } } @@ -151,12 +151,12 @@ func (k Keeper) SignalTotalPowersByPowerStoreIterator(ctx sdk.Context) dbm.Itera ) } -// CalculateNewSignalTotalPowers calculates the new signal-total-powers from all delegator-signals. +// CalculateNewSignalTotalPowers calculates the new signal-total-powers from all votes. func (k Keeper) CalculateNewSignalTotalPowers(ctx sdk.Context) []types.Signal { - delegatorSignals := k.GetAllDelegatorSignals(ctx) + votes := k.GetAllVotes(ctx) signalIDToPower := make(map[string]int64) - for _, ds := range delegatorSignals { - for _, signal := range ds.Signals { + for _, v := range votes { + for _, signal := range v.Signals { signalIDToPower[signal.ID] += signal.Power } } @@ -178,15 +178,15 @@ func (k Keeper) CalculateNewSignalTotalPowers(ctx sdk.Context) []types.Signal { return signalTotalPowers } -// LockDelegatorDelegation locks the delegator's power equal to the sum of the signal powers. -// It returns an error if the delegator does not have enough power to lock. -func (k Keeper) LockDelegatorDelegation( +// LockVoterPower locks the voter's power equal to the sum of the signal powers. +// It returns an error if the voter does not have enough power to lock. +func (k Keeper) LockVoterPower( ctx sdk.Context, - delegator sdk.AccAddress, + voter sdk.AccAddress, signals []types.Signal, ) error { sumPower := types.SumPower(signals) - if err := k.restakeKeeper.SetLockedPower(ctx, delegator, types.ModuleName, math.NewInt(sumPower)); err != nil { + if err := k.restakeKeeper.SetLockedPower(ctx, voter, types.ModuleName, math.NewInt(sumPower)); err != nil { return err } @@ -194,22 +194,22 @@ func (k Keeper) LockDelegatorDelegation( } // RegisterNewSignals delete previous signals and register new signals. -// It also calculates feed power differences from delegator's previous signals and new signals. +// It also calculates feed power differences from voter's previous signals and new signals. func (k Keeper) RegisterNewSignals( ctx sdk.Context, - delegator sdk.AccAddress, + voter sdk.AccAddress, signals []types.Signal, ) map[string]int64 { signalIDToPowerDiff := make(map[string]int64) - prevSignals := k.GetDelegatorSignals(ctx, delegator) - k.DeleteDelegatorSignals(ctx, delegator) + prevSignals := k.GetVoteSignals(ctx, voter) + k.DeleteVote(ctx, voter) for _, prevSignal := range prevSignals { signalIDToPowerDiff[prevSignal.ID] -= prevSignal.Power } - k.SetDelegatorSignals(ctx, types.NewDelegatorSignals(delegator.String(), signals)) + k.SetVote(ctx, types.NewVote(voter.String(), signals)) for _, signal := range signals { signalIDToPowerDiff[signal.ID] += signal.Power diff --git a/x/feeds/keeper/keeper_signal_test.go b/x/feeds/keeper/keeper_signal_test.go index 4331c1458..d71d558fe 100644 --- a/x/feeds/keeper/keeper_signal_test.go +++ b/x/feeds/keeper/keeper_signal_test.go @@ -4,12 +4,12 @@ import ( "github.com/bandprotocol/chain/v3/x/feeds/types" ) -func (suite *KeeperTestSuite) TestGetSetDelegatorSignals() { +func (suite *KeeperTestSuite) TestGetSetVote() { ctx := suite.ctx // set - expSignals := types.DelegatorSignals{ - Delegator: ValidDelegator.String(), + expVote := types.Vote{ + Voter: ValidVoter.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -21,11 +21,11 @@ func (suite *KeeperTestSuite) TestGetSetDelegatorSignals() { }, }, } - suite.feedsKeeper.SetDelegatorSignals(ctx, expSignals) + suite.feedsKeeper.SetVote(ctx, expVote) // get - signals := suite.feedsKeeper.GetDelegatorSignals(ctx, ValidDelegator) - suite.Require().Equal(expSignals.Signals, signals) + signals := suite.feedsKeeper.GetVoteSignals(ctx, ValidVoter) + suite.Require().Equal(expVote.Signals, signals) } func (suite *KeeperTestSuite) TestGetSetDeleteSignalTotalPower() { diff --git a/x/feeds/keeper/keeper_test.go b/x/feeds/keeper/keeper_test.go index bf9095720..a05ac50a9 100644 --- a/x/feeds/keeper/keeper_test.go +++ b/x/feeds/keeper/keeper_test.go @@ -31,11 +31,11 @@ var ( ValidValidator = sdk.ValAddress("1000000001") ValidValidator2 = sdk.ValAddress("1000000002") ValidValidator3 = sdk.ValAddress("1000000003") - ValidDelegator = sdk.AccAddress("2000000001") - ValidDelegator2 = sdk.AccAddress("2000000002") + ValidVoter = sdk.AccAddress("2000000001") + ValidVoter2 = sdk.AccAddress("2000000002") ValidFeeder = sdk.AccAddress("3000000001") InvalidValidator = sdk.ValAddress("9000000001") - InvalidDelegator = sdk.AccAddress("9000000002") + InvalidVoter = sdk.AccAddress("9000000002") ) type KeeperTestSuite struct { @@ -136,7 +136,7 @@ func (suite *KeeperTestSuite) SetupTest() { restakeKeeper := feedstestutil.NewMockRestakeKeeper(ctrl) restakeKeeper.EXPECT(). - SetLockedPower(gomock.Any(), ValidDelegator, types.ModuleName, gomock.Any()). + SetLockedPower(gomock.Any(), ValidVoter, types.ModuleName, gomock.Any()). DoAndReturn(func(_ sdk.Context, _ sdk.AccAddress, _ string, amount math.Int) error { if amount.GT(math.NewInt(1e10)) { return restaketypes.ErrPowerNotEnough @@ -145,7 +145,7 @@ func (suite *KeeperTestSuite) SetupTest() { }). AnyTimes() restakeKeeper.EXPECT(). - SetLockedPower(gomock.Any(), InvalidDelegator, types.ModuleName, gomock.Any()). + SetLockedPower(gomock.Any(), InvalidVoter, types.ModuleName, gomock.Any()). Return(restaketypes.ErrPowerNotEnough). AnyTimes() suite.restakeKeeper = restakeKeeper diff --git a/x/feeds/keeper/msg_server.go b/x/feeds/keeper/msg_server.go index d8ec9ae94..a2e53b12c 100644 --- a/x/feeds/keeper/msg_server.go +++ b/x/feeds/keeper/msg_server.go @@ -24,14 +24,14 @@ func NewMsgServerImpl(k Keeper) types.MsgServer { } // SubmitSignals registers new signals and updates feeds. -func (ms msgServer) SubmitSignals( +func (ms msgServer) VoteSignals( goCtx context.Context, - req *types.MsgSubmitSignals, -) (*types.MsgSubmitSignalsResponse, error) { + req *types.MsgVoteSignals, +) (*types.MsgVoteSignalsResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - // convert the delegator address from Bech32 format to sdk.AccAddress - delegator, err := sdk.AccAddressFromBech32(req.Delegator) + // convert the voter address from Bech32 format to sdk.AccAddress + voter, err := sdk.AccAddressFromBech32(req.Voter) if err != nil { return nil, err } @@ -44,14 +44,14 @@ func (ms msgServer) SubmitSignals( ) } - // lock the delegator's power equal to the sum of the signal powers - err = ms.LockDelegatorDelegation(ctx, delegator, req.Signals) + // lock the voter's power equal to the sum of the signal powers + err = ms.LockVoterPower(ctx, voter, req.Signals) if err != nil { return nil, err } // RegisterNewSignals deletes previous signals and registers new signals then returns feed power differences - signalIDToPowerDiff := ms.RegisterNewSignals(ctx, delegator, req.Signals) + signalIDToPowerDiff := ms.RegisterNewSignals(ctx, voter, req.Signals) // sort keys to guarantee order of signalIDToPowerDiff iteration keys := make([]string, 0, len(signalIDToPowerDiff)) @@ -88,7 +88,7 @@ func (ms msgServer) SubmitSignals( } // return an empty response indicating success - return &types.MsgSubmitSignalsResponse{}, nil + return &types.MsgVoteSignalsResponse{}, nil } // SubmitSignalPrices register new validator prices. diff --git a/x/feeds/keeper/msg_server_test.go b/x/feeds/keeper/msg_server_test.go index df8b77331..07061d15b 100644 --- a/x/feeds/keeper/msg_server_test.go +++ b/x/feeds/keeper/msg_server_test.go @@ -2,18 +2,18 @@ package keeper_test import "github.com/bandprotocol/chain/v3/x/feeds/types" -func (suite *KeeperTestSuite) TestMsgSubmitSignals() { +func (suite *KeeperTestSuite) TestMsgVoteSignals() { testCases := []struct { name string - input *types.MsgSubmitSignals + input *types.MsgVoteSignals expErr bool expErrMsg string postCheck func() }{ { name: "no power", - input: &types.MsgSubmitSignals{ - Delegator: InvalidDelegator.String(), + input: &types.MsgVoteSignals{ + Voter: InvalidVoter.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -27,8 +27,8 @@ func (suite *KeeperTestSuite) TestMsgSubmitSignals() { }, { name: "1 signal more than powers", - input: &types.MsgSubmitSignals{ - Delegator: ValidDelegator.String(), + input: &types.MsgVoteSignals{ + Voter: ValidVoter.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -42,8 +42,8 @@ func (suite *KeeperTestSuite) TestMsgSubmitSignals() { }, { name: "2 signals more than powers", - input: &types.MsgSubmitSignals{ - Delegator: ValidDelegator.String(), + input: &types.MsgVoteSignals{ + Voter: ValidVoter.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -61,8 +61,8 @@ func (suite *KeeperTestSuite) TestMsgSubmitSignals() { }, { name: "valid request", - input: &types.MsgSubmitSignals{ - Delegator: ValidDelegator.String(), + input: &types.MsgVoteSignals{ + Voter: ValidVoter.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -80,7 +80,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitSignals() { Power: 1e10, }, }, - suite.feedsKeeper.GetDelegatorSignals(suite.ctx, ValidDelegator), + suite.feedsKeeper.GetVoteSignals(suite.ctx, ValidVoter), ) suite.Require().Equal( []types.Signal{ @@ -95,8 +95,8 @@ func (suite *KeeperTestSuite) TestMsgSubmitSignals() { }, { name: "valid request (replace)", - input: &types.MsgSubmitSignals{ - Delegator: ValidDelegator.String(), + input: &types.MsgVoteSignals{ + Voter: ValidVoter.String(), Signals: []types.Signal{ { ID: "CS:BAND-USD", @@ -122,7 +122,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitSignals() { Power: 1e9, }, }, - suite.feedsKeeper.GetDelegatorSignals(suite.ctx, ValidDelegator), + suite.feedsKeeper.GetVoteSignals(suite.ctx, ValidVoter), ) suite.Require().Equal( []types.Signal{ @@ -143,7 +143,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitSignals() { for _, tc := range testCases { suite.Run(tc.name, func() { - _, err := suite.msgServer.SubmitSignals(suite.ctx, tc.input) + _, err := suite.msgServer.VoteSignals(suite.ctx, tc.input) if tc.expErr { suite.Require().Error(err) diff --git a/x/feeds/types/codec.go b/x/feeds/types/codec.go index 358444221..f48c833ea 100644 --- a/x/feeds/types/codec.go +++ b/x/feeds/types/codec.go @@ -12,7 +12,7 @@ import ( // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - legacy.RegisterAminoMsg(cdc, &MsgSubmitSignals{}, "feeds/MsgSubmitSignals") + legacy.RegisterAminoMsg(cdc, &MsgVoteSignals{}, "feeds/MsgVoteSignals") legacy.RegisterAminoMsg(cdc, &MsgSubmitSignalPrices{}, "feeds/MsgSubmitSignalPrices") legacy.RegisterAminoMsg(cdc, &MsgUpdateReferenceSourceConfig{}, "feeds/MsgUpdateReferenceSourceConfig") legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "feeds/MsgUpdateParams") @@ -24,7 +24,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), - &MsgSubmitSignals{}, + &MsgVoteSignals{}, &MsgSubmitSignalPrices{}, &MsgUpdateReferenceSourceConfig{}, &MsgUpdateParams{}, diff --git a/x/feeds/types/feeds.pb.go b/x/feeds/types/feeds.pb.go index 6dab91b37..3939ac5fc 100644 --- a/x/feeds/types/feeds.pb.go +++ b/x/feeds/types/feeds.pb.go @@ -147,26 +147,26 @@ func (m *Signal) GetPower() int64 { return 0 } -// DelegatorSignals is the data structure that contains array of signals of a delegator. -type DelegatorSignals struct { - // delegator is the address of the delegator of this signals. - Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty"` - // signals is a list of signals submit by the delegator. +// Vote is the data structure that contains array of signals of a voter. +type Vote struct { + // voter is the address of the voter of this signals. + Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` + // signals is a list of signals submit by the voter. Signals []Signal `protobuf:"bytes,2,rep,name=signals,proto3" json:"signals"` } -func (m *DelegatorSignals) Reset() { *m = DelegatorSignals{} } -func (m *DelegatorSignals) String() string { return proto.CompactTextString(m) } -func (*DelegatorSignals) ProtoMessage() {} -func (*DelegatorSignals) Descriptor() ([]byte, []int) { +func (m *Vote) Reset() { *m = Vote{} } +func (m *Vote) String() string { return proto.CompactTextString(m) } +func (*Vote) ProtoMessage() {} +func (*Vote) Descriptor() ([]byte, []int) { return fileDescriptor_fc3afe81d3b13674, []int{1} } -func (m *DelegatorSignals) XXX_Unmarshal(b []byte) error { +func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DelegatorSignals) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DelegatorSignals.Marshal(b, m, deterministic) + return xxx_messageInfo_Vote.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -176,26 +176,26 @@ func (m *DelegatorSignals) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *DelegatorSignals) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatorSignals.Merge(m, src) +func (m *Vote) XXX_Merge(src proto.Message) { + xxx_messageInfo_Vote.Merge(m, src) } -func (m *DelegatorSignals) XXX_Size() int { +func (m *Vote) XXX_Size() int { return m.Size() } -func (m *DelegatorSignals) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatorSignals.DiscardUnknown(m) +func (m *Vote) XXX_DiscardUnknown() { + xxx_messageInfo_Vote.DiscardUnknown(m) } -var xxx_messageInfo_DelegatorSignals proto.InternalMessageInfo +var xxx_messageInfo_Vote proto.InternalMessageInfo -func (m *DelegatorSignals) GetDelegator() string { +func (m *Vote) GetVoter() string { if m != nil { - return m.Delegator + return m.Voter } return "" } -func (m *DelegatorSignals) GetSignals() []Signal { +func (m *Vote) GetSignals() []Signal { if m != nil { return m.Signals } @@ -907,7 +907,7 @@ func init() { proto.RegisterEnum("band.feeds.v1beta1.PriceStatus", PriceStatus_name, PriceStatus_value) proto.RegisterEnum("band.feeds.v1beta1.Encoder", Encoder_name, Encoder_value) proto.RegisterType((*Signal)(nil), "band.feeds.v1beta1.Signal") - proto.RegisterType((*DelegatorSignals)(nil), "band.feeds.v1beta1.DelegatorSignals") + proto.RegisterType((*Vote)(nil), "band.feeds.v1beta1.Vote") proto.RegisterType((*Feed)(nil), "band.feeds.v1beta1.Feed") proto.RegisterType((*FeedWithDeviation)(nil), "band.feeds.v1beta1.FeedWithDeviation") proto.RegisterType((*CurrentFeeds)(nil), "band.feeds.v1beta1.CurrentFeeds") @@ -924,73 +924,73 @@ func init() { func init() { proto.RegisterFile("band/feeds/v1beta1/feeds.proto", fileDescriptor_fc3afe81d3b13674) } var fileDescriptor_fc3afe81d3b13674 = []byte{ - // 1056 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0xc5, - 0x1b, 0xf6, 0x3a, 0xce, 0x1f, 0x4f, 0xf2, 0x4b, 0xdc, 0x89, 0x9b, 0x6e, 0xdd, 0x1f, 0xb6, 0x1b, - 0x09, 0x29, 0x8d, 0xa8, 0x4d, 0xd3, 0x82, 0xaa, 0x08, 0x09, 0x79, 0x6d, 0x47, 0x59, 0x11, 0x25, - 0xd6, 0xda, 0x09, 0x88, 0xcb, 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1f, 0x66, 0xa5, 0x9b, 0x8a, - 0x6d, 0xfb, 0x98, 0xd2, 0x26, 0xf3, 0x89, 0xd3, 0x35, 0xa2, 0x54, 0xb8, 0x0f, 0x96, 0xa9, 0x58, - 0x42, 0x4d, 0x16, 0x17, 0x76, 0x56, 0xf7, 0x72, 0xa5, 0x9b, 0x15, 0x96, 0xc4, 0x2e, 0x5a, 0xea, - 0xd5, 0x65, 0x21, 0x61, 0x84, 0x02, 0x69, 0x87, 0x80, 0xd4, 0x01, 0xc6, 0x36, 0x7c, 0x00, 0xd2, - 0x82, 0x30, 0x27, 0x15, 0xad, 0x8d, 0x2f, 0x0b, 0x2b, 0x42, 0xab, 0xd7, 0x8c, 0x15, 0x41, 0xeb, - 0x73, 0xaa, 0x83, 0x39, 0xb0, 0x42, 0x1c, 0x86, 0xfd, 0x21, 0xea, 0xab, 0x0b, 0x9c, 0x98, 0xc4, - 0x72, 0xab, 0x1f, 0x14, 0x70, 0x2b, 0xd8, 0xeb, 0x63, 0xc2, 0x7a, 0x35, 0x3c, 0x24, 0x88, 0x11, - 0xd7, 0xf9, 0x47, 0x37, 0x86, 0x7b, 0xe0, 0xb6, 0x1d, 0xee, 0x64, 0xb6, 0x11, 0x25, 0xd4, 0xf4, - 0x5c, 0xe2, 0x30, 0x35, 0xc5, 0x13, 0x37, 0x27, 0xa4, 0x16, 0x70, 0x8d, 0x80, 0x8a, 0xcc, 0xae, - 0x55, 0x07, 0xbe, 0x8f, 0x1d, 0x16, 0x78, 0xa6, 0xf0, 0x09, 0x58, 0xe4, 0x5d, 0x55, 0x15, 0xde, - 0x68, 0x75, 0x56, 0xa3, 0x83, 0x4c, 0xd9, 0x66, 0x91, 0x1c, 0x18, 0xe8, 0x23, 0xca, 0xcc, 0x81, - 0x67, 0x23, 0x86, 0x4d, 0x46, 0xce, 0x31, 0x65, 0xe8, 0xdc, 0x93, 0x25, 0x6c, 0x06, 0xe4, 0x29, - 0xe7, 0x5a, 0x21, 0x05, 0x77, 0x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0x5c, 0x92, 0xcc, 0x65, 0x2f, 0x46, 0xc5, 0x1b, - 0xb8, 0x70, 0xaa, 0x1d, 0xbe, 0x1a, 0xe7, 0x95, 0xd7, 0xe3, 0xbc, 0xf2, 0xcb, 0x38, 0xaf, 0x7c, - 0x73, 0x95, 0x4f, 0xbc, 0xbe, 0xca, 0x27, 0x7e, 0xbe, 0xca, 0x27, 0x3e, 0x2d, 0x75, 0x09, 0xeb, - 0x0d, 0xda, 0x25, 0xcb, 0x3d, 0x2f, 0x07, 0x67, 0xce, 0xff, 0xe0, 0x59, 0x6e, 0xbf, 0x6c, 0xf5, - 0x10, 0x71, 0xca, 0xc3, 0xc7, 0xe5, 0x2f, 0xe4, 0xbf, 0x49, 0xf6, 0xcc, 0xc3, 0xb4, 0xbd, 0xc4, - 0x13, 0x1e, 0xff, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xc0, 0x4d, 0xb6, 0x68, 0x0a, 0x00, 0x00, + // 1050 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x3a, 0xce, 0x0f, 0x4f, 0x42, 0xe2, 0x4e, 0xdc, 0x74, 0xeb, 0x82, 0xed, 0x46, 0x42, + 0x4a, 0x23, 0x6a, 0xd3, 0xb4, 0x48, 0x55, 0x84, 0x84, 0xfc, 0x2b, 0xca, 0x8a, 0x28, 0xb1, 0xd6, + 0x4e, 0x40, 0x5c, 0x56, 0xe3, 0xdd, 0xb1, 0x3d, 0xc2, 0xd9, 0x59, 0xed, 0x8c, 0x4d, 0x7b, 0x82, + 0x63, 0x15, 0x71, 0xe0, 0xc8, 0xc5, 0x52, 0x25, 0x0e, 0x48, 0x9c, 0x38, 0xf4, 0x4f, 0xe0, 0xd0, + 0x63, 0xd5, 0x13, 0xa7, 0x08, 0x39, 0x17, 0xfe, 0x03, 0xae,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0xea, 0xb6, 0x49, 0x07, + 0x96, 0x01, 0xf4, 0x71, 0x87, 0x30, 0xee, 0x3f, 0xb5, 0x88, 0xd7, 0x66, 0x56, 0x17, 0xb1, 0xae, + 0xb2, 0x9f, 0x1e, 0x5d, 0xe6, 0x52, 0xa6, 0x42, 0x8d, 0xfa, 0x41, 0xe3, 0x10, 0xb1, 0xae, 0x99, + 0x0a, 0xf9, 0x86, 0xd7, 0x66, 0x41, 0x04, 0xde, 0x03, 0xe3, 0x98, 0x35, 0xc0, 0x3e, 0x23, 0xd4, + 0x95, 0x1b, 0x6c, 0x6e, 0x84, 0xf1, 0x33, 0x19, 0x56, 0x76, 0xbe, 0x06, 0xeb, 0xe2, 0x6e, 0x14, + 0x1e, 0xab, 0x88, 0x23, 0x68, 0x80, 0x35, 0x36, 0x39, 0x0d, 0xe1, 0x8d, 0x93, 0x9b, 0xff, 0x51, + 0x9a, 0x2e, 0x3a, 0x22, 0x8d, 0xee, 0x72, 0x5c, 0xec, 0xff, 0xb5, 0xd3, 0xf7, 0x8d, 0x06, 0x36, + 0x85, 0x03, 0xf1, 0x32, 0xde, 0xf7, 0xf1, 0x89, 0xef, 0x60, 0x1f, 0x7e, 0x00, 0xc0, 0x78, 0xc4, + 0xa4, 0x89, 0x64, 0xf9, 0x9d, 0xd1, 0x65, 0x2e, 0x19, 0xce, 0x18, 0x33, 0x93, 0xe1, 0x90, 0x31, + 0xf8, 0x11, 0x58, 0xc6, 0xae, 0x4d, 0x1d, 0xf5, 0x61, 0x59, 0xdf, 0xbb, 0x33, 0xcb, 0x6f, 0x4d, + 0x52, 0xcc, 0x90, 0xbb, 0x9f, 0x78, 0xf6, 0x3c, 0x17, 0xdb, 0xfd, 0x43, 0x03, 0xab, 0x53, 0x67, + 0x05, 0x3e, 0x06, 0x7a, 0xdd, 0x34, 0x2a, 0x35, 0xab, 0xd1, 0x2c, 0x35, 0x4f, 0x1b, 0xd6, 0xe9, + 0x71, 0xa3, 0x5e, 0xab, 0x18, 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xbf, 0x55, 0xb0, 0xe9, 0x79, + 0x31, 0xd8, 0x73, 0xf1, 0x2f, 0x67, 0xd3, 0x5e, 0xd1, 0xee, 0x22, 0xe2, 0x16, 0x07, 0x0f, 0x8b, + 0x4f, 0xd4, 0x8f, 0x23, 0x7f, 0xea, 0x61, 0xd6, 0x5a, 0x12, 0x84, 0x87, 0x7f, 0x06, 0x00, 0x00, + 0xff, 0xff, 0x9b, 0xd1, 0x02, 0xba, 0x53, 0x0a, 0x00, 0x00, } func (this *Signal) Equal(that interface{}) bool { @@ -1020,14 +1020,14 @@ func (this *Signal) Equal(that interface{}) bool { } return true } -func (this *DelegatorSignals) Equal(that interface{}) bool { +func (this *Vote) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*DelegatorSignals) + that1, ok := that.(*Vote) if !ok { - that2, ok := that.(DelegatorSignals) + that2, ok := that.(Vote) if ok { that1 = &that2 } else { @@ -1039,7 +1039,7 @@ func (this *DelegatorSignals) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Delegator != that1.Delegator { + if this.Voter != that1.Voter { return false } if len(this.Signals) != len(that1.Signals) { @@ -1413,7 +1413,7 @@ func (m *Signal) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DelegatorSignals) Marshal() (dAtA []byte, err error) { +func (m *Vote) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1423,12 +1423,12 @@ func (m *DelegatorSignals) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DelegatorSignals) MarshalTo(dAtA []byte) (int, error) { +func (m *Vote) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DelegatorSignals) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1447,10 +1447,10 @@ func (m *DelegatorSignals) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if len(m.Delegator) > 0 { - i -= len(m.Delegator) - copy(dAtA[i:], m.Delegator) - i = encodeVarintFeeds(dAtA, i, uint64(len(m.Delegator))) + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintFeeds(dAtA, i, uint64(len(m.Voter))) i-- dAtA[i] = 0xa } @@ -1965,13 +1965,13 @@ func (m *Signal) Size() (n int) { return n } -func (m *DelegatorSignals) Size() (n int) { +func (m *Vote) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Delegator) + l = len(m.Voter) if l > 0 { n += 1 + l + sovFeeds(uint64(l)) } @@ -2316,7 +2316,7 @@ func (m *Signal) Unmarshal(dAtA []byte) error { } return nil } -func (m *DelegatorSignals) Unmarshal(dAtA []byte) error { +func (m *Vote) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2339,15 +2339,15 @@ func (m *DelegatorSignals) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DelegatorSignals: wiretype end group for non-group") + return fmt.Errorf("proto: Vote: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DelegatorSignals: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2375,7 +2375,7 @@ func (m *DelegatorSignals) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Delegator = string(dAtA[iNdEx:postIndex]) + m.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/feeds/types/genesis.go b/x/feeds/types/genesis.go index 8ba08200b..68c77b42d 100644 --- a/x/feeds/types/genesis.go +++ b/x/feeds/types/genesis.go @@ -3,19 +3,19 @@ package types // NewGenesisState creates new GenesisState func NewGenesisState( params Params, - ds []DelegatorSignals, + votes []Vote, rs ReferenceSourceConfig, ) *GenesisState { return &GenesisState{ Params: params, - DelegatorSignals: ds, + Votes: votes, ReferenceSourceConfig: rs, } } // DefaultGenesisState returns the default genesis state func DefaultGenesisState() *GenesisState { - return NewGenesisState(DefaultParams(), []DelegatorSignals{}, DefaultReferenceSourceConfig()) + return NewGenesisState(DefaultParams(), []Vote{}, DefaultReferenceSourceConfig()) } // Validate performs basic genesis state validation @@ -24,8 +24,8 @@ func (gs GenesisState) Validate() error { return err } - for _, ds := range gs.DelegatorSignals { - if err := ds.Validate(); err != nil { + for _, v := range gs.Votes { + if err := v.Validate(); err != nil { return err } } diff --git a/x/feeds/types/genesis.pb.go b/x/feeds/types/genesis.pb.go index 53cd2ea28..c9bbb94e6 100644 --- a/x/feeds/types/genesis.pb.go +++ b/x/feeds/types/genesis.pb.go @@ -27,8 +27,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { // params is all parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - // delegator_signals is a list of delegator signals submitted by delegators. - DelegatorSignals []DelegatorSignals `protobuf:"bytes,2,rep,name=delegator_signals,json=delegatorSignals,proto3" json:"delegator_signals"` + // votes is a list of voter signals. + Votes []Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"` // reference_source_config is the information about reference price config. ReferenceSourceConfig ReferenceSourceConfig `protobuf:"bytes,3,opt,name=reference_source_config,json=referenceSourceConfig,proto3" json:"reference_source_config"` } @@ -73,9 +73,9 @@ func (m *GenesisState) GetParams() Params { return Params{} } -func (m *GenesisState) GetDelegatorSignals() []DelegatorSignals { +func (m *GenesisState) GetVotes() []Vote { if m != nil { - return m.DelegatorSignals + return m.Votes } return nil } @@ -94,26 +94,25 @@ func init() { func init() { proto.RegisterFile("band/feeds/v1beta1/genesis.proto", fileDescriptor_3665d63bc534e43f) } var fileDescriptor_3665d63bc534e43f = []byte{ - // 303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xeb, 0x30, - 0x14, 0x86, 0x93, 0xf6, 0xaa, 0x43, 0x7a, 0x07, 0x88, 0x40, 0x54, 0x19, 0xdc, 0x0a, 0x31, 0x94, - 0xc5, 0x56, 0xdb, 0x85, 0x19, 0x90, 0x60, 0x44, 0xed, 0x80, 0xc4, 0x12, 0x39, 0xce, 0x89, 0x1b, - 0x29, 0xb5, 0x23, 0xdb, 0xad, 0xe0, 0x15, 0x98, 0x78, 0xac, 0x8e, 0x1d, 0x99, 0x10, 0x4a, 0x5e, - 0x04, 0xc5, 0x71, 0x17, 0xc8, 0x66, 0xf9, 0x7c, 0xff, 0xf7, 0x1f, 0x9d, 0x60, 0x92, 0x50, 0x91, - 0x92, 0x0c, 0x20, 0xd5, 0x64, 0x37, 0x4b, 0xc0, 0xd0, 0x19, 0xe1, 0x20, 0x40, 0xe7, 0x1a, 0x97, - 0x4a, 0x1a, 0x19, 0x86, 0x0d, 0x81, 0x2d, 0x81, 0x1d, 0x11, 0x9d, 0x71, 0xc9, 0xa5, 0x1d, 0x93, - 0xe6, 0xd5, 0x92, 0xd1, 0xb8, 0xc3, 0x55, 0x52, 0x45, 0x37, 0x4e, 0x15, 0xa1, 0x0e, 0xa0, 0x15, - 0xdb, 0xf9, 0xe5, 0x7b, 0x2f, 0xf8, 0xff, 0xd0, 0x96, 0xaf, 0x0c, 0x35, 0x10, 0xde, 0x04, 0x83, - 0x56, 0x30, 0xf2, 0x27, 0xfe, 0x74, 0x38, 0x8f, 0xf0, 0xdf, 0x65, 0xf0, 0x93, 0x25, 0x6e, 0xff, - 0xed, 0xbf, 0xc6, 0xde, 0xd2, 0xf1, 0xe1, 0x73, 0x70, 0x9a, 0x42, 0x01, 0x9c, 0x1a, 0xa9, 0x62, - 0x9d, 0x73, 0x41, 0x0b, 0x3d, 0xea, 0x4d, 0xfa, 0xd3, 0xe1, 0xfc, 0xaa, 0x4b, 0x72, 0x7f, 0x84, - 0x57, 0x2d, 0xeb, 0x74, 0x27, 0xe9, 0xaf, 0xff, 0x90, 0x07, 0x17, 0x0a, 0x32, 0x50, 0x20, 0x18, - 0xc4, 0x5a, 0x6e, 0x15, 0x83, 0x98, 0x49, 0x91, 0xe5, 0x7c, 0xd4, 0xb7, 0x3b, 0x5e, 0x77, 0xe9, - 0x97, 0xc7, 0xc8, 0xca, 0x26, 0xee, 0x6c, 0xc0, 0x75, 0x9c, 0xab, 0xce, 0xe1, 0xe3, 0xbe, 0x42, - 0xfe, 0xa1, 0x42, 0xfe, 0x77, 0x85, 0xfc, 0x8f, 0x1a, 0x79, 0x87, 0x1a, 0x79, 0x9f, 0x35, 0xf2, - 0x5e, 0x30, 0xcf, 0xcd, 0x7a, 0x9b, 0x60, 0x26, 0x37, 0xa4, 0xe9, 0xb2, 0xc7, 0x63, 0xb2, 0x20, - 0x6c, 0x4d, 0x73, 0x41, 0x76, 0x0b, 0xf2, 0xea, 0x8e, 0x6c, 0xde, 0x4a, 0xd0, 0xc9, 0xc0, 0x02, - 0x8b, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x96, 0x48, 0xd1, 0xec, 0x01, 0x00, 0x00, + // 285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x86, 0x63, 0x0a, 0x1d, 0x52, 0xa6, 0x08, 0x44, 0x94, 0xc1, 0x8d, 0x98, 0xca, 0x62, 0xab, + 0x2d, 0x03, 0x33, 0x0c, 0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f8, 0xb4, 0x6f, 0x30, 0x3a, + 0x34, 0x18, 0xfd, 0x34, 0x18, 0x7d, 0xb6, 0x38, 0x38, 0xb4, 0x38, 0xf8, 0x6a, 0x71, 0xf0, 0x4a, + 0x44, 0x61, 0x36, 0xbb, 0x8c, 0x70, 0xb9, 0xa5, 0xdd, 0x2e, 0xfb, 0x19, 0x2e, 0xdf, 0x28, 0xdf, + 0xb0, 0xa2, 0xa4, 0xf5, 0x9c, 0xbe, 0xbb, 0x0f, 0x9a, 0x8f, 0x0a, 0x74, 0x36, 0xb4, 0xc0, 0xfc, + 0x2f, 0x00, 0x00, 0xff, 0xff, 0x44, 0xfc, 0x4b, 0xbb, 0xc9, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -146,10 +145,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - if len(m.DelegatorSignals) > 0 { - for iNdEx := len(m.DelegatorSignals) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.DelegatorSignals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -192,8 +191,8 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) - if len(m.DelegatorSignals) > 0 { - for _, e := range m.DelegatorSignals { + if len(m.Votes) > 0 { + for _, e := range m.Votes { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } @@ -273,7 +272,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorSignals", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -300,8 +299,8 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorSignals = append(m.DelegatorSignals, DelegatorSignals{}) - if err := m.DelegatorSignals[len(m.DelegatorSignals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Votes = append(m.Votes, Vote{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/feeds/types/genesis_test.go b/x/feeds/types/genesis_test.go index ca3a11350..ae23fec19 100644 --- a/x/feeds/types/genesis_test.go +++ b/x/feeds/types/genesis_test.go @@ -16,7 +16,7 @@ func TestGenesisStateValidate(t *testing.T) { "valid genesisState", GenesisState{ Params: DefaultParams(), - DelegatorSignals: []DelegatorSignals{}, + Votes: []Vote{}, ReferenceSourceConfig: DefaultReferenceSourceConfig(), }, false, @@ -30,7 +30,7 @@ func TestGenesisStateValidate(t *testing.T) { "invalid params", GenesisState{ Params: Params{}, - DelegatorSignals: []DelegatorSignals{}, + Votes: []Vote{}, ReferenceSourceConfig: DefaultReferenceSourceConfig(), }, true, @@ -39,7 +39,7 @@ func TestGenesisStateValidate(t *testing.T) { "invalid reference source config", GenesisState{ Params: DefaultParams(), - DelegatorSignals: []DelegatorSignals{}, + Votes: []Vote{}, ReferenceSourceConfig: ReferenceSourceConfig{}, }, true, diff --git a/x/feeds/types/keys.go b/x/feeds/types/keys.go index 0a5b1518f..77d1224eb 100644 --- a/x/feeds/types/keys.go +++ b/x/feeds/types/keys.go @@ -30,7 +30,7 @@ var ( // store prefixes ValidatorPriceListStoreKeyPrefix = []byte{0x10} PriceStoreKeyPrefix = []byte{0x11} - DelegatorSignalsStoreKeyPrefix = []byte{0x12} + VoteStoreKeyPrefix = []byte{0x12} SignalTotalPowerStoreKeyPrefix = []byte{0x13} // index prefixes @@ -40,9 +40,9 @@ var ( ParamsKey = []byte{0x90} ) -// DelegatorSignalsStoreKey creates a key for storing delegator signals -func DelegatorSignalsStoreKey(delegator sdk.AccAddress) []byte { - return append(DelegatorSignalsStoreKeyPrefix, address.MustLengthPrefix(delegator.Bytes())...) +// VoteStoreKey creates a key for storing vote +func VoteStoreKey(voter sdk.AccAddress) []byte { + return append(VoteStoreKeyPrefix, address.MustLengthPrefix(voter.Bytes())...) } // SignalTotalPowerStoreKey creates a key for storing signal-total-powers diff --git a/x/feeds/types/keys_test.go b/x/feeds/types/keys_test.go index 49bcff434..569960a8f 100644 --- a/x/feeds/types/keys_test.go +++ b/x/feeds/types/keys_test.go @@ -30,16 +30,16 @@ func TestPriceStoreKey(t *testing.T) { require.Equal(t, expectEmpty, PriceStoreKey("")) } -func TestDelegatorSignalsStoreKey(t *testing.T) { +func TestVoteStoreKey(t *testing.T) { // Prefix: 0x12 acc, _ := sdk.AccAddressFromHexUnsafe("b80f2a5df7d5710b15622d1a9f1e3830ded5bda8") expect, _ := hex.DecodeString("1214b80f2a5df7d5710b15622d1a9f1e3830ded5bda8") - require.Equal(t, expect, DelegatorSignalsStoreKey(acc)) + require.Equal(t, expect, VoteStoreKey(acc)) // Test with empty address emptyAcc := sdk.AccAddress{} expectEmpty, _ := hex.DecodeString("12") - require.Equal(t, expectEmpty, DelegatorSignalsStoreKey(emptyAcc)) + require.Equal(t, expectEmpty, VoteStoreKey(emptyAcc)) } func TestSignalTotalPowerStoreKey(t *testing.T) { diff --git a/x/feeds/types/msgs.go b/x/feeds/types/msgs.go index adce71cad..ffdc55d49 100644 --- a/x/feeds/types/msgs.go +++ b/x/feeds/types/msgs.go @@ -11,12 +11,12 @@ var ( _ sdk.Msg = (*MsgSubmitSignalPrices)(nil) _ sdk.Msg = (*MsgUpdateParams)(nil) _ sdk.Msg = (*MsgUpdateReferenceSourceConfig)(nil) - _ sdk.Msg = (*MsgSubmitSignals)(nil) + _ sdk.Msg = (*MsgVoteSignals)(nil) _ sdk.HasValidateBasic = (*MsgSubmitSignalPrices)(nil) _ sdk.HasValidateBasic = (*MsgUpdateParams)(nil) _ sdk.HasValidateBasic = (*MsgUpdateReferenceSourceConfig)(nil) - _ sdk.HasValidateBasic = (*MsgSubmitSignals)(nil) + _ sdk.HasValidateBasic = (*MsgVoteSignals)(nil) ) // ==================================== @@ -121,25 +121,25 @@ func (m *MsgUpdateReferenceSourceConfig) ValidateBasic() error { } // ==================================== -// MsgSubmitSignals +// MsgVoteSignals // ==================================== -// NewMsgSubmitSignals creates a new MsgSubmitSignals instance. -func NewMsgSubmitSignals( - delegator string, +// NewMsgVoteSignals creates a new MsgVoteSignals instance. +func NewMsgVoteSignals( + voter string, signals []Signal, -) *MsgSubmitSignals { - return &MsgSubmitSignals{ - Delegator: delegator, - Signals: signals, +) *MsgVoteSignals { + return &MsgVoteSignals{ + Voter: voter, + Signals: signals, } } // ValidateBasic does a check on the provided data. -func (m *MsgSubmitSignals) ValidateBasic() error { - // Check if the delegator address is valid - if _, err := sdk.AccAddressFromBech32(m.Delegator); err != nil { - return errorsmod.Wrap(err, "invalid delegator address") +func (m *MsgVoteSignals) ValidateBasic() error { + // Check if the voter address is valid + if _, err := sdk.AccAddressFromBech32(m.Voter); err != nil { + return errorsmod.Wrap(err, "invalid voter address") } // Map to track signal IDs for duplicate check diff --git a/x/feeds/types/msgs_test.go b/x/feeds/types/msgs_test.go index 2ee200f80..b3ac379bc 100644 --- a/x/feeds/types/msgs_test.go +++ b/x/feeds/types/msgs_test.go @@ -4,19 +4,14 @@ import ( "testing" "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" ) var ( - ValidAuthority = sdk.AccAddress("636f736d6f7331787963726763336838396e72737671776539337a63").String() - - ValidAdmin = sdk.AccAddress("1000000001").String() - ValidDelegator = sdk.AccAddress("1000000002").String() - - ValidValidator = sdk.ValAddress("2000000001").String() - - ValidSignals = []Signal{ + ValidValidator = "cosmosvaloper1vdhhxmt0wdmxzmr0wpjhyzzdttz" + ValidAuthority = "cosmos1xxjxtce966clgkju06qp475j663tg8pmklxcy8" + ValidAdmin = "cosmos1quh7acmun7tx6ywkvqr53m3fe39gxu9k00t4ds" + ValidVoter = "cosmos13jt28pf6s8rgjddv8wwj8v3ngrfsccpgsdhjhw" + ValidSignals = []Signal{ { ID: "CS:BAND-USD", Power: 10000000000, @@ -36,7 +31,7 @@ var ( InvalidValidator = "invalidValidator" InvalidAuthority = "invalidAuthority" InvalidAdmin = "invalidAdmin" - InvalidDelegator = "invalidDelegator" + InvalidVoter = "invalidVoter" ) // ==================================== @@ -107,23 +102,23 @@ func TestMsgUpdateReferenceSourceConfig_ValidateBasic(t *testing.T) { } // ==================================== -// MsgSubmitSignals +// MsgVoteSignals // ==================================== -func TestNewMsgSubmitSignals(t *testing.T) { - msg := NewMsgSubmitSignals(ValidDelegator, ValidSignals) - require.Equal(t, ValidDelegator, msg.Delegator) +func TestNewMsgVoteSignals(t *testing.T) { + msg := NewMsgVoteSignals(ValidVoter, ValidSignals) + require.Equal(t, ValidVoter, msg.Voter) require.Equal(t, ValidSignals, msg.Signals) } -func TestMsgSubmitSignals_ValidateBasic(t *testing.T) { - // Valid delegator - msg := NewMsgSubmitSignals(ValidDelegator, ValidSignals) +func TestMsgVoteSignals_ValidateBasic(t *testing.T) { + // Valid voter + msg := NewMsgVoteSignals(ValidVoter, ValidSignals) err := msg.ValidateBasic() require.NoError(t, err) - // Invalid delegator - msg = NewMsgSubmitSignals(InvalidDelegator, ValidSignals) + // Invalid voter + msg = NewMsgVoteSignals(InvalidVoter, ValidSignals) err = msg.ValidateBasic() require.Error(t, err) } diff --git a/x/feeds/types/query.pb.go b/x/feeds/types/query.pb.go index bd3b69f28..a00a9fce5 100644 --- a/x/feeds/types/query.pb.go +++ b/x/feeds/types/query.pb.go @@ -289,24 +289,24 @@ func (m *QueryCurrentPricesResponse) GetPrices() []Price { return nil } -// QueryDelegatorSignalsRequest is the request type for the Query/DelegatorSignals RPC method. -type QueryDelegatorSignalsRequest struct { - // delegator_address is the delegator address to query signal for. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` +// QueryVoteRequest is the request type for the Query/Vote RPC method. +type QueryVoteRequest struct { + // voter is the voter address to query signal for. + Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` } -func (m *QueryDelegatorSignalsRequest) Reset() { *m = QueryDelegatorSignalsRequest{} } -func (m *QueryDelegatorSignalsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryDelegatorSignalsRequest) ProtoMessage() {} -func (*QueryDelegatorSignalsRequest) Descriptor() ([]byte, []int) { +func (m *QueryVoteRequest) Reset() { *m = QueryVoteRequest{} } +func (m *QueryVoteRequest) String() string { return proto.CompactTextString(m) } +func (*QueryVoteRequest) ProtoMessage() {} +func (*QueryVoteRequest) Descriptor() ([]byte, []int) { return fileDescriptor_39690037efa6f66f, []int{6} } -func (m *QueryDelegatorSignalsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryVoteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryDelegatorSignalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryDelegatorSignalsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryVoteRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -316,43 +316,43 @@ func (m *QueryDelegatorSignalsRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryDelegatorSignalsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegatorSignalsRequest.Merge(m, src) +func (m *QueryVoteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVoteRequest.Merge(m, src) } -func (m *QueryDelegatorSignalsRequest) XXX_Size() int { +func (m *QueryVoteRequest) XXX_Size() int { return m.Size() } -func (m *QueryDelegatorSignalsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegatorSignalsRequest.DiscardUnknown(m) +func (m *QueryVoteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVoteRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryDelegatorSignalsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryVoteRequest proto.InternalMessageInfo -func (m *QueryDelegatorSignalsRequest) GetDelegatorAddress() string { +func (m *QueryVoteRequest) GetVoter() string { if m != nil { - return m.DelegatorAddress + return m.Voter } return "" } -// QueryDelegatorSignalsResponse is the response type for the Query/DelegatorSignals RPC method. -type QueryDelegatorSignalsResponse struct { - // signals is a list of signals submitted by the delegator. +// QueryVoteResponse is the response type for the Query/Vote RPC method. +type QueryVoteResponse struct { + // signals is a list of signals submitted by the voter. Signals []Signal `protobuf:"bytes,1,rep,name=signals,proto3" json:"signals"` } -func (m *QueryDelegatorSignalsResponse) Reset() { *m = QueryDelegatorSignalsResponse{} } -func (m *QueryDelegatorSignalsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDelegatorSignalsResponse) ProtoMessage() {} -func (*QueryDelegatorSignalsResponse) Descriptor() ([]byte, []int) { +func (m *QueryVoteResponse) Reset() { *m = QueryVoteResponse{} } +func (m *QueryVoteResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVoteResponse) ProtoMessage() {} +func (*QueryVoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor_39690037efa6f66f, []int{7} } -func (m *QueryDelegatorSignalsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryDelegatorSignalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryDelegatorSignalsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryVoteResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -362,19 +362,19 @@ func (m *QueryDelegatorSignalsResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryDelegatorSignalsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDelegatorSignalsResponse.Merge(m, src) +func (m *QueryVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVoteResponse.Merge(m, src) } -func (m *QueryDelegatorSignalsResponse) XXX_Size() int { +func (m *QueryVoteResponse) XXX_Size() int { return m.Size() } -func (m *QueryDelegatorSignalsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDelegatorSignalsResponse.DiscardUnknown(m) +func (m *QueryVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVoteResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryDelegatorSignalsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryVoteResponse proto.InternalMessageInfo -func (m *QueryDelegatorSignalsResponse) GetSignals() []Signal { +func (m *QueryVoteResponse) GetSignals() []Signal { if m != nil { return m.Signals } @@ -1160,8 +1160,8 @@ func init() { proto.RegisterType((*QueryCurrentFeedsResponse)(nil), "band.feeds.v1beta1.QueryCurrentFeedsResponse") proto.RegisterType((*QueryCurrentPricesRequest)(nil), "band.feeds.v1beta1.QueryCurrentPricesRequest") proto.RegisterType((*QueryCurrentPricesResponse)(nil), "band.feeds.v1beta1.QueryCurrentPricesResponse") - proto.RegisterType((*QueryDelegatorSignalsRequest)(nil), "band.feeds.v1beta1.QueryDelegatorSignalsRequest") - proto.RegisterType((*QueryDelegatorSignalsResponse)(nil), "band.feeds.v1beta1.QueryDelegatorSignalsResponse") + proto.RegisterType((*QueryVoteRequest)(nil), "band.feeds.v1beta1.QueryVoteRequest") + proto.RegisterType((*QueryVoteResponse)(nil), "band.feeds.v1beta1.QueryVoteResponse") proto.RegisterType((*QueryIsFeederRequest)(nil), "band.feeds.v1beta1.QueryIsFeederRequest") proto.RegisterType((*QueryIsFeederResponse)(nil), "band.feeds.v1beta1.QueryIsFeederResponse") proto.RegisterType((*QueryParamsRequest)(nil), "band.feeds.v1beta1.QueryParamsRequest") @@ -1183,86 +1183,85 @@ func init() { func init() { proto.RegisterFile("band/feeds/v1beta1/query.proto", fileDescriptor_39690037efa6f66f) } var fileDescriptor_39690037efa6f66f = []byte{ - // 1253 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5f, 0x4f, 0x1c, 0x55, - 0x14, 0x67, 0x50, 0x10, 0x0e, 0x85, 0xc2, 0x2d, 0xa4, 0x30, 0xc0, 0xb6, 0xdc, 0xb6, 0x14, 0xb0, - 0x3b, 0x03, 0x4b, 0x69, 0x0d, 0xa9, 0x0f, 0xa5, 0xb5, 0x5a, 0x4d, 0x14, 0x17, 0xc5, 0x46, 0x1f, - 0x36, 0xc3, 0xec, 0x65, 0x18, 0x33, 0xcc, 0x6c, 0x67, 0x66, 0xb1, 0x0d, 0xe1, 0x41, 0x1f, 0x7c, - 0xd2, 0xc4, 0xc6, 0x6f, 0xa0, 0x89, 0x1f, 0xc0, 0xd4, 0x7e, 0x86, 0x3e, 0x36, 0xf5, 0xc5, 0x27, - 0x63, 0xc0, 0x2f, 0xe1, 0x9b, 0x99, 0x7b, 0xcf, 0x5d, 0x76, 0x66, 0xef, 0xb0, 0x4b, 0x6c, 0x7c, - 0x63, 0xee, 0xf9, 0xf7, 0x3b, 0xe7, 0x9e, 0x73, 0xee, 0x8f, 0x85, 0xc2, 0x96, 0xe5, 0x57, 0xcd, - 0x6d, 0xc6, 0xaa, 0x91, 0xb9, 0xb7, 0xb4, 0xc5, 0x62, 0x6b, 0xc9, 0x7c, 0x58, 0x67, 0xe1, 0x63, - 0xa3, 0x16, 0x06, 0x71, 0x40, 0x48, 0x22, 0x37, 0xb8, 0xdc, 0x40, 0xb9, 0x3e, 0xea, 0x04, 0x4e, - 0xc0, 0x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2b, 0x2c, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xd2, 0x21, 0xb0, - 0x64, 0x58, 0x11, 0x00, 0x00, + // 1240 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0x5f, 0x4f, 0x1c, 0x55, + 0x14, 0xc0, 0x99, 0x5a, 0x10, 0x0e, 0x85, 0xc2, 0x2d, 0xa4, 0x30, 0xc0, 0xb6, 0x0c, 0x94, 0x02, + 0x76, 0x67, 0x60, 0x69, 0xab, 0x21, 0x7d, 0xe9, 0xd6, 0x54, 0xab, 0x89, 0xc5, 0x45, 0xb1, 0xf1, + 0x65, 0x33, 0xec, 0x5e, 0x86, 0x31, 0xcb, 0xcc, 0x76, 0x66, 0x76, 0x6d, 0xb3, 0xe1, 0x41, 0x1f, + 0x7c, 0xd2, 0xc4, 0xc6, 0x6f, 0xa0, 0x89, 0x1f, 0xc0, 0x54, 0x1f, 0xfc, 0x04, 0x7d, 0x6c, 0xea, + 0x8b, 0x4f, 0xc6, 0x80, 0x1f, 0xc4, 0xcc, 0xb9, 0x67, 0x96, 0x9d, 0xd9, 0x3b, 0xcc, 0x12, 0x1b, + 0xdf, 0xd8, 0x39, 0xff, 0x7e, 0xe7, 0xdc, 0x73, 0xcf, 0x3d, 0x40, 0x6e, 0xd7, 0x74, 0xaa, 0xc6, + 0x1e, 0xe7, 0x55, 0xdf, 0x68, 0xae, 0xef, 0xf2, 0xc0, 0x5c, 0x37, 0x1e, 0x37, 0xb8, 0xf7, 0x54, + 0xaf, 0x7b, 0x6e, 0xe0, 0x32, 0x16, 0xca, 0x75, 0x94, 0xeb, 0x24, 0x57, 0x27, 0x2c, 0xd7, 0x72, + 0x51, 0x6c, 0x84, 0x7f, 0x09, 0x4d, 0x75, 0xd6, 0x72, 0x5d, 0xab, 0xc6, 0x0d, 0xb3, 0x6e, 0x1b, + 0xa6, 0xe3, 0xb8, 0x81, 0x19, 0xd8, 0xae, 0xe3, 0x93, 0x74, 0xba, 0xe2, 0xfa, 0x07, 0xae, 0x5f, + 0x16, 0x66, 0xe2, 0x07, 0x89, 0x56, 0xc5, 0x2f, 0x63, 0xd7, 0xf4, 0xb9, 0x88, 0xdd, 0x26, 0xa9, + 0x9b, 0x96, 0xed, 0xa0, 0x1f, 0xd2, 0x95, 0xe1, 0x0a, 0x38, 0x21, 0xbf, 0x22, 0x91, 0xd7, 0x4d, + 0xcf, 0x3c, 0x20, 0x05, 0x2d, 0x07, 0xb3, 0x1f, 0x87, 0x21, 0xee, 0xd6, 0x6a, 0xf7, 0x1a, 0x9e, + 0xc7, 0x9d, 0x60, 0xcb, 0xb3, 0x2b, 0xdc, 0x2f, 0xf1, 0xc7, 0x0d, 0xee, 0x07, 0xda, 0x23, 0x98, + 0x4b, 0x91, 0xfb, 0x75, 0xd7, 0xf1, 0x39, 0x7b, 0x1b, 0x06, 0xea, 0xf8, 0x65, 0x4a, 0xb9, 0xfa, + 0xc6, 0xf2, 0x70, 0x61, 0x5a, 0xef, 0xae, 0x90, 0x8e, 0x36, 0xc5, 0xf3, 0x2f, 0xfe, 0xba, 0xd2, + 0x57, 0x22, 0x75, 0x4d, 0x85, 0x29, 0xf4, 0x4c, 0x6e, 0xef, 0x87, 0x06, 0x51, 0xd4, 0x06, 0x4c, + 0x4b, 0x64, 0x14, 0xf1, 0x11, 0x8c, 0x54, 0xc4, 0xf7, 0x32, 0x46, 0x99, 0x52, 0xae, 0x2a, 0xcb, + 0xc3, 0x85, 0xbc, 0x2c, 0x70, 0x87, 0x83, 0xcf, 0xec, 0x60, 0xff, 0x5d, 0xde, 0xb4, 0xc5, 0x31, + 0x10, 0xcc, 0x85, 0x4a, 0x47, 0x04, 0x6d, 0x33, 0x1e, 0x36, 0x56, 0x09, 0x36, 0x07, 0xe0, 0xdb, + 0x96, 0x63, 0xd6, 0xca, 0x76, 0x55, 0x24, 0x3b, 0x54, 0x1a, 0x12, 0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x08, 0xb5, 0x70, 0x16, 0x13, 0x82, 0x5d, 0x45, 0xd8, + 0x45, 0xa6, 0x25, 0x60, 0xc5, 0x91, 0xe6, 0x71, 0x0d, 0xc8, 0x8b, 0x35, 0x20, 0xbc, 0x7f, 0xa3, + 0xf1, 0x67, 0x91, 0xa5, 0x0f, 0x1c, 0xe9, 0x6b, 0xad, 0x1a, 0x3d, 0xeb, 0x13, 0xdf, 0x1a, 0xf2, + 0xad, 0xb2, 0xe5, 0xe4, 0x60, 0x08, 0x35, 0x65, 0x17, 0x92, 0xfd, 0xa2, 0xc0, 0xc5, 0xc4, 0xc3, + 0xc7, 0x32, 0xc2, 0x76, 0x3d, 0xd8, 0xea, 0x5a, 0xef, 0x06, 0x04, 0x7a, 0x07, 0x41, 0x6f, 0xb3, + 0x9b, 0x32, 0xd0, 0x50, 0xdf, 0x97, 0x8e, 0x0f, 0xd1, 0xbc, 0xc5, 0xf7, 0x5f, 0x1c, 0xe5, 0x94, + 0x97, 0x47, 0x39, 0xe5, 0xef, 0xa3, 0x9c, 0xf2, 0xfd, 0x71, 0xae, 0xef, 0xe5, 0x71, 0xae, 0xef, + 0xcf, 0xe3, 0x5c, 0xdf, 0xe7, 0xba, 0x65, 0x07, 0xfb, 0x8d, 0x5d, 0xbd, 0xe2, 0x1e, 0x18, 0x21, + 0x13, 0xfe, 0x5f, 0x5f, 0x71, 0x6b, 0x46, 0x65, 0xdf, 0xb4, 0x1d, 0xa3, 0xb9, 0x61, 0x3c, 0xa1, + 0x88, 0xc1, 0xd3, 0x3a, 0xf7, 0x77, 0x07, 0x50, 0x61, 0xe3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x47, 0x11, 0xd9, 0x8a, 0xea, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1283,8 +1282,8 @@ type QueryClient interface { CurrentFeeds(ctx context.Context, in *QueryCurrentFeedsRequest, opts ...grpc.CallOption) (*QueryCurrentFeedsResponse, error) // CurrentPrices is an RPC method that returns a list of current prices. CurrentPrices(ctx context.Context, in *QueryCurrentPricesRequest, opts ...grpc.CallOption) (*QueryCurrentPricesResponse, error) - // DelegatorSignals is an RPC method that returns signals of a delegator. - DelegatorSignals(ctx context.Context, in *QueryDelegatorSignalsRequest, opts ...grpc.CallOption) (*QueryDelegatorSignalsResponse, error) + // Vote is an RPC method that returns signals of a voter. + Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) // IsFeeder is an RPC method that returns whether an account is a feeder for a specified validator. IsFeeder(ctx context.Context, in *QueryIsFeederRequest, opts ...grpc.CallOption) (*QueryIsFeederResponse, error) // Params is an RPC method that returns all parameters of the module. @@ -1339,9 +1338,9 @@ func (c *queryClient) CurrentPrices(ctx context.Context, in *QueryCurrentPricesR return out, nil } -func (c *queryClient) DelegatorSignals(ctx context.Context, in *QueryDelegatorSignalsRequest, opts ...grpc.CallOption) (*QueryDelegatorSignalsResponse, error) { - out := new(QueryDelegatorSignalsResponse) - err := c.cc.Invoke(ctx, "/band.feeds.v1beta1.Query/DelegatorSignals", in, out, opts...) +func (c *queryClient) Vote(ctx context.Context, in *QueryVoteRequest, opts ...grpc.CallOption) (*QueryVoteResponse, error) { + out := new(QueryVoteResponse) + err := c.cc.Invoke(ctx, "/band.feeds.v1beta1.Query/Vote", in, out, opts...) if err != nil { return nil, err } @@ -1428,8 +1427,8 @@ type QueryServer interface { CurrentFeeds(context.Context, *QueryCurrentFeedsRequest) (*QueryCurrentFeedsResponse, error) // CurrentPrices is an RPC method that returns a list of current prices. CurrentPrices(context.Context, *QueryCurrentPricesRequest) (*QueryCurrentPricesResponse, error) - // DelegatorSignals is an RPC method that returns signals of a delegator. - DelegatorSignals(context.Context, *QueryDelegatorSignalsRequest) (*QueryDelegatorSignalsResponse, error) + // Vote is an RPC method that returns signals of a voter. + Vote(context.Context, *QueryVoteRequest) (*QueryVoteResponse, error) // IsFeeder is an RPC method that returns whether an account is a feeder for a specified validator. IsFeeder(context.Context, *QueryIsFeederRequest) (*QueryIsFeederResponse, error) // Params is an RPC method that returns all parameters of the module. @@ -1462,8 +1461,8 @@ func (*UnimplementedQueryServer) CurrentFeeds(ctx context.Context, req *QueryCur func (*UnimplementedQueryServer) CurrentPrices(ctx context.Context, req *QueryCurrentPricesRequest) (*QueryCurrentPricesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CurrentPrices not implemented") } -func (*UnimplementedQueryServer) DelegatorSignals(ctx context.Context, req *QueryDelegatorSignalsRequest) (*QueryDelegatorSignalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelegatorSignals not implemented") +func (*UnimplementedQueryServer) Vote(ctx context.Context, req *QueryVoteRequest) (*QueryVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") } func (*UnimplementedQueryServer) IsFeeder(ctx context.Context, req *QueryIsFeederRequest) (*QueryIsFeederResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IsFeeder not implemented") @@ -1548,20 +1547,20 @@ func _Query_CurrentPrices_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_DelegatorSignals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDelegatorSignalsRequest) +func _Query_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryVoteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).DelegatorSignals(ctx, in) + return srv.(QueryServer).Vote(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/band.feeds.v1beta1.Query/DelegatorSignals", + FullMethod: "/band.feeds.v1beta1.Query/Vote", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DelegatorSignals(ctx, req.(*QueryDelegatorSignalsRequest)) + return srv.(QueryServer).Vote(ctx, req.(*QueryVoteRequest)) } return interceptor(ctx, in, info, handler) } @@ -1727,8 +1726,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_CurrentPrices_Handler, }, { - MethodName: "DelegatorSignals", - Handler: _Query_DelegatorSignals_Handler, + MethodName: "Vote", + Handler: _Query_Vote_Handler, }, { MethodName: "IsFeeder", @@ -1952,7 +1951,7 @@ func (m *QueryCurrentPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryDelegatorSignalsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryVoteRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1962,27 +1961,27 @@ func (m *QueryDelegatorSignalsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryDelegatorSignalsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryVoteRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDelegatorSignalsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DelegatorAddress))) + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Voter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryDelegatorSignalsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryVoteResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1992,12 +1991,12 @@ func (m *QueryDelegatorSignalsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryDelegatorSignalsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryVoteResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDelegatorSignalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2674,20 +2673,20 @@ func (m *QueryCurrentPricesResponse) Size() (n int) { return n } -func (m *QueryDelegatorSignalsRequest) Size() (n int) { +func (m *QueryVoteRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.DelegatorAddress) + l = len(m.Voter) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryDelegatorSignalsResponse) Size() (n int) { +func (m *QueryVoteResponse) Size() (n int) { if m == nil { return 0 } @@ -3369,7 +3368,7 @@ func (m *QueryCurrentPricesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorSignalsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryVoteRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3392,15 +3391,15 @@ func (m *QueryDelegatorSignalsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorSignalsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryVoteRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorSignalsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3428,7 +3427,7 @@ func (m *QueryDelegatorSignalsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) + m.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3451,7 +3450,7 @@ func (m *QueryDelegatorSignalsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDelegatorSignalsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryVoteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3474,10 +3473,10 @@ func (m *QueryDelegatorSignalsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDelegatorSignalsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryVoteResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDelegatorSignalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/feeds/types/query.pb.gw.go b/x/feeds/types/query.pb.gw.go index c46c1910d..c3817a705 100644 --- a/x/feeds/types/query.pb.gw.go +++ b/x/feeds/types/query.pb.gw.go @@ -123,8 +123,8 @@ func local_request_Query_CurrentPrices_0(ctx context.Context, marshaler runtime. } -func request_Query_DelegatorSignals_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryDelegatorSignalsRequest +func request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVoteRequest var metadata runtime.ServerMetadata var ( @@ -134,24 +134,24 @@ func request_Query_DelegatorSignals_0(ctx context.Context, marshaler runtime.Mar _ = err ) - val, ok = pathParams["delegator_address"] + val, ok = pathParams["voter"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "voter") } - protoReq.DelegatorAddress, err = runtime.String(val) + protoReq.Voter, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) } - msg, err := client.DelegatorSignals(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Vote(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_DelegatorSignals_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryDelegatorSignalsRequest +func local_request_Query_Vote_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryVoteRequest var metadata runtime.ServerMetadata var ( @@ -161,18 +161,18 @@ func local_request_Query_DelegatorSignals_0(ctx context.Context, marshaler runti _ = err ) - val, ok = pathParams["delegator_address"] + val, ok = pathParams["voter"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "delegator_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "voter") } - protoReq.DelegatorAddress, err = runtime.String(val) + protoReq.Voter, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "delegator_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "voter", err) } - msg, err := server.DelegatorSignals(ctx, &protoReq) + msg, err := server.Vote(ctx, &protoReq) return msg, metadata, err } @@ -616,7 +616,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_DelegatorSignals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Vote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -627,7 +627,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_DelegatorSignals_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Vote_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -635,7 +635,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_DelegatorSignals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Vote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -924,7 +924,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_DelegatorSignals_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Vote_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -933,14 +933,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_DelegatorSignals_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Vote_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_DelegatorSignals_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Vote_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1114,7 +1114,7 @@ var ( pattern_Query_CurrentPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"feeds", "v1beta1", "current-prices", "signal_ids"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DelegatorSignals_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "delegators", "delegator_address", "signals"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Vote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"feeds", "v1beta1", "vote", "voter"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_IsFeeder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"feeds", "v1beta1", "feeder", "validator_address", "feeder_address"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1140,7 +1140,7 @@ var ( forward_Query_CurrentPrices_0 = runtime.ForwardResponseMessage - forward_Query_DelegatorSignals_0 = runtime.ForwardResponseMessage + forward_Query_Vote_0 = runtime.ForwardResponseMessage forward_Query_IsFeeder_0 = runtime.ForwardResponseMessage diff --git a/x/feeds/types/tx.pb.go b/x/feeds/types/tx.pb.go index 8903f8e92..ef892fa76 100644 --- a/x/feeds/types/tx.pb.go +++ b/x/feeds/types/tx.pb.go @@ -31,26 +31,26 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgSubmitSignals is the transaction message to submit signals. -type MsgSubmitSignals struct { - // delegator is the address of the delegator that wants to submit signals. - Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty"` +// MsgVoteSignals is the transaction message to vote signals. +type MsgVoteSignals struct { + // voter is the address of the voter that wants to vote signals. + Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` // signals is a list of submitted signals. Signals []Signal `protobuf:"bytes,2,rep,name=signals,proto3" json:"signals"` } -func (m *MsgSubmitSignals) Reset() { *m = MsgSubmitSignals{} } -func (m *MsgSubmitSignals) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitSignals) ProtoMessage() {} -func (*MsgSubmitSignals) Descriptor() ([]byte, []int) { +func (m *MsgVoteSignals) Reset() { *m = MsgVoteSignals{} } +func (m *MsgVoteSignals) String() string { return proto.CompactTextString(m) } +func (*MsgVoteSignals) ProtoMessage() {} +func (*MsgVoteSignals) Descriptor() ([]byte, []int) { return fileDescriptor_e1bc41512ee10d84, []int{0} } -func (m *MsgSubmitSignals) XXX_Unmarshal(b []byte) error { +func (m *MsgVoteSignals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSubmitSignals) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgVoteSignals) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSubmitSignals.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgVoteSignals.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -60,48 +60,48 @@ func (m *MsgSubmitSignals) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgSubmitSignals) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitSignals.Merge(m, src) +func (m *MsgVoteSignals) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteSignals.Merge(m, src) } -func (m *MsgSubmitSignals) XXX_Size() int { +func (m *MsgVoteSignals) XXX_Size() int { return m.Size() } -func (m *MsgSubmitSignals) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitSignals.DiscardUnknown(m) +func (m *MsgVoteSignals) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteSignals.DiscardUnknown(m) } -var xxx_messageInfo_MsgSubmitSignals proto.InternalMessageInfo +var xxx_messageInfo_MsgVoteSignals proto.InternalMessageInfo -func (m *MsgSubmitSignals) GetDelegator() string { +func (m *MsgVoteSignals) GetVoter() string { if m != nil { - return m.Delegator + return m.Voter } return "" } -func (m *MsgSubmitSignals) GetSignals() []Signal { +func (m *MsgVoteSignals) GetSignals() []Signal { if m != nil { return m.Signals } return nil } -// MsgSubmitSignalsResponse is the response type for the Msg/SubmitSignals RPC method. -type MsgSubmitSignalsResponse struct { +// MsgVoteSignalsResponse is the response type for the Msg/VoteSignals RPC method. +type MsgVoteSignalsResponse struct { } -func (m *MsgSubmitSignalsResponse) Reset() { *m = MsgSubmitSignalsResponse{} } -func (m *MsgSubmitSignalsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitSignalsResponse) ProtoMessage() {} -func (*MsgSubmitSignalsResponse) Descriptor() ([]byte, []int) { +func (m *MsgVoteSignalsResponse) Reset() { *m = MsgVoteSignalsResponse{} } +func (m *MsgVoteSignalsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteSignalsResponse) ProtoMessage() {} +func (*MsgVoteSignalsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e1bc41512ee10d84, []int{1} } -func (m *MsgSubmitSignalsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgVoteSignalsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSubmitSignalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgVoteSignalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSubmitSignalsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgVoteSignalsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -111,17 +111,17 @@ func (m *MsgSubmitSignalsResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgSubmitSignalsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitSignalsResponse.Merge(m, src) +func (m *MsgVoteSignalsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteSignalsResponse.Merge(m, src) } -func (m *MsgSubmitSignalsResponse) XXX_Size() int { +func (m *MsgVoteSignalsResponse) XXX_Size() int { return m.Size() } -func (m *MsgSubmitSignalsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitSignalsResponse.DiscardUnknown(m) +func (m *MsgVoteSignalsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteSignalsResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgSubmitSignalsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgVoteSignalsResponse proto.InternalMessageInfo // MsgSubmitSignalPrices is the transaction message to submit multiple signal prices. type MsgSubmitSignalPrices struct { @@ -411,8 +411,8 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgSubmitSignals)(nil), "band.feeds.v1beta1.MsgSubmitSignals") - proto.RegisterType((*MsgSubmitSignalsResponse)(nil), "band.feeds.v1beta1.MsgSubmitSignalsResponse") + proto.RegisterType((*MsgVoteSignals)(nil), "band.feeds.v1beta1.MsgVoteSignals") + proto.RegisterType((*MsgVoteSignalsResponse)(nil), "band.feeds.v1beta1.MsgVoteSignalsResponse") proto.RegisterType((*MsgSubmitSignalPrices)(nil), "band.feeds.v1beta1.MsgSubmitSignalPrices") proto.RegisterType((*MsgSubmitSignalPricesResponse)(nil), "band.feeds.v1beta1.MsgSubmitSignalPricesResponse") proto.RegisterType((*MsgUpdateReferenceSourceConfig)(nil), "band.feeds.v1beta1.MsgUpdateReferenceSourceConfig") @@ -424,49 +424,50 @@ func init() { func init() { proto.RegisterFile("band/feeds/v1beta1/tx.proto", fileDescriptor_e1bc41512ee10d84) } var fileDescriptor_e1bc41512ee10d84 = []byte{ - // 664 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x41, 0x4f, 0x13, 0x41, - 0x18, 0xed, 0x52, 0xc1, 0x74, 0xd0, 0xa8, 0x13, 0x90, 0xb2, 0xc8, 0x16, 0x2b, 0x31, 0x05, 0x65, - 0x37, 0x2d, 0x89, 0x31, 0x9b, 0x18, 0x23, 0x5e, 0xbc, 0x90, 0x90, 0x36, 0x7a, 0xf0, 0x82, 0xd3, - 0xdd, 0x61, 0x98, 0xa4, 0xbb, 0xb3, 0x99, 0x99, 0x36, 0x70, 0x33, 0x1e, 0x4d, 0x4c, 0xfc, 0x23, - 0x26, 0x98, 0xf0, 0x23, 0x38, 0x12, 0x2e, 0x7a, 0x32, 0x06, 0x62, 0xb8, 0xf9, 0x1b, 0xcc, 0xce, - 0xec, 0x6e, 0x65, 0x5d, 0x4a, 0xbd, 0x40, 0x67, 0xde, 0xfb, 0xde, 0x9b, 0xf7, 0xcd, 0x7c, 0x2d, - 0x58, 0xe8, 0xa2, 0xd0, 0x77, 0x76, 0x30, 0xf6, 0x85, 0x33, 0x68, 0x76, 0xb1, 0x44, 0x4d, 0x47, - 0xee, 0xd9, 0x11, 0x67, 0x92, 0x41, 0x18, 0x83, 0xb6, 0x02, 0xed, 0x04, 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3, 0x6a, 0xe5, 0x36, 0xd4, 0x8d, 0x67, - 0x4a, 0x71, 0xd0, 0xd9, 0x5c, 0x50, 0x5d, 0x57, 0x9f, 0x07, 0x73, 0xb9, 0xad, 0x34, 0x4a, 0xeb, - 0x5b, 0x19, 0x94, 0x37, 0x05, 0x81, 0x1e, 0xb8, 0x79, 0x71, 0x84, 0x97, 0x8b, 0xce, 0x91, 0x9f, - 0x1a, 0xf3, 0xf1, 0x38, 0xac, 0xd4, 0x0c, 0x72, 0x00, 0x0b, 0xe6, 0x6a, 0x65, 0x0c, 0x0d, 0x4d, - 0x35, 0x9b, 0x63, 0x53, 0x33, 0xcf, 0x4f, 0x06, 0x58, 0x18, 0xf5, 0x86, 0x5b, 0x97, 0x48, 0x8e, - 0xa8, 0x31, 0xdd, 0xff, 0xaf, 0xc9, 0xce, 0xf3, 0x0e, 0xdc, 0xb8, 0xf0, 0x6e, 0x1e, 0x8c, 0xd4, - 0xd2, 0x24, 0xf3, 0xd1, 0x18, 0xa4, 0xd4, 0xc1, 0x9c, 0x7c, 0x7f, 0x7e, 0xb0, 0x6a, 0x6c, 0xbc, - 0x3a, 0x3a, 0xb5, 0x8c, 0xe3, 0x53, 0xcb, 0xf8, 0x79, 0x6a, 0x19, 0x9f, 0xcf, 0xac, 0xd2, 0xf1, - 0x99, 0x55, 0xfa, 0x7e, 0x66, 0x95, 0xde, 0xda, 0x84, 0xca, 0xdd, 0x7e, 0xd7, 0xf6, 0x58, 0xe0, - 0xc4, 0xba, 0xea, 0x8b, 0xdc, 0x63, 0x3d, 0xc7, 0xdb, 0x45, 0x34, 0x74, 0x06, 0xeb, 0xce, 0x5e, - 0xf2, 0xc3, 0x21, 0xf7, 0x23, 0x2c, 0xba, 0x53, 0x8a, 0xb0, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, - 0x24, 0x26, 0x8b, 0xc0, 0xba, 0x06, 0x00, 0x00, + // 673 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x41, 0x6b, 0x13, 0x4d, + 0x18, 0xce, 0x36, 0x5f, 0xfb, 0x91, 0xa9, 0x28, 0x0e, 0xad, 0x4d, 0xb7, 0x76, 0x53, 0xb7, 0x22, + 0x69, 0xa4, 0xbb, 0x24, 0x05, 0x91, 0x05, 0x11, 0xeb, 0xc5, 0x4b, 0xa0, 0x24, 0xd8, 0x83, 0x20, + 0x75, 0xb2, 0x3b, 0x9d, 0x0e, 0x74, 0x77, 0x96, 0x99, 0x49, 0x68, 0x6f, 0xe2, 0x51, 0x10, 0xfc, + 0x0b, 0xfe, 0x00, 0xa1, 0x87, 0xfe, 0x88, 0x1e, 0x6b, 0x4f, 0x9e, 0x44, 0x5a, 0xa4, 0x37, 0x7f, + 0x83, 0xec, 0xcc, 0xee, 0xc6, 0xb4, 0xdb, 0xb4, 0x5e, 0x92, 0x9d, 0x79, 0x9e, 0xf7, 0x79, 0xe7, + 0x79, 0xe7, 0x7d, 0x77, 0xc1, 0x42, 0x0f, 0x45, 0x81, 0xbb, 0x8d, 0x71, 0x20, 0xdc, 0x41, 0xb3, + 0x87, 0x25, 0x6a, 0xba, 0x72, 0xcf, 0x89, 0x39, 0x93, 0x0c, 0xc2, 0x04, 0x74, 0x14, 0xe8, 0xa4, + 0xa0, 0x39, 0x43, 0x18, 0x61, 0x0a, 0x76, 0x93, 0x27, 0xcd, 0x34, 0xad, 0x02, 0x19, 0x1d, 0xa7, + 0xf1, 0x5a, 0x01, 0x1e, 0x23, 0x8e, 0xc2, 0x8c, 0x30, 0xef, 0x33, 0x11, 0x32, 0xb1, 0xa5, 0x95, + 0xf5, 0x22, 0x85, 0xe6, 0xf4, 0xca, 0x0d, 0x05, 0x71, 0x07, 0xcd, 0xe4, 0x2f, 0x05, 0xee, 0xa2, + 0x90, 0x46, 0xcc, 0x55, 0xbf, 0x7a, 0xcb, 0xfe, 0x62, 0x80, 0xdb, 0x6d, 0x41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, 0x66, 0xf3, 0xc6, 0xd4, 0x3c, 0xe7, 0x27, + 0x03, 0x2c, 0x8c, 0xeb, 0xde, 0xd6, 0x15, 0x92, 0x63, 0x62, 0x4c, 0xef, 0xdf, 0x63, 0xf2, 0xf3, + 0xbc, 0x03, 0xb7, 0x46, 0x3a, 0x66, 0x79, 0xac, 0x96, 0x26, 0x99, 0x8f, 0x6f, 0x40, 0xca, 0x32, + 0x98, 0x93, 0xef, 0xcf, 0x0f, 0x1a, 0xc6, 0xfa, 0xab, 0xa3, 0x53, 0xcb, 0x38, 0x3e, 0xb5, 0x8c, + 0x9f, 0xa7, 0x96, 0xf1, 0xf9, 0xcc, 0x2a, 0x1d, 0x9f, 0x59, 0xa5, 0xef, 0x67, 0x56, 0xe9, 0x8d, + 0x43, 0xa8, 0xdc, 0xe9, 0xf7, 0x1c, 0x9f, 0x85, 0x6e, 0xa2, 0xab, 0x5e, 0xd8, 0x3e, 0xdb, 0x75, + 0xfd, 0x1d, 0x44, 0x23, 0x77, 0xb0, 0xe6, 0xee, 0xa5, 0x1f, 0x08, 0xb9, 0x1f, 0x63, 0xd1, 0x9b, + 0x52, 0x84, 0xb5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xdc, 0x4b, 0x75, 0xa2, 0x06, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -481,8 +482,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - // SubmitSignals is an RPC method to submit signal ids and their powers. - SubmitSignals(ctx context.Context, in *MsgSubmitSignals, opts ...grpc.CallOption) (*MsgSubmitSignalsResponse, error) + // VoteSignals is an RPC method to vote signal ids and their powers. + VoteSignals(ctx context.Context, in *MsgVoteSignals, opts ...grpc.CallOption) (*MsgVoteSignalsResponse, error) // SubmitSignalPrices is an RPC method to submit signal prices. SubmitSignalPrices(ctx context.Context, in *MsgSubmitSignalPrices, opts ...grpc.CallOption) (*MsgSubmitSignalPricesResponse, error) // UpdateReferenceSourceConfig is an RPC method to update reference price source configuration. @@ -499,9 +500,9 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) SubmitSignals(ctx context.Context, in *MsgSubmitSignals, opts ...grpc.CallOption) (*MsgSubmitSignalsResponse, error) { - out := new(MsgSubmitSignalsResponse) - err := c.cc.Invoke(ctx, "/band.feeds.v1beta1.Msg/SubmitSignals", in, out, opts...) +func (c *msgClient) VoteSignals(ctx context.Context, in *MsgVoteSignals, opts ...grpc.CallOption) (*MsgVoteSignalsResponse, error) { + out := new(MsgVoteSignalsResponse) + err := c.cc.Invoke(ctx, "/band.feeds.v1beta1.Msg/VoteSignals", in, out, opts...) if err != nil { return nil, err } @@ -537,8 +538,8 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // MsgServer is the server API for Msg service. type MsgServer interface { - // SubmitSignals is an RPC method to submit signal ids and their powers. - SubmitSignals(context.Context, *MsgSubmitSignals) (*MsgSubmitSignalsResponse, error) + // VoteSignals is an RPC method to vote signal ids and their powers. + VoteSignals(context.Context, *MsgVoteSignals) (*MsgVoteSignalsResponse, error) // SubmitSignalPrices is an RPC method to submit signal prices. SubmitSignalPrices(context.Context, *MsgSubmitSignalPrices) (*MsgSubmitSignalPricesResponse, error) // UpdateReferenceSourceConfig is an RPC method to update reference price source configuration. @@ -551,8 +552,8 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) SubmitSignals(ctx context.Context, req *MsgSubmitSignals) (*MsgSubmitSignalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitSignals not implemented") +func (*UnimplementedMsgServer) VoteSignals(ctx context.Context, req *MsgVoteSignals) (*MsgVoteSignalsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteSignals not implemented") } func (*UnimplementedMsgServer) SubmitSignalPrices(ctx context.Context, req *MsgSubmitSignalPrices) (*MsgSubmitSignalPricesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitSignalPrices not implemented") @@ -568,20 +569,20 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_SubmitSignals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitSignals) +func _Msg_VoteSignals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteSignals) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SubmitSignals(ctx, in) + return srv.(MsgServer).VoteSignals(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/band.feeds.v1beta1.Msg/SubmitSignals", + FullMethod: "/band.feeds.v1beta1.Msg/VoteSignals", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitSignals(ctx, req.(*MsgSubmitSignals)) + return srv.(MsgServer).VoteSignals(ctx, req.(*MsgVoteSignals)) } return interceptor(ctx, in, info, handler) } @@ -645,8 +646,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "SubmitSignals", - Handler: _Msg_SubmitSignals_Handler, + MethodName: "VoteSignals", + Handler: _Msg_VoteSignals_Handler, }, { MethodName: "SubmitSignalPrices", @@ -665,7 +666,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "band/feeds/v1beta1/tx.proto", } -func (m *MsgSubmitSignals) Marshal() (dAtA []byte, err error) { +func (m *MsgVoteSignals) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -675,12 +676,12 @@ func (m *MsgSubmitSignals) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSubmitSignals) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgVoteSignals) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSubmitSignals) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgVoteSignals) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -699,17 +700,17 @@ func (m *MsgSubmitSignals) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if len(m.Delegator) > 0 { - i -= len(m.Delegator) - copy(dAtA[i:], m.Delegator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Delegator))) + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintTx(dAtA, i, uint64(len(m.Voter))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MsgSubmitSignalsResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgVoteSignalsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -719,12 +720,12 @@ func (m *MsgSubmitSignalsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSubmitSignalsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgVoteSignalsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSubmitSignalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgVoteSignalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -941,13 +942,13 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgSubmitSignals) Size() (n int) { +func (m *MsgVoteSignals) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Delegator) + l = len(m.Voter) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -960,7 +961,7 @@ func (m *MsgSubmitSignals) Size() (n int) { return n } -func (m *MsgSubmitSignalsResponse) Size() (n int) { +func (m *MsgVoteSignalsResponse) Size() (n int) { if m == nil { return 0 } @@ -1054,7 +1055,7 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgSubmitSignals) Unmarshal(dAtA []byte) error { +func (m *MsgVoteSignals) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1077,15 +1078,15 @@ func (m *MsgSubmitSignals) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitSignals: wiretype end group for non-group") + return fmt.Errorf("proto: MsgVoteSignals: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitSignals: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgVoteSignals: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1113,7 +1114,7 @@ func (m *MsgSubmitSignals) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Delegator = string(dAtA[iNdEx:postIndex]) + m.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1170,7 +1171,7 @@ func (m *MsgSubmitSignals) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSubmitSignalsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgVoteSignalsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1193,10 +1194,10 @@ func (m *MsgSubmitSignalsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitSignalsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgVoteSignalsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitSignalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgVoteSignalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/feeds/types/delegator_signals.go b/x/feeds/types/vote.go similarity index 52% rename from x/feeds/types/delegator_signals.go rename to x/feeds/types/vote.go index b23a1de10..d26bd66e3 100644 --- a/x/feeds/types/delegator_signals.go +++ b/x/feeds/types/vote.go @@ -6,24 +6,24 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -// NewDelegatorSignals creates a new DelegatorSignals instance. -func NewDelegatorSignals(delegator string, signals []Signal) DelegatorSignals { - return DelegatorSignals{ - Delegator: delegator, - Signals: signals, +// NewVote creates a new Vote instance. +func NewVote(voter string, signals []Signal) Vote { + return Vote{ + Voter: voter, + Signals: signals, } } -// Validate validates the delegator signals -func (ds *DelegatorSignals) Validate() error { - if _, err := sdk.AccAddressFromBech32(ds.Delegator); err != nil { - return errorsmod.Wrap(err, "invalid delegator address") +// Validate validates the vote +func (v *Vote) Validate() error { + if _, err := sdk.AccAddressFromBech32(v.Voter); err != nil { + return errorsmod.Wrap(err, "invalid voter address") } // Map to track signal IDs for duplicate check signalIDSet := make(map[string]struct{}) - for _, signal := range ds.Signals { + for _, signal := range v.Signals { // Validate signal ID if err := signal.Validate(); err != nil { return err From b5c2aafe7b42180242dd2e7bf334318506fcd461 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 1 Nov 2024 19:30:26 +0700 Subject: [PATCH 209/272] fix --- api/band/feeds/v1beta1/query.pulsar.go | 181 +++++++++++++------------ proto/band/feeds/v1beta1/query.proto | 4 +- x/feeds/autocli.go | 12 +- x/feeds/client/cli/tx.go | 102 +++++++------- x/feeds/keeper/genesis.go | 6 +- x/feeds/keeper/genesis_test.go | 2 +- x/feeds/keeper/grpc_query.go | 2 +- x/feeds/keeper/keeper_signal.go | 12 +- x/feeds/keeper/keeper_signal_test.go | 2 +- x/feeds/keeper/msg_server.go | 4 +- x/feeds/keeper/msg_server_test.go | 4 +- x/feeds/types/query.pb.go | 158 ++++++++++----------- x/feeds/types/query.pb.gw.go | 4 +- 13 files changed, 249 insertions(+), 244 deletions(-) diff --git a/api/band/feeds/v1beta1/query.pulsar.go b/api/band/feeds/v1beta1/query.pulsar.go index 83db8e973..ad39ec60b 100644 --- a/api/band/feeds/v1beta1/query.pulsar.go +++ b/api/band/feeds/v1beta1/query.pulsar.go @@ -12075,7 +12075,7 @@ var file_band_feeds_v1beta1_query_proto_rawDesc = []byte{ 0x32, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x32, 0xba, 0x0e, 0x0a, 0x05, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x32, 0xcc, 0x0e, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa2, 0x01, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, @@ -12106,106 +12106,107 @@ var file_band_feeds_v1beta1_query_proto_rawDesc = []byte{ 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x73, 0x7d, 0x12, 0x78, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x61, + 0x64, 0x73, 0x7d, 0x12, 0x7f, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, - 0x12, 0x1b, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x12, 0xa3, 0x01, - 0x0a, 0x08, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, - 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x2f, 0x7b, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x7d, 0x2f, 0x7b, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x81, 0x01, - 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, + 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x2f, + 0x76, 0x6f, 0x74, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x08, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, + 0x72, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, + 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, + 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, + 0x65, 0x65, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x66, 0x65, 0x65, 0x64, 0x65, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, + 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, - 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x15, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0xa6, 0x01, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x62, 0x61, 0x6e, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2d, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xa6, 0x01, 0x0a, 0x11, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, + 0x73, 0x12, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, + 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2d, 0x70, 0x6f, + 0x77, 0x65, 0x72, 0x73, 0x12, 0xae, 0x01, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, + 0x12, 0x33, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0xb2, 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, - 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, - 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x2d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2d, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0xa3, 0x01, - 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x2f, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x36, 0x12, 0x34, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x7d, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, 0x02, 0x12, - 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, - 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x3a, - 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x73, 0x7d, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, + 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, + 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, + 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, + 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, + 0x64, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/band/feeds/v1beta1/query.proto b/proto/band/feeds/v1beta1/query.proto index a7312a100..e42114cde 100644 --- a/proto/band/feeds/v1beta1/query.proto +++ b/proto/band/feeds/v1beta1/query.proto @@ -29,7 +29,7 @@ service Query { // Vote is an RPC method that returns signals of a voter. rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/feeds/v1beta1/vote/{voter}"; + option (google.api.http).get = "/feeds/v1beta1/voters/{voter}/vote"; } // IsFeeder is an RPC method that returns whether an account is a feeder for a specified validator. @@ -65,7 +65,7 @@ service Query { // ValidValidator is an RPC method that returns a flag to show if the validator is required to send prices. rpc ValidValidator(QueryValidValidatorRequest) returns (QueryValidValidatorResponse) { - option (google.api.http).get = "/feeds/v1beta1/valid/{validator_address}"; + option (google.api.http).get = "/feeds/v1beta1/validators/{validator_address}/valid"; } // ValidatorPrices is an RPC method that returns prices of a validator. diff --git a/x/feeds/autocli.go b/x/feeds/autocli.go index c56466585..e35bfbb08 100644 --- a/x/feeds/autocli.go +++ b/x/feeds/autocli.go @@ -28,12 +28,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Get current prices for the provided signal IDs", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "signal_ids"}}, }, - { - RpcMethod: "Vote", - Use: "vote [voter]", - Short: "Get signals submitted by a voter", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "voter"}}, - }, { RpcMethod: "IsFeeder", Use: "is-feeder [validator-address] [feeder-address]", @@ -81,6 +75,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Get prices submitted by a validator", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}}, }, + { + RpcMethod: "Vote", + Use: "vote [voter]", + Short: "Get signals submitted by a voter", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "voter"}}, + }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ diff --git a/x/feeds/client/cli/tx.go b/x/feeds/client/cli/tx.go index e3fac7d62..7ad56247c 100644 --- a/x/feeds/client/cli/tx.go +++ b/x/feeds/client/cli/tx.go @@ -43,63 +43,13 @@ func GetTxCmd() *cobra.Command { txCmd.AddCommand( GetTxCmdAddFeeders(), GetTxCmdRemoveFeeders(), - GetTxCmdVoteSignals(), GetTxCmdUpdateReferenceSourceConfig(), + GetTxCmdVoteSignals(), ) return txCmd } -// GetTxCmdVoteSignals creates a CLI command for voting signals -func GetTxCmdVoteSignals() *cobra.Command { - cmd := &cobra.Command{ - Use: "vote [signal_id1],[power1] [signal_id2],[power2] ...", - Short: "Vote signal ids and their powers", - Args: cobra.MinimumNArgs(0), - Long: strings.TrimSpace( - fmt.Sprintf( - `Vote signal ids and their power. -Example: -$ %s tx feeds vote BTC,1000000 --from mykey -`, - version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - voter := clientCtx.GetFromAddress() - var signals []types.Signal - for i, arg := range args { - idAndPower := strings.SplitN(arg, ",", 2) - if len(idAndPower) != 2 { - return fmt.Errorf("argument %d is not valid", i) - } - power, err := strconv.ParseInt(idAndPower[1], 0, 64) - if err != nil { - return err - } - signals = append( - signals, types.NewSignal( - idAndPower[0], - power, - ), - ) - } - - msg := types.NewMsgVoteSignals(voter.String(), signals) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - // GetTxCmdAddFeeders creates a CLI command for adding new feeders func GetTxCmdAddFeeders() *cobra.Command { cmd := &cobra.Command{ @@ -186,6 +136,56 @@ $ %s tx feeds update-reference-source-config 1.0.0 --from mykey return cmd } +// GetTxCmdVoteSignals creates a CLI command for voting signals +func GetTxCmdVoteSignals() *cobra.Command { + cmd := &cobra.Command{ + Use: "vote [signal_id1],[power1] [signal_id2],[power2] ...", + Short: "Vote signal ids and their powers", + Args: cobra.MinimumNArgs(0), + Long: strings.TrimSpace( + fmt.Sprintf( + `Vote signal ids and their power. +Example: +$ %s tx feeds vote BTC,1000000 --from mykey +`, + version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + voter := clientCtx.GetFromAddress() + var signals []types.Signal + for i, arg := range args { + idAndPower := strings.SplitN(arg, ",", 2) + if len(idAndPower) != 2 { + return fmt.Errorf("argument %d is not valid", i) + } + power, err := strconv.ParseInt(idAndPower[1], 0, 64) + if err != nil { + return err + } + signals = append( + signals, types.NewSignal( + idAndPower[0], + power, + ), + ) + } + + msg := types.NewMsgVoteSignals(voter.String(), signals) + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + // GetCmdRequestSignature implements the request signature handler. func GetCmdRequestSignature() *cobra.Command { return &cobra.Command{ diff --git a/x/feeds/keeper/genesis.go b/x/feeds/keeper/genesis.go index a84629b55..d43d50f22 100644 --- a/x/feeds/keeper/genesis.go +++ b/x/feeds/keeper/genesis.go @@ -27,5 +27,9 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { // ExportGenesis returns the module's exported genesis func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { - return types.NewGenesisState(k.GetParams(ctx), k.GetAllVotes(ctx), k.GetReferenceSourceConfig(ctx)) + return types.NewGenesisState( + k.GetParams(ctx), + k.GetVotes(ctx), + k.GetReferenceSourceConfig(ctx), + ) } diff --git a/x/feeds/keeper/genesis_test.go b/x/feeds/keeper/genesis_test.go index d0d02bfad..460703365 100644 --- a/x/feeds/keeper/genesis_test.go +++ b/x/feeds/keeper/genesis_test.go @@ -95,7 +95,7 @@ func (suite *KeeperTestSuite) TestInitGenesis() { suite.Require().Equal(params, suite.feedsKeeper.GetParams(ctx)) for _, v := range votes { suite.Require(). - Equal(v.Signals, suite.feedsKeeper.GetVoteSignals(ctx, sdk.MustAccAddressFromBech32(v.Voter))) + Equal(v.Signals, suite.feedsKeeper.GetVote(ctx, sdk.MustAccAddressFromBech32(v.Voter))) } stpBand, err := suite.feedsKeeper.GetSignalTotalPower(ctx, "CS:BAND-USD") diff --git a/x/feeds/keeper/grpc_query.go b/x/feeds/keeper/grpc_query.go index b400d75a4..97972f1e9 100644 --- a/x/feeds/keeper/grpc_query.go +++ b/x/feeds/keeper/grpc_query.go @@ -37,7 +37,7 @@ func (q queryServer) Vote( return nil, err } - signals := q.keeper.GetVoteSignals(ctx, voter) + signals := q.keeper.GetVote(ctx, voter) return &types.QueryVoteResponse{Signals: signals}, nil } diff --git a/x/feeds/keeper/keeper_signal.go b/x/feeds/keeper/keeper_signal.go index 0eb87a150..93cc71e8f 100644 --- a/x/feeds/keeper/keeper_signal.go +++ b/x/feeds/keeper/keeper_signal.go @@ -13,8 +13,8 @@ import ( "github.com/bandprotocol/chain/v3/x/feeds/types" ) -// GetVoteSignals returns a list of all signals of a voter. -func (k Keeper) GetVoteSignals(ctx sdk.Context, voter sdk.AccAddress) []types.Signal { +// GetVote returns all signals of a voter. +func (k Keeper) GetVote(ctx sdk.Context, voter sdk.AccAddress) []types.Signal { bz := ctx.KVStore(k.storeKey).Get(types.VoteStoreKey(voter)) if bz == nil { return nil @@ -42,8 +42,8 @@ func (k Keeper) GetVoteIterator(ctx sdk.Context) dbm.Iterator { return storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.VoteStoreKeyPrefix) } -// GetAllVotes returns a list of all votes. -func (k Keeper) GetAllVotes(ctx sdk.Context) (votes []types.Vote) { +// GetVotes returns all votes. +func (k Keeper) GetVotes(ctx sdk.Context) (votes []types.Vote) { iterator := k.GetVoteIterator(ctx) defer iterator.Close() @@ -153,7 +153,7 @@ func (k Keeper) SignalTotalPowersByPowerStoreIterator(ctx sdk.Context) dbm.Itera // CalculateNewSignalTotalPowers calculates the new signal-total-powers from all votes. func (k Keeper) CalculateNewSignalTotalPowers(ctx sdk.Context) []types.Signal { - votes := k.GetAllVotes(ctx) + votes := k.GetVotes(ctx) signalIDToPower := make(map[string]int64) for _, v := range votes { for _, signal := range v.Signals { @@ -202,7 +202,7 @@ func (k Keeper) RegisterNewSignals( ) map[string]int64 { signalIDToPowerDiff := make(map[string]int64) - prevSignals := k.GetVoteSignals(ctx, voter) + prevSignals := k.GetVote(ctx, voter) k.DeleteVote(ctx, voter) for _, prevSignal := range prevSignals { diff --git a/x/feeds/keeper/keeper_signal_test.go b/x/feeds/keeper/keeper_signal_test.go index d71d558fe..2f8f12de0 100644 --- a/x/feeds/keeper/keeper_signal_test.go +++ b/x/feeds/keeper/keeper_signal_test.go @@ -24,7 +24,7 @@ func (suite *KeeperTestSuite) TestGetSetVote() { suite.feedsKeeper.SetVote(ctx, expVote) // get - signals := suite.feedsKeeper.GetVoteSignals(ctx, ValidVoter) + signals := suite.feedsKeeper.GetVote(ctx, ValidVoter) suite.Require().Equal(expVote.Signals, signals) } diff --git a/x/feeds/keeper/msg_server.go b/x/feeds/keeper/msg_server.go index a2e53b12c..bc315029c 100644 --- a/x/feeds/keeper/msg_server.go +++ b/x/feeds/keeper/msg_server.go @@ -23,7 +23,7 @@ func NewMsgServerImpl(k Keeper) types.MsgServer { } } -// SubmitSignals registers new signals and updates feeds. +// VoteSignals votes signals. func (ms msgServer) VoteSignals( goCtx context.Context, req *types.MsgVoteSignals, @@ -91,7 +91,7 @@ func (ms msgServer) VoteSignals( return &types.MsgVoteSignalsResponse{}, nil } -// SubmitSignalPrices register new validator prices. +// SubmitSignalPrices submits new validator prices. func (ms msgServer) SubmitSignalPrices( goCtx context.Context, req *types.MsgSubmitSignalPrices, diff --git a/x/feeds/keeper/msg_server_test.go b/x/feeds/keeper/msg_server_test.go index 07061d15b..742ff39ef 100644 --- a/x/feeds/keeper/msg_server_test.go +++ b/x/feeds/keeper/msg_server_test.go @@ -80,7 +80,7 @@ func (suite *KeeperTestSuite) TestMsgVoteSignals() { Power: 1e10, }, }, - suite.feedsKeeper.GetVoteSignals(suite.ctx, ValidVoter), + suite.feedsKeeper.GetVote(suite.ctx, ValidVoter), ) suite.Require().Equal( []types.Signal{ @@ -122,7 +122,7 @@ func (suite *KeeperTestSuite) TestMsgVoteSignals() { Power: 1e9, }, }, - suite.feedsKeeper.GetVoteSignals(suite.ctx, ValidVoter), + suite.feedsKeeper.GetVote(suite.ctx, ValidVoter), ) suite.Require().Equal( []types.Signal{ diff --git a/x/feeds/types/query.pb.go b/x/feeds/types/query.pb.go index a00a9fce5..041a1be38 100644 --- a/x/feeds/types/query.pb.go +++ b/x/feeds/types/query.pb.go @@ -1183,85 +1183,85 @@ func init() { func init() { proto.RegisterFile("band/feeds/v1beta1/query.proto", fileDescriptor_39690037efa6f66f) } var fileDescriptor_39690037efa6f66f = []byte{ - // 1240 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0x5f, 0x4f, 0x1c, 0x55, - 0x14, 0xc0, 0x99, 0x5a, 0x10, 0x0e, 0x85, 0xc2, 0x2d, 0xa4, 0x30, 0xc0, 0xb6, 0x0c, 0x94, 0x02, - 0x76, 0x67, 0x60, 0x69, 0xab, 0x21, 0x7d, 0xe9, 0xd6, 0x54, 0xab, 0x89, 0xc5, 0x45, 0xb1, 0xf1, - 0x65, 0x33, 0xec, 0x5e, 0x86, 0x31, 0xcb, 0xcc, 0x76, 0x66, 0x76, 0x6d, 0xb3, 0xe1, 0x41, 0x1f, - 0x7c, 0xd2, 0xc4, 0xc6, 0x6f, 0xa0, 0x89, 0x1f, 0xc0, 0x54, 0x1f, 0xfc, 0x04, 0x7d, 0x6c, 0xea, - 0x8b, 0x4f, 0xc6, 0x80, 0x1f, 0xc4, 0xcc, 0xb9, 0x67, 0x96, 0x9d, 0xd9, 0x3b, 0xcc, 0x12, 0x1b, - 0xdf, 0xd8, 0x39,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 0xef, 0x87, 0x06, 0x51, 0xd4, 0x06, 0x4c, - 0x4b, 0x64, 0x14, 0xf1, 0x11, 0x8c, 0x54, 0xc4, 0xf7, 0x32, 0x46, 0x99, 0x52, 0xae, 0x2a, 0xcb, - 0xc3, 0x85, 0xbc, 0x2c, 0x70, 0x87, 0x83, 0xcf, 0xec, 0x60, 0xff, 0x5d, 0xde, 0xb4, 0xc5, 0x31, - 0x10, 0xcc, 0x85, 0x4a, 0x47, 0x04, 0x6d, 0x33, 0x1e, 0x36, 0x56, 0x09, 0x36, 0x07, 0xe0, 0xdb, - 0x96, 0x63, 0xd6, 0xca, 0x76, 0x55, 0x24, 0x3b, 0x54, 0x1a, 0x12, 0x5f, 0x1e, 0x54, 0x7d, 0xed, - 0x53, 0x50, 0x65, 0xb6, 0xff, 0xb5, 0x4a, 0x45, 0x18, 0x43, 0xb7, 0x3b, 0x6e, 0xc0, 0x23, 0x12, - 0x1d, 0xfa, 0x9b, 0x6e, 0xc0, 0x3d, 0x4c, 0x7c, 0xa8, 0x38, 0xf5, 0xea, 0x79, 0x7e, 0x82, 0x3a, - 0xe8, 0x6e, 0xb5, 0xea, 0x71, 0xdf, 0xdf, 0x0e, 0x3c, 0xdb, 0xb1, 0x4a, 0x42, 0x4d, 0x7b, 0x08, - 0xe3, 0x1d, 0x3e, 0x88, 0x68, 0x13, 0xde, 0x14, 0xf0, 0x11, 0x92, 0x2a, 0x43, 0xda, 0x46, 0x15, - 0x62, 0x8a, 0x0c, 0xb4, 0x2f, 0x60, 0x02, 0x1d, 0x3e, 0xf0, 0xc3, 0xba, 0x71, 0x2f, 0x02, 0x7b, - 0x0b, 0xc6, 0x9b, 0x66, 0xcd, 0xae, 0x9a, 0x81, 0xeb, 0x95, 0x4d, 0x81, 0x22, 0x20, 0x4b, 0x63, - 0x6d, 0x01, 0x21, 0xb2, 0x6b, 0x30, 0xba, 0x87, 0xd6, 0x6d, 0xcd, 0x73, 0xa8, 0x39, 0x22, 0xbe, - 0x92, 0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b7, - 0xc0, 0xe6, 0x13, 0x3b, 0x91, 0x59, 0xab, 0xe5, 0x69, 0x15, 0xc8, 0xd3, 0x50, 0x7a, 0xa6, 0xc0, - 0x85, 0xce, 0xfd, 0x83, 0xdd, 0x48, 0x0d, 0x27, 0x59, 0x61, 0xd4, 0x7c, 0x8f, 0xda, 0x04, 0xb6, - 0x88, 0x60, 0x39, 0x36, 0x9b, 0x00, 0x8b, 0xa0, 0xf0, 0x6b, 0x58, 0xb8, 0x91, 0x78, 0xd5, 0x32, - 0xc3, 0xc4, 0x4b, 0xa6, 0xf7, 0xaa, 0x4e, 0x58, 0x05, 0xc4, 0xba, 0xc1, 0x56, 0x53, 0xb0, 0x44, - 0xad, 0x8c, 0xd6, 0x49, 0xb3, 0x1d, 0xb2, 0x27, 0x70, 0x3e, 0xdc, 0x34, 0xd8, 0x62, 0x6a, 0xac, - 0x8e, 0x65, 0x46, 0xbd, 0x96, 0xa1, 0x45, 0x20, 0x0b, 0x08, 0x32, 0xc7, 0x66, 0x12, 0x20, 0xe1, - 0x86, 0x63, 0xb4, 0x70, 0xcf, 0x39, 0x64, 0x3f, 0x29, 0x30, 0x18, 0xed, 0x09, 0x6c, 0x39, 0xd5, - 0x71, 0x62, 0x6d, 0x51, 0x57, 0x7a, 0xd0, 0x24, 0x8c, 0x22, 0x62, 0xdc, 0x61, 0x9b, 0x92, 0x9d, - 0x9b, 0x7b, 0x46, 0xab, 0xeb, 0x12, 0x1f, 0x1a, 0xad, 0xf8, 0x96, 0x13, 0xd6, 0x67, 0x40, 0x2c, - 0x13, 0x6c, 0x29, 0x35, 0x70, 0x6c, 0x6f, 0x51, 0xaf, 0x67, 0xea, 0x11, 0xde, 0x1c, 0xe2, 0x5d, - 0x66, 0x93, 0xd2, 0x95, 0x9f, 0x7d, 0xa5, 0x40, 0x3f, 0x1e, 0x30, 0x4b, 0xaf, 0x7a, 0xe7, 0x2a, - 0xa3, 0x2e, 0x65, 0xa9, 0x65, 0x5c, 0xab, 0xae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, 0x1e, 0x18, 0x21, - 0x13, 0xfe, 0x5f, 0x5f, 0x71, 0x6b, 0x46, 0x65, 0xdf, 0xb4, 0x1d, 0xa3, 0xb9, 0x61, 0x3c, 0xa1, - 0x88, 0xc1, 0xd3, 0x3a, 0xf7, 0x77, 0x07, 0x50, 0x61, 0xe3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x47, 0x11, 0xd9, 0x8a, 0xea, 0x10, 0x00, 0x00, + // 1238 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xdf, 0x4f, 0x1c, 0xd5, + 0x17, 0xc0, 0x19, 0xbe, 0x85, 0x2f, 0x1c, 0x0a, 0x85, 0x5b, 0x48, 0x61, 0x80, 0x6d, 0x99, 0x52, + 0x0a, 0xd8, 0x9d, 0x81, 0xa5, 0x54, 0x83, 0x7d, 0xe9, 0xd6, 0x54, 0xab, 0x89, 0xc5, 0x45, 0xb1, + 0xf1, 0x65, 0x33, 0xec, 0x5e, 0x86, 0x31, 0xcb, 0xcc, 0x76, 0xee, 0xec, 0xda, 0x86, 0x10, 0xa3, + 0x0f, 0x3e, 0x69, 0x62, 0xe3, 0x7f, 0xa0, 0x89, 0x8f, 0x3e, 0x98, 0xea, 0xdf, 0xd0, 0x07, 0x1f, + 0x9a, 0xfa, 0xe2, 0x93, 0x31, 0xe0, 0x1f, 0x62, 0xe6, 0xdc, 0x33, 0xcb, 0xce, 0xec, 0x0c, 0xb3, + 0xc4, 0xc6, 0x27, 0x98, 0x7b, 0x7e, 0x7d, 0xee, 0xb9, 0xe7, 0x9e, 0x7b, 0x16, 0x72, 0x3b, 0xa6, + 0x53, 0x35, 0x76, 0x39, 0xaf, 0x0a, 0xa3, 0xb9, 0xba, 0xc3, 0x7d, 0x73, 0xd5, 0x78, 0xd4, 0xe0, + 0xde, 0x13, 0xbd, 0xee, 0xb9, 0xbe, 0xcb, 0x58,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0x49, 0x27, + 0x81, 0xfd, 0xfc, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/feeds/types/query.pb.gw.go b/x/feeds/types/query.pb.gw.go index c3817a705..61e189b92 100644 --- a/x/feeds/types/query.pb.gw.go +++ b/x/feeds/types/query.pb.gw.go @@ -1114,7 +1114,7 @@ var ( pattern_Query_CurrentPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"feeds", "v1beta1", "current-prices", "signal_ids"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Vote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"feeds", "v1beta1", "vote", "voter"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Vote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "voters", "voter", "vote"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_IsFeeder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"feeds", "v1beta1", "feeder", "validator_address", "feeder_address"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1128,7 +1128,7 @@ var ( pattern_Query_SignalTotalPowers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"feeds", "v1beta1", "signal-total-powers"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ValidValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"feeds", "v1beta1", "valid", "validator_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ValidValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "validators", "validator_address", "valid"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ValidatorPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "validators", "validator_address", "prices"}, "", runtime.AssumeColonVerbOpt(false))) ) From afd742a3cbe84d064f9f76e80ee85b05d6086de4 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 1 Nov 2024 19:50:21 +0700 Subject: [PATCH 210/272] update --- api/band/feeds/v1beta1/query.pulsar.go | 540 ++++++++++++------------- grogu/querier/feed.go | 8 +- proto/band/feeds/v1beta1/query.proto | 22 +- proto/band/feeds/v1beta1/tx.proto | 1 + x/feeds/keeper/grpc_query.go | 8 +- x/feeds/keeper/grpc_query_test.go | 16 +- x/feeds/types/query.pb.go | 244 ++++++----- x/feeds/types/query.pb.gw.go | 72 ++-- 8 files changed, 454 insertions(+), 457 deletions(-) diff --git a/api/band/feeds/v1beta1/query.pulsar.go b/api/band/feeds/v1beta1/query.pulsar.go index ad39ec60b..92d7f64b6 100644 --- a/api/band/feeds/v1beta1/query.pulsar.go +++ b/api/band/feeds/v1beta1/query.pulsar.go @@ -3546,16 +3546,16 @@ func (x *fastReflection_QueryVoteResponse) ProtoMethods() *protoiface.Methods { } var ( - md_QueryIsFeederRequest protoreflect.MessageDescriptor - fd_QueryIsFeederRequest_validator_address protoreflect.FieldDescriptor - fd_QueryIsFeederRequest_feeder_address protoreflect.FieldDescriptor + md_QueryIsFeederRequest protoreflect.MessageDescriptor + fd_QueryIsFeederRequest_validator protoreflect.FieldDescriptor + fd_QueryIsFeederRequest_feeder protoreflect.FieldDescriptor ) func init() { file_band_feeds_v1beta1_query_proto_init() md_QueryIsFeederRequest = File_band_feeds_v1beta1_query_proto.Messages().ByName("QueryIsFeederRequest") - fd_QueryIsFeederRequest_validator_address = md_QueryIsFeederRequest.Fields().ByName("validator_address") - fd_QueryIsFeederRequest_feeder_address = md_QueryIsFeederRequest.Fields().ByName("feeder_address") + fd_QueryIsFeederRequest_validator = md_QueryIsFeederRequest.Fields().ByName("validator") + fd_QueryIsFeederRequest_feeder = md_QueryIsFeederRequest.Fields().ByName("feeder") } var _ protoreflect.Message = (*fastReflection_QueryIsFeederRequest)(nil) @@ -3623,15 +3623,15 @@ func (x *fastReflection_QueryIsFeederRequest) Interface() protoreflect.ProtoMess // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryIsFeederRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryIsFeederRequest_validator_address, value) { + if x.Validator != "" { + value := protoreflect.ValueOfString(x.Validator) + if !f(fd_QueryIsFeederRequest_validator, value) { return } } - if x.FeederAddress != "" { - value := protoreflect.ValueOfString(x.FeederAddress) - if !f(fd_QueryIsFeederRequest_feeder_address, value) { + if x.Feeder != "" { + value := protoreflect.ValueOfString(x.Feeder) + if !f(fd_QueryIsFeederRequest_feeder, value) { return } } @@ -3650,10 +3650,10 @@ func (x *fastReflection_QueryIsFeederRequest) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryIsFeederRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.feeds.v1beta1.QueryIsFeederRequest.validator_address": - return x.ValidatorAddress != "" - case "band.feeds.v1beta1.QueryIsFeederRequest.feeder_address": - return x.FeederAddress != "" + case "band.feeds.v1beta1.QueryIsFeederRequest.validator": + return x.Validator != "" + case "band.feeds.v1beta1.QueryIsFeederRequest.feeder": + return x.Feeder != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryIsFeederRequest")) @@ -3670,10 +3670,10 @@ func (x *fastReflection_QueryIsFeederRequest) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIsFeederRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryIsFeederRequest.validator_address": - x.ValidatorAddress = "" - case "band.feeds.v1beta1.QueryIsFeederRequest.feeder_address": - x.FeederAddress = "" + case "band.feeds.v1beta1.QueryIsFeederRequest.validator": + x.Validator = "" + case "band.feeds.v1beta1.QueryIsFeederRequest.feeder": + x.Feeder = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryIsFeederRequest")) @@ -3690,11 +3690,11 @@ func (x *fastReflection_QueryIsFeederRequest) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryIsFeederRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.feeds.v1beta1.QueryIsFeederRequest.validator_address": - value := x.ValidatorAddress + case "band.feeds.v1beta1.QueryIsFeederRequest.validator": + value := x.Validator return protoreflect.ValueOfString(value) - case "band.feeds.v1beta1.QueryIsFeederRequest.feeder_address": - value := x.FeederAddress + case "band.feeds.v1beta1.QueryIsFeederRequest.feeder": + value := x.Feeder return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { @@ -3716,10 +3716,10 @@ func (x *fastReflection_QueryIsFeederRequest) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIsFeederRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryIsFeederRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "band.feeds.v1beta1.QueryIsFeederRequest.feeder_address": - x.FeederAddress = value.Interface().(string) + case "band.feeds.v1beta1.QueryIsFeederRequest.validator": + x.Validator = value.Interface().(string) + case "band.feeds.v1beta1.QueryIsFeederRequest.feeder": + x.Feeder = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryIsFeederRequest")) @@ -3740,10 +3740,10 @@ func (x *fastReflection_QueryIsFeederRequest) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIsFeederRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryIsFeederRequest.validator_address": - panic(fmt.Errorf("field validator_address of message band.feeds.v1beta1.QueryIsFeederRequest is not mutable")) - case "band.feeds.v1beta1.QueryIsFeederRequest.feeder_address": - panic(fmt.Errorf("field feeder_address of message band.feeds.v1beta1.QueryIsFeederRequest is not mutable")) + case "band.feeds.v1beta1.QueryIsFeederRequest.validator": + panic(fmt.Errorf("field validator of message band.feeds.v1beta1.QueryIsFeederRequest is not mutable")) + case "band.feeds.v1beta1.QueryIsFeederRequest.feeder": + panic(fmt.Errorf("field feeder of message band.feeds.v1beta1.QueryIsFeederRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryIsFeederRequest")) @@ -3757,9 +3757,9 @@ func (x *fastReflection_QueryIsFeederRequest) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryIsFeederRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryIsFeederRequest.validator_address": + case "band.feeds.v1beta1.QueryIsFeederRequest.validator": return protoreflect.ValueOfString("") - case "band.feeds.v1beta1.QueryIsFeederRequest.feeder_address": + case "band.feeds.v1beta1.QueryIsFeederRequest.feeder": return protoreflect.ValueOfString("") default: if fd.IsExtension() { @@ -3830,11 +3830,11 @@ func (x *fastReflection_QueryIsFeederRequest) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.ValidatorAddress) + l = len(x.Validator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.FeederAddress) + l = len(x.Feeder) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3867,17 +3867,17 @@ func (x *fastReflection_QueryIsFeederRequest) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.FeederAddress) > 0 { - i -= len(x.FeederAddress) - copy(dAtA[i:], x.FeederAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeederAddress))) + if len(x.Feeder) > 0 { + i -= len(x.Feeder) + copy(dAtA[i:], x.Feeder) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Feeder))) i-- dAtA[i] = 0x12 } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + if len(x.Validator) > 0 { + i -= len(x.Validator) + copy(dAtA[i:], x.Validator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Validator))) i-- dAtA[i] = 0xa } @@ -3932,7 +3932,7 @@ func (x *fastReflection_QueryIsFeederRequest) ProtoMethods() *protoiface.Methods switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3960,11 +3960,11 @@ func (x *fastReflection_QueryIsFeederRequest) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + x.Validator = 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 FeederAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Feeder", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3992,7 +3992,7 @@ func (x *fastReflection_QueryIsFeederRequest) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.FeederAddress = string(dAtA[iNdEx:postIndex]) + x.Feeder = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9141,14 +9141,14 @@ func (x *fastReflection_QuerySignalTotalPowersResponse) ProtoMethods() *protoifa } var ( - md_QueryValidValidatorRequest protoreflect.MessageDescriptor - fd_QueryValidValidatorRequest_validator_address protoreflect.FieldDescriptor + md_QueryValidValidatorRequest protoreflect.MessageDescriptor + fd_QueryValidValidatorRequest_validator protoreflect.FieldDescriptor ) func init() { file_band_feeds_v1beta1_query_proto_init() md_QueryValidValidatorRequest = File_band_feeds_v1beta1_query_proto.Messages().ByName("QueryValidValidatorRequest") - fd_QueryValidValidatorRequest_validator_address = md_QueryValidValidatorRequest.Fields().ByName("validator_address") + fd_QueryValidValidatorRequest_validator = md_QueryValidValidatorRequest.Fields().ByName("validator") } var _ protoreflect.Message = (*fastReflection_QueryValidValidatorRequest)(nil) @@ -9216,9 +9216,9 @@ func (x *fastReflection_QueryValidValidatorRequest) Interface() protoreflect.Pro // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryValidValidatorRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryValidValidatorRequest_validator_address, value) { + if x.Validator != "" { + value := protoreflect.ValueOfString(x.Validator) + if !f(fd_QueryValidValidatorRequest_validator, value) { return } } @@ -9237,8 +9237,8 @@ func (x *fastReflection_QueryValidValidatorRequest) Range(f func(protoreflect.Fi // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryValidValidatorRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidValidatorRequest.validator_address": - return x.ValidatorAddress != "" + case "band.feeds.v1beta1.QueryValidValidatorRequest.validator": + return x.Validator != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryValidValidatorRequest")) @@ -9255,8 +9255,8 @@ func (x *fastReflection_QueryValidValidatorRequest) Has(fd protoreflect.FieldDes // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidValidatorRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidValidatorRequest.validator_address": - x.ValidatorAddress = "" + case "band.feeds.v1beta1.QueryValidValidatorRequest.validator": + x.Validator = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryValidValidatorRequest")) @@ -9273,8 +9273,8 @@ func (x *fastReflection_QueryValidValidatorRequest) Clear(fd protoreflect.FieldD // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryValidValidatorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.feeds.v1beta1.QueryValidValidatorRequest.validator_address": - value := x.ValidatorAddress + case "band.feeds.v1beta1.QueryValidValidatorRequest.validator": + value := x.Validator return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { @@ -9296,8 +9296,8 @@ func (x *fastReflection_QueryValidValidatorRequest) Get(descriptor protoreflect. // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidValidatorRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidValidatorRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) + case "band.feeds.v1beta1.QueryValidValidatorRequest.validator": + x.Validator = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryValidValidatorRequest")) @@ -9318,8 +9318,8 @@ func (x *fastReflection_QueryValidValidatorRequest) Set(fd protoreflect.FieldDes // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidValidatorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidValidatorRequest.validator_address": - panic(fmt.Errorf("field validator_address of message band.feeds.v1beta1.QueryValidValidatorRequest is not mutable")) + case "band.feeds.v1beta1.QueryValidValidatorRequest.validator": + panic(fmt.Errorf("field validator of message band.feeds.v1beta1.QueryValidValidatorRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryValidValidatorRequest")) @@ -9333,7 +9333,7 @@ func (x *fastReflection_QueryValidValidatorRequest) Mutable(fd protoreflect.Fiel // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryValidValidatorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidValidatorRequest.validator_address": + case "band.feeds.v1beta1.QueryValidValidatorRequest.validator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { @@ -9404,7 +9404,7 @@ func (x *fastReflection_QueryValidValidatorRequest) ProtoMethods() *protoiface.M var n int var l int _ = l - l = len(x.ValidatorAddress) + l = len(x.Validator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -9437,10 +9437,10 @@ func (x *fastReflection_QueryValidValidatorRequest) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + if len(x.Validator) > 0 { + i -= len(x.Validator) + copy(dAtA[i:], x.Validator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Validator))) i-- dAtA[i] = 0xa } @@ -9495,7 +9495,7 @@ func (x *fastReflection_QueryValidValidatorRequest) ProtoMethods() *protoiface.M switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9523,7 +9523,7 @@ func (x *fastReflection_QueryValidValidatorRequest) ProtoMethods() *protoiface.M if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + x.Validator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -10017,15 +10017,15 @@ func (x *_QueryValidatorPricesRequest_2_list) IsValid() bool { } var ( - md_QueryValidatorPricesRequest protoreflect.MessageDescriptor - fd_QueryValidatorPricesRequest_validator_address protoreflect.FieldDescriptor - fd_QueryValidatorPricesRequest_signal_ids protoreflect.FieldDescriptor + md_QueryValidatorPricesRequest protoreflect.MessageDescriptor + fd_QueryValidatorPricesRequest_validator protoreflect.FieldDescriptor + fd_QueryValidatorPricesRequest_signal_ids protoreflect.FieldDescriptor ) func init() { file_band_feeds_v1beta1_query_proto_init() md_QueryValidatorPricesRequest = File_band_feeds_v1beta1_query_proto.Messages().ByName("QueryValidatorPricesRequest") - fd_QueryValidatorPricesRequest_validator_address = md_QueryValidatorPricesRequest.Fields().ByName("validator_address") + fd_QueryValidatorPricesRequest_validator = md_QueryValidatorPricesRequest.Fields().ByName("validator") fd_QueryValidatorPricesRequest_signal_ids = md_QueryValidatorPricesRequest.Fields().ByName("signal_ids") } @@ -10094,9 +10094,9 @@ func (x *fastReflection_QueryValidatorPricesRequest) Interface() protoreflect.Pr // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryValidatorPricesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryValidatorPricesRequest_validator_address, value) { + if x.Validator != "" { + value := protoreflect.ValueOfString(x.Validator) + if !f(fd_QueryValidatorPricesRequest_validator, value) { return } } @@ -10121,8 +10121,8 @@ func (x *fastReflection_QueryValidatorPricesRequest) Range(f func(protoreflect.F // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryValidatorPricesRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator_address": - return x.ValidatorAddress != "" + case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator": + return x.Validator != "" case "band.feeds.v1beta1.QueryValidatorPricesRequest.signal_ids": return len(x.SignalIds) != 0 default: @@ -10141,8 +10141,8 @@ func (x *fastReflection_QueryValidatorPricesRequest) Has(fd protoreflect.FieldDe // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatorPricesRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator_address": - x.ValidatorAddress = "" + case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator": + x.Validator = "" case "band.feeds.v1beta1.QueryValidatorPricesRequest.signal_ids": x.SignalIds = nil default: @@ -10161,8 +10161,8 @@ func (x *fastReflection_QueryValidatorPricesRequest) Clear(fd protoreflect.Field // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryValidatorPricesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator_address": - value := x.ValidatorAddress + case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator": + value := x.Validator return protoreflect.ValueOfString(value) case "band.feeds.v1beta1.QueryValidatorPricesRequest.signal_ids": if len(x.SignalIds) == 0 { @@ -10190,8 +10190,8 @@ func (x *fastReflection_QueryValidatorPricesRequest) Get(descriptor protoreflect // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryValidatorPricesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) + case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator": + x.Validator = value.Interface().(string) case "band.feeds.v1beta1.QueryValidatorPricesRequest.signal_ids": lv := value.List() clv := lv.(*_QueryValidatorPricesRequest_2_list) @@ -10222,8 +10222,8 @@ func (x *fastReflection_QueryValidatorPricesRequest) Mutable(fd protoreflect.Fie } value := &_QueryValidatorPricesRequest_2_list{list: &x.SignalIds} return protoreflect.ValueOfList(value) - case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator_address": - panic(fmt.Errorf("field validator_address of message band.feeds.v1beta1.QueryValidatorPricesRequest is not mutable")) + case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator": + panic(fmt.Errorf("field validator of message band.feeds.v1beta1.QueryValidatorPricesRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.QueryValidatorPricesRequest")) @@ -10237,7 +10237,7 @@ func (x *fastReflection_QueryValidatorPricesRequest) Mutable(fd protoreflect.Fie // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryValidatorPricesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator_address": + case "band.feeds.v1beta1.QueryValidatorPricesRequest.validator": return protoreflect.ValueOfString("") case "band.feeds.v1beta1.QueryValidatorPricesRequest.signal_ids": list := []string{} @@ -10311,7 +10311,7 @@ func (x *fastReflection_QueryValidatorPricesRequest) ProtoMethods() *protoiface. var n int var l int _ = l - l = len(x.ValidatorAddress) + l = len(x.Validator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -10359,10 +10359,10 @@ func (x *fastReflection_QueryValidatorPricesRequest) ProtoMethods() *protoiface. dAtA[i] = 0x12 } } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) + if len(x.Validator) > 0 { + i -= len(x.Validator) + copy(dAtA[i:], x.Validator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Validator))) i-- dAtA[i] = 0xa } @@ -10417,7 +10417,7 @@ func (x *fastReflection_QueryValidatorPricesRequest) ProtoMethods() *protoiface. switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10445,7 +10445,7 @@ func (x *fastReflection_QueryValidatorPricesRequest) ProtoMethods() *protoiface. if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + x.Validator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -11303,10 +11303,10 @@ type QueryIsFeederRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // validator_address is a validator address. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // feeder_address is a candidate account. - FeederAddress string `protobuf:"bytes,2,opt,name=feeder_address,json=feederAddress,proto3" json:"feeder_address,omitempty"` + // validator is a validator address. + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` + // feeder is a candidate account. + Feeder string `protobuf:"bytes,2,opt,name=feeder,proto3" json:"feeder,omitempty"` } func (x *QueryIsFeederRequest) Reset() { @@ -11329,16 +11329,16 @@ func (*QueryIsFeederRequest) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_query_proto_rawDescGZIP(), []int{8} } -func (x *QueryIsFeederRequest) GetValidatorAddress() string { +func (x *QueryIsFeederRequest) GetValidator() string { if x != nil { - return x.ValidatorAddress + return x.Validator } return "" } -func (x *QueryIsFeederRequest) GetFeederAddress() string { +func (x *QueryIsFeederRequest) GetFeeder() string { if x != nil { - return x.FeederAddress + return x.Feeder } return "" } @@ -11772,8 +11772,8 @@ type QueryValidValidatorRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // validator_address is the validator address to query the flag. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // validator is the validator address to query the flag. + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` } func (x *QueryValidValidatorRequest) Reset() { @@ -11796,9 +11796,9 @@ func (*QueryValidValidatorRequest) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_query_proto_rawDescGZIP(), []int{20} } -func (x *QueryValidValidatorRequest) GetValidatorAddress() string { +func (x *QueryValidValidatorRequest) GetValidator() string { if x != nil { - return x.ValidatorAddress + return x.Validator } return "" } @@ -11846,8 +11846,8 @@ type QueryValidatorPricesRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // validator_address is the validator address to query prices for. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // validator is the validator address to query prices for. + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` // signal_ids is the list of signal ids to query the price for. SignalIds []string `protobuf:"bytes,2,rep,name=signal_ids,json=signalIds,proto3" json:"signal_ids,omitempty"` } @@ -11872,9 +11872,9 @@ func (*QueryValidatorPricesRequest) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_query_proto_rawDescGZIP(), []int{22} } -func (x *QueryValidatorPricesRequest) GetValidatorAddress() string { +func (x *QueryValidatorPricesRequest) GetValidator() string { if x != nil { - return x.ValidatorAddress + return x.Validator } return "" } @@ -11976,14 +11976,16 @@ var file_band_feeds_v1beta1_query_proto_rawDesc = []byte{ 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x22, 0x6a, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, - 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x65, - 0x65, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x34, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, + 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, + 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x30, 0x0a, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 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, 0x06, 0x66, 0x65, 0x65, 0x64, 0x65, + 0x72, 0x22, 0x34, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, @@ -12049,164 +12051,160 @@ var file_band_feeds_v1beta1_query_proto_rawDesc = []byte{ 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, - 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x22, 0x33, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, + 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x22, 0x33, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x22, 0x7d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x32, 0xcc, 0x0e, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa2, 0x01, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x2d, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, - 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, - 0x12, 0x1c, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x66, 0x65, 0x65, 0x64, 0x73, 0x12, 0xa2, - 0x01, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x12, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x73, 0x7d, 0x12, 0x7f, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x32, 0xac, 0x0e, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa2, 0x01, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, - 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x2f, - 0x76, 0x6f, 0x74, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x08, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, - 0x72, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, - 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, - 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, - 0x65, 0x65, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x66, 0x65, 0x65, 0x64, 0x65, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x2d, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x0c, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, - 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, 0x6e, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, + 0x65, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x66, 0x65, - 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, 0x62, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1e, 0x12, 0x1c, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x66, 0x65, 0x65, 0x64, 0x73, 0x12, + 0xa2, 0x01, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x73, 0x12, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x2d, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x73, 0x7d, 0x12, 0x7f, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2d, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xa6, 0x01, 0x0a, 0x11, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x24, 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, + 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x08, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, + 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, + 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x46, 0x65, 0x65, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, + 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x7d, 0x2f, 0x7b, 0x66, 0x65, 0x65, 0x64, 0x65, 0x72, 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, + 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x78, 0x0a, 0x06, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2d, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xa6, 0x01, 0x0a, + 0x11, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, + 0x72, 0x73, 0x12, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, - 0x73, 0x12, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, - 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2d, 0x70, 0x6f, - 0x77, 0x65, 0x72, 0x73, 0x12, 0xae, 0x01, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, - 0x12, 0x33, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0xb2, 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, - 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x7d, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, - 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, - 0x64, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, - 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, - 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, - 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, - 0x64, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x24, 0x12, 0x22, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x2d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2d, 0x70, + 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2d, 0x12, 0x2b, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0xaa, + 0x01, 0x0a, 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, + 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x7d, 0x2f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0xd4, 0x01, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, + 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, + 0xaa, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, + 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, + 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, + 0x6e, 0x64, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/grogu/querier/feed.go b/grogu/querier/feed.go index 148b0344e..59117638d 100644 --- a/grogu/querier/feed.go +++ b/grogu/querier/feed.go @@ -40,7 +40,7 @@ func (q *FeedQuerier) QueryValidValidator(valAddress sdk.ValAddress) (*feeds.Que } in := feeds.QueryValidValidatorRequest{ - ValidatorAddress: valAddress.String(), + Validator: valAddress.String(), } return getMaxBlockHeightResponse(fs, &in, q.maxBlockHeight) @@ -56,8 +56,8 @@ func (q *FeedQuerier) QueryIsFeeder( } in := feeds.QueryIsFeederRequest{ - FeederAddress: feeder.String(), - ValidatorAddress: validator.String(), + Feeder: feeder.String(), + Validator: validator.String(), } return getMaxBlockHeightResponse(fs, &in, q.maxBlockHeight) } @@ -73,7 +73,7 @@ func (q *FeedQuerier) QueryValidatorPrices(valAddress sdk.ValAddress) (*feeds.Qu } in := feeds.QueryValidatorPricesRequest{ - ValidatorAddress: valAddress.String(), + Validator: valAddress.String(), } return getMaxBlockHeightResponse(fs, &in, q.maxBlockHeight) } diff --git a/proto/band/feeds/v1beta1/query.proto b/proto/band/feeds/v1beta1/query.proto index e42114cde..deb93be73 100644 --- a/proto/band/feeds/v1beta1/query.proto +++ b/proto/band/feeds/v1beta1/query.proto @@ -34,7 +34,7 @@ service Query { // IsFeeder is an RPC method that returns whether an account is a feeder for a specified validator. rpc IsFeeder(QueryIsFeederRequest) returns (QueryIsFeederResponse) { - option (google.api.http).get = "/feeds/v1beta1/feeder/{validator_address}/{feeder_address}"; + option (google.api.http).get = "/feeds/v1beta1/feeder/{validator}/{feeder}"; } // Params is an RPC method that returns all parameters of the module. @@ -65,12 +65,12 @@ service Query { // ValidValidator is an RPC method that returns a flag to show if the validator is required to send prices. rpc ValidValidator(QueryValidValidatorRequest) returns (QueryValidValidatorResponse) { - option (google.api.http).get = "/feeds/v1beta1/validators/{validator_address}/valid"; + option (google.api.http).get = "/feeds/v1beta1/validators/{validator}/valid"; } // ValidatorPrices is an RPC method that returns prices of a validator. rpc ValidatorPrices(QueryValidatorPricesRequest) returns (QueryValidatorPricesResponse) { - option (google.api.http).get = "/feeds/v1beta1/validators/{validator_address}/prices"; + option (google.api.http).get = "/feeds/v1beta1/validators/{validator}/prices"; } } @@ -118,10 +118,10 @@ message QueryVoteResponse { // QueryIsFeederRequest is the request type for the Query/IsFeeder RPC method. message QueryIsFeederRequest { - // validator_address is a validator address. - string validator_address = 1; - // feeder_address is a candidate account. - string feeder_address = 2; + // validator is a validator address. + string validator = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + // feeder is a candidate account. + string feeder = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryIsFeederResponse is the response type for the Query/IsFeeder RPC method. @@ -198,8 +198,8 @@ message QuerySignalTotalPowersResponse { // QueryValidValidatorRequest is the request type for the Query/ValidValidator RPC method. message QueryValidValidatorRequest { - // validator_address is the validator address to query the flag. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + // validator is the validator address to query the flag. + string validator = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; } // QueryValidValidatorResponse is the response type for the Query/ValidValidator RPC method. @@ -210,8 +210,8 @@ message QueryValidValidatorResponse { // QueryValidatorPricesRequest is the request type for the Query/ValidatorPrices RPC method. message QueryValidatorPricesRequest { - // validator_address is the validator address to query prices for. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + // validator is the validator address to query prices for. + string validator = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; // signal_ids is the list of signal ids to query the price for. repeated string signal_ids = 2; diff --git a/proto/band/feeds/v1beta1/tx.proto b/proto/band/feeds/v1beta1/tx.proto index dcb2af03d..3d683ee7e 100644 --- a/proto/band/feeds/v1beta1/tx.proto +++ b/proto/band/feeds/v1beta1/tx.proto @@ -13,6 +13,7 @@ import "amino/amino.proto"; // Msg defines the feeds Msg service. service Msg { option (cosmos.msg.v1.service) = true; + // VoteSignals is an RPC method to vote signal ids and their powers. rpc VoteSignals(MsgVoteSignals) returns (MsgVoteSignalsResponse); diff --git a/x/feeds/keeper/grpc_query.go b/x/feeds/keeper/grpc_query.go index 97972f1e9..a5b4a5332 100644 --- a/x/feeds/keeper/grpc_query.go +++ b/x/feeds/keeper/grpc_query.go @@ -109,7 +109,7 @@ func (q queryServer) ValidatorPrices( ) (*types.QueryValidatorPricesResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - val, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + val, err := sdk.ValAddressFromBech32(req.Validator) if err != nil { return nil, err } @@ -153,7 +153,7 @@ func (q queryServer) ValidValidator( ) (*types.QueryValidValidatorResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - val, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + val, err := sdk.ValAddressFromBech32(req.Validator) if err != nil { return nil, err } @@ -295,12 +295,12 @@ func (q queryServer) IsFeeder( ) (*types.QueryIsFeederResponse, error) { ctx := sdk.UnwrapSDKContext(c) - val, err := sdk.ValAddressFromBech32(req.ValidatorAddress) + val, err := sdk.ValAddressFromBech32(req.Validator) if err != nil { return nil, err } - feeder, err := sdk.AccAddressFromBech32(req.FeederAddress) + feeder, err := sdk.AccAddressFromBech32(req.Feeder) if err != nil { return nil, err } diff --git a/x/feeds/keeper/grpc_query_test.go b/x/feeds/keeper/grpc_query_test.go index d50d956ab..ec6e09768 100644 --- a/x/feeds/keeper/grpc_query_test.go +++ b/x/feeds/keeper/grpc_query_test.go @@ -286,7 +286,7 @@ func (suite *KeeperTestSuite) TestQueryValidatorPrices() { // query all prices res, err := queryClient.ValidatorPrices(context.Background(), &types.QueryValidatorPricesRequest{ - ValidatorAddress: ValidValidator.String(), + Validator: ValidValidator.String(), }) suite.Require().NoError(err) suite.Require().Equal(&types.QueryValidatorPricesResponse{ @@ -295,8 +295,8 @@ func (suite *KeeperTestSuite) TestQueryValidatorPrices() { // query with specific SignalIds res, err = queryClient.ValidatorPrices(context.Background(), &types.QueryValidatorPricesRequest{ - ValidatorAddress: ValidValidator.String(), - SignalIds: []string{"CS:ATOM-USD"}, + Validator: ValidValidator.String(), + SignalIds: []string{"CS:ATOM-USD"}, }) suite.Require().NoError(err) suite.Require().Equal(&types.QueryValidatorPricesResponse{ @@ -305,7 +305,7 @@ func (suite *KeeperTestSuite) TestQueryValidatorPrices() { // query with invalid validator res, err = queryClient.ValidatorPrices(context.Background(), &types.QueryValidatorPricesRequest{ - ValidatorAddress: InvalidValidator.String(), + Validator: InvalidValidator.String(), }) suite.Require().NoError(err) suite.Require().Equal(&types.QueryValidatorPricesResponse{ @@ -314,8 +314,8 @@ func (suite *KeeperTestSuite) TestQueryValidatorPrices() { // query with specific SignalIds for invalid validator res, err = queryClient.ValidatorPrices(context.Background(), &types.QueryValidatorPricesRequest{ - ValidatorAddress: InvalidValidator.String(), - SignalIds: []string{"CS:ATOM-USD"}, + Validator: InvalidValidator.String(), + SignalIds: []string{"CS:ATOM-USD"}, }) suite.Require().NoError(err) suite.Require().Equal(&types.QueryValidatorPricesResponse{ @@ -328,7 +328,7 @@ func (suite *KeeperTestSuite) TestQueryValidValidator() { // query and check res, err := queryClient.ValidValidator(context.Background(), &types.QueryValidValidatorRequest{ - ValidatorAddress: ValidValidator.String(), + Validator: ValidValidator.String(), }) suite.Require().NoError(err) suite.Require().Equal(&types.QueryValidValidatorResponse{ @@ -336,7 +336,7 @@ func (suite *KeeperTestSuite) TestQueryValidValidator() { }, res) res, err = queryClient.ValidValidator(context.Background(), &types.QueryValidValidatorRequest{ - ValidatorAddress: InvalidValidator.String(), + Validator: InvalidValidator.String(), }) suite.Require().NoError(err) suite.Require().Equal(&types.QueryValidValidatorResponse{ diff --git a/x/feeds/types/query.pb.go b/x/feeds/types/query.pb.go index 041a1be38..2824d057f 100644 --- a/x/feeds/types/query.pb.go +++ b/x/feeds/types/query.pb.go @@ -383,10 +383,10 @@ func (m *QueryVoteResponse) GetSignals() []Signal { // QueryIsFeederRequest is the request type for the Query/IsFeeder RPC method. type QueryIsFeederRequest struct { - // validator_address is a validator address. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // feeder_address is a candidate account. - FeederAddress string `protobuf:"bytes,2,opt,name=feeder_address,json=feederAddress,proto3" json:"feeder_address,omitempty"` + // validator is a validator address. + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` + // feeder is a candidate account. + Feeder string `protobuf:"bytes,2,opt,name=feeder,proto3" json:"feeder,omitempty"` } func (m *QueryIsFeederRequest) Reset() { *m = QueryIsFeederRequest{} } @@ -422,16 +422,16 @@ func (m *QueryIsFeederRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryIsFeederRequest proto.InternalMessageInfo -func (m *QueryIsFeederRequest) GetValidatorAddress() string { +func (m *QueryIsFeederRequest) GetValidator() string { if m != nil { - return m.ValidatorAddress + return m.Validator } return "" } -func (m *QueryIsFeederRequest) GetFeederAddress() string { +func (m *QueryIsFeederRequest) GetFeeder() string { if m != nil { - return m.FeederAddress + return m.Feeder } return "" } @@ -962,8 +962,8 @@ func (m *QuerySignalTotalPowersResponse) GetPagination() *query.PageResponse { // QueryValidValidatorRequest is the request type for the Query/ValidValidator RPC method. type QueryValidValidatorRequest struct { - // validator_address is the validator address to query the flag. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // validator is the validator address to query the flag. + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` } func (m *QueryValidValidatorRequest) Reset() { *m = QueryValidValidatorRequest{} } @@ -999,9 +999,9 @@ func (m *QueryValidValidatorRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidValidatorRequest proto.InternalMessageInfo -func (m *QueryValidValidatorRequest) GetValidatorAddress() string { +func (m *QueryValidValidatorRequest) GetValidator() string { if m != nil { - return m.ValidatorAddress + return m.Validator } return "" } @@ -1054,8 +1054,8 @@ func (m *QueryValidValidatorResponse) GetValid() bool { // QueryValidatorPricesRequest is the request type for the Query/ValidatorPrices RPC method. type QueryValidatorPricesRequest struct { - // validator_address is the validator address to query prices for. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // validator is the validator address to query prices for. + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` // signal_ids is the list of signal ids to query the price for. SignalIds []string `protobuf:"bytes,2,rep,name=signal_ids,json=signalIds,proto3" json:"signal_ids,omitempty"` } @@ -1093,9 +1093,9 @@ func (m *QueryValidatorPricesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryValidatorPricesRequest proto.InternalMessageInfo -func (m *QueryValidatorPricesRequest) GetValidatorAddress() string { +func (m *QueryValidatorPricesRequest) GetValidator() string { if m != nil { - return m.ValidatorAddress + return m.Validator } return "" } @@ -1183,85 +1183,83 @@ func init() { func init() { proto.RegisterFile("band/feeds/v1beta1/query.proto", fileDescriptor_39690037efa6f66f) } var fileDescriptor_39690037efa6f66f = []byte{ - // 1238 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xdf, 0x4f, 0x1c, 0xd5, - 0x17, 0xc0, 0x19, 0xbe, 0x85, 0x2f, 0x1c, 0x0a, 0x85, 0x5b, 0x48, 0x61, 0x80, 0x6d, 0x99, 0x52, - 0x0a, 0xd8, 0x9d, 0x81, 0xa5, 0x54, 0x83, 0x7d, 0xe9, 0xd6, 0x54, 0xab, 0x89, 0xc5, 0x45, 0xb1, - 0xf1, 0x65, 0x33, 0xec, 0x5e, 0x86, 0x31, 0xcb, 0xcc, 0x76, 0xee, 0xec, 0xda, 0x86, 0x10, 0xa3, - 0x0f, 0x3e, 0x69, 0x62, 0xe3, 0x7f, 0xa0, 0x89, 0x8f, 0x3e, 0x98, 0xea, 0xdf, 0xd0, 0x07, 0x1f, - 0x9a, 0xfa, 0xe2, 0x93, 0x31, 0xe0, 0x1f, 0x62, 0xe6, 0xdc, 0x33, 0xcb, 0xce, 0xec, 0x0c, 0xb3, - 0xc4, 0xc6, 0x27, 0x98, 0x7b, 0x7e, 0x7d, 0xee, 0xb9, 0xe7, 0x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f, 0xfa, 0x15, 0xb7, 0x66, 0x54, 0xf6, 0x4c, 0xdb, 0x31, 0x9a, 0x6b, 0xc6, 0x63, 0x8a, 0xe8, - 0x3f, 0xa9, 0x73, 0xb1, 0xd3, 0x8f, 0x0a, 0x6b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x49, 0x27, - 0x81, 0xfd, 0xfc, 0x10, 0x00, 0x00, + // 1209 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0x4f, 0x4f, 0xdc, 0x46, + 0x14, 0xc0, 0x31, 0x0d, 0x94, 0x7d, 0xe4, 0x0f, 0x4c, 0x40, 0x01, 0x03, 0x9b, 0xe0, 0x50, 0x02, + 0x14, 0xdb, 0xb0, 0x24, 0x6d, 0x95, 0x4b, 0x15, 0x52, 0xa5, 0x4d, 0x7b, 0x08, 0x5d, 0xda, 0x34, + 0xaa, 0x54, 0xad, 0x8c, 0x77, 0x30, 0x96, 0x16, 0x7b, 0xe3, 0xf1, 0x6e, 0x13, 0x21, 0x54, 0xb5, + 0x87, 0x4a, 0x3d, 0x54, 0x6a, 0x94, 0x6f, 0xd0, 0x43, 0x0f, 0x55, 0x8f, 0x69, 0x3f, 0x43, 0x8e, + 0x51, 0x7a, 0xe9, 0xa9, 0xaa, 0xa0, 0x1f, 0xa4, 0xf2, 0x9b, 0xe7, 0x65, 0x6d, 0x6c, 0xbc, 0x28, + 0x51, 0x4f, 0xac, 0xe7, 0xfd, 0xfb, 0xcd, 0x9b, 0x37, 0x6f, 0x1e, 0x50, 0xde, 0xb2, 0xbc, 0xba, + 0xb9, 0xcd, 0x79, 0x5d, 0x98, 0xed, 0xd5, 0x2d, 0x1e, 0x5a, 0xab, 0xe6, 0xc3, 0x16, 0x0f, 0x1e, + 0x1b, 0xcd, 0xc0, 0x0f, 0x7d, 0xc6, 0x22, 0xb9, 0x81, 0x72, 0x83, 0xe4, 0x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, 0x2d, 0xcb, 0x6f, 0x7a, + 0x79, 0xf3, 0x81, 0x5a, 0x39, 0x8d, 0x49, 0xc1, 0x7d, 0x93, 0x47, 0xaa, 0xe3, 0xf3, 0xae, 0xcb, + 0xe7, 0x3d, 0x02, 0x3d, 0x9f, 0x7c, 0xfd, 0x58, 0x7e, 0x9f, 0xc9, 0x7c, 0x85, 0x55, 0xb3, 0x67, + 0x7d, 0xe2, 0x5b, 0x43, 0x3e, 0x9d, 0xbd, 0x9d, 0xee, 0x07, 0xb1, 0xa6, 0x48, 0xdc, 0x42, 0xfc, + 0xc9, 0x7e, 0x55, 0xe0, 0x42, 0xea, 0xc9, 0x63, 0x05, 0x91, 0x8f, 0xbd, 0xcd, 0xea, 0x4a, 0xef, + 0x06, 0xc4, 0x7a, 0x1d, 0x59, 0x0d, 0xb6, 0xdc, 0x1b, 0xab, 0xac, 0xdb, 0xf5, 0x8f, 0x9e, 0x1f, + 0x94, 0x95, 0x17, 0x07, 0x65, 0xe5, 0x9f, 0x83, 0xb2, 0xf2, 0xd3, 0x61, 0xb9, 0xef, 0xc5, 0x61, + 0xb9, 0xef, 0xaf, 0xc3, 0x72, 0xdf, 0x97, 0x86, 0xe3, 0x86, 0x3b, 0xad, 0x2d, 0xc3, 0xf6, 0x77, + 0xcd, 0x88, 0x05, 0xff, 0x95, 0xb7, 0xfd, 0x86, 0x69, 0xef, 0x58, 0xae, 0x67, 0xb6, 0xd7, 0xcc, + 0x47, 0x14, 0x29, 0x7c, 0xdc, 0xe4, 0x62, 0x6b, 0x10, 0x15, 0xd6, 0xfe, 0x0b, 0x00, 0x00, 0xff, + 0xff, 0x8f, 0x6d, 0x4a, 0xd8, 0xdd, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2038,17 +2036,17 @@ func (m *QueryIsFeederRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.FeederAddress) > 0 { - i -= len(m.FeederAddress) - copy(dAtA[i:], m.FeederAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.FeederAddress))) + if len(m.Feeder) > 0 { + i -= len(m.Feeder) + copy(dAtA[i:], m.Feeder) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Feeder))) i-- dAtA[i] = 0x12 } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Validator))) i-- dAtA[i] = 0xa } @@ -2469,10 +2467,10 @@ func (m *QueryValidValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Validator))) i-- dAtA[i] = 0xa } @@ -2541,10 +2539,10 @@ func (m *QueryValidatorPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, er dAtA[i] = 0x12 } } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Validator))) i-- dAtA[i] = 0xa } @@ -2707,11 +2705,11 @@ func (m *QueryIsFeederRequest) Size() (n int) { } var l int _ = l - l = len(m.ValidatorAddress) + l = len(m.Validator) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.FeederAddress) + l = len(m.Feeder) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -2876,7 +2874,7 @@ func (m *QueryValidValidatorRequest) Size() (n int) { } var l int _ = l - l = len(m.ValidatorAddress) + l = len(m.Validator) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -2901,7 +2899,7 @@ func (m *QueryValidatorPricesRequest) Size() (n int) { } var l int _ = l - l = len(m.ValidatorAddress) + l = len(m.Validator) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -3565,7 +3563,7 @@ func (m *QueryIsFeederRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3593,11 +3591,11 @@ func (m *QueryIsFeederRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + m.Validator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeederAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Feeder", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3625,7 +3623,7 @@ func (m *QueryIsFeederRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FeederAddress = string(dAtA[iNdEx:postIndex]) + m.Feeder = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4656,7 +4654,7 @@ func (m *QueryValidValidatorRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4684,7 +4682,7 @@ func (m *QueryValidValidatorRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + m.Validator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4808,7 +4806,7 @@ func (m *QueryValidatorPricesRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4836,7 +4834,7 @@ func (m *QueryValidatorPricesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + m.Validator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/feeds/types/query.pb.gw.go b/x/feeds/types/query.pb.gw.go index 61e189b92..4c44bb21b 100644 --- a/x/feeds/types/query.pb.gw.go +++ b/x/feeds/types/query.pb.gw.go @@ -188,26 +188,26 @@ func request_Query_IsFeeder_0(ctx context.Context, marshaler runtime.Marshaler, _ = err ) - val, ok = pathParams["validator_address"] + val, ok = pathParams["validator"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator") } - protoReq.ValidatorAddress, err = runtime.String(val) + protoReq.Validator, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator", err) } - val, ok = pathParams["feeder_address"] + val, ok = pathParams["feeder"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "feeder_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "feeder") } - protoReq.FeederAddress, err = runtime.String(val) + protoReq.Feeder, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "feeder_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "feeder", err) } msg, err := client.IsFeeder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -226,26 +226,26 @@ func local_request_Query_IsFeeder_0(ctx context.Context, marshaler runtime.Marsh _ = err ) - val, ok = pathParams["validator_address"] + val, ok = pathParams["validator"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator") } - protoReq.ValidatorAddress, err = runtime.String(val) + protoReq.Validator, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator", err) } - val, ok = pathParams["feeder_address"] + val, ok = pathParams["feeder"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "feeder_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "feeder") } - protoReq.FeederAddress, err = runtime.String(val) + protoReq.Feeder, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "feeder_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "feeder", err) } msg, err := server.IsFeeder(ctx, &protoReq) @@ -426,15 +426,15 @@ func request_Query_ValidValidator_0(ctx context.Context, marshaler runtime.Marsh _ = err ) - val, ok = pathParams["validator_address"] + val, ok = pathParams["validator"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator") } - protoReq.ValidatorAddress, err = runtime.String(val) + protoReq.Validator, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator", err) } msg, err := client.ValidValidator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -453,15 +453,15 @@ func local_request_Query_ValidValidator_0(ctx context.Context, marshaler runtime _ = err ) - val, ok = pathParams["validator_address"] + val, ok = pathParams["validator"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator") } - protoReq.ValidatorAddress, err = runtime.String(val) + protoReq.Validator, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator", err) } msg, err := server.ValidValidator(ctx, &protoReq) @@ -470,7 +470,7 @@ func local_request_Query_ValidValidator_0(ctx context.Context, marshaler runtime } var ( - filter_Query_ValidatorPrices_0 = &utilities.DoubleArray{Encoding: map[string]int{"validator_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_ValidatorPrices_0 = &utilities.DoubleArray{Encoding: map[string]int{"validator": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Query_ValidatorPrices_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -484,15 +484,15 @@ func request_Query_ValidatorPrices_0(ctx context.Context, marshaler runtime.Mars _ = err ) - val, ok = pathParams["validator_address"] + val, ok = pathParams["validator"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator") } - protoReq.ValidatorAddress, err = runtime.String(val) + protoReq.Validator, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator", err) } if err := req.ParseForm(); err != nil { @@ -518,15 +518,15 @@ func local_request_Query_ValidatorPrices_0(ctx context.Context, marshaler runtim _ = err ) - val, ok = pathParams["validator_address"] + val, ok = pathParams["validator"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator_address") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validator") } - protoReq.ValidatorAddress, err = runtime.String(val) + protoReq.Validator, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator_address", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validator", err) } if err := req.ParseForm(); err != nil { @@ -1116,7 +1116,7 @@ var ( pattern_Query_Vote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "voters", "voter", "vote"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_IsFeeder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"feeds", "v1beta1", "feeder", "validator_address", "feeder_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_IsFeeder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 2}, []string{"feeds", "v1beta1", "feeder", "validator"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"feeds", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1128,9 +1128,9 @@ var ( pattern_Query_SignalTotalPowers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"feeds", "v1beta1", "signal-total-powers"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ValidValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "validators", "validator_address", "valid"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ValidValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "validators", "validator", "valid"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ValidatorPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "validators", "validator_address", "prices"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ValidatorPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"feeds", "v1beta1", "validators", "validator", "prices"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( From 6cfed01968565339b4ca8b251f1e2eb4a52e102f Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 1 Nov 2024 20:21:12 +0700 Subject: [PATCH 211/272] fix msg name --- api/band/feeds/v1beta1/tx.pulsar.go | 530 +++++++++++++-------------- api/band/feeds/v1beta1/tx_grpc.pb.go | 34 +- proto/band/feeds/v1beta1/tx.proto | 14 +- x/feeds/README.md | 14 +- x/feeds/client/cli/tx.go | 8 +- x/feeds/keeper/grpc_query_test.go | 2 +- x/feeds/keeper/msg_server.go | 10 +- x/feeds/keeper/msg_server_test.go | 16 +- x/feeds/types/codec.go | 4 +- x/feeds/types/msgs.go | 16 +- x/feeds/types/msgs_test.go | 12 +- x/feeds/types/tx.pb.go | 215 ++++++----- 12 files changed, 436 insertions(+), 439 deletions(-) diff --git a/api/band/feeds/v1beta1/tx.pulsar.go b/api/band/feeds/v1beta1/tx.pulsar.go index 9ec1c32fb..4be14221c 100644 --- a/api/band/feeds/v1beta1/tx.pulsar.go +++ b/api/band/feeds/v1beta1/tx.pulsar.go @@ -16,79 +16,79 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_MsgVoteSignals_2_list)(nil) +var _ protoreflect.List = (*_MsgVote_2_list)(nil) -type _MsgVoteSignals_2_list struct { +type _MsgVote_2_list struct { list *[]*Signal } -func (x *_MsgVoteSignals_2_list) Len() int { +func (x *_MsgVote_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgVoteSignals_2_list) Get(i int) protoreflect.Value { +func (x *_MsgVote_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgVoteSignals_2_list) Set(i int, value protoreflect.Value) { +func (x *_MsgVote_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Signal) (*x.list)[i] = concreteValue } -func (x *_MsgVoteSignals_2_list) Append(value protoreflect.Value) { +func (x *_MsgVote_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Signal) *x.list = append(*x.list, concreteValue) } -func (x *_MsgVoteSignals_2_list) AppendMutable() protoreflect.Value { +func (x *_MsgVote_2_list) AppendMutable() protoreflect.Value { v := new(Signal) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgVoteSignals_2_list) Truncate(n int) { +func (x *_MsgVote_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgVoteSignals_2_list) NewElement() protoreflect.Value { +func (x *_MsgVote_2_list) NewElement() protoreflect.Value { v := new(Signal) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgVoteSignals_2_list) IsValid() bool { +func (x *_MsgVote_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgVoteSignals protoreflect.MessageDescriptor - fd_MsgVoteSignals_voter protoreflect.FieldDescriptor - fd_MsgVoteSignals_signals protoreflect.FieldDescriptor + md_MsgVote protoreflect.MessageDescriptor + fd_MsgVote_voter protoreflect.FieldDescriptor + fd_MsgVote_signals protoreflect.FieldDescriptor ) func init() { file_band_feeds_v1beta1_tx_proto_init() - md_MsgVoteSignals = File_band_feeds_v1beta1_tx_proto.Messages().ByName("MsgVoteSignals") - fd_MsgVoteSignals_voter = md_MsgVoteSignals.Fields().ByName("voter") - fd_MsgVoteSignals_signals = md_MsgVoteSignals.Fields().ByName("signals") + md_MsgVote = File_band_feeds_v1beta1_tx_proto.Messages().ByName("MsgVote") + fd_MsgVote_voter = md_MsgVote.Fields().ByName("voter") + fd_MsgVote_signals = md_MsgVote.Fields().ByName("signals") } -var _ protoreflect.Message = (*fastReflection_MsgVoteSignals)(nil) +var _ protoreflect.Message = (*fastReflection_MsgVote)(nil) -type fastReflection_MsgVoteSignals MsgVoteSignals +type fastReflection_MsgVote MsgVote -func (x *MsgVoteSignals) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteSignals)(x) +func (x *MsgVote) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVote)(x) } -func (x *MsgVoteSignals) slowProtoReflect() protoreflect.Message { +func (x *MsgVote) slowProtoReflect() protoreflect.Message { mi := &file_band_feeds_v1beta1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -100,43 +100,43 @@ func (x *MsgVoteSignals) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgVoteSignals_messageType fastReflection_MsgVoteSignals_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteSignals_messageType{} +var _fastReflection_MsgVote_messageType fastReflection_MsgVote_messageType +var _ protoreflect.MessageType = fastReflection_MsgVote_messageType{} -type fastReflection_MsgVoteSignals_messageType struct{} +type fastReflection_MsgVote_messageType struct{} -func (x fastReflection_MsgVoteSignals_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteSignals)(nil) +func (x fastReflection_MsgVote_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVote)(nil) } -func (x fastReflection_MsgVoteSignals_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteSignals) +func (x fastReflection_MsgVote_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVote) } -func (x fastReflection_MsgVoteSignals_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteSignals +func (x fastReflection_MsgVote_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVote } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgVoteSignals) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteSignals +func (x *fastReflection_MsgVote) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVote } // 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_MsgVoteSignals) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteSignals_messageType +func (x *fastReflection_MsgVote) Type() protoreflect.MessageType { + return _fastReflection_MsgVote_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteSignals) New() protoreflect.Message { - return new(fastReflection_MsgVoteSignals) +func (x *fastReflection_MsgVote) New() protoreflect.Message { + return new(fastReflection_MsgVote) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteSignals) Interface() protoreflect.ProtoMessage { - return (*MsgVoteSignals)(x) +func (x *fastReflection_MsgVote) Interface() protoreflect.ProtoMessage { + return (*MsgVote)(x) } // Range iterates over every populated field in an undefined order, @@ -144,16 +144,16 @@ func (x *fastReflection_MsgVoteSignals) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgVoteSignals) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgVote) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Voter != "" { value := protoreflect.ValueOfString(x.Voter) - if !f(fd_MsgVoteSignals_voter, value) { + if !f(fd_MsgVote_voter, value) { return } } if len(x.Signals) != 0 { - value := protoreflect.ValueOfList(&_MsgVoteSignals_2_list{list: &x.Signals}) - if !f(fd_MsgVoteSignals_signals, value) { + value := protoreflect.ValueOfList(&_MsgVote_2_list{list: &x.Signals}) + if !f(fd_MsgVote_signals, value) { return } } @@ -170,17 +170,17 @@ func (x *fastReflection_MsgVoteSignals) Range(f func(protoreflect.FieldDescripto // 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_MsgVoteSignals) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgVote) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.feeds.v1beta1.MsgVoteSignals.voter": + case "band.feeds.v1beta1.MsgVote.voter": return x.Voter != "" - case "band.feeds.v1beta1.MsgVoteSignals.signals": + case "band.feeds.v1beta1.MsgVote.signals": return len(x.Signals) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVote does not contain field %s", fd.FullName())) } } @@ -190,17 +190,17 @@ func (x *fastReflection_MsgVoteSignals) Has(fd protoreflect.FieldDescriptor) boo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteSignals) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgVote) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.feeds.v1beta1.MsgVoteSignals.voter": + case "band.feeds.v1beta1.MsgVote.voter": x.Voter = "" - case "band.feeds.v1beta1.MsgVoteSignals.signals": + case "band.feeds.v1beta1.MsgVote.signals": x.Signals = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVote does not contain field %s", fd.FullName())) } } @@ -210,22 +210,22 @@ func (x *fastReflection_MsgVoteSignals) Clear(fd protoreflect.FieldDescriptor) { // 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_MsgVoteSignals) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVote) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.feeds.v1beta1.MsgVoteSignals.voter": + case "band.feeds.v1beta1.MsgVote.voter": value := x.Voter return protoreflect.ValueOfString(value) - case "band.feeds.v1beta1.MsgVoteSignals.signals": + case "band.feeds.v1beta1.MsgVote.signals": if len(x.Signals) == 0 { - return protoreflect.ValueOfList(&_MsgVoteSignals_2_list{}) + return protoreflect.ValueOfList(&_MsgVote_2_list{}) } - listValue := &_MsgVoteSignals_2_list{list: &x.Signals} + listValue := &_MsgVote_2_list{list: &x.Signals} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVote does not contain field %s", descriptor.FullName())) } } @@ -239,19 +239,19 @@ func (x *fastReflection_MsgVoteSignals) Get(descriptor protoreflect.FieldDescrip // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteSignals) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgVote) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.feeds.v1beta1.MsgVoteSignals.voter": + case "band.feeds.v1beta1.MsgVote.voter": x.Voter = value.Interface().(string) - case "band.feeds.v1beta1.MsgVoteSignals.signals": + case "band.feeds.v1beta1.MsgVote.signals": lv := value.List() - clv := lv.(*_MsgVoteSignals_2_list) + clv := lv.(*_MsgVote_2_list) x.Signals = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVote does not contain field %s", fd.FullName())) } } @@ -265,49 +265,49 @@ func (x *fastReflection_MsgVoteSignals) Set(fd protoreflect.FieldDescriptor, val // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteSignals) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVote) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.MsgVoteSignals.signals": + case "band.feeds.v1beta1.MsgVote.signals": if x.Signals == nil { x.Signals = []*Signal{} } - value := &_MsgVoteSignals_2_list{list: &x.Signals} + value := &_MsgVote_2_list{list: &x.Signals} return protoreflect.ValueOfList(value) - case "band.feeds.v1beta1.MsgVoteSignals.voter": - panic(fmt.Errorf("field voter of message band.feeds.v1beta1.MsgVoteSignals is not mutable")) + case "band.feeds.v1beta1.MsgVote.voter": + panic(fmt.Errorf("field voter of message band.feeds.v1beta1.MsgVote is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVote 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_MsgVoteSignals) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVote) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.feeds.v1beta1.MsgVoteSignals.voter": + case "band.feeds.v1beta1.MsgVote.voter": return protoreflect.ValueOfString("") - case "band.feeds.v1beta1.MsgVoteSignals.signals": + case "band.feeds.v1beta1.MsgVote.signals": list := []*Signal{} - return protoreflect.ValueOfList(&_MsgVoteSignals_2_list{list: &list}) + return protoreflect.ValueOfList(&_MsgVote_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignals")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVote")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignals does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVote 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_MsgVoteSignals) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgVote) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.MsgVoteSignals", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.MsgVote", d.FullName())) } panic("unreachable") } @@ -315,7 +315,7 @@ func (x *fastReflection_MsgVoteSignals) WhichOneof(d protoreflect.OneofDescripto // 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_MsgVoteSignals) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgVote) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -326,7 +326,7 @@ func (x *fastReflection_MsgVoteSignals) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteSignals) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgVote) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -338,7 +338,7 @@ func (x *fastReflection_MsgVoteSignals) SetUnknown(fields protoreflect.RawFields // 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_MsgVoteSignals) IsValid() bool { +func (x *fastReflection_MsgVote) IsValid() bool { return x != nil } @@ -348,9 +348,9 @@ func (x *fastReflection_MsgVoteSignals) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgVoteSignals) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgVote) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteSignals) + x := input.Message.Interface().(*MsgVote) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -382,7 +382,7 @@ func (x *fastReflection_MsgVoteSignals) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteSignals) + x := input.Message.Interface().(*MsgVote) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -435,7 +435,7 @@ func (x *fastReflection_MsgVoteSignals) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteSignals) + x := input.Message.Interface().(*MsgVote) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -467,10 +467,10 @@ func (x *fastReflection_MsgVoteSignals) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteSignals: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVote: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteSignals: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -575,23 +575,23 @@ func (x *fastReflection_MsgVoteSignals) ProtoMethods() *protoiface.Methods { } var ( - md_MsgVoteSignalsResponse protoreflect.MessageDescriptor + md_MsgVoteResponse protoreflect.MessageDescriptor ) func init() { file_band_feeds_v1beta1_tx_proto_init() - md_MsgVoteSignalsResponse = File_band_feeds_v1beta1_tx_proto.Messages().ByName("MsgVoteSignalsResponse") + md_MsgVoteResponse = File_band_feeds_v1beta1_tx_proto.Messages().ByName("MsgVoteResponse") } -var _ protoreflect.Message = (*fastReflection_MsgVoteSignalsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgVoteResponse)(nil) -type fastReflection_MsgVoteSignalsResponse MsgVoteSignalsResponse +type fastReflection_MsgVoteResponse MsgVoteResponse -func (x *MsgVoteSignalsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteSignalsResponse)(x) +func (x *MsgVoteResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteResponse)(x) } -func (x *MsgVoteSignalsResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgVoteResponse) slowProtoReflect() protoreflect.Message { mi := &file_band_feeds_v1beta1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -603,43 +603,43 @@ func (x *MsgVoteSignalsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgVoteSignalsResponse_messageType fastReflection_MsgVoteSignalsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteSignalsResponse_messageType{} +var _fastReflection_MsgVoteResponse_messageType fastReflection_MsgVoteResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteResponse_messageType{} -type fastReflection_MsgVoteSignalsResponse_messageType struct{} +type fastReflection_MsgVoteResponse_messageType struct{} -func (x fastReflection_MsgVoteSignalsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteSignalsResponse)(nil) +func (x fastReflection_MsgVoteResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteResponse)(nil) } -func (x fastReflection_MsgVoteSignalsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteSignalsResponse) +func (x fastReflection_MsgVoteResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteResponse) } -func (x fastReflection_MsgVoteSignalsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteSignalsResponse +func (x fastReflection_MsgVoteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgVoteSignalsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteSignalsResponse +func (x *fastReflection_MsgVoteResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteResponse } // 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_MsgVoteSignalsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteSignalsResponse_messageType +func (x *fastReflection_MsgVoteResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteSignalsResponse) New() protoreflect.Message { - return new(fastReflection_MsgVoteSignalsResponse) +func (x *fastReflection_MsgVoteResponse) New() protoreflect.Message { + return new(fastReflection_MsgVoteResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteSignalsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgVoteSignalsResponse)(x) +func (x *fastReflection_MsgVoteResponse) Interface() protoreflect.ProtoMessage { + return (*MsgVoteResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -647,7 +647,7 @@ func (x *fastReflection_MsgVoteSignalsResponse) Interface() protoreflect.ProtoMe // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgVoteSignalsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgVoteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -661,13 +661,13 @@ func (x *fastReflection_MsgVoteSignalsResponse) Range(f func(protoreflect.FieldD // 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_MsgVoteSignalsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgVoteResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteResponse does not contain field %s", fd.FullName())) } } @@ -677,13 +677,13 @@ func (x *fastReflection_MsgVoteSignalsResponse) Has(fd protoreflect.FieldDescrip // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteSignalsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgVoteResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteResponse does not contain field %s", fd.FullName())) } } @@ -693,13 +693,13 @@ func (x *fastReflection_MsgVoteSignalsResponse) Clear(fd protoreflect.FieldDescr // 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_MsgVoteSignalsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteResponse does not contain field %s", descriptor.FullName())) } } @@ -713,13 +713,13 @@ func (x *fastReflection_MsgVoteSignalsResponse) Get(descriptor protoreflect.Fiel // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteSignalsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgVoteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteResponse does not contain field %s", fd.FullName())) } } @@ -733,36 +733,36 @@ func (x *fastReflection_MsgVoteSignalsResponse) Set(fd protoreflect.FieldDescrip // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteSignalsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteResponse 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_MsgVoteSignalsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteSignalsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.feeds.v1beta1.MsgVoteResponse")) } - panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteSignalsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.feeds.v1beta1.MsgVoteResponse 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_MsgVoteSignalsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgVoteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.MsgVoteSignalsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.feeds.v1beta1.MsgVoteResponse", d.FullName())) } panic("unreachable") } @@ -770,7 +770,7 @@ func (x *fastReflection_MsgVoteSignalsResponse) WhichOneof(d protoreflect.OneofD // 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_MsgVoteSignalsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgVoteResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -781,7 +781,7 @@ func (x *fastReflection_MsgVoteSignalsResponse) GetUnknown() protoreflect.RawFie // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteSignalsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgVoteResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -793,7 +793,7 @@ func (x *fastReflection_MsgVoteSignalsResponse) SetUnknown(fields protoreflect.R // 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_MsgVoteSignalsResponse) IsValid() bool { +func (x *fastReflection_MsgVoteResponse) IsValid() bool { return x != nil } @@ -803,9 +803,9 @@ func (x *fastReflection_MsgVoteSignalsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgVoteSignalsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgVoteResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteSignalsResponse) + x := input.Message.Interface().(*MsgVoteResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -827,7 +827,7 @@ func (x *fastReflection_MsgVoteSignalsResponse) ProtoMethods() *protoiface.Metho } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteSignalsResponse) + x := input.Message.Interface().(*MsgVoteResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -857,7 +857,7 @@ func (x *fastReflection_MsgVoteSignalsResponse) ProtoMethods() *protoiface.Metho }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteSignalsResponse) + x := input.Message.Interface().(*MsgVoteResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -889,10 +889,10 @@ func (x *fastReflection_MsgVoteSignalsResponse) ProtoMethods() *protoiface.Metho fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteSignalsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteSignalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3615,8 +3615,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// MsgVoteSignals is the transaction message to vote signals. -type MsgVoteSignals struct { +// MsgVote is the transaction message to vote signals. +type MsgVote struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3627,8 +3627,8 @@ type MsgVoteSignals struct { Signals []*Signal `protobuf:"bytes,2,rep,name=signals,proto3" json:"signals,omitempty"` } -func (x *MsgVoteSignals) Reset() { - *x = MsgVoteSignals{} +func (x *MsgVote) Reset() { + *x = MsgVote{} if protoimpl.UnsafeEnabled { mi := &file_band_feeds_v1beta1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3636,40 +3636,40 @@ func (x *MsgVoteSignals) Reset() { } } -func (x *MsgVoteSignals) String() string { +func (x *MsgVote) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgVoteSignals) ProtoMessage() {} +func (*MsgVote) ProtoMessage() {} -// Deprecated: Use MsgVoteSignals.ProtoReflect.Descriptor instead. -func (*MsgVoteSignals) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgVote.ProtoReflect.Descriptor instead. +func (*MsgVote) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_tx_proto_rawDescGZIP(), []int{0} } -func (x *MsgVoteSignals) GetVoter() string { +func (x *MsgVote) GetVoter() string { if x != nil { return x.Voter } return "" } -func (x *MsgVoteSignals) GetSignals() []*Signal { +func (x *MsgVote) GetSignals() []*Signal { if x != nil { return x.Signals } return nil } -// MsgVoteSignalsResponse is the response type for the Msg/VoteSignals RPC method. -type MsgVoteSignalsResponse struct { +// MsgVoteResponse is the response type for the Msg/Vote RPC method. +type MsgVoteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgVoteSignalsResponse) Reset() { - *x = MsgVoteSignalsResponse{} +func (x *MsgVoteResponse) Reset() { + *x = MsgVoteResponse{} if protoimpl.UnsafeEnabled { mi := &file_band_feeds_v1beta1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3677,14 +3677,14 @@ func (x *MsgVoteSignalsResponse) Reset() { } } -func (x *MsgVoteSignalsResponse) String() string { +func (x *MsgVoteResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgVoteSignalsResponse) ProtoMessage() {} +func (*MsgVoteResponse) ProtoMessage() {} -// Deprecated: Use MsgVoteSignalsResponse.ProtoReflect.Descriptor instead. -func (*MsgVoteSignalsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgVoteResponse.ProtoReflect.Descriptor instead. +func (*MsgVoteResponse) Descriptor() ([]byte, []int) { return file_band_feeds_v1beta1_tx_proto_rawDescGZIP(), []int{1} } @@ -3932,108 +3932,106 @@ var file_band_feeds_v1beta1_tx_proto_rawDesc = []byte{ 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, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xa1, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 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, 0x05, 0x76, 0x6f, 0x74, - 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x3a, 0x23, - 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, 0x01, - 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, - 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, - 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, - 0x72, 0x69, 0x63, 0x65, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xee, 0x01, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x67, 0x0a, 0x17, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, 0x6e, + 0x93, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x76, + 0x6f, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x07, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x3a, 0x1c, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, + 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, + 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, + 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xee, 0x01, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x05, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x67, 0x0a, 0x17, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x15, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x33, 0x82, + 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x8a, 0xe7, 0xb0, 0x2a, 0x24, 0x66, 0x65, + 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0x28, 0x0a, 0x26, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xad, 0x01, 0x0a, + 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbc, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x48, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, + 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x23, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, + 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, + 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x1a, 0x3a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x15, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x8a, 0xe7, - 0xb0, 0x2a, 0x24, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x28, 0x0a, 0x26, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xad, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, + 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd1, 0x03, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5d, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x73, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x1a, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x3a, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, - 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x62, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, - 0x42, 0xd1, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, - 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x66, 0x65, 0x65, 0x64, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, - 0x46, 0x58, 0xaa, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, - 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, - 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, - 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x65, 0x65, 0x64, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x46, 0x58, 0xaa, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x2e, + 0x46, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x12, + 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x1e, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x46, 0x65, 0x65, 0x64, 0x73, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x46, 0x65, 0x65, 0x64, + 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -4050,8 +4048,8 @@ func file_band_feeds_v1beta1_tx_proto_rawDescGZIP() []byte { var file_band_feeds_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_band_feeds_v1beta1_tx_proto_goTypes = []interface{}{ - (*MsgVoteSignals)(nil), // 0: band.feeds.v1beta1.MsgVoteSignals - (*MsgVoteSignalsResponse)(nil), // 1: band.feeds.v1beta1.MsgVoteSignalsResponse + (*MsgVote)(nil), // 0: band.feeds.v1beta1.MsgVote + (*MsgVoteResponse)(nil), // 1: band.feeds.v1beta1.MsgVoteResponse (*MsgSubmitSignalPrices)(nil), // 2: band.feeds.v1beta1.MsgSubmitSignalPrices (*MsgSubmitSignalPricesResponse)(nil), // 3: band.feeds.v1beta1.MsgSubmitSignalPricesResponse (*MsgUpdateReferenceSourceConfig)(nil), // 4: band.feeds.v1beta1.MsgUpdateReferenceSourceConfig @@ -4064,15 +4062,15 @@ var file_band_feeds_v1beta1_tx_proto_goTypes = []interface{}{ (*Params)(nil), // 11: band.feeds.v1beta1.Params } var file_band_feeds_v1beta1_tx_proto_depIdxs = []int32{ - 8, // 0: band.feeds.v1beta1.MsgVoteSignals.signals:type_name -> band.feeds.v1beta1.Signal + 8, // 0: band.feeds.v1beta1.MsgVote.signals:type_name -> band.feeds.v1beta1.Signal 9, // 1: band.feeds.v1beta1.MsgSubmitSignalPrices.prices:type_name -> band.feeds.v1beta1.SignalPrice 10, // 2: band.feeds.v1beta1.MsgUpdateReferenceSourceConfig.reference_source_config:type_name -> band.feeds.v1beta1.ReferenceSourceConfig 11, // 3: band.feeds.v1beta1.MsgUpdateParams.params:type_name -> band.feeds.v1beta1.Params - 0, // 4: band.feeds.v1beta1.Msg.VoteSignals:input_type -> band.feeds.v1beta1.MsgVoteSignals + 0, // 4: band.feeds.v1beta1.Msg.Vote:input_type -> band.feeds.v1beta1.MsgVote 2, // 5: band.feeds.v1beta1.Msg.SubmitSignalPrices:input_type -> band.feeds.v1beta1.MsgSubmitSignalPrices 4, // 6: band.feeds.v1beta1.Msg.UpdateReferenceSourceConfig:input_type -> band.feeds.v1beta1.MsgUpdateReferenceSourceConfig 6, // 7: band.feeds.v1beta1.Msg.UpdateParams:input_type -> band.feeds.v1beta1.MsgUpdateParams - 1, // 8: band.feeds.v1beta1.Msg.VoteSignals:output_type -> band.feeds.v1beta1.MsgVoteSignalsResponse + 1, // 8: band.feeds.v1beta1.Msg.Vote:output_type -> band.feeds.v1beta1.MsgVoteResponse 3, // 9: band.feeds.v1beta1.Msg.SubmitSignalPrices:output_type -> band.feeds.v1beta1.MsgSubmitSignalPricesResponse 5, // 10: band.feeds.v1beta1.Msg.UpdateReferenceSourceConfig:output_type -> band.feeds.v1beta1.MsgUpdateReferenceSourceConfigResponse 7, // 11: band.feeds.v1beta1.Msg.UpdateParams:output_type -> band.feeds.v1beta1.MsgUpdateParamsResponse @@ -4092,7 +4090,7 @@ func file_band_feeds_v1beta1_tx_proto_init() { file_band_feeds_v1beta1_params_proto_init() if !protoimpl.UnsafeEnabled { file_band_feeds_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteSignals); i { + switch v := v.(*MsgVote); i { case 0: return &v.state case 1: @@ -4104,7 +4102,7 @@ func file_band_feeds_v1beta1_tx_proto_init() { } } file_band_feeds_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteSignalsResponse); i { + switch v := v.(*MsgVoteResponse); i { case 0: return &v.state case 1: diff --git a/api/band/feeds/v1beta1/tx_grpc.pb.go b/api/band/feeds/v1beta1/tx_grpc.pb.go index 8e7a1f02d..aa658569c 100644 --- a/api/band/feeds/v1beta1/tx_grpc.pb.go +++ b/api/band/feeds/v1beta1/tx_grpc.pb.go @@ -19,7 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_VoteSignals_FullMethodName = "/band.feeds.v1beta1.Msg/VoteSignals" + Msg_Vote_FullMethodName = "/band.feeds.v1beta1.Msg/Vote" Msg_SubmitSignalPrices_FullMethodName = "/band.feeds.v1beta1.Msg/SubmitSignalPrices" Msg_UpdateReferenceSourceConfig_FullMethodName = "/band.feeds.v1beta1.Msg/UpdateReferenceSourceConfig" Msg_UpdateParams_FullMethodName = "/band.feeds.v1beta1.Msg/UpdateParams" @@ -29,8 +29,8 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MsgClient interface { - // VoteSignals is an RPC method to vote signal ids and their powers. - VoteSignals(ctx context.Context, in *MsgVoteSignals, opts ...grpc.CallOption) (*MsgVoteSignalsResponse, error) + // Vote is an RPC method to vote signal ids and their powers. + Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) // SubmitSignalPrices is an RPC method to submit signal prices. SubmitSignalPrices(ctx context.Context, in *MsgSubmitSignalPrices, opts ...grpc.CallOption) (*MsgSubmitSignalPricesResponse, error) // UpdateReferenceSourceConfig is an RPC method to update reference price source configuration. @@ -47,9 +47,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } -func (c *msgClient) VoteSignals(ctx context.Context, in *MsgVoteSignals, opts ...grpc.CallOption) (*MsgVoteSignalsResponse, error) { - out := new(MsgVoteSignalsResponse) - err := c.cc.Invoke(ctx, Msg_VoteSignals_FullMethodName, in, out, opts...) +func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) { + out := new(MsgVoteResponse) + err := c.cc.Invoke(ctx, Msg_Vote_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -87,8 +87,8 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // All implementations must embed UnimplementedMsgServer // for forward compatibility type MsgServer interface { - // VoteSignals is an RPC method to vote signal ids and their powers. - VoteSignals(context.Context, *MsgVoteSignals) (*MsgVoteSignalsResponse, error) + // Vote is an RPC method to vote signal ids and their powers. + Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) // SubmitSignalPrices is an RPC method to submit signal prices. SubmitSignalPrices(context.Context, *MsgSubmitSignalPrices) (*MsgSubmitSignalPricesResponse, error) // UpdateReferenceSourceConfig is an RPC method to update reference price source configuration. @@ -102,8 +102,8 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (UnimplementedMsgServer) VoteSignals(context.Context, *MsgVoteSignals) (*MsgVoteSignalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VoteSignals not implemented") +func (UnimplementedMsgServer) Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") } func (UnimplementedMsgServer) SubmitSignalPrices(context.Context, *MsgSubmitSignalPrices) (*MsgSubmitSignalPricesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitSignalPrices not implemented") @@ -127,20 +127,20 @@ func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { s.RegisterService(&Msg_ServiceDesc, srv) } -func _Msg_VoteSignals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVoteSignals) +func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVote) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).VoteSignals(ctx, in) + return srv.(MsgServer).Vote(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_VoteSignals_FullMethodName, + FullMethod: Msg_Vote_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).VoteSignals(ctx, req.(*MsgVoteSignals)) + return srv.(MsgServer).Vote(ctx, req.(*MsgVote)) } return interceptor(ctx, in, info, handler) } @@ -207,8 +207,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "VoteSignals", - Handler: _Msg_VoteSignals_Handler, + MethodName: "Vote", + Handler: _Msg_Vote_Handler, }, { MethodName: "SubmitSignalPrices", diff --git a/proto/band/feeds/v1beta1/tx.proto b/proto/band/feeds/v1beta1/tx.proto index 3d683ee7e..52fd51da2 100644 --- a/proto/band/feeds/v1beta1/tx.proto +++ b/proto/band/feeds/v1beta1/tx.proto @@ -14,8 +14,8 @@ import "amino/amino.proto"; service Msg { option (cosmos.msg.v1.service) = true; - // VoteSignals is an RPC method to vote signal ids and their powers. - rpc VoteSignals(MsgVoteSignals) returns (MsgVoteSignalsResponse); + // Vote is an RPC method to vote signal ids and their powers. + rpc Vote(MsgVote) returns (MsgVoteResponse); // SubmitSignalPrices is an RPC method to submit signal prices. rpc SubmitSignalPrices(MsgSubmitSignalPrices) returns (MsgSubmitSignalPricesResponse); @@ -27,10 +27,10 @@ service Msg { rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } -// MsgVoteSignals is the transaction message to vote signals. -message MsgVoteSignals { +// MsgVote is the transaction message to vote signals. +message MsgVote { option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "feeds/MsgVoteSignals"; + option (amino.name) = "feeds/MsgVote"; // voter is the address of the voter that wants to vote signals. string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -39,8 +39,8 @@ message MsgVoteSignals { repeated Signal signals = 2 [(gogoproto.nullable) = false]; } -// MsgVoteSignalsResponse is the response type for the Msg/VoteSignals RPC method. -message MsgVoteSignalsResponse {} +// MsgVoteResponse is the response type for the Msg/Vote RPC method. +message MsgVoteResponse {} // MsgSubmitSignalPrices is the transaction message to submit multiple signal prices. message MsgSubmitSignalPrices { diff --git a/x/feeds/README.md b/x/feeds/README.md index 955098314..f3b3c0bc2 100644 --- a/x/feeds/README.md +++ b/x/feeds/README.md @@ -33,7 +33,7 @@ This module is used in the BandChain. - [SignalTotalPowerByPowerIndex](#signaltotalpowerbypowerindex) - [Params](#params) + [Messages](#messages) - - [MsgVoteSignals](#msgvotesignals) + - [MsgVote](#msgvote) - [MsgSubmitSignalPrices](#msgsubmitsignalprices) - [MsgUpdateReferenceSourceConfig](#msgupdatereferencesourceconfig) - [MsgUpdateParams](#msgupdateparams) @@ -50,7 +50,7 @@ This module is used in the BandChain. - [MsgSubmitSignalPrices](#msgsubmitsignalprices-1) - [MsgUpdateReferenceSourceConfig](#msgupdatereferencesourceconfig-1) - [MsgUpdateParams](#msgupdateparams-1) - - [MsgVoteSignals](#msgvotesignals-1) + - [MsgVote](#msgvote-1) ## Concepts @@ -205,7 +205,7 @@ message Params { In this section, we describe the processing of the `feeds` messages and the corresponding updates to the state. All created/modified state objects specified by each message are defined within the [state](#state) section. -### MsgVoteSignals +### MsgVote Vote contain a batch of signal and power. @@ -213,10 +213,10 @@ Batched Signals replace the previous Signals of the same voter as a batch. Signals are registered, and their power is added to the SignalTotalPower of the same SignalID. ```protobuf -// MsgVoteSignals is the transaction message to submit signals. -message MsgVoteSignals { +// MsgVote is the transaction message to submit signals. +message MsgVote { option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "feeds/MsgVoteSignals"; + option (amino.name) = "feeds/MsgVote"; // voter is the address of the voter that wants to vote signals. string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -415,7 +415,7 @@ The feeds module emits the following events: | ------------- | ------------- | --------------- | | update_params | params | {params} | -#### MsgVoteSignals +#### MsgVote | Type | Attribute Key | Attribute Value | | ------------------------- | ------------- | --------------- | diff --git a/x/feeds/client/cli/tx.go b/x/feeds/client/cli/tx.go index 7ad56247c..333de96d8 100644 --- a/x/feeds/client/cli/tx.go +++ b/x/feeds/client/cli/tx.go @@ -44,7 +44,7 @@ func GetTxCmd() *cobra.Command { GetTxCmdAddFeeders(), GetTxCmdRemoveFeeders(), GetTxCmdUpdateReferenceSourceConfig(), - GetTxCmdVoteSignals(), + GetTxCmdVote(), ) return txCmd @@ -136,8 +136,8 @@ $ %s tx feeds update-reference-source-config 1.0.0 --from mykey return cmd } -// GetTxCmdVoteSignals creates a CLI command for voting signals -func GetTxCmdVoteSignals() *cobra.Command { +// GetTxCmdVote creates a CLI command for voting signals +func GetTxCmdVote() *cobra.Command { cmd := &cobra.Command{ Use: "vote [signal_id1],[power1] [signal_id2],[power2] ...", Short: "Vote signal ids and their powers", @@ -176,7 +176,7 @@ $ %s tx feeds vote BTC,1000000 --from mykey ) } - msg := types.NewMsgVoteSignals(voter.String(), signals) + msg := types.NewMsgVote(voter.String(), signals) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, diff --git a/x/feeds/keeper/grpc_query_test.go b/x/feeds/keeper/grpc_query_test.go index ec6e09768..2f6d65a46 100644 --- a/x/feeds/keeper/grpc_query_test.go +++ b/x/feeds/keeper/grpc_query_test.go @@ -120,7 +120,7 @@ func (suite *KeeperTestSuite) TestQueryVote() { Power: 1e9, }, } - _, err := suite.msgServer.VoteSignals(ctx, &types.MsgVoteSignals{ + _, err := suite.msgServer.Vote(ctx, &types.MsgVote{ Voter: ValidVoter.String(), Signals: signals, }) diff --git a/x/feeds/keeper/msg_server.go b/x/feeds/keeper/msg_server.go index bc315029c..e8874b792 100644 --- a/x/feeds/keeper/msg_server.go +++ b/x/feeds/keeper/msg_server.go @@ -23,11 +23,11 @@ func NewMsgServerImpl(k Keeper) types.MsgServer { } } -// VoteSignals votes signals. -func (ms msgServer) VoteSignals( +// Vote votes signals. +func (ms msgServer) Vote( goCtx context.Context, - req *types.MsgVoteSignals, -) (*types.MsgVoteSignalsResponse, error) { + req *types.MsgVote, +) (*types.MsgVoteResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // convert the voter address from Bech32 format to sdk.AccAddress @@ -88,7 +88,7 @@ func (ms msgServer) VoteSignals( } // return an empty response indicating success - return &types.MsgVoteSignalsResponse{}, nil + return &types.MsgVoteResponse{}, nil } // SubmitSignalPrices submits new validator prices. diff --git a/x/feeds/keeper/msg_server_test.go b/x/feeds/keeper/msg_server_test.go index 742ff39ef..5780b52a9 100644 --- a/x/feeds/keeper/msg_server_test.go +++ b/x/feeds/keeper/msg_server_test.go @@ -2,17 +2,17 @@ package keeper_test import "github.com/bandprotocol/chain/v3/x/feeds/types" -func (suite *KeeperTestSuite) TestMsgVoteSignals() { +func (suite *KeeperTestSuite) TestMsgVote() { testCases := []struct { name string - input *types.MsgVoteSignals + input *types.MsgVote expErr bool expErrMsg string postCheck func() }{ { name: "no power", - input: &types.MsgVoteSignals{ + input: &types.MsgVote{ Voter: InvalidVoter.String(), Signals: []types.Signal{ { @@ -27,7 +27,7 @@ func (suite *KeeperTestSuite) TestMsgVoteSignals() { }, { name: "1 signal more than powers", - input: &types.MsgVoteSignals{ + input: &types.MsgVote{ Voter: ValidVoter.String(), Signals: []types.Signal{ { @@ -42,7 +42,7 @@ func (suite *KeeperTestSuite) TestMsgVoteSignals() { }, { name: "2 signals more than powers", - input: &types.MsgVoteSignals{ + input: &types.MsgVote{ Voter: ValidVoter.String(), Signals: []types.Signal{ { @@ -61,7 +61,7 @@ func (suite *KeeperTestSuite) TestMsgVoteSignals() { }, { name: "valid request", - input: &types.MsgVoteSignals{ + input: &types.MsgVote{ Voter: ValidVoter.String(), Signals: []types.Signal{ { @@ -95,7 +95,7 @@ func (suite *KeeperTestSuite) TestMsgVoteSignals() { }, { name: "valid request (replace)", - input: &types.MsgVoteSignals{ + input: &types.MsgVote{ Voter: ValidVoter.String(), Signals: []types.Signal{ { @@ -143,7 +143,7 @@ func (suite *KeeperTestSuite) TestMsgVoteSignals() { for _, tc := range testCases { suite.Run(tc.name, func() { - _, err := suite.msgServer.VoteSignals(suite.ctx, tc.input) + _, err := suite.msgServer.Vote(suite.ctx, tc.input) if tc.expErr { suite.Require().Error(err) diff --git a/x/feeds/types/codec.go b/x/feeds/types/codec.go index f48c833ea..27437bc07 100644 --- a/x/feeds/types/codec.go +++ b/x/feeds/types/codec.go @@ -12,7 +12,7 @@ import ( // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - legacy.RegisterAminoMsg(cdc, &MsgVoteSignals{}, "feeds/MsgVoteSignals") + legacy.RegisterAminoMsg(cdc, &MsgVote{}, "feeds/MsgVote") legacy.RegisterAminoMsg(cdc, &MsgSubmitSignalPrices{}, "feeds/MsgSubmitSignalPrices") legacy.RegisterAminoMsg(cdc, &MsgUpdateReferenceSourceConfig{}, "feeds/MsgUpdateReferenceSourceConfig") legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "feeds/MsgUpdateParams") @@ -24,7 +24,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), - &MsgVoteSignals{}, + &MsgVote{}, &MsgSubmitSignalPrices{}, &MsgUpdateReferenceSourceConfig{}, &MsgUpdateParams{}, diff --git a/x/feeds/types/msgs.go b/x/feeds/types/msgs.go index ffdc55d49..efba39cd3 100644 --- a/x/feeds/types/msgs.go +++ b/x/feeds/types/msgs.go @@ -11,12 +11,12 @@ var ( _ sdk.Msg = (*MsgSubmitSignalPrices)(nil) _ sdk.Msg = (*MsgUpdateParams)(nil) _ sdk.Msg = (*MsgUpdateReferenceSourceConfig)(nil) - _ sdk.Msg = (*MsgVoteSignals)(nil) + _ sdk.Msg = (*MsgVote)(nil) _ sdk.HasValidateBasic = (*MsgSubmitSignalPrices)(nil) _ sdk.HasValidateBasic = (*MsgUpdateParams)(nil) _ sdk.HasValidateBasic = (*MsgUpdateReferenceSourceConfig)(nil) - _ sdk.HasValidateBasic = (*MsgVoteSignals)(nil) + _ sdk.HasValidateBasic = (*MsgVote)(nil) ) // ==================================== @@ -121,22 +121,22 @@ func (m *MsgUpdateReferenceSourceConfig) ValidateBasic() error { } // ==================================== -// MsgVoteSignals +// MsgVote // ==================================== -// NewMsgVoteSignals creates a new MsgVoteSignals instance. -func NewMsgVoteSignals( +// NewMsgVote creates a new MsgVote instance. +func NewMsgVote( voter string, signals []Signal, -) *MsgVoteSignals { - return &MsgVoteSignals{ +) *MsgVote { + return &MsgVote{ Voter: voter, Signals: signals, } } // ValidateBasic does a check on the provided data. -func (m *MsgVoteSignals) ValidateBasic() error { +func (m *MsgVote) ValidateBasic() error { // Check if the voter address is valid if _, err := sdk.AccAddressFromBech32(m.Voter); err != nil { return errorsmod.Wrap(err, "invalid voter address") diff --git a/x/feeds/types/msgs_test.go b/x/feeds/types/msgs_test.go index b3ac379bc..ff197fa68 100644 --- a/x/feeds/types/msgs_test.go +++ b/x/feeds/types/msgs_test.go @@ -102,23 +102,23 @@ func TestMsgUpdateReferenceSourceConfig_ValidateBasic(t *testing.T) { } // ==================================== -// MsgVoteSignals +// MsgVote // ==================================== -func TestNewMsgVoteSignals(t *testing.T) { - msg := NewMsgVoteSignals(ValidVoter, ValidSignals) +func TestNewMsgVote(t *testing.T) { + msg := NewMsgVote(ValidVoter, ValidSignals) require.Equal(t, ValidVoter, msg.Voter) require.Equal(t, ValidSignals, msg.Signals) } -func TestMsgVoteSignals_ValidateBasic(t *testing.T) { +func TestMsgVote_ValidateBasic(t *testing.T) { // Valid voter - msg := NewMsgVoteSignals(ValidVoter, ValidSignals) + msg := NewMsgVote(ValidVoter, ValidSignals) err := msg.ValidateBasic() require.NoError(t, err) // Invalid voter - msg = NewMsgVoteSignals(InvalidVoter, ValidSignals) + msg = NewMsgVote(InvalidVoter, ValidSignals) err = msg.ValidateBasic() require.Error(t, err) } diff --git a/x/feeds/types/tx.pb.go b/x/feeds/types/tx.pb.go index ef892fa76..96bf1aaba 100644 --- a/x/feeds/types/tx.pb.go +++ b/x/feeds/types/tx.pb.go @@ -31,26 +31,26 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgVoteSignals is the transaction message to vote signals. -type MsgVoteSignals struct { +// MsgVote is the transaction message to vote signals. +type MsgVote struct { // voter is the address of the voter that wants to vote signals. Voter string `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"` // signals is a list of submitted signals. Signals []Signal `protobuf:"bytes,2,rep,name=signals,proto3" json:"signals"` } -func (m *MsgVoteSignals) Reset() { *m = MsgVoteSignals{} } -func (m *MsgVoteSignals) String() string { return proto.CompactTextString(m) } -func (*MsgVoteSignals) ProtoMessage() {} -func (*MsgVoteSignals) Descriptor() ([]byte, []int) { +func (m *MsgVote) Reset() { *m = MsgVote{} } +func (m *MsgVote) String() string { return proto.CompactTextString(m) } +func (*MsgVote) ProtoMessage() {} +func (*MsgVote) Descriptor() ([]byte, []int) { return fileDescriptor_e1bc41512ee10d84, []int{0} } -func (m *MsgVoteSignals) XXX_Unmarshal(b []byte) error { +func (m *MsgVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgVoteSignals) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgVoteSignals.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgVote.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -60,48 +60,48 @@ func (m *MsgVoteSignals) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *MsgVoteSignals) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgVoteSignals.Merge(m, src) +func (m *MsgVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVote.Merge(m, src) } -func (m *MsgVoteSignals) XXX_Size() int { +func (m *MsgVote) XXX_Size() int { return m.Size() } -func (m *MsgVoteSignals) XXX_DiscardUnknown() { - xxx_messageInfo_MsgVoteSignals.DiscardUnknown(m) +func (m *MsgVote) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVote.DiscardUnknown(m) } -var xxx_messageInfo_MsgVoteSignals proto.InternalMessageInfo +var xxx_messageInfo_MsgVote proto.InternalMessageInfo -func (m *MsgVoteSignals) GetVoter() string { +func (m *MsgVote) GetVoter() string { if m != nil { return m.Voter } return "" } -func (m *MsgVoteSignals) GetSignals() []Signal { +func (m *MsgVote) GetSignals() []Signal { if m != nil { return m.Signals } return nil } -// MsgVoteSignalsResponse is the response type for the Msg/VoteSignals RPC method. -type MsgVoteSignalsResponse struct { +// MsgVoteResponse is the response type for the Msg/Vote RPC method. +type MsgVoteResponse struct { } -func (m *MsgVoteSignalsResponse) Reset() { *m = MsgVoteSignalsResponse{} } -func (m *MsgVoteSignalsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgVoteSignalsResponse) ProtoMessage() {} -func (*MsgVoteSignalsResponse) Descriptor() ([]byte, []int) { +func (m *MsgVoteResponse) Reset() { *m = MsgVoteResponse{} } +func (m *MsgVoteResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteResponse) ProtoMessage() {} +func (*MsgVoteResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e1bc41512ee10d84, []int{1} } -func (m *MsgVoteSignalsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgVoteSignalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgVoteSignalsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgVoteResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -111,17 +111,17 @@ func (m *MsgVoteSignalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *MsgVoteSignalsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgVoteSignalsResponse.Merge(m, src) +func (m *MsgVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteResponse.Merge(m, src) } -func (m *MsgVoteSignalsResponse) XXX_Size() int { +func (m *MsgVoteResponse) XXX_Size() int { return m.Size() } -func (m *MsgVoteSignalsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgVoteSignalsResponse.DiscardUnknown(m) +func (m *MsgVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgVoteSignalsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgVoteResponse proto.InternalMessageInfo // MsgSubmitSignalPrices is the transaction message to submit multiple signal prices. type MsgSubmitSignalPrices struct { @@ -411,8 +411,8 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgVoteSignals)(nil), "band.feeds.v1beta1.MsgVoteSignals") - proto.RegisterType((*MsgVoteSignalsResponse)(nil), "band.feeds.v1beta1.MsgVoteSignalsResponse") + proto.RegisterType((*MsgVote)(nil), "band.feeds.v1beta1.MsgVote") + proto.RegisterType((*MsgVoteResponse)(nil), "band.feeds.v1beta1.MsgVoteResponse") proto.RegisterType((*MsgSubmitSignalPrices)(nil), "band.feeds.v1beta1.MsgSubmitSignalPrices") proto.RegisterType((*MsgSubmitSignalPricesResponse)(nil), "band.feeds.v1beta1.MsgSubmitSignalPricesResponse") proto.RegisterType((*MsgUpdateReferenceSourceConfig)(nil), "band.feeds.v1beta1.MsgUpdateReferenceSourceConfig") @@ -424,50 +424,49 @@ func init() { func init() { proto.RegisterFile("band/feeds/v1beta1/tx.proto", fileDescriptor_e1bc41512ee10d84) } var fileDescriptor_e1bc41512ee10d84 = []byte{ - // 673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x41, 0x6b, 0x13, 0x4d, - 0x18, 0xce, 0x36, 0x5f, 0xfb, 0x91, 0xa9, 0x28, 0x0e, 0xad, 0x4d, 0xb7, 0x76, 0x53, 0xb7, 0x22, - 0x69, 0xa4, 0xbb, 0x24, 0x05, 0x91, 0x05, 0x11, 0xeb, 0xc5, 0x4b, 0xa0, 0x24, 0xd8, 0x83, 0x20, - 0x75, 0xb2, 0x3b, 0x9d, 0x0e, 0x74, 0x77, 0x96, 0x99, 0x49, 0x68, 0x6f, 0xe2, 0x51, 0x10, 0xfc, - 0x0b, 0xfe, 0x00, 0xa1, 0x87, 0xfe, 0x88, 0x1e, 0x6b, 0x4f, 0x9e, 0x44, 0x5a, 0xa4, 0x37, 0x7f, - 0x83, 0xec, 0xcc, 0xee, 0xc6, 0xb4, 0xdb, 0xb4, 0x5e, 0x92, 0x9d, 0x79, 0x9e, 0xf7, 0x79, 0xe7, - 0x79, 0xe7, 0x7d, 0x77, 0xc1, 0x42, 0x0f, 0x45, 0x81, 0xbb, 0x8d, 0x71, 0x20, 0xdc, 0x41, 0xb3, - 0x87, 0x25, 0x6a, 0xba, 0x72, 0xcf, 0x89, 0x39, 0x93, 0x0c, 0xc2, 0x04, 0x74, 0x14, 0xe8, 0xa4, - 0xa0, 0x39, 0x43, 0x18, 0x61, 0x0a, 0x76, 0x93, 0x27, 0xcd, 0x34, 0xad, 0x02, 0x19, 0x1d, 0xa7, - 0xf1, 0x5a, 0x01, 0x1e, 0x23, 0x8e, 0xc2, 0x8c, 0x30, 0xef, 0x33, 0x11, 0x32, 0xb1, 0xa5, 0x95, - 0xf5, 0x22, 0x85, 0xe6, 0xf4, 0xca, 0x0d, 0x05, 0x71, 0x07, 0xcd, 0xe4, 0x2f, 0x05, 0xee, 0xa2, - 0x90, 0x46, 0xcc, 0x55, 0xbf, 0x7a, 0xcb, 0xfe, 0x62, 0x80, 0xdb, 0x6d, 0x41, 0x36, 0x99, 0xc4, - 0x5d, 0x4a, 0x22, 0xb4, 0x2b, 0xa0, 0x03, 0x26, 0x07, 0x4c, 0x62, 0x5e, 0x35, 0x96, 0x8c, 0x7a, - 0x65, 0xbd, 0x7a, 0x72, 0xb8, 0x3a, 0x93, 0xea, 0xbf, 0x08, 0x02, 0x8e, 0x85, 0xe8, 0x4a, 0x4e, - 0x23, 0xd2, 0xd1, 0x34, 0xe8, 0x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xef, 0xcf, 0x0f, 0x1a, 0xc6, 0xfa, 0xab, 0xa3, 0x53, 0xcb, 0x38, 0x3e, 0xb5, 0x8c, - 0x9f, 0xa7, 0x96, 0xf1, 0xf9, 0xcc, 0x2a, 0x1d, 0x9f, 0x59, 0xa5, 0xef, 0x67, 0x56, 0xe9, 0x8d, - 0x43, 0xa8, 0xdc, 0xe9, 0xf7, 0x1c, 0x9f, 0x85, 0x6e, 0xa2, 0xab, 0x5e, 0xd8, 0x3e, 0xdb, 0x75, - 0xfd, 0x1d, 0x44, 0x23, 0x77, 0xb0, 0xe6, 0xee, 0xa5, 0x1f, 0x08, 0xb9, 0x1f, 0x63, 0xd1, 0x9b, - 0x52, 0x84, 0xb5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xdc, 0x4b, 0x75, 0xa2, 0x06, 0x00, - 0x00, + // 667 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x4b, 0x1b, 0x4f, + 0x18, 0xce, 0x1a, 0xff, 0x90, 0xf1, 0xf7, 0xa3, 0x38, 0x28, 0xc6, 0x8d, 0x6e, 0x6c, 0x2c, 0x25, + 0x5a, 0xdc, 0x25, 0x11, 0x4a, 0x09, 0x94, 0x52, 0x7b, 0xf1, 0x12, 0x90, 0x84, 0x7a, 0xe8, 0xc5, + 0x4e, 0x76, 0xc7, 0x71, 0xc0, 0xdd, 0x59, 0x66, 0x26, 0x41, 0x6f, 0xa5, 0xc7, 0x42, 0xa1, 0xd0, + 0xcf, 0x51, 0xf0, 0xe0, 0xb1, 0x1f, 0xc0, 0xa3, 0x78, 0xea, 0xa9, 0x14, 0xa5, 0x78, 0xeb, 0x67, + 0x28, 0x3b, 0x33, 0xbb, 0x41, 0x5d, 0xa3, 0xbd, 0x24, 0xbb, 0xf3, 0x3c, 0xef, 0xf3, 0xbe, 0xcf, + 0xfb, 0xce, 0x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0xc0, 0x5c, 0x5b, 0x90, 0x6e, 0xbf, 0x17, + 0x52, 0xa9, 0x35, 0xb7, 0x39, 0xf5, 0xb1, 0x80, 0xaf, 0x40, 0x69, 0x80, 0x0e, 0x68, 0x80, 0x24, + 0x4b, 0x4b, 0x7f, 0x7c, 0x7e, 0xb2, 0xbe, 0x64, 0x4a, 0xdf, 0x49, 0xb1, 0xeb, 0x1e, 0x86, 0x31, + 0x70, 0x11, 0x94, 0x24, 0x0d, 0xb1, 0x90, 0x28, 0x8c, 0xcb, 0x63, 0xcb, 0x56, 0xbd, 0xd8, 0x19, + 0x1e, 0xc0, 0x97, 0x60, 0x32, 0x56, 0x89, 0xca, 0x45, 0x65, 0xb2, 0x7a, 0xb7, 0x49, 0x55, 0x90, + 0x71, 0x6a, 0x82, 0x5a, 0x6e, 0x62, 0x74, 0x98, 0x2c, 0x31, 0x5b, 0xc9, 0xcc, 0xde, 0x76, 0x53, + 0xab, 0x82, 0xa5, 0x5c, 0x20, 0x6b, 0xc4, 0x1f, 0x0b, 0x38, 0x6d, 0x41, 0xde, 0xc6, 0x01, 0x4a, + 0xda, 0xb3, 0x87, 0x39, 0x8e, 0x7c, 0xdc, 0x65, 0x7d, 0xee, 0xe3, 0x37, 0x2c, 0xda, 0xa3, 0x24, + 0x19, 0x24, 0x0a, 0x42, 0x1a, 0xdd, 0x3f, 0x48, 0x45, 0x83, 0x04, 0xcc, 0xf3, 0x54, 0x68, 0x57, + 0x28, 0xa5, 0x5d, 0x5f, 0x49, 0xa9, 0x76, 0x4c, 0x37, 0x57, 0xf3, 0x3c, 0xe7, 0xe6, 0x36, 0xee, + 0xe7, 0x78, 0x1e, 0xd8, 0xda, 0x50, 0x53, 0x57, 0x49, 0x93, 0x46, 0x3c, 0xc9, 0x1a, 0x31, 0xc2, + 0x4d, 0xad, 0x0e, 0x9e, 0x8e, 0x66, 0x64, 0xad, 0xf9, 0x66, 0xa9, 0x7b, 0xa3, 0xa9, 0xdb, 0x6a, + 0x5b,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62, 0x2c, 0x7a, 0x93, 0x8a, 0xb0, 0xf1, 0x37, 0x00, + 0x00, 0xff, 0xff, 0x93, 0x0b, 0xac, 0x3c, 0x78, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -482,8 +481,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - // VoteSignals is an RPC method to vote signal ids and their powers. - VoteSignals(ctx context.Context, in *MsgVoteSignals, opts ...grpc.CallOption) (*MsgVoteSignalsResponse, error) + // Vote is an RPC method to vote signal ids and their powers. + Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) // SubmitSignalPrices is an RPC method to submit signal prices. SubmitSignalPrices(ctx context.Context, in *MsgSubmitSignalPrices, opts ...grpc.CallOption) (*MsgSubmitSignalPricesResponse, error) // UpdateReferenceSourceConfig is an RPC method to update reference price source configuration. @@ -500,9 +499,9 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) VoteSignals(ctx context.Context, in *MsgVoteSignals, opts ...grpc.CallOption) (*MsgVoteSignalsResponse, error) { - out := new(MsgVoteSignalsResponse) - err := c.cc.Invoke(ctx, "/band.feeds.v1beta1.Msg/VoteSignals", in, out, opts...) +func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) { + out := new(MsgVoteResponse) + err := c.cc.Invoke(ctx, "/band.feeds.v1beta1.Msg/Vote", in, out, opts...) if err != nil { return nil, err } @@ -538,8 +537,8 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts // MsgServer is the server API for Msg service. type MsgServer interface { - // VoteSignals is an RPC method to vote signal ids and their powers. - VoteSignals(context.Context, *MsgVoteSignals) (*MsgVoteSignalsResponse, error) + // Vote is an RPC method to vote signal ids and their powers. + Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) // SubmitSignalPrices is an RPC method to submit signal prices. SubmitSignalPrices(context.Context, *MsgSubmitSignalPrices) (*MsgSubmitSignalPricesResponse, error) // UpdateReferenceSourceConfig is an RPC method to update reference price source configuration. @@ -552,8 +551,8 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) VoteSignals(ctx context.Context, req *MsgVoteSignals) (*MsgVoteSignalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VoteSignals not implemented") +func (*UnimplementedMsgServer) Vote(ctx context.Context, req *MsgVote) (*MsgVoteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented") } func (*UnimplementedMsgServer) SubmitSignalPrices(ctx context.Context, req *MsgSubmitSignalPrices) (*MsgSubmitSignalPricesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitSignalPrices not implemented") @@ -569,20 +568,20 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_VoteSignals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgVoteSignals) +func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVote) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).VoteSignals(ctx, in) + return srv.(MsgServer).Vote(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/band.feeds.v1beta1.Msg/VoteSignals", + FullMethod: "/band.feeds.v1beta1.Msg/Vote", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).VoteSignals(ctx, req.(*MsgVoteSignals)) + return srv.(MsgServer).Vote(ctx, req.(*MsgVote)) } return interceptor(ctx, in, info, handler) } @@ -646,8 +645,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "VoteSignals", - Handler: _Msg_VoteSignals_Handler, + MethodName: "Vote", + Handler: _Msg_Vote_Handler, }, { MethodName: "SubmitSignalPrices", @@ -666,7 +665,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "band/feeds/v1beta1/tx.proto", } -func (m *MsgVoteSignals) Marshal() (dAtA []byte, err error) { +func (m *MsgVote) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -676,12 +675,12 @@ func (m *MsgVoteSignals) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgVoteSignals) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgVote) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgVoteSignals) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -710,7 +709,7 @@ func (m *MsgVoteSignals) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgVoteSignalsResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgVoteResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -720,12 +719,12 @@ func (m *MsgVoteSignalsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgVoteSignalsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgVoteResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgVoteSignalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -942,7 +941,7 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgVoteSignals) Size() (n int) { +func (m *MsgVote) Size() (n int) { if m == nil { return 0 } @@ -961,7 +960,7 @@ func (m *MsgVoteSignals) Size() (n int) { return n } -func (m *MsgVoteSignalsResponse) Size() (n int) { +func (m *MsgVoteResponse) Size() (n int) { if m == nil { return 0 } @@ -1055,7 +1054,7 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgVoteSignals) Unmarshal(dAtA []byte) error { +func (m *MsgVote) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1078,10 +1077,10 @@ func (m *MsgVoteSignals) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgVoteSignals: wiretype end group for non-group") + return fmt.Errorf("proto: MsgVote: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgVoteSignals: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1171,7 +1170,7 @@ func (m *MsgVoteSignals) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgVoteSignalsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgVoteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1194,10 +1193,10 @@ func (m *MsgVoteSignalsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgVoteSignalsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgVoteResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgVoteSignalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From f4aadd934534ad9d9ba1ec4e3fec3c8b00f01b24 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 1 Nov 2024 20:27:57 +0700 Subject: [PATCH 212/272] fix name --- x/feeds/keeper/genesis.go | 2 +- x/feeds/keeper/genesis_test.go | 2 +- x/feeds/keeper/keeper_signal.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x/feeds/keeper/genesis.go b/x/feeds/keeper/genesis.go index d43d50f22..46fb7be8a 100644 --- a/x/feeds/keeper/genesis.go +++ b/x/feeds/keeper/genesis.go @@ -12,7 +12,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { panic(err) } - k.SetAllVotes(ctx, genState.Votes) + k.SetVotes(ctx, genState.Votes) signalTotalPowers := k.CalculateNewSignalTotalPowers(ctx) k.SetSignalTotalPowers(ctx, signalTotalPowers) diff --git a/x/feeds/keeper/genesis_test.go b/x/feeds/keeper/genesis_test.go index 460703365..ae762d315 100644 --- a/x/feeds/keeper/genesis_test.go +++ b/x/feeds/keeper/genesis_test.go @@ -43,7 +43,7 @@ func (suite *KeeperTestSuite) TestExportGenesis() { }, }, } - suite.feedsKeeper.SetAllVotes(ctx, votes) + suite.feedsKeeper.SetVotes(ctx, votes) exportGenesis := suite.feedsKeeper.ExportGenesis(ctx) diff --git a/x/feeds/keeper/keeper_signal.go b/x/feeds/keeper/keeper_signal.go index 93cc71e8f..be60bb504 100644 --- a/x/feeds/keeper/keeper_signal.go +++ b/x/feeds/keeper/keeper_signal.go @@ -56,8 +56,8 @@ func (k Keeper) GetVotes(ctx sdk.Context) (votes []types.Vote) { return } -// SetAllVotes sets multiple votes. -func (k Keeper) SetAllVotes(ctx sdk.Context, votes []types.Vote) { +// SetVotes sets multiple votes. +func (k Keeper) SetVotes(ctx sdk.Context, votes []types.Vote) { for _, v := range votes { k.SetVote(ctx, v) } From 48f6d9f0930034f1d14797521e9c4932070cfb1b Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 4 Nov 2024 13:38:49 +0700 Subject: [PATCH 213/272] fix comment --- x/feeds/autocli.go | 2 +- x/feeds/keeper/keeper_signal.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x/feeds/autocli.go b/x/feeds/autocli.go index e35bfbb08..19d91ea55 100644 --- a/x/feeds/autocli.go +++ b/x/feeds/autocli.go @@ -78,7 +78,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { { RpcMethod: "Vote", Use: "vote [voter]", - Short: "Get signals submitted by a voter", + Short: "Get signals voted by a voter", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "voter"}}, }, }, diff --git a/x/feeds/keeper/keeper_signal.go b/x/feeds/keeper/keeper_signal.go index be60bb504..046c60118 100644 --- a/x/feeds/keeper/keeper_signal.go +++ b/x/feeds/keeper/keeper_signal.go @@ -13,7 +13,7 @@ import ( "github.com/bandprotocol/chain/v3/x/feeds/types" ) -// GetVote returns all signals of a voter. +// GetVote returns all signals voted by a voter. func (k Keeper) GetVote(ctx sdk.Context, voter sdk.AccAddress) []types.Signal { bz := ctx.KVStore(k.storeKey).Get(types.VoteStoreKey(voter)) if bz == nil { @@ -26,12 +26,12 @@ func (k Keeper) GetVote(ctx sdk.Context, voter sdk.AccAddress) []types.Signal { return v.Signals } -// DeleteVote deletes all signals of a voter. +// DeleteVote deletes all signals voted by a voter. func (k Keeper) DeleteVote(ctx sdk.Context, voter sdk.AccAddress) { ctx.KVStore(k.storeKey).Delete(types.VoteStoreKey(voter)) } -// SetVote sets multiple signals of a voter. +// SetVote sets signals voted by a voter. func (k Keeper) SetVote(ctx sdk.Context, vote types.Vote) { ctx.KVStore(k.storeKey). Set(types.VoteStoreKey(sdk.MustAccAddressFromBech32(vote.Voter)), k.cdc.MustMarshal(&vote)) From 497e57e9c5301eaf84a927a0f1a580a3726a3acf Mon Sep 17 00:00:00 2001 From: taobun Date: Mon, 4 Nov 2024 15:41:27 +0700 Subject: [PATCH 214/272] fix readme --- x/feeds/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/feeds/README.md b/x/feeds/README.md index f3b3c0bc2..7161f805a 100644 --- a/x/feeds/README.md +++ b/x/feeds/README.md @@ -56,9 +56,9 @@ This module is used in the BandChain. ### Vote -A Vote is a vote from a voter, instructing the chain to provide feed service for the designated ID. +A Vote is a decision made by a voter, directing the network to deliver feed service for a specified signal ID. -A Vote consists of an ID and the power associated with that ID. The feeding interval and deviation are reduced by the sum of the power of the ID. The total power of a voter cannot exceed their total bonded delegation and staked tokens. +A signal consists of an signal ID and the power associated with that signal. The feeding interval and deviation are reduced by the sum of the power of the signal. The total power of all signals of voter cannot exceed their total bonded delegation and staked tokens. ### Feed From c3260ac72adceb1b8db5b2cb13d7ad58ca162b9e Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Mon, 4 Nov 2024 17:07:30 +0700 Subject: [PATCH 215/272] rename variable --- x/tss/types/originator.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/tss/types/originator.go b/x/tss/types/originator.go index 14fd295c9..c84d7fe5d 100644 --- a/x/tss/types/originator.go +++ b/x/tss/types/originator.go @@ -12,8 +12,8 @@ var ( _ Originator = &DirectOriginator{} _ Originator = &TunnelOriginator{} - directOriginatorPrefix = tss.Hash([]byte("directOriginatorPrefix"))[:4] - tunnelOriginatorPrefix = tss.Hash([]byte("tunnelOriginatorPrefix"))[:4] + DirectOriginatorPrefix = tss.Hash([]byte("directOriginatorPrefix"))[:4] + TunnelOriginatorPrefix = tss.Hash([]byte("tunnelOriginatorPrefix"))[:4] ) // Originator is the interface for identifying the metadata of the message. The hashed of the @@ -39,7 +39,7 @@ func (o DirectOriginator) Validate(p Params) error { // Encode encodes the originator into a byte array. func (o DirectOriginator) Encode() ([]byte, error) { bz := bytes.Join([][]byte{ - directOriginatorPrefix, + DirectOriginatorPrefix, sdk.Uint64ToBigEndian(uint64(len(o.Requester))), []byte(o.Requester), sdk.Uint64ToBigEndian(uint64(len(o.Memo))), @@ -61,7 +61,7 @@ func (o TunnelOriginator) Validate(p Params) error { // Encode encodes the originator into a byte array. func (o TunnelOriginator) Encode() ([]byte, error) { bz := bytes.Join([][]byte{ - tunnelOriginatorPrefix, + TunnelOriginatorPrefix, sdk.Uint64ToBigEndian(o.TunnelID), sdk.Uint64ToBigEndian(uint64(len(o.ContractAddress))), []byte(o.ContractAddress), From b2cf35293bdea986a01c92e6f2e8fc176fc5f044 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Mon, 4 Nov 2024 21:16:36 +0700 Subject: [PATCH 216/272] add field transitionTime in transition message --- api/band/bandtss/v1beta1/bandtss.pulsar.go | 124 +++++++++++++-- proto/band/bandtss/v1beta1/bandtss.proto | 2 + x/bandtss/keeper/keeper_transition.go | 3 +- x/bandtss/keeper/msg_server_test.go | 2 +- x/bandtss/keeper/tss_callback.go | 2 +- x/bandtss/keeper/tss_callback_test.go | 5 +- x/bandtss/types/bandtss.pb.go | 176 ++++++++++++++------- x/bandtss/types/signature_order.go | 22 ++- 8 files changed, 254 insertions(+), 82 deletions(-) diff --git a/api/band/bandtss/v1beta1/bandtss.pulsar.go b/api/band/bandtss/v1beta1/bandtss.pulsar.go index 54a7bd854..74c6f461a 100644 --- a/api/band/bandtss/v1beta1/bandtss.pulsar.go +++ b/api/band/bandtss/v1beta1/bandtss.pulsar.go @@ -2212,14 +2212,16 @@ func (x *fastReflection_GroupTransition) ProtoMethods() *protoiface.Methods { } var ( - md_GroupTransitionSignatureOrder protoreflect.MessageDescriptor - fd_GroupTransitionSignatureOrder_pub_key protoreflect.FieldDescriptor + md_GroupTransitionSignatureOrder protoreflect.MessageDescriptor + fd_GroupTransitionSignatureOrder_pub_key protoreflect.FieldDescriptor + fd_GroupTransitionSignatureOrder_transition_time protoreflect.FieldDescriptor ) func init() { file_band_bandtss_v1beta1_bandtss_proto_init() md_GroupTransitionSignatureOrder = File_band_bandtss_v1beta1_bandtss_proto.Messages().ByName("GroupTransitionSignatureOrder") fd_GroupTransitionSignatureOrder_pub_key = md_GroupTransitionSignatureOrder.Fields().ByName("pub_key") + fd_GroupTransitionSignatureOrder_transition_time = md_GroupTransitionSignatureOrder.Fields().ByName("transition_time") } var _ protoreflect.Message = (*fastReflection_GroupTransitionSignatureOrder)(nil) @@ -2293,6 +2295,12 @@ func (x *fastReflection_GroupTransitionSignatureOrder) Range(f func(protoreflect return } } + if x.TransitionTime != nil { + value := protoreflect.ValueOfMessage(x.TransitionTime.ProtoReflect()) + if !f(fd_GroupTransitionSignatureOrder_transition_time, value) { + return + } + } } // Has reports whether a field is populated. @@ -2310,6 +2318,8 @@ func (x *fastReflection_GroupTransitionSignatureOrder) Has(fd protoreflect.Field switch fd.FullName() { case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.pub_key": return len(x.PubKey) != 0 + case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time": + return x.TransitionTime != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GroupTransitionSignatureOrder")) @@ -2328,6 +2338,8 @@ func (x *fastReflection_GroupTransitionSignatureOrder) Clear(fd protoreflect.Fie switch fd.FullName() { case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.pub_key": x.PubKey = nil + case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time": + x.TransitionTime = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GroupTransitionSignatureOrder")) @@ -2347,6 +2359,9 @@ func (x *fastReflection_GroupTransitionSignatureOrder) Get(descriptor protorefle case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.pub_key": value := x.PubKey return protoreflect.ValueOfBytes(value) + case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time": + value := x.TransitionTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GroupTransitionSignatureOrder")) @@ -2369,6 +2384,8 @@ func (x *fastReflection_GroupTransitionSignatureOrder) Set(fd protoreflect.Field switch fd.FullName() { case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.pub_key": x.PubKey = value.Bytes() + case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time": + x.TransitionTime = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GroupTransitionSignatureOrder")) @@ -2389,6 +2406,11 @@ func (x *fastReflection_GroupTransitionSignatureOrder) Set(fd protoreflect.Field // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GroupTransitionSignatureOrder) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time": + if x.TransitionTime == nil { + x.TransitionTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.TransitionTime.ProtoReflect()) case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.pub_key": panic(fmt.Errorf("field pub_key of message band.bandtss.v1beta1.GroupTransitionSignatureOrder is not mutable")) default: @@ -2406,6 +2428,9 @@ func (x *fastReflection_GroupTransitionSignatureOrder) NewField(fd protoreflect. switch fd.FullName() { case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.pub_key": return protoreflect.ValueOfBytes(nil) + case "band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GroupTransitionSignatureOrder")) @@ -2479,6 +2504,10 @@ func (x *fastReflection_GroupTransitionSignatureOrder) ProtoMethods() *protoifac if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.TransitionTime != nil { + l = options.Size(x.TransitionTime) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2508,6 +2537,20 @@ func (x *fastReflection_GroupTransitionSignatureOrder) ProtoMethods() *protoifac i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.TransitionTime != nil { + encoded, err := options.Marshal(x.TransitionTime) + 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.PubKey) > 0 { i -= len(x.PubKey) copy(dAtA[i:], x.PubKey) @@ -2598,6 +2641,42 @@ func (x *fastReflection_GroupTransitionSignatureOrder) ProtoMethods() *protoifac x.PubKey = []byte{} } iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TransitionTime", 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.TransitionTime == nil { + x.TransitionTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TransitionTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2962,6 +3041,8 @@ type GroupTransitionSignatureOrder struct { // pub_key is the public key of new group that the current group needs to be signed. PubKey []byte `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` + // transition_time is the timestamp at which the transition is executed and the public key is active. + TransitionTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=transition_time,json=transitionTime,proto3" json:"transition_time,omitempty"` } func (x *GroupTransitionSignatureOrder) Reset() { @@ -2991,6 +3072,13 @@ func (x *GroupTransitionSignatureOrder) GetPubKey() []byte { return nil } +func (x *GroupTransitionSignatureOrder) GetTransitionTime() *timestamppb.Timestamp { + if x != nil { + return x.TransitionTime + } + return nil +} + var File_band_bandtss_v1beta1_bandtss_proto protoreflect.FileDescriptor var file_band_bandtss_v1beta1_bandtss_proto_rawDesc = []byte{ @@ -3099,14 +3187,19 @@ var file_band_bandtss_v1beta1_bandtss_proto_rawDesc = []byte{ 0x65, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7b, 0x0a, 0x1d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, - 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x6c, 0x69, 0x62, 0x73, 0x2f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x06, - 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x3a, 0x0b, 0xca, 0xb4, 0x2d, 0x07, 0x43, 0x6f, 0x6e, 0x74, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xca, 0x01, 0x0a, 0x1d, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0xfa, 0xde, 0x1f, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, + 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x6c, 0x69, 0x62, 0x73, + 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, + 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, + 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x0b, 0xca, 0xb4, 0x2d, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0xae, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, @@ -3165,11 +3258,12 @@ var file_band_bandtss_v1beta1_bandtss_proto_depIdxs = []int32{ 6, // 2: band.bandtss.v1beta1.Signing.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin 0, // 3: band.bandtss.v1beta1.GroupTransition.status:type_name -> band.bandtss.v1beta1.TransitionStatus 5, // 4: band.bandtss.v1beta1.GroupTransition.exec_time:type_name -> google.protobuf.Timestamp - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 5, // 5: band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time:type_name -> google.protobuf.Timestamp + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_band_bandtss_v1beta1_bandtss_proto_init() } diff --git a/proto/band/bandtss/v1beta1/bandtss.proto b/proto/band/bandtss/v1beta1/bandtss.proto index 533c2bba9..e04357bd6 100644 --- a/proto/band/bandtss/v1beta1/bandtss.proto +++ b/proto/band/bandtss/v1beta1/bandtss.proto @@ -103,4 +103,6 @@ message GroupTransitionSignatureOrder { // pub_key is the public key of new group that the current group needs to be signed. bytes pub_key = 1 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + // transition_time is the timestamp at which the transition is executed and the public key is active. + google.protobuf.Timestamp transition_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } diff --git a/x/bandtss/keeper/keeper_transition.go b/x/bandtss/keeper/keeper_transition.go index a32a5f1ed..2262418e0 100644 --- a/x/bandtss/keeper/keeper_transition.go +++ b/x/bandtss/keeper/keeper_transition.go @@ -152,6 +152,7 @@ func (k Keeper) ExtractEventAttributesFromTransition(transition types.GroupTrans func (k Keeper) CreateTransitionSigning( ctx sdk.Context, groupPubKey tss.Point, + transitionTime time.Time, ) (tss.SigningID, error) { currentGroupID := k.GetCurrentGroupID(ctx) @@ -160,7 +161,7 @@ func (k Keeper) CreateTransitionSigning( Requester: moduleAcc.GetAddress().String(), } - content := types.NewGroupTransitionSignatureOrder(groupPubKey) + content := types.NewGroupTransitionSignatureOrder(groupPubKey, transitionTime) signingID, err := k.tssKeeper.RequestSigning(ctx, currentGroupID, originator, content) if err != nil { diff --git a/x/bandtss/keeper/msg_server_test.go b/x/bandtss/keeper/msg_server_test.go index 41dc1ba0f..7be663f11 100644 --- a/x/bandtss/keeper/msg_server_test.go +++ b/x/bandtss/keeper/msg_server_test.go @@ -455,7 +455,7 @@ func (s *AppTestSuite) TestFailRequestSignatureInternalMessage() { k.DeleteGroupTransition(ctx) msg, err := types.NewMsgRequestSignature( - types.NewGroupTransitionSignatureOrder([]byte("msg")), + types.NewGroupTransitionSignatureOrder([]byte("msg"), time.Now()), sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), bandtesting.FeePayer.Address.String(), ) diff --git a/x/bandtss/keeper/tss_callback.go b/x/bandtss/keeper/tss_callback.go index 0cb3de31f..4fec9f65d 100644 --- a/x/bandtss/keeper/tss_callback.go +++ b/x/bandtss/keeper/tss_callback.go @@ -43,7 +43,7 @@ func (cb TSSCallback) OnGroupCreationCompleted(ctx sdk.Context, groupID tss.Grou } else { // create a signing request for transition. If the signing request is failed, set the // transition status to fallen. - signingID, err := cb.k.CreateTransitionSigning(ctx, group.PubKey) + signingID, err := cb.k.CreateTransitionSigning(ctx, group.PubKey, transition.ExecTime) if err != nil { cb.k.EndGroupTransitionProcess(ctx, transition, false) return diff --git a/x/bandtss/keeper/tss_callback_test.go b/x/bandtss/keeper/tss_callback_test.go index f9362a940..1f6b252ec 100644 --- a/x/bandtss/keeper/tss_callback_test.go +++ b/x/bandtss/keeper/tss_callback_test.go @@ -840,7 +840,10 @@ func (s *KeeperTestSuite) TestCallbackOnGroupCreationComplete() { gomock.Any(), tss.GroupID(1), gomock.Any(), - types.NewGroupTransitionSignatureOrder(tss.Point([]byte("pubkey-2"))), + types.NewGroupTransitionSignatureOrder( + tss.Point([]byte("pubkey-2")), + s.ctx.BlockTime().Add(10*time.Minute), + ), ).Return(tss.SigningID(1), nil) }, postCheck: func(s *KeeperTestSuite) { diff --git a/x/bandtss/types/bandtss.pb.go b/x/bandtss/types/bandtss.pb.go index 27afdeb0c..b18254dd9 100644 --- a/x/bandtss/types/bandtss.pb.go +++ b/x/bandtss/types/bandtss.pb.go @@ -351,6 +351,8 @@ func (m *GroupTransition) GetIsForceTransition() bool { type GroupTransitionSignatureOrder struct { // pub_key is the public key of new group that the current group needs to be signed. PubKey github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"pub_key,omitempty"` + // transition_time is the timestamp at which the transition is executed and the public key is active. + TransitionTime time.Time `protobuf:"bytes,2,opt,name=transition_time,json=transitionTime,proto3,stdtime" json:"transition_time"` } func (m *GroupTransitionSignatureOrder) Reset() { *m = GroupTransitionSignatureOrder{} } @@ -393,6 +395,13 @@ func (m *GroupTransitionSignatureOrder) GetPubKey() github_com_cometbft_cometbft return nil } +func (m *GroupTransitionSignatureOrder) GetTransitionTime() time.Time { + if m != nil { + return m.TransitionTime + } + return time.Time{} +} + func init() { proto.RegisterEnum("band.bandtss.v1beta1.TransitionStatus", TransitionStatus_name, TransitionStatus_value) proto.RegisterType((*Member)(nil), "band.bandtss.v1beta1.Member") @@ -406,66 +415,67 @@ func init() { } var fileDescriptor_2bc325518cc10c44 = []byte{ - // 932 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0x16, 0x65, 0x5d, 0xc7, 0x81, 0xad, 0x8c, 0x63, 0x83, 0xf6,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d6, 0x05, 0x43, 0x54, 0xf9, 0x0a, 0x9d, 0xb7, - 0xa2, 0x83, 0x5e, 0x98, 0x70, 0x8a, 0xf6, 0xd7, 0x7f, 0xff, 0xed, 0x71, 0xb1, 0x4d, 0x3c, 0x86, - 0x3c, 0xf6, 0xd9, 0xaf, 0x02, 0xa8, 0xac, 0x92, 0x01, 0x3f, 0x02, 0x0f, 0x87, 0x7a, 0xb3, 0x37, - 0xd0, 0x86, 0xda, 0x51, 0xcf, 0x18, 0x0c, 0x9b, 0xc3, 0xe3, 0x81, 0x71, 0xdc, 0x1b, 0xf4, 0x3b, - 0x6d, 0xed, 0x50, 0xeb, 0x1c, 0x54, 0x32, 0xf0, 0x63, 0x50, 0xbd, 0x09, 0x69, 0xeb, 0x9d, 0xe6, - 0x50, 0xeb, 0x75, 0x8d, 0xae, 0x7e, 0x74, 0xdc, 0xaf, 0x08, 0xb0, 0x06, 0xa4, 0x9b, 0xa8, 0x6f, - 0x9a, 0x1a, 0x07, 0x0d, 0xb4, 0x6e, 0xaf, 0x92, 0x85, 0x9f, 0x82, 0x47, 0xff, 0x8c, 0xe9, 0x7c, - 0xdb, 0x69, 0x1f, 0x47, 0x8e, 0xca, 0xda, 0x5e, 0xee, 0xf5, 0x8f, 0x52, 0xa6, 0xd5, 0xfb, 0x39, - 0x94, 0x84, 0xb7, 0xa1, 0x24, 0xbc, 0x0b, 0x25, 0xe1, 0xcf, 0x50, 0x12, 0xde, 0x5c, 0x49, 0x99, - 0x77, 0x57, 0x52, 0xe6, 0x8f, 0x2b, 0x29, 0xf3, 0xe2, 0xdf, 0x57, 0xf5, 0x7c, 0xf6, 0xfb, 0xcf, - 0x1f, 0x6c, 0xab, 0xc0, 0x21, 0xcf, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x87, 0xa7, 0xd2, 0x96, - 0x1c, 0x08, 0x00, 0x00, + // 947 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcb, 0x6e, 0xdb, 0x46, + 0x17, 0x16, 0x65, 0x5d, 0xc7, 0x81, 0xac, 0x8c, 0x63, 0x83, 0xf6, 0xff, 0x87, 0x54, 0x95, 0xa2, + 0x15, 0x0a, 0x84, 0x4c, 0x94, 0xae, 0xbc, 0x68, 0x21, 0xc9, 0xb2, 0x4a, 0x14, 0x96, 0x05, 0x4a, + 0x46, 0x8b, 0x6c, 0x08, 0x5e, 0x46, 0xcc, 0xc0, 0x16, 0x47, 0xe1, 0x8c, 0x0c, 0xfb, 0x0d, 0x02, + 0x74, 0x93, 0x47, 0x28, 0xd0, 0x2e, 0x8a, 0x2e, 0xba, 0xea, 0x43, 0x04, 0x59, 0x65, 0xd9, 0x15, + 0x5d, 0xd0, 0x9b, 0x3e, 0x83, 0x57, 0x05, 0x87, 0xd4, 0xd5, 0x2e, 0x1a, 0x1b, 0xdd, 0x48, 0x3c, + 0x73, 0xbe, 0x73, 0xfb, 0xbe, 0xc3, 0x91, 0x40, 0xd5, 0x32, 0x3d, 0x47, 0x8d, 0x3e, 0x18, 0xa5, + 0xea, 0xd9, 0x73, 0x0b, 0x31, 0xf3, 0xf9, 0xd4, 0x56, 0xc6, 0x3e, 0x61, 0x04, 0x3e, 0x8a, 0x4c, + 0x65, 0x7a, 0x96, 0x60, 0x76, 0x1f, 0xb9, 0xc4, 0x25, 0x1c, 0xa0, 0x46, 0x4f, 0x31, 0x76, 0x57, + 0x76, 0x09, 0x71, 0x4f, 0x91, 0xca, 0x2d, 0x6b, 0x32, 0x54, 0x19, 0x1e, 0x21, 0xca, 0xcc, 0xd1, + 0x38, 0x01, 0x48, 0x36, 0xa1, 0x23, 0x42, 0x55, 0xcb, 0xa4, 0x68, 0x56, 0xcf, 0x26, 0xd8, 0x4b, + 0xfc, 0x3b, 0xb1, 0xdf, 0x88, 0x33, 0xc7, 0x46, 0xec, 0xaa, 0xfe, 0x9c, 0x06, 0xb9, 0x43, 0x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 0xfe, 0xfb, 0xea, 0x9f, 0xcf, 0xfe, 0x4f, 0xf0, 0x1f, + 0x00, 0x2b, 0xc7, 0x21, 0x2f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xa3, 0xdd, 0xdd, 0x6c, + 0x08, 0x00, 0x00, } func (this *Member) Equal(that interface{}) bool { @@ -612,6 +622,9 @@ func (this *GroupTransitionSignatureOrder) Equal(that interface{}) bool { if !bytes.Equal(this.PubKey, that1.PubKey) { return false } + if !this.TransitionTime.Equal(that1.TransitionTime) { + return false + } return true } func (m *Member) Marshal() (dAtA []byte, err error) { @@ -829,6 +842,14 @@ func (m *GroupTransitionSignatureOrder) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.TransitionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.TransitionTime):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintBandtss(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x12 if len(m.PubKey) > 0 { i -= len(m.PubKey) copy(dAtA[i:], m.PubKey) @@ -945,6 +966,8 @@ func (m *GroupTransitionSignatureOrder) Size() (n int) { if l > 0 { n += 1 + l + sovBandtss(uint64(l)) } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.TransitionTime) + n += 1 + l + sovBandtss(uint64(l)) return n } @@ -1624,6 +1647,39 @@ func (m *GroupTransitionSignatureOrder) Unmarshal(dAtA []byte) error { m.PubKey = []byte{} } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBandtss + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBandtss + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBandtss + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.TransitionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipBandtss(dAtA[iNdEx:]) diff --git a/x/bandtss/types/signature_order.go b/x/bandtss/types/signature_order.go index 945aab2b4..5b0a15c7a 100644 --- a/x/bandtss/types/signature_order.go +++ b/x/bandtss/types/signature_order.go @@ -1,6 +1,9 @@ package types import ( + "bytes" + time "time" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -17,8 +20,14 @@ var GroupTransitionMsgPrefix = tss.Hash([]byte(GroupTransitionPath))[:4] // Implements SignatureRequest Interface var _ tsstypes.Content = &GroupTransitionSignatureOrder{} -func NewGroupTransitionSignatureOrder(pubKey []byte) *GroupTransitionSignatureOrder { - return &GroupTransitionSignatureOrder{PubKey: pubKey} +func NewGroupTransitionSignatureOrder( + pubKey []byte, + transitionTime time.Time, +) *GroupTransitionSignatureOrder { + return &GroupTransitionSignatureOrder{ + PubKey: pubKey, + TransitionTime: transitionTime, + } } // OrderRoute returns the order router key @@ -41,7 +50,14 @@ func NewSignatureOrderHandler() tsstypes.Handler { return func(ctx sdk.Context, content tsstypes.Content) ([]byte, error) { switch c := content.(type) { case *GroupTransitionSignatureOrder: - return append(GroupTransitionMsgPrefix, c.PubKey...), nil + return bytes.Join( + [][]byte{ + GroupTransitionMsgPrefix, + c.PubKey, + sdk.Uint64ToBigEndian(uint64(c.TransitionTime.Unix())), + }, + []byte(""), + ), nil default: return nil, sdkerrors.ErrUnknownRequest.Wrapf( From 6d9a3083a827d2211633e989be84d5923b5b62a0 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 09:33:34 +0700 Subject: [PATCH 217/272] change currentGroupID to currentGroup information --- api/band/bandtss/v1beta1/bandtss.pulsar.go | 836 +++++++++++++++++---- api/band/bandtss/v1beta1/genesis.pulsar.go | 225 +++--- api/band/bandtss/v1beta1/query.pulsar.go | 674 ++++++++++------- benchmark/app_test.go | 2 +- benchmark/tss_bench_test.go | 4 +- proto/band/bandtss/v1beta1/bandtss.proto | 9 + proto/band/bandtss/v1beta1/genesis.proto | 7 +- proto/band/bandtss/v1beta1/query.proto | 3 + x/bandtss/abci_test.go | 10 +- x/bandtss/keeper/genesis.go | 19 +- x/bandtss/keeper/genesis_test.go | 50 +- x/bandtss/keeper/grpc_query.go | 21 +- x/bandtss/keeper/grpc_query_test.go | 2 +- x/bandtss/keeper/keeper.go | 20 +- x/bandtss/keeper/keeper_reward.go | 2 +- x/bandtss/keeper/keeper_reward_test.go | 5 +- x/bandtss/keeper/keeper_signing.go | 2 +- x/bandtss/keeper/keeper_signing_test.go | 10 +- x/bandtss/keeper/keeper_test.go | 2 +- x/bandtss/keeper/keeper_transition.go | 8 +- x/bandtss/keeper/keeper_transition_test.go | 75 +- x/bandtss/keeper/msg_server.go | 2 +- x/bandtss/keeper/msg_server_test.go | 13 +- x/bandtss/keeper/tss_callback_test.go | 28 +- x/bandtss/types/bandtss.pb.go | 382 ++++++++-- x/bandtss/types/constructors.go | 11 + x/bandtss/types/genesis.go | 16 +- x/bandtss/types/genesis.pb.go | 144 ++-- x/bandtss/types/genesis_test.go | 13 +- x/bandtss/types/keys.go | 2 +- x/bandtss/types/query.pb.go | 225 ++++-- x/globalfee/feechecker/feechecker.go | 2 +- x/globalfee/feechecker/feechecker_test.go | 12 +- 33 files changed, 1972 insertions(+), 864 deletions(-) diff --git a/api/band/bandtss/v1beta1/bandtss.pulsar.go b/api/band/bandtss/v1beta1/bandtss.pulsar.go index 74c6f461a..a85b73d5b 100644 --- a/api/band/bandtss/v1beta1/bandtss.pulsar.go +++ b/api/band/bandtss/v1beta1/bandtss.pulsar.go @@ -696,6 +696,489 @@ func (x *fastReflection_Member) ProtoMethods() *protoiface.Methods { } } +var ( + md_CurrentGroup protoreflect.MessageDescriptor + fd_CurrentGroup_group_id protoreflect.FieldDescriptor + fd_CurrentGroup_active_time protoreflect.FieldDescriptor +) + +func init() { + file_band_bandtss_v1beta1_bandtss_proto_init() + md_CurrentGroup = File_band_bandtss_v1beta1_bandtss_proto.Messages().ByName("CurrentGroup") + fd_CurrentGroup_group_id = md_CurrentGroup.Fields().ByName("group_id") + fd_CurrentGroup_active_time = md_CurrentGroup.Fields().ByName("active_time") +} + +var _ protoreflect.Message = (*fastReflection_CurrentGroup)(nil) + +type fastReflection_CurrentGroup CurrentGroup + +func (x *CurrentGroup) ProtoReflect() protoreflect.Message { + return (*fastReflection_CurrentGroup)(x) +} + +func (x *CurrentGroup) slowProtoReflect() protoreflect.Message { + mi := &file_band_bandtss_v1beta1_bandtss_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_CurrentGroup_messageType fastReflection_CurrentGroup_messageType +var _ protoreflect.MessageType = fastReflection_CurrentGroup_messageType{} + +type fastReflection_CurrentGroup_messageType struct{} + +func (x fastReflection_CurrentGroup_messageType) Zero() protoreflect.Message { + return (*fastReflection_CurrentGroup)(nil) +} +func (x fastReflection_CurrentGroup_messageType) New() protoreflect.Message { + return new(fastReflection_CurrentGroup) +} +func (x fastReflection_CurrentGroup_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CurrentGroup +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CurrentGroup) Descriptor() protoreflect.MessageDescriptor { + return md_CurrentGroup +} + +// 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_CurrentGroup) Type() protoreflect.MessageType { + return _fastReflection_CurrentGroup_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CurrentGroup) New() protoreflect.Message { + return new(fastReflection_CurrentGroup) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CurrentGroup) Interface() protoreflect.ProtoMessage { + return (*CurrentGroup)(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_CurrentGroup) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.GroupId != uint64(0) { + value := protoreflect.ValueOfUint64(x.GroupId) + if !f(fd_CurrentGroup_group_id, value) { + return + } + } + if x.ActiveTime != nil { + value := protoreflect.ValueOfMessage(x.ActiveTime.ProtoReflect()) + if !f(fd_CurrentGroup_active_time, 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_CurrentGroup) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "band.bandtss.v1beta1.CurrentGroup.group_id": + return x.GroupId != uint64(0) + case "band.bandtss.v1beta1.CurrentGroup.active_time": + return x.ActiveTime != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.CurrentGroup")) + } + panic(fmt.Errorf("message band.bandtss.v1beta1.CurrentGroup 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_CurrentGroup) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "band.bandtss.v1beta1.CurrentGroup.group_id": + x.GroupId = uint64(0) + case "band.bandtss.v1beta1.CurrentGroup.active_time": + x.ActiveTime = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.CurrentGroup")) + } + panic(fmt.Errorf("message band.bandtss.v1beta1.CurrentGroup 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_CurrentGroup) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "band.bandtss.v1beta1.CurrentGroup.group_id": + value := x.GroupId + return protoreflect.ValueOfUint64(value) + case "band.bandtss.v1beta1.CurrentGroup.active_time": + value := x.ActiveTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.CurrentGroup")) + } + panic(fmt.Errorf("message band.bandtss.v1beta1.CurrentGroup 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_CurrentGroup) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "band.bandtss.v1beta1.CurrentGroup.group_id": + x.GroupId = value.Uint() + case "band.bandtss.v1beta1.CurrentGroup.active_time": + x.ActiveTime = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.CurrentGroup")) + } + panic(fmt.Errorf("message band.bandtss.v1beta1.CurrentGroup 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_CurrentGroup) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.bandtss.v1beta1.CurrentGroup.active_time": + if x.ActiveTime == nil { + x.ActiveTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.ActiveTime.ProtoReflect()) + case "band.bandtss.v1beta1.CurrentGroup.group_id": + panic(fmt.Errorf("field group_id of message band.bandtss.v1beta1.CurrentGroup is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.CurrentGroup")) + } + panic(fmt.Errorf("message band.bandtss.v1beta1.CurrentGroup 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_CurrentGroup) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.bandtss.v1beta1.CurrentGroup.group_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.bandtss.v1beta1.CurrentGroup.active_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.CurrentGroup")) + } + panic(fmt.Errorf("message band.bandtss.v1beta1.CurrentGroup 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_CurrentGroup) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in band.bandtss.v1beta1.CurrentGroup", 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_CurrentGroup) 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_CurrentGroup) 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_CurrentGroup) 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_CurrentGroup) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CurrentGroup) + 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.GroupId != 0 { + n += 1 + runtime.Sov(uint64(x.GroupId)) + } + if x.ActiveTime != nil { + l = options.Size(x.ActiveTime) + 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().(*CurrentGroup) + 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 x.ActiveTime != nil { + encoded, err := options.Marshal(x.ActiveTime) + 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 x.GroupId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) + i-- + dAtA[i] = 0x8 + } + 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().(*CurrentGroup) + 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: CurrentGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CurrentGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) + } + x.GroupId = 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.GroupId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ActiveTime", 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.ActiveTime == nil { + x.ActiveTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ActiveTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + 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 _ protoreflect.List = (*_Signing_2_list)(nil) type _Signing_2_list struct { @@ -775,7 +1258,7 @@ func (x *Signing) ProtoReflect() protoreflect.Message { } func (x *Signing) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[1] + mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1432,7 +1915,7 @@ func (x *GroupTransition) ProtoReflect() protoreflect.Message { } func (x *GroupTransition) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[2] + mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2233,7 +2716,7 @@ func (x *GroupTransitionSignatureOrder) ProtoReflect() protoreflect.Message { } func (x *GroupTransitionSignatureOrder) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[3] + mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2859,6 +3342,52 @@ func (x *Member) GetLastActive() *timestamppb.Timestamp { return nil } +// CuurentGroup is a bandtss current group information. +type CurrentGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // group_id is the ID of the current group. + GroupId uint64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // active_time is the timestamp at which the group becomes the current group of the module. + ActiveTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=active_time,json=activeTime,proto3" json:"active_time,omitempty"` +} + +func (x *CurrentGroup) Reset() { + *x = CurrentGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CurrentGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrentGroup) ProtoMessage() {} + +// Deprecated: Use CurrentGroup.ProtoReflect.Descriptor instead. +func (*CurrentGroup) Descriptor() ([]byte, []int) { + return file_band_bandtss_v1beta1_bandtss_proto_rawDescGZIP(), []int{1} +} + +func (x *CurrentGroup) GetGroupId() uint64 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *CurrentGroup) GetActiveTime() *timestamppb.Timestamp { + if x != nil { + return x.ActiveTime + } + return nil +} + // Signing is a bandtss signing information. type Signing struct { state protoimpl.MessageState @@ -2880,7 +3409,7 @@ type Signing struct { func (x *Signing) Reset() { *x = Signing{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[1] + mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2894,7 +3423,7 @@ func (*Signing) ProtoMessage() {} // Deprecated: Use Signing.ProtoReflect.Descriptor instead. func (*Signing) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_bandtss_proto_rawDescGZIP(), []int{1} + return file_band_bandtss_v1beta1_bandtss_proto_rawDescGZIP(), []int{2} } func (x *Signing) GetId() uint64 { @@ -2960,7 +3489,7 @@ type GroupTransition struct { func (x *GroupTransition) Reset() { *x = GroupTransition{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[2] + mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2974,7 +3503,7 @@ func (*GroupTransition) ProtoMessage() {} // Deprecated: Use GroupTransition.ProtoReflect.Descriptor instead. func (*GroupTransition) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_bandtss_proto_rawDescGZIP(), []int{2} + return file_band_bandtss_v1beta1_bandtss_proto_rawDescGZIP(), []int{3} } func (x *GroupTransition) GetSigningId() uint64 { @@ -3048,7 +3577,7 @@ type GroupTransitionSignatureOrder struct { func (x *GroupTransitionSignatureOrder) Reset() { *x = GroupTransitionSignatureOrder{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[3] + mi := &file_band_bandtss_v1beta1_bandtss_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3062,7 +3591,7 @@ func (*GroupTransitionSignatureOrder) ProtoMessage() {} // Deprecated: Use GroupTransitionSignatureOrder.ProtoReflect.Descriptor instead. func (*GroupTransitionSignatureOrder) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_bandtss_proto_rawDescGZIP(), []int{3} + return file_band_bandtss_v1beta1_bandtss_proto_rawDescGZIP(), []int{4} } func (x *GroupTransitionSignatureOrder) GetPubKey() []byte { @@ -3111,122 +3640,133 @@ var file_band_bandtss_v1beta1_bandtss_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x3a, 0x04, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0xde, 0x03, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, - 0x23, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x13, 0xe2, 0xde, 0x1f, - 0x02, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, - 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x50, 0x65, - 0x72, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0xe2, 0xde, 0x1f, 0x15, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0xa0, 0x1f, 0x01, 0x22, 0xb1, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, - 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, - 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x50, 0xe2, 0xde, 0x1f, 0x16, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, - 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, - 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x3a, 0x04, - 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xdf, 0x05, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x43, 0xe2, 0xde, - 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x32, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x70, 0x0a, 0x10, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0xe2, 0xde, 0x1f, 0x0e, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x0e, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x65, - 0x0a, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, - 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, - 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, + 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xde, 0x03, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x13, 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x66, 0x65, 0x65, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x66, + 0x65, 0x65, 0x50, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x18, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0xe2, 0xde, + 0x1f, 0x15, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x15, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x64, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, + 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x50, 0xe2, 0xde, 0x1f, 0x16, 0x49, 0x6e, + 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6f, + 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x49, 0x64, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xdf, 0x05, 0x0a, 0x0f, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x0a, + 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x43, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, + 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x73, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, - 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x47, 0xe2, 0xde, 0x1f, 0x0f, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, - 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, - 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x67, 0x0a, 0x16, 0x69, 0x6e, - 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x75, 0x62, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, - 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x75, 0x62, - 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x65, 0x78, - 0x65, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xca, 0x01, 0x0a, 0x1d, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0xfa, 0xde, 0x1f, 0x30, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, - 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x6c, 0x69, 0x62, 0x73, - 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, - 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x0b, 0xca, 0xb4, 0x2d, 0x07, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x2a, 0xae, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x41, 0x4e, - 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, - 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x53, - 0x49, 0x47, 0x4e, 0x10, 0x02, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, + 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, + 0x12, 0x70, 0x0a, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0xe2, 0xde, 0x1f, 0x0e, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, + 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x44, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x12, 0x65, 0x0a, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x73, 0x0a, 0x11, 0x69, 0x6e, 0x63, + 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x47, 0xe2, 0xde, 0x1f, 0x0f, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x0f, 0x69, + 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x67, + 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, + 0xfa, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, + 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x73, + 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x63, 0x65, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xca, 0x01, 0x0a, 0x1d, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x07, + 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0xfa, + 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, + 0x6c, 0x69, 0x62, 0x73, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x78, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x0b, 0xca, 0xb4, 0x2d, 0x07, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0xae, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x1d, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x52, + 0x4f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, - 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x1a, 0x04, - 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe8, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, - 0x58, 0xaa, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, - 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4e, 0x47, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x02, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, + 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x03, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe8, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, + 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, + 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, + 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, + 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3242,28 +3782,30 @@ func file_band_bandtss_v1beta1_bandtss_proto_rawDescGZIP() []byte { } var file_band_bandtss_v1beta1_bandtss_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_band_bandtss_v1beta1_bandtss_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_band_bandtss_v1beta1_bandtss_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_band_bandtss_v1beta1_bandtss_proto_goTypes = []interface{}{ (TransitionStatus)(0), // 0: band.bandtss.v1beta1.TransitionStatus (*Member)(nil), // 1: band.bandtss.v1beta1.Member - (*Signing)(nil), // 2: band.bandtss.v1beta1.Signing - (*GroupTransition)(nil), // 3: band.bandtss.v1beta1.GroupTransition - (*GroupTransitionSignatureOrder)(nil), // 4: band.bandtss.v1beta1.GroupTransitionSignatureOrder - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*v1beta1.Coin)(nil), // 6: cosmos.base.v1beta1.Coin + (*CurrentGroup)(nil), // 2: band.bandtss.v1beta1.CurrentGroup + (*Signing)(nil), // 3: band.bandtss.v1beta1.Signing + (*GroupTransition)(nil), // 4: band.bandtss.v1beta1.GroupTransition + (*GroupTransitionSignatureOrder)(nil), // 5: band.bandtss.v1beta1.GroupTransitionSignatureOrder + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*v1beta1.Coin)(nil), // 7: cosmos.base.v1beta1.Coin } var file_band_bandtss_v1beta1_bandtss_proto_depIdxs = []int32{ - 5, // 0: band.bandtss.v1beta1.Member.since:type_name -> google.protobuf.Timestamp - 5, // 1: band.bandtss.v1beta1.Member.last_active:type_name -> google.protobuf.Timestamp - 6, // 2: band.bandtss.v1beta1.Signing.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin - 0, // 3: band.bandtss.v1beta1.GroupTransition.status:type_name -> band.bandtss.v1beta1.TransitionStatus - 5, // 4: band.bandtss.v1beta1.GroupTransition.exec_time:type_name -> google.protobuf.Timestamp - 5, // 5: band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time:type_name -> google.protobuf.Timestamp - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 6, // 0: band.bandtss.v1beta1.Member.since:type_name -> google.protobuf.Timestamp + 6, // 1: band.bandtss.v1beta1.Member.last_active:type_name -> google.protobuf.Timestamp + 6, // 2: band.bandtss.v1beta1.CurrentGroup.active_time:type_name -> google.protobuf.Timestamp + 7, // 3: band.bandtss.v1beta1.Signing.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin + 0, // 4: band.bandtss.v1beta1.GroupTransition.status:type_name -> band.bandtss.v1beta1.TransitionStatus + 6, // 5: band.bandtss.v1beta1.GroupTransition.exec_time:type_name -> google.protobuf.Timestamp + 6, // 6: band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time:type_name -> google.protobuf.Timestamp + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_band_bandtss_v1beta1_bandtss_proto_init() } @@ -3285,7 +3827,7 @@ func file_band_bandtss_v1beta1_bandtss_proto_init() { } } file_band_bandtss_v1beta1_bandtss_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Signing); i { + switch v := v.(*CurrentGroup); i { case 0: return &v.state case 1: @@ -3297,7 +3839,7 @@ func file_band_bandtss_v1beta1_bandtss_proto_init() { } } file_band_bandtss_v1beta1_bandtss_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupTransition); i { + switch v := v.(*Signing); i { case 0: return &v.state case 1: @@ -3309,6 +3851,18 @@ func file_band_bandtss_v1beta1_bandtss_proto_init() { } } file_band_bandtss_v1beta1_bandtss_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupTransition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_band_bandtss_v1beta1_bandtss_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GroupTransitionSignatureOrder); i { case 0: return &v.state @@ -3327,7 +3881,7 @@ func file_band_bandtss_v1beta1_bandtss_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_band_bandtss_v1beta1_bandtss_proto_rawDesc, NumEnums: 1, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/api/band/bandtss/v1beta1/genesis.pulsar.go b/api/band/bandtss/v1beta1/genesis.pulsar.go index 36e1374d7..4c18592e2 100644 --- a/api/band/bandtss/v1beta1/genesis.pulsar.go +++ b/api/band/bandtss/v1beta1/genesis.pulsar.go @@ -67,10 +67,10 @@ func (x *_GenesisState_2_list) IsValid() bool { } var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_members protoreflect.FieldDescriptor - fd_GenesisState_current_group_id protoreflect.FieldDescriptor + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_members protoreflect.FieldDescriptor + fd_GenesisState_current_group protoreflect.FieldDescriptor ) func init() { @@ -78,7 +78,7 @@ func init() { md_GenesisState = File_band_bandtss_v1beta1_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_members = md_GenesisState.Fields().ByName("members") - fd_GenesisState_current_group_id = md_GenesisState.Fields().ByName("current_group_id") + fd_GenesisState_current_group = md_GenesisState.Fields().ByName("current_group") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -158,9 +158,9 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } - if x.CurrentGroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.CurrentGroupId) - if !f(fd_GenesisState_current_group_id, value) { + if x.CurrentGroup != nil { + value := protoreflect.ValueOfMessage(x.CurrentGroup.ProtoReflect()) + if !f(fd_GenesisState_current_group, value) { return } } @@ -183,8 +183,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return x.Params != nil case "band.bandtss.v1beta1.GenesisState.members": return len(x.Members) != 0 - case "band.bandtss.v1beta1.GenesisState.current_group_id": - return x.CurrentGroupId != uint64(0) + case "band.bandtss.v1beta1.GenesisState.current_group": + return x.CurrentGroup != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GenesisState")) @@ -205,8 +205,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.Params = nil case "band.bandtss.v1beta1.GenesisState.members": x.Members = nil - case "band.bandtss.v1beta1.GenesisState.current_group_id": - x.CurrentGroupId = uint64(0) + case "band.bandtss.v1beta1.GenesisState.current_group": + x.CurrentGroup = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GenesisState")) @@ -232,9 +232,9 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_2_list{list: &x.Members} return protoreflect.ValueOfList(listValue) - case "band.bandtss.v1beta1.GenesisState.current_group_id": - value := x.CurrentGroupId - return protoreflect.ValueOfUint64(value) + case "band.bandtss.v1beta1.GenesisState.current_group": + value := x.CurrentGroup + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GenesisState")) @@ -261,8 +261,8 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_2_list) x.Members = *clv.list - case "band.bandtss.v1beta1.GenesisState.current_group_id": - x.CurrentGroupId = value.Uint() + case "band.bandtss.v1beta1.GenesisState.current_group": + x.CurrentGroup = value.Message().Interface().(*CurrentGroup) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GenesisState")) @@ -294,8 +294,11 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_2_list{list: &x.Members} return protoreflect.ValueOfList(value) - case "band.bandtss.v1beta1.GenesisState.current_group_id": - panic(fmt.Errorf("field current_group_id of message band.bandtss.v1beta1.GenesisState is not mutable")) + case "band.bandtss.v1beta1.GenesisState.current_group": + if x.CurrentGroup == nil { + x.CurrentGroup = new(CurrentGroup) + } + return protoreflect.ValueOfMessage(x.CurrentGroup.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GenesisState")) @@ -315,8 +318,9 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "band.bandtss.v1beta1.GenesisState.members": list := []*Member{} return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) - case "band.bandtss.v1beta1.GenesisState.current_group_id": - return protoreflect.ValueOfUint64(uint64(0)) + case "band.bandtss.v1beta1.GenesisState.current_group": + m := new(CurrentGroup) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.GenesisState")) @@ -396,8 +400,9 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.CurrentGroupId != 0 { - n += 1 + runtime.Sov(uint64(x.CurrentGroupId)) + if x.CurrentGroup != nil { + l = options.Size(x.CurrentGroup) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -428,10 +433,19 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.CurrentGroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentGroupId)) + if x.CurrentGroup != nil { + encoded, err := options.Marshal(x.CurrentGroup) + 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] = 0x18 + dAtA[i] = 0x1a } if len(x.Members) > 0 { for iNdEx := len(x.Members) - 1; iNdEx >= 0; iNdEx-- { @@ -583,10 +597,10 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentGroupId", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentGroup", wireType) } - x.CurrentGroupId = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -596,11 +610,28 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.CurrentGroupId |= uint64(b&0x7F) << shift + 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.CurrentGroup == nil { + x.CurrentGroup = &CurrentGroup{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrentGroup); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1438,8 +1469,8 @@ type GenesisState struct { Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // members is an array containing members information. Members []*Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` - // current_group_id is the current group id of the module. - CurrentGroupId uint64 `protobuf:"varint,3,opt,name=current_group_id,json=currentGroupId,proto3" json:"current_group_id,omitempty"` + // current_group is the current group information. + CurrentGroup *CurrentGroup `protobuf:"bytes,3,opt,name=current_group,json=currentGroup,proto3" json:"current_group,omitempty"` } func (x *GenesisState) Reset() { @@ -1476,11 +1507,11 @@ func (x *GenesisState) GetMembers() []*Member { return nil } -func (x *GenesisState) GetCurrentGroupId() uint64 { +func (x *GenesisState) GetCurrentGroup() *CurrentGroup { if x != nil { - return x.CurrentGroupId + return x.CurrentGroup } - return 0 + return nil } // Params defines the set of module parameters. @@ -1572,7 +1603,7 @@ var file_band_bandtss_v1beta1_genesis_proto_rawDesc = []byte{ 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, @@ -1581,56 +1612,54 @@ var file_band_bandtss_v1beta1_genesis_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, - 0x70, 0x0a, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0xe2, 0xde, 0x1f, 0x0e, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, - 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, - 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x44, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x64, 0x22, 0xbc, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0f, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x11, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x52, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x52, 0x10, 0x72, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, - 0x19, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, - 0x79, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, - 0x00, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x17, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, - 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, - 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, - 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x03, 0x66, - 0x65, 0x65, 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x03, 0x66, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, - 0x42, 0xe4, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, - 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, - 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, - 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xbc, + 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0f, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, + 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x52, 0x10, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x19, 0x69, 0x6e, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, + 0x1f, 0x01, 0x52, 0x17, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x61, + 0x6c, 0x74, 0x79, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x17, 0x6d, + 0x61, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, + 0x01, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, + 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x52, 0x03, 0x66, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xe4, 0x01, + 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, 0x61, 0x6e, + 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, + 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x42, 0x61, + 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1650,21 +1679,23 @@ var file_band_bandtss_v1beta1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: band.bandtss.v1beta1.GenesisState (*Params)(nil), // 1: band.bandtss.v1beta1.Params (*Member)(nil), // 2: band.bandtss.v1beta1.Member - (*durationpb.Duration)(nil), // 3: google.protobuf.Duration - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin + (*CurrentGroup)(nil), // 3: band.bandtss.v1beta1.CurrentGroup + (*durationpb.Duration)(nil), // 4: google.protobuf.Duration + (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin } var file_band_bandtss_v1beta1_genesis_proto_depIdxs = []int32{ 1, // 0: band.bandtss.v1beta1.GenesisState.params:type_name -> band.bandtss.v1beta1.Params 2, // 1: band.bandtss.v1beta1.GenesisState.members:type_name -> band.bandtss.v1beta1.Member - 3, // 2: band.bandtss.v1beta1.Params.active_duration:type_name -> google.protobuf.Duration - 3, // 3: band.bandtss.v1beta1.Params.inactive_penalty_duration:type_name -> google.protobuf.Duration - 3, // 4: band.bandtss.v1beta1.Params.max_transition_duration:type_name -> google.protobuf.Duration - 4, // 5: band.bandtss.v1beta1.Params.fee:type_name -> cosmos.base.v1beta1.Coin - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 3, // 2: band.bandtss.v1beta1.GenesisState.current_group:type_name -> band.bandtss.v1beta1.CurrentGroup + 4, // 3: band.bandtss.v1beta1.Params.active_duration:type_name -> google.protobuf.Duration + 4, // 4: band.bandtss.v1beta1.Params.inactive_penalty_duration:type_name -> google.protobuf.Duration + 4, // 5: band.bandtss.v1beta1.Params.max_transition_duration:type_name -> google.protobuf.Duration + 5, // 6: band.bandtss.v1beta1.Params.fee:type_name -> cosmos.base.v1beta1.Coin + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_band_bandtss_v1beta1_genesis_proto_init() } diff --git a/api/band/bandtss/v1beta1/query.pulsar.go b/api/band/bandtss/v1beta1/query.pulsar.go index 811d02e11..d7fe232c1 100644 --- a/api/band/bandtss/v1beta1/query.pulsar.go +++ b/api/band/bandtss/v1beta1/query.pulsar.go @@ -12,6 +12,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" reflect "reflect" sync "sync" @@ -4072,12 +4073,13 @@ func (x *fastReflection_QueryCurrentGroupRequest) ProtoMethods() *protoiface.Met } var ( - md_QueryCurrentGroupResponse protoreflect.MessageDescriptor - fd_QueryCurrentGroupResponse_group_id protoreflect.FieldDescriptor - fd_QueryCurrentGroupResponse_size protoreflect.FieldDescriptor - fd_QueryCurrentGroupResponse_threshold protoreflect.FieldDescriptor - fd_QueryCurrentGroupResponse_pub_key protoreflect.FieldDescriptor - fd_QueryCurrentGroupResponse_status protoreflect.FieldDescriptor + md_QueryCurrentGroupResponse protoreflect.MessageDescriptor + fd_QueryCurrentGroupResponse_group_id protoreflect.FieldDescriptor + fd_QueryCurrentGroupResponse_size protoreflect.FieldDescriptor + fd_QueryCurrentGroupResponse_threshold protoreflect.FieldDescriptor + fd_QueryCurrentGroupResponse_pub_key protoreflect.FieldDescriptor + fd_QueryCurrentGroupResponse_status protoreflect.FieldDescriptor + fd_QueryCurrentGroupResponse_active_time protoreflect.FieldDescriptor ) func init() { @@ -4088,6 +4090,7 @@ func init() { fd_QueryCurrentGroupResponse_threshold = md_QueryCurrentGroupResponse.Fields().ByName("threshold") fd_QueryCurrentGroupResponse_pub_key = md_QueryCurrentGroupResponse.Fields().ByName("pub_key") fd_QueryCurrentGroupResponse_status = md_QueryCurrentGroupResponse.Fields().ByName("status") + fd_QueryCurrentGroupResponse_active_time = md_QueryCurrentGroupResponse.Fields().ByName("active_time") } var _ protoreflect.Message = (*fastReflection_QueryCurrentGroupResponse)(nil) @@ -4185,6 +4188,12 @@ func (x *fastReflection_QueryCurrentGroupResponse) Range(f func(protoreflect.Fie return } } + if x.ActiveTime != nil { + value := protoreflect.ValueOfMessage(x.ActiveTime.ProtoReflect()) + if !f(fd_QueryCurrentGroupResponse_active_time, value) { + return + } + } } // Has reports whether a field is populated. @@ -4210,6 +4219,8 @@ func (x *fastReflection_QueryCurrentGroupResponse) Has(fd protoreflect.FieldDesc return len(x.PubKey) != 0 case "band.bandtss.v1beta1.QueryCurrentGroupResponse.status": return x.Status != 0 + case "band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time": + return x.ActiveTime != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryCurrentGroupResponse")) @@ -4236,6 +4247,8 @@ func (x *fastReflection_QueryCurrentGroupResponse) Clear(fd protoreflect.FieldDe x.PubKey = nil case "band.bandtss.v1beta1.QueryCurrentGroupResponse.status": x.Status = 0 + case "band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time": + x.ActiveTime = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryCurrentGroupResponse")) @@ -4267,6 +4280,9 @@ func (x *fastReflection_QueryCurrentGroupResponse) Get(descriptor protoreflect.F case "band.bandtss.v1beta1.QueryCurrentGroupResponse.status": value := x.Status return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time": + value := x.ActiveTime + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryCurrentGroupResponse")) @@ -4297,6 +4313,8 @@ func (x *fastReflection_QueryCurrentGroupResponse) Set(fd protoreflect.FieldDesc x.PubKey = value.Bytes() case "band.bandtss.v1beta1.QueryCurrentGroupResponse.status": x.Status = (v1beta11.GroupStatus)(value.Enum()) + case "band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time": + x.ActiveTime = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryCurrentGroupResponse")) @@ -4317,6 +4335,11 @@ func (x *fastReflection_QueryCurrentGroupResponse) Set(fd protoreflect.FieldDesc // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentGroupResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time": + if x.ActiveTime == nil { + x.ActiveTime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.ActiveTime.ProtoReflect()) case "band.bandtss.v1beta1.QueryCurrentGroupResponse.group_id": panic(fmt.Errorf("field group_id of message band.bandtss.v1beta1.QueryCurrentGroupResponse is not mutable")) case "band.bandtss.v1beta1.QueryCurrentGroupResponse.size": @@ -4350,6 +4373,9 @@ func (x *fastReflection_QueryCurrentGroupResponse) NewField(fd protoreflect.Fiel return protoreflect.ValueOfBytes(nil) case "band.bandtss.v1beta1.QueryCurrentGroupResponse.status": return protoreflect.ValueOfEnum(0) + case "band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryCurrentGroupResponse")) @@ -4435,6 +4461,10 @@ func (x *fastReflection_QueryCurrentGroupResponse) ProtoMethods() *protoiface.Me if x.Status != 0 { n += 1 + runtime.Sov(uint64(x.Status)) } + if x.ActiveTime != nil { + l = options.Size(x.ActiveTime) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4464,6 +4494,20 @@ func (x *fastReflection_QueryCurrentGroupResponse) ProtoMethods() *protoiface.Me i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.ActiveTime != nil { + encoded, err := options.Marshal(x.ActiveTime) + 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] = 0x32 + } if x.Status != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) i-- @@ -4650,6 +4694,42 @@ func (x *fastReflection_QueryCurrentGroupResponse) ProtoMethods() *protoiface.Me break } } + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ActiveTime", 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.ActiveTime == nil { + x.ActiveTime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ActiveTime); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -8798,6 +8878,8 @@ type QueryCurrentGroupResponse struct { PubKey []byte `protobuf:"bytes,4,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` // status is the status of the current group. Status v1beta11.GroupStatus `protobuf:"varint,5,opt,name=status,proto3,enum=band.tss.v1beta1.GroupStatus" json:"status,omitempty"` + // active_time is the timestamp at which the group becomes the current group of the module. + ActiveTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=active_time,json=activeTime,proto3" json:"active_time,omitempty"` } func (x *QueryCurrentGroupResponse) Reset() { @@ -8855,6 +8937,13 @@ func (x *QueryCurrentGroupResponse) GetStatus() v1beta11.GroupStatus { return v1beta11.GroupStatus(0) } +func (x *QueryCurrentGroupResponse) GetActiveTime() *timestamppb.Timestamp { + if x != nil { + return x.ActiveTime + } + return nil +} + // QueryIncomingGroupRequest is the request type for the Query/IncomingGroup RPC method. type QueryIncomingGroupRequest struct { state protoimpl.MessageState @@ -9191,261 +9280,268 @@ var file_band_bandtss_v1beta1_query_proto_rawDesc = []byte{ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 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, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, - 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4b, - 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x37, 0x0a, 0x16, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, - 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x49, 0x6e, 0x63, - 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x12, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc3, 0x01, 0x0a, - 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x15, 0x69, 0x6e, - 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x13, 0x69, - 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x22, 0x1a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xad, - 0x02, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, - 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4b, 0x0a, 0x07, 0x70, 0x75, - 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, - 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, - 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x62, 0x61, 0x6e, 0x64, 0x2f, + 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x73, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x74, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x62, 0x61, 0x6e, 0x64, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, + 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x4b, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x37, 0x0a, 0x16, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x49, 0x6e, + 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, + 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc3, 0x01, + 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x15, 0x69, + 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x13, + 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x22, 0x1a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0xf4, 0x02, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, + 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, + 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4b, 0x0a, 0x07, 0x70, + 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, + 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x45, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0xae, 0x02, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, + 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x12, 0x4b, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x34, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0xed, 0x02, 0x0a, 0x14, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0e, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x50, 0x65, 0x72, + 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x19, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x62, 0x0a, 0x1d, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x1a, + 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x70, 0x0a, 0x1c, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1b, - 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xae, 0x02, 0x0a, 0x1a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, - 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4b, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x34, 0x0a, 0x13, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x49, 0x64, 0x22, 0xed, 0x02, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0e, 0x66, - 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x03, 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, 0x30, - 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, - 0x52, 0x0c, 0x66, 0x65, 0x65, 0x50, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x1c, - 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x62, - 0x0a, 0x1d, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x1a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x70, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x50, 0x0a, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2a, 0x84, 0x01, 0x0a, - 0x12, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x20, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x45, 0x4d, - 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, - 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x45, - 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, - 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0x04, 0x88, - 0xa3, 0x1e, 0x00, 0x32, 0xab, 0x0a, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7e, 0x0a, - 0x06, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x9f, 0x01, - 0x0a, 0x09, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x12, 0x2b, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, - 0x82, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x2a, 0x84, 0x01, 0x0a, 0x12, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x20, 0x4d, + 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, + 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, + 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x32, 0xab, 0x0a, 0x0a, 0x05, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7e, 0x0a, 0x06, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, - 0x12, 0x97, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x9b, 0x01, 0x0a, 0x0d, 0x49, - 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, - 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, - 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, - 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x90, 0x01, 0x0a, 0x07, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x9f, 0x01, 0x0a, 0x09, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x65, 0x65, 0x12, 0x2b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, + 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x65, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x89, 0x01, 0x0a, + 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x9b, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, - 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0f, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, + 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0xe2, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, - 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, - 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, - 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, + 0x1f, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x90, 0x01, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x62, 0x61, + 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, + 0x12, 0x17, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xe2, 0x01, 0x0a, 0x18, 0x63, 0x6f, + 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, + 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, + 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, + 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, + 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, + 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -9486,10 +9582,11 @@ var file_band_bandtss_v1beta1_query_proto_goTypes = []interface{}{ (*Member)(nil), // 20: band.bandtss.v1beta1.Member (*v1beta1.PageResponse)(nil), // 21: cosmos.base.query.v1beta1.PageResponse (v1beta11.GroupStatus)(0), // 22: band.tss.v1beta1.GroupStatus - (*v1beta12.Coin)(nil), // 23: cosmos.base.v1beta1.Coin - (*v1beta11.SigningResult)(nil), // 24: band.tss.v1beta1.SigningResult - (*GroupTransition)(nil), // 25: band.bandtss.v1beta1.GroupTransition - (*Params)(nil), // 26: band.bandtss.v1beta1.Params + (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp + (*v1beta12.Coin)(nil), // 24: cosmos.base.v1beta1.Coin + (*v1beta11.SigningResult)(nil), // 25: band.tss.v1beta1.SigningResult + (*GroupTransition)(nil), // 26: band.bandtss.v1beta1.GroupTransition + (*Params)(nil), // 27: band.bandtss.v1beta1.Params } var file_band_bandtss_v1beta1_query_proto_depIdxs = []int32{ 0, // 0: band.bandtss.v1beta1.QueryMembersRequest.status:type_name -> band.bandtss.v1beta1.MemberStatusFilter @@ -9499,35 +9596,36 @@ var file_band_bandtss_v1beta1_query_proto_depIdxs = []int32{ 20, // 4: band.bandtss.v1beta1.QueryMemberResponse.current_group_member:type_name -> band.bandtss.v1beta1.Member 20, // 5: band.bandtss.v1beta1.QueryMemberResponse.incoming_group_member:type_name -> band.bandtss.v1beta1.Member 22, // 6: band.bandtss.v1beta1.QueryCurrentGroupResponse.status:type_name -> band.tss.v1beta1.GroupStatus - 22, // 7: band.bandtss.v1beta1.QueryIncomingGroupResponse.status:type_name -> band.tss.v1beta1.GroupStatus - 23, // 8: band.bandtss.v1beta1.QuerySigningResponse.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin - 24, // 9: band.bandtss.v1beta1.QuerySigningResponse.current_group_signing_result:type_name -> band.tss.v1beta1.SigningResult - 24, // 10: band.bandtss.v1beta1.QuerySigningResponse.incoming_group_signing_result:type_name -> band.tss.v1beta1.SigningResult - 25, // 11: band.bandtss.v1beta1.QueryGroupTransitionResponse.group_transition:type_name -> band.bandtss.v1beta1.GroupTransition - 26, // 12: band.bandtss.v1beta1.QueryParamsResponse.params:type_name -> band.bandtss.v1beta1.Params - 1, // 13: band.bandtss.v1beta1.Query.Counts:input_type -> band.bandtss.v1beta1.QueryCountsRequest - 3, // 14: band.bandtss.v1beta1.Query.IsGrantee:input_type -> band.bandtss.v1beta1.QueryIsGranteeRequest - 5, // 15: band.bandtss.v1beta1.Query.Members:input_type -> band.bandtss.v1beta1.QueryMembersRequest - 7, // 16: band.bandtss.v1beta1.Query.Member:input_type -> band.bandtss.v1beta1.QueryMemberRequest - 9, // 17: band.bandtss.v1beta1.Query.CurrentGroup:input_type -> band.bandtss.v1beta1.QueryCurrentGroupRequest - 11, // 18: band.bandtss.v1beta1.Query.IncomingGroup:input_type -> band.bandtss.v1beta1.QueryIncomingGroupRequest - 13, // 19: band.bandtss.v1beta1.Query.Signing:input_type -> band.bandtss.v1beta1.QuerySigningRequest - 15, // 20: band.bandtss.v1beta1.Query.GroupTransition:input_type -> band.bandtss.v1beta1.QueryGroupTransitionRequest - 17, // 21: band.bandtss.v1beta1.Query.Params:input_type -> band.bandtss.v1beta1.QueryParamsRequest - 2, // 22: band.bandtss.v1beta1.Query.Counts:output_type -> band.bandtss.v1beta1.QueryCountsResponse - 4, // 23: band.bandtss.v1beta1.Query.IsGrantee:output_type -> band.bandtss.v1beta1.QueryIsGranteeResponse - 6, // 24: band.bandtss.v1beta1.Query.Members:output_type -> band.bandtss.v1beta1.QueryMembersResponse - 8, // 25: band.bandtss.v1beta1.Query.Member:output_type -> band.bandtss.v1beta1.QueryMemberResponse - 10, // 26: band.bandtss.v1beta1.Query.CurrentGroup:output_type -> band.bandtss.v1beta1.QueryCurrentGroupResponse - 12, // 27: band.bandtss.v1beta1.Query.IncomingGroup:output_type -> band.bandtss.v1beta1.QueryIncomingGroupResponse - 14, // 28: band.bandtss.v1beta1.Query.Signing:output_type -> band.bandtss.v1beta1.QuerySigningResponse - 16, // 29: band.bandtss.v1beta1.Query.GroupTransition:output_type -> band.bandtss.v1beta1.QueryGroupTransitionResponse - 18, // 30: band.bandtss.v1beta1.Query.Params:output_type -> band.bandtss.v1beta1.QueryParamsResponse - 22, // [22:31] is the sub-list for method output_type - 13, // [13:22] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 23, // 7: band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time:type_name -> google.protobuf.Timestamp + 22, // 8: band.bandtss.v1beta1.QueryIncomingGroupResponse.status:type_name -> band.tss.v1beta1.GroupStatus + 24, // 9: band.bandtss.v1beta1.QuerySigningResponse.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin + 25, // 10: band.bandtss.v1beta1.QuerySigningResponse.current_group_signing_result:type_name -> band.tss.v1beta1.SigningResult + 25, // 11: band.bandtss.v1beta1.QuerySigningResponse.incoming_group_signing_result:type_name -> band.tss.v1beta1.SigningResult + 26, // 12: band.bandtss.v1beta1.QueryGroupTransitionResponse.group_transition:type_name -> band.bandtss.v1beta1.GroupTransition + 27, // 13: band.bandtss.v1beta1.QueryParamsResponse.params:type_name -> band.bandtss.v1beta1.Params + 1, // 14: band.bandtss.v1beta1.Query.Counts:input_type -> band.bandtss.v1beta1.QueryCountsRequest + 3, // 15: band.bandtss.v1beta1.Query.IsGrantee:input_type -> band.bandtss.v1beta1.QueryIsGranteeRequest + 5, // 16: band.bandtss.v1beta1.Query.Members:input_type -> band.bandtss.v1beta1.QueryMembersRequest + 7, // 17: band.bandtss.v1beta1.Query.Member:input_type -> band.bandtss.v1beta1.QueryMemberRequest + 9, // 18: band.bandtss.v1beta1.Query.CurrentGroup:input_type -> band.bandtss.v1beta1.QueryCurrentGroupRequest + 11, // 19: band.bandtss.v1beta1.Query.IncomingGroup:input_type -> band.bandtss.v1beta1.QueryIncomingGroupRequest + 13, // 20: band.bandtss.v1beta1.Query.Signing:input_type -> band.bandtss.v1beta1.QuerySigningRequest + 15, // 21: band.bandtss.v1beta1.Query.GroupTransition:input_type -> band.bandtss.v1beta1.QueryGroupTransitionRequest + 17, // 22: band.bandtss.v1beta1.Query.Params:input_type -> band.bandtss.v1beta1.QueryParamsRequest + 2, // 23: band.bandtss.v1beta1.Query.Counts:output_type -> band.bandtss.v1beta1.QueryCountsResponse + 4, // 24: band.bandtss.v1beta1.Query.IsGrantee:output_type -> band.bandtss.v1beta1.QueryIsGranteeResponse + 6, // 25: band.bandtss.v1beta1.Query.Members:output_type -> band.bandtss.v1beta1.QueryMembersResponse + 8, // 26: band.bandtss.v1beta1.Query.Member:output_type -> band.bandtss.v1beta1.QueryMemberResponse + 10, // 27: band.bandtss.v1beta1.Query.CurrentGroup:output_type -> band.bandtss.v1beta1.QueryCurrentGroupResponse + 12, // 28: band.bandtss.v1beta1.Query.IncomingGroup:output_type -> band.bandtss.v1beta1.QueryIncomingGroupResponse + 14, // 29: band.bandtss.v1beta1.Query.Signing:output_type -> band.bandtss.v1beta1.QuerySigningResponse + 16, // 30: band.bandtss.v1beta1.Query.GroupTransition:output_type -> band.bandtss.v1beta1.QueryGroupTransitionResponse + 18, // 31: band.bandtss.v1beta1.Query.Params:output_type -> band.bandtss.v1beta1.QueryParamsResponse + 23, // [23:32] is the sub-list for method output_type + 14, // [14:23] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_band_bandtss_v1beta1_query_proto_init() } diff --git a/benchmark/app_test.go b/benchmark/app_test.go index 8943aca57..ad04e6d1b 100644 --- a/benchmark/app_test.go +++ b/benchmark/app_test.go @@ -235,7 +235,7 @@ func (ba *BenchmarkApp) SetupTSSGroup() { tssKeeper.SetDKGContext(ctx, gid, dkg) // Set current group in bandtss module - bandtssKeeper.SetCurrentGroupID(ctx, gid) + bandtssKeeper.SetCurrentGroup(ctx, bandtsstypes.NewCurrentGroup(gid, ctx.BlockTime())) err = bandtssKeeper.AddMember(ctx, ba.Sender.Address, gid) require.NoError(ba.TB, err) diff --git a/benchmark/tss_bench_test.go b/benchmark/tss_bench_test.go index 015008b47..d03735bcd 100644 --- a/benchmark/tss_bench_test.go +++ b/benchmark/tss_bench_test.go @@ -95,7 +95,7 @@ func BenchmarkSubmitSignatureDeliver(b *testing.B) { // deliver MsgSubmitSignature to the block for i := 0; i < b.N; i++ { - gid := ba.BandtssKeeper.GetCurrentGroupID(ba.Ctx) + gid := ba.BandtssKeeper.GetCurrentGroup(ba.Ctx).GroupID require.NotZero(b, gid) // generate tx @@ -144,7 +144,7 @@ func BenchmarkEndBlockHandleProcessSigning(b *testing.B) { ) require.NoError(b, err) - gid := ba.BandtssKeeper.GetCurrentGroupID(ba.Ctx) + gid := ba.BandtssKeeper.GetCurrentGroup(ba.Ctx).GroupID require.NotZero(b, gid) // generate tx diff --git a/proto/band/bandtss/v1beta1/bandtss.proto b/proto/band/bandtss/v1beta1/bandtss.proto index e04357bd6..57c05b6b2 100644 --- a/proto/band/bandtss/v1beta1/bandtss.proto +++ b/proto/band/bandtss/v1beta1/bandtss.proto @@ -26,6 +26,15 @@ message Member { google.protobuf.Timestamp last_active = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } +// CuurentGroup is a bandtss current group information. +message CurrentGroup { + // group_id is the ID of the current group. + uint64 group_id = 1 + [(gogoproto.customname) = "GroupID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v3/pkg/tss.GroupID"]; + // active_time is the timestamp at which the group becomes the current group of the module. + google.protobuf.Timestamp active_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + // Signing is a bandtss signing information. message Signing { option (gogoproto.equal) = true; diff --git a/proto/band/bandtss/v1beta1/genesis.proto b/proto/band/bandtss/v1beta1/genesis.proto index 882df49ae..8777c3f94 100644 --- a/proto/band/bandtss/v1beta1/genesis.proto +++ b/proto/band/bandtss/v1beta1/genesis.proto @@ -15,11 +15,8 @@ message GenesisState { Params params = 1 [(gogoproto.nullable) = false]; // members is an array containing members information. repeated Member members = 2 [(gogoproto.nullable) = false]; - // current_group_id is the current group id of the module. - uint64 current_group_id = 3 [ - (gogoproto.customname) = "CurrentGroupID", - (gogoproto.casttype) = "github.com/bandprotocol/chain/v3/pkg/tss.GroupID" - ]; + // current_group is the current group information. + CurrentGroup current_group = 3 [(gogoproto.nullable) = false]; } // Params defines the set of module parameters. diff --git a/proto/band/bandtss/v1beta1/query.proto b/proto/band/bandtss/v1beta1/query.proto index 8ccda619d..2caf7a0eb 100644 --- a/proto/band/bandtss/v1beta1/query.proto +++ b/proto/band/bandtss/v1beta1/query.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package band.bandtss.v1beta1; import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "cosmos/base/v1beta1/coin.proto"; import "google/api/annotations.proto"; @@ -132,6 +133,8 @@ message QueryCurrentGroupResponse { bytes pub_key = 4 [(gogoproto.casttype) = "github.com/bandprotocol/chain/v3/pkg/tss.Point"]; // status is the status of the current group. band.tss.v1beta1.GroupStatus status = 5; + // active_time is the timestamp at which the group becomes the current group of the module. + google.protobuf.Timestamp active_time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // QueryIncomingGroupRequest is the request type for the Query/IncomingGroup RPC method. diff --git a/x/bandtss/abci_test.go b/x/bandtss/abci_test.go index 4a9aaa10e..c2bb1e5fa 100644 --- a/x/bandtss/abci_test.go +++ b/x/bandtss/abci_test.go @@ -37,7 +37,7 @@ func TestReplaceGroups(t *testing.T) { ctx = ctx.WithBlockTime(time.Now().UTC()) now := time.Now().UTC() - beforenow := now.Add(time.Duration(-5) * time.Minute) + execTime := now.Add(time.Duration(-5) * time.Minute) signingID := tss.SigningID(1) currentGroupID := tss.GroupID(1) @@ -80,14 +80,14 @@ func TestReplaceGroups(t *testing.T) { Address: "band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun", }) - bandtssKeeper.SetCurrentGroupID(ctx, currentGroupID) + bandtssKeeper.SetCurrentGroup(ctx, types.NewCurrentGroup(currentGroupID, time.Time{})) bandtssKeeper.SetGroupTransition(ctx, types.GroupTransition{ SigningID: signingID, CurrentGroupID: currentGroupID, CurrentGroupPubKey: currentGroup.PubKey, IncomingGroupID: incomingGroupID, IncomingGroupPubKey: incomingGroup.PubKey, - ExecTime: beforenow, + ExecTime: execTime, Status: types.TRANSITION_STATUS_WAITING_EXECUTION, }) tssKeeper.SetSigning(ctx, signing) @@ -98,5 +98,7 @@ func TestReplaceGroups(t *testing.T) { _, found := bandtssKeeper.GetGroupTransition(ctx) require.False(t, found) - require.Equal(t, incomingGroupID, bandtssKeeper.GetCurrentGroupID(ctx)) + newCurrentGroup := bandtssKeeper.GetCurrentGroup(ctx) + require.Equal(t, incomingGroupID, newCurrentGroup.GroupID) + require.Equal(t, execTime, newCurrentGroup.ActiveTime) } diff --git a/x/bandtss/keeper/genesis.go b/x/bandtss/keeper/genesis.go index fb8f0e9ea..596a6179d 100644 --- a/x/bandtss/keeper/genesis.go +++ b/x/bandtss/keeper/genesis.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/bandprotocol/chain/v3/pkg/tss" "github.com/bandprotocol/chain/v3/x/bandtss/types" ) @@ -25,7 +26,17 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { panic(err) } - k.SetCurrentGroupID(ctx, data.CurrentGroupID) + if data.CurrentGroup.GroupID != tss.GroupID(0) && + data.CurrentGroup.ActiveTime.After(ctx.BlockTime()) { + panic("invalid genesis state: current group active time is in the future") + } + + if data.CurrentGroup.GroupID == tss.GroupID(0) && + !data.CurrentGroup.ActiveTime.IsZero() { + panic("invalid genesis state: current group ID is not set but active time is set") + } + + k.SetCurrentGroup(ctx, data.CurrentGroup) for _, member := range data.Members { k.SetMember(ctx, member) @@ -35,8 +46,8 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { // ExportGenesis returns a GenesisState for a given context and keeper. func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { return &types.GenesisState{ - Params: k.GetParams(ctx), - Members: k.GetMembers(ctx), - CurrentGroupID: k.GetCurrentGroupID(ctx), + Params: k.GetParams(ctx), + Members: k.GetMembers(ctx), + CurrentGroup: k.GetCurrentGroup(ctx), } } diff --git a/x/bandtss/keeper/genesis_test.go b/x/bandtss/keeper/genesis_test.go index 5c63ebb7e..042357e90 100644 --- a/x/bandtss/keeper/genesis_test.go +++ b/x/bandtss/keeper/genesis_test.go @@ -1,12 +1,13 @@ package keeper_test import ( + "time" + "go.uber.org/mock/gomock" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/bandprotocol/chain/v3/pkg/tss" bandtesting "github.com/bandprotocol/chain/v3/testing" "github.com/bandprotocol/chain/v3/x/bandtss/types" ) @@ -34,13 +35,13 @@ func (s *KeeperTestSuite) TestExportGenesis() { LastActive: ctx.BlockTime(), }, }, - CurrentGroupID: tss.GroupID(1), + CurrentGroup: types.NewCurrentGroup(1, ctx.BlockTime()), } k.InitGenesis(ctx, data) - currentGroupID := k.GetCurrentGroupID(ctx) - s.Require().Equal(data.CurrentGroupID, currentGroupID) + currentGroup := k.GetCurrentGroup(ctx) + s.Require().Equal(data.CurrentGroup, currentGroup) members := k.GetMembers(ctx) s.Require().Equal(data.Members, members) @@ -49,7 +50,7 @@ func (s *KeeperTestSuite) TestExportGenesis() { s.Require().Equal(data.Params, exported.Params) } -func (s *KeeperTestSuite) TestExportGenesisGroupTransitionNil() { +func (s *KeeperTestSuite) TestImportGenesisInvalidActiveTime() { ctx, k := s.ctx, s.keeper s.accountKeeper.EXPECT(). @@ -72,10 +73,41 @@ func (s *KeeperTestSuite) TestExportGenesisGroupTransitionNil() { LastActive: ctx.BlockTime(), }, }, - CurrentGroupID: tss.GroupID(1), + CurrentGroup: types.NewCurrentGroup(1, ctx.BlockTime().Add(time.Hour)), } - k.InitGenesis(ctx, data) - exported := k.ExportGenesis(ctx) - s.Require().Equal(data.Params, exported.Params) + s.Require().Panics(func() { + k.InitGenesis(ctx, data) + }) +} + +func (s *KeeperTestSuite) TestImportGenesisInvalidCurrentGroupInfo() { + ctx, k := s.ctx, s.keeper + + s.accountKeeper.EXPECT(). + GetModuleAccount(ctx, gomock.Any()). + Return(sdk.AccountI(&authtypes.ModuleAccount{ + BaseAccount: &authtypes.BaseAccount{Address: "test"}, + })). + AnyTimes() + s.accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(sdk.AccAddress{}).AnyTimes() + s.accountKeeper.EXPECT().SetModuleAccount(ctx, gomock.Any()).AnyTimes() + s.bankKeeper.EXPECT().GetAllBalances(ctx, gomock.Any()).Return(sdk.Coins{}).AnyTimes() + + data := types.GenesisState{ + Params: types.DefaultParams(), + Members: []types.Member{ + { + Address: bandtesting.Alice.Address.String(), + Since: ctx.BlockTime(), + IsActive: true, + LastActive: ctx.BlockTime(), + }, + }, + CurrentGroup: types.NewCurrentGroup(0, ctx.BlockTime().Add(-1*time.Hour)), + } + + s.Require().Panics(func() { + k.InitGenesis(ctx, data) + }) } diff --git a/x/bandtss/keeper/grpc_query.go b/x/bandtss/keeper/grpc_query.go index 5ab60eedd..81a49a973 100644 --- a/x/bandtss/keeper/grpc_query.go +++ b/x/bandtss/keeper/grpc_query.go @@ -67,7 +67,7 @@ func (q queryServer) Member( return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } - currentGroupID := q.k.GetCurrentGroupID(ctx) + currentGroupID := q.k.GetCurrentGroup(ctx).GroupID currentGroupMember, _ := q.k.GetMember(ctx, address, currentGroupID) incomingGroupID := q.k.GetIncomingGroupID(ctx) @@ -90,7 +90,7 @@ func (q queryServer) Members( if req.IsIncomingGroup { groupID = q.k.GetIncomingGroupID(ctx) } else { - groupID = q.k.GetCurrentGroupID(ctx) + groupID = q.k.GetCurrentGroup(ctx).GroupID } iteratorKey := append(types.MemberStoreKeyPrefix, sdk.Uint64ToBigEndian(uint64(groupID))...) @@ -138,22 +138,23 @@ func (q queryServer) CurrentGroup( ) (*types.QueryCurrentGroupResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - groupID := q.k.GetCurrentGroupID(ctx) - if groupID == 0 { + currentGroup := q.k.GetCurrentGroup(ctx) + if currentGroup.GroupID == 0 { return nil, types.ErrNoCurrentGroup } - group, err := q.k.tssKeeper.GetGroup(ctx, groupID) + group, err := q.k.tssKeeper.GetGroup(ctx, currentGroup.GroupID) if err != nil { return nil, err } return &types.QueryCurrentGroupResponse{ - GroupID: groupID, - Size_: group.Size_, - Threshold: group.Threshold, - PubKey: group.PubKey, - Status: group.Status, + GroupID: currentGroup.GroupID, + Size_: group.Size_, + Threshold: group.Threshold, + PubKey: group.PubKey, + Status: group.Status, + ActiveTime: currentGroup.ActiveTime, }, nil } diff --git a/x/bandtss/keeper/grpc_query_test.go b/x/bandtss/keeper/grpc_query_test.go index d7d816a6e..aaa542d5b 100644 --- a/x/bandtss/keeper/grpc_query_test.go +++ b/x/bandtss/keeper/grpc_query_test.go @@ -99,7 +99,7 @@ func (s *KeeperTestSuite) TestGRPCQueryMembers() { for _, tc := range testCases { s.Run(fmt.Sprintf("Case %s", tc.name), func() { q := s.queryServer - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, time.Now())) for _, member := range members { s.keeper.SetMember(s.ctx, *member) diff --git a/x/bandtss/keeper/keeper.go b/x/bandtss/keeper/keeper.go index 70e5ea5e3..983411a26 100644 --- a/x/bandtss/keeper/keeper.go +++ b/x/bandtss/keeper/keeper.go @@ -9,7 +9,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/bandprotocol/chain/v3/pkg/tss" "github.com/bandprotocol/chain/v3/x/bandtss/types" ) @@ -83,14 +82,21 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) } -// SetCurrentGroupID sets a current groupID of the bandtss module. -func (k Keeper) SetCurrentGroupID(ctx sdk.Context, groupID tss.GroupID) { - ctx.KVStore(k.storeKey).Set(types.CurrentGroupIDStoreKey, sdk.Uint64ToBigEndian(uint64(groupID))) +// SetCurrentGroup sets a current group information of the bandtss module. +func (k Keeper) SetCurrentGroup(ctx sdk.Context, currentGroup types.CurrentGroup) { + ctx.KVStore(k.storeKey).Set(types.CurrentGroupStoreKey, k.cdc.MustMarshal(¤tGroup)) } -// GetCurrentGroupID retrieves a current groupID of the bandtss module. -func (k Keeper) GetCurrentGroupID(ctx sdk.Context) tss.GroupID { - return tss.GroupID(sdk.BigEndianToUint64(ctx.KVStore(k.storeKey).Get(types.CurrentGroupIDStoreKey))) +// GetCurrentGroup retrieves a current group information of the bandtss module. +func (k Keeper) GetCurrentGroup(ctx sdk.Context) types.CurrentGroup { + bz := ctx.KVStore(k.storeKey).Get(types.CurrentGroupStoreKey) + if bz == nil { + return types.CurrentGroup{} + } + + var currentGroup types.CurrentGroup + k.cdc.MustUnmarshal(bz, ¤tGroup) + return currentGroup } // CheckIsGrantee checks if the granter granted permissions to the grantee. diff --git a/x/bandtss/keeper/keeper_reward.go b/x/bandtss/keeper/keeper_reward.go index 9c39840f5..465d69456 100644 --- a/x/bandtss/keeper/keeper_reward.go +++ b/x/bandtss/keeper/keeper_reward.go @@ -13,7 +13,7 @@ import ( // current group. Note that this reward is also subjected to comm tax and this reward is // calculate after allocation in oracle module. func (k Keeper) AllocateTokens(ctx sdk.Context) { - gid := k.GetCurrentGroupID(ctx) + gid := k.GetCurrentGroup(ctx).GroupID if gid == tss.GroupID(0) { return } diff --git a/x/bandtss/keeper/keeper_reward_test.go b/x/bandtss/keeper/keeper_reward_test.go index 339dda3d2..9d8321bed 100644 --- a/x/bandtss/keeper/keeper_reward_test.go +++ b/x/bandtss/keeper/keeper_reward_test.go @@ -18,6 +18,7 @@ import ( "github.com/bandprotocol/chain/v3/pkg/tss/testutil" bandtesting "github.com/bandprotocol/chain/v3/testing" "github.com/bandprotocol/chain/v3/x/bandtss/keeper" + "github.com/bandprotocol/chain/v3/x/bandtss/types" tsstypes "github.com/bandprotocol/chain/v3/x/tss/types" ) @@ -96,7 +97,7 @@ func (s *AppTestSuite) TestAllocateTokensOneActive() { // create a new group groupCtx := s.SetupNewGroup(2, 1) - k.SetCurrentGroupID(ctx, groupCtx.GroupID) + k.SetCurrentGroup(ctx, types.NewCurrentGroup(groupCtx.GroupID, s.ctx.BlockTime())) alice := groupCtx.Accounts[0].Address bob := groupCtx.Accounts[1].Address @@ -163,7 +164,7 @@ func (s *AppTestSuite) TestAllocateTokensAllActive() { s.Require().Equal(Coins1000000uband, app.BankKeeper.GetAllBalances(ctx, feeCollector.GetAddress())) groupCtx := s.SetupNewGroup(3, 2) - k.SetCurrentGroupID(ctx, groupCtx.GroupID) + k.SetCurrentGroup(ctx, types.NewCurrentGroup(groupCtx.GroupID, s.ctx.BlockTime())) for _, acc := range groupCtx.Accounts { deQueue := s.app.TSSKeeper.GetDEQueue(ctx, acc.Address) diff --git a/x/bandtss/keeper/keeper_signing.go b/x/bandtss/keeper/keeper_signing.go index bf3944129..f89e2c5a3 100644 --- a/x/bandtss/keeper/keeper_signing.go +++ b/x/bandtss/keeper/keeper_signing.go @@ -53,7 +53,7 @@ func (k Keeper) createSigningRequest( sender sdk.AccAddress, feeLimit sdk.Coins, ) (types.SigningID, error) { - currentGroupID := k.GetCurrentGroupID(ctx) + currentGroupID := k.GetCurrentGroup(ctx).GroupID incomingGroupID := k.GetIncomingGroupID(ctx) if currentGroupID == 0 && incomingGroupID == 0 { return 0, types.ErrNoActiveGroup diff --git a/x/bandtss/keeper/keeper_signing_test.go b/x/bandtss/keeper/keeper_signing_test.go index 5137d4c96..34d6857fc 100644 --- a/x/bandtss/keeper/keeper_signing_test.go +++ b/x/bandtss/keeper/keeper_signing_test.go @@ -35,7 +35,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { { name: "test success with only current group", preProcess: func(s *KeeperTestSuite) { - s.keeper.SetCurrentGroupID(s.ctx, currentGroupID) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(currentGroupID, s.ctx.BlockTime())) s.tssKeeper.EXPECT().GetGroup(gomock.Any(), currentGroupID). Return(currentGroup, nil). @@ -82,7 +82,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { IncomingGroupID: incomingGroupID, } s.keeper.SetGroupTransition(s.ctx, transition) - s.keeper.SetCurrentGroupID(s.ctx, currentGroupID) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(currentGroupID, s.ctx.BlockTime())) s.tssKeeper.EXPECT().GetGroup(gomock.Any(), currentGroupID). Return(currentGroup, nil). @@ -133,7 +133,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { IncomingGroupID: incomingGroupID, } s.keeper.SetGroupTransition(s.ctx, transition) - s.keeper.SetCurrentGroupID(s.ctx, currentGroupID) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(currentGroupID, s.ctx.BlockTime())) s.tssKeeper.EXPECT().GetGroup(gomock.Any(), currentGroupID). Return(currentGroup, nil). @@ -222,7 +222,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequest() { params.Fee = sdk.NewCoins(sdk.NewInt64Coin("uband", 100)) err := s.keeper.SetParams(s.ctx, params) s.Require().NoError(err) - s.keeper.SetCurrentGroupID(s.ctx, currentGroupID) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(currentGroupID, s.ctx.BlockTime())) s.tssKeeper.EXPECT().GetGroup(gomock.Any(), currentGroupID). Return(currentGroup, nil). @@ -260,7 +260,7 @@ func (s *KeeperTestSuite) TestCreateDirectSigningRequestWithAuthority() { currentGID := tss.GroupID(1) content := &tsstypes.TextSignatureOrder{Message: []byte("test")} - s.keeper.SetCurrentGroupID(s.ctx, currentGID) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(currentGID, s.ctx.BlockTime())) s.tssKeeper.EXPECT().RequestSigning( gomock.Any(), currentGID, diff --git a/x/bandtss/keeper/keeper_test.go b/x/bandtss/keeper/keeper_test.go index a6f6d06eb..30d0137d2 100644 --- a/x/bandtss/keeper/keeper_test.go +++ b/x/bandtss/keeper/keeper_test.go @@ -150,7 +150,7 @@ func (s *AppTestSuite) ExecuteReplaceGroup() error { return err } - if transition.IncomingGroupID != s.app.BandtssKeeper.GetCurrentGroupID(s.ctx) { + if transition.IncomingGroupID != s.app.BandtssKeeper.GetCurrentGroup(s.ctx).GroupID { return fmt.Errorf("unexpected current group id: %d", transition.IncomingGroupID) } return nil diff --git a/x/bandtss/keeper/keeper_transition.go b/x/bandtss/keeper/keeper_transition.go index 2262418e0..da2905599 100644 --- a/x/bandtss/keeper/keeper_transition.go +++ b/x/bandtss/keeper/keeper_transition.go @@ -24,7 +24,7 @@ func (k Keeper) SetNewGroupTransition( } // get the current group ID and public key. - currentGroupID := k.GetCurrentGroupID(ctx) + currentGroupID := k.GetCurrentGroup(ctx).GroupID var currentGroupPubKey tss.Point if currentGroupID != 0 { currentGroup, err := k.tssKeeper.GetGroup(ctx, currentGroupID) @@ -100,7 +100,9 @@ func (k Keeper) ExecuteGroupTransition(ctx sdk.Context, transition types.GroupTr if transition.CurrentGroupID != 0 { k.DeleteMembers(ctx, transition.CurrentGroupID) } - k.SetCurrentGroupID(ctx, transition.IncomingGroupID) + + newCurrentGroup := types.NewCurrentGroup(transition.IncomingGroupID, transition.ExecTime) + k.SetCurrentGroup(ctx, newCurrentGroup) k.EndGroupTransitionProcess(ctx, transition, true) } @@ -154,7 +156,7 @@ func (k Keeper) CreateTransitionSigning( groupPubKey tss.Point, transitionTime time.Time, ) (tss.SigningID, error) { - currentGroupID := k.GetCurrentGroupID(ctx) + currentGroupID := k.GetCurrentGroup(ctx).GroupID moduleAcc := k.GetBandtssAccount(ctx) originator := tsstypes.DirectOriginator{ diff --git a/x/bandtss/keeper/keeper_transition_test.go b/x/bandtss/keeper/keeper_transition_test.go index 2b8d5fbea..0d4c28179 100644 --- a/x/bandtss/keeper/keeper_transition_test.go +++ b/x/bandtss/keeper/keeper_transition_test.go @@ -15,9 +15,11 @@ import ( func (s *KeeperTestSuite) TestHandleGroupTransition() { acc1 := sdk.MustAccAddressFromBech32("band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs") acc2 := sdk.MustAccAddressFromBech32("band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun") + execTime := s.ctx.BlockTime().Add(-10 * time.Minute) + type expectOut struct { - status types.TransitionStatus - currentGroupID tss.GroupID + status types.TransitionStatus + currentGroup types.CurrentGroup } testCases := []struct { @@ -44,21 +46,27 @@ func (s *KeeperTestSuite) TestHandleGroupTransition() { }) }, expectOut: expectOut{ - status: types.TRANSITION_STATUS_UNSPECIFIED, - currentGroupID: tss.GroupID(1), + status: types.TRANSITION_STATUS_UNSPECIFIED, + currentGroup: types.CurrentGroup{ + GroupID: tss.GroupID(1), + ActiveTime: s.ctx.BlockTime(), + }, }, }, { - name: "transition with status WaitingExecution; has a current group", + name: "force transition with status WaitingExecution; has a current group", preProcess: func(s *KeeperTestSuite) { s.keeper.SetGroupTransition(s.ctx, types.GroupTransition{ SigningID: tss.SigningID(0), CurrentGroupID: tss.GroupID(1), IncomingGroupID: tss.GroupID(2), Status: types.TRANSITION_STATUS_WAITING_EXECUTION, - ExecTime: s.ctx.BlockTime().Add(-10 * time.Minute), + ExecTime: execTime, }) - s.keeper.SetCurrentGroupID(s.ctx, tss.GroupID(1)) + + currentGroup := types.NewCurrentGroup(tss.GroupID(1), s.ctx.BlockTime().Add(-30*time.Minute)) + s.keeper.SetCurrentGroup(s.ctx, currentGroup) + err := s.keeper.AddMember(s.ctx, acc1, tss.GroupID(1)) s.Require().NoError(err) err = s.keeper.AddMember(s.ctx, acc2, tss.GroupID(1)) @@ -70,8 +78,11 @@ func (s *KeeperTestSuite) TestHandleGroupTransition() { }) }, expectOut: expectOut{ - status: types.TRANSITION_STATUS_UNSPECIFIED, - currentGroupID: tss.GroupID(2), + status: types.TRANSITION_STATUS_UNSPECIFIED, + currentGroup: types.CurrentGroup{ + GroupID: tss.GroupID(2), + ActiveTime: execTime, + }, }, postProcess: func(s *KeeperTestSuite) { members := s.keeper.GetMembers(s.ctx) @@ -88,9 +99,12 @@ func (s *KeeperTestSuite) TestHandleGroupTransition() { CurrentGroupID: tss.GroupID(1), IncomingGroupID: tss.GroupID(2), Status: types.TRANSITION_STATUS_WAITING_EXECUTION, - ExecTime: s.ctx.BlockTime().Add(-10 * time.Minute), + ExecTime: execTime, }) - s.keeper.SetCurrentGroupID(s.ctx, tss.GroupID(1)) + + currentGroup := types.NewCurrentGroup(tss.GroupID(1), s.ctx.BlockTime().Add(-30*time.Minute)) + s.keeper.SetCurrentGroup(s.ctx, currentGroup) + err := s.keeper.AddMember(s.ctx, acc1, tss.GroupID(1)) s.Require().NoError(err) err = s.keeper.AddMember(s.ctx, acc2, tss.GroupID(1)) @@ -102,8 +116,11 @@ func (s *KeeperTestSuite) TestHandleGroupTransition() { }) }, expectOut: expectOut{ - status: types.TRANSITION_STATUS_UNSPECIFIED, - currentGroupID: tss.GroupID(2), + status: types.TRANSITION_STATUS_UNSPECIFIED, + currentGroup: types.CurrentGroup{ + GroupID: tss.GroupID(2), + ActiveTime: execTime, + }, }, postProcess: func(s *KeeperTestSuite) { members := s.keeper.GetMembers(s.ctx) @@ -120,13 +137,18 @@ func (s *KeeperTestSuite) TestHandleGroupTransition() { CurrentGroupID: tss.GroupID(1), IncomingGroupID: tss.GroupID(2), Status: types.TRANSITION_STATUS_CREATING_GROUP, - ExecTime: s.ctx.BlockTime().Add(-10 * time.Minute), + ExecTime: execTime, }) - s.keeper.SetCurrentGroupID(s.ctx, tss.GroupID(1)) + + currentGroup := types.NewCurrentGroup(tss.GroupID(1), s.ctx.BlockTime().Add(-30*time.Minute)) + s.keeper.SetCurrentGroup(s.ctx, currentGroup) }, expectOut: expectOut{ - status: types.TRANSITION_STATUS_UNSPECIFIED, - currentGroupID: tss.GroupID(1), + status: types.TRANSITION_STATUS_UNSPECIFIED, + currentGroup: types.CurrentGroup{ + GroupID: tss.GroupID(1), + ActiveTime: s.ctx.BlockTime().Add(-30 * time.Minute), + }, }, }, { @@ -137,13 +159,18 @@ func (s *KeeperTestSuite) TestHandleGroupTransition() { CurrentGroupID: tss.GroupID(1), IncomingGroupID: tss.GroupID(2), Status: types.TRANSITION_STATUS_WAITING_SIGN, - ExecTime: s.ctx.BlockTime().Add(-10 * time.Minute), + ExecTime: execTime, }) - s.keeper.SetCurrentGroupID(s.ctx, tss.GroupID(1)) + + currentGroup := types.NewCurrentGroup(tss.GroupID(1), s.ctx.BlockTime().Add(-30*time.Minute)) + s.keeper.SetCurrentGroup(s.ctx, currentGroup) }, expectOut: expectOut{ - status: types.TRANSITION_STATUS_UNSPECIFIED, - currentGroupID: tss.GroupID(1), + status: types.TRANSITION_STATUS_UNSPECIFIED, + currentGroup: types.CurrentGroup{ + GroupID: tss.GroupID(1), + ActiveTime: s.ctx.BlockTime().Add(-30 * time.Minute), + }, }, }, } @@ -165,7 +192,11 @@ func (s *KeeperTestSuite) TestHandleGroupTransition() { s.Require().True(found) s.Require().Equal(tc.expectOut.status, gt.Status) } - s.Require().Equal(tc.expectOut.currentGroupID, s.keeper.GetCurrentGroupID(s.ctx)) + + currentGroup := s.keeper.GetCurrentGroup(s.ctx) + expect := tc.expectOut.currentGroup + s.Require().Equal(expect.GroupID, currentGroup.GroupID) + s.Require().Equal(expect.ActiveTime, currentGroup.ActiveTime) if tc.postProcess != nil { tc.postProcess(s) diff --git a/x/bandtss/keeper/msg_server.go b/x/bandtss/keeper/msg_server.go index 73b7a223a..07d31f461 100644 --- a/x/bandtss/keeper/msg_server.go +++ b/x/bandtss/keeper/msg_server.go @@ -98,7 +98,7 @@ func (k msgServer) ForceTransitionGroup( } // validate incoming group - currentGroupID := k.GetCurrentGroupID(ctx) + currentGroupID := k.GetCurrentGroup(ctx).GroupID if currentGroupID == req.IncomingGroupID { return nil, types.ErrInvalidIncomingGroup.Wrap("incoming group is the same as the current group") } diff --git a/x/bandtss/keeper/msg_server_test.go b/x/bandtss/keeper/msg_server_test.go index 7be663f11..359478a40 100644 --- a/x/bandtss/keeper/msg_server_test.go +++ b/x/bandtss/keeper/msg_server_test.go @@ -36,7 +36,7 @@ func (s *AppTestSuite) TestSuccessTransitionGroupReqWithCurrentGroup() { s.Require().NoError(err) // Check if the group is created but not impact current group ID in bandtss. - s.Require().Equal(groupCtx.GroupID, k.GetCurrentGroupID(ctx)) + s.Require().Equal(groupCtx.GroupID, k.GetCurrentGroup(ctx).GroupID) group := s.app.TSSKeeper.MustGetGroup(ctx, groupCtx.GroupID) transition, found := k.GetGroupTransition(ctx) expectedTransition := types.GroupTransition{ @@ -63,7 +63,7 @@ func (s *AppTestSuite) TestSuccessTransitionGroupReqNoCurrentGroup() { s.Require().NoError(err) // Check if the group is created but not impact current group ID in bandtss. - s.Require().Equal(tss.GroupID(0), k.GetCurrentGroupID(ctx)) + s.Require().Equal(tss.GroupID(0), k.GetCurrentGroup(ctx).GroupID) transition, found := k.GetGroupTransition(ctx) expectedTransition := types.GroupTransition{ Status: types.TRANSITION_STATUS_CREATING_GROUP, @@ -333,7 +333,7 @@ func (s *AppTestSuite) TestSuccessForceTransitionGroupFromFallenStatus() { func (s *AppTestSuite) TestFailedRequestSignatureReq() { ctx, msgSrvr := s.ctx, s.msgSrvr groupCtx := s.SetupNewGroup(5, 3) - s.app.BandtssKeeper.SetCurrentGroupID(ctx, groupCtx.GroupID) + s.app.BandtssKeeper.SetCurrentGroup(ctx, types.NewCurrentGroup(groupCtx.GroupID, s.ctx.BlockTime())) var req *types.MsgRequestSignature var err error @@ -342,7 +342,7 @@ func (s *AppTestSuite) TestFailedRequestSignatureReq() { { Name: "failure with no groupID", PreProcess: func() { - s.app.BandtssKeeper.SetCurrentGroupID(ctx, 0) + s.app.BandtssKeeper.SetCurrentGroup(ctx, types.NewCurrentGroup(0, time.Time{})) req, err = types.NewMsgRequestSignature( tsstypes.NewTextSignatureOrder([]byte("msg")), sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), @@ -351,7 +351,10 @@ func (s *AppTestSuite) TestFailedRequestSignatureReq() { s.Require().NoError(err) }, PostCheck: func() { - s.app.BandtssKeeper.SetCurrentGroupID(ctx, groupCtx.GroupID) + s.app.BandtssKeeper.SetCurrentGroup( + ctx, + types.NewCurrentGroup(groupCtx.GroupID, s.ctx.BlockTime()), + ) }, ExpectedErr: types.ErrNoActiveGroup, }, diff --git a/x/bandtss/keeper/tss_callback_test.go b/x/bandtss/keeper/tss_callback_test.go index 1f6b252ec..2ccaae035 100644 --- a/x/bandtss/keeper/tss_callback_test.go +++ b/x/bandtss/keeper/tss_callback_test.go @@ -191,7 +191,7 @@ func (s *KeeperTestSuite) TestCallbackOnSignTimeout() { ID: 1, GroupID: 1, }) - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) s.keeper.SetSigningIDMapping(s.ctx, 1, 1) s.keeper.SetMember(s.ctx, types.Member{ Address: penalizedMembers[0].String(), @@ -239,7 +239,7 @@ func (s *KeeperTestSuite) TestCallbackOnSignTimeout() { ID: 2, GroupID: 2, }) - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) s.keeper.SetSigningIDMapping(s.ctx, 1, 1) s.keeper.SetSigningIDMapping(s.ctx, 2, 1) s.keeper.SetMember(s.ctx, types.Member{ @@ -503,7 +503,7 @@ func (s *KeeperTestSuite) TestCallbackOnSignCompleted() { CurrentGroupSigningID: 1, IncomingGroupSigningID: 0, }) - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) s.keeper.SetGroupTransition(s.ctx, types.GroupTransition{ SigningID: tss.SigningID(3), Status: types.TRANSITION_STATUS_WAITING_SIGN, @@ -549,7 +549,7 @@ func (s *KeeperTestSuite) TestCallbackOnSignCompleted() { CurrentGroupSigningID: 1, IncomingGroupSigningID: 0, }) - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) s.keeper.SetGroupTransition(s.ctx, types.GroupTransition{ SigningID: tss.SigningID(3), Status: types.TRANSITION_STATUS_WAITING_SIGN, @@ -582,7 +582,7 @@ func (s *KeeperTestSuite) TestCallbackOnSignCompleted() { CurrentGroupSigningID: 1, IncomingGroupSigningID: 0, }) - s.keeper.SetCurrentGroupID(s.ctx, 2) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(2, s.ctx.BlockTime())) s.bankKeeper.EXPECT().SendCoinsFromModuleToAccount( gomock.Any(), @@ -730,12 +730,12 @@ func (s *KeeperTestSuite) TestCallbackOnGroupCreationComplete() { name: "transition status unspecified", input: 2, preProcess: func(s *KeeperTestSuite) { - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) }, postCheck: func(s *KeeperTestSuite) { _, found := s.keeper.GetGroupTransition(s.ctx) s.Require().False(found) - s.Require().Equal(tss.GroupID(1), s.keeper.GetCurrentGroupID(s.ctx)) + s.Require().Equal(tss.GroupID(1), s.keeper.GetCurrentGroup(s.ctx).GroupID) }, }, { @@ -748,13 +748,13 @@ func (s *KeeperTestSuite) TestCallbackOnGroupCreationComplete() { IncomingGroupID: tss.GroupID(2), ExecTime: s.ctx.BlockTime().Add(-10 * time.Minute), }) - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) }, postCheck: func(s *KeeperTestSuite) { transition, found := s.keeper.GetGroupTransition(s.ctx) s.Require().True(found) s.Require().Equal(types.TRANSITION_STATUS_CREATING_GROUP, transition.Status) - s.Require().Equal(tss.GroupID(1), s.keeper.GetCurrentGroupID(s.ctx)) + s.Require().Equal(tss.GroupID(1), s.keeper.GetCurrentGroup(s.ctx).GroupID) }, }, { @@ -767,13 +767,13 @@ func (s *KeeperTestSuite) TestCallbackOnGroupCreationComplete() { IncomingGroupID: tss.GroupID(3), ExecTime: s.ctx.BlockTime().Add(10 * time.Minute), }) - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) }, postCheck: func(s *KeeperTestSuite) { transition, found := s.keeper.GetGroupTransition(s.ctx) s.Require().True(found) s.Require().Equal(types.TRANSITION_STATUS_CREATING_GROUP, transition.Status) - s.Require().Equal(tss.GroupID(1), s.keeper.GetCurrentGroupID(s.ctx)) + s.Require().Equal(tss.GroupID(1), s.keeper.GetCurrentGroup(s.ctx).GroupID) }, }, { @@ -804,7 +804,7 @@ func (s *KeeperTestSuite) TestCallbackOnGroupCreationComplete() { s.Require().Equal(tss.Point(nil), transition.CurrentGroupPubKey) s.Require().Equal(tss.Point([]byte("pubkey")), transition.IncomingGroupPubKey) - s.Require().Equal(tss.GroupID(0), s.keeper.GetCurrentGroupID(s.ctx)) + s.Require().Equal(tss.GroupID(0), s.keeper.GetCurrentGroup(s.ctx).GroupID) for _, member := range members { m, err := s.keeper.GetMember(s.ctx, sdk.MustAccAddressFromBech32(member.Address), tss.GroupID(1)) @@ -832,7 +832,7 @@ func (s *KeeperTestSuite) TestCallbackOnGroupCreationComplete() { IncomingGroupID: tss.GroupID(2), ExecTime: s.ctx.BlockTime().Add(10 * time.Minute), }) - s.keeper.SetCurrentGroupID(s.ctx, 1) + s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) s.accountKeeper.EXPECT().GetModuleAccount(gomock.Any(), types.ModuleName).Return( s.moduleAcc, ) @@ -856,7 +856,7 @@ func (s *KeeperTestSuite) TestCallbackOnGroupCreationComplete() { s.Require().Equal(tss.SigningID(1), transition.SigningID) s.Require().Equal(tss.Point([]byte("pubkey-2")), transition.IncomingGroupPubKey) - s.Require().Equal(tss.GroupID(1), s.keeper.GetCurrentGroupID(s.ctx)) + s.Require().Equal(tss.GroupID(1), s.keeper.GetCurrentGroup(s.ctx).GroupID) for _, member := range members { ok := s.keeper.HasMember(s.ctx, sdk.MustAccAddressFromBech32(member.Address), tss.GroupID(2)) diff --git a/x/bandtss/types/bandtss.pb.go b/x/bandtss/types/bandtss.pb.go index b18254dd9..57ece5a3a 100644 --- a/x/bandtss/types/bandtss.pb.go +++ b/x/bandtss/types/bandtss.pb.go @@ -155,6 +155,61 @@ func (m *Member) GetLastActive() time.Time { return time.Time{} } +// CuurentGroup is a bandtss current group information. +type CurrentGroup struct { + // group_id is the ID of the current group. + GroupID github_com_bandprotocol_chain_v3_pkg_tss.GroupID `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3,casttype=github.com/bandprotocol/chain/v3/pkg/tss.GroupID" json:"group_id,omitempty"` + // active_time is the timestamp at which the group becomes the current group of the module. + ActiveTime time.Time `protobuf:"bytes,2,opt,name=active_time,json=activeTime,proto3,stdtime" json:"active_time"` +} + +func (m *CurrentGroup) Reset() { *m = CurrentGroup{} } +func (m *CurrentGroup) String() string { return proto.CompactTextString(m) } +func (*CurrentGroup) ProtoMessage() {} +func (*CurrentGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_2bc325518cc10c44, []int{1} +} +func (m *CurrentGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CurrentGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CurrentGroup.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 *CurrentGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_CurrentGroup.Merge(m, src) +} +func (m *CurrentGroup) XXX_Size() int { + return m.Size() +} +func (m *CurrentGroup) XXX_DiscardUnknown() { + xxx_messageInfo_CurrentGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_CurrentGroup proto.InternalMessageInfo + +func (m *CurrentGroup) GetGroupID() github_com_bandprotocol_chain_v3_pkg_tss.GroupID { + if m != nil { + return m.GroupID + } + return 0 +} + +func (m *CurrentGroup) GetActiveTime() time.Time { + if m != nil { + return m.ActiveTime + } + return time.Time{} +} + // Signing is a bandtss signing information. type Signing struct { // id is the unique identifier of the bandtss signing. @@ -173,7 +228,7 @@ func (m *Signing) Reset() { *m = Signing{} } func (m *Signing) String() string { return proto.CompactTextString(m) } func (*Signing) ProtoMessage() {} func (*Signing) Descriptor() ([]byte, []int) { - return fileDescriptor_2bc325518cc10c44, []int{1} + return fileDescriptor_2bc325518cc10c44, []int{2} } func (m *Signing) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -262,7 +317,7 @@ func (m *GroupTransition) Reset() { *m = GroupTransition{} } func (m *GroupTransition) String() string { return proto.CompactTextString(m) } func (*GroupTransition) ProtoMessage() {} func (*GroupTransition) Descriptor() ([]byte, []int) { - return fileDescriptor_2bc325518cc10c44, []int{2} + return fileDescriptor_2bc325518cc10c44, []int{3} } func (m *GroupTransition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +414,7 @@ func (m *GroupTransitionSignatureOrder) Reset() { *m = GroupTransitionSi func (m *GroupTransitionSignatureOrder) String() string { return proto.CompactTextString(m) } func (*GroupTransitionSignatureOrder) ProtoMessage() {} func (*GroupTransitionSignatureOrder) Descriptor() ([]byte, []int) { - return fileDescriptor_2bc325518cc10c44, []int{3} + return fileDescriptor_2bc325518cc10c44, []int{4} } func (m *GroupTransitionSignatureOrder) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -405,6 +460,7 @@ func (m *GroupTransitionSignatureOrder) GetTransitionTime() time.Time { func init() { proto.RegisterEnum("band.bandtss.v1beta1.TransitionStatus", TransitionStatus_name, TransitionStatus_value) proto.RegisterType((*Member)(nil), "band.bandtss.v1beta1.Member") + proto.RegisterType((*CurrentGroup)(nil), "band.bandtss.v1beta1.CurrentGroup") proto.RegisterType((*Signing)(nil), "band.bandtss.v1beta1.Signing") proto.RegisterType((*GroupTransition)(nil), "band.bandtss.v1beta1.GroupTransition") proto.RegisterType((*GroupTransitionSignatureOrder)(nil), "band.bandtss.v1beta1.GroupTransitionSignatureOrder") @@ -415,67 +471,68 @@ func init() { } var fileDescriptor_2bc325518cc10c44 = []byte{ - // 947 bytes of a gzipped FileDescriptorProto + // 970 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0x16, 0x65, 0x5d, 0xc7, 0x81, 0xac, 0x8c, 0x63, 0x83, 0xf6, 0xff, 0x87, 0x54, 0x95, 0xa2, - 0x15, 0x0a, 0x84, 0x4c, 0x94, 0xae, 0xbc, 0x68, 0x21, 0xc9, 0xb2, 0x4a, 0x14, 0x96, 0x05, 0x4a, - 0x46, 0x8b, 0x6c, 0x08, 0x5e, 0x46, 0xcc, 0xc0, 0x16, 0x47, 0xe1, 0x8c, 0x0c, 0xfb, 0x0d, 0x02, - 0x74, 0x93, 0x47, 0x28, 0xd0, 0x2e, 0x8a, 0x2e, 0xba, 0xea, 0x43, 0x04, 0x59, 0x65, 0xd9, 0x15, - 0x5d, 0xd0, 0x9b, 0x3e, 0x83, 0x57, 0x05, 0x87, 0xd4, 0xd5, 0x2e, 0x1a, 0x1b, 0xdd, 0x48, 0x3c, - 0x73, 0xbe, 0x73, 0xfb, 0xbe, 0xc3, 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, 0xbf, + 0x9e, 0x64, 0x9a, 0xae, 0xc3, 0xb0, 0xc3, 0xbe, 0xfa, 0x03, 0xc0, 0xe2, 0x32, 0xb9, 0xe8, 0x33, + 0xf8, 0xa8, 0xaf, 0xd6, 0x3b, 0x3d, 0xa5, 0xaf, 0x1c, 0x76, 0xb4, 0x5e, 0xbf, 0xde, 0x3f, 0xea, + 0x69, 0x47, 0x9d, 0x5e, 0xb7, 0xd5, 0x54, 0xf6, 0x95, 0xd6, 0x5e, 0x31, 0x81, 0x3e, 0x87, 0xe5, + 0xeb, 0x21, 0x4d, 0xb5, 0x55, 0xef, 0x2b, 0x9d, 0xb6, 0xd6, 0x56, 0x0f, 0x8f, 0xba, 0x45, 0x80, + 0x2a, 0x50, 0xb8, 0x1e, 0xf5, 0x43, 0x5d, 0xe1, 0x41, 0x3d, 0xa5, 0xdd, 0x29, 0x26, 0xd1, 0x97, + 0xf0, 0xf1, 0xff, 0xc7, 0xb4, 0x7e, 0x6c, 0x35, 0x8f, 0x42, 0x47, 0x71, 0x65, 0x67, 0xf5, 0xf5, + 0x2f, 0x42, 0xa2, 0xd1, 0xf9, 0x2d, 0x10, 0xc0, 0xdb, 0x40, 0x00, 0xef, 0x03, 0x01, 0xfc, 0x13, + 0x08, 0xe0, 0xcd, 0xa5, 0x90, 0x78, 0x7f, 0x29, 0x24, 0xfe, 0xbe, 0x14, 0x12, 0x2f, 0x3e, 0xbc, + 0xfa, 0x67, 0xd3, 0xff, 0x40, 0xfc, 0x05, 0x60, 0xa4, 0x79, 0xc8, 0xf3, 0xff, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x14, 0x79, 0xd0, 0x66, 0x20, 0x09, 0x00, 0x00, } func (this *Member) Equal(that interface{}) bool { @@ -514,6 +571,33 @@ func (this *Member) Equal(that interface{}) bool { } return true } +func (this *CurrentGroup) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CurrentGroup) + if !ok { + that2, ok := that.(CurrentGroup) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.GroupID != that1.GroupID { + return false + } + if !this.ActiveTime.Equal(that1.ActiveTime) { + return false + } + return true +} func (this *Signing) Equal(that interface{}) bool { if that == nil { return this == nil @@ -688,6 +772,42 @@ func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *CurrentGroup) 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 *CurrentGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CurrentGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ActiveTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ActiveTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintBandtss(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x12 + if m.GroupID != 0 { + i = encodeVarintBandtss(dAtA, i, uint64(m.GroupID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *Signing) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -777,12 +897,12 @@ func (m *GroupTransition) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x40 } - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ExecTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExecTime):]) - if err3 != nil { - return 0, err3 + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ExecTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExecTime):]) + if err4 != nil { + return 0, err4 } - i -= n3 - i = encodeVarintBandtss(dAtA, i, uint64(n3)) + i -= n4 + i = encodeVarintBandtss(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x3a if m.Status != 0 { @@ -842,12 +962,12 @@ func (m *GroupTransitionSignatureOrder) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.TransitionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.TransitionTime):]) - if err4 != nil { - return 0, err4 + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.TransitionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.TransitionTime):]) + if err5 != nil { + return 0, err5 } - i -= n4 - i = encodeVarintBandtss(dAtA, i, uint64(n4)) + i -= n5 + i = encodeVarintBandtss(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x12 if len(m.PubKey) > 0 { @@ -894,6 +1014,20 @@ func (m *Member) Size() (n int) { return n } +func (m *CurrentGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.GroupID != 0 { + n += 1 + sovBandtss(uint64(m.GroupID)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ActiveTime) + n += 1 + l + sovBandtss(uint64(l)) + return n +} + func (m *Signing) Size() (n int) { if m == nil { return 0 @@ -1164,6 +1298,108 @@ func (m *Member) Unmarshal(dAtA []byte) error { } return nil } +func (m *CurrentGroup) 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 ErrIntOverflowBandtss + } + 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: CurrentGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CurrentGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) + } + m.GroupID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBandtss + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupID |= github_com_bandprotocol_chain_v3_pkg_tss.GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBandtss + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBandtss + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBandtss + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ActiveTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBandtss(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBandtss + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Signing) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/bandtss/types/constructors.go b/x/bandtss/types/constructors.go index efed23e40..ec0c77e9b 100644 --- a/x/bandtss/types/constructors.go +++ b/x/bandtss/types/constructors.go @@ -9,6 +9,17 @@ import ( "github.com/bandprotocol/chain/v3/pkg/tss" ) +// NewCurrentGroup creates a new current group object. +func NewCurrentGroup( + id tss.GroupID, + transitionSince time.Time, +) CurrentGroup { + return CurrentGroup{ + GroupID: id, + ActiveTime: transitionSince, + } +} + // NewGroupTransition creates a transition object. func NewGroupTransition( signingID tss.SigningID, diff --git a/x/bandtss/types/genesis.go b/x/bandtss/types/genesis.go index d20656b12..a68f3d957 100644 --- a/x/bandtss/types/genesis.go +++ b/x/bandtss/types/genesis.go @@ -2,20 +2,18 @@ package types import ( "fmt" - - "github.com/bandprotocol/chain/v3/pkg/tss" ) // NewGenesisState creates a new GenesisState instance. func NewGenesisState( params Params, members []Member, - currentGroupID tss.GroupID, + currentGroup CurrentGroup, ) *GenesisState { return &GenesisState{ - Params: params, - Members: members, - CurrentGroupID: currentGroupID, + Params: params, + Members: members, + CurrentGroup: currentGroup, } } @@ -24,7 +22,7 @@ func DefaultGenesisState() *GenesisState { return NewGenesisState( DefaultParams(), []Member{}, - 0, + CurrentGroup{}, ) } @@ -40,8 +38,8 @@ func (gs GenesisState) Validate() error { return err } - if m.GroupID != gs.CurrentGroupID { - return fmt.Errorf("member %s is not in current group %d", m.Address, gs.CurrentGroupID) + if m.GroupID != gs.CurrentGroup.GroupID { + return fmt.Errorf("member %s is not in current group %d", m.Address, gs.CurrentGroup.GroupID) } } diff --git a/x/bandtss/types/genesis.pb.go b/x/bandtss/types/genesis.pb.go index cb68d11b5..a3a6f07c9 100644 --- a/x/bandtss/types/genesis.pb.go +++ b/x/bandtss/types/genesis.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - github_com_bandprotocol_chain_v3_pkg_tss "github.com/bandprotocol/chain/v3/pkg/tss" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -36,8 +35,8 @@ type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // members is an array containing members information. Members []Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` - // current_group_id is the current group id of the module. - CurrentGroupID github_com_bandprotocol_chain_v3_pkg_tss.GroupID `protobuf:"varint,3,opt,name=current_group_id,json=currentGroupId,proto3,casttype=github.com/bandprotocol/chain/v3/pkg/tss.GroupID" json:"current_group_id,omitempty"` + // current_group is the current group information. + CurrentGroup CurrentGroup `protobuf:"bytes,3,opt,name=current_group,json=currentGroup,proto3" json:"current_group"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -87,11 +86,11 @@ func (m *GenesisState) GetMembers() []Member { return nil } -func (m *GenesisState) GetCurrentGroupID() github_com_bandprotocol_chain_v3_pkg_tss.GroupID { +func (m *GenesisState) GetCurrentGroup() CurrentGroup { if m != nil { - return m.CurrentGroupID + return m.CurrentGroup } - return 0 + return CurrentGroup{} } // Params defines the set of module parameters. @@ -188,39 +187,38 @@ func init() { } var fileDescriptor_3fe6a4345855d3c9 = []byte{ - // 515 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcd, 0x6e, 0xd3, 0x30, - 0x1c, 0x6f, 0xd6, 0x52, 0x90, 0x41, 0xa5, 0x44, 0x45, 0x6b, 0x27, 0x94, 0x54, 0x3d, 0xf5, 0x82, - 0xbd, 0xb1, 0xdb, 0xc4, 0x85, 0x6c, 0x62, 0x02, 0x81, 0x54, 0x05, 0x4e, 0x20, 0x14, 0x39, 0x89, - 0x97, 0x59, 0x6b, 0xec, 0xc8, 0x76, 0x4a, 0xf7, 0x16, 0x1c, 0x39, 0x72, 0xe6, 0x19, 0x78, 0x80, - 0x1d, 0x77, 0xe4, 0xd4, 0xa1, 0xf4, 0xc2, 0x33, 0xec, 0x84, 0xec, 0x7c, 0x6c, 0x42, 0x43, 0xec, - 0x92, 0x0f, 0xff, 0x3e, 0xfc, 0xfb, 0xc7, 0xbf, 0x80, 0x49, 0x88, 0x59, 0x8c, 0xf4, 0x45, 0x49, - 0x89, 0x16, 0x3b, 0x21, 0x51, 0x78, 0x07, 0x25, 0x84, 0x11, 0x49, 0x25, 0xcc, 0x04, 0x57, 0xdc, - 0x1e, 0x68, 0x18, 0x56, 0x1c, 0x58, 0x71, 0xb6, 0x06, 0x09, 0x4f, 0xb8, 0x21, 0x20, 0xfd, 0x54, - 0x72, 0xb7, 0x9c, 0x84, 0xf3, 0x64, 0x4e, 0x90, 0x79, 0x0b, 0xf3, 0x23, 0x14, 0xe7, 0x02, 0x2b, - 0xca, 0x59, 0x8d, 0x47, 0x5c, 0xa6, 0x5c, 0xa2, 0x10, 0x4b, 0xd2, 0x6c, 0x17, 0x71, 0x5a, 0xe3, - 0x37, 0xe7, 0xa9, 0xf7, 0x36, 0x9c, 0xc9, 0xa5, 0x05, 0x1e, 0x1c, 0x96, 0x09, 0xdf, 0x29, 0xac, - 0x88, 0xbd, 0x07, 0xba, 0x19, 0x16, 0x38, 0x95, 0x43, 0x6b, 0x6c, 0x4d, 0xef, 0x3f, 0x7b, 0x02, - 0x6f, 0x4a, 0x0c, 0x67, 0x86, 0xe3, 0x75, 0xce, 0x56, 0x6e, 0xcb, 0xaf, 0x14, 0xf6, 0x73, 0x70, - 0x37, 0x25, 0x69, 0x48, 0x84, 0x1c, 0x6e, 0x8c, 0xdb, 0xff, 0x16, 0xbf, 0x35, 0xa4, 0x4a, 0x5c, - 0x4b, 0xec, 0x0c, 0xf4, 0xa3, 0x5c, 0x08, 0xc2, 0x54, 0x90, 0x08, 0x9e, 0x67, 0x01, 0x8d, 0x87, - 0xed, 0xb1, 0x35, 0xed, 0x78, 0x2f, 0x8b, 0x95, 0xdb, 0xdb, 0x2f, 0xb1, 0x43, 0x0d, 0xbd, 0x3a, - 0xb8, 0x5c, 0xb9, 0xdb, 0x09, 0x55, 0xc7, 0x79, 0x08, 0x23, 0x9e, 0x9a, 0xa1, 0xcc, 0x40, 0x11, - 0x9f, 0xa3, 0xe8, 0x18, 0x53,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, 0xf7, 0x3a, 0xbf, 0xbf, - 0xb9, 0x96, 0xf7, 0xfa, 0xac, 0x70, 0xac, 0xf3, 0xc2, 0xb1, 0x7e, 0x15, 0x8e, 0xf5, 0x65, 0xed, - 0xb4, 0xce, 0xd7, 0x4e, 0xeb, 0xe7, 0xda, 0x69, 0x7d, 0xf8, 0x7f, 0x35, 0x96, 0xcd, 0x7f, 0x61, - 0xcc, 0xc3, 0xae, 0xa1, 0xec, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xda, 0x9f, 0x0d, 0x8b, 0xc4, + // 499 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x6e, 0xd3, 0x4e, + 0x14, 0xc5, 0xe3, 0x3a, 0xff, 0xfc, 0xd1, 0x50, 0xa0, 0x58, 0x41, 0x75, 0x2a, 0x64, 0x47, 0x59, + 0x65, 0xc3, 0x4c, 0x4b, 0x77, 0x15, 0x1b, 0x0c, 0x52, 0x25, 0x44, 0xa5, 0xc8, 0xb0, 0x02, 0x21, + 0x6b, 0xec, 0xdc, 0xba, 0x16, 0xf1, 0x8c, 0x35, 0x33, 0x0e, 0xe9, 0x5b, 0xb0, 0x64, 0xc9, 0x9a, + 0x67, 0xe0, 0x01, 0xba, 0xec, 0x0e, 0x56, 0x2d, 0x4a, 0x36, 0x3c, 0x06, 0x9a, 0xf1, 0x47, 0x2a, + 0x14, 0xa4, 0x6e, 0xfc, 0x31, 0xf7, 0x9c, 0xdf, 0x9c, 0xb9, 0x73, 0xd1, 0x28, 0xa6, 0x6c, 0x4a, + 0xf4, 0x43, 0x49, 0x49, 0xe6, 0x07, 0x31, 0x28, 0x7a, 0x40, 0x52, 0x60, 0x20, 0x33, 0x89, 0x0b, + 0xc1, 0x15, 0x77, 0xfa, 0xba, 0x8c, 0x6b, 0x0d, 0xae, 0x35, 0x7b, 0xfd, 0x94, 0xa7, 0xd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, 0xb4, 0x5a, 0x1f, 0xa1, 0x03, 0x00, 0x00, } @@ -285,11 +283,16 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.CurrentGroupID != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.CurrentGroupID)) - i-- - dAtA[i] = 0x18 + { + size, err := m.CurrentGroup.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Members) > 0 { for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { { @@ -351,33 +354,33 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxTransitionDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxTransitionDuration):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintGenesis(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x22 - n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.InactivePenaltyDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactivePenaltyDuration):]) + n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxTransitionDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxTransitionDuration):]) if err3 != nil { return 0, err3 } i -= n3 i = encodeVarintGenesis(dAtA, i, uint64(n3)) i-- + dAtA[i] = 0x22 + n4, err4 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.InactivePenaltyDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactivePenaltyDuration):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintGenesis(dAtA, i, uint64(n4)) + i-- dAtA[i] = 0x1a if m.RewardPercentage != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.RewardPercentage)) i-- dAtA[i] = 0x10 } - n4, err4 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.ActiveDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.ActiveDuration):]) - if err4 != nil { - return 0, err4 + n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.ActiveDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.ActiveDuration):]) + if err5 != nil { + return 0, err5 } - i -= n4 - i = encodeVarintGenesis(dAtA, i, uint64(n4)) + i -= n5 + i = encodeVarintGenesis(dAtA, i, uint64(n5)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -408,9 +411,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if m.CurrentGroupID != 0 { - n += 1 + sovGenesis(uint64(m.CurrentGroupID)) - } + l = m.CurrentGroup.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -541,10 +543,10 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentGroupID", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentGroup", wireType) } - m.CurrentGroupID = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -554,11 +556,25 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CurrentGroupID |= github_com_bandprotocol_chain_v3_pkg_tss.GroupID(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/bandtss/types/genesis_test.go b/x/bandtss/types/genesis_test.go index 78801b211..37465a335 100644 --- a/x/bandtss/types/genesis_test.go +++ b/x/bandtss/types/genesis_test.go @@ -2,6 +2,7 @@ package types_test import ( "testing" + "time" "github.com/stretchr/testify/require" @@ -32,18 +33,18 @@ func TestGenesisStateValidate(t *testing.T) { { "valid genesisState", types.GenesisState{ - Params: types.DefaultParams(), - Members: validMembers, - CurrentGroupID: 1, + Params: types.DefaultParams(), + Members: validMembers, + CurrentGroup: types.NewCurrentGroup(1, time.Now()), }, false, }, { "invalid genesisState - members not belongs to current group", types.GenesisState{ - Params: types.DefaultParams(), - Members: validMembers, - CurrentGroupID: 0, + Params: types.DefaultParams(), + Members: validMembers, + CurrentGroup: types.NewCurrentGroup(0, time.Now()), }, true, }, diff --git a/x/bandtss/types/keys.go b/x/bandtss/types/keys.go index 3012a2d82..014b73f81 100644 --- a/x/bandtss/types/keys.go +++ b/x/bandtss/types/keys.go @@ -26,7 +26,7 @@ const ( var ( // global store keys SigningCountStoreKey = []byte{0x00} - CurrentGroupIDStoreKey = []byte{0x01} + CurrentGroupStoreKey = []byte{0x01} GroupTransitionStoreKey = []byte{0x02} // store prefixes diff --git a/x/bandtss/types/query.pb.go b/x/bandtss/types/query.pb.go index 59065c438..6ffb2e2ec 100644 --- a/x/bandtss/types/query.pb.go +++ b/x/bandtss/types/query.pb.go @@ -14,19 +14,23 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -520,6 +524,8 @@ type QueryCurrentGroupResponse struct { PubKey github_com_bandprotocol_chain_v3_pkg_tss.Point `protobuf:"bytes,4,opt,name=pub_key,json=pubKey,proto3,casttype=github.com/bandprotocol/chain/v3/pkg/tss.Point" json:"pub_key,omitempty"` // status is the status of the current group. Status types.GroupStatus `protobuf:"varint,5,opt,name=status,proto3,enum=band.tss.v1beta1.GroupStatus" json:"status,omitempty"` + // active_time is the timestamp at which the group becomes the current group of the module. + ActiveTime time.Time `protobuf:"bytes,6,opt,name=active_time,json=activeTime,proto3,stdtime" json:"active_time"` } func (m *QueryCurrentGroupResponse) Reset() { *m = QueryCurrentGroupResponse{} } @@ -590,6 +596,13 @@ func (m *QueryCurrentGroupResponse) GetStatus() types.GroupStatus { return types.GROUP_STATUS_UNSPECIFIED } +func (m *QueryCurrentGroupResponse) GetActiveTime() time.Time { + if m != nil { + return m.ActiveTime + } + return time.Time{} +} + // QueryIncomingGroupRequest is the request type for the Query/IncomingGroup RPC method. type QueryIncomingGroupRequest struct { } @@ -1019,89 +1032,92 @@ func init() { func init() { proto.RegisterFile("band/bandtss/v1beta1/query.proto", fileDescriptor_d619290a87c09054) } var fileDescriptor_d619290a87c09054 = []byte{ - // 1302 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x3d, 0x73, 0x1b, 0x55, - 0x17, 0xd6, 0x2a, 0x8a, 0x14, 0x9d, 0x38, 0x1f, 0xef, 0x8d, 0xf3, 0x22, 0x6f, 0xac, 0x8f, 0x6c, - 0x42, 0xa2, 0x18, 0xd8, 0x8d, 0x15, 0x20, 0x33, 0x69, 0x20, 0x72, 0x64, 0x8f, 0x30, 0xce, 0x28, - 0x2b, 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 0xa0, 0x51, 0x47, 0x4d, 0x7b, 0x71, 0xe5, 0x9b, - 0xb3, 0x3b, 0x70, 0x72, 0xd7, 0x29, 0xb9, 0xcb, 0x28, 0x3f, 0x59, 0x58, 0x21, 0x1d, 0x45, 0xcf, - 0x25, 0x48, 0x71, 0x1d, 0x8c, 0x2c, 0xa4, 0xf0, 0xdb, 0x15, 0x59, 0x48, 0x63, 0xef, 0x95, 0xa2, - 0x52, 0x2e, 0x45, 0x74, 0x6d, 0x82, 0x0b, 0x17, 0x71, 0xa2, 0xed, 0x0e, 0x1f, 0xc2, 0x3d, 0xf4, - 0x52, 0x82, 0x73, 0x63, 0xe2, 0x88, 0x96, 0x23, 0xce, 0x9b, 0x2e, 0xd8, 0x72, 0xe9, 0xdf, 0xb8, - 0x70, 0xaa, 0x37, 0x28, 0xd5, 0x2b, 0xe8, 0xf2, 0xe4, 0x5f, 0x68, 0x63, 0xda, 0x1e, 0x68, 0x14, - 0x13, 0xd3, 0xc8, 0xda, 0x0f, 0x69, 0x77, 0x64, 0xed, 0x87, 0xf5, 0x3c, 0x42, 0xa3, 0x98, 0x68, - 0x97, 0x3f, 0x79, 0x75, 0x90, 0x93, 0x5e, 0x1f, 0xe4, 0xa4, 0x3f, 0x0f, 0x72, 0xd2, 0xf3, 0xc3, - 0x5c, 0xec, 0xf5, 0x61, 0x2e, 0xf6, 0xfb, 0x61, 0x2e, 0xf6, 0xf8, 0xf8, 0xf9, 0xea, 0xf3, 0xc1, - 0xa6, 0xf4, 0xc9, 0x6f, 0x25, 0x29, 0xe4, 0xd6, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x59, - 0xec, 0xcb, 0x95, 0x0f, 0x00, 0x00, + // 1353 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xbd, 0x93, 0xd3, 0x46, + 0x14, 0xb7, 0x8c, 0xb1, 0xcf, 0x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9f, 0xc7, + 0x70, 0x14, 0x23, 0xed, 0xea, 0x67, 0x2f, 0xf6, 0x0a, 0xd2, 0xcb, 0xbd, 0x82, 0xf4, 0xe7, 0x5e, + 0x41, 0xda, 0xd9, 0x2f, 0x24, 0x5e, 0xee, 0x17, 0x12, 0x7f, 0xec, 0x17, 0x12, 0xf7, 0x0f, 0xde, + 0xaf, 0xbe, 0x1c, 0x5e, 0x4a, 0x9f, 0xfc, 0x4e, 0x9a, 0xaa, 0x5c, 0xfe, 0x37, 0x00, 0x00, 0xff, + 0xff, 0x54, 0x43, 0x8a, 0x90, 0xfd, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1826,6 +1842,14 @@ func (m *QueryCurrentGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l + n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ActiveTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ActiveTime):]) + if err5 != nil { + return 0, err5 + } + i -= n5 + i = encodeVarintQuery(dAtA, i, uint64(n5)) + i-- + dAtA[i] = 0x32 if m.Status != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.Status)) i-- @@ -2295,6 +2319,8 @@ func (m *QueryCurrentGroupResponse) Size() (n int) { if m.Status != 0 { n += 1 + sovQuery(uint64(m.Status)) } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ActiveTime) + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3354,6 +3380,39 @@ func (m *QueryCurrentGroupResponse) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ActiveTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index fb810c190..0530454de 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -176,7 +176,7 @@ func (fc FeeChecker) IsBypassMinFeeMsg(ctx sdk.Context, msg sdk.Msg) bool { return false } - currentGroupID := fc.BandtssKeeper.GetCurrentGroupID(ctx) + currentGroupID := fc.BandtssKeeper.GetCurrentGroup(ctx).GroupID incomingGroupID := fc.BandtssKeeper.GetIncomingGroupID(ctx) if !fc.BandtssKeeper.HasMember(ctx, acc, currentGroupID) && !fc.BandtssKeeper.HasMember(ctx, acc, incomingGroupID) { diff --git a/x/globalfee/feechecker/feechecker_test.go b/x/globalfee/feechecker/feechecker_test.go index 9479739dc..74d9deade 100644 --- a/x/globalfee/feechecker/feechecker_test.go +++ b/x/globalfee/feechecker/feechecker_test.go @@ -114,7 +114,7 @@ func (suite *FeeCheckerTestSuite) SetupTest() { } // mock setup bandtss module - app.BandtssKeeper.SetCurrentGroupID(ctx, 1) + app.BandtssKeeper.SetCurrentGroup(ctx, bandtsstypes.NewCurrentGroup(1, ctx.BlockTime())) app.BandtssKeeper.SetMember(ctx, bandtsstypes.Member{ Address: bandtesting.Validators[0].Address.String(), IsActive: true, @@ -203,7 +203,10 @@ func (suite *FeeCheckerTestSuite) TestNoAuthzReport() { oracletypes.NewMsgReportData(suite.requestID, []oracletypes.RawReport{}, bandtesting.Validators[0].ValAddress), } authzMsg := authz.NewMsgExec(bandtesting.Bob.Address, reportMsgs) - stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1)))} + stubTx := &StubTx{ + Msgs: []sdk.Msg{&authzMsg}, + GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1))), + } // test - check bypass min fee isBypassMinFeeMsg := suite.FeeChecker.IsBypassMinFeeMsg(suite.ctx, &authzMsg) @@ -291,7 +294,10 @@ func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameAuthzMsg ) msgs := []sdk.Msg{reportMsg, requestMsg} authzMsg := authz.NewMsgExec(bandtesting.Alice.Address, msgs) - stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1)))} + stubTx := &StubTx{ + Msgs: []sdk.Msg{&authzMsg}, + GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdkmath.NewInt(1))), + } // test - check bypass min fee isBypassMinFeeMsg := suite.FeeChecker.IsBypassMinFeeMsg(suite.ctx, &authzMsg) From cb6544bf18c14170603ad3f71cd60bd477717519 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 10:10:37 +0700 Subject: [PATCH 218/272] fix comments --- pkg/tickmath/tickmath.go | 12 ++++++++---- x/bandtss/types/params.go | 2 ++ x/bandtss/types/signature_order.go | 1 + x/feeds/tss_handler.go | 6 +++++- x/oracle/tss_handler.go | 10 ++++++++-- x/tss/tss_handler.go | 3 ++- x/tss/types/originator.go | 4 ++++ 7 files changed, 30 insertions(+), 8 deletions(-) diff --git a/pkg/tickmath/tickmath.go b/pkg/tickmath/tickmath.go index 96459494d..290df6872 100644 --- a/pkg/tickmath/tickmath.go +++ b/pkg/tickmath/tickmath.go @@ -13,15 +13,19 @@ const ( ) var ( + // priceX96AtBinaryTicks stores the price at each unit binary tick in x96 format. priceX96AtBinaryTicks = getPricesX96AtBinaryTicks() + // q96 is the fixed-point number with 96 bits of precision, 2^96. + q96, _ = new(big.Int).SetString("1000000000000000000000000", 16) + maxUint192, _ = new(big.Int).SetString("ffffffffffffffffffffffffffffffffffffffffffffffff", 16) maxUint96, _ = new(big.Int).SetString("ffffffffffffffffffffffff", 16) maxUint64, _ = new(big.Int).SetString("ffffffffffffffff", 16) - q96, _ = new(big.Int).SetString("1000000000000000000000000", 16) - zero = new(big.Int).SetUint64(0) - one = new(big.Int).SetUint64(1) - billion = new(big.Int).SetUint64(1000000000) + + zero = new(big.Int).SetUint64(0) + one = new(big.Int).SetUint64(1) + billion = new(big.Int).SetUint64(1000000000) ) // TickToPrice converts the tick to price with 10^9 precision. It will return an error diff --git a/x/bandtss/types/params.go b/x/bandtss/types/params.go index db425a3f5..73899de4b 100644 --- a/x/bandtss/types/params.go +++ b/x/bandtss/types/params.go @@ -17,6 +17,8 @@ const ( DefaultRewardPercentage = uint64(8) ) +// DefaultFee is the default value for the signing request fee +// The value is ["10uband"] var DefaultFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) // NewParams creates a new Params instance diff --git a/x/bandtss/types/signature_order.go b/x/bandtss/types/signature_order.go index 5b0a15c7a..aaa492b0e 100644 --- a/x/bandtss/types/signature_order.go +++ b/x/bandtss/types/signature_order.go @@ -15,6 +15,7 @@ import ( const GroupTransitionPath = "transition" // GroupTransitionMsgPrefix is the prefix for transition group msg. +// The value is tss.Hash([]byte("transition"))[:4] var GroupTransitionMsgPrefix = tss.Hash([]byte(GroupTransitionPath))[:4] // Implements SignatureRequest Interface diff --git a/x/feeds/tss_handler.go b/x/feeds/tss_handler.go index b2941b8bb..3829b22ca 100644 --- a/x/feeds/tss_handler.go +++ b/x/feeds/tss_handler.go @@ -11,8 +11,12 @@ import ( ) var ( + // EncoderFixedPointABIPrefix is the constant prefix for feeds signature order on fixed point + // ABI encoder message. The value is tss.Hash([]byte("fixedPointABI"))[:4] EncoderFixedPointABIPrefix = tss.Hash([]byte("fixedPointABI"))[:4] - EncoderTickABIPrefix = tss.Hash([]byte("tickABI"))[:4] + // EncoderTickABIPrefix is the constant prefix for feeds signature order on tick + // ABI encoder message. The value is tss.Hash([]byte("tickABI"))[:4] + EncoderTickABIPrefix = tss.Hash([]byte("tickABI"))[:4] ) // NewSignatureOrderHandler creates a tss handler to handle feeds signature order diff --git a/x/oracle/tss_handler.go b/x/oracle/tss_handler.go index 3af5b55b1..1580a0851 100644 --- a/x/oracle/tss_handler.go +++ b/x/oracle/tss_handler.go @@ -11,8 +11,14 @@ import ( ) var ( - EncodeTypeProtoPrefix = tsslib.Hash([]byte("proto"))[:4] - EncodeTypeFullABIPrefix = tsslib.Hash([]byte("fullABI"))[:4] + // EncodeTypeProtoPrefix is the prefix for proto encoding type + // The value is tss.Hash([]byte("proto"))[:4] + EncodeTypeProtoPrefix = tsslib.Hash([]byte("proto"))[:4] + // EncodeTypeFullABIPrefix is the prefix for full ABI encoding type + // The value is tss.Hash([]byte("fullABI"))[:4] + EncodeTypeFullABIPrefix = tsslib.Hash([]byte("fullABI"))[:4] + // EncodeTypePartialABIPrefix is the prefix for partial ABI encoding type + // The value is tss.Hash([]byte("partialABI"))[:4] EncodeTypePartialABIPrefix = tsslib.Hash([]byte("partialABI"))[:4] ) diff --git a/x/tss/tss_handler.go b/x/tss/tss_handler.go index 9ac6e595b..7c9b93692 100644 --- a/x/tss/tss_handler.go +++ b/x/tss/tss_handler.go @@ -9,7 +9,8 @@ import ( "github.com/bandprotocol/chain/v3/x/tss/types" ) -// TextMsgPrefix is the prefix for signing request on text msg. +// TextMsgPrefix is the constant prefix for signing request on text msg. +// The value is tss.Hash([]byte("Text"))[:4] var TextMsgPrefix = tss.Hash([]byte("Text"))[:4] // NewSignatureOrderHandler implements the Handler interface for tss module-based diff --git a/x/tss/types/originator.go b/x/tss/types/originator.go index c84d7fe5d..b47421538 100644 --- a/x/tss/types/originator.go +++ b/x/tss/types/originator.go @@ -12,7 +12,11 @@ var ( _ Originator = &DirectOriginator{} _ Originator = &TunnelOriginator{} + // DirectOriginatorPrefix is the prefix for the originator from direct signing request. + // The value is tss.Hash([]byte("directOriginatorPrefix"))[:4] DirectOriginatorPrefix = tss.Hash([]byte("directOriginatorPrefix"))[:4] + // TunnelOriginatorPrefix is the prefix for the originator from tunnel module. + // The value is tss.Hash([]byte("tunnelOriginatorPrefix"))[:4] TunnelOriginatorPrefix = tss.Hash([]byte("tunnelOriginatorPrefix"))[:4] ) From ba58258758cfcd9987b4a6e1748a123465faefc7 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 10:11:17 +0700 Subject: [PATCH 219/272] fix msg url in script files --- scripts/bandtss/proposal_force_transition_group.json | 2 +- scripts/bandtss/proposal_transition_group.json | 2 +- scripts/bandtss/proposal_update_params.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/bandtss/proposal_force_transition_group.json b/scripts/bandtss/proposal_force_transition_group.json index 1df4e73be..eeaececf4 100644 --- a/scripts/bandtss/proposal_force_transition_group.json +++ b/scripts/bandtss/proposal_force_transition_group.json @@ -1,7 +1,7 @@ { "messages": [ { - "@type": "/bandtss.v1beta1.MsgForceTransitionGroup", + "@type": "/band.bandtss.v1beta1.MsgForceTransitionGroup", "incoming_group_id": "1", "exec_time": "2024-09-02T07:40:00+00:00", "authority": "band10d07y265gmmuvt4z0w9aw880jnsr700jrdn8wm" diff --git a/scripts/bandtss/proposal_transition_group.json b/scripts/bandtss/proposal_transition_group.json index 40cb6bbb3..eb668cd86 100755 --- a/scripts/bandtss/proposal_transition_group.json +++ b/scripts/bandtss/proposal_transition_group.json @@ -1,7 +1,7 @@ { "messages": [ { - "@type": "/bandtss.v1beta1.MsgTransitionGroup", + "@type": "/band.bandtss.v1beta1.MsgTransitionGroup", "members": [ "band1w8yurh6naeqg4mjx4zcs7hsu3fppwu0f4q4l7f", "band1ph8tcg7ncxxx5vndfc9h6ffsn4st4whq3rn260", diff --git a/scripts/bandtss/proposal_update_params.json b/scripts/bandtss/proposal_update_params.json index bb8c9ad39..192215c99 100644 --- a/scripts/bandtss/proposal_update_params.json +++ b/scripts/bandtss/proposal_update_params.json @@ -1,7 +1,7 @@ { "messages": [ { - "@type": "/bandtss.v1beta1.MsgUpdateParams", + "@type": "/band.bandtss.v1beta1.MsgUpdateParams", "params": { "active_duration": "86400s", "reward_percentage": "50", From 9e673ab0bbc8635745240b955ef2b7aeb6c5badf Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 10:11:54 +0700 Subject: [PATCH 220/272] fix from comments --- scripts/bandtss/request_signature_feeds.sh | 2 +- x/bandtss/keeper/tss_callback.go | 2 +- x/bandtss/types/events.go | 2 +- x/feeds/keeper/keeper_feeds_price_data.go | 3 +- .../keeper/keeper_feeds_price_data_test.go | 52 +++++++++---------- x/tss/testutil/util.go | 2 +- 6 files changed, 31 insertions(+), 32 deletions(-) diff --git a/scripts/bandtss/request_signature_feeds.sh b/scripts/bandtss/request_signature_feeds.sh index 4f63190ac..6636715d5 100644 --- a/scripts/bandtss/request_signature_feeds.sh +++ b/scripts/bandtss/request_signature_feeds.sh @@ -1,7 +1,7 @@ #!/bin/bash export WALLET_NAME=requester -export SIGNAL_IDs=crypto_price.ethusd,crypto_price.usdtusd +export SIGNAL_IDs=CS:ETH-USD,CS:USDT-USD # 0: Unspecified, 1: Default, 2: Tick export FEEDS_TYPE=1 diff --git a/x/bandtss/keeper/tss_callback.go b/x/bandtss/keeper/tss_callback.go index 4fec9f65d..10de39217 100644 --- a/x/bandtss/keeper/tss_callback.go +++ b/x/bandtss/keeper/tss_callback.go @@ -171,7 +171,7 @@ func (cb TSSCallback) OnSigningCompleted( // emit an event for the group transition. attrs := cb.k.ExtractEventAttributesFromTransition(transition) attrs = append(attrs, - sdk.NewAttribute(types.AttributeKeyRAddress, signingResult.EVMSignature.RAddress.String()), + sdk.NewAttribute(types.AttributeKeyRandomAddress, signingResult.EVMSignature.RAddress.String()), sdk.NewAttribute(types.AttributeKeySignature, signingResult.EVMSignature.Signature.String()), ) diff --git a/x/bandtss/types/events.go b/x/bandtss/types/events.go index ce615ec2a..a4ffa1375 100644 --- a/x/bandtss/types/events.go +++ b/x/bandtss/types/events.go @@ -20,6 +20,6 @@ const ( AttributeKeyGroupID = "group_id" AttributeKeyIncomingGroupPubKey = "incoming_group_pub_key" AttributeKeyCurrentGroupPubKey = "current_group_pub_key" - AttributeKeyRAddress = "r_address" + AttributeKeyRandomAddress = "random_address" AttributeKeySignature = "signature" ) diff --git a/x/feeds/keeper/keeper_feeds_price_data.go b/x/feeds/keeper/keeper_feeds_price_data.go index fcc0088ba..9bbaae08c 100644 --- a/x/feeds/keeper/keeper_feeds_price_data.go +++ b/x/feeds/keeper/keeper_feeds_price_data.go @@ -30,8 +30,7 @@ func (k Keeper) GetFeedsPriceData( // Check if the encoder mode is tick if encoder == types.ENCODER_TICK_ABI { - err := p.ToTick() - if err != nil { + if err := p.ToTick(); err != nil { return nil, err } } diff --git a/x/feeds/keeper/keeper_feeds_price_data_test.go b/x/feeds/keeper/keeper_feeds_price_data_test.go index 3e73efca1..a031a168b 100644 --- a/x/feeds/keeper/keeper_feeds_price_data_test.go +++ b/x/feeds/keeper/keeper_feeds_price_data_test.go @@ -18,16 +18,16 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { }{ { name: "success case - fixed-point abi encoder", - signalIDs: []string{"CS:atom-usd", "CS:band-usd"}, + signalIDs: []string{"CS:ATOM-USD", "CS:BAND-USD"}, setPrices: []types.Price{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, }, { - SignalID: "CS:band-usd", + SignalID: "CS:BAND-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, @@ -37,11 +37,11 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { expectResult: types.FeedsPriceData{ SignalPrices: []types.SignalPrice{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 1e10, }, { - SignalID: "CS:band-usd", + SignalID: "CS:BAND-USD", Price: 1e10, }, }, @@ -51,16 +51,16 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { }, { name: "success case - tick abi encoder", - signalIDs: []string{"CS:atom-usd", "CS:band-usd"}, + signalIDs: []string{"CS:ATOM-USD", "CS:BAND-USD"}, setPrices: []types.Price{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, }, { - SignalID: "CS:band-usd", + SignalID: "CS:BAND-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, @@ -70,11 +70,11 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { expectResult: types.FeedsPriceData{ SignalPrices: []types.SignalPrice{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 285171, }, { - SignalID: "CS:band-usd", + SignalID: "CS:BAND-USD", Price: 285171, }, }, @@ -84,10 +84,10 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { }, { name: "fail case - price not available", - signalIDs: []string{"CS:atom-usd", "CS:band-usd"}, + signalIDs: []string{"CS:ATOM-USD", "CS:BAND-USD"}, setPrices: []types.Price{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusUnavailable, @@ -95,14 +95,14 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { }, encoder: types.ENCODER_FIXED_POINT_ABI, expectResult: types.FeedsPriceData{}, - expectError: fmt.Errorf("CS:atom-usd: price not available"), + expectError: fmt.Errorf("CS:ATOM-USD: price not available"), }, { name: "fail case - price too old", - signalIDs: []string{"CS:atom-usd"}, + signalIDs: []string{"CS:ATOM-USD"}, setPrices: []types.Price{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix() - 1000, PriceStatus: types.PriceStatusAvailable, @@ -110,15 +110,15 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData() { }, encoder: types.ENCODER_FIXED_POINT_ABI, expectResult: types.FeedsPriceData{}, - expectError: fmt.Errorf("CS:atom-usd: price too old"), + expectError: fmt.Errorf("CS:ATOM-USD: price too old"), }, { name: "fail case - price not found", - signalIDs: []string{"CS:atom-usdfake"}, + signalIDs: []string{"CS:ATOM-USDfake"}, setPrices: []types.Price{}, encoder: types.ENCODER_FIXED_POINT_ABI, expectResult: types.FeedsPriceData{}, - expectError: fmt.Errorf("failed to get price for signal id: CS:atom-usdfake: price not found"), + expectError: fmt.Errorf("failed to get price for signal id: CS:ATOM-USDfake: price not found"), }, } @@ -164,18 +164,18 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData2() { { name: "valid prices", signalIDs: []string{ - "CS:atom-usd", - "CS:band-usd", + "CS:ATOM-USD", + "CS:BAND-USD", }, setPrices: []types.Price{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, }, { - SignalID: "CS:band-usd", + SignalID: "CS:BAND-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusAvailable, @@ -186,11 +186,11 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData2() { { name: "price not available", signalIDs: []string{ - "CS:atom-usd", + "CS:ATOM-USD", }, setPrices: []types.Price{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix(), PriceStatus: types.PriceStatusUnavailable, @@ -201,11 +201,11 @@ func (suite *KeeperTestSuite) TestGetFeedsPriceData2() { { name: "price too old", signalIDs: []string{ - "CS:atom-usd", + "CS:ATOM-USD", }, setPrices: []types.Price{ { - SignalID: "CS:atom-usd", + SignalID: "CS:ATOM-USD", Price: 1e10, Timestamp: suite.ctx.BlockTime().Unix() - 1000, PriceStatus: types.PriceStatusAvailable, diff --git a/x/tss/testutil/util.go b/x/tss/testutil/util.go index dfee93d4b..989e08d5f 100644 --- a/x/tss/testutil/util.go +++ b/x/tss/testutil/util.go @@ -3,7 +3,7 @@ package testutil import ( "fmt" "math/rand" - time "time" + "time" "github.com/bandprotocol/chain/v3/pkg/tss" bandtesting "github.com/bandprotocol/chain/v3/testing" From a7f2bdf9982e122e13054b3afcc901a6befcf594 Mon Sep 17 00:00:00 2001 From: colmazia Date: Mon, 4 Nov 2024 17:23:25 +0700 Subject: [PATCH 221/272] fix autocli --- x/feeds/autocli.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/feeds/autocli.go b/x/feeds/autocli.go index 19d91ea55..eb8f5527c 100644 --- a/x/feeds/autocli.go +++ b/x/feeds/autocli.go @@ -33,8 +33,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Use: "is-feeder [validator-address] [feeder-address]", Short: "Check if the given account is a feeder for the validator", PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - {ProtoField: "validator_address"}, - {ProtoField: "feeder_address"}, + {ProtoField: "validator"}, + {ProtoField: "feeder"}, }, }, { @@ -67,13 +67,13 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { RpcMethod: "ValidValidator", Use: "valid-validator [validator-address]", Short: "Check if the validator is valid to send prices", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}}, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator"}}, }, { RpcMethod: "ValidatorPrices", Use: "validator-prices [validator-address]", Short: "Get prices submitted by a validator", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator_address"}}, + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "validator"}}, }, { RpcMethod: "Vote", From 38e293e2af6d67c5394e3a69b8f93ba7574537d8 Mon Sep 17 00:00:00 2001 From: colmazia Date: Mon, 4 Nov 2024 17:36:16 +0700 Subject: [PATCH 222/272] update scripts --- scripts/feeds/{submit_signals.sh => vote_signals.sh} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename scripts/feeds/{submit_signals.sh => vote_signals.sh} (54%) diff --git a/scripts/feeds/submit_signals.sh b/scripts/feeds/vote_signals.sh similarity index 54% rename from scripts/feeds/submit_signals.sh rename to scripts/feeds/vote_signals.sh index 818595fef..aef0d2331 100755 --- a/scripts/feeds/submit_signals.sh +++ b/scripts/feeds/vote_signals.sh @@ -3,6 +3,6 @@ bandd tx staking delegate bandvaloper1p40yh3zkmhcv0ecqp3mcazy83sa57rgjde6wec 100 bandd tx staking delegate bandvaloper1p40yh3zkmhcv0ecqp3mcazy83sa57rgjde6wec 1000000000000uband --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain sleep 3 -# signal -bandd tx feeds signal CS:BTC-USD,30000000000 CS:USDT-USD,30000000000 --from validator --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain -bandd tx feeds signal CS:BTC-USD,30000000000 CS:USDT-USD,29000000000 --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain +# vote +bandd tx feeds vote CS:BTC-USD,30000000000 CS:USDT-USD,30000000000 --from validator --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain +bandd tx feeds vote CS:BTC-USD,30000000000 CS:USDT-USD,29000000000 --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain From d7d591ceecf73ee4e176a30229e732b1a72c8087 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 14:08:37 +0700 Subject: [PATCH 223/272] add signature tx --- app/modules.go | 9 ++++++++- x/bandtss/module.go | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/modules.go b/app/modules.go index f2766ceb0..d1208fdb5 100644 --- a/app/modules.go +++ b/app/modules.go @@ -56,10 +56,12 @@ import ( "github.com/bandprotocol/chain/v3/x/bandtss" bandtsstypes "github.com/bandprotocol/chain/v3/x/bandtss/types" "github.com/bandprotocol/chain/v3/x/feeds" + feedsclient "github.com/bandprotocol/chain/v3/x/feeds/client" feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/globalfee" globalfeetypes "github.com/bandprotocol/chain/v3/x/globalfee/types" "github.com/bandprotocol/chain/v3/x/oracle" + oracleclient "github.com/bandprotocol/chain/v3/x/oracle/client" oracletypes "github.com/bandprotocol/chain/v3/x/oracle/types" "github.com/bandprotocol/chain/v3/x/restake" restaketypes "github.com/bandprotocol/chain/v3/x/restake/types" @@ -167,7 +169,12 @@ func appModules( feeds.NewAppModule(appCodec, app.FeedsKeeper), rollingseed.NewAppModule(appCodec, app.RollingseedKeeper), tss.NewAppModule(appCodec, app.TSSKeeper), - bandtss.NewAppModule(appCodec, app.BandtssKeeper), + bandtss.NewAppModule( + appCodec, + app.BandtssKeeper, + oracleclient.OracleRequestSignatureHandler, + feedsclient.FeedsRequestSignatureHandler, + ), tunnel.NewAppModule(appCodec, app.TunnelKeeper), } } diff --git a/x/bandtss/module.go b/x/bandtss/module.go index c01876ffa..ba0f77192 100644 --- a/x/bandtss/module.go +++ b/x/bandtss/module.go @@ -120,9 +120,13 @@ type AppModule struct { } // NewAppModule creates a new AppModule object. -func NewAppModule(cdc codec.Codec, k *keeper.Keeper) AppModule { +func NewAppModule( + cdc codec.Codec, + k *keeper.Keeper, + signatureOrderHandlers ...bandtssclient.RequestSignatureHandler, +) AppModule { return AppModule{ - AppModuleBasic: NewAppModuleBasic(cdc), + AppModuleBasic: NewAppModuleBasic(cdc, signatureOrderHandlers...), keeper: k, } } From c72ea2cf31f34bf223e8536bc8427ad3b1c56b78 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 14:21:08 +0700 Subject: [PATCH 224/272] Fix readme key store --- x/tss/README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/x/tss/README.md b/x/tss/README.md index bb2cce70d..04604a9d4 100644 --- a/x/tss/README.md +++ b/x/tss/README.md @@ -142,54 +142,54 @@ type DE struct { The `x/tss` module stores group information and the number of group existing on chain. -- GroupCount: `0x00 | "GroupCount" -> BigEndian(#group)`. Store the number of group existing on chain. -- Group: `0x01 | GroupID -> Group`. Store the information of the group. +- GroupCount: `0x00 -> BigEndian(#group)`. Store the number of group existing on chain. +- Group: `0x10 | GroupID -> Group`. Store the information of the group. ### Member The `x/tss` module stores member information for checking their status during the group and signing request creation process; users can be in multiple groups. -- Member: `0x03 | GroupID | MemberID -> Member`. Store a member information of the specific group. +- Member: `0x11 | GroupID | MemberID -> Member`. Store a member information of the specific group. ### Group Creation During the group creation process, the `x/tss` module stores information for generating group public key and they will be removed after the group creation process is expired. -- PendingProcessGroups: `0x00 | "PendingProcessGroups" -> []GroupID`. Store the list of groupID whose status and information should be updated at the EndBlock. -- DKGContext: `0x02 | GroupID -> []byte`. Store a nonce that being used in a group creation process. -- Round1Info: `0x04 | GroupID | MemberID -> Round1Info`. Store an information that member submits during the 1st round group creation message. -- Round1InfoCount: `0x05 | GroupID -> BigEndian(#Round1Info)`. Store the number of round1 information message. -- AccumulatedCommit: `0x06 | GroupID | index -> []byte`. Store accumulated commit point for generating a group public key -- Round2Info: `0x07 | GroupID | MemberID -> Round2Info`. Store an information that member submits during the 1st round group creation message. -- Round2InfoCount: `0x08 | GroupID -> BigEndian(#Round2Info)`. Store the number of round2 information message. -- ComplaintWithStatus: `0x09 | GroupID | MemberID -> ComplaintWithStatus`. Store a complaint information that member submits during the 3rd round group creation message with its status. -- ConfirmComplaintCount: `0x0a | GroupID -> BigEndian(#Confirm + #Complaint)`. Store the number of round3 information message. -- Confirm: `0x0b | GroupID | MemberID -> Confirm`. Store a confirm information that member submits during the 3rd round group creation message. +- PendingProcessGroups: `0x02 -> []GroupID`. Store the list of groupID whose status and information should be updated at the EndBlock. +- DKGContext: `0x12 | GroupID -> []byte`. Store a nonce that being used in a group creation process. +- Round1Info: `0x13 | GroupID | MemberID -> Round1Info`. Store an information that member submits during the 1st round group creation message. +- Round1InfoCount: `0x14 | GroupID -> BigEndian(#Round1Info)`. Store the number of round1 information message. +- AccumulatedCommit: `0x15 | GroupID | index -> []byte`. Store accumulated commit point for generating a group public key +- Round2Info: `0x16 | GroupID | MemberID -> Round2Info`. Store an information that member submits during the 1st round group creation message. +- Round2InfoCount: `0x17 | GroupID -> BigEndian(#Round2Info)`. Store the number of round2 information message. +- ComplaintWithStatus: `0x18 | GroupID | MemberID -> ComplaintWithStatus`. Store a complaint information that member submits during the 3rd round group creation message with its status. +- ConfirmComplaintCount: `0x19 | GroupID -> BigEndian(#Confirm + #Complaint)`. Store the number of round3 information message. +- Confirm: `0x1a | GroupID | MemberID -> Confirm`. Store a confirm information that member submits during the 3rd round group creation message. ### Signing In signing process, the `x/tss` module stores partial signature submitted from assigned members and aggregates them once every member submits it. The aggregated signature (group signature) will be stored in the signing object and those partial signatures will be removed. -- SigningCount: `0x00 | "SigningCount" -> BigEndian(#signing)`. Store the number of signings existing on chain. -- PendingProcessSignings: `0x00 | "PendingProcessSignings" -> []SigningID`. Store the list of signingID whose status and information should be updated at the EndBlock. -- SigningExpirations: `0x00 | "SigningExpirations" -> []SigningExpiration`. Store the list of signing expiration information. The order of expiration time should be increasing (from beginning of the list to the end). -- Signing `0x0E | SigningID -> Signing`. Store the information of the signing request. -- PartialSignatureCount: `0x0F | SigningID | Attempt -> BigEndian(#PartialSigning)`. Store the number of partial signature of the given signing ID. -- PartialSignature: `0x10 | SigningID | Attempt | MemberID -> PartialSignature`. Store the partial signature of the member of the given signing ID. -- SigningAttempt: `0x11 | SigningID | Attempt -> SigningAttempt`. Store the signing attempt object of the given signing ID and specific attempt. The SigningAttempt object store assigned members and expiration height of that attempt. +- SigningCount: `0x01 -> BigEndian(#signing)`. Store the number of signings existing on chain. +- PendingProcessSignings: `0x03 -> []SigningID`. Store the list of signingID whose status and information should be updated at the EndBlock. +- SigningExpirations: `0x05 -> []SigningExpiration`. Store the list of signing expiration information. The order of expiration time should be increasing (from beginning of the list to the end). +- Signing `0x1d | SigningID -> Signing`. Store the information of the signing request. +- PartialSignatureCount: `0x1e | SigningID | Attempt -> BigEndian(#PartialSigning)`. Store the number of partial signature of the given signing ID. +- PartialSignature: `0x1f | SigningID | Attempt | MemberID -> PartialSignature`. Store the partial signature of the member of the given signing ID. +- SigningAttempt: `0x20 | SigningID | Attempt -> SigningAttempt`. Store the signing attempt object of the given signing ID and specific attempt. The SigningAttempt object store assigned members and expiration height of that attempt. ### DE In generating partial signature, the `x/tss` module use DE submitted from members as a nonce for generating group public nonce for forming a group signature. Members must maintain their DEs for being selected as a signer in signing process. -- DE `0x0c | address | index -> DE`. Store the DE object -- DEQueue `0x0d | address -> DEQueue`. Store the DEQueue object to identify an index of valid DE. +- DE `0x1b | address | index -> DE`. Store the DE object +- DEQueue `0x1c | address -> DEQueue`. Store the DEQueue object to identify an index of valid DE. ### Params The `x/tss` module stores its params in state with the prefix of `0x20`, it can be updated with governance proposal or the address with authority. -- Params: `0x20 -> Params` +- Params: `0x90 -> Params` The `x/tss` module contains the following parameters From e7fbc9bb87d481d98a93a838c618e3c006f5149b Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 15:00:18 +0700 Subject: [PATCH 225/272] fix keeper refrerence --- app/app.go | 2 +- app/keepers/keepers.go | 2 +- x/bandtss/abci.go | 4 ++-- x/bandtss/keeper/grpc_query.go | 4 ++-- x/bandtss/keeper/keeper.go | 4 ++-- x/bandtss/keeper/keeper_reward_test.go | 4 ++-- x/bandtss/keeper/keeper_test.go | 2 +- x/bandtss/keeper/msg_server.go | 4 ++-- x/bandtss/keeper/tss_callback.go | 4 ++-- x/bandtss/module.go | 4 ++-- x/globalfee/feechecker/feechecker.go | 2 +- x/globalfee/feechecker/feechecker_test.go | 2 +- x/tss/keeper/genesis.go | 12 +++++++++++- 13 files changed, 30 insertions(+), 20 deletions(-) diff --git a/app/app.go b/app/app.go index 5c9592d23..242e6e40c 100644 --- a/app/app.go +++ b/app/app.go @@ -271,7 +271,7 @@ func NewBandApp( AuthzKeeper: &app.AuthzKeeper, OracleKeeper: &app.OracleKeeper, TSSKeeper: app.TSSKeeper, - BandtssKeeper: app.BandtssKeeper, + BandtssKeeper: &app.BandtssKeeper, FeedsKeeper: &app.FeedsKeeper, IBCKeeper: app.IBCKeeper, StakingKeeper: app.StakingKeeper, diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index c13411387..298ae1ebc 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -115,7 +115,7 @@ type AppKeepers struct { RollingseedKeeper rollingseedkeeper.Keeper OracleKeeper oraclekeeper.Keeper TSSKeeper *tsskeeper.Keeper - BandtssKeeper *bandtsskeeper.Keeper + BandtssKeeper bandtsskeeper.Keeper FeedsKeeper feedskeeper.Keeper TunnelKeeper tunnelkeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper diff --git a/x/bandtss/abci.go b/x/bandtss/abci.go index 2898d0c96..2d0f3aa2d 100644 --- a/x/bandtss/abci.go +++ b/x/bandtss/abci.go @@ -7,7 +7,7 @@ import ( ) // BeginBlocker handles the logic at the beginning of a block. -func BeginBlocker(ctx sdk.Context, k *keeper.Keeper) error { +func BeginBlocker(ctx sdk.Context, k keeper.Keeper) error { // Reward a portion of block rewards (inflation + tx fee) to active tss members. k.AllocateTokens(ctx) @@ -15,7 +15,7 @@ func BeginBlocker(ctx sdk.Context, k *keeper.Keeper) error { } // EndBlocker handles tasks at the end of a block. -func EndBlocker(ctx sdk.Context, k *keeper.Keeper) error { +func EndBlocker(ctx sdk.Context, k keeper.Keeper) error { // execute group transition if the transition execution time is reached. if transition, ok := k.ShouldExecuteGroupTransition(ctx); ok { k.ExecuteGroupTransition(ctx, transition) diff --git a/x/bandtss/keeper/grpc_query.go b/x/bandtss/keeper/grpc_query.go index 81a49a973..f5bd29d1a 100644 --- a/x/bandtss/keeper/grpc_query.go +++ b/x/bandtss/keeper/grpc_query.go @@ -19,9 +19,9 @@ import ( var _ types.QueryServer = queryServer{} -type queryServer struct{ k *Keeper } +type queryServer struct{ k Keeper } -func NewQueryServer(k *Keeper) types.QueryServer { +func NewQueryServer(k Keeper) types.QueryServer { return queryServer{k: k} } diff --git a/x/bandtss/keeper/keeper.go b/x/bandtss/keeper/keeper.go index 983411a26..07f8e22eb 100644 --- a/x/bandtss/keeper/keeper.go +++ b/x/bandtss/keeper/keeper.go @@ -38,7 +38,7 @@ func NewKeeper( tssKeeper types.TSSKeeper, authority string, feeCollectorName string, -) *Keeper { +) Keeper { // ensure bandtss module account is set if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) @@ -48,7 +48,7 @@ func NewKeeper( panic(fmt.Errorf("invalid bandtss authority address: %w", err)) } - return &Keeper{ + return Keeper{ cdc: cdc, storeKey: storeKey, authzKeeper: authzKeeper, diff --git a/x/bandtss/keeper/keeper_reward_test.go b/x/bandtss/keeper/keeper_reward_test.go index 9d8321bed..497e749b8 100644 --- a/x/bandtss/keeper/keeper_reward_test.go +++ b/x/bandtss/keeper/keeper_reward_test.go @@ -91,7 +91,7 @@ func (s *AppTestSuite) TestAllocateTokensOneActive() { tssKeeper, k := app.TSSKeeper, app.BandtssKeeper // setup fee collector - feeCollector, err := SetupFeeCollector(app, ctx, *k) + feeCollector, err := SetupFeeCollector(app, ctx, k) s.Require().NoError(err) s.Require().Equal(Coins1000000uband, app.BankKeeper.GetAllBalances(ctx, feeCollector.GetAddress())) @@ -159,7 +159,7 @@ func (s *AppTestSuite) TestAllocateTokensOneActive() { func (s *AppTestSuite) TestAllocateTokensAllActive() { ctx, app, k := s.ctx, s.app, s.app.BandtssKeeper - feeCollector, err := SetupFeeCollector(app, ctx, *k) + feeCollector, err := SetupFeeCollector(app, ctx, k) s.Require().NoError(err) s.Require().Equal(Coins1000000uband, app.BankKeeper.GetAllBalances(ctx, feeCollector.GetAddress())) diff --git a/x/bandtss/keeper/keeper_test.go b/x/bandtss/keeper/keeper_test.go index 30d0137d2..17b057342 100644 --- a/x/bandtss/keeper/keeper_test.go +++ b/x/bandtss/keeper/keeper_test.go @@ -281,7 +281,7 @@ type KeeperTestSuite struct { key *storetypes.KVStoreKey tkey *storetypes.TransientStoreKey - keeper *keeper.Keeper + keeper keeper.Keeper queryServer types.QueryServer tssCallback *keeper.TSSCallback diff --git a/x/bandtss/keeper/msg_server.go b/x/bandtss/keeper/msg_server.go index 07d31f461..7d069bc1f 100644 --- a/x/bandtss/keeper/msg_server.go +++ b/x/bandtss/keeper/msg_server.go @@ -13,13 +13,13 @@ import ( ) type msgServer struct { - *Keeper + Keeper } var _ types.MsgServer = msgServer{} // NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper. -func NewMsgServerImpl(keeper *Keeper) types.MsgServer { +func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{Keeper: keeper} } diff --git a/x/bandtss/keeper/tss_callback.go b/x/bandtss/keeper/tss_callback.go index 10de39217..18cb71abe 100644 --- a/x/bandtss/keeper/tss_callback.go +++ b/x/bandtss/keeper/tss_callback.go @@ -12,10 +12,10 @@ var _ tsstypes.TSSCallback = &TSSCallback{} // Wrapper struct type TSSCallback struct { - k *Keeper + k Keeper } -func NewTSSCallback(k *Keeper) TSSCallback { +func NewTSSCallback(k Keeper) TSSCallback { return TSSCallback{k} } diff --git a/x/bandtss/module.go b/x/bandtss/module.go index ba0f77192..af3b387c5 100644 --- a/x/bandtss/module.go +++ b/x/bandtss/module.go @@ -116,13 +116,13 @@ func getSignatureOrderCLIHandlers(handlers []bandtssclient.RequestSignatureHandl type AppModule struct { AppModuleBasic - keeper *keeper.Keeper + keeper keeper.Keeper } // NewAppModule creates a new AppModule object. func NewAppModule( cdc codec.Codec, - k *keeper.Keeper, + k keeper.Keeper, signatureOrderHandlers ...bandtssclient.RequestSignatureHandler, ) AppModule { return AppModule{ diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index 0530454de..e4ef60483 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -50,7 +50,7 @@ func NewFeeChecker( feedsKeeper *feedskeeper.Keeper, ) FeeChecker { tssMsgServer := tsskeeper.NewMsgServerImpl(tssKeeper) - bandtssMsgServer := bandtsskeeper.NewMsgServerImpl(bandtssKeeper) + bandtssMsgServer := bandtsskeeper.NewMsgServerImpl(*bandtssKeeper) feedsMsgServer := feedskeeper.NewMsgServerImpl(*feedsKeeper) return FeeChecker{ diff --git a/x/globalfee/feechecker/feechecker_test.go b/x/globalfee/feechecker/feechecker_test.go index 74d9deade..455c7be2c 100644 --- a/x/globalfee/feechecker/feechecker_test.go +++ b/x/globalfee/feechecker/feechecker_test.go @@ -145,7 +145,7 @@ func (suite *FeeCheckerTestSuite) SetupTest() { &app.GlobalFeeKeeper, app.StakingKeeper, app.TSSKeeper, - app.BandtssKeeper, + &app.BandtssKeeper, &app.FeedsKeeper, ) } diff --git a/x/tss/keeper/genesis.go b/x/tss/keeper/genesis.go index 9f3271a60..2c6f32d01 100644 --- a/x/tss/keeper/genesis.go +++ b/x/tss/keeper/genesis.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "sort" sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,7 +25,16 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data types.GenesisState) { desMapping[deq.Address] = append(desMapping[deq.Address], deq.DE) } - for addr, des := range desMapping { + // sort addresses to ensure consistent ordering + addresses := make([]string, 0, len(desMapping)) + for addr := range desMapping { + addresses = append(addresses, addr) + } + sort.Strings(addresses) + + for _, addr := range addresses { + des := desMapping[addr] + if uint64(len(des)) > data.Params.MaxDESize { panic(fmt.Sprintf("DEs of %s size exceeds MaxDESize", addr)) } From f09922e58b688807e76d03dd5dd1888c9b89e592 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 15:23:36 +0700 Subject: [PATCH 226/272] fix readme bandtss --- x/bandtss/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/x/bandtss/README.md b/x/bandtss/README.md index f68026425..dbf5a7ec1 100644 --- a/x/bandtss/README.md +++ b/x/bandtss/README.md @@ -131,26 +131,26 @@ type GroupTransition struct { The `x/bandtss` module stores group and member information including their active status on the module. -- CurrentGroupID : `0x00 | "CurrentGroupID" -> BigEndian(groupID)` -- Member: `0x02 | GroupID | MemberAddress -> Member` +- CurrentGroupID : `0x01 -> BigEndian(groupID)` +- Member: `0x10 | GroupID | MemberAddress -> Member` ### Group Transition -- GroupTransition : `0x00 | "GroupTransition" -> GroupTransition` +- GroupTransition : `0x02 -> GroupTransition` ### Signing The `x/bandtss` module stores signing information and mapping between tss SigningID to bandtss SigningID. -- SigningCount : `0x00 | "SigningCount" -> BidEndian(#signing)` -- Signing : `0x03 | BandtssSigningID -> Signing` -- SigningMappingID `0x04 | TssSigningID -> BidEndian(BandtssSigningID)` +- SigningCount : `0x00 -> BidEndian(#signing)` +- Signing : `0x11 | BandtssSigningID -> Signing` +- SigningMappingID `0x12 | TssSigningID -> BidEndian(BandtssSigningID)` ### Params The `x/bandtss` module stores its params in state with the prefix of `0x01`, it can be updated with governance proposal or the address with authority. -- Params: `0x01 -> Params` +- Params: `0x90 -> Params` ## Msg Service From 8b4c277ae8c9a9593f6e756eec5e3276a0f951b4 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 15:27:06 +0700 Subject: [PATCH 227/272] fix params --- x/bandtss/types/constructors.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/x/bandtss/types/constructors.go b/x/bandtss/types/constructors.go index ec0c77e9b..6a64ed32a 100644 --- a/x/bandtss/types/constructors.go +++ b/x/bandtss/types/constructors.go @@ -10,13 +10,10 @@ import ( ) // NewCurrentGroup creates a new current group object. -func NewCurrentGroup( - id tss.GroupID, - transitionSince time.Time, -) CurrentGroup { +func NewCurrentGroup(id tss.GroupID, activeTime time.Time) CurrentGroup { return CurrentGroup{ GroupID: id, - ActiveTime: transitionSince, + ActiveTime: activeTime, } } From 86a2df7e7de912b60c3203d8d803f3964b1539e0 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 5 Nov 2024 17:56:22 +0700 Subject: [PATCH 228/272] remove rename package --- x/bandtss/types/signature_order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/bandtss/types/signature_order.go b/x/bandtss/types/signature_order.go index aaa492b0e..c8cdfb172 100644 --- a/x/bandtss/types/signature_order.go +++ b/x/bandtss/types/signature_order.go @@ -2,7 +2,7 @@ package types import ( "bytes" - time "time" + "time" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" From f70fd875785c21e8c1033b5e8de2d4d7c7683b58 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 6 Nov 2024 14:05:43 +0700 Subject: [PATCH 229/272] remove query cli --- x/bandtss/client/cli/query.go | 323 ---------------------------------- 1 file changed, 323 deletions(-) delete mode 100644 x/bandtss/client/cli/query.go diff --git a/x/bandtss/client/cli/query.go b/x/bandtss/client/cli/query.go deleted file mode 100644 index ed0f8bcb3..000000000 --- a/x/bandtss/client/cli/query.go +++ /dev/null @@ -1,323 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - - "github.com/bandprotocol/chain/v3/x/bandtss/types" -) - -const ( - flagMemberStatusFilter = "status" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the bandtss module", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - GetQueryCmdCounts(), - GetQueryCmdMember(), - GetQueryCmdMembers(), - GetQueryCmdCurrentGroup(), - GetQueryCmdIncomingGroup(), - GetQueryCmdParams(), - GetQueryCmdSigning(), - GetQueryCmdGroupTransition(), - GetQueryCmdIsGrantee(), - ) - - return cmd -} - -// GetQueryCmdCounts implements the query counts command. -func GetQueryCmdCounts() *cobra.Command { - cmd := &cobra.Command{ - Use: "counts", - Short: "Get current number of signing requests to bandtss module on BandChain", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Counts(cmd.Context(), &types.QueryCountsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdMember creates a CLI command for querying member information. -func GetQueryCmdMember() *cobra.Command { - cmd := &cobra.Command{ - Use: "member [address]", - Short: "Query the member by address", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Member(cmd.Context(), &types.QueryMemberRequest{ - Address: args[0], - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdMembers creates a CLI command for querying members information. -func GetQueryCmdMembers() *cobra.Command { - cmd := &cobra.Command{ - Use: "members", - Short: "Query the members information", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - statusFilterFlag, err := cmd.Flags().GetBool(flagMemberStatusFilter) - if err != nil { - return err - } - - isIncomingGroup, err := cmd.Flags().GetBool(flagIncomingGroup) - if err != nil { - return err - } - - var statusFilter types.MemberStatusFilter - if !cmd.Flags().Changed(flagMemberStatusFilter) { - statusFilter = types.MEMBER_STATUS_FILTER_UNSPECIFIED - } else if statusFilterFlag { - statusFilter = types.MEMBER_STATUS_FILTER_ACTIVE - } else { - statusFilter = types.MEMBER_STATUS_FILTER_INACTIVE - } - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Members(cmd.Context(), &types.QueryMembersRequest{ - Status: statusFilter, - IsIncomingGroup: isIncomingGroup, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - cmd.Flags(). - Bool(flagIncomingGroup, false, "Whether the heartbeat is for the incoming group or current group.") - cmd.Flags().Bool(flagMemberStatusFilter, false, "Filter members by status") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdCurrentGroup creates a CLI command for querying current group. -func GetQueryCmdCurrentGroup() *cobra.Command { - cmd := &cobra.Command{ - Use: "current-group", - Short: "Query the current group information", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.CurrentGroup(cmd.Context(), &types.QueryCurrentGroupRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdIncomingGroup creates a CLI command for querying incoming group. -func GetQueryCmdIncomingGroup() *cobra.Command { - cmd := &cobra.Command{ - Use: "incoming-group", - Short: "Query the incoming group information", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.IncomingGroup(cmd.Context(), &types.QueryIncomingGroupRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdParams creates a CLI command for querying module's parameter. -func GetQueryCmdParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "Show params", - Long: "Show parameter of bandtss module", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - return clientCtx.PrintProto(res) - }, - } - flags.AddQueryFlagsToCmd(cmd) - return cmd -} - -// GetQueryCmdSigning creates a CLI command for querying signing information. -func GetQueryCmdSigning() *cobra.Command { - cmd := &cobra.Command{ - Use: "signing [id]", - Short: "Query a signing by signing ID", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - signingID, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Signing(cmd.Context(), &types.QuerySigningRequest{ - SigningId: signingID, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdGroupTransition creates a CLI command for querying group transition information. -func GetQueryCmdGroupTransition() *cobra.Command { - cmd := &cobra.Command{ - Use: "group-transition", - Short: "Query the group transition information", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.GroupTransition(cmd.Context(), &types.QueryGroupTransitionRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetQueryCmdIsGrantee creates a CLI command for querying whether a grantee is granted by a granter. -func GetQueryCmdIsGrantee() *cobra.Command { - cmd := &cobra.Command{ - Use: "is-grantee [granter_address] [grantee_address]", - Short: "Query grantee status", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.IsGrantee(cmd.Context(), &types.QueryIsGranteeRequest{ - Granter: args[0], - Grantee: args[1], - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} From 79e0f7840b8ac4c6b1ebf8ff2fde1749aeebd941 Mon Sep 17 00:00:00 2001 From: Natthakun Kitthaworn Date: Wed, 6 Nov 2024 20:14:53 +0700 Subject: [PATCH 230/272] Tss heartbeat and signing message (#249) * remove heartbeat * change variable names * remove params activeDuration * fix readme * fix signing format * rename file * change variable back to since * fix readme * fix originator --- api/band/bandtss/v1beta1/bandtss.pulsar.go | 373 ++-- api/band/bandtss/v1beta1/genesis.pulsar.go | 242 +-- api/band/bandtss/v1beta1/query.pulsar.go | 1672 ++++------------- api/band/bandtss/v1beta1/query_grpc.pb.go | 39 - api/band/bandtss/v1beta1/tx.pulsar.go | 1233 ++---------- api/band/bandtss/v1beta1/tx_grpc.pb.go | 39 - api/band/tss/v1beta1/originator.pulsar.go | 291 ++- app/keepers/keepers.go | 1 - cmd/cylinder/run.go | 8 +- cylinder/workers/heartbeat/heartbeat.go | 90 - cylinder/workers/sender/msg_detail.go | 3 - proto/band/bandtss/v1beta1/bandtss.proto | 4 +- proto/band/bandtss/v1beta1/genesis.proto | 10 +- proto/band/bandtss/v1beta1/query.proto | 19 - proto/band/bandtss/v1beta1/tx.proto | 18 - proto/band/tss/v1beta1/originator.proto | 17 +- .../bandtss/proposal_transition_group.json | 2 +- scripts/bandtss/proposal_update_params.json | 1 - scripts/bandtss/start_cylinder.sh | 5 - x/bandtss/README.md | 41 +- x/bandtss/abci.go | 3 - x/bandtss/autocli.go | 9 - x/bandtss/client/cli/tx.go | 92 - x/bandtss/keeper/genesis_test.go | 21 +- x/bandtss/keeper/grpc_query.go | 22 - x/bandtss/keeper/grpc_query_test.go | 30 +- x/bandtss/keeper/keeper.go | 15 - x/bandtss/keeper/keeper_member.go | 37 +- x/bandtss/keeper/keeper_member_test.go | 52 +- x/bandtss/keeper/keeper_signing.go | 16 +- x/bandtss/keeper/keeper_test.go | 25 - x/bandtss/keeper/msg_server.go | 26 - x/bandtss/keeper/msg_server_test.go | 48 +- x/bandtss/keeper/tss_callback_test.go | 81 +- x/bandtss/testutil/expected_keepers_mocks.go | 55 - x/bandtss/types/bandtss.pb.go | 212 +-- x/bandtss/types/codec.go | 2 - x/bandtss/types/constants.go | 14 - x/bandtss/types/constructors.go | 10 +- x/bandtss/types/events.go | 1 - x/bandtss/types/expected_keepers.go | 19 - x/bandtss/types/genesis.pb.go | 142 +- x/bandtss/types/msgs.go | 29 - x/bandtss/types/msgs_test.go | 22 - x/bandtss/types/params.go | 8 - x/bandtss/types/query.pb.go | 619 +----- x/bandtss/types/query.pb.gw.go | 123 -- x/bandtss/types/tx.pb.go | 495 +---- x/bandtss/types/types.go | 4 + x/globalfee/feechecker/feechecker.go | 32 +- x/tss/types/helpers.go | 1 - x/tss/types/helpers_test.go | 1 - x/tss/types/originator.go | 37 +- x/tss/types/originator.pb.go | 190 +- 54 files changed, 1475 insertions(+), 5126 deletions(-) delete mode 100644 cylinder/workers/heartbeat/heartbeat.go delete mode 100644 x/bandtss/types/constants.go create mode 100644 x/bandtss/types/types.go diff --git a/api/band/bandtss/v1beta1/bandtss.pulsar.go b/api/band/bandtss/v1beta1/bandtss.pulsar.go index a85b73d5b..61ec6e46d 100644 --- a/api/band/bandtss/v1beta1/bandtss.pulsar.go +++ b/api/band/bandtss/v1beta1/bandtss.pulsar.go @@ -17,12 +17,11 @@ import ( ) var ( - md_Member protoreflect.MessageDescriptor - fd_Member_address protoreflect.FieldDescriptor - fd_Member_group_id protoreflect.FieldDescriptor - fd_Member_is_active protoreflect.FieldDescriptor - fd_Member_since protoreflect.FieldDescriptor - fd_Member_last_active protoreflect.FieldDescriptor + md_Member protoreflect.MessageDescriptor + fd_Member_address protoreflect.FieldDescriptor + fd_Member_group_id protoreflect.FieldDescriptor + fd_Member_is_active protoreflect.FieldDescriptor + fd_Member_since protoreflect.FieldDescriptor ) func init() { @@ -32,7 +31,6 @@ func init() { fd_Member_group_id = md_Member.Fields().ByName("group_id") fd_Member_is_active = md_Member.Fields().ByName("is_active") fd_Member_since = md_Member.Fields().ByName("since") - fd_Member_last_active = md_Member.Fields().ByName("last_active") } var _ protoreflect.Message = (*fastReflection_Member)(nil) @@ -124,12 +122,6 @@ func (x *fastReflection_Member) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.LastActive != nil { - value := protoreflect.ValueOfMessage(x.LastActive.ProtoReflect()) - if !f(fd_Member_last_active, value) { - return - } - } } // Has reports whether a field is populated. @@ -153,8 +145,6 @@ func (x *fastReflection_Member) Has(fd protoreflect.FieldDescriptor) bool { return x.IsActive != false case "band.bandtss.v1beta1.Member.since": return x.Since != nil - case "band.bandtss.v1beta1.Member.last_active": - return x.LastActive != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.Member")) @@ -179,8 +169,6 @@ func (x *fastReflection_Member) Clear(fd protoreflect.FieldDescriptor) { x.IsActive = false case "band.bandtss.v1beta1.Member.since": x.Since = nil - case "band.bandtss.v1beta1.Member.last_active": - x.LastActive = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.Member")) @@ -209,9 +197,6 @@ func (x *fastReflection_Member) Get(descriptor protoreflect.FieldDescriptor) pro case "band.bandtss.v1beta1.Member.since": value := x.Since return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "band.bandtss.v1beta1.Member.last_active": - value := x.LastActive - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.Member")) @@ -240,8 +225,6 @@ func (x *fastReflection_Member) Set(fd protoreflect.FieldDescriptor, value proto x.IsActive = value.Bool() case "band.bandtss.v1beta1.Member.since": x.Since = value.Message().Interface().(*timestamppb.Timestamp) - case "band.bandtss.v1beta1.Member.last_active": - x.LastActive = value.Message().Interface().(*timestamppb.Timestamp) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.Member")) @@ -267,11 +250,6 @@ func (x *fastReflection_Member) Mutable(fd protoreflect.FieldDescriptor) protore x.Since = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.Since.ProtoReflect()) - case "band.bandtss.v1beta1.Member.last_active": - if x.LastActive == nil { - x.LastActive = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.LastActive.ProtoReflect()) case "band.bandtss.v1beta1.Member.address": panic(fmt.Errorf("field address of message band.bandtss.v1beta1.Member is not mutable")) case "band.bandtss.v1beta1.Member.group_id": @@ -300,9 +278,6 @@ func (x *fastReflection_Member) NewField(fd protoreflect.FieldDescriptor) protor case "band.bandtss.v1beta1.Member.since": m := new(timestamppb.Timestamp) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "band.bandtss.v1beta1.Member.last_active": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.Member")) @@ -386,10 +361,6 @@ func (x *fastReflection_Member) ProtoMethods() *protoiface.Methods { l = options.Size(x.Since) n += 1 + l + runtime.Sov(uint64(l)) } - if x.LastActive != nil { - l = options.Size(x.LastActive) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -419,20 +390,6 @@ func (x *fastReflection_Member) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.LastActive != nil { - encoded, err := options.Marshal(x.LastActive) - 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 x.Since != nil { encoded, err := options.Marshal(x.Since) if err != nil { @@ -625,42 +582,6 @@ func (x *fastReflection_Member) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastActive", 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.LastActive == nil { - x.LastActive = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastActive); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3281,10 +3202,8 @@ type Member struct { GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // is_active is a flag to indicate whether a member is active or not. IsActive bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - // since is a block timestamp when a member is deactivated + // since is a block timestamp when a member status is changed (from active to inactive or vice versa). Since *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=since,proto3" json:"since,omitempty"` - // last_active is a latest block timestamp when a member is active - LastActive *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_active,json=lastActive,proto3" json:"last_active,omitempty"` } func (x *Member) Reset() { @@ -3335,13 +3254,6 @@ func (x *Member) GetSince() *timestamppb.Timestamp { return nil } -func (x *Member) GetLastActive() *timestamppb.Timestamp { - if x != nil { - return x.LastActive - } - return nil -} - // CuurentGroup is a bandtss current group information. type CurrentGroup struct { state protoimpl.MessageState @@ -3621,7 +3533,7 @@ var file_band_bandtss_v1beta1_bandtss_proto_rawDesc = []byte{ 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, 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, 0x22, 0xa4, 0x02, 0x0a, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, @@ -3635,138 +3547,134 @@ var file_band_bandtss_v1beta1_bandtss_proto_rawDesc = []byte{ 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, - 0x05, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, - 0x01, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x3a, 0x04, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0xb1, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, - 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xde, 0x03, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x13, 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x66, 0x65, 0x65, 0x5f, - 0x70, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x66, - 0x65, 0x65, 0x50, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x18, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0xe2, 0xde, - 0x1f, 0x15, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x05, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xb1, 0x01, 0x0a, + 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5a, 0x0a, + 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, + 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0xde, 0x03, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x13, 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, + 0xfa, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x50, 0x65, 0x72, 0x53, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x18, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4f, 0xe2, 0xde, 0x1f, 0x15, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, + 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x8b, 0x01, + 0x0a, 0x19, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x50, 0xe2, 0xde, 0x1f, 0x16, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, + 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, + 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x44, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, + 0x01, 0x22, 0xdf, 0x05, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x43, 0xe2, 0xde, 0x1f, 0x09, 0x53, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x70, 0x0a, 0x10, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x46, 0xe2, 0xde, 0x1f, 0x0e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, - 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x15, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x64, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, - 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x50, 0xe2, 0xde, 0x1f, 0x16, 0x49, 0x6e, - 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6f, - 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x49, 0x64, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xdf, 0x05, 0x0a, 0x0f, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x0a, - 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x42, 0x43, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, - 0xde, 0x1f, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, - 0x12, 0x70, 0x0a, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x46, 0xe2, 0xde, 0x1f, 0x0e, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, - 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, - 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x12, 0x65, 0x0a, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x73, 0x0a, 0x11, 0x69, 0x6e, 0x63, - 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x47, 0xe2, 0xde, 0x1f, 0x0f, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, - 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, + 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x0e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x65, 0x0a, 0x15, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x75, 0x62, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x12, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x12, 0x73, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x47, 0xe2, + 0xde, 0x1f, 0x0f, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x67, 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, + 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x0f, 0x69, - 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x67, - 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, - 0xfa, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, - 0x6e, 0x74, 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, - 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x73, - 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x63, 0x65, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xca, 0x01, 0x0a, 0x1d, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x07, - 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0xfa, - 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, - 0x6c, 0x69, 0x62, 0x73, 0x2f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x78, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x0f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x0b, 0xca, 0xb4, 0x2d, 0x07, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2a, 0xae, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x1d, - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x52, - 0x4f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, - 0x4e, 0x47, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x02, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x52, 0x41, - 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, - 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, - 0x10, 0x03, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe8, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, + 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x13, 0x69, 0x6e, 0x63, + 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, + 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x41, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x69, 0x73, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xca, 0x01, 0x0a, 0x1d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x34, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, + 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x6c, 0x69, 0x62, 0x73, 0x2f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x2e, 0x48, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, + 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x3a, 0x0b, 0xca, 0xb4, 0x2d, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x2a, 0xae, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x1d, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x52, 0x41, 0x4e, + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x52, + 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x22, + 0x0a, 0x1e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x49, 0x47, 0x4e, + 0x10, 0x02, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, + 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x1a, 0x04, 0x88, 0xa3, 0x1e, + 0x00, 0x42, 0xe8, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, + 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, + 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, + 0x14, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, + 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, - 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3795,17 +3703,16 @@ var file_band_bandtss_v1beta1_bandtss_proto_goTypes = []interface{}{ } var file_band_bandtss_v1beta1_bandtss_proto_depIdxs = []int32{ 6, // 0: band.bandtss.v1beta1.Member.since:type_name -> google.protobuf.Timestamp - 6, // 1: band.bandtss.v1beta1.Member.last_active:type_name -> google.protobuf.Timestamp - 6, // 2: band.bandtss.v1beta1.CurrentGroup.active_time:type_name -> google.protobuf.Timestamp - 7, // 3: band.bandtss.v1beta1.Signing.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin - 0, // 4: band.bandtss.v1beta1.GroupTransition.status:type_name -> band.bandtss.v1beta1.TransitionStatus - 6, // 5: band.bandtss.v1beta1.GroupTransition.exec_time:type_name -> google.protobuf.Timestamp - 6, // 6: band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time:type_name -> google.protobuf.Timestamp - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 6, // 1: band.bandtss.v1beta1.CurrentGroup.active_time:type_name -> google.protobuf.Timestamp + 7, // 2: band.bandtss.v1beta1.Signing.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin + 0, // 3: band.bandtss.v1beta1.GroupTransition.status:type_name -> band.bandtss.v1beta1.TransitionStatus + 6, // 4: band.bandtss.v1beta1.GroupTransition.exec_time:type_name -> google.protobuf.Timestamp + 6, // 5: band.bandtss.v1beta1.GroupTransitionSignatureOrder.transition_time:type_name -> google.protobuf.Timestamp + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_band_bandtss_v1beta1_bandtss_proto_init() } diff --git a/api/band/bandtss/v1beta1/genesis.pulsar.go b/api/band/bandtss/v1beta1/genesis.pulsar.go index 4c18592e2..de6945837 100644 --- a/api/band/bandtss/v1beta1/genesis.pulsar.go +++ b/api/band/bandtss/v1beta1/genesis.pulsar.go @@ -667,60 +667,59 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_Params_5_list)(nil) +var _ protoreflect.List = (*_Params_4_list)(nil) -type _Params_5_list struct { +type _Params_4_list struct { list *[]*v1beta1.Coin } -func (x *_Params_5_list) Len() int { +func (x *_Params_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Params_5_list) Get(i int) protoreflect.Value { +func (x *_Params_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_Params_5_list) Set(i int, value protoreflect.Value) { +func (x *_Params_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_Params_5_list) Append(value protoreflect.Value) { +func (x *_Params_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_Params_5_list) AppendMutable() protoreflect.Value { +func (x *_Params_4_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_Params_5_list) Truncate(n int) { +func (x *_Params_4_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_Params_5_list) NewElement() protoreflect.Value { +func (x *_Params_4_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_Params_5_list) IsValid() bool { +func (x *_Params_4_list) IsValid() bool { return x.list != nil } var ( md_Params protoreflect.MessageDescriptor - fd_Params_active_duration protoreflect.FieldDescriptor fd_Params_reward_percentage protoreflect.FieldDescriptor fd_Params_inactive_penalty_duration protoreflect.FieldDescriptor fd_Params_max_transition_duration protoreflect.FieldDescriptor @@ -730,7 +729,6 @@ var ( func init() { file_band_bandtss_v1beta1_genesis_proto_init() md_Params = File_band_bandtss_v1beta1_genesis_proto.Messages().ByName("Params") - fd_Params_active_duration = md_Params.Fields().ByName("active_duration") fd_Params_reward_percentage = md_Params.Fields().ByName("reward_percentage") fd_Params_inactive_penalty_duration = md_Params.Fields().ByName("inactive_penalty_duration") fd_Params_max_transition_duration = md_Params.Fields().ByName("max_transition_duration") @@ -802,12 +800,6 @@ func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ActiveDuration != nil { - value := protoreflect.ValueOfMessage(x.ActiveDuration.ProtoReflect()) - if !f(fd_Params_active_duration, value) { - return - } - } if x.RewardPercentage != uint64(0) { value := protoreflect.ValueOfUint64(x.RewardPercentage) if !f(fd_Params_reward_percentage, value) { @@ -827,7 +819,7 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto } } if len(x.Fee) != 0 { - value := protoreflect.ValueOfList(&_Params_5_list{list: &x.Fee}) + value := protoreflect.ValueOfList(&_Params_4_list{list: &x.Fee}) if !f(fd_Params_fee, value) { return } @@ -847,8 +839,6 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.bandtss.v1beta1.Params.active_duration": - return x.ActiveDuration != nil case "band.bandtss.v1beta1.Params.reward_percentage": return x.RewardPercentage != uint64(0) case "band.bandtss.v1beta1.Params.inactive_penalty_duration": @@ -873,8 +863,6 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.bandtss.v1beta1.Params.active_duration": - x.ActiveDuration = nil case "band.bandtss.v1beta1.Params.reward_percentage": x.RewardPercentage = uint64(0) case "band.bandtss.v1beta1.Params.inactive_penalty_duration": @@ -899,9 +887,6 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.bandtss.v1beta1.Params.active_duration": - value := x.ActiveDuration - return protoreflect.ValueOfMessage(value.ProtoReflect()) case "band.bandtss.v1beta1.Params.reward_percentage": value := x.RewardPercentage return protoreflect.ValueOfUint64(value) @@ -913,9 +898,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro return protoreflect.ValueOfMessage(value.ProtoReflect()) case "band.bandtss.v1beta1.Params.fee": if len(x.Fee) == 0 { - return protoreflect.ValueOfList(&_Params_5_list{}) + return protoreflect.ValueOfList(&_Params_4_list{}) } - listValue := &_Params_5_list{list: &x.Fee} + listValue := &_Params_4_list{list: &x.Fee} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -937,8 +922,6 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.bandtss.v1beta1.Params.active_duration": - x.ActiveDuration = value.Message().Interface().(*durationpb.Duration) case "band.bandtss.v1beta1.Params.reward_percentage": x.RewardPercentage = value.Uint() case "band.bandtss.v1beta1.Params.inactive_penalty_duration": @@ -947,7 +930,7 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.MaxTransitionDuration = value.Message().Interface().(*durationpb.Duration) case "band.bandtss.v1beta1.Params.fee": lv := value.List() - clv := lv.(*_Params_5_list) + clv := lv.(*_Params_4_list) x.Fee = *clv.list default: if fd.IsExtension() { @@ -969,11 +952,6 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.bandtss.v1beta1.Params.active_duration": - if x.ActiveDuration == nil { - x.ActiveDuration = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.ActiveDuration.ProtoReflect()) case "band.bandtss.v1beta1.Params.inactive_penalty_duration": if x.InactivePenaltyDuration == nil { x.InactivePenaltyDuration = new(durationpb.Duration) @@ -988,7 +966,7 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore if x.Fee == nil { x.Fee = []*v1beta1.Coin{} } - value := &_Params_5_list{list: &x.Fee} + value := &_Params_4_list{list: &x.Fee} return protoreflect.ValueOfList(value) case "band.bandtss.v1beta1.Params.reward_percentage": panic(fmt.Errorf("field reward_percentage of message band.bandtss.v1beta1.Params is not mutable")) @@ -1005,9 +983,6 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.bandtss.v1beta1.Params.active_duration": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) case "band.bandtss.v1beta1.Params.reward_percentage": return protoreflect.ValueOfUint64(uint64(0)) case "band.bandtss.v1beta1.Params.inactive_penalty_duration": @@ -1018,7 +993,7 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfMessage(m.ProtoReflect()) case "band.bandtss.v1beta1.Params.fee": list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Params_5_list{list: &list}) + return protoreflect.ValueOfList(&_Params_4_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.Params")) @@ -1088,10 +1063,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.ActiveDuration != nil { - l = options.Size(x.ActiveDuration) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.RewardPercentage != 0 { n += 1 + runtime.Sov(uint64(x.RewardPercentage)) } @@ -1151,7 +1122,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } if x.MaxTransitionDuration != nil { @@ -1166,7 +1137,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if x.InactivePenaltyDuration != nil { encoded, err := options.Marshal(x.InactivePenaltyDuration) @@ -1180,26 +1151,12 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if x.RewardPercentage != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.RewardPercentage)) i-- - dAtA[i] = 0x10 - } - if x.ActiveDuration != nil { - encoded, err := options.Marshal(x.ActiveDuration) - 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 + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -1251,42 +1208,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ActiveDuration", 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.ActiveDuration == nil { - x.ActiveDuration = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ActiveDuration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardPercentage", wireType) } @@ -1305,7 +1226,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { break } } - case 3: + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InactivePenaltyDuration", wireType) } @@ -1341,7 +1262,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxTransitionDuration", wireType) } @@ -1377,7 +1298,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) } @@ -1520,18 +1441,16 @@ type Params struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // active_duration is the duration where a member is active without interaction. - ActiveDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=active_duration,json=activeDuration,proto3" json:"active_duration,omitempty"` // reward_percentage is the percentage of block rewards allocated to active TSS members. // The reward proportion is calculated after being allocated to oracle rewards. - RewardPercentage uint64 `protobuf:"varint,2,opt,name=reward_percentage,json=rewardPercentage,proto3" json:"reward_percentage,omitempty"` + RewardPercentage uint64 `protobuf:"varint,1,opt,name=reward_percentage,json=rewardPercentage,proto3" json:"reward_percentage,omitempty"` // inactive_penalty_duration is the duration where a member cannot activate back after being set to inactive. - InactivePenaltyDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=inactive_penalty_duration,json=inactivePenaltyDuration,proto3" json:"inactive_penalty_duration,omitempty"` + InactivePenaltyDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=inactive_penalty_duration,json=inactivePenaltyDuration,proto3" json:"inactive_penalty_duration,omitempty"` // max_transition_duration is the maximum duration where the transition process waits // since the start of the process until an incoming group replaces a current group. - MaxTransitionDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=max_transition_duration,json=maxTransitionDuration,proto3" json:"max_transition_duration,omitempty"` + MaxTransitionDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=max_transition_duration,json=maxTransitionDuration,proto3" json:"max_transition_duration,omitempty"` // fee is the tokens that will be paid per signer. - Fee []*v1beta1.Coin `protobuf:"bytes,5,rep,name=fee,proto3" json:"fee,omitempty"` + Fee []*v1beta1.Coin `protobuf:"bytes,4,rep,name=fee,proto3" json:"fee,omitempty"` } func (x *Params) Reset() { @@ -1554,13 +1473,6 @@ func (*Params) Descriptor() ([]byte, []int) { return file_band_bandtss_v1beta1_genesis_proto_rawDescGZIP(), []int{1} } -func (x *Params) GetActiveDuration() *durationpb.Duration { - if x != nil { - return x.ActiveDuration - } - return nil -} - func (x *Params) GetRewardPercentage() uint64 { if x != nil { return x.RewardPercentage @@ -1616,50 +1528,45 @@ var file_band_bandtss_v1beta1_genesis_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xbc, - 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0f, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, - 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x52, 0x10, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x19, 0x69, 0x6e, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x5f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, - 0x1f, 0x01, 0x52, 0x17, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x61, - 0x6c, 0x74, 0x79, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x17, 0x6d, - 0x61, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, - 0x01, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, - 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x03, 0x66, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xe4, 0x01, - 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, 0x61, 0x6e, - 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, - 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x42, 0x61, - 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xee, + 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x11, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x52, 0x10, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x19, + 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, + 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x17, 0x69, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x50, 0x65, + 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, + 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, + 0xdf, 0x1f, 0x01, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x03, 0x66, 0x65, + 0x65, 0x18, 0x04, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x03, 0x66, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, + 0xe4, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, + 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, + 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, + 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1687,15 +1594,14 @@ var file_band_bandtss_v1beta1_genesis_proto_depIdxs = []int32{ 1, // 0: band.bandtss.v1beta1.GenesisState.params:type_name -> band.bandtss.v1beta1.Params 2, // 1: band.bandtss.v1beta1.GenesisState.members:type_name -> band.bandtss.v1beta1.Member 3, // 2: band.bandtss.v1beta1.GenesisState.current_group:type_name -> band.bandtss.v1beta1.CurrentGroup - 4, // 3: band.bandtss.v1beta1.Params.active_duration:type_name -> google.protobuf.Duration - 4, // 4: band.bandtss.v1beta1.Params.inactive_penalty_duration:type_name -> google.protobuf.Duration - 4, // 5: band.bandtss.v1beta1.Params.max_transition_duration:type_name -> google.protobuf.Duration - 5, // 6: band.bandtss.v1beta1.Params.fee:type_name -> cosmos.base.v1beta1.Coin - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 4, // 3: band.bandtss.v1beta1.Params.inactive_penalty_duration:type_name -> google.protobuf.Duration + 4, // 4: band.bandtss.v1beta1.Params.max_transition_duration:type_name -> google.protobuf.Duration + 5, // 5: band.bandtss.v1beta1.Params.fee:type_name -> cosmos.base.v1beta1.Coin + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_band_bandtss_v1beta1_genesis_proto_init() } diff --git a/api/band/bandtss/v1beta1/query.pulsar.go b/api/band/bandtss/v1beta1/query.pulsar.go index d7fe232c1..0517d39c0 100644 --- a/api/band/bandtss/v1beta1/query.pulsar.go +++ b/api/band/bandtss/v1beta1/query.pulsar.go @@ -778,900 +778,6 @@ func (x *fastReflection_QueryCountsResponse) ProtoMethods() *protoiface.Methods } } -var ( - md_QueryIsGranteeRequest protoreflect.MessageDescriptor - fd_QueryIsGranteeRequest_granter protoreflect.FieldDescriptor - fd_QueryIsGranteeRequest_grantee protoreflect.FieldDescriptor -) - -func init() { - file_band_bandtss_v1beta1_query_proto_init() - md_QueryIsGranteeRequest = File_band_bandtss_v1beta1_query_proto.Messages().ByName("QueryIsGranteeRequest") - fd_QueryIsGranteeRequest_granter = md_QueryIsGranteeRequest.Fields().ByName("granter") - fd_QueryIsGranteeRequest_grantee = md_QueryIsGranteeRequest.Fields().ByName("grantee") -} - -var _ protoreflect.Message = (*fastReflection_QueryIsGranteeRequest)(nil) - -type fastReflection_QueryIsGranteeRequest QueryIsGranteeRequest - -func (x *QueryIsGranteeRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryIsGranteeRequest)(x) -} - -func (x *QueryIsGranteeRequest) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_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_QueryIsGranteeRequest_messageType fastReflection_QueryIsGranteeRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryIsGranteeRequest_messageType{} - -type fastReflection_QueryIsGranteeRequest_messageType struct{} - -func (x fastReflection_QueryIsGranteeRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryIsGranteeRequest)(nil) -} -func (x fastReflection_QueryIsGranteeRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryIsGranteeRequest) -} -func (x fastReflection_QueryIsGranteeRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIsGranteeRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryIsGranteeRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIsGranteeRequest -} - -// 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_QueryIsGranteeRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryIsGranteeRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryIsGranteeRequest) New() protoreflect.Message { - return new(fastReflection_QueryIsGranteeRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryIsGranteeRequest) Interface() protoreflect.ProtoMessage { - return (*QueryIsGranteeRequest)(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_QueryIsGranteeRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Granter != "" { - value := protoreflect.ValueOfString(x.Granter) - if !f(fd_QueryIsGranteeRequest_granter, value) { - return - } - } - if x.Grantee != "" { - value := protoreflect.ValueOfString(x.Grantee) - if !f(fd_QueryIsGranteeRequest_grantee, 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_QueryIsGranteeRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeRequest.granter": - return x.Granter != "" - case "band.bandtss.v1beta1.QueryIsGranteeRequest.grantee": - return x.Grantee != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeRequest")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeRequest 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_QueryIsGranteeRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeRequest.granter": - x.Granter = "" - case "band.bandtss.v1beta1.QueryIsGranteeRequest.grantee": - x.Grantee = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeRequest")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeRequest 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_QueryIsGranteeRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeRequest.granter": - value := x.Granter - return protoreflect.ValueOfString(value) - case "band.bandtss.v1beta1.QueryIsGranteeRequest.grantee": - value := x.Grantee - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeRequest")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeRequest 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_QueryIsGranteeRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeRequest.granter": - x.Granter = value.Interface().(string) - case "band.bandtss.v1beta1.QueryIsGranteeRequest.grantee": - x.Grantee = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeRequest")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeRequest 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_QueryIsGranteeRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeRequest.granter": - panic(fmt.Errorf("field granter of message band.bandtss.v1beta1.QueryIsGranteeRequest is not mutable")) - case "band.bandtss.v1beta1.QueryIsGranteeRequest.grantee": - panic(fmt.Errorf("field grantee of message band.bandtss.v1beta1.QueryIsGranteeRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeRequest")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeRequest 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_QueryIsGranteeRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeRequest.granter": - return protoreflect.ValueOfString("") - case "band.bandtss.v1beta1.QueryIsGranteeRequest.grantee": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeRequest")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeRequest 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_QueryIsGranteeRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in band.bandtss.v1beta1.QueryIsGranteeRequest", 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_QueryIsGranteeRequest) 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_QueryIsGranteeRequest) 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_QueryIsGranteeRequest) 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_QueryIsGranteeRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryIsGranteeRequest) - 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.Granter) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grantee) - 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().(*QueryIsGranteeRequest) - 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.Grantee) > 0 { - i -= len(x.Grantee) - copy(dAtA[i:], x.Grantee) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(x.Granter) > 0 { - i -= len(x.Granter) - copy(dAtA[i:], x.Granter) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Granter))) - 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().(*QueryIsGranteeRequest) - 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: QueryIsGranteeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIsGranteeRequest: 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 Granter", 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.Granter = 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 Grantee", 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.Grantee = 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_QueryIsGranteeResponse protoreflect.MessageDescriptor - fd_QueryIsGranteeResponse_is_grantee protoreflect.FieldDescriptor -) - -func init() { - file_band_bandtss_v1beta1_query_proto_init() - md_QueryIsGranteeResponse = File_band_bandtss_v1beta1_query_proto.Messages().ByName("QueryIsGranteeResponse") - fd_QueryIsGranteeResponse_is_grantee = md_QueryIsGranteeResponse.Fields().ByName("is_grantee") -} - -var _ protoreflect.Message = (*fastReflection_QueryIsGranteeResponse)(nil) - -type fastReflection_QueryIsGranteeResponse QueryIsGranteeResponse - -func (x *QueryIsGranteeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryIsGranteeResponse)(x) -} - -func (x *QueryIsGranteeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_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_QueryIsGranteeResponse_messageType fastReflection_QueryIsGranteeResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryIsGranteeResponse_messageType{} - -type fastReflection_QueryIsGranteeResponse_messageType struct{} - -func (x fastReflection_QueryIsGranteeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryIsGranteeResponse)(nil) -} -func (x fastReflection_QueryIsGranteeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryIsGranteeResponse) -} -func (x fastReflection_QueryIsGranteeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIsGranteeResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryIsGranteeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIsGranteeResponse -} - -// 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_QueryIsGranteeResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryIsGranteeResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryIsGranteeResponse) New() protoreflect.Message { - return new(fastReflection_QueryIsGranteeResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryIsGranteeResponse) Interface() protoreflect.ProtoMessage { - return (*QueryIsGranteeResponse)(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_QueryIsGranteeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.IsGrantee != false { - value := protoreflect.ValueOfBool(x.IsGrantee) - if !f(fd_QueryIsGranteeResponse_is_grantee, 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_QueryIsGranteeResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeResponse.is_grantee": - return x.IsGrantee != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeResponse 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_QueryIsGranteeResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeResponse.is_grantee": - x.IsGrantee = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeResponse 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_QueryIsGranteeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeResponse.is_grantee": - value := x.IsGrantee - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeResponse 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_QueryIsGranteeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeResponse.is_grantee": - x.IsGrantee = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeResponse 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_QueryIsGranteeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeResponse.is_grantee": - panic(fmt.Errorf("field is_grantee of message band.bandtss.v1beta1.QueryIsGranteeResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeResponse 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_QueryIsGranteeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.bandtss.v1beta1.QueryIsGranteeResponse.is_grantee": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.QueryIsGranteeResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.QueryIsGranteeResponse 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_QueryIsGranteeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in band.bandtss.v1beta1.QueryIsGranteeResponse", 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_QueryIsGranteeResponse) 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_QueryIsGranteeResponse) 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_QueryIsGranteeResponse) 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_QueryIsGranteeResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryIsGranteeResponse) - 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.IsGrantee { - n += 2 - } - 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().(*QueryIsGranteeResponse) - 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 x.IsGrantee { - i-- - if x.IsGrantee { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - 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().(*QueryIsGranteeResponse) - 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: QueryIsGranteeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIsGranteeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsGrantee", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsGrantee = bool(v != 0) - 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_QueryMembersRequest protoreflect.MessageDescriptor fd_QueryMembersRequest_status protoreflect.FieldDescriptor @@ -1696,7 +802,7 @@ func (x *QueryMembersRequest) ProtoReflect() protoreflect.Message { } func (x *QueryMembersRequest) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[4] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2282,7 +1388,7 @@ func (x *QueryMembersResponse) ProtoReflect() protoreflect.Message { } func (x *QueryMembersResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[5] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2802,7 +1908,7 @@ func (x *QueryMemberRequest) ProtoReflect() protoreflect.Message { } func (x *QueryMemberRequest) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[6] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3224,7 +2330,7 @@ func (x *QueryMemberResponse) ProtoReflect() protoreflect.Message { } func (x *QueryMemberResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[7] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3734,7 +2840,7 @@ func (x *QueryCurrentGroupRequest) ProtoReflect() protoreflect.Message { } func (x *QueryCurrentGroupRequest) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[8] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4102,7 +3208,7 @@ func (x *QueryCurrentGroupResponse) ProtoReflect() protoreflect.Message { } func (x *QueryCurrentGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[9] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4783,7 +3889,7 @@ func (x *QueryIncomingGroupRequest) ProtoReflect() protoreflect.Message { } func (x *QueryIncomingGroupRequest) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[10] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5149,7 +4255,7 @@ func (x *QueryIncomingGroupResponse) ProtoReflect() protoreflect.Message { } func (x *QueryIncomingGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[11] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5755,7 +4861,7 @@ func (x *QuerySigningRequest) ProtoReflect() protoreflect.Message { } func (x *QuerySigningRequest) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[12] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6216,7 +5322,7 @@ func (x *QuerySigningResponse) ProtoReflect() protoreflect.Message { } func (x *QuerySigningResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[13] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6873,7 +5979,7 @@ func (x *QueryGroupTransitionRequest) ProtoReflect() protoreflect.Message { } func (x *QueryGroupTransitionRequest) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[14] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7231,7 +6337,7 @@ func (x *QueryGroupTransitionResponse) ProtoReflect() protoreflect.Message { } func (x *QueryGroupTransitionResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[15] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7664,7 +6770,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[16] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8022,7 +7128,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[17] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8567,89 +7673,6 @@ func (x *QueryCountsResponse) GetSigningCount() uint64 { return 0 } -// QueryIsSignerRequest is request type for the Query/IsGrantee RPC method. -type QueryIsGranteeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // granter is a granter address - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // grantee is a grantee address - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` -} - -func (x *QueryIsGranteeRequest) Reset() { - *x = QueryIsGranteeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryIsGranteeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryIsGranteeRequest) ProtoMessage() {} - -// Deprecated: Use QueryIsGranteeRequest.ProtoReflect.Descriptor instead. -func (*QueryIsGranteeRequest) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryIsGranteeRequest) GetGranter() string { - if x != nil { - return x.Granter - } - return "" -} - -func (x *QueryIsGranteeRequest) GetGrantee() string { - if x != nil { - return x.Grantee - } - return "" -} - -// QueryIsGranteeResponse is response type for the Query/IsGrantee RPC method. -type QueryIsGranteeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // is_grantee is true if this account has been granted by granter - IsGrantee bool `protobuf:"varint,1,opt,name=is_grantee,json=isGrantee,proto3" json:"is_grantee,omitempty"` -} - -func (x *QueryIsGranteeResponse) Reset() { - *x = QueryIsGranteeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryIsGranteeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryIsGranteeResponse) ProtoMessage() {} - -// Deprecated: Use QueryIsGranteeResponse.ProtoReflect.Descriptor instead. -func (*QueryIsGranteeResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryIsGranteeResponse) GetIsGrantee() bool { - if x != nil { - return x.IsGrantee - } - return false -} - // QueryMembersRequest is the request type for the Query/Members RPC method. type QueryMembersRequest struct { state protoimpl.MessageState @@ -8668,7 +7691,7 @@ type QueryMembersRequest struct { func (x *QueryMembersRequest) Reset() { *x = QueryMembersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[4] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8682,7 +7705,7 @@ func (*QueryMembersRequest) ProtoMessage() {} // Deprecated: Use QueryMembersRequest.ProtoReflect.Descriptor instead. func (*QueryMembersRequest) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{4} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{2} } func (x *QueryMembersRequest) GetStatus() MemberStatusFilter { @@ -8721,7 +7744,7 @@ type QueryMembersResponse struct { func (x *QueryMembersResponse) Reset() { *x = QueryMembersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[5] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8735,7 +7758,7 @@ func (*QueryMembersResponse) ProtoMessage() {} // Deprecated: Use QueryMembersResponse.ProtoReflect.Descriptor instead. func (*QueryMembersResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{5} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryMembersResponse) GetMembers() []*Member { @@ -8765,7 +7788,7 @@ type QueryMemberRequest struct { func (x *QueryMemberRequest) Reset() { *x = QueryMemberRequest{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[6] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8779,7 +7802,7 @@ func (*QueryMemberRequest) ProtoMessage() {} // Deprecated: Use QueryMemberRequest.ProtoReflect.Descriptor instead. func (*QueryMemberRequest) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{6} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{4} } func (x *QueryMemberRequest) GetAddress() string { @@ -8804,7 +7827,7 @@ type QueryMemberResponse struct { func (x *QueryMemberResponse) Reset() { *x = QueryMemberResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[7] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8818,7 +7841,7 @@ func (*QueryMemberResponse) ProtoMessage() {} // Deprecated: Use QueryMemberResponse.ProtoReflect.Descriptor instead. func (*QueryMemberResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{7} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{5} } func (x *QueryMemberResponse) GetCurrentGroupMember() *Member { @@ -8845,7 +7868,7 @@ type QueryCurrentGroupRequest struct { func (x *QueryCurrentGroupRequest) Reset() { *x = QueryCurrentGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[8] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8859,7 +7882,7 @@ func (*QueryCurrentGroupRequest) ProtoMessage() {} // Deprecated: Use QueryCurrentGroupRequest.ProtoReflect.Descriptor instead. func (*QueryCurrentGroupRequest) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{8} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{6} } // QueryCurrentGroupResponse is the response type for the Query/CurrentGroup RPC method. @@ -8885,7 +7908,7 @@ type QueryCurrentGroupResponse struct { func (x *QueryCurrentGroupResponse) Reset() { *x = QueryCurrentGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[9] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8899,7 +7922,7 @@ func (*QueryCurrentGroupResponse) ProtoMessage() {} // Deprecated: Use QueryCurrentGroupResponse.ProtoReflect.Descriptor instead. func (*QueryCurrentGroupResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{9} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{7} } func (x *QueryCurrentGroupResponse) GetGroupId() uint64 { @@ -8954,7 +7977,7 @@ type QueryIncomingGroupRequest struct { func (x *QueryIncomingGroupRequest) Reset() { *x = QueryIncomingGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[10] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8968,7 +7991,7 @@ func (*QueryIncomingGroupRequest) ProtoMessage() {} // Deprecated: Use QueryIncomingGroupRequest.ProtoReflect.Descriptor instead. func (*QueryIncomingGroupRequest) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{10} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{8} } // QueryIncomingGroupResponse is the response type for the Query/IncomingGroup RPC method. @@ -8992,7 +8015,7 @@ type QueryIncomingGroupResponse struct { func (x *QueryIncomingGroupResponse) Reset() { *x = QueryIncomingGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[11] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9006,7 +8029,7 @@ func (*QueryIncomingGroupResponse) ProtoMessage() {} // Deprecated: Use QueryIncomingGroupResponse.ProtoReflect.Descriptor instead. func (*QueryIncomingGroupResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{11} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{9} } func (x *QueryIncomingGroupResponse) GetGroupId() uint64 { @@ -9057,7 +8080,7 @@ type QuerySigningRequest struct { func (x *QuerySigningRequest) Reset() { *x = QuerySigningRequest{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[12] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9071,7 +8094,7 @@ func (*QuerySigningRequest) ProtoMessage() {} // Deprecated: Use QuerySigningRequest.ProtoReflect.Descriptor instead. func (*QuerySigningRequest) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{12} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{10} } func (x *QuerySigningRequest) GetSigningId() uint64 { @@ -9100,7 +8123,7 @@ type QuerySigningResponse struct { func (x *QuerySigningResponse) Reset() { *x = QuerySigningResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[13] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9114,7 +8137,7 @@ func (*QuerySigningResponse) ProtoMessage() {} // Deprecated: Use QuerySigningResponse.ProtoReflect.Descriptor instead. func (*QuerySigningResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{13} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{11} } func (x *QuerySigningResponse) GetFeePerSigner() []*v1beta12.Coin { @@ -9155,7 +8178,7 @@ type QueryGroupTransitionRequest struct { func (x *QueryGroupTransitionRequest) Reset() { *x = QueryGroupTransitionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[14] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9169,7 +8192,7 @@ func (*QueryGroupTransitionRequest) ProtoMessage() {} // Deprecated: Use QueryGroupTransitionRequest.ProtoReflect.Descriptor instead. func (*QueryGroupTransitionRequest) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{14} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{12} } // QueryGroupTransitionResponse is the response type for the Query/GroupTransition RPC method. @@ -9185,7 +8208,7 @@ type QueryGroupTransitionResponse struct { func (x *QueryGroupTransitionResponse) Reset() { *x = QueryGroupTransitionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[15] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9199,7 +8222,7 @@ func (*QueryGroupTransitionResponse) ProtoMessage() {} // Deprecated: Use QueryGroupTransitionResponse.ProtoReflect.Descriptor instead. func (*QueryGroupTransitionResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{15} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{13} } func (x *QueryGroupTransitionResponse) GetGroupTransition() *GroupTransition { @@ -9219,7 +8242,7 @@ type QueryParamsRequest struct { func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[16] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9233,7 +8256,7 @@ func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{16} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{14} } // QueryParamsResponse is response type for the Query/Params RPC method. @@ -9249,7 +8272,7 @@ type QueryParamsResponse struct { func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[17] + mi := &file_band_bandtss_v1beta1_query_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9263,7 +8286,7 @@ func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{17} + return file_band_bandtss_v1beta1_query_proto_rawDescGZIP(), []int{15} } func (x *QueryParamsResponse) GetParams() *Params { @@ -9301,247 +8324,228 @@ var file_band_bandtss_v1beta1_query_proto_rawDesc = []byte{ 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x4b, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0x37, 0x0a, 0x16, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x49, 0x6e, - 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0xcb, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x73, 0x5f, + 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, + 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x47, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x54, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, - 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc3, 0x01, - 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x15, 0x69, - 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x13, - 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x22, 0x1a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0xf4, 0x02, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, - 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, - 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4b, 0x0a, 0x07, 0x70, - 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, - 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, - 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x45, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, - 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0xae, 0x02, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, - 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, - 0x12, 0x4b, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0x34, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0xed, 0x02, 0x0a, 0x14, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0e, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x50, 0x65, 0x72, - 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x19, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x62, 0x0a, 0x1d, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, - 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x1a, - 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x70, 0x0a, 0x1c, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x15, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, + 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x1a, 0x0a, + 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xf4, 0x02, 0x0a, 0x19, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, + 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4b, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x1b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, + 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xae, 0x02, + 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x08, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, + 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, + 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x4b, 0x0a, 0x07, 0x70, 0x75, + 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x32, 0xfa, 0xde, 0x1f, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, + 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2a, 0x84, 0x01, 0x0a, 0x12, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x20, 0x4d, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x34, + 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x64, 0x22, 0xed, 0x02, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, + 0x0e, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x52, 0x0c, 0x66, 0x65, 0x65, 0x50, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x60, + 0x0a, 0x1c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x19, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x62, 0x0a, 0x1d, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x1a, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x70, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2a, 0x84, + 0x01, 0x0a, 0x12, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x20, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, - 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, - 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, - 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x32, 0xab, 0x0a, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7e, 0x0a, 0x06, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, - 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x54, 0x45, 0x52, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, + 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, + 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x1a, + 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x32, 0x89, 0x09, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x7e, 0x0a, 0x06, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x9f, 0x01, 0x0a, 0x09, 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x12, 0x2b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x49, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x73, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x73, 0x5f, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x65, 0x65, 0x2f, 0x7b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x89, 0x01, 0x0a, - 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, + 0x82, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x9b, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, - 0x1f, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x90, 0x01, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x2e, 0x62, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, + 0x12, 0x97, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x9b, 0x01, 0x0a, 0x0d, 0x49, + 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, - 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, + 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x12, 0x17, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xe2, 0x01, 0x0a, 0x18, 0x63, 0x6f, - 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, - 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, - 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, - 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, - 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, - 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x90, 0x01, 0x0a, 0x07, 0x53, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, + 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0f, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x31, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0xe2, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, + 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, + 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, + 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -9557,72 +8561,68 @@ func file_band_bandtss_v1beta1_query_proto_rawDescGZIP() []byte { } var file_band_bandtss_v1beta1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_band_bandtss_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_band_bandtss_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_band_bandtss_v1beta1_query_proto_goTypes = []interface{}{ (MemberStatusFilter)(0), // 0: band.bandtss.v1beta1.MemberStatusFilter (*QueryCountsRequest)(nil), // 1: band.bandtss.v1beta1.QueryCountsRequest (*QueryCountsResponse)(nil), // 2: band.bandtss.v1beta1.QueryCountsResponse - (*QueryIsGranteeRequest)(nil), // 3: band.bandtss.v1beta1.QueryIsGranteeRequest - (*QueryIsGranteeResponse)(nil), // 4: band.bandtss.v1beta1.QueryIsGranteeResponse - (*QueryMembersRequest)(nil), // 5: band.bandtss.v1beta1.QueryMembersRequest - (*QueryMembersResponse)(nil), // 6: band.bandtss.v1beta1.QueryMembersResponse - (*QueryMemberRequest)(nil), // 7: band.bandtss.v1beta1.QueryMemberRequest - (*QueryMemberResponse)(nil), // 8: band.bandtss.v1beta1.QueryMemberResponse - (*QueryCurrentGroupRequest)(nil), // 9: band.bandtss.v1beta1.QueryCurrentGroupRequest - (*QueryCurrentGroupResponse)(nil), // 10: band.bandtss.v1beta1.QueryCurrentGroupResponse - (*QueryIncomingGroupRequest)(nil), // 11: band.bandtss.v1beta1.QueryIncomingGroupRequest - (*QueryIncomingGroupResponse)(nil), // 12: band.bandtss.v1beta1.QueryIncomingGroupResponse - (*QuerySigningRequest)(nil), // 13: band.bandtss.v1beta1.QuerySigningRequest - (*QuerySigningResponse)(nil), // 14: band.bandtss.v1beta1.QuerySigningResponse - (*QueryGroupTransitionRequest)(nil), // 15: band.bandtss.v1beta1.QueryGroupTransitionRequest - (*QueryGroupTransitionResponse)(nil), // 16: band.bandtss.v1beta1.QueryGroupTransitionResponse - (*QueryParamsRequest)(nil), // 17: band.bandtss.v1beta1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 18: band.bandtss.v1beta1.QueryParamsResponse - (*v1beta1.PageRequest)(nil), // 19: cosmos.base.query.v1beta1.PageRequest - (*Member)(nil), // 20: band.bandtss.v1beta1.Member - (*v1beta1.PageResponse)(nil), // 21: cosmos.base.query.v1beta1.PageResponse - (v1beta11.GroupStatus)(0), // 22: band.tss.v1beta1.GroupStatus - (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp - (*v1beta12.Coin)(nil), // 24: cosmos.base.v1beta1.Coin - (*v1beta11.SigningResult)(nil), // 25: band.tss.v1beta1.SigningResult - (*GroupTransition)(nil), // 26: band.bandtss.v1beta1.GroupTransition - (*Params)(nil), // 27: band.bandtss.v1beta1.Params + (*QueryMembersRequest)(nil), // 3: band.bandtss.v1beta1.QueryMembersRequest + (*QueryMembersResponse)(nil), // 4: band.bandtss.v1beta1.QueryMembersResponse + (*QueryMemberRequest)(nil), // 5: band.bandtss.v1beta1.QueryMemberRequest + (*QueryMemberResponse)(nil), // 6: band.bandtss.v1beta1.QueryMemberResponse + (*QueryCurrentGroupRequest)(nil), // 7: band.bandtss.v1beta1.QueryCurrentGroupRequest + (*QueryCurrentGroupResponse)(nil), // 8: band.bandtss.v1beta1.QueryCurrentGroupResponse + (*QueryIncomingGroupRequest)(nil), // 9: band.bandtss.v1beta1.QueryIncomingGroupRequest + (*QueryIncomingGroupResponse)(nil), // 10: band.bandtss.v1beta1.QueryIncomingGroupResponse + (*QuerySigningRequest)(nil), // 11: band.bandtss.v1beta1.QuerySigningRequest + (*QuerySigningResponse)(nil), // 12: band.bandtss.v1beta1.QuerySigningResponse + (*QueryGroupTransitionRequest)(nil), // 13: band.bandtss.v1beta1.QueryGroupTransitionRequest + (*QueryGroupTransitionResponse)(nil), // 14: band.bandtss.v1beta1.QueryGroupTransitionResponse + (*QueryParamsRequest)(nil), // 15: band.bandtss.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 16: band.bandtss.v1beta1.QueryParamsResponse + (*v1beta1.PageRequest)(nil), // 17: cosmos.base.query.v1beta1.PageRequest + (*Member)(nil), // 18: band.bandtss.v1beta1.Member + (*v1beta1.PageResponse)(nil), // 19: cosmos.base.query.v1beta1.PageResponse + (v1beta11.GroupStatus)(0), // 20: band.tss.v1beta1.GroupStatus + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp + (*v1beta12.Coin)(nil), // 22: cosmos.base.v1beta1.Coin + (*v1beta11.SigningResult)(nil), // 23: band.tss.v1beta1.SigningResult + (*GroupTransition)(nil), // 24: band.bandtss.v1beta1.GroupTransition + (*Params)(nil), // 25: band.bandtss.v1beta1.Params } var file_band_bandtss_v1beta1_query_proto_depIdxs = []int32{ 0, // 0: band.bandtss.v1beta1.QueryMembersRequest.status:type_name -> band.bandtss.v1beta1.MemberStatusFilter - 19, // 1: band.bandtss.v1beta1.QueryMembersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 20, // 2: band.bandtss.v1beta1.QueryMembersResponse.members:type_name -> band.bandtss.v1beta1.Member - 21, // 3: band.bandtss.v1beta1.QueryMembersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 20, // 4: band.bandtss.v1beta1.QueryMemberResponse.current_group_member:type_name -> band.bandtss.v1beta1.Member - 20, // 5: band.bandtss.v1beta1.QueryMemberResponse.incoming_group_member:type_name -> band.bandtss.v1beta1.Member - 22, // 6: band.bandtss.v1beta1.QueryCurrentGroupResponse.status:type_name -> band.tss.v1beta1.GroupStatus - 23, // 7: band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time:type_name -> google.protobuf.Timestamp - 22, // 8: band.bandtss.v1beta1.QueryIncomingGroupResponse.status:type_name -> band.tss.v1beta1.GroupStatus - 24, // 9: band.bandtss.v1beta1.QuerySigningResponse.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin - 25, // 10: band.bandtss.v1beta1.QuerySigningResponse.current_group_signing_result:type_name -> band.tss.v1beta1.SigningResult - 25, // 11: band.bandtss.v1beta1.QuerySigningResponse.incoming_group_signing_result:type_name -> band.tss.v1beta1.SigningResult - 26, // 12: band.bandtss.v1beta1.QueryGroupTransitionResponse.group_transition:type_name -> band.bandtss.v1beta1.GroupTransition - 27, // 13: band.bandtss.v1beta1.QueryParamsResponse.params:type_name -> band.bandtss.v1beta1.Params + 17, // 1: band.bandtss.v1beta1.QueryMembersRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 2: band.bandtss.v1beta1.QueryMembersResponse.members:type_name -> band.bandtss.v1beta1.Member + 19, // 3: band.bandtss.v1beta1.QueryMembersResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 18, // 4: band.bandtss.v1beta1.QueryMemberResponse.current_group_member:type_name -> band.bandtss.v1beta1.Member + 18, // 5: band.bandtss.v1beta1.QueryMemberResponse.incoming_group_member:type_name -> band.bandtss.v1beta1.Member + 20, // 6: band.bandtss.v1beta1.QueryCurrentGroupResponse.status:type_name -> band.tss.v1beta1.GroupStatus + 21, // 7: band.bandtss.v1beta1.QueryCurrentGroupResponse.active_time:type_name -> google.protobuf.Timestamp + 20, // 8: band.bandtss.v1beta1.QueryIncomingGroupResponse.status:type_name -> band.tss.v1beta1.GroupStatus + 22, // 9: band.bandtss.v1beta1.QuerySigningResponse.fee_per_signer:type_name -> cosmos.base.v1beta1.Coin + 23, // 10: band.bandtss.v1beta1.QuerySigningResponse.current_group_signing_result:type_name -> band.tss.v1beta1.SigningResult + 23, // 11: band.bandtss.v1beta1.QuerySigningResponse.incoming_group_signing_result:type_name -> band.tss.v1beta1.SigningResult + 24, // 12: band.bandtss.v1beta1.QueryGroupTransitionResponse.group_transition:type_name -> band.bandtss.v1beta1.GroupTransition + 25, // 13: band.bandtss.v1beta1.QueryParamsResponse.params:type_name -> band.bandtss.v1beta1.Params 1, // 14: band.bandtss.v1beta1.Query.Counts:input_type -> band.bandtss.v1beta1.QueryCountsRequest - 3, // 15: band.bandtss.v1beta1.Query.IsGrantee:input_type -> band.bandtss.v1beta1.QueryIsGranteeRequest - 5, // 16: band.bandtss.v1beta1.Query.Members:input_type -> band.bandtss.v1beta1.QueryMembersRequest - 7, // 17: band.bandtss.v1beta1.Query.Member:input_type -> band.bandtss.v1beta1.QueryMemberRequest - 9, // 18: band.bandtss.v1beta1.Query.CurrentGroup:input_type -> band.bandtss.v1beta1.QueryCurrentGroupRequest - 11, // 19: band.bandtss.v1beta1.Query.IncomingGroup:input_type -> band.bandtss.v1beta1.QueryIncomingGroupRequest - 13, // 20: band.bandtss.v1beta1.Query.Signing:input_type -> band.bandtss.v1beta1.QuerySigningRequest - 15, // 21: band.bandtss.v1beta1.Query.GroupTransition:input_type -> band.bandtss.v1beta1.QueryGroupTransitionRequest - 17, // 22: band.bandtss.v1beta1.Query.Params:input_type -> band.bandtss.v1beta1.QueryParamsRequest - 2, // 23: band.bandtss.v1beta1.Query.Counts:output_type -> band.bandtss.v1beta1.QueryCountsResponse - 4, // 24: band.bandtss.v1beta1.Query.IsGrantee:output_type -> band.bandtss.v1beta1.QueryIsGranteeResponse - 6, // 25: band.bandtss.v1beta1.Query.Members:output_type -> band.bandtss.v1beta1.QueryMembersResponse - 8, // 26: band.bandtss.v1beta1.Query.Member:output_type -> band.bandtss.v1beta1.QueryMemberResponse - 10, // 27: band.bandtss.v1beta1.Query.CurrentGroup:output_type -> band.bandtss.v1beta1.QueryCurrentGroupResponse - 12, // 28: band.bandtss.v1beta1.Query.IncomingGroup:output_type -> band.bandtss.v1beta1.QueryIncomingGroupResponse - 14, // 29: band.bandtss.v1beta1.Query.Signing:output_type -> band.bandtss.v1beta1.QuerySigningResponse - 16, // 30: band.bandtss.v1beta1.Query.GroupTransition:output_type -> band.bandtss.v1beta1.QueryGroupTransitionResponse - 18, // 31: band.bandtss.v1beta1.Query.Params:output_type -> band.bandtss.v1beta1.QueryParamsResponse - 23, // [23:32] is the sub-list for method output_type - 14, // [14:23] is the sub-list for method input_type + 3, // 15: band.bandtss.v1beta1.Query.Members:input_type -> band.bandtss.v1beta1.QueryMembersRequest + 5, // 16: band.bandtss.v1beta1.Query.Member:input_type -> band.bandtss.v1beta1.QueryMemberRequest + 7, // 17: band.bandtss.v1beta1.Query.CurrentGroup:input_type -> band.bandtss.v1beta1.QueryCurrentGroupRequest + 9, // 18: band.bandtss.v1beta1.Query.IncomingGroup:input_type -> band.bandtss.v1beta1.QueryIncomingGroupRequest + 11, // 19: band.bandtss.v1beta1.Query.Signing:input_type -> band.bandtss.v1beta1.QuerySigningRequest + 13, // 20: band.bandtss.v1beta1.Query.GroupTransition:input_type -> band.bandtss.v1beta1.QueryGroupTransitionRequest + 15, // 21: band.bandtss.v1beta1.Query.Params:input_type -> band.bandtss.v1beta1.QueryParamsRequest + 2, // 22: band.bandtss.v1beta1.Query.Counts:output_type -> band.bandtss.v1beta1.QueryCountsResponse + 4, // 23: band.bandtss.v1beta1.Query.Members:output_type -> band.bandtss.v1beta1.QueryMembersResponse + 6, // 24: band.bandtss.v1beta1.Query.Member:output_type -> band.bandtss.v1beta1.QueryMemberResponse + 8, // 25: band.bandtss.v1beta1.Query.CurrentGroup:output_type -> band.bandtss.v1beta1.QueryCurrentGroupResponse + 10, // 26: band.bandtss.v1beta1.Query.IncomingGroup:output_type -> band.bandtss.v1beta1.QueryIncomingGroupResponse + 12, // 27: band.bandtss.v1beta1.Query.Signing:output_type -> band.bandtss.v1beta1.QuerySigningResponse + 14, // 28: band.bandtss.v1beta1.Query.GroupTransition:output_type -> band.bandtss.v1beta1.QueryGroupTransitionResponse + 16, // 29: band.bandtss.v1beta1.Query.Params:output_type -> band.bandtss.v1beta1.QueryParamsResponse + 22, // [22:30] is the sub-list for method output_type + 14, // [14:22] is the sub-list for method input_type 14, // [14:14] is the sub-list for extension type_name 14, // [14:14] is the sub-list for extension extendee 0, // [0:14] is the sub-list for field type_name @@ -9661,30 +8661,6 @@ func file_band_bandtss_v1beta1_query_proto_init() { } } file_band_bandtss_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryIsGranteeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_band_bandtss_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryIsGranteeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_band_bandtss_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryMembersRequest); i { case 0: return &v.state @@ -9696,7 +8672,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryMembersResponse); i { case 0: return &v.state @@ -9708,7 +8684,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryMemberRequest); i { case 0: return &v.state @@ -9720,7 +8696,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryMemberResponse); i { case 0: return &v.state @@ -9732,7 +8708,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryCurrentGroupRequest); i { case 0: return &v.state @@ -9744,7 +8720,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryCurrentGroupResponse); i { case 0: return &v.state @@ -9756,7 +8732,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryIncomingGroupRequest); i { case 0: return &v.state @@ -9768,7 +8744,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryIncomingGroupResponse); i { case 0: return &v.state @@ -9780,7 +8756,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QuerySigningRequest); i { case 0: return &v.state @@ -9792,7 +8768,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QuerySigningResponse); i { case 0: return &v.state @@ -9804,7 +8780,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGroupTransitionRequest); i { case 0: return &v.state @@ -9816,7 +8792,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryGroupTransitionResponse); i { case 0: return &v.state @@ -9828,7 +8804,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { case 0: return &v.state @@ -9840,7 +8816,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { return nil } } - file_band_bandtss_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state @@ -9859,7 +8835,7 @@ func file_band_bandtss_v1beta1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_band_bandtss_v1beta1_query_proto_rawDesc, NumEnums: 1, - NumMessages: 18, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/band/bandtss/v1beta1/query_grpc.pb.go b/api/band/bandtss/v1beta1/query_grpc.pb.go index 8fef9d2f0..14e1e16e0 100644 --- a/api/band/bandtss/v1beta1/query_grpc.pb.go +++ b/api/band/bandtss/v1beta1/query_grpc.pb.go @@ -20,7 +20,6 @@ const _ = grpc.SupportPackageIsVersion7 const ( Query_Counts_FullMethodName = "/band.bandtss.v1beta1.Query/Counts" - Query_IsGrantee_FullMethodName = "/band.bandtss.v1beta1.Query/IsGrantee" Query_Members_FullMethodName = "/band.bandtss.v1beta1.Query/Members" Query_Member_FullMethodName = "/band.bandtss.v1beta1.Query/Member" Query_CurrentGroup_FullMethodName = "/band.bandtss.v1beta1.Query/CurrentGroup" @@ -36,8 +35,6 @@ const ( type QueryClient interface { // Counts queries the number of existing signing. Counts(ctx context.Context, in *QueryCountsRequest, opts ...grpc.CallOption) (*QueryCountsResponse, error) - // IsGrantee queries whether granter grants the grantee. - IsGrantee(ctx context.Context, in *QueryIsGranteeRequest, opts ...grpc.CallOption) (*QueryIsGranteeResponse, error) // Members queries all members. Members(ctx context.Context, in *QueryMembersRequest, opts ...grpc.CallOption) (*QueryMembersResponse, error) // Member queries the member information of the given address. @@ -71,15 +68,6 @@ func (c *queryClient) Counts(ctx context.Context, in *QueryCountsRequest, opts . return out, nil } -func (c *queryClient) IsGrantee(ctx context.Context, in *QueryIsGranteeRequest, opts ...grpc.CallOption) (*QueryIsGranteeResponse, error) { - out := new(QueryIsGranteeResponse) - err := c.cc.Invoke(ctx, Query_IsGrantee_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) Members(ctx context.Context, in *QueryMembersRequest, opts ...grpc.CallOption) (*QueryMembersResponse, error) { out := new(QueryMembersResponse) err := c.cc.Invoke(ctx, Query_Members_FullMethodName, in, out, opts...) @@ -149,8 +137,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . type QueryServer interface { // Counts queries the number of existing signing. Counts(context.Context, *QueryCountsRequest) (*QueryCountsResponse, error) - // IsGrantee queries whether granter grants the grantee. - IsGrantee(context.Context, *QueryIsGranteeRequest) (*QueryIsGranteeResponse, error) // Members queries all members. Members(context.Context, *QueryMembersRequest) (*QueryMembersResponse, error) // Member queries the member information of the given address. @@ -175,9 +161,6 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Counts(context.Context, *QueryCountsRequest) (*QueryCountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Counts not implemented") } -func (UnimplementedQueryServer) IsGrantee(context.Context, *QueryIsGranteeRequest) (*QueryIsGranteeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsGrantee not implemented") -} func (UnimplementedQueryServer) Members(context.Context, *QueryMembersRequest) (*QueryMembersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Members not implemented") } @@ -230,24 +213,6 @@ func _Query_Counts_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_IsGrantee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryIsGranteeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).IsGrantee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_IsGrantee_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).IsGrantee(ctx, req.(*QueryIsGranteeRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_Members_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryMembersRequest) if err := dec(in); err != nil { @@ -385,10 +350,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Counts", Handler: _Query_Counts_Handler, }, - { - MethodName: "IsGrantee", - Handler: _Query_IsGrantee_Handler, - }, { MethodName: "Members", Handler: _Query_Members_Handler, diff --git a/api/band/bandtss/v1beta1/tx.pulsar.go b/api/band/bandtss/v1beta1/tx.pulsar.go index 0672c04f1..67d4bdd96 100644 --- a/api/band/bandtss/v1beta1/tx.pulsar.go +++ b/api/band/bandtss/v1beta1/tx.pulsar.go @@ -1900,830 +1900,6 @@ func (x *fastReflection_MsgActivateResponse) ProtoMethods() *protoiface.Methods } } -var ( - md_MsgHeartbeat protoreflect.MessageDescriptor - fd_MsgHeartbeat_sender protoreflect.FieldDescriptor - fd_MsgHeartbeat_group_id protoreflect.FieldDescriptor -) - -func init() { - file_band_bandtss_v1beta1_tx_proto_init() - md_MsgHeartbeat = File_band_bandtss_v1beta1_tx_proto.Messages().ByName("MsgHeartbeat") - fd_MsgHeartbeat_sender = md_MsgHeartbeat.Fields().ByName("sender") - fd_MsgHeartbeat_group_id = md_MsgHeartbeat.Fields().ByName("group_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgHeartbeat)(nil) - -type fastReflection_MsgHeartbeat MsgHeartbeat - -func (x *MsgHeartbeat) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgHeartbeat)(x) -} - -func (x *MsgHeartbeat) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[4] - 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_MsgHeartbeat_messageType fastReflection_MsgHeartbeat_messageType -var _ protoreflect.MessageType = fastReflection_MsgHeartbeat_messageType{} - -type fastReflection_MsgHeartbeat_messageType struct{} - -func (x fastReflection_MsgHeartbeat_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgHeartbeat)(nil) -} -func (x fastReflection_MsgHeartbeat_messageType) New() protoreflect.Message { - return new(fastReflection_MsgHeartbeat) -} -func (x fastReflection_MsgHeartbeat_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgHeartbeat -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgHeartbeat) Descriptor() protoreflect.MessageDescriptor { - return md_MsgHeartbeat -} - -// 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_MsgHeartbeat) Type() protoreflect.MessageType { - return _fastReflection_MsgHeartbeat_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgHeartbeat) New() protoreflect.Message { - return new(fastReflection_MsgHeartbeat) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgHeartbeat) Interface() protoreflect.ProtoMessage { - return (*MsgHeartbeat)(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_MsgHeartbeat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgHeartbeat_sender, value) { - return - } - } - if x.GroupId != uint64(0) { - value := protoreflect.ValueOfUint64(x.GroupId) - if !f(fd_MsgHeartbeat_group_id, 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_MsgHeartbeat) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "band.bandtss.v1beta1.MsgHeartbeat.sender": - return x.Sender != "" - case "band.bandtss.v1beta1.MsgHeartbeat.group_id": - return x.GroupId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeat")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeat 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_MsgHeartbeat) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "band.bandtss.v1beta1.MsgHeartbeat.sender": - x.Sender = "" - case "band.bandtss.v1beta1.MsgHeartbeat.group_id": - x.GroupId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeat")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeat 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_MsgHeartbeat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "band.bandtss.v1beta1.MsgHeartbeat.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "band.bandtss.v1beta1.MsgHeartbeat.group_id": - value := x.GroupId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeat")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeat 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_MsgHeartbeat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "band.bandtss.v1beta1.MsgHeartbeat.sender": - x.Sender = value.Interface().(string) - case "band.bandtss.v1beta1.MsgHeartbeat.group_id": - x.GroupId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeat")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeat 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_MsgHeartbeat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.bandtss.v1beta1.MsgHeartbeat.sender": - panic(fmt.Errorf("field sender of message band.bandtss.v1beta1.MsgHeartbeat is not mutable")) - case "band.bandtss.v1beta1.MsgHeartbeat.group_id": - panic(fmt.Errorf("field group_id of message band.bandtss.v1beta1.MsgHeartbeat is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeat")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeat 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_MsgHeartbeat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.bandtss.v1beta1.MsgHeartbeat.sender": - return protoreflect.ValueOfString("") - case "band.bandtss.v1beta1.MsgHeartbeat.group_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeat")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeat 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_MsgHeartbeat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in band.bandtss.v1beta1.MsgHeartbeat", 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_MsgHeartbeat) 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_MsgHeartbeat) 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_MsgHeartbeat) 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_MsgHeartbeat) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgHeartbeat) - 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.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GroupId != 0 { - n += 1 + runtime.Sov(uint64(x.GroupId)) - } - 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().(*MsgHeartbeat) - 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 x.GroupId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GroupId)) - i-- - dAtA[i] = 0x10 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - 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().(*MsgHeartbeat) - 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: MsgHeartbeat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgHeartbeat: 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 Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - x.GroupId = 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.GroupId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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_MsgHeartbeatResponse protoreflect.MessageDescriptor -) - -func init() { - file_band_bandtss_v1beta1_tx_proto_init() - md_MsgHeartbeatResponse = File_band_bandtss_v1beta1_tx_proto.Messages().ByName("MsgHeartbeatResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgHeartbeatResponse)(nil) - -type fastReflection_MsgHeartbeatResponse MsgHeartbeatResponse - -func (x *MsgHeartbeatResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgHeartbeatResponse)(x) -} - -func (x *MsgHeartbeatResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[5] - 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_MsgHeartbeatResponse_messageType fastReflection_MsgHeartbeatResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgHeartbeatResponse_messageType{} - -type fastReflection_MsgHeartbeatResponse_messageType struct{} - -func (x fastReflection_MsgHeartbeatResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgHeartbeatResponse)(nil) -} -func (x fastReflection_MsgHeartbeatResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgHeartbeatResponse) -} -func (x fastReflection_MsgHeartbeatResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgHeartbeatResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgHeartbeatResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgHeartbeatResponse -} - -// 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_MsgHeartbeatResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgHeartbeatResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgHeartbeatResponse) New() protoreflect.Message { - return new(fastReflection_MsgHeartbeatResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgHeartbeatResponse) Interface() protoreflect.ProtoMessage { - return (*MsgHeartbeatResponse)(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_MsgHeartbeatResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// 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_MsgHeartbeatResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeatResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeatResponse 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_MsgHeartbeatResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeatResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeatResponse 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_MsgHeartbeatResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeatResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeatResponse 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_MsgHeartbeatResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeatResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeatResponse 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_MsgHeartbeatResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeatResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeatResponse 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_MsgHeartbeatResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.bandtss.v1beta1.MsgHeartbeatResponse")) - } - panic(fmt.Errorf("message band.bandtss.v1beta1.MsgHeartbeatResponse 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_MsgHeartbeatResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in band.bandtss.v1beta1.MsgHeartbeatResponse", 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_MsgHeartbeatResponse) 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_MsgHeartbeatResponse) 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_MsgHeartbeatResponse) 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_MsgHeartbeatResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgHeartbeatResponse) - 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.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().(*MsgHeartbeatResponse) - 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 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().(*MsgHeartbeatResponse) - 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: MsgHeartbeatResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgHeartbeatResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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_MsgUpdateParams protoreflect.MessageDescriptor fd_MsgUpdateParams_params protoreflect.FieldDescriptor @@ -2746,7 +1922,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[6] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3241,7 +2417,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[7] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3651,7 +2827,7 @@ func (x *MsgTransitionGroup) ProtoReflect() protoreflect.Message { } func (x *MsgTransitionGroup) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[8] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4268,7 +3444,7 @@ func (x *MsgTransitionGroupResponse) ProtoReflect() protoreflect.Message { } func (x *MsgTransitionGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[9] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4630,7 +3806,7 @@ func (x *MsgForceTransitionGroup) ProtoReflect() protoreflect.Message { } func (x *MsgForceTransitionGroup) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[10] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5171,7 +4347,7 @@ func (x *MsgForceTransitionGroupResponse) ProtoReflect() protoreflect.Message { } func (x *MsgForceTransitionGroupResponse) slowProtoReflect() protoreflect.Message { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[11] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5686,79 +4862,6 @@ func (*MsgActivateResponse) Descriptor() ([]byte, []int) { return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{3} } -// MsgHeartbeat is a message used to show if the address is still active. -type MsgHeartbeat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address is the signer of this message, who must be a member of the group. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // group_id is the group id of the member. - GroupId uint64 `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` -} - -func (x *MsgHeartbeat) Reset() { - *x = MsgHeartbeat{} - if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgHeartbeat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgHeartbeat) ProtoMessage() {} - -// Deprecated: Use MsgHeartbeat.ProtoReflect.Descriptor instead. -func (*MsgHeartbeat) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgHeartbeat) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgHeartbeat) GetGroupId() uint64 { - if x != nil { - return x.GroupId - } - return 0 -} - -// MsgHeartbeatResponse is response data for MsgHeartbeat message -type MsgHeartbeatResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgHeartbeatResponse) Reset() { - *x = MsgHeartbeatResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgHeartbeatResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgHeartbeatResponse) ProtoMessage() {} - -// Deprecated: Use MsgHeartbeatResponse.ProtoReflect.Descriptor instead. -func (*MsgHeartbeatResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{5} -} - // MsgUpdateParams is the Msg/UpdateParams request type. type MsgUpdateParams struct { state protoimpl.MessageState @@ -5774,7 +4877,7 @@ type MsgUpdateParams struct { func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[6] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5788,7 +4891,7 @@ func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{6} + return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgUpdateParams) GetParams() *Params { @@ -5815,7 +4918,7 @@ type MsgUpdateParamsResponse struct { func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[7] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5829,7 +4932,7 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{7} + return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{5} } // MsgTransitionGroup is the Msg/TransitionGroup request type. @@ -5851,7 +4954,7 @@ type MsgTransitionGroup struct { func (x *MsgTransitionGroup) Reset() { *x = MsgTransitionGroup{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[8] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5865,7 +4968,7 @@ func (*MsgTransitionGroup) ProtoMessage() {} // Deprecated: Use MsgTransitionGroup.ProtoReflect.Descriptor instead. func (*MsgTransitionGroup) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{8} + return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgTransitionGroup) GetMembers() []string { @@ -5906,7 +5009,7 @@ type MsgTransitionGroupResponse struct { func (x *MsgTransitionGroupResponse) Reset() { *x = MsgTransitionGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[9] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5920,7 +5023,7 @@ func (*MsgTransitionGroupResponse) ProtoMessage() {} // Deprecated: Use MsgTransitionGroupResponse.ProtoReflect.Descriptor instead. func (*MsgTransitionGroupResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{9} + return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{7} } // MsgForceTransitionGroup is the Msg/ForceTransitionGroup request type. @@ -5940,7 +5043,7 @@ type MsgForceTransitionGroup struct { func (x *MsgForceTransitionGroup) Reset() { *x = MsgForceTransitionGroup{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[10] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5954,7 +5057,7 @@ func (*MsgForceTransitionGroup) ProtoMessage() {} // Deprecated: Use MsgForceTransitionGroup.ProtoReflect.Descriptor instead. func (*MsgForceTransitionGroup) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{10} + return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgForceTransitionGroup) GetIncomingGroupId() uint64 { @@ -5988,7 +5091,7 @@ type MsgForceTransitionGroupResponse struct { func (x *MsgForceTransitionGroupResponse) Reset() { *x = MsgForceTransitionGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[11] + mi := &file_band_bandtss_v1beta1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6002,7 +5105,7 @@ func (*MsgForceTransitionGroupResponse) ProtoMessage() {} // Deprecated: Use MsgForceTransitionGroupResponse.ProtoReflect.Descriptor instead. func (*MsgForceTransitionGroupResponse) Descriptor() ([]byte, []int) { - return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{11} + return file_band_bandtss_v1beta1_tx_proto_rawDescGZIP(), []int{9} } var File_band_bandtss_v1beta1_tx_proto protoreflect.FileDescriptor @@ -6060,128 +5163,108 @@ var file_band_bandtss_v1beta1_tx_proto_rawDesc = []byte{ 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, - 0x61, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 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, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x3f, 0xe2, 0xde, 0x1f, 0x07, 0x47, 0x72, 0x6f, 0x75, + 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x62, 0x61, + 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xf6, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, + 0x41, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, + 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x46, + 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x73, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x47, + 0xe2, 0xde, 0x1f, 0x0f, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, - 0x3a, 0x24, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, - 0x2a, 0x14, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x48, 0x65, 0x61, - 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x48, 0x65, 0x61, - 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb1, - 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, - 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf6, 0x01, - 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x41, 0x0a, 0x09, - 0x65, 0x78, 0x65, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, - 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x62, 0x61, 0x6e, 0x64, - 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x46, 0x6f, 0x72, 0x63, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x73, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x47, 0xe2, 0xde, 0x1f, - 0x0f, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, - 0xfa, 0xde, 0x1f, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x73, 0x73, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x44, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x08, - 0x65, 0x78, 0x65, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x46, 0x6f, 0x72, - 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x88, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x70, 0x0a, 0x10, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x31, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, - 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x29, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, + 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, + 0x01, 0x52, 0x08, 0x65, 0x78, 0x65, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, + 0x46, 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x46, 0x6f, 0x72, 0x63, 0x65, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xab, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x70, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x31, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x58, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x0f, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x28, + 0x1a, 0x29, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6d, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x30, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x7c, 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x14, 0x46, 0x6f, - 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, - 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x6f, 0x72, - 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x1a, 0x35, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x6f, 0x72, 0x63, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, - 0xdf, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, - 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, - 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, - 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, - 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x73, 0x67, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x35, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, + 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xdf, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x42, 0x58, 0xaa, 0x02, 0x14, + 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, + 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x42, 0x61, + 0x6e, 0x64, 0x5c, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x16, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x42, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6196,45 +5279,41 @@ func file_band_bandtss_v1beta1_tx_proto_rawDescGZIP() []byte { return file_band_bandtss_v1beta1_tx_proto_rawDescData } -var file_band_bandtss_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_band_bandtss_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_band_bandtss_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgRequestSignature)(nil), // 0: band.bandtss.v1beta1.MsgRequestSignature (*MsgRequestSignatureResponse)(nil), // 1: band.bandtss.v1beta1.MsgRequestSignatureResponse (*MsgActivate)(nil), // 2: band.bandtss.v1beta1.MsgActivate (*MsgActivateResponse)(nil), // 3: band.bandtss.v1beta1.MsgActivateResponse - (*MsgHeartbeat)(nil), // 4: band.bandtss.v1beta1.MsgHeartbeat - (*MsgHeartbeatResponse)(nil), // 5: band.bandtss.v1beta1.MsgHeartbeatResponse - (*MsgUpdateParams)(nil), // 6: band.bandtss.v1beta1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 7: band.bandtss.v1beta1.MsgUpdateParamsResponse - (*MsgTransitionGroup)(nil), // 8: band.bandtss.v1beta1.MsgTransitionGroup - (*MsgTransitionGroupResponse)(nil), // 9: band.bandtss.v1beta1.MsgTransitionGroupResponse - (*MsgForceTransitionGroup)(nil), // 10: band.bandtss.v1beta1.MsgForceTransitionGroup - (*MsgForceTransitionGroupResponse)(nil), // 11: band.bandtss.v1beta1.MsgForceTransitionGroupResponse - (*anypb.Any)(nil), // 12: google.protobuf.Any - (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin - (*Params)(nil), // 14: band.bandtss.v1beta1.Params - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*MsgUpdateParams)(nil), // 4: band.bandtss.v1beta1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 5: band.bandtss.v1beta1.MsgUpdateParamsResponse + (*MsgTransitionGroup)(nil), // 6: band.bandtss.v1beta1.MsgTransitionGroup + (*MsgTransitionGroupResponse)(nil), // 7: band.bandtss.v1beta1.MsgTransitionGroupResponse + (*MsgForceTransitionGroup)(nil), // 8: band.bandtss.v1beta1.MsgForceTransitionGroup + (*MsgForceTransitionGroupResponse)(nil), // 9: band.bandtss.v1beta1.MsgForceTransitionGroupResponse + (*anypb.Any)(nil), // 10: google.protobuf.Any + (*v1beta1.Coin)(nil), // 11: cosmos.base.v1beta1.Coin + (*Params)(nil), // 12: band.bandtss.v1beta1.Params + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp } var file_band_bandtss_v1beta1_tx_proto_depIdxs = []int32{ - 12, // 0: band.bandtss.v1beta1.MsgRequestSignature.content:type_name -> google.protobuf.Any - 13, // 1: band.bandtss.v1beta1.MsgRequestSignature.fee_limit:type_name -> cosmos.base.v1beta1.Coin - 14, // 2: band.bandtss.v1beta1.MsgUpdateParams.params:type_name -> band.bandtss.v1beta1.Params - 15, // 3: band.bandtss.v1beta1.MsgTransitionGroup.exec_time:type_name -> google.protobuf.Timestamp - 15, // 4: band.bandtss.v1beta1.MsgForceTransitionGroup.exec_time:type_name -> google.protobuf.Timestamp + 10, // 0: band.bandtss.v1beta1.MsgRequestSignature.content:type_name -> google.protobuf.Any + 11, // 1: band.bandtss.v1beta1.MsgRequestSignature.fee_limit:type_name -> cosmos.base.v1beta1.Coin + 12, // 2: band.bandtss.v1beta1.MsgUpdateParams.params:type_name -> band.bandtss.v1beta1.Params + 13, // 3: band.bandtss.v1beta1.MsgTransitionGroup.exec_time:type_name -> google.protobuf.Timestamp + 13, // 4: band.bandtss.v1beta1.MsgForceTransitionGroup.exec_time:type_name -> google.protobuf.Timestamp 0, // 5: band.bandtss.v1beta1.Msg.RequestSignature:input_type -> band.bandtss.v1beta1.MsgRequestSignature 2, // 6: band.bandtss.v1beta1.Msg.Activate:input_type -> band.bandtss.v1beta1.MsgActivate - 4, // 7: band.bandtss.v1beta1.Msg.Heartbeat:input_type -> band.bandtss.v1beta1.MsgHeartbeat - 6, // 8: band.bandtss.v1beta1.Msg.UpdateParams:input_type -> band.bandtss.v1beta1.MsgUpdateParams - 8, // 9: band.bandtss.v1beta1.Msg.TransitionGroup:input_type -> band.bandtss.v1beta1.MsgTransitionGroup - 10, // 10: band.bandtss.v1beta1.Msg.ForceTransitionGroup:input_type -> band.bandtss.v1beta1.MsgForceTransitionGroup - 1, // 11: band.bandtss.v1beta1.Msg.RequestSignature:output_type -> band.bandtss.v1beta1.MsgRequestSignatureResponse - 3, // 12: band.bandtss.v1beta1.Msg.Activate:output_type -> band.bandtss.v1beta1.MsgActivateResponse - 5, // 13: band.bandtss.v1beta1.Msg.Heartbeat:output_type -> band.bandtss.v1beta1.MsgHeartbeatResponse - 7, // 14: band.bandtss.v1beta1.Msg.UpdateParams:output_type -> band.bandtss.v1beta1.MsgUpdateParamsResponse - 9, // 15: band.bandtss.v1beta1.Msg.TransitionGroup:output_type -> band.bandtss.v1beta1.MsgTransitionGroupResponse - 11, // 16: band.bandtss.v1beta1.Msg.ForceTransitionGroup:output_type -> band.bandtss.v1beta1.MsgForceTransitionGroupResponse - 11, // [11:17] is the sub-list for method output_type - 5, // [5:11] is the sub-list for method input_type + 4, // 7: band.bandtss.v1beta1.Msg.UpdateParams:input_type -> band.bandtss.v1beta1.MsgUpdateParams + 6, // 8: band.bandtss.v1beta1.Msg.TransitionGroup:input_type -> band.bandtss.v1beta1.MsgTransitionGroup + 8, // 9: band.bandtss.v1beta1.Msg.ForceTransitionGroup:input_type -> band.bandtss.v1beta1.MsgForceTransitionGroup + 1, // 10: band.bandtss.v1beta1.Msg.RequestSignature:output_type -> band.bandtss.v1beta1.MsgRequestSignatureResponse + 3, // 11: band.bandtss.v1beta1.Msg.Activate:output_type -> band.bandtss.v1beta1.MsgActivateResponse + 5, // 12: band.bandtss.v1beta1.Msg.UpdateParams:output_type -> band.bandtss.v1beta1.MsgUpdateParamsResponse + 7, // 13: band.bandtss.v1beta1.Msg.TransitionGroup:output_type -> band.bandtss.v1beta1.MsgTransitionGroupResponse + 9, // 14: band.bandtss.v1beta1.Msg.ForceTransitionGroup:output_type -> band.bandtss.v1beta1.MsgForceTransitionGroupResponse + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name @@ -6296,30 +5375,6 @@ func file_band_bandtss_v1beta1_tx_proto_init() { } } file_band_bandtss_v1beta1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgHeartbeat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_band_bandtss_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgHeartbeatResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_band_bandtss_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { case 0: return &v.state @@ -6331,7 +5386,7 @@ func file_band_bandtss_v1beta1_tx_proto_init() { return nil } } - file_band_bandtss_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state @@ -6343,7 +5398,7 @@ func file_band_bandtss_v1beta1_tx_proto_init() { return nil } } - file_band_bandtss_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgTransitionGroup); i { case 0: return &v.state @@ -6355,7 +5410,7 @@ func file_band_bandtss_v1beta1_tx_proto_init() { return nil } } - file_band_bandtss_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgTransitionGroupResponse); i { case 0: return &v.state @@ -6367,7 +5422,7 @@ func file_band_bandtss_v1beta1_tx_proto_init() { return nil } } - file_band_bandtss_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgForceTransitionGroup); i { case 0: return &v.state @@ -6379,7 +5434,7 @@ func file_band_bandtss_v1beta1_tx_proto_init() { return nil } } - file_band_bandtss_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_band_bandtss_v1beta1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgForceTransitionGroupResponse); i { case 0: return &v.state @@ -6398,7 +5453,7 @@ func file_band_bandtss_v1beta1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_band_bandtss_v1beta1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/band/bandtss/v1beta1/tx_grpc.pb.go b/api/band/bandtss/v1beta1/tx_grpc.pb.go index e8967e235..a3bd07be2 100644 --- a/api/band/bandtss/v1beta1/tx_grpc.pb.go +++ b/api/band/bandtss/v1beta1/tx_grpc.pb.go @@ -21,7 +21,6 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_RequestSignature_FullMethodName = "/band.bandtss.v1beta1.Msg/RequestSignature" Msg_Activate_FullMethodName = "/band.bandtss.v1beta1.Msg/Activate" - Msg_Heartbeat_FullMethodName = "/band.bandtss.v1beta1.Msg/Heartbeat" Msg_UpdateParams_FullMethodName = "/band.bandtss.v1beta1.Msg/UpdateParams" Msg_TransitionGroup_FullMethodName = "/band.bandtss.v1beta1.Msg/TransitionGroup" Msg_ForceTransitionGroup_FullMethodName = "/band.bandtss.v1beta1.Msg/ForceTransitionGroup" @@ -35,8 +34,6 @@ type MsgClient interface { RequestSignature(ctx context.Context, in *MsgRequestSignature, opts ...grpc.CallOption) (*MsgRequestSignatureResponse, error) // Activate activates the status of the sender. Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) - // Heartbeat marks last active of the sender. - Heartbeat(ctx context.Context, in *MsgHeartbeat, opts ...grpc.CallOption) (*MsgHeartbeatResponse, error) // UpdateParams updates the x/bandtss parameters. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // TransitionGroup creates a request for creating a new group and replacing current group. @@ -72,15 +69,6 @@ func (c *msgClient) Activate(ctx context.Context, in *MsgActivate, opts ...grpc. return out, nil } -func (c *msgClient) Heartbeat(ctx context.Context, in *MsgHeartbeat, opts ...grpc.CallOption) (*MsgHeartbeatResponse, error) { - out := new(MsgHeartbeatResponse) - err := c.cc.Invoke(ctx, Msg_Heartbeat_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) @@ -116,8 +104,6 @@ type MsgServer interface { RequestSignature(context.Context, *MsgRequestSignature) (*MsgRequestSignatureResponse, error) // Activate activates the status of the sender. Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) - // Heartbeat marks last active of the sender. - Heartbeat(context.Context, *MsgHeartbeat) (*MsgHeartbeatResponse, error) // UpdateParams updates the x/bandtss parameters. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // TransitionGroup creates a request for creating a new group and replacing current group. @@ -138,9 +124,6 @@ func (UnimplementedMsgServer) RequestSignature(context.Context, *MsgRequestSigna func (UnimplementedMsgServer) Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") } -func (UnimplementedMsgServer) Heartbeat(context.Context, *MsgHeartbeat) (*MsgHeartbeatResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Heartbeat not implemented") -} func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } @@ -199,24 +182,6 @@ func _Msg_Activate_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Msg_Heartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgHeartbeat) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Heartbeat(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_Heartbeat_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Heartbeat(ctx, req.(*MsgHeartbeat)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -286,10 +251,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Activate", Handler: _Msg_Activate_Handler, }, - { - MethodName: "Heartbeat", - Handler: _Msg_Heartbeat_Handler, - }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, diff --git a/api/band/tss/v1beta1/originator.pulsar.go b/api/band/tss/v1beta1/originator.pulsar.go index 8a68bade6..2b25847b5 100644 --- a/api/band/tss/v1beta1/originator.pulsar.go +++ b/api/band/tss/v1beta1/originator.pulsar.go @@ -14,14 +14,16 @@ import ( ) var ( - md_DirectOriginator protoreflect.MessageDescriptor - fd_DirectOriginator_requester protoreflect.FieldDescriptor - fd_DirectOriginator_memo protoreflect.FieldDescriptor + md_DirectOriginator protoreflect.MessageDescriptor + fd_DirectOriginator_source_chain_id protoreflect.FieldDescriptor + fd_DirectOriginator_requester protoreflect.FieldDescriptor + fd_DirectOriginator_memo protoreflect.FieldDescriptor ) func init() { file_band_tss_v1beta1_originator_proto_init() md_DirectOriginator = File_band_tss_v1beta1_originator_proto.Messages().ByName("DirectOriginator") + fd_DirectOriginator_source_chain_id = md_DirectOriginator.Fields().ByName("source_chain_id") fd_DirectOriginator_requester = md_DirectOriginator.Fields().ByName("requester") fd_DirectOriginator_memo = md_DirectOriginator.Fields().ByName("memo") } @@ -91,6 +93,12 @@ func (x *fastReflection_DirectOriginator) Interface() protoreflect.ProtoMessage // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_DirectOriginator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SourceChainId != "" { + value := protoreflect.ValueOfString(x.SourceChainId) + if !f(fd_DirectOriginator_source_chain_id, value) { + return + } + } if x.Requester != "" { value := protoreflect.ValueOfString(x.Requester) if !f(fd_DirectOriginator_requester, value) { @@ -118,6 +126,8 @@ func (x *fastReflection_DirectOriginator) Range(f func(protoreflect.FieldDescrip // a repeated field is populated if it is non-empty. func (x *fastReflection_DirectOriginator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "band.tss.v1beta1.DirectOriginator.source_chain_id": + return x.SourceChainId != "" case "band.tss.v1beta1.DirectOriginator.requester": return x.Requester != "" case "band.tss.v1beta1.DirectOriginator.memo": @@ -138,6 +148,8 @@ func (x *fastReflection_DirectOriginator) Has(fd protoreflect.FieldDescriptor) b // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DirectOriginator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "band.tss.v1beta1.DirectOriginator.source_chain_id": + x.SourceChainId = "" case "band.tss.v1beta1.DirectOriginator.requester": x.Requester = "" case "band.tss.v1beta1.DirectOriginator.memo": @@ -158,6 +170,9 @@ func (x *fastReflection_DirectOriginator) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_DirectOriginator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "band.tss.v1beta1.DirectOriginator.source_chain_id": + value := x.SourceChainId + return protoreflect.ValueOfString(value) case "band.tss.v1beta1.DirectOriginator.requester": value := x.Requester return protoreflect.ValueOfString(value) @@ -184,6 +199,8 @@ func (x *fastReflection_DirectOriginator) Get(descriptor protoreflect.FieldDescr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DirectOriginator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "band.tss.v1beta1.DirectOriginator.source_chain_id": + x.SourceChainId = value.Interface().(string) case "band.tss.v1beta1.DirectOriginator.requester": x.Requester = value.Interface().(string) case "band.tss.v1beta1.DirectOriginator.memo": @@ -208,6 +225,8 @@ func (x *fastReflection_DirectOriginator) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_DirectOriginator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "band.tss.v1beta1.DirectOriginator.source_chain_id": + panic(fmt.Errorf("field source_chain_id of message band.tss.v1beta1.DirectOriginator is not mutable")) case "band.tss.v1beta1.DirectOriginator.requester": panic(fmt.Errorf("field requester of message band.tss.v1beta1.DirectOriginator is not mutable")) case "band.tss.v1beta1.DirectOriginator.memo": @@ -225,6 +244,8 @@ func (x *fastReflection_DirectOriginator) Mutable(fd protoreflect.FieldDescripto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_DirectOriginator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "band.tss.v1beta1.DirectOriginator.source_chain_id": + return protoreflect.ValueOfString("") case "band.tss.v1beta1.DirectOriginator.requester": return protoreflect.ValueOfString("") case "band.tss.v1beta1.DirectOriginator.memo": @@ -298,6 +319,10 @@ func (x *fastReflection_DirectOriginator) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.SourceChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } l = len(x.Requester) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -340,13 +365,20 @@ func (x *fastReflection_DirectOriginator) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.Memo) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Memo))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if len(x.Requester) > 0 { i -= len(x.Requester) copy(dAtA[i:], x.Requester) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Requester))) i-- + dAtA[i] = 0x12 + } + if len(x.SourceChainId) > 0 { + i -= len(x.SourceChainId) + copy(dAtA[i:], x.SourceChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChainId))) + i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -399,6 +431,38 @@ func (x *fastReflection_DirectOriginator) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChainId", 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.SourceChainId = 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 Requester", wireType) } @@ -430,7 +494,7 @@ func (x *fastReflection_DirectOriginator) ProtoMethods() *protoiface.Methods { } x.Requester = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) } @@ -499,17 +563,19 @@ func (x *fastReflection_DirectOriginator) ProtoMethods() *protoiface.Methods { var ( md_TunnelOriginator protoreflect.MessageDescriptor + fd_TunnelOriginator_source_chain_id protoreflect.FieldDescriptor fd_TunnelOriginator_tunnel_id protoreflect.FieldDescriptor fd_TunnelOriginator_contract_address protoreflect.FieldDescriptor - fd_TunnelOriginator_chain_id protoreflect.FieldDescriptor + fd_TunnelOriginator_target_chain_id protoreflect.FieldDescriptor ) func init() { file_band_tss_v1beta1_originator_proto_init() md_TunnelOriginator = File_band_tss_v1beta1_originator_proto.Messages().ByName("TunnelOriginator") + fd_TunnelOriginator_source_chain_id = md_TunnelOriginator.Fields().ByName("source_chain_id") fd_TunnelOriginator_tunnel_id = md_TunnelOriginator.Fields().ByName("tunnel_id") fd_TunnelOriginator_contract_address = md_TunnelOriginator.Fields().ByName("contract_address") - fd_TunnelOriginator_chain_id = md_TunnelOriginator.Fields().ByName("chain_id") + fd_TunnelOriginator_target_chain_id = md_TunnelOriginator.Fields().ByName("target_chain_id") } var _ protoreflect.Message = (*fastReflection_TunnelOriginator)(nil) @@ -577,6 +643,12 @@ func (x *fastReflection_TunnelOriginator) Interface() protoreflect.ProtoMessage // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_TunnelOriginator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SourceChainId != "" { + value := protoreflect.ValueOfString(x.SourceChainId) + if !f(fd_TunnelOriginator_source_chain_id, value) { + return + } + } if x.TunnelId != uint64(0) { value := protoreflect.ValueOfUint64(x.TunnelId) if !f(fd_TunnelOriginator_tunnel_id, value) { @@ -589,9 +661,9 @@ func (x *fastReflection_TunnelOriginator) Range(f func(protoreflect.FieldDescrip return } } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_TunnelOriginator_chain_id, value) { + if x.TargetChainId != "" { + value := protoreflect.ValueOfString(x.TargetChainId) + if !f(fd_TunnelOriginator_target_chain_id, value) { return } } @@ -610,12 +682,14 @@ func (x *fastReflection_TunnelOriginator) Range(f func(protoreflect.FieldDescrip // a repeated field is populated if it is non-empty. func (x *fastReflection_TunnelOriginator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "band.tss.v1beta1.TunnelOriginator.source_chain_id": + return x.SourceChainId != "" case "band.tss.v1beta1.TunnelOriginator.tunnel_id": return x.TunnelId != uint64(0) case "band.tss.v1beta1.TunnelOriginator.contract_address": return x.ContractAddress != "" - case "band.tss.v1beta1.TunnelOriginator.chain_id": - return x.ChainId != "" + case "band.tss.v1beta1.TunnelOriginator.target_chain_id": + return x.TargetChainId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tss.v1beta1.TunnelOriginator")) @@ -632,12 +706,14 @@ func (x *fastReflection_TunnelOriginator) Has(fd protoreflect.FieldDescriptor) b // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TunnelOriginator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "band.tss.v1beta1.TunnelOriginator.source_chain_id": + x.SourceChainId = "" case "band.tss.v1beta1.TunnelOriginator.tunnel_id": x.TunnelId = uint64(0) case "band.tss.v1beta1.TunnelOriginator.contract_address": x.ContractAddress = "" - case "band.tss.v1beta1.TunnelOriginator.chain_id": - x.ChainId = "" + case "band.tss.v1beta1.TunnelOriginator.target_chain_id": + x.TargetChainId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tss.v1beta1.TunnelOriginator")) @@ -654,14 +730,17 @@ func (x *fastReflection_TunnelOriginator) Clear(fd protoreflect.FieldDescriptor) // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TunnelOriginator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "band.tss.v1beta1.TunnelOriginator.source_chain_id": + value := x.SourceChainId + return protoreflect.ValueOfString(value) case "band.tss.v1beta1.TunnelOriginator.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) case "band.tss.v1beta1.TunnelOriginator.contract_address": value := x.ContractAddress return protoreflect.ValueOfString(value) - case "band.tss.v1beta1.TunnelOriginator.chain_id": - value := x.ChainId + case "band.tss.v1beta1.TunnelOriginator.target_chain_id": + value := x.TargetChainId return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { @@ -683,12 +762,14 @@ func (x *fastReflection_TunnelOriginator) Get(descriptor protoreflect.FieldDescr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TunnelOriginator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "band.tss.v1beta1.TunnelOriginator.source_chain_id": + x.SourceChainId = value.Interface().(string) case "band.tss.v1beta1.TunnelOriginator.tunnel_id": x.TunnelId = value.Uint() case "band.tss.v1beta1.TunnelOriginator.contract_address": x.ContractAddress = value.Interface().(string) - case "band.tss.v1beta1.TunnelOriginator.chain_id": - x.ChainId = value.Interface().(string) + case "band.tss.v1beta1.TunnelOriginator.target_chain_id": + x.TargetChainId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tss.v1beta1.TunnelOriginator")) @@ -709,12 +790,14 @@ func (x *fastReflection_TunnelOriginator) Set(fd protoreflect.FieldDescriptor, v // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TunnelOriginator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "band.tss.v1beta1.TunnelOriginator.source_chain_id": + panic(fmt.Errorf("field source_chain_id of message band.tss.v1beta1.TunnelOriginator is not mutable")) case "band.tss.v1beta1.TunnelOriginator.tunnel_id": panic(fmt.Errorf("field tunnel_id of message band.tss.v1beta1.TunnelOriginator is not mutable")) case "band.tss.v1beta1.TunnelOriginator.contract_address": panic(fmt.Errorf("field contract_address of message band.tss.v1beta1.TunnelOriginator is not mutable")) - case "band.tss.v1beta1.TunnelOriginator.chain_id": - panic(fmt.Errorf("field chain_id of message band.tss.v1beta1.TunnelOriginator is not mutable")) + case "band.tss.v1beta1.TunnelOriginator.target_chain_id": + panic(fmt.Errorf("field target_chain_id of message band.tss.v1beta1.TunnelOriginator is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tss.v1beta1.TunnelOriginator")) @@ -728,11 +811,13 @@ func (x *fastReflection_TunnelOriginator) Mutable(fd protoreflect.FieldDescripto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TunnelOriginator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "band.tss.v1beta1.TunnelOriginator.source_chain_id": + return protoreflect.ValueOfString("") case "band.tss.v1beta1.TunnelOriginator.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) case "band.tss.v1beta1.TunnelOriginator.contract_address": return protoreflect.ValueOfString("") - case "band.tss.v1beta1.TunnelOriginator.chain_id": + case "band.tss.v1beta1.TunnelOriginator.target_chain_id": return protoreflect.ValueOfString("") default: if fd.IsExtension() { @@ -803,6 +888,10 @@ func (x *fastReflection_TunnelOriginator) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.SourceChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.TunnelId != 0 { n += 1 + runtime.Sov(uint64(x.TunnelId)) } @@ -810,7 +899,7 @@ func (x *fastReflection_TunnelOriginator) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ChainId) + l = len(x.TargetChainId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -843,24 +932,31 @@ func (x *fastReflection_TunnelOriginator) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) + if len(x.TargetChainId) > 0 { + i -= len(x.TargetChainId) + copy(dAtA[i:], x.TargetChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TargetChainId))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(x.ContractAddress) > 0 { i -= len(x.ContractAddress) copy(dAtA[i:], x.ContractAddress) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ContractAddress))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if x.TunnelId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x10 + } + if len(x.SourceChainId) > 0 { + i -= len(x.SourceChainId) + copy(dAtA[i:], x.SourceChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChainId))) + i-- + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -912,6 +1008,38 @@ func (x *fastReflection_TunnelOriginator) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChainId", 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.SourceChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } @@ -930,7 +1058,7 @@ func (x *fastReflection_TunnelOriginator) ProtoMethods() *protoiface.Methods { break } } - case 2: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) } @@ -962,9 +1090,9 @@ func (x *fastReflection_TunnelOriginator) ProtoMethods() *protoiface.Methods { } x.ContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TargetChainId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -992,7 +1120,7 @@ func (x *fastReflection_TunnelOriginator) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ChainId = string(dAtA[iNdEx:postIndex]) + x.TargetChainId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1049,10 +1177,12 @@ type DirectOriginator struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // source_chain_id is the source chain ID that the data is originated from. + SourceChainId string `protobuf:"bytes,1,opt,name=source_chain_id,json=sourceChainId,proto3" json:"source_chain_id,omitempty"` // requester is the address of the requester, it can be the user address or module address. - Requester string `protobuf:"bytes,1,opt,name=requester,proto3" json:"requester,omitempty"` + Requester string `protobuf:"bytes,2,opt,name=requester,proto3" json:"requester,omitempty"` // memo is the note of the message. - Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` } func (x *DirectOriginator) Reset() { @@ -1075,6 +1205,13 @@ func (*DirectOriginator) Descriptor() ([]byte, []int) { return file_band_tss_v1beta1_originator_proto_rawDescGZIP(), []int{0} } +func (x *DirectOriginator) GetSourceChainId() string { + if x != nil { + return x.SourceChainId + } + return "" +} + func (x *DirectOriginator) GetRequester() string { if x != nil { return x.Requester @@ -1096,12 +1233,14 @@ type TunnelOriginator struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // source_chain_id is the source chain ID that the data is originated from. + SourceChainId string `protobuf:"bytes,1,opt,name=source_chain_id,json=sourceChainId,proto3" json:"source_chain_id,omitempty"` // tunnel_id is the tunnel ID that the request is originated from. - TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + TunnelId uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // contract_address is the target address that the data should be relayed to. - ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - // chain_id is the target chain ID that the data should be relayed to. - ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + ContractAddress string `protobuf:"bytes,3,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // target_chain_id is the target chain ID that the data should be relayed to. + TargetChainId string `protobuf:"bytes,4,opt,name=target_chain_id,json=targetChainId,proto3" json:"target_chain_id,omitempty"` } func (x *TunnelOriginator) Reset() { @@ -1124,6 +1263,13 @@ func (*TunnelOriginator) Descriptor() ([]byte, []int) { return file_band_tss_v1beta1_originator_proto_rawDescGZIP(), []int{1} } +func (x *TunnelOriginator) GetSourceChainId() string { + if x != nil { + return x.SourceChainId + } + return "" +} + func (x *TunnelOriginator) GetTunnelId() uint64 { if x != nil { return x.TunnelId @@ -1138,9 +1284,9 @@ func (x *TunnelOriginator) GetContractAddress() string { return "" } -func (x *TunnelOriginator) GetChainId() string { +func (x *TunnelOriginator) GetTargetChainId() string { if x != nil { - return x.ChainId + return x.TargetChainId } return "" } @@ -1152,34 +1298,43 @@ var file_band_tss_v1beta1_originator_proto_rawDesc = []byte{ 0x61, 0x31, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x44, 0x0a, 0x10, 0x44, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x10, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, - 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x10, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x08, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, - 0xe2, 0xde, 0x1f, 0x07, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x07, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x64, 0x42, 0xcb, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, - 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x73, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x10, 0x42, 0x61, 0x6e, 0x64, 0x2e, - 0x54, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x10, 0x42, 0x61, - 0x6e, 0x64, 0x5c, 0x54, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x1c, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, - 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x39, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xe2, 0xde, 0x1f, 0x0d, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x0d, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0xde, 0x01, 0x0a, + 0x10, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x39, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xe2, 0xde, 0x1f, 0x0d, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x0d, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x09, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x11, 0xe2, 0xde, 0x1f, + 0x0d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x0d, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x42, 0xcb, 0x01, + 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x74, 0x73, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, + 0x58, 0xaa, 0x02, 0x10, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x73, 0x73, 0x2e, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x10, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x73, 0x73, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1c, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, + 0x73, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, + 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 298ae1ebc..0a17c6b6f 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -453,7 +453,6 @@ func NewAppKeeper( appKeepers.BandtssKeeper = bandtsskeeper.NewKeeper( appCodec, appKeepers.keys[bandtsstypes.StoreKey], - appKeepers.AuthzKeeper, appKeepers.AccountKeeper, appKeepers.BankKeeper, appKeepers.DistrKeeper, diff --git a/cmd/cylinder/run.go b/cmd/cylinder/run.go index 7af3cfd6f..90750ed40 100644 --- a/cmd/cylinder/run.go +++ b/cmd/cylinder/run.go @@ -10,7 +10,6 @@ import ( "github.com/bandprotocol/chain/v3/cylinder/context" "github.com/bandprotocol/chain/v3/cylinder/workers/de" "github.com/bandprotocol/chain/v3/cylinder/workers/group" - "github.com/bandprotocol/chain/v3/cylinder/workers/heartbeat" "github.com/bandprotocol/chain/v3/cylinder/workers/sender" "github.com/bandprotocol/chain/v3/cylinder/workers/signing" ) @@ -37,11 +36,6 @@ func runCmd(ctx *context.Context) *cobra.Command { Short: "Run the cylinder process", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - heartbeat, err := heartbeat.New(ctx) - if err != nil { - return err - } - group, err := group.New(ctx) if err != nil { return err @@ -62,7 +56,7 @@ func runCmd(ctx *context.Context) *cobra.Command { return err } - workers := cylinder.Workers{heartbeat, group, de, signing, sender} + workers := cylinder.Workers{group, de, signing, sender} return cylinder.Run(ctx, workers) }, diff --git a/cylinder/workers/heartbeat/heartbeat.go b/cylinder/workers/heartbeat/heartbeat.go deleted file mode 100644 index e23e83d8b..000000000 --- a/cylinder/workers/heartbeat/heartbeat.go +++ /dev/null @@ -1,90 +0,0 @@ -package heartbeat - -import ( - "errors" - "time" - - "github.com/bandprotocol/chain/v3/cylinder" - "github.com/bandprotocol/chain/v3/cylinder/client" - "github.com/bandprotocol/chain/v3/cylinder/context" - "github.com/bandprotocol/chain/v3/pkg/logger" - bandtsstypes "github.com/bandprotocol/chain/v3/x/bandtss/types" -) - -// Heartbeat is a worker responsible for updating active status to the chain -type Heartbeat struct { - context *context.Context - logger *logger.Logger - client *client.Client -} - -var _ cylinder.Worker = &Heartbeat{} - -// New creates a new instance of the Heartbeat worker. -// It initializes the necessary components and returns the created Heartbeat instance or an error if initialization fails. -func New(ctx *context.Context) (*Heartbeat, error) { - cli, err := client.New(ctx) - if err != nil { - return nil, err - } - - return &Heartbeat{ - context: ctx, - logger: ctx.Logger.With("worker", "Heartbeat"), - client: cli, - }, nil -} - -// updateHeartbeat updates last active -func (a *Heartbeat) updateHeartbeat() { - // Query active information - res, err := a.client.QueryMember(a.context.Config.Granter) - if err != nil { - // maybe because not being a member of the current group or the group is not active - // or the queried node is down. - a.logger.Debug(":cold_sweat: Failed to query status information: %s", err) - return - } - - members := []bandtsstypes.Member{res.CurrentGroupMember, res.IncomingGroupMember} - - for _, member := range members { - if member.GroupID == 0 { - continue - } - - if !member.IsActive { - a.context.ErrCh <- errors.New("the status of the address is not active") - continue - } - - if time.Now().Before(member.LastActive.Add(a.context.Config.ActivePeriod)) { - continue - } - - // Log - a.logger.Info(":delivery_truck: Updating last active") - - // Send MsgActive - a.context.MsgCh <- bandtsstypes.NewMsgHeartbeat(a.context.Config.Granter, member.GroupID) - } -} - -// Start starts the heartbeat worker that will check latest heartbeat of validator on BandChain -// and send heartbeat msg if needed every hour. -func (a *Heartbeat) Start() { - a.logger.Info("start") - - // Update one time when starting worker first time. - a.updateHeartbeat() - - for range time.Tick(time.Hour * 1) { - a.updateHeartbeat() - } -} - -// Stop stops the Heartbeat worker. -func (a *Heartbeat) Stop() error { - a.logger.Info("stop") - return a.client.Stop() -} diff --git a/cylinder/workers/sender/msg_detail.go b/cylinder/workers/sender/msg_detail.go index bf65a8d75..5efd2eb5a 100644 --- a/cylinder/workers/sender/msg_detail.go +++ b/cylinder/workers/sender/msg_detail.go @@ -5,7 +5,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - bandtsstypes "github.com/bandprotocol/chain/v3/x/bandtss/types" "github.com/bandprotocol/chain/v3/x/tss/types" ) @@ -24,8 +23,6 @@ func GetMsgDetail(msg sdk.Msg) (detail string) { detail = fmt.Sprintf("Type: %s", sdk.MsgTypeURL(t)) case *types.MsgSubmitSignature: detail = fmt.Sprintf("Type: %s, SigningID: %d", sdk.MsgTypeURL(t), t.SigningID) - case *bandtsstypes.MsgHeartbeat: - detail = fmt.Sprintf("Type: %s", sdk.MsgTypeURL(t)) default: detail = "Type: Unknown" } diff --git a/proto/band/bandtss/v1beta1/bandtss.proto b/proto/band/bandtss/v1beta1/bandtss.proto index 57c05b6b2..3bc16000e 100644 --- a/proto/band/bandtss/v1beta1/bandtss.proto +++ b/proto/band/bandtss/v1beta1/bandtss.proto @@ -20,10 +20,8 @@ message Member { [(gogoproto.customname) = "GroupID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v3/pkg/tss.GroupID"]; // is_active is a flag to indicate whether a member is active or not. bool is_active = 3; - // since is a block timestamp when a member is deactivated + // since is a block timestamp when a member status is changed (from active to inactive or vice versa). google.protobuf.Timestamp since = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // last_active is a latest block timestamp when a member is active - google.protobuf.Timestamp last_active = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // CuurentGroup is a bandtss current group information. diff --git a/proto/band/bandtss/v1beta1/genesis.proto b/proto/band/bandtss/v1beta1/genesis.proto index 8777c3f94..6fffe2f85 100644 --- a/proto/band/bandtss/v1beta1/genesis.proto +++ b/proto/band/bandtss/v1beta1/genesis.proto @@ -23,17 +23,15 @@ message GenesisState { message Params { option (gogoproto.equal) = true; - // active_duration is the duration where a member is active without interaction. - google.protobuf.Duration active_duration = 1 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; // reward_percentage is the percentage of block rewards allocated to active TSS members. // The reward proportion is calculated after being allocated to oracle rewards. - uint64 reward_percentage = 2 [(gogoproto.customname) = "RewardPercentage"]; + uint64 reward_percentage = 1 [(gogoproto.customname) = "RewardPercentage"]; // inactive_penalty_duration is the duration where a member cannot activate back after being set to inactive. - google.protobuf.Duration inactive_penalty_duration = 3 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration inactive_penalty_duration = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; // max_transition_duration is the maximum duration where the transition process waits // since the start of the process until an incoming group replaces a current group. - google.protobuf.Duration max_transition_duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration max_transition_duration = 3 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; // fee is the tokens that will be paid per signer. - repeated cosmos.base.v1beta1.Coin fee = 5 + repeated cosmos.base.v1beta1.Coin fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/proto/band/bandtss/v1beta1/query.proto b/proto/band/bandtss/v1beta1/query.proto index 2caf7a0eb..1a46098ef 100644 --- a/proto/band/bandtss/v1beta1/query.proto +++ b/proto/band/bandtss/v1beta1/query.proto @@ -20,11 +20,6 @@ service Query { option (google.api.http).get = "/bandtss/v1beta1/counts"; } - // IsGrantee queries whether granter grants the grantee. - rpc IsGrantee(QueryIsGranteeRequest) returns (QueryIsGranteeResponse) { - option (google.api.http).get = "/bandtss/v1beta1/is_grantee/{granter}/{grantee}"; - } - // Members queries all members. rpc Members(QueryMembersRequest) returns (QueryMembersResponse) { option (google.api.http).get = "/bandtss/v1beta1/members"; @@ -70,20 +65,6 @@ message QueryCountsResponse { uint64 signing_count = 1; } -// QueryIsSignerRequest is request type for the Query/IsGrantee RPC method. -message QueryIsGranteeRequest { - // granter is a granter address - string granter = 1; - // grantee is a grantee address - string grantee = 2; -} - -// QueryIsGranteeResponse is response type for the Query/IsGrantee RPC method. -message QueryIsGranteeResponse { - // is_grantee is true if this account has been granted by granter - bool is_grantee = 1; -} - // QueryMembersRequest is the request type for the Query/Members RPC method. message QueryMembersRequest { // status define type of filter on member's status. diff --git a/proto/band/bandtss/v1beta1/tx.proto b/proto/band/bandtss/v1beta1/tx.proto index c098e121d..b5a8fde5c 100644 --- a/proto/band/bandtss/v1beta1/tx.proto +++ b/proto/band/bandtss/v1beta1/tx.proto @@ -22,9 +22,6 @@ service Msg { // Activate activates the status of the sender. rpc Activate(MsgActivate) returns (MsgActivateResponse); - // Heartbeat marks last active of the sender. - rpc Heartbeat(MsgHeartbeat) returns (MsgHeartbeatResponse); - // UpdateParams updates the x/bandtss parameters. rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); @@ -71,21 +68,6 @@ message MsgActivate { // MsgActivateResponse is response data for MsgActivate message message MsgActivateResponse {} -// MsgHeartbeat is a message used to show if the address is still active. -message MsgHeartbeat { - option (cosmos.msg.v1.signer) = "sender"; - option (amino.name) = "bandtss/MsgHeartbeat"; - - // address is the signer of this message, who must be a member of the group. - string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // group_id is the group id of the member. - uint64 group_id = 2 - [(gogoproto.customname) = "GroupID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v3/pkg/tss.GroupID"]; -} - -// MsgHeartbeatResponse is response data for MsgHeartbeat message -message MsgHeartbeatResponse {} - // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; diff --git a/proto/band/tss/v1beta1/originator.proto b/proto/band/tss/v1beta1/originator.proto index f4ab58e58..507280413 100644 --- a/proto/band/tss/v1beta1/originator.proto +++ b/proto/band/tss/v1beta1/originator.proto @@ -8,19 +8,24 @@ option go_package = "github.com/bandprotocol/chain/v3/x/tss/types"; // DirectOriginator is a message originator defines an information of the requester // on direct TSS request. message DirectOriginator { + // source_chain_id is the source chain ID that the data is originated from. + string source_chain_id = 1 [(gogoproto.customname) = "SourceChainID"]; // requester is the address of the requester, it can be the user address or module address. - string requester = 1; + string requester = 2; // memo is the note of the message. - string memo = 2; + string memo = 3; + } // TunnelOriginator is a message originator defines an information of the requester // on TSS request via tunnel module. message TunnelOriginator { + // source_chain_id is the source chain ID that the data is originated from. + string source_chain_id = 1 [(gogoproto.customname) = "SourceChainID"]; // tunnel_id is the tunnel ID that the request is originated from. - uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + uint64 tunnel_id = 2 [(gogoproto.customname) = "TunnelID"]; // contract_address is the target address that the data should be relayed to. - string contract_address = 2; - // chain_id is the target chain ID that the data should be relayed to. - string chain_id = 3 [(gogoproto.customname) = "ChainID"]; + string contract_address = 3; + // target_chain_id is the target chain ID that the data should be relayed to. + string target_chain_id = 4 [(gogoproto.customname) = "TargetChainID"]; } diff --git a/scripts/bandtss/proposal_transition_group.json b/scripts/bandtss/proposal_transition_group.json index eb668cd86..bf510b1a3 100755 --- a/scripts/bandtss/proposal_transition_group.json +++ b/scripts/bandtss/proposal_transition_group.json @@ -8,7 +8,7 @@ "band1nx0xkpnytk35wvflsg7gszf9smw3vaeauk248q" ], "threshold": "2", - "exec_time": "2024-10-31T16:40:00+00:00", + "exec_time": "2024-11-06T16:40:00+00:00", "authority": "band10d07y265gmmuvt4z0w9aw880jnsr700jrdn8wm" } ], diff --git a/scripts/bandtss/proposal_update_params.json b/scripts/bandtss/proposal_update_params.json index 192215c99..c01327e67 100644 --- a/scripts/bandtss/proposal_update_params.json +++ b/scripts/bandtss/proposal_update_params.json @@ -3,7 +3,6 @@ { "@type": "/band.bandtss.v1beta1.MsgUpdateParams", "params": { - "active_duration": "86400s", "reward_percentage": "50", "inactive_penalty_duration": "600s", "jail_penalty_duration": "2592000s", diff --git a/scripts/bandtss/start_cylinder.sh b/scripts/bandtss/start_cylinder.sh index 1978005dc..7204a95c5 100755 --- a/scripts/bandtss/start_cylinder.sh +++ b/scripts/bandtss/start_cylinder.sh @@ -64,10 +64,5 @@ bandd tx tss add-grantees $(cylinder keys list -a --home $HOME_PATH) --gas-price sleep 6 -bandd tx bandtss add-grantees $(cylinder keys list -a --home $HOME_PATH) --gas-prices 0.0025uband --keyring-backend test --chain-id bandchain --gas 350000 --from $KEY -b sync -y - -# wait for adding gratees transaction success -sleep 6 - # run cylinder cylinder run --home $HOME_PATH diff --git a/x/bandtss/README.md b/x/bandtss/README.md index dbf5a7ec1..fd7c950fd 100644 --- a/x/bandtss/README.md +++ b/x/bandtss/README.md @@ -31,7 +31,6 @@ The module is configured to charge a fee for each signing request, a cost that i - [Msg/ForceTransitionGroup](#msgforcetransitiongroup) - [Msg/RequestSignature](#msgrequestsignature) - [Msg/Activate](#msgactivate) - - [Msg/Heartbeat](#msgheartbeat) - [Msg/UpdateParams](#msgupdateparams) - [Events](#events) - [EventTypeSigningRequestCreated](#eventtypesigningrequestcreated) @@ -39,7 +38,6 @@ The module is configured to charge a fee for each signing request, a cost that i - [EventTypeGroupTransitionFailed](#eventtypegrouptransitionfailed) - [EventTypeGroupTransitionSuccess](#eventtypegrouptransitionsuccess) - [EventTypeActivate](#eventtypeactivate) - - [EventTypeHeartbeat](#eventtypeheartbeat) - [EventTypeInactiveStatus](#eventtypeinactivestatus) - [Parameters](#parameters) - [Client](#client) @@ -67,7 +65,6 @@ type Member struct { GroupID github_com_bandprotocol_chain_v2_pkg_tss.GroupID IsActive bool Since time.Time - LastActive time.Time } ``` @@ -250,25 +247,6 @@ message MsgActivate { } ``` -### Msg/Heartbeat - -This message is used by members in the bandtss system. All active members have to regularly send `MsgHeartbeat` to the chain to show if they are still active. - -The frequency of sending is determined by `ActiveDuration` parameters. - -```protobuf -message MsgHeartbeat { - option (cosmos.msg.v1.signer) = "sender"; - option (amino.name) = "bandtss/MsgHeartbeat"; - - // address is the signer of this message, who must be a member of the group. - string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // group_id is the group id of the member. - uint64 group_id = 2 - [(gogoproto.customname) = "GroupID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v3/pkg/tss.GroupID"]; -} -``` - ### Msg/UpdateParams When anyone wants to update the parameters of the bandtss module, they will have to open a governance proposal by using the `MsgUpdateParams` of the bandtss module to update those parameters. @@ -332,15 +310,6 @@ This event ( `activate` ) is emitted when an account submitted `MsgActivate` to | address | {memberAddress} | | group_id | {groupID} | -### EventTypeHeartbeat - -This event ( `heartbeat` ) is emitted when an account submitted `MsgHeartbeat` to the chain - -| Attribute Key | Attribute Value | -| ------------- | --------------- | -| address | {memberAddress} | -| group_id | {groupID} | - ### EventTypeInactiveStatus This event ( `inactive_status` ) is emitted when an account is deactivated @@ -356,18 +325,16 @@ The module contains the following parameters ```protobuf message Params { - // active_duration is the duration where a member is active without interaction. - google.protobuf.Duration active_duration = 1 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; // reward_percentage is the percentage of block rewards allocated to active TSS members. // The reward proportion is calculated after being allocated to oracle rewards. - uint64 reward_percentage = 2 [(gogoproto.customname) = "RewardPercentage"]; + uint64 reward_percentage = 1 [(gogoproto.customname) = "RewardPercentage"]; // inactive_penalty_duration is the duration where a member cannot activate back after being set to inactive. - google.protobuf.Duration inactive_penalty_duration = 3 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration inactive_penalty_duration = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; // max_transition_duration is the maximum duration where the transition process waits // since the start of the process until an incoming group replaces a current group. - google.protobuf.Duration max_transition_duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration max_transition_duration = 3 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; // fee is the tokens that will be paid per signer. - repeated cosmos.base.v1beta1.Coin fee = 5 + repeated cosmos.base.v1beta1.Coin fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } ``` diff --git a/x/bandtss/abci.go b/x/bandtss/abci.go index 2d0f3aa2d..a6654274a 100644 --- a/x/bandtss/abci.go +++ b/x/bandtss/abci.go @@ -21,8 +21,5 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) error { k.ExecuteGroupTransition(ctx, transition) } - // Handles marking members as inactive if the member is not active recently. - k.DeactivateInactiveMembers(ctx) - return nil } diff --git a/x/bandtss/autocli.go b/x/bandtss/autocli.go index 58aa4279b..55a395fa0 100644 --- a/x/bandtss/autocli.go +++ b/x/bandtss/autocli.go @@ -17,15 +17,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Use: "counts", Short: "Get current number of signing requests to bandtss module on BandChain", }, - { - RpcMethod: "IsGrantee", - Use: "is-grantee [granter_address] [grantee_address]", - Short: "Query grantee status", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - {ProtoField: "granter"}, - {ProtoField: "grantee"}, - }, - }, { RpcMethod: "Members", Use: "members", diff --git a/x/bandtss/client/cli/tx.go b/x/bandtss/client/cli/tx.go index 996b8c7ab..ca0d09362 100644 --- a/x/bandtss/client/cli/tx.go +++ b/x/bandtss/client/cli/tx.go @@ -4,8 +4,6 @@ import ( "context" "encoding/hex" "fmt" - "strings" - "time" "github.com/spf13/cobra" @@ -15,7 +13,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/bandprotocol/chain/v3/pkg/grant" "github.com/bandprotocol/chain/v3/pkg/tss" "github.com/bandprotocol/chain/v3/x/bandtss/types" tsstypes "github.com/bandprotocol/chain/v3/x/tss/types" @@ -55,9 +52,6 @@ func GetTxCmd(requestSignatureCmds []*cobra.Command) *cobra.Command { txCmd.AddCommand( GetTxCmdActivate(), - GetTxCmdHeartbeat(), - GetTxCmdAddGrantees(), - GetTxCmdRemoveGrantees(), cmdRequestSignature, ) @@ -165,92 +159,6 @@ func GetTxCmdActivate() *cobra.Command { return cmd } -// GetTxCmdHeartbeat creates a CLI command for keep sender's status to be active. -func GetTxCmdHeartbeat() *cobra.Command { - cmd := &cobra.Command{ - Use: "heartbeat", - Args: cobra.NoArgs, - Short: "update the active status of the address to ensure that the member in the group is active", - Example: fmt.Sprintf(`%s tx bandtss heartbeat`, version.AppName), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - isIncomingGroup, err := cmd.Flags().GetBool(flagIncomingGroup) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - groupID, err := getGroupID(queryClient, isIncomingGroup) - if err != nil { - return err - } - - msg := &types.MsgHeartbeat{ - Sender: clientCtx.GetFromAddress().String(), - GroupID: groupID, - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - cmd.Flags(). - Bool(flagIncomingGroup, false, "Whether the heartbeat is for the incoming group or current group.") - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -// GetTxCmdAddGrantees creates a CLI command for add new grantees -func GetTxCmdAddGrantees() *cobra.Command { - cmd := &cobra.Command{ - Use: "add-grantees [grantee1] [grantee2] ...", - Short: "Add agents authorized to submit bandtss transactions.", - Args: cobra.MinimumNArgs(1), - Long: strings.TrimSpace( - fmt.Sprintf(`Add agents authorized to submit bandtss transactions. -Example: -$ %s tx bandtss add-grantees band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs --from mykey -`, - version.AppName, - ), - ), - RunE: grant.AddGranteeCmd(types.GetGrantMsgTypes(), flagExpiration), - } - - cmd.Flags(). - Int64(flagExpiration, time.Now().AddDate(2500, 0, 0).Unix(), "The Unix timestamp. Default is 2500 years(forever).") - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -// GetTxCmdRemoveGrantees creates a CLI command for remove grantees from granter -func GetTxCmdRemoveGrantees() *cobra.Command { - cmd := &cobra.Command{ - Use: "remove-grantees [grantee1] [grantee2] ...", - Short: "Remove agents from the list of authorized grantees.", - Args: cobra.MinimumNArgs(1), - Long: strings.TrimSpace( - fmt.Sprintf(`Remove agents from the list of authorized grantees. -Example: -$ %s tx bandtss remove-grantees band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs --from mykey -`, - version.AppName, - ), - ), - RunE: grant.RemoveGranteeCmd(types.GetGrantMsgTypes()), - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - func getGroupID(queryClient types.QueryClient, isIncomingGroup bool) (tss.GroupID, error) { if isIncomingGroup { resp, err := queryClient.IncomingGroup( diff --git a/x/bandtss/keeper/genesis_test.go b/x/bandtss/keeper/genesis_test.go index 042357e90..1923f49ac 100644 --- a/x/bandtss/keeper/genesis_test.go +++ b/x/bandtss/keeper/genesis_test.go @@ -29,10 +29,9 @@ func (s *KeeperTestSuite) TestExportGenesis() { Params: types.DefaultParams(), Members: []types.Member{ { - Address: bandtesting.Alice.Address.String(), - Since: ctx.BlockTime(), - IsActive: true, - LastActive: ctx.BlockTime(), + Address: bandtesting.Alice.Address.String(), + IsActive: true, + Since: ctx.BlockTime(), }, }, CurrentGroup: types.NewCurrentGroup(1, ctx.BlockTime()), @@ -67,10 +66,9 @@ func (s *KeeperTestSuite) TestImportGenesisInvalidActiveTime() { Params: types.DefaultParams(), Members: []types.Member{ { - Address: bandtesting.Alice.Address.String(), - Since: ctx.BlockTime(), - IsActive: true, - LastActive: ctx.BlockTime(), + Address: bandtesting.Alice.Address.String(), + IsActive: true, + Since: ctx.BlockTime(), }, }, CurrentGroup: types.NewCurrentGroup(1, ctx.BlockTime().Add(time.Hour)), @@ -98,10 +96,9 @@ func (s *KeeperTestSuite) TestImportGenesisInvalidCurrentGroupInfo() { Params: types.DefaultParams(), Members: []types.Member{ { - Address: bandtesting.Alice.Address.String(), - Since: ctx.BlockTime(), - IsActive: true, - LastActive: ctx.BlockTime(), + Address: bandtesting.Alice.Address.String(), + IsActive: true, + Since: ctx.BlockTime(), }, }, CurrentGroup: types.NewCurrentGroup(0, ctx.BlockTime().Add(-1*time.Hour)), diff --git a/x/bandtss/keeper/grpc_query.go b/x/bandtss/keeper/grpc_query.go index f5bd29d1a..4acba7dc4 100644 --- a/x/bandtss/keeper/grpc_query.go +++ b/x/bandtss/keeper/grpc_query.go @@ -33,28 +33,6 @@ func (q queryServer) Counts(c context.Context, req *types.QueryCountsRequest) (* }, nil } -// IsGrantee queries if a specific address is a grantee of another. -func (q queryServer) IsGrantee( - goCtx context.Context, - req *types.QueryIsGranteeRequest, -) (*types.QueryIsGranteeResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - granter, err := sdk.AccAddressFromBech32(req.Granter) - if err != nil { - return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid granter address: %s", err) - } - - grantee, err := sdk.AccAddressFromBech32(req.Grantee) - if err != nil { - return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid grantee address: %s", err) - } - - return &types.QueryIsGranteeResponse{ - IsGrantee: q.k.CheckIsGrantee(ctx, granter, grantee), - }, nil -} - // Member queries the member information of a given account address. func (q queryServer) Member( goCtx context.Context, diff --git a/x/bandtss/keeper/grpc_query_test.go b/x/bandtss/keeper/grpc_query_test.go index aaa542d5b..34eee3952 100644 --- a/x/bandtss/keeper/grpc_query_test.go +++ b/x/bandtss/keeper/grpc_query_test.go @@ -15,30 +15,26 @@ func (s *KeeperTestSuite) TestGRPCQueryMembers() { members []*types.Member } - since := time.Now().UTC() - lastActive := time.Now().UTC() + now := time.Now().UTC() members := []*types.Member{ { - Address: "band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun", - GroupID: tss.GroupID(1), - IsActive: false, - Since: since, - LastActive: lastActive, + Address: "band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun", + GroupID: tss.GroupID(1), + IsActive: false, + Since: now, }, { - Address: "band1t5x8hrmht463eq4m0xhfgz95h62dyvkq049eek", - GroupID: tss.GroupID(1), - IsActive: true, - Since: since, - LastActive: lastActive, + Address: "band1t5x8hrmht463eq4m0xhfgz95h62dyvkq049eek", + GroupID: tss.GroupID(1), + IsActive: true, + Since: now, }, { - Address: "band1a22hgwm4tz8gj82y6zad3de2dcg5dpymtj20m5", - GroupID: tss.GroupID(1), - IsActive: true, - Since: since, - LastActive: lastActive, + Address: "band1a22hgwm4tz8gj82y6zad3de2dcg5dpymtj20m5", + GroupID: tss.GroupID(1), + IsActive: true, + Since: now, }, } diff --git a/x/bandtss/keeper/keeper.go b/x/bandtss/keeper/keeper.go index 07f8e22eb..a4f3cd44d 100644 --- a/x/bandtss/keeper/keeper.go +++ b/x/bandtss/keeper/keeper.go @@ -16,7 +16,6 @@ type Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey - authzKeeper types.AuthzKeeper authKeeper types.AccountKeeper bankKeeper types.BankKeeper distrKeeper types.DistrKeeper @@ -30,7 +29,6 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, - authzKeeper types.AuthzKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper, @@ -51,7 +49,6 @@ func NewKeeper( return Keeper{ cdc: cdc, storeKey: storeKey, - authzKeeper: authzKeeper, authKeeper: authKeeper, bankKeeper: bankKeeper, distrKeeper: distrKeeper, @@ -98,15 +95,3 @@ func (k Keeper) GetCurrentGroup(ctx sdk.Context) types.CurrentGroup { k.cdc.MustUnmarshal(bz, ¤tGroup) return currentGroup } - -// CheckIsGrantee checks if the granter granted permissions to the grantee. -func (k Keeper) CheckIsGrantee(ctx sdk.Context, granter sdk.AccAddress, grantee sdk.AccAddress) bool { - for _, msg := range types.GetGrantMsgTypes() { - cap, _ := k.authzKeeper.GetAuthorization(ctx, grantee, granter, msg) - if cap == nil { - return false - } - } - - return true -} diff --git a/x/bandtss/keeper/keeper_member.go b/x/bandtss/keeper/keeper_member.go index 1e2a02fd4..80f5dafe1 100644 --- a/x/bandtss/keeper/keeper_member.go +++ b/x/bandtss/keeper/keeper_member.go @@ -13,22 +13,6 @@ import ( "github.com/bandprotocol/chain/v3/x/bandtss/types" ) -// DeactivateInactiveMembers handle inactive members, who haven't activated for a while. -func (k Keeper) DeactivateInactiveMembers(ctx sdk.Context) { - members := k.GetMembers(ctx) - - for _, member := range members { - if member.IsActive && ctx.BlockTime().After(member.LastActive.Add(k.GetParams(ctx).ActiveDuration)) { - addr := sdk.MustAccAddressFromBech32(member.Address) - - // this shouldn't return any error. - if err := k.DeactivateMember(ctx, addr, member.GroupID); err != nil { - panic(err) - } - } - } -} - // DeactivateMember flags is_active to false. This function will return error if the given address // isn't the member of the given group. func (k Keeper) DeactivateMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) error { @@ -75,7 +59,7 @@ func (k Keeper) ActivateMember(ctx sdk.Context, address sdk.AccAddress, groupID } member.IsActive = true - member.LastActive = ctx.BlockTime() + member.Since = ctx.BlockTime() k.SetMember(ctx, member) if err := k.tssKeeper.ActivateMember(ctx, groupID, address); err != nil { @@ -91,23 +75,6 @@ func (k Keeper) ActivateMember(ctx sdk.Context, address sdk.AccAddress, groupID return nil } -// SetLastActive sets last active of the member. -func (k Keeper) SetLastActive(ctx sdk.Context, address sdk.AccAddress, groupID tss.GroupID) error { - member, err := k.GetMember(ctx, address, groupID) - if err != nil { - return err - } - - if !member.IsActive { - return types.ErrInvalidStatus - } - - member.LastActive = ctx.BlockTime() - k.SetMember(ctx, member) - - return nil -} - // DeleteMembers removes all members of the group. func (k Keeper) DeleteMembers(ctx sdk.Context, groupID tss.GroupID) { members := k.tssKeeper.MustGetMembers(ctx, groupID) @@ -135,7 +102,7 @@ func (k Keeper) AddMember(ctx sdk.Context, address sdk.AccAddress, groupID tss.G return types.ErrMemberAlreadyExists.Wrapf("address : %v", address) } - member := types.NewMember(address, groupID, true, ctx.BlockTime(), ctx.BlockTime()) + member := types.NewMember(address, groupID, true, ctx.BlockTime()) k.SetMember(ctx, member) return nil diff --git a/x/bandtss/keeper/keeper_member_test.go b/x/bandtss/keeper/keeper_member_test.go index ae4ba5f9c..bc3b921bf 100644 --- a/x/bandtss/keeper/keeper_member_test.go +++ b/x/bandtss/keeper/keeper_member_test.go @@ -1,10 +1,7 @@ package keeper_test import ( - "time" - "github.com/bandprotocol/chain/v3/x/bandtss/types" - tsstypes "github.com/bandprotocol/chain/v3/x/tss/types" ) func (s *AppTestSuite) TestSetInactive() { @@ -32,7 +29,7 @@ func (s *AppTestSuite) TestActivateMember() { // Success case err := k.DeactivateMember(ctx, address, groupCtx.GroupID) s.Require().NoError(err) - ctx = ctx.WithBlockTime(ctx.BlockTime().Add(k.GetParams(ctx).ActiveDuration)) + ctx = ctx.WithBlockTime(ctx.BlockTime().Add(k.GetParams(ctx).InactivePenaltyDuration)) err = k.ActivateMember(ctx, address, groupCtx.GroupID) s.Require().NoError(err) @@ -56,50 +53,3 @@ func (s *AppTestSuite) TestActivateMember() { err = k.ActivateMember(ctx, address, groupCtx.GroupID) s.Require().Error(err) } - -func (s *AppTestSuite) TestSetLastActive() { - ctx, k := s.ctx, s.app.BandtssKeeper - groupCtx := s.SetupNewGroup(5, 3) - address := groupCtx.Accounts[0].Address - - // Success case - err := k.SetLastActive(ctx, address, groupCtx.GroupID) - s.Require().NoError(err) - - member, err := k.GetMember(ctx, address, groupCtx.GroupID) - s.Require().NoError(err) - s.Require().Equal(ctx.BlockTime(), member.LastActive) - - // Failed case - err = k.DeactivateMember(ctx, address, groupCtx.GroupID) - s.Require().NoError(err) - - err = k.SetLastActive(ctx, address, groupCtx.GroupID) - s.Require().Error(err) -} - -func (s *AppTestSuite) TestHandleInactiveMembers() { - ctx, k := s.ctx, s.app.BandtssKeeper - groupCtx := s.SetupNewGroup(3, 2) - address := groupCtx.Accounts[0].Address - - m, err := k.GetMember(ctx, address, groupCtx.GroupID) - s.Require().NoError(err) - s.Require().True(m.IsActive) - - m.LastActive = time.Time{} - k.SetMember(ctx, m) - s.app.TSSKeeper.SetMember(ctx, tsstypes.Member{ - ID: 1, - GroupID: 1, - Address: address.String(), - IsActive: true, - }) - ctx = ctx.WithBlockTime(time.Now()) - - k.DeactivateInactiveMembers(ctx) - - member, err := k.GetMember(ctx, address, groupCtx.GroupID) - s.Require().NoError(err) - s.Require().False(member.IsActive) -} diff --git a/x/bandtss/keeper/keeper_signing.go b/x/bandtss/keeper/keeper_signing.go index f89e2c5a3..1aec89db1 100644 --- a/x/bandtss/keeper/keeper_signing.go +++ b/x/bandtss/keeper/keeper_signing.go @@ -21,10 +21,7 @@ func (k Keeper) CreateDirectSigningRequest( sender sdk.AccAddress, feeLimit sdk.Coins, ) (types.SigningID, error) { - originator := tsstypes.DirectOriginator{ - Requester: sender.String(), - Memo: memo, - } + originator := tsstypes.NewDirectOriginator(ctx.ChainID(), sender.String(), memo) return k.createSigningRequest(ctx, &originator, content, sender, feeLimit) } @@ -37,11 +34,12 @@ func (k Keeper) CreateTunnelSigningRequest( sender sdk.AccAddress, feeLimit sdk.Coins, ) (types.SigningID, error) { - originator := tsstypes.TunnelOriginator{ - TunnelID: tunnelID, - ContractAddress: destinationContractAddr, - ChainID: destinationChainID, - } + originator := tsstypes.NewTunnelOriginator( + ctx.ChainID(), + tunnelID, + destinationContractAddr, + destinationChainID, + ) return k.createSigningRequest(ctx, &originator, content, sender, feeLimit) } diff --git a/x/bandtss/keeper/keeper_test.go b/x/bandtss/keeper/keeper_test.go index 17b057342..39e2eaee2 100644 --- a/x/bandtss/keeper/keeper_test.go +++ b/x/bandtss/keeper/keeper_test.go @@ -19,7 +19,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/authz" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" band "github.com/bandprotocol/chain/v3/app" @@ -211,7 +210,6 @@ func (s *AppTestSuite) TestParams() { { name: "set invalid params", input: types.Params{ - ActiveDuration: time.Duration(0), InactivePenaltyDuration: time.Duration(0), RewardPercentage: 0, Fee: sdk.NewCoins(), @@ -222,7 +220,6 @@ func (s *AppTestSuite) TestParams() { { name: "set full valid params", input: types.Params{ - ActiveDuration: types.DefaultActiveDuration, RewardPercentage: types.DefaultRewardPercentage, InactivePenaltyDuration: types.DefaultInactivePenaltyDuration, MaxTransitionDuration: types.DefaultMaxTransitionDuration, @@ -250,26 +247,6 @@ func (s *AppTestSuite) TestParams() { } } -func (s *AppTestSuite) TestIsGrantee() { - ctx, k := s.ctx, s.app.BandtssKeeper - expTime := s.ctx.BlockTime().Add(time.Hour) - - // Init grantee address - grantee, _ := sdk.AccAddressFromBech32("band1m5lq9u533qaya4q3nfyl6ulzqkpkhge9q8tpzs") - - // Init granter address - granter, _ := sdk.AccAddressFromBech32("band1p40yh3zkmhcv0ecqp3mcazy83sa57rgjp07dun") - - // Save grant msgs to grantee - for _, m := range types.GetGrantMsgTypes() { - err := s.app.AuthzKeeper.SaveGrant(ctx, grantee, granter, authz.NewGenericAuthorization(m), &expTime) - s.Require().NoError(err) - } - - isGrantee := k.CheckIsGrantee(ctx, granter, grantee) - s.Require().True(isGrantee) -} - func TestAppTestSuite(t *testing.T) { suite.Run(t, new(AppTestSuite)) } @@ -306,7 +283,6 @@ func (s *KeeperTestSuite) SetupTest() { encCfg := moduletestutil.MakeTestEncodingConfig(bandtss.AppModuleBasic{}) s.ctx = testCtx.Ctx.WithBlockHeader(cmtproto.Header{Time: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)}) - authzKeeper := bandtsstestutil.NewMockAuthzKeeper(ctrl) s.accountKeeper = bandtsstestutil.NewMockAccountKeeper(ctrl) s.bankKeeper = bandtsstestutil.NewMockBankKeeper(ctrl) s.distrKeeper = bandtsstestutil.NewMockDistrKeeper(ctrl) @@ -318,7 +294,6 @@ func (s *KeeperTestSuite) SetupTest() { s.keeper = keeper.NewKeeper( encCfg.Codec.(codec.BinaryCodec), s.key, - authzKeeper, s.accountKeeper, s.bankKeeper, s.distrKeeper, diff --git a/x/bandtss/keeper/msg_server.go b/x/bandtss/keeper/msg_server.go index 7d069bc1f..bdf02d8b1 100644 --- a/x/bandtss/keeper/msg_server.go +++ b/x/bandtss/keeper/msg_server.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "fmt" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -174,31 +173,6 @@ func (k msgServer) Activate(goCtx context.Context, msg *types.MsgActivate) (*typ return &types.MsgActivateResponse{}, nil } -// Heartbeat keeps notice that user is alive. -func (k msgServer) Heartbeat( - goCtx context.Context, - msg *types.MsgHeartbeat, -) (*types.MsgHeartbeatResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - sender, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { - return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) - } - - if err = k.SetLastActive(ctx, sender, msg.GroupID); err != nil { - return nil, err - } - - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeHeartbeat, - sdk.NewAttribute(types.AttributeKeyAddress, msg.Sender), - sdk.NewAttribute(types.AttributeKeyGroupID, fmt.Sprintf("%d", msg.GroupID)), - )) - - return &types.MsgHeartbeatResponse{}, nil -} - // UpdateParams update the parameter of the module. func (k Keeper) UpdateParams( goCtx context.Context, diff --git a/x/bandtss/keeper/msg_server_test.go b/x/bandtss/keeper/msg_server_test.go index 359478a40..ed406e0c3 100644 --- a/x/bandtss/keeper/msg_server_test.go +++ b/x/bandtss/keeper/msg_server_test.go @@ -574,8 +574,8 @@ func (s *AppTestSuite) TestActivateReq() { } // skip time frame. - activeDuration := s.app.BandtssKeeper.GetParams(ctx).ActiveDuration - ctx = ctx.WithBlockTime(ctx.BlockTime().Add(activeDuration)) + inactivePenaltyDuration := s.app.BandtssKeeper.GetParams(ctx).InactivePenaltyDuration + ctx = ctx.WithBlockTime(ctx.BlockTime().Add(inactivePenaltyDuration)) for _, acc := range groupCtx.Accounts { _, err := msgSrvr.Activate(ctx, &types.MsgActivate{ @@ -614,8 +614,8 @@ func (s *AppTestSuite) TestFailActivateIncorrectGroupID() { } // skip time frame. - activeDuration := s.app.BandtssKeeper.GetParams(ctx).ActiveDuration - ctx = ctx.WithBlockTime(ctx.BlockTime().Add(activeDuration)) + inactivePenaltyDuration := s.app.BandtssKeeper.GetParams(ctx).InactivePenaltyDuration + ctx = ctx.WithBlockTime(ctx.BlockTime().Add(inactivePenaltyDuration)) for _, acc := range groupCtx.Accounts { _, err := msgSrvr.Activate(ctx, &types.MsgActivate{ @@ -639,45 +639,6 @@ func (s *AppTestSuite) TestFailActivateMemberIsActive() { } } -func (s *AppTestSuite) TestFailHeartbeatInactive() { - ctx, msgSrvr := s.ctx, s.msgSrvr - groupCtx := s.SetupNewGroup(5, 3) - - for _, acc := range groupCtx.Accounts { - err := s.app.BandtssKeeper.DeactivateMember(ctx, acc.Address, groupCtx.GroupID) - s.Require().NoError(err) - } - - ctx = ctx.WithBlockTime(ctx.BlockTime().Add(10 * time.Minute)) - - for _, acc := range groupCtx.Accounts { - _, err := msgSrvr.Heartbeat(ctx, &types.MsgHeartbeat{ - Sender: acc.Address.String(), - GroupID: groupCtx.GroupID, - }) - s.Require().ErrorIs(err, types.ErrInvalidStatus) - } -} - -func (s *AppTestSuite) TestHeartbeatReq() { - ctx, msgSrvr := s.ctx, s.msgSrvr - groupCtx := s.SetupNewGroup(5, 3) - - ctx = ctx.WithBlockTime(ctx.BlockTime().Add(10 * time.Minute)) - - for _, acc := range groupCtx.Accounts { - _, err := msgSrvr.Heartbeat(ctx, &types.MsgHeartbeat{ - Sender: acc.Address.String(), - GroupID: groupCtx.GroupID, - }) - s.Require().NoError(err) - - m, err := s.app.BandtssKeeper.GetMember(ctx, acc.Address, groupCtx.GroupID) - s.Require().NoError(err) - s.Require().Equal(m.LastActive, ctx.BlockTime()) - } -} - func (s *AppTestSuite) TestUpdateParams() { k, msgSrvr := s.app.TSSKeeper, s.msgSrvr @@ -700,7 +661,6 @@ func (s *AppTestSuite) TestUpdateParams() { request: &types.MsgUpdateParams{ Authority: k.GetAuthority(), Params: types.Params{ - ActiveDuration: types.DefaultActiveDuration, RewardPercentage: types.DefaultRewardPercentage, InactivePenaltyDuration: types.DefaultInactivePenaltyDuration, MaxTransitionDuration: types.DefaultMaxTransitionDuration, diff --git a/x/bandtss/keeper/tss_callback_test.go b/x/bandtss/keeper/tss_callback_test.go index 2ccaae035..300e2b257 100644 --- a/x/bandtss/keeper/tss_callback_test.go +++ b/x/bandtss/keeper/tss_callback_test.go @@ -194,11 +194,10 @@ func (s *KeeperTestSuite) TestCallbackOnSignTimeout() { s.keeper.SetCurrentGroup(s.ctx, types.NewCurrentGroup(1, s.ctx.BlockTime())) s.keeper.SetSigningIDMapping(s.ctx, 1, 1) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(1), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(1), + IsActive: true, + Since: s.ctx.BlockTime(), }) s.keeper.SetSigning(s.ctx, types.Signing{ @@ -243,18 +242,16 @@ func (s *KeeperTestSuite) TestCallbackOnSignTimeout() { s.keeper.SetSigningIDMapping(s.ctx, 1, 1) s.keeper.SetSigningIDMapping(s.ctx, 2, 1) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(2), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(2), + IsActive: true, + Since: s.ctx.BlockTime(), }) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(1), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(1), + IsActive: true, + Since: s.ctx.BlockTime(), }) s.keeper.SetGroupTransition(s.ctx, types.GroupTransition{ SigningID: tss.SigningID(3), @@ -316,18 +313,16 @@ func (s *KeeperTestSuite) TestCallbackOnSignTimeout() { Status: types.TRANSITION_STATUS_WAITING_SIGN, }) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(2), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(2), + IsActive: true, + Since: s.ctx.BlockTime(), }) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(1), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(1), + IsActive: true, + Since: s.ctx.BlockTime(), }) }, postCheck: func(s *KeeperTestSuite) { @@ -366,18 +361,16 @@ func (s *KeeperTestSuite) TestCallbackOnSignTimeout() { IncomingGroupSigningID: 2, }) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(2), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(2), + IsActive: true, + Since: s.ctx.BlockTime(), }) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(1), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(1), + IsActive: true, + Since: s.ctx.BlockTime(), }) s.keeper.SetGroupTransition(s.ctx, types.GroupTransition{ @@ -425,18 +418,16 @@ func (s *KeeperTestSuite) TestCallbackOnSignTimeout() { IncomingGroupSigningID: 2, }) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(2), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(2), + IsActive: true, + Since: s.ctx.BlockTime(), }) s.keeper.SetMember(s.ctx, types.Member{ - Address: penalizedMembers[0].String(), - GroupID: tss.GroupID(1), - IsActive: true, - Since: s.ctx.BlockTime(), - LastActive: s.ctx.BlockTime(), + Address: penalizedMembers[0].String(), + GroupID: tss.GroupID(1), + IsActive: true, + Since: s.ctx.BlockTime(), }) s.tssKeeper.EXPECT(). DeactivateMember(gomock.Any(), tss.GroupID(1), penalizedMembers[0]). diff --git a/x/bandtss/testutil/expected_keepers_mocks.go b/x/bandtss/testutil/expected_keepers_mocks.go index 32a15460d..48d05690f 100644 --- a/x/bandtss/testutil/expected_keepers_mocks.go +++ b/x/bandtss/testutil/expected_keepers_mocks.go @@ -12,72 +12,17 @@ package testutil import ( context "context" reflect "reflect" - time "time" collections "cosmossdk.io/collections" math "cosmossdk.io/math" tss "github.com/bandprotocol/chain/v3/pkg/tss" types "github.com/bandprotocol/chain/v3/x/tss/types" types0 "github.com/cosmos/cosmos-sdk/types" - authz "github.com/cosmos/cosmos-sdk/x/authz" types1 "github.com/cosmos/cosmos-sdk/x/distribution/types" types2 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "go.uber.org/mock/gomock" ) -// MockAuthzKeeper is a mock of AuthzKeeper interface. -type MockAuthzKeeper struct { - ctrl *gomock.Controller - recorder *MockAuthzKeeperMockRecorder - isgomock struct{} -} - -// MockAuthzKeeperMockRecorder is the mock recorder for MockAuthzKeeper. -type MockAuthzKeeperMockRecorder struct { - mock *MockAuthzKeeper -} - -// NewMockAuthzKeeper creates a new mock instance. -func NewMockAuthzKeeper(ctrl *gomock.Controller) *MockAuthzKeeper { - mock := &MockAuthzKeeper{ctrl: ctrl} - mock.recorder = &MockAuthzKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockAuthzKeeper) EXPECT() *MockAuthzKeeperMockRecorder { - return m.recorder -} - -// GetAuthorization mocks base method. -func (m *MockAuthzKeeper) GetAuthorization(ctx context.Context, grantee, granter types0.AccAddress, msgType string) (authz.Authorization, *time.Time) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAuthorization", ctx, grantee, granter, msgType) - ret0, _ := ret[0].(authz.Authorization) - ret1, _ := ret[1].(*time.Time) - return ret0, ret1 -} - -// GetAuthorization indicates an expected call of GetAuthorization. -func (mr *MockAuthzKeeperMockRecorder) GetAuthorization(ctx, grantee, granter, msgType any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthorization", reflect.TypeOf((*MockAuthzKeeper)(nil).GetAuthorization), ctx, grantee, granter, msgType) -} - -// SaveGrant mocks base method. -func (m *MockAuthzKeeper) SaveGrant(ctx context.Context, grantee, granter types0.AccAddress, authorization authz.Authorization, expiration *time.Time) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SaveGrant", ctx, grantee, granter, authorization, expiration) - ret0, _ := ret[0].(error) - return ret0 -} - -// SaveGrant indicates an expected call of SaveGrant. -func (mr *MockAuthzKeeperMockRecorder) SaveGrant(ctx, grantee, granter, authorization, expiration any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveGrant", reflect.TypeOf((*MockAuthzKeeper)(nil).SaveGrant), ctx, grantee, granter, authorization, expiration) -} - // MockAccountKeeper is a mock of AccountKeeper interface. type MockAccountKeeper struct { ctrl *gomock.Controller diff --git a/x/bandtss/types/bandtss.pb.go b/x/bandtss/types/bandtss.pb.go index 57ece5a3a..08ba1a57d 100644 --- a/x/bandtss/types/bandtss.pb.go +++ b/x/bandtss/types/bandtss.pb.go @@ -81,10 +81,8 @@ type Member struct { GroupID github_com_bandprotocol_chain_v3_pkg_tss.GroupID `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3,casttype=github.com/bandprotocol/chain/v3/pkg/tss.GroupID" json:"group_id,omitempty"` // is_active is a flag to indicate whether a member is active or not. IsActive bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` - // since is a block timestamp when a member is deactivated + // since is a block timestamp when a member status is changed (from active to inactive or vice versa). Since time.Time `protobuf:"bytes,4,opt,name=since,proto3,stdtime" json:"since"` - // last_active is a latest block timestamp when a member is active - LastActive time.Time `protobuf:"bytes,5,opt,name=last_active,json=lastActive,proto3,stdtime" json:"last_active"` } func (m *Member) Reset() { *m = Member{} } @@ -148,13 +146,6 @@ func (m *Member) GetSince() time.Time { return time.Time{} } -func (m *Member) GetLastActive() time.Time { - if m != nil { - return m.LastActive - } - return time.Time{} -} - // CuurentGroup is a bandtss current group information. type CurrentGroup struct { // group_id is the ID of the current group. @@ -471,68 +462,67 @@ func init() { } var fileDescriptor_2bc325518cc10c44 = []byte{ - // 970 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcb, 0x6e, 0xdb, 0x46, - 0x14, 0xd5, 0xc8, 0xd6, 0x6b, 0x64, 0xc8, 0xca, 0x38, 0x36, 0x64, 0xb7, 0x21, 0x55, 0xa5, 0x68, - 0x85, 0x02, 0x21, 0x13, 0xa5, 0x2b, 0x2f, 0x5a, 0x48, 0xb2, 0xac, 0x12, 0x85, 0x65, 0x81, 0x92, - 0xd1, 0x22, 0x1b, 0x82, 0x8f, 0x11, 0x33, 0xb0, 0x45, 0x2a, 0x9c, 0x91, 0x61, 0xff, 0x41, 0x80, - 0x6e, 0xf2, 0x09, 0x05, 0xda, 0x45, 0xd1, 0x45, 0x81, 0x02, 0xfd, 0x88, 0x20, 0xab, 0x2c, 0xbb, - 0xa2, 0x0b, 0x7a, 0xd3, 0x6f, 0xf0, 0xaa, 0xe0, 0x90, 0x7a, 0xda, 0x45, 0x6c, 0x23, 0x1b, 0x89, - 0x77, 0xee, 0xeb, 0xdc, 0x73, 0xae, 0x86, 0x82, 0x15, 0x43, 0x77, 0x2c, 0x39, 0xfc, 0x60, 0x94, - 0xca, 0xa7, 0xcf, 0x0c, 0xcc, 0xf4, 0x67, 0x13, 0x5b, 0x1a, 0x79, 0x2e, 0x73, 0xd1, 0xc3, 0xd0, - 0x94, 0x26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x31, 0x81, 0x3e, 0x87, 0xe5, - 0xeb, 0x21, 0x4d, 0xb5, 0x55, 0xef, 0x2b, 0x9d, 0xb6, 0xd6, 0x56, 0x0f, 0x8f, 0xba, 0x45, 0x80, - 0x2a, 0x50, 0xb8, 0x1e, 0xf5, 0x43, 0x5d, 0xe1, 0x41, 0x3d, 0xa5, 0xdd, 0x29, 0x26, 0xd1, 0x97, - 0xf0, 0xf1, 0xff, 0xc7, 0xb4, 0x7e, 0x6c, 0x35, 0x8f, 0x42, 0x47, 0x71, 0x65, 0x67, 0xf5, 0xf5, - 0x2f, 0x42, 0xa2, 0xd1, 0xf9, 0x2d, 0x10, 0xc0, 0xdb, 0x40, 0x00, 0xef, 0x03, 0x01, 0xfc, 0x13, - 0x08, 0xe0, 0xcd, 0xa5, 0x90, 0x78, 0x7f, 0x29, 0x24, 0xfe, 0xbe, 0x14, 0x12, 0x2f, 0x3e, 0xbc, - 0xfa, 0x67, 0xd3, 0xff, 0x40, 0xfc, 0x05, 0x60, 0xa4, 0x79, 0xc8, 0xf3, 0xff, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x14, 0x79, 0xd0, 0x66, 0x20, 0x09, 0x00, 0x00, + // 957 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xdb, 0x46, + 0x13, 0xd6, 0xca, 0x1f, 0x92, 0xd6, 0x86, 0xac, 0xac, 0x63, 0x43, 0xf6, 0xfb, 0x86, 0x54, 0x95, + 0xa2, 0x15, 0x0a, 0x84, 0x4c, 0x94, 0x9e, 0x7c, 0x68, 0x21, 0xc9, 0xb2, 0x4a, 0x14, 0x96, 0x05, + 0x4a, 0x46, 0x8b, 0x5c, 0x08, 0x7e, 0xac, 0x98, 0x85, 0x2d, 0xae, 0xc2, 0x5d, 0x19, 0xf6, 0x3f, + 0x08, 0xd0, 0x4b, 0x7e, 0x42, 0x81, 0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xef, + 0xad, 0xbd, 0xfb, 0xfd, 0x49, 0xa6, 0x41, 0x3d, 0x8e, 0x3d, 0xfe, 0xc5, 0xaf, 0x00, 0x16, 0x16, + 0xc9, 0x45, 0x9f, 0xc0, 0x47, 0x3d, 0xbd, 0xd6, 0xee, 0x6a, 0x3d, 0xed, 0xa8, 0x6d, 0x74, 0x7b, + 0xb5, 0xde, 0x71, 0xd7, 0x38, 0x6e, 0x77, 0x3b, 0xcd, 0x86, 0x76, 0xa0, 0x35, 0xf7, 0x0b, 0x29, + 0xf4, 0x29, 0x2c, 0xdd, 0x0c, 0x69, 0xe8, 0xcd, 0x5a, 0x4f, 0x6b, 0xb7, 0x8c, 0x96, 0x7e, 0x74, + 0xdc, 0x29, 0x00, 0x54, 0x86, 0xd2, 0xcd, 0xa8, 0xef, 0x6a, 0x9a, 0x08, 0xea, 0x6a, 0xad, 0x76, + 0x21, 0x8d, 0x3e, 0x87, 0x8f, 0xff, 0x3d, 0xa6, 0xf9, 0x7d, 0xb3, 0x71, 0x1c, 0x39, 0x0a, 0x4b, + 0xbb, 0xcb, 0xaf, 0x7f, 0x92, 0x52, 0xf5, 0xf6, 0xcf, 0xa1, 0x04, 0xde, 0x86, 0x12, 0x78, 0x1f, + 0x4a, 0xe0, 0xaf, 0x50, 0x02, 0x6f, 0xae, 0xa4, 0xd4, 0xfb, 0x2b, 0x29, 0xf5, 0xc7, 0x95, 0x94, + 0x7a, 0xf1, 0xdf, 0xa3, 0x7f, 0x3e, 0xf9, 0x78, 0x11, 0x2f, 0x00, 0x6b, 0x55, 0x84, 0x3c, 0xff, + 0x27, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x1b, 0x02, 0x05, 0xd9, 0x08, 0x00, 0x00, } func (this *Member) Equal(that interface{}) bool { @@ -566,9 +556,6 @@ func (this *Member) Equal(that interface{}) bool { if !this.Since.Equal(that1.Since) { return false } - if !this.LastActive.Equal(that1.LastActive) { - return false - } return true } func (this *CurrentGroup) Equal(that interface{}) bool { @@ -731,21 +718,13 @@ func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastActive, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastActive):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Since, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Since):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintBandtss(dAtA, i, uint64(n1)) i-- - dAtA[i] = 0x2a - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Since, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Since):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintBandtss(dAtA, i, uint64(n2)) - i-- dAtA[i] = 0x22 if m.IsActive { i-- @@ -792,12 +771,12 @@ func (m *CurrentGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ActiveTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ActiveTime):]) - if err3 != nil { - return 0, err3 + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ActiveTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ActiveTime):]) + if err2 != nil { + return 0, err2 } - i -= n3 - i = encodeVarintBandtss(dAtA, i, uint64(n3)) + i -= n2 + i = encodeVarintBandtss(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x12 if m.GroupID != 0 { @@ -897,12 +876,12 @@ func (m *GroupTransition) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x40 } - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ExecTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExecTime):]) - if err4 != nil { - return 0, err4 + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ExecTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExecTime):]) + if err3 != nil { + return 0, err3 } - i -= n4 - i = encodeVarintBandtss(dAtA, i, uint64(n4)) + i -= n3 + i = encodeVarintBandtss(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x3a if m.Status != 0 { @@ -962,12 +941,12 @@ func (m *GroupTransitionSignatureOrder) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.TransitionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.TransitionTime):]) - if err5 != nil { - return 0, err5 + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.TransitionTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.TransitionTime):]) + if err4 != nil { + return 0, err4 } - i -= n5 - i = encodeVarintBandtss(dAtA, i, uint64(n5)) + i -= n4 + i = encodeVarintBandtss(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x12 if len(m.PubKey) > 0 { @@ -1009,8 +988,6 @@ func (m *Member) Size() (n int) { } l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Since) n += 1 + l + sovBandtss(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastActive) - n += 1 + l + sovBandtss(uint64(l)) return n } @@ -1244,39 +1221,6 @@ func (m *Member) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastActive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowBandtss - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthBandtss - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthBandtss - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LastActive, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipBandtss(dAtA[iNdEx:]) diff --git a/x/bandtss/types/codec.go b/x/bandtss/types/codec.go index 2deda505f..889305fdb 100644 --- a/x/bandtss/types/codec.go +++ b/x/bandtss/types/codec.go @@ -17,7 +17,6 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgForceTransitionGroup{}, "bandtss/MsgForceTransitionGroup") legacy.RegisterAminoMsg(cdc, &MsgRequestSignature{}, "bandtss/MsgRequestSignature") legacy.RegisterAminoMsg(cdc, &MsgActivate{}, "bandtss/MsgActivate") - legacy.RegisterAminoMsg(cdc, &MsgHeartbeat{}, "bandtss/MsgHeartbeat") legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "bandtss/MsgUpdateParams") } @@ -28,7 +27,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgForceTransitionGroup{}, &MsgRequestSignature{}, &MsgActivate{}, - &MsgHeartbeat{}, &MsgUpdateParams{}, ) diff --git a/x/bandtss/types/constants.go b/x/bandtss/types/constants.go deleted file mode 100644 index 820181ae7..000000000 --- a/x/bandtss/types/constants.go +++ /dev/null @@ -1,14 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// SigningID is the type-safe unique identifier type for bandtss signing info. -type SigningID uint64 - -// GetGrantMsgTypes get message types that can be granted. -// NOTE: have to be a function, or else sdk cannot find msgTypeURL for granting. -func GetGrantMsgTypes() []string { - return []string{sdk.MsgTypeURL(&MsgHeartbeat{})} -} diff --git a/x/bandtss/types/constructors.go b/x/bandtss/types/constructors.go index 6a64ed32a..a0d9ed77d 100644 --- a/x/bandtss/types/constructors.go +++ b/x/bandtss/types/constructors.go @@ -46,14 +46,12 @@ func NewMember( groupID tss.GroupID, isActive bool, since time.Time, - lastActive time.Time, ) Member { return Member{ - Address: address.String(), - GroupID: groupID, - IsActive: isActive, - Since: since, - LastActive: lastActive, + Address: address.String(), + GroupID: groupID, + IsActive: isActive, + Since: since, } } diff --git a/x/bandtss/types/events.go b/x/bandtss/types/events.go index a4ffa1375..fbc6b101c 100644 --- a/x/bandtss/types/events.go +++ b/x/bandtss/types/events.go @@ -2,7 +2,6 @@ package types const ( EventTypeActivate = "activate" - EventTypeHeartbeat = "heartbeat" EventTypeInactiveStatus = "inactive_status" EventTypeGroupTransition = "group_transition" EventTypeGroupTransitionSuccess = "group_transition_success" diff --git a/x/bandtss/types/expected_keepers.go b/x/bandtss/types/expected_keepers.go index 00a4bd3a0..5a75efabb 100644 --- a/x/bandtss/types/expected_keepers.go +++ b/x/bandtss/types/expected_keepers.go @@ -2,13 +2,11 @@ package types import ( "context" - "time" "cosmossdk.io/collections" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/authz" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -16,23 +14,6 @@ import ( tsstypes "github.com/bandprotocol/chain/v3/x/tss/types" ) -// AuthzKeeper defines the expected authz keeper. for query and testing only; don't use to -// create/remove grant on deliver tx -type AuthzKeeper interface { - GetAuthorization( - ctx context.Context, - grantee sdk.AccAddress, - granter sdk.AccAddress, - msgType string, - ) (authz.Authorization, *time.Time) - SaveGrant( - ctx context.Context, - grantee, granter sdk.AccAddress, - authorization authz.Authorization, - expiration *time.Time, - ) error -} - // AccountKeeper defines the expected account keeper (noalias) type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress diff --git a/x/bandtss/types/genesis.pb.go b/x/bandtss/types/genesis.pb.go index a3a6f07c9..a55745149 100644 --- a/x/bandtss/types/genesis.pb.go +++ b/x/bandtss/types/genesis.pb.go @@ -95,18 +95,16 @@ func (m *GenesisState) GetCurrentGroup() CurrentGroup { // Params defines the set of module parameters. type Params struct { - // active_duration is the duration where a member is active without interaction. - ActiveDuration time.Duration `protobuf:"bytes,1,opt,name=active_duration,json=activeDuration,proto3,stdduration" json:"active_duration"` // reward_percentage is the percentage of block rewards allocated to active TSS members. // The reward proportion is calculated after being allocated to oracle rewards. - RewardPercentage uint64 `protobuf:"varint,2,opt,name=reward_percentage,json=rewardPercentage,proto3" json:"reward_percentage,omitempty"` + RewardPercentage uint64 `protobuf:"varint,1,opt,name=reward_percentage,json=rewardPercentage,proto3" json:"reward_percentage,omitempty"` // inactive_penalty_duration is the duration where a member cannot activate back after being set to inactive. - InactivePenaltyDuration time.Duration `protobuf:"bytes,3,opt,name=inactive_penalty_duration,json=inactivePenaltyDuration,proto3,stdduration" json:"inactive_penalty_duration"` + InactivePenaltyDuration time.Duration `protobuf:"bytes,2,opt,name=inactive_penalty_duration,json=inactivePenaltyDuration,proto3,stdduration" json:"inactive_penalty_duration"` // max_transition_duration is the maximum duration where the transition process waits // since the start of the process until an incoming group replaces a current group. - MaxTransitionDuration time.Duration `protobuf:"bytes,4,opt,name=max_transition_duration,json=maxTransitionDuration,proto3,stdduration" json:"max_transition_duration"` + MaxTransitionDuration time.Duration `protobuf:"bytes,3,opt,name=max_transition_duration,json=maxTransitionDuration,proto3,stdduration" json:"max_transition_duration"` // fee is the tokens that will be paid per signer. - Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"` + Fee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=fee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"fee"` } func (m *Params) Reset() { *m = Params{} } @@ -142,13 +140,6 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo -func (m *Params) GetActiveDuration() time.Duration { - if m != nil { - return m.ActiveDuration - } - return 0 -} - func (m *Params) GetRewardPercentage() uint64 { if m != nil { return m.RewardPercentage @@ -187,39 +178,38 @@ func init() { } var fileDescriptor_3fe6a4345855d3c9 = []byte{ - // 499 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x6e, 0xd3, 0x4e, - 0x14, 0xc5, 0xe3, 0x3a, 0xff, 0xfc, 0xd1, 0x50, 0xa0, 0x58, 0x41, 0x75, 0x2a, 0x64, 0x47, 0x59, - 0x65, 0xc3, 0x4c, 0x4b, 0x77, 0x15, 0x1b, 0x0c, 0x52, 0x25, 0x44, 0xa5, 0xc8, 0xb0, 0x02, 0x21, - 0x6b, 0xec, 0xdc, 0xba, 0x16, 0xf1, 0x8c, 0x35, 0x33, 0x0e, 0xe9, 0x5b, 0xb0, 0x64, 0xc9, 0x9a, - 0x67, 0xe0, 0x01, 0xba, 0xec, 0x0e, 0x56, 0x2d, 0x4a, 0x36, 0x3c, 0x06, 0x9a, 0xf1, 0x47, 0x2a, - 0x14, 0xa4, 0x6e, 0xfc, 0x31, 0xf7, 0x9c, 0xdf, 0x9c, 0xb9, 0x73, 0xd1, 0x28, 0xa6, 0x6c, 0x4a, - 0xf4, 0x43, 0x49, 0x49, 0xe6, 0x07, 0x31, 0x28, 0x7a, 0x40, 0x52, 0x60, 0x20, 0x33, 0x89, 0x0b, - 0xc1, 0x15, 0x77, 0xfa, 0xba, 0x8c, 0x6b, 0x0d, 0xae, 0x35, 0x7b, 0xfd, 0x94, 0xa7, 0xdc, 0x08, - 0x88, 0xfe, 0xaa, 0xb4, 0x7b, 0x5e, 0xca, 0x79, 0x3a, 0x03, 0x62, 0xfe, 0xe2, 0xf2, 0x94, 0x4c, - 0x4b, 0x41, 0x55, 0xc6, 0x59, 0x53, 0x4f, 0xb8, 0xcc, 0xb9, 0x24, 0x31, 0x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 0xd1, 0x99, 0x3a, 0x5f, 0x47, 0xb3, 0x6f, 0x1f, 0x6d, 0xb7, 0xa1, 0x4c, - 0x2a, 0x48, 0x9b, 0xf1, 0x3d, 0xda, 0xcd, 0xe9, 0x22, 0x52, 0x82, 0x32, 0x99, 0xe9, 0x95, 0x35, - 0xbe, 0x7b, 0x7b, 0xfc, 0xa3, 0x9c, 0x2e, 0xde, 0xb6, 0x88, 0x16, 0xfe, 0x01, 0xd9, 0xa7, 0x00, - 0xee, 0x7f, 0xe6, 0x8a, 0x07, 0xb8, 0x9a, 0x42, 0xac, 0xa7, 0x70, 0x7d, 0x3b, 0x3c, 0x63, 0xc1, - 0xbe, 0x06, 0x7d, 0xbb, 0xf6, 0xc7, 0x69, 0xa6, 0xce, 0xca, 0x18, 0x27, 0x3c, 0x27, 0xf5, 0xc8, - 0x56, 0xaf, 0x27, 0x72, 0xfa, 0x91, 0xa8, 0xf3, 0x02, 0xa4, 0x31, 0xc8, 0x50, 0x73, 0x8f, 0xba, - 0xbf, 0xbf, 0xfa, 0x56, 0xf0, 0xea, 0x62, 0xe9, 0x59, 0x97, 0x4b, 0xcf, 0xfa, 0xb5, 0xf4, 0xac, - 0xcf, 0x2b, 0xaf, 0x73, 0xb9, 0xf2, 0x3a, 0x3f, 0x57, 0x5e, 0xe7, 0xdd, 0xfe, 0x0d, 0x9c, 0x9e, - 0x0a, 0x73, 0x82, 0x84, 0xcf, 0x48, 0x72, 0x46, 0x33, 0x46, 0xe6, 0x87, 0x64, 0xd1, 0x0e, 0xbd, - 0x81, 0xc7, 0x3d, 0x23, 0x39, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xb4, 0x5a, 0x1f, 0xa1, - 0x03, 0x00, 0x00, + // 482 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0xb3,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8, 0xc0, + 0x8a, 0xbe, 0xdd, 0x84, 0xfb, 0x19, 0x37, 0xe7, 0x65, 0x8a, 0x99, 0xcc, 0x49, 0xbd, 0x64, 0xd5, + 0xd7, 0x53, 0x3d, 0xfb, 0x48, 0xcc, 0x45, 0x01, 0xda, 0x35, 0xe8, 0xd8, 0x7a, 0x8f, 0xfb, 0xbf, + 0xbe, 0x86, 0x5e, 0xf4, 0xfa, 0x72, 0x15, 0x78, 0x57, 0xab, 0xc0, 0xfb, 0xb9, 0x0a, 0xbc, 0xcf, + 0xeb, 0xa0, 0x73, 0xb5, 0x0e, 0x3a, 0x3f, 0xd6, 0x41, 0xe7, 0xdd, 0xc1, 0x1d, 0x9d, 0x9d, 0xa3, + 0xbb, 0x01, 0x93, 0x73, 0xc2, 0xce, 0x29, 0x17, 0x64, 0x71, 0x44, 0x96, 0xed, 0x9a, 0x3a, 0x79, + 0x3a, 0x70, 0xc8, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xab, 0xe5, 0x3b, 0x53, 0x03, + 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -241,9 +231,6 @@ func (this *Params) Equal(that interface{}) bool { } else if this == nil { return false } - if this.ActiveDuration != that1.ActiveDuration { - return false - } if this.RewardPercentage != that1.RewardPercentage { return false } @@ -351,7 +338,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxTransitionDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxTransitionDuration):]) @@ -361,7 +348,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n3 i = encodeVarintGenesis(dAtA, i, uint64(n3)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a n4, err4 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.InactivePenaltyDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactivePenaltyDuration):]) if err4 != nil { return 0, err4 @@ -369,20 +356,12 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n4 i = encodeVarintGenesis(dAtA, i, uint64(n4)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 if m.RewardPercentage != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.RewardPercentage)) i-- - dAtA[i] = 0x10 - } - n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.ActiveDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.ActiveDuration):]) - if err5 != nil { - return 0, err5 + dAtA[i] = 0x8 } - i -= n5 - i = encodeVarintGenesis(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -422,8 +401,6 @@ func (m *Params) Size() (n int) { } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.ActiveDuration) - n += 1 + l + sovGenesis(uint64(l)) if m.RewardPercentage != 0 { n += 1 + sovGenesis(uint64(m.RewardPercentage)) } @@ -626,39 +603,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.ActiveDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RewardPercentage", wireType) } @@ -677,7 +621,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InactivePenaltyDuration", wireType) } @@ -710,7 +654,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MaxTransitionDuration", wireType) } @@ -743,7 +687,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) } diff --git a/x/bandtss/types/msgs.go b/x/bandtss/types/msgs.go index 802bbffbd..a4033338d 100644 --- a/x/bandtss/types/msgs.go +++ b/x/bandtss/types/msgs.go @@ -19,14 +19,12 @@ var ( _ sdk.Msg = &MsgForceTransitionGroup{} _ sdk.Msg = &MsgRequestSignature{} _ sdk.Msg = &MsgActivate{} - _ sdk.Msg = &MsgHeartbeat{} _ sdk.Msg = &MsgUpdateParams{} _ sdk.HasValidateBasic = (*MsgTransitionGroup)(nil) _ sdk.HasValidateBasic = (*MsgForceTransitionGroup)(nil) _ sdk.HasValidateBasic = (*MsgRequestSignature)(nil) _ sdk.HasValidateBasic = (*MsgActivate)(nil) - _ sdk.HasValidateBasic = (*MsgHeartbeat)(nil) _ sdk.HasValidateBasic = (*MsgUpdateParams)(nil) _ types.UnpackInterfacesMessage = &MsgRequestSignature{} @@ -212,33 +210,6 @@ func (m MsgActivate) ValidateBasic() error { return nil } -// ==================================== -// MsgHeartbeat -// ==================================== - -// NewMsgHeartbeat creates a new MsgHeartbeat instance. -func NewMsgHeartbeat(sender string, groupID tss.GroupID) *MsgHeartbeat { - return &MsgHeartbeat{ - Sender: sender, - GroupID: groupID, - } -} - -// ValidateBasic does a sanity check on the provided data -func (m MsgHeartbeat) ValidateBasic() error { - // Validate member address - if _, err := sdk.AccAddressFromBech32(m.Sender); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) - } - - // Validate group ID - if m.GroupID == 0 { - return ErrInvalidGroupID.Wrap("group ID must not be zero") - } - - return nil -} - // ==================================== // MsgUpdateParams // ==================================== diff --git a/x/bandtss/types/msgs_test.go b/x/bandtss/types/msgs_test.go index 7c69f49fd..d84def930 100644 --- a/x/bandtss/types/msgs_test.go +++ b/x/bandtss/types/msgs_test.go @@ -131,28 +131,6 @@ func TestMsgActivate_ValidateBasic(t *testing.T) { require.Error(t, err) } -// ==================================== -// MsgHeartbeat -// ==================================== - -func TestNewMsgHeartbeat(t *testing.T) { - msg := types.NewMsgHeartbeat(validSender, 1) - require.Equal(t, tss.GroupID(1), msg.GroupID) - require.Equal(t, validSender, msg.Sender) -} - -func TestMsgHeartbeat_ValidateBasic(t *testing.T) { - // Valid input - msg := types.NewMsgHeartbeat(validSender, 1) - err := msg.ValidateBasic() - require.NoError(t, err) - - // invalid input - msg = types.NewMsgHeartbeat(validSender, 0) - err = msg.ValidateBasic() - require.Error(t, err) -} - // ==================================== // MsgUpdateParams // ==================================== diff --git a/x/bandtss/types/params.go b/x/bandtss/types/params.go index 73899de4b..b0d8ec83f 100644 --- a/x/bandtss/types/params.go +++ b/x/bandtss/types/params.go @@ -9,7 +9,6 @@ import ( ) const ( - DefaultActiveDuration time.Duration = time.Hour * 24 // 1 days DefaultInactivePenaltyDuration time.Duration = time.Minute * 10 // 10 minutes DefaultMaxTransitionDuration time.Duration = time.Hour * 120 // 5 days // compute the bandtss reward following the allocation to Oracle. If the Oracle reward amounts to 40%, @@ -23,14 +22,12 @@ var DefaultFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10)) // NewParams creates a new Params instance func NewParams( - activeDuration time.Duration, rewardPercentage uint64, inactivePenaltyDuration time.Duration, maxTransitionDuration time.Duration, fee sdk.Coins, ) Params { return Params{ - ActiveDuration: activeDuration, RewardPercentage: rewardPercentage, InactivePenaltyDuration: inactivePenaltyDuration, MaxTransitionDuration: maxTransitionDuration, @@ -41,7 +38,6 @@ func NewParams( // DefaultParams returns default parameters func DefaultParams() Params { return NewParams( - DefaultActiveDuration, DefaultRewardPercentage, DefaultInactivePenaltyDuration, DefaultMaxTransitionDuration, @@ -51,10 +47,6 @@ func DefaultParams() Params { // Validate validates the set of params func (p Params) Validate() error { - if err := validateTimeDuration("active duration")(p.ActiveDuration); err != nil { - return err - } - if err := validateTimeDuration("inactive penalty duration")(p.InactivePenaltyDuration); err != nil { return err } diff --git a/x/bandtss/types/query.pb.go b/x/bandtss/types/query.pb.go index 6ffb2e2ec..26bb1eb18 100644 --- a/x/bandtss/types/query.pb.go +++ b/x/bandtss/types/query.pb.go @@ -153,107 +153,6 @@ func (m *QueryCountsResponse) GetSigningCount() uint64 { return 0 } -// QueryIsSignerRequest is request type for the Query/IsGrantee RPC method. -type QueryIsGranteeRequest struct { - // granter is a granter address - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - // grantee is a grantee address - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` -} - -func (m *QueryIsGranteeRequest) Reset() { *m = QueryIsGranteeRequest{} } -func (m *QueryIsGranteeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryIsGranteeRequest) ProtoMessage() {} -func (*QueryIsGranteeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{2} -} -func (m *QueryIsGranteeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryIsGranteeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryIsGranteeRequest.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 *QueryIsGranteeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryIsGranteeRequest.Merge(m, src) -} -func (m *QueryIsGranteeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryIsGranteeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryIsGranteeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryIsGranteeRequest proto.InternalMessageInfo - -func (m *QueryIsGranteeRequest) GetGranter() string { - if m != nil { - return m.Granter - } - return "" -} - -func (m *QueryIsGranteeRequest) GetGrantee() string { - if m != nil { - return m.Grantee - } - return "" -} - -// QueryIsGranteeResponse is response type for the Query/IsGrantee RPC method. -type QueryIsGranteeResponse struct { - // is_grantee is true if this account has been granted by granter - IsGrantee bool `protobuf:"varint,1,opt,name=is_grantee,json=isGrantee,proto3" json:"is_grantee,omitempty"` -} - -func (m *QueryIsGranteeResponse) Reset() { *m = QueryIsGranteeResponse{} } -func (m *QueryIsGranteeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryIsGranteeResponse) ProtoMessage() {} -func (*QueryIsGranteeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{3} -} -func (m *QueryIsGranteeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryIsGranteeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryIsGranteeResponse.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 *QueryIsGranteeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryIsGranteeResponse.Merge(m, src) -} -func (m *QueryIsGranteeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryIsGranteeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryIsGranteeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryIsGranteeResponse proto.InternalMessageInfo - -func (m *QueryIsGranteeResponse) GetIsGrantee() bool { - if m != nil { - return m.IsGrantee - } - return false -} - // QueryMembersRequest is the request type for the Query/Members RPC method. type QueryMembersRequest struct { // status define type of filter on member's status. @@ -269,7 +168,7 @@ func (m *QueryMembersRequest) Reset() { *m = QueryMembersRequest{} } func (m *QueryMembersRequest) String() string { return proto.CompactTextString(m) } func (*QueryMembersRequest) ProtoMessage() {} func (*QueryMembersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{4} + return fileDescriptor_d619290a87c09054, []int{2} } func (m *QueryMembersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +230,7 @@ func (m *QueryMembersResponse) Reset() { *m = QueryMembersResponse{} } func (m *QueryMembersResponse) String() string { return proto.CompactTextString(m) } func (*QueryMembersResponse) ProtoMessage() {} func (*QueryMembersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{5} + return fileDescriptor_d619290a87c09054, []int{3} } func (m *QueryMembersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +283,7 @@ func (m *QueryMemberRequest) Reset() { *m = QueryMemberRequest{} } func (m *QueryMemberRequest) String() string { return proto.CompactTextString(m) } func (*QueryMemberRequest) ProtoMessage() {} func (*QueryMemberRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{6} + return fileDescriptor_d619290a87c09054, []int{4} } func (m *QueryMemberRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -432,7 +331,7 @@ func (m *QueryMemberResponse) Reset() { *m = QueryMemberResponse{} } func (m *QueryMemberResponse) String() string { return proto.CompactTextString(m) } func (*QueryMemberResponse) ProtoMessage() {} func (*QueryMemberResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{7} + return fileDescriptor_d619290a87c09054, []int{5} } func (m *QueryMemberResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -483,7 +382,7 @@ func (m *QueryCurrentGroupRequest) Reset() { *m = QueryCurrentGroupReque func (m *QueryCurrentGroupRequest) String() string { return proto.CompactTextString(m) } func (*QueryCurrentGroupRequest) ProtoMessage() {} func (*QueryCurrentGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{8} + return fileDescriptor_d619290a87c09054, []int{6} } func (m *QueryCurrentGroupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -532,7 +431,7 @@ func (m *QueryCurrentGroupResponse) Reset() { *m = QueryCurrentGroupResp func (m *QueryCurrentGroupResponse) String() string { return proto.CompactTextString(m) } func (*QueryCurrentGroupResponse) ProtoMessage() {} func (*QueryCurrentGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{9} + return fileDescriptor_d619290a87c09054, []int{7} } func (m *QueryCurrentGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +510,7 @@ func (m *QueryIncomingGroupRequest) Reset() { *m = QueryIncomingGroupReq func (m *QueryIncomingGroupRequest) String() string { return proto.CompactTextString(m) } func (*QueryIncomingGroupRequest) ProtoMessage() {} func (*QueryIncomingGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{10} + return fileDescriptor_d619290a87c09054, []int{8} } func (m *QueryIncomingGroupRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -658,7 +557,7 @@ func (m *QueryIncomingGroupResponse) Reset() { *m = QueryIncomingGroupRe func (m *QueryIncomingGroupResponse) String() string { return proto.CompactTextString(m) } func (*QueryIncomingGroupResponse) ProtoMessage() {} func (*QueryIncomingGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{11} + return fileDescriptor_d619290a87c09054, []int{9} } func (m *QueryIncomingGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -732,7 +631,7 @@ func (m *QuerySigningRequest) Reset() { *m = QuerySigningRequest{} } func (m *QuerySigningRequest) String() string { return proto.CompactTextString(m) } func (*QuerySigningRequest) ProtoMessage() {} func (*QuerySigningRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{12} + return fileDescriptor_d619290a87c09054, []int{10} } func (m *QuerySigningRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -784,7 +683,7 @@ func (m *QuerySigningResponse) Reset() { *m = QuerySigningResponse{} } func (m *QuerySigningResponse) String() string { return proto.CompactTextString(m) } func (*QuerySigningResponse) ProtoMessage() {} func (*QuerySigningResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{13} + return fileDescriptor_d619290a87c09054, []int{11} } func (m *QuerySigningResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -849,7 +748,7 @@ func (m *QueryGroupTransitionRequest) Reset() { *m = QueryGroupTransitio func (m *QueryGroupTransitionRequest) String() string { return proto.CompactTextString(m) } func (*QueryGroupTransitionRequest) ProtoMessage() {} func (*QueryGroupTransitionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{14} + return fileDescriptor_d619290a87c09054, []int{12} } func (m *QueryGroupTransitionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -888,7 +787,7 @@ func (m *QueryGroupTransitionResponse) Reset() { *m = QueryGroupTransiti func (m *QueryGroupTransitionResponse) String() string { return proto.CompactTextString(m) } func (*QueryGroupTransitionResponse) ProtoMessage() {} func (*QueryGroupTransitionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{15} + return fileDescriptor_d619290a87c09054, []int{13} } func (m *QueryGroupTransitionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -932,7 +831,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{16} + return fileDescriptor_d619290a87c09054, []int{14} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -971,7 +870,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d619290a87c09054, []int{17} + return fileDescriptor_d619290a87c09054, []int{15} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1011,8 +910,6 @@ func init() { proto.RegisterEnum("band.bandtss.v1beta1.MemberStatusFilter", MemberStatusFilter_name, MemberStatusFilter_value) proto.RegisterType((*QueryCountsRequest)(nil), "band.bandtss.v1beta1.QueryCountsRequest") proto.RegisterType((*QueryCountsResponse)(nil), "band.bandtss.v1beta1.QueryCountsResponse") - proto.RegisterType((*QueryIsGranteeRequest)(nil), "band.bandtss.v1beta1.QueryIsGranteeRequest") - proto.RegisterType((*QueryIsGranteeResponse)(nil), "band.bandtss.v1beta1.QueryIsGranteeResponse") proto.RegisterType((*QueryMembersRequest)(nil), "band.bandtss.v1beta1.QueryMembersRequest") proto.RegisterType((*QueryMembersResponse)(nil), "band.bandtss.v1beta1.QueryMembersResponse") proto.RegisterType((*QueryMemberRequest)(nil), "band.bandtss.v1beta1.QueryMemberRequest") @@ -1032,92 +929,87 @@ func init() { func init() { proto.RegisterFile("band/bandtss/v1beta1/query.proto", fileDescriptor_d619290a87c09054) } var fileDescriptor_d619290a87c09054 = []byte{ - // 1353 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xbd, 0x93, 0xd3, 0x46, - 0x14, 0xb7, 0x8c, 0xb1, 0xcf, 0x8f, 0xe3, 0x23, 0xcb, 0x91, 0xf8, 0xc4, 0xf9, 0x03, 0x41, 0xc0, - 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d2, 0xcb, 0xbd, 0x82, 0xf4, 0xe7, 0x5e, - 0x41, 0xda, 0xd9, 0x2f, 0x24, 0x5e, 0xee, 0x17, 0x12, 0x7f, 0xec, 0x17, 0x12, 0xf7, 0x0f, 0xde, - 0xaf, 0xbe, 0x1c, 0x5e, 0x4a, 0x9f, 0xfc, 0x4e, 0x9a, 0xaa, 0x5c, 0xfe, 0x37, 0x00, 0x00, 0xff, - 0xff, 0x54, 0x43, 0x8a, 0x90, 0xfd, 0x0f, 0x00, 0x00, + // 1268 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xb1, 0x6f, 0xdb, 0x56, + 0x13, 0x17, 0x15, 0x45, 0x8a, 0x9f, 0x9d, 0xd8, 0xdf, 0x8b, 0x3f, 0x54, 0xa6, 0x6d, 0x51, 0x66, + 0x52, 0x47, 0x31, 0x50, 0xd2, 0x56, 0xda, 0x0e, 0x59, 0xda, 0xc8, 0x91, 0x03, 0x35, 0x75, 0xa0, + 0x50, 0x4a, 0x86, 0x2c, 0x2a, 0x25, 0x3d, 0xd3, 0x84, 0x25, 0x92, 0xe6, 0x23, 0x8d, 0xba, 0x41, + 0x3a, 0x04, 0x1d, 0x9a, 0xcd, 0x40, 0x87, 0x0c, 0x1d, 0xb3, 0x75, 0xe8, 0x3f, 0xd1, 0x25, 0x40, + 0x97, 0x00, 0x5d, 0x3a, 0x39, 0x85, 0xdd, 0xb5, 0x5b, 0xa7, 0x4c, 0x05, 0xdf, 0x3b, 0xca, 0xa2, + 0xc4, 0xd0, 0xea, 0xde, 0xc5, 0x96, 0xde, 0xdd, 0xbd, 0xfb, 0xdd, 0xdd, 0xbb, 0xdf, 0x9d, 0x50, + 0xb1, 0xad, 0x5b, 0x5d, 0x35, 0xf8, 0xe3, 0x51, 0xaa, 0x1e, 0x6c, 0xb4, 0x89, 0xa7, 0x6f, 0xa8, + 0xfb, 0x3e, 0x71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fc, 0x18, 0x86, 0x70, 0xab, 0x78, 0x21, 0xa0, 0x2c, 0x4c, 0xde, 0xd2, + 0xb9, 0x17, 0x4f, 0x92, 0x85, 0xe8, 0x92, 0x20, 0xaf, 0x31, 0x04, 0xd7, 0xb1, 0xfc, 0x3e, 0x04, + 0xea, 0x53, 0xd8, 0x33, 0x9e, 0xe1, 0x97, 0x02, 0x9a, 0x19, 0x9e, 0xc0, 0x58, 0x49, 0xca, 0xf6, + 0xf8, 0x1c, 0x17, 0xd5, 0x89, 0xf5, 0x01, 0xdd, 0x2a, 0x43, 0x57, 0xc4, 0x85, 0xf1, 0x1a, 0x0d, + 0x53, 0x0d, 0xfe, 0x51, 0x40, 0x97, 0xa3, 0x6b, 0x62, 0x92, 0xab, 0xb8, 0x79, 0x26, 0xae, 0x4f, + 0x6e, 0x00, 0xe0, 0x6e, 0x30, 0x70, 0x2b, 0x58, 0x1a, 0x03, 0x17, 0x65, 0x29, 0x7c, 0x24, 0xa0, + 0x1c, 0xb0, 0x4c, 0xe2, 0x43, 0x8a, 0x4e, 0x86, 0xc4, 0x87, 0x34, 0x32, 0x0d, 0x64, 0x85, 0x61, + 0x29, 0xe1, 0xd5, 0x31, 0x2c, 0x40, 0x91, 0x54, 0x7d, 0x7a, 0x36, 0x66, 0x9e, 0xe1, 0x57, 0x02, + 0x9a, 0x1d, 0xa1, 0x1e, 0xbc, 0x91, 0xe0, 0x2f, 0x9e, 0x0e, 0xc5, 0xf2, 0xbf, 0x31, 0x01, 0xa8, + 0x37, 0x19, 0xd4, 0x6b, 0x78, 0x65, 0xfc, 0x07, 0xcc, 0x08, 0x73, 0x06, 0x0c, 0xc0, 0xa9, 0x2a, + 0xf1, 0xed, 0x47, 0x98, 0x31, 0xf1, 0xed, 0x47, 0xd9, 0x32, 0x81, 0x01, 0x38, 0x25, 0x56, 0xbe, + 0x78, 0x7d, 0x52, 0x10, 0xde, 0x9c, 0x14, 0x84, 0x3f, 0x4e, 0x0a, 0xc2, 0xd1, 0x69, 0x21, 0xf5, + 0xe6, 0xb4, 0x90, 0xfa, 0xfd, 0xb4, 0x90, 0x7a, 0x72, 0xfe, 0xf6, 0xf2, 0xf5, 0xe0, 0x52, 0x36, + 0x50, 0xdb, 0x59, 0xa6, 0x72, 0xeb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x08, 0x2c, 0x11, 0xcf, + 0xd5, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1134,8 +1026,6 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Counts queries the number of existing signing. Counts(ctx context.Context, in *QueryCountsRequest, opts ...grpc.CallOption) (*QueryCountsResponse, error) - // IsGrantee queries whether granter grants the grantee. - IsGrantee(ctx context.Context, in *QueryIsGranteeRequest, opts ...grpc.CallOption) (*QueryIsGranteeResponse, error) // Members queries all members. Members(ctx context.Context, in *QueryMembersRequest, opts ...grpc.CallOption) (*QueryMembersResponse, error) // Member queries the member information of the given address. @@ -1169,15 +1059,6 @@ func (c *queryClient) Counts(ctx context.Context, in *QueryCountsRequest, opts . return out, nil } -func (c *queryClient) IsGrantee(ctx context.Context, in *QueryIsGranteeRequest, opts ...grpc.CallOption) (*QueryIsGranteeResponse, error) { - out := new(QueryIsGranteeResponse) - err := c.cc.Invoke(ctx, "/band.bandtss.v1beta1.Query/IsGrantee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) Members(ctx context.Context, in *QueryMembersRequest, opts ...grpc.CallOption) (*QueryMembersResponse, error) { out := new(QueryMembersResponse) err := c.cc.Invoke(ctx, "/band.bandtss.v1beta1.Query/Members", in, out, opts...) @@ -1245,8 +1126,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . type QueryServer interface { // Counts queries the number of existing signing. Counts(context.Context, *QueryCountsRequest) (*QueryCountsResponse, error) - // IsGrantee queries whether granter grants the grantee. - IsGrantee(context.Context, *QueryIsGranteeRequest) (*QueryIsGranteeResponse, error) // Members queries all members. Members(context.Context, *QueryMembersRequest) (*QueryMembersResponse, error) // Member queries the member information of the given address. @@ -1270,9 +1149,6 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Counts(ctx context.Context, req *QueryCountsRequest) (*QueryCountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Counts not implemented") } -func (*UnimplementedQueryServer) IsGrantee(ctx context.Context, req *QueryIsGranteeRequest) (*QueryIsGranteeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsGrantee not implemented") -} func (*UnimplementedQueryServer) Members(ctx context.Context, req *QueryMembersRequest) (*QueryMembersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Members not implemented") } @@ -1317,24 +1193,6 @@ func _Query_Counts_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_IsGrantee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryIsGranteeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).IsGrantee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/band.bandtss.v1beta1.Query/IsGrantee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).IsGrantee(ctx, req.(*QueryIsGranteeRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_Members_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryMembersRequest) if err := dec(in); err != nil { @@ -1469,10 +1327,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Counts", Handler: _Query_Counts_Handler, }, - { - MethodName: "IsGrantee", - Handler: _Query_IsGrantee_Handler, - }, { MethodName: "Members", Handler: _Query_Members_Handler, @@ -1557,76 +1411,6 @@ func (m *QueryCountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryIsGranteeRequest) 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 *QueryIsGranteeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryIsGranteeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Grantee) > 0 { - i -= len(m.Grantee) - copy(dAtA[i:], m.Grantee) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(m.Granter) > 0 { - i -= len(m.Granter) - copy(dAtA[i:], m.Granter) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryIsGranteeResponse) 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 *QueryIsGranteeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryIsGranteeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsGrantee { - i-- - if m.IsGrantee { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *QueryMembersRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2195,35 +1979,6 @@ func (m *QueryCountsResponse) Size() (n int) { return n } -func (m *QueryIsGranteeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Granter) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Grantee) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryIsGranteeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IsGrantee { - n += 2 - } - return n -} - func (m *QueryMembersRequest) Size() (n int) { if m == nil { return 0 @@ -2564,190 +2319,6 @@ func (m *QueryCountsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryIsGranteeRequest) 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 ErrIntOverflowQuery - } - 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: QueryIsGranteeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryIsGranteeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryIsGranteeResponse) 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 ErrIntOverflowQuery - } - 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: QueryIsGranteeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryIsGranteeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsGrantee", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsGrantee = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryMembersRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/bandtss/types/query.pb.gw.go b/x/bandtss/types/query.pb.gw.go index ba2303062..2058e134b 100644 --- a/x/bandtss/types/query.pb.gw.go +++ b/x/bandtss/types/query.pb.gw.go @@ -51,82 +51,6 @@ func local_request_Query_Counts_0(ctx context.Context, marshaler runtime.Marshal } -func request_Query_IsGrantee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryIsGranteeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["granter"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") - } - - protoReq.Granter, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) - } - - val, ok = pathParams["grantee"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") - } - - protoReq.Grantee, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) - } - - msg, err := client.IsGrantee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_IsGrantee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryIsGranteeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["granter"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") - } - - protoReq.Granter, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) - } - - val, ok = pathParams["grantee"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") - } - - protoReq.Grantee, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) - } - - msg, err := server.IsGrantee(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Query_Members_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -372,29 +296,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_IsGrantee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_IsGrantee_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_IsGrantee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_Members_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -617,26 +518,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_IsGrantee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_IsGrantee_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_IsGrantee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_Members_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -783,8 +664,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Counts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"bandtss", "v1beta1", "counts"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_IsGrantee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"bandtss", "v1beta1", "is_grantee", "granter", "grantee"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Members_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"bandtss", "v1beta1", "members"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Member_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"bandtss", "v1beta1", "members", "address"}, "", runtime.AssumeColonVerbOpt(false))) @@ -803,8 +682,6 @@ var ( var ( forward_Query_Counts_0 = runtime.ForwardResponseMessage - forward_Query_IsGrantee_0 = runtime.ForwardResponseMessage - forward_Query_Members_0 = runtime.ForwardResponseMessage forward_Query_Member_0 = runtime.ForwardResponseMessage diff --git a/x/bandtss/types/tx.pb.go b/x/bandtss/types/tx.pb.go index daec43c9a..3bfd1177d 100644 --- a/x/bandtss/types/tx.pb.go +++ b/x/bandtss/types/tx.pb.go @@ -213,98 +213,6 @@ func (m *MsgActivateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgActivateResponse proto.InternalMessageInfo -// MsgHeartbeat is a message used to show if the address is still active. -type MsgHeartbeat struct { - // address is the signer of this message, who must be a member of the group. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // group_id is the group id of the member. - GroupID github_com_bandprotocol_chain_v3_pkg_tss.GroupID `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3,casttype=github.com/bandprotocol/chain/v3/pkg/tss.GroupID" json:"group_id,omitempty"` -} - -func (m *MsgHeartbeat) Reset() { *m = MsgHeartbeat{} } -func (m *MsgHeartbeat) String() string { return proto.CompactTextString(m) } -func (*MsgHeartbeat) ProtoMessage() {} -func (*MsgHeartbeat) Descriptor() ([]byte, []int) { - return fileDescriptor_1607716805749e77, []int{4} -} -func (m *MsgHeartbeat) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgHeartbeat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgHeartbeat.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 *MsgHeartbeat) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgHeartbeat.Merge(m, src) -} -func (m *MsgHeartbeat) XXX_Size() int { - return m.Size() -} -func (m *MsgHeartbeat) XXX_DiscardUnknown() { - xxx_messageInfo_MsgHeartbeat.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgHeartbeat proto.InternalMessageInfo - -func (m *MsgHeartbeat) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *MsgHeartbeat) GetGroupID() github_com_bandprotocol_chain_v3_pkg_tss.GroupID { - if m != nil { - return m.GroupID - } - return 0 -} - -// MsgHeartbeatResponse is response data for MsgHeartbeat message -type MsgHeartbeatResponse struct { -} - -func (m *MsgHeartbeatResponse) Reset() { *m = MsgHeartbeatResponse{} } -func (m *MsgHeartbeatResponse) String() string { return proto.CompactTextString(m) } -func (*MsgHeartbeatResponse) ProtoMessage() {} -func (*MsgHeartbeatResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1607716805749e77, []int{5} -} -func (m *MsgHeartbeatResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgHeartbeatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgHeartbeatResponse.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 *MsgHeartbeatResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgHeartbeatResponse.Merge(m, src) -} -func (m *MsgHeartbeatResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgHeartbeatResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgHeartbeatResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgHeartbeatResponse proto.InternalMessageInfo - // MsgUpdateParams is the Msg/UpdateParams request type. type MsgUpdateParams struct { // params defines the x/tss parameters to update. @@ -317,7 +225,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_1607716805749e77, []int{6} + return fileDescriptor_1607716805749e77, []int{4} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -368,7 +276,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1607716805749e77, []int{7} + return fileDescriptor_1607716805749e77, []int{5} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,7 +321,7 @@ func (m *MsgTransitionGroup) Reset() { *m = MsgTransitionGroup{} } func (m *MsgTransitionGroup) String() string { return proto.CompactTextString(m) } func (*MsgTransitionGroup) ProtoMessage() {} func (*MsgTransitionGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_1607716805749e77, []int{8} + return fileDescriptor_1607716805749e77, []int{6} } func (m *MsgTransitionGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -478,7 +386,7 @@ func (m *MsgTransitionGroupResponse) Reset() { *m = MsgTransitionGroupRe func (m *MsgTransitionGroupResponse) String() string { return proto.CompactTextString(m) } func (*MsgTransitionGroupResponse) ProtoMessage() {} func (*MsgTransitionGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1607716805749e77, []int{9} + return fileDescriptor_1607716805749e77, []int{7} } func (m *MsgTransitionGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -521,7 +429,7 @@ func (m *MsgForceTransitionGroup) Reset() { *m = MsgForceTransitionGroup func (m *MsgForceTransitionGroup) String() string { return proto.CompactTextString(m) } func (*MsgForceTransitionGroup) ProtoMessage() {} func (*MsgForceTransitionGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_1607716805749e77, []int{10} + return fileDescriptor_1607716805749e77, []int{8} } func (m *MsgForceTransitionGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -579,7 +487,7 @@ func (m *MsgForceTransitionGroupResponse) Reset() { *m = MsgForceTransit func (m *MsgForceTransitionGroupResponse) String() string { return proto.CompactTextString(m) } func (*MsgForceTransitionGroupResponse) ProtoMessage() {} func (*MsgForceTransitionGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1607716805749e77, []int{11} + return fileDescriptor_1607716805749e77, []int{9} } func (m *MsgForceTransitionGroupResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -613,8 +521,6 @@ func init() { proto.RegisterType((*MsgRequestSignatureResponse)(nil), "band.bandtss.v1beta1.MsgRequestSignatureResponse") proto.RegisterType((*MsgActivate)(nil), "band.bandtss.v1beta1.MsgActivate") proto.RegisterType((*MsgActivateResponse)(nil), "band.bandtss.v1beta1.MsgActivateResponse") - proto.RegisterType((*MsgHeartbeat)(nil), "band.bandtss.v1beta1.MsgHeartbeat") - proto.RegisterType((*MsgHeartbeatResponse)(nil), "band.bandtss.v1beta1.MsgHeartbeatResponse") proto.RegisterType((*MsgUpdateParams)(nil), "band.bandtss.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "band.bandtss.v1beta1.MsgUpdateParamsResponse") proto.RegisterType((*MsgTransitionGroup)(nil), "band.bandtss.v1beta1.MsgTransitionGroup") @@ -626,66 +532,63 @@ func init() { func init() { proto.RegisterFile("band/bandtss/v1beta1/tx.proto", fileDescriptor_1607716805749e77) } var fileDescriptor_1607716805749e77 = []byte{ - // 940 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x31, 0x6f, 0xdb, 0x46, - 0x14, 0x16, 0x2d, 0xc5, 0x92, 0xce, 0x01, 0xdc, 0x30, 0x6a, 0x2d, 0x33, 0x8e, 0xe8, 0xb0, 0x2d, - 0xa0, 0x08, 0x10, 0x69, 0x3b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 0x1d, - 0xa0, 0xcf, 0xd0, 0x2e, 0xd1, 0x77, 0xeb, 0xe9, 0x35, 0x50, 0xee, 0x33, 0xa4, 0x06, 0xe0, 0x8d, - 0xa9, 0x7f, 0x95, 0xbb, 0xc5, 0xb7, 0xa7, 0x60, 0x96, 0x6a, 0x9b, 0x73, 0x43, 0x93, 0xcc, 0xea, - 0x97, 0xa0, 0x96, 0x8e, 0xdc, 0x3b, 0x33, 0xc3, 0x13, 0x88, 0x76, 0xf7, 0x52, 0x48, 0x7a, 0xf2, - 0x57, 0xa0, 0x7e, 0x3e, 0xf2, 0x8c, 0x99, 0x71, 0x29, 0x46, 0xeb, 0x5c, 0x8e, 0x49, 0x0f, 0xf7, - 0xc0, 0xf5, 0x0b, 0x23, 0xe7, 0xdd, 0x99, 0xb1, 0x59, 0x98, 0xd6, 0x9d, 0x0b, 0x96, 0x66, 0xf1, - 0xc1, 0x72, 0xbe, 0xdb, 0xdb, 0x33, 0x4f, 0xc8, 0x21, 0xb5, 0x8d, 0x79, 0x91, 0x69, 0xba, 0x6f, - 0x40, 0xa3, 0xf0, 0x86, 0xcd, 0xae, 0xba, 0x08, 0xae, 0xbd, 0xf7, 0xbf, 0xe0, 0x49, 0x76, 0xed, - 0xda, 0xb7, 0x67, 0xc7, 0x1d, 0xa5, 0xf7, 0xe9, 0x8b, 0x49, 0x4b, 0x79, 0x39, 0x69, 0x29, 0x7f, - 0x4d, 0x5a, 0xca, 0xb3, 0xd3, 0x56, 0xe9, 0xe5, 0x69, 0xab, 0xf4, 0xe7, 0x69, 0xab, 0xf4, 0xf8, - 0xf2, 0x6b, 0x7b, 0x98, 0x7e, 0x38, 0x45, 0x5f, 0x19, 0xc3, 0xc5, 0x08, 0x72, 0xef, 0xdf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x23, 0xc6, 0x0c, 0x4d, 0x43, 0x0a, 0x00, 0x00, + // 889 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x31, 0x6f, 0xdb, 0x46, + 0x14, 0x16, 0x2d, 0xd5, 0x92, 0xce, 0x05, 0xdc, 0x30, 0x2a, 0x2c, 0x33, 0x8e, 0xe8, 0xa8, 0x28, + 0xa0, 0x18, 0x10, 0xcf, 0x76, 0xd0, 0x0e, 0xee, 0x50, 0x58, 0x29, 0x1a, 0xb8, 0xa8, 0x80, 0x82, + 0x49, 0x81, 0x22, 0x8b, 0x40, 0x91, 0xe7, 0xd3, 0x21, 0xe6, 0x1d, 0xcb, 0x3b, 0x19, 0x36, 0xd0, + 0xa1, 0xe8, 0x54, 0x74, 0xca, 0x4f, 0xe8, 0xdc, 0x2e, 0x2e, 0x9a, 0xa9, 0x53, 0xc7, 0xa0, 0x53, + 0xd0, 0xa9, 0x93, 0x53, 0xc8, 0x83, 0xff, 0x41, 0x87, 0x4e, 0xc5, 0x1d, 0x8f, 0xb4, 0x4c, 0x51, + 0x8d, 0x82, 0x2c, 0x24, 0xef, 0xbd, 0xef, 0xdd, 0x7b, 0xdf, 0x77, 0xef, 0x1d, 0xc1, 0xed, 0xa1, + 0x47, 0x03, 0x28, 0x1f, 0x82, 0x73, 0x78, 0xbc, 0x33, 0x44, 0xc2, 0xdb, 0x81, 0xe2, 0xc4, 0x89, + 0x62, 0x26, 0x98, 0xd9, 0x90, 0x1e, 0x47, 0xbb, 0x1d, 0xed, 0xb6, 0x1a, 0x98, 0x61, 0xa6, 0x00, + 0x50, 0x7e, 0x25, 0x58, 0x6b, 0x1d, 0x33, 0x86, 0x8f, 0x10, 0x54, 0xab, 0xe1, 0xf8, 0x10, 0x7a, + 0xf4, 0x54, 0xbb, 0xec, 0xbc, 0x4b, 0x90, 0x10, 0x71, 0xe1, 0x85, 0x91, 0x06, 0xdc, 0xf0, 0x42, + 0x42, 0x19, 0x54, 0x4f, 0x6d, 0x6a, 0xf9, 0x8c, 0x87, 0x8c, 0xc3, 0xa1, 0xc7, 0x51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 0xc4, 0xb9, 0x82, + 0xee, 0x6d, 0x49, 0x0e, 0x57, 0x6b, 0x49, 0x63, 0x6d, 0x8a, 0xc6, 0x74, 0x7d, 0xed, 0x75, 0xb0, + 0x96, 0x33, 0x65, 0x74, 0xfe, 0x31, 0x80, 0xd9, 0xe7, 0xf8, 0x51, 0xec, 0x51, 0x4e, 0x04, 0x61, + 0x54, 0x89, 0x65, 0x36, 0x41, 0x35, 0x44, 0xe1, 0x10, 0xc5, 0x92, 0x52, 0xb9, 0x53, 0x77, 0xd3, + 0xa5, 0xb9, 0x01, 0xea, 0x62, 0x14, 0x23, 0x3e, 0x62, 0x47, 0xfa, 0x60, 0xdc, 0x2b, 0x83, 0xb9, + 0x0f, 0xea, 0xe8, 0x04, 0xf9, 0x03, 0x39, 0xef, 0xcd, 0xb2, 0x12, 0xc3, 0x9a, 0x19, 0x9b, 0x47, + 0xe9, 0x65, 0xd0, 0xab, 0x49, 0x29, 0x9e, 0xbe, 0xb4, 0x0d, 0xb7, 0x26, 0xc3, 0xa4, 0xe3, 0xba, + 0x20, 0x95, 0xc5, 0x05, 0xe9, 0xce, 0x0a, 0x62, 0x4d, 0x09, 0x92, 0x63, 0xd8, 0xde, 0x00, 0xd6, + 0xac, 0x35, 0x93, 0xe5, 0xb7, 0x25, 0x25, 0xd9, 0xa7, 0x2c, 0xf6, 0x51, 0x5e, 0x1b, 0x0e, 0x6e, + 0x10, 0xea, 0xb3, 0x90, 0x50, 0x3c, 0xc8, 0x5a, 0xd4, 0x50, 0x2d, 0xfa, 0x60, 0x72, 0x6e, 0xaf, + 0x1e, 0x68, 0xe7, 0x9b, 0xb4, 0xea, 0x2a, 0xb9, 0xb6, 0x49, 0x4e, 0xd8, 0xa5, 0x37, 0x17, 0xb6, + 0xbc, 0xb8, 0xb0, 0x70, 0x56, 0xd8, 0x8d, 0x54, 0xd8, 0x22, 0x81, 0xda, 0x77, 0x80, 0x3d, 0x47, + 0xbb, 0x54, 0xdf, 0xdd, 0x9f, 0x2b, 0xa0, 0xdc, 0xe7, 0xd8, 0x8c, 0xc0, 0x3b, 0x33, 0x17, 0xef, + 0xdd, 0xe2, 0xe9, 0x29, 0xb8, 0x6e, 0xac, 0x9d, 0x85, 0xa1, 0x69, 0x66, 0xf3, 0x2b, 0x50, 0xcb, + 0x6e, 0xa5, 0x3b, 0x73, 0xc3, 0x53, 0x88, 0x75, 0xf7, 0x95, 0x90, 0x6c, 0xe7, 0x00, 0xbc, 0x7d, + 0xed, 0x56, 0x78, 0x7f, 0x6e, 0xe8, 0x34, 0xcc, 0xea, 0x2e, 0x04, 0xcb, 0xb2, 0x84, 0x60, 0x35, + 0xdf, 0x90, 0x9d, 0xb9, 0x3b, 0xe4, 0x90, 0xd6, 0xf6, 0xa2, 0xc8, 0x2c, 0xdd, 0x37, 0xa0, 0x51, + 0x38, 0x04, 0xf3, 0xab, 0x2e, 0x82, 0x5b, 0x1f, 0xbc, 0x16, 0x3c, 0xcd, 0x6e, 0xbd, 0xf5, 0xed, + 0xe5, 0xd9, 0x96, 0xd1, 0xfb, 0xec, 0xf9, 0xa4, 0x65, 0xbc, 0x98, 0xb4, 0x8c, 0xbf, 0x27, 0x2d, + 0xe3, 0xe9, 0x45, 0xab, 0xf4, 0xe2, 0xa2, 0x55, 0xfa, 0xeb, 0xa2, 0x55, 0x7a, 0xfc, 0xea, 0xc9, + 0x3a, 0xc9, 0x7e, 0xff, 0xea, 0x5f, 0x39, 0x5c, 0x56, 0x90, 0x7b, 0xff, 0x05, 0x00, 0x00, 0xff, + 0xff, 0x2f, 0x0c, 0x12, 0x01, 0x09, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -704,8 +607,6 @@ type MsgClient interface { RequestSignature(ctx context.Context, in *MsgRequestSignature, opts ...grpc.CallOption) (*MsgRequestSignatureResponse, error) // Activate activates the status of the sender. Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) - // Heartbeat marks last active of the sender. - Heartbeat(ctx context.Context, in *MsgHeartbeat, opts ...grpc.CallOption) (*MsgHeartbeatResponse, error) // UpdateParams updates the x/bandtss parameters. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // TransitionGroup creates a request for creating a new group and replacing current group. @@ -741,15 +642,6 @@ func (c *msgClient) Activate(ctx context.Context, in *MsgActivate, opts ...grpc. return out, nil } -func (c *msgClient) Heartbeat(ctx context.Context, in *MsgHeartbeat, opts ...grpc.CallOption) (*MsgHeartbeatResponse, error) { - out := new(MsgHeartbeatResponse) - err := c.cc.Invoke(ctx, "/band.bandtss.v1beta1.Msg/Heartbeat", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) err := c.cc.Invoke(ctx, "/band.bandtss.v1beta1.Msg/UpdateParams", in, out, opts...) @@ -783,8 +675,6 @@ type MsgServer interface { RequestSignature(context.Context, *MsgRequestSignature) (*MsgRequestSignatureResponse, error) // Activate activates the status of the sender. Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) - // Heartbeat marks last active of the sender. - Heartbeat(context.Context, *MsgHeartbeat) (*MsgHeartbeatResponse, error) // UpdateParams updates the x/bandtss parameters. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // TransitionGroup creates a request for creating a new group and replacing current group. @@ -804,9 +694,6 @@ func (*UnimplementedMsgServer) RequestSignature(ctx context.Context, req *MsgReq func (*UnimplementedMsgServer) Activate(ctx context.Context, req *MsgActivate) (*MsgActivateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") } -func (*UnimplementedMsgServer) Heartbeat(ctx context.Context, req *MsgHeartbeat) (*MsgHeartbeatResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Heartbeat not implemented") -} func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } @@ -857,24 +744,6 @@ func _Msg_Activate_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Msg_Heartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgHeartbeat) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Heartbeat(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/band.bandtss.v1beta1.Msg/Heartbeat", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Heartbeat(ctx, req.(*MsgHeartbeat)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateParams) if err := dec(in); err != nil { @@ -941,10 +810,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "Activate", Handler: _Msg_Activate_Handler, }, - { - MethodName: "Heartbeat", - Handler: _Msg_Heartbeat_Handler, - }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, @@ -1106,64 +971,6 @@ func (m *MsgActivateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgHeartbeat) 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 *MsgHeartbeat) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgHeartbeat) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GroupID != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.GroupID)) - i-- - dAtA[i] = 0x10 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgHeartbeatResponse) 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 *MsgHeartbeatResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgHeartbeatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1440,31 +1247,6 @@ func (m *MsgActivateResponse) Size() (n int) { return n } -func (m *MsgHeartbeat) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.GroupID != 0 { - n += 1 + sovTx(uint64(m.GroupID)) - } - return n -} - -func (m *MsgHeartbeatResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgUpdateParams) Size() (n int) { if m == nil { return 0 @@ -1940,157 +1722,6 @@ func (m *MsgActivateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgHeartbeat) 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: MsgHeartbeat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgHeartbeat: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupID", wireType) - } - m.GroupID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GroupID |= github_com_bandprotocol_chain_v3_pkg_tss.GroupID(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 *MsgHeartbeatResponse) 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: MsgHeartbeatResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgHeartbeatResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/bandtss/types/types.go b/x/bandtss/types/types.go new file mode 100644 index 000000000..6a6abd040 --- /dev/null +++ b/x/bandtss/types/types.go @@ -0,0 +1,4 @@ +package types + +// SigningID is the type-safe unique identifier type for bandtss signing info. +type SigningID uint64 diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index e4ef60483..c4766fd62 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -13,7 +13,6 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" bandtsskeeper "github.com/bandprotocol/chain/v3/x/bandtss/keeper" - bandtsstypes "github.com/bandprotocol/chain/v3/x/bandtss/types" feedskeeper "github.com/bandprotocol/chain/v3/x/feeds/keeper" feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/globalfee/keeper" @@ -34,9 +33,8 @@ type FeeChecker struct { BandtssKeeper *bandtsskeeper.Keeper FeedsKeeper *feedskeeper.Keeper - TSSMsgServer tsstypes.MsgServer - BandtssMsgServer bandtsstypes.MsgServer - FeedsMsgServer feedstypes.MsgServer + TSSMsgServer tsstypes.MsgServer + FeedsMsgServer feedstypes.MsgServer } func NewFeeChecker( @@ -50,21 +48,19 @@ func NewFeeChecker( feedsKeeper *feedskeeper.Keeper, ) FeeChecker { tssMsgServer := tsskeeper.NewMsgServerImpl(tssKeeper) - bandtssMsgServer := bandtsskeeper.NewMsgServerImpl(*bandtssKeeper) feedsMsgServer := feedskeeper.NewMsgServerImpl(*feedsKeeper) return FeeChecker{ - cdc: cdc, - AuthzKeeper: authzKeeper, - OracleKeeper: oracleKeeper, - GlobalfeeKeeper: globalfeeKeeper, - StakingKeeper: stakingKeeper, - TSSKeeper: tssKeeper, - BandtssKeeper: bandtssKeeper, - FeedsKeeper: feedsKeeper, - TSSMsgServer: tssMsgServer, - BandtssMsgServer: bandtssMsgServer, - FeedsMsgServer: feedsMsgServer, + cdc: cdc, + AuthzKeeper: authzKeeper, + OracleKeeper: oracleKeeper, + GlobalfeeKeeper: globalfeeKeeper, + StakingKeeper: stakingKeeper, + TSSKeeper: tssKeeper, + BandtssKeeper: bandtssKeeper, + FeedsKeeper: feedsKeeper, + TSSMsgServer: tssMsgServer, + FeedsMsgServer: feedsMsgServer, } } @@ -190,10 +186,6 @@ func (fc FeeChecker) IsBypassMinFeeMsg(ctx sdk.Context, msg sdk.Msg) bool { if _, err := fc.TSSMsgServer.SubmitSignature(ctx, msg); err != nil { return false } - case *bandtsstypes.MsgHeartbeat: - if _, err := fc.BandtssMsgServer.Heartbeat(ctx, msg); err != nil { - return false - } case *authz.MsgExec: msgs, err := msg.GetMessages() if err != nil { diff --git a/x/tss/types/helpers.go b/x/tss/types/helpers.go index 7e5e01fd3..b05a33d9f 100644 --- a/x/tss/types/helpers.go +++ b/x/tss/types/helpers.go @@ -30,7 +30,6 @@ func EncodeSigning( contentMsg []byte, ) []byte { return bytes.Join([][]byte{ - tss.Hash([]byte(ctx.ChainID())), tss.Hash(originator), sdk.Uint64ToBigEndian(uint64(ctx.BlockTime().Unix())), sdk.Uint64ToBigEndian(signingID), diff --git a/x/tss/types/helpers_test.go b/x/tss/types/helpers_test.go index eda19ca62..d88e21466 100644 --- a/x/tss/types/helpers_test.go +++ b/x/tss/types/helpers_test.go @@ -22,7 +22,6 @@ func TestEncodeSigning(t *testing.T) { got := types.EncodeSigning(ctx, 1, []byte("originator"), []byte("message")) strHex := hex.EncodeToString(got) expected := "" + - "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" + "bac0e8e27c59b287045fc0a3df1b9bc08bca23b9c7d4e8d21f6c311f67a7ef4b" + "000000005e0be100" + "0000000000000001" + diff --git a/x/tss/types/originator.go b/x/tss/types/originator.go index b47421538..cc5968b27 100644 --- a/x/tss/types/originator.go +++ b/x/tss/types/originator.go @@ -31,6 +31,15 @@ type Originator interface { // DirectOriginator // ==================================== +// NewDirectOriginator creates a new direct originator. +func NewDirectOriginator(sourceChainID, requester, memo string) DirectOriginator { + return DirectOriginator{ + SourceChainID: sourceChainID, + Requester: requester, + Memo: memo, + } +} + // Validate checks the validity of the originator. func (o DirectOriginator) Validate(p Params) error { if uint64(len(o.Memo)) > p.MaxMemoLength { @@ -44,10 +53,9 @@ func (o DirectOriginator) Validate(p Params) error { func (o DirectOriginator) Encode() ([]byte, error) { bz := bytes.Join([][]byte{ DirectOriginatorPrefix, - sdk.Uint64ToBigEndian(uint64(len(o.Requester))), - []byte(o.Requester), - sdk.Uint64ToBigEndian(uint64(len(o.Memo))), - []byte(o.Memo), + tss.Hash([]byte(o.SourceChainID)), + tss.Hash([]byte(o.Requester)), + tss.Hash([]byte(o.Memo)), }, []byte("")) return bz, nil @@ -57,6 +65,20 @@ func (o DirectOriginator) Encode() ([]byte, error) { // TunnelOriginator // ==================================== +// NewTunnelOriginator creates a new tunnel originator. +func NewTunnelOriginator( + sourceChainID string, + tunnelID uint64, + contractAddress, targetChainID string, +) TunnelOriginator { + return TunnelOriginator{ + SourceChainID: sourceChainID, + TunnelID: tunnelID, + ContractAddress: contractAddress, + TargetChainID: targetChainID, + } +} + // Validate checks the validity of the originator. func (o TunnelOriginator) Validate(p Params) error { return nil @@ -66,11 +88,10 @@ func (o TunnelOriginator) Validate(p Params) error { func (o TunnelOriginator) Encode() ([]byte, error) { bz := bytes.Join([][]byte{ TunnelOriginatorPrefix, + tss.Hash([]byte(o.SourceChainID)), sdk.Uint64ToBigEndian(o.TunnelID), - sdk.Uint64ToBigEndian(uint64(len(o.ContractAddress))), - []byte(o.ContractAddress), - sdk.Uint64ToBigEndian(uint64(len(o.ChainID))), - []byte(o.ChainID), + tss.Hash([]byte(o.ContractAddress)), + tss.Hash([]byte(o.TargetChainID)), }, []byte("")) return bz, nil diff --git a/x/tss/types/originator.pb.go b/x/tss/types/originator.pb.go index 66df24387..b4849e87a 100644 --- a/x/tss/types/originator.pb.go +++ b/x/tss/types/originator.pb.go @@ -26,10 +26,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // DirectOriginator is a message originator defines an information of the requester // on direct TSS request. type DirectOriginator struct { + // source_chain_id is the source chain ID that the data is originated from. + SourceChainID string `protobuf:"bytes,1,opt,name=source_chain_id,json=sourceChainId,proto3" json:"source_chain_id,omitempty"` // requester is the address of the requester, it can be the user address or module address. - Requester string `protobuf:"bytes,1,opt,name=requester,proto3" json:"requester,omitempty"` + Requester string `protobuf:"bytes,2,opt,name=requester,proto3" json:"requester,omitempty"` // memo is the note of the message. - Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` } func (m *DirectOriginator) Reset() { *m = DirectOriginator{} } @@ -65,6 +67,13 @@ func (m *DirectOriginator) XXX_DiscardUnknown() { var xxx_messageInfo_DirectOriginator proto.InternalMessageInfo +func (m *DirectOriginator) GetSourceChainID() string { + if m != nil { + return m.SourceChainID + } + return "" +} + func (m *DirectOriginator) GetRequester() string { if m != nil { return m.Requester @@ -82,12 +91,14 @@ func (m *DirectOriginator) GetMemo() string { // TunnelOriginator is a message originator defines an information of the requester // on TSS request via tunnel module. type TunnelOriginator struct { + // source_chain_id is the source chain ID that the data is originated from. + SourceChainID string `protobuf:"bytes,1,opt,name=source_chain_id,json=sourceChainId,proto3" json:"source_chain_id,omitempty"` // tunnel_id is the tunnel ID that the request is originated from. - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + TunnelID uint64 `protobuf:"varint,2,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // contract_address is the target address that the data should be relayed to. - ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - // chain_id is the target chain ID that the data should be relayed to. - ChainID string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + ContractAddress string `protobuf:"bytes,3,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // target_chain_id is the target chain ID that the data should be relayed to. + TargetChainID string `protobuf:"bytes,4,opt,name=target_chain_id,json=targetChainId,proto3" json:"target_chain_id,omitempty"` } func (m *TunnelOriginator) Reset() { *m = TunnelOriginator{} } @@ -123,6 +134,13 @@ func (m *TunnelOriginator) XXX_DiscardUnknown() { var xxx_messageInfo_TunnelOriginator proto.InternalMessageInfo +func (m *TunnelOriginator) GetSourceChainID() string { + if m != nil { + return m.SourceChainID + } + return "" +} + func (m *TunnelOriginator) GetTunnelID() uint64 { if m != nil { return m.TunnelID @@ -137,9 +155,9 @@ func (m *TunnelOriginator) GetContractAddress() string { return "" } -func (m *TunnelOriginator) GetChainID() string { +func (m *TunnelOriginator) GetTargetChainID() string { if m != nil { - return m.ChainID + return m.TargetChainID } return "" } @@ -152,26 +170,28 @@ func init() { func init() { proto.RegisterFile("band/tss/v1beta1/originator.proto", fileDescriptor_220839966f1ace88) } var fileDescriptor_220839966f1ace88 = []byte{ - // 294 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xcf, 0x4a, 0x33, 0x31, - 0x14, 0xc5, 0x9b, 0xef, 0x2b, 0xb6, 0x8d, 0x82, 0x43, 0x70, 0x51, 0x44, 0x52, 0xed, 0x42, 0x2c, - 0xc8, 0x84, 0xd2, 0x27, 0xb0, 0x0e, 0xc2, 0xac, 0x84, 0xe2, 0xca, 0x4d, 0xc9, 0x24, 0x61, 0x1a, - 0x68, 0x93, 0x9a, 0xdc, 0x16, 0x7d, 0x8b, 0x3e, 0x96, 0xcb, 0x2e, 0x5d, 0x15, 0x99, 0xbe, 0x88, - 0x24, 0x53, 0xff, 0xec, 0x2e, 0xe7, 0xfc, 0xee, 0x6f, 0x71, 0xf0, 0x55, 0xc1, 0x8d, 0x64, 0xe0, - 0x3d, 0x5b, 0x0f, 0x0b, 0x05, 0x7c, 0xc8, 0xac, 0xd3, 0xa5, 0x36, 0x1c, 0xac, 0x4b, 0x97, 0xce, - 0x82, 0x25, 0x49, 0x40, 0x52, 0xf0, 0x3e, 0x3d, 0x20, 0xe7, 0x67, 0xa5, 0x2d, 0x6d, 0x2c, 0x59, - 0xb8, 0x6a, 0xae, 0x9f, 0xe1, 0x24, 0xd3, 0x4e, 0x09, 0x78, 0xfc, 0x31, 0x90, 0x0b, 0xdc, 0x71, - 0xea, 0x65, 0xa5, 0x3c, 0x28, 0xd7, 0x45, 0x97, 0xe8, 0xa6, 0x33, 0xf9, 0x0d, 0x08, 0xc1, 0xcd, - 0x85, 0x5a, 0xd8, 0xee, 0xbf, 0x58, 0xc4, 0xbb, 0xbf, 0x41, 0x38, 0x79, 0x5a, 0x19, 0xa3, 0xe6, - 0x7f, 0x34, 0x03, 0xdc, 0x81, 0x98, 0x4d, 0xb5, 0x8c, 0x9a, 0xe6, 0xf8, 0xa4, 0xda, 0xf5, 0xda, - 0x35, 0x98, 0x67, 0x93, 0x76, 0x5d, 0xe7, 0x92, 0x0c, 0x70, 0x22, 0xac, 0x01, 0xc7, 0x05, 0x4c, - 0xb9, 0x94, 0x4e, 0x79, 0x7f, 0xf0, 0x9f, 0x7e, 0xe7, 0x77, 0x75, 0x4c, 0xae, 0x71, 0x5b, 0xcc, - 0xb8, 0x36, 0x41, 0xfa, 0x3f, 0x20, 0xe3, 0xe3, 0x6a, 0xd7, 0x6b, 0xdd, 0x87, 0x2c, 0xcf, 0x26, - 0xad, 0x58, 0xe6, 0x72, 0xfc, 0xf0, 0x5e, 0x51, 0xb4, 0xad, 0x28, 0xfa, 0xac, 0x28, 0xda, 0xec, - 0x69, 0x63, 0xbb, 0xa7, 0x8d, 0x8f, 0x3d, 0x6d, 0x3c, 0xdf, 0x96, 0x1a, 0x66, 0xab, 0x22, 0x15, - 0x76, 0xc1, 0xc2, 0x4a, 0x71, 0x08, 0x61, 0xe7, 0x2c, 0xbe, 0xb2, 0xf5, 0x88, 0xbd, 0xc6, 0x6d, - 0xe1, 0x6d, 0xa9, 0x7c, 0x71, 0x14, 0xeb, 0xd1, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0xf6, - 0x8e, 0x75, 0x74, 0x01, 0x00, 0x00, + // 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xc1, 0x4e, 0x32, 0x31, + 0x10, 0xc7, 0xe9, 0xf7, 0x11, 0x03, 0x8d, 0x84, 0x75, 0xe3, 0x81, 0x18, 0x53, 0x94, 0x93, 0x26, + 0x66, 0x1b, 0xc2, 0xc9, 0xa3, 0x48, 0x4c, 0x38, 0x99, 0x20, 0x27, 0x2f, 0xa4, 0xdb, 0x36, 0x4b, + 0x13, 0x68, 0xb1, 0x9d, 0x25, 0x7a, 0xf2, 0x15, 0x7c, 0x2c, 0x8f, 0x1c, 0x3d, 0x11, 0xb3, 0xbc, + 0x88, 0x69, 0x17, 0x81, 0x07, 0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0x0b, 0x8d, 0x03, 0xda, 0x09, 0xc1, 0xc1, + 0x57, 0xf4, 0x1f, 0x3e, 0x0b, 0x82, 0x56, 0x05, 0x41, 0xdf, 0x05, 0x41, 0x1f, 0x1b, 0x52, 0x59, + 0x6d, 0x48, 0xe5, 0x6b, 0x43, 0x2a, 0xcf, 0x37, 0x99, 0x82, 0x69, 0x9e, 0x26, 0xdc, 0xcc, 0xa9, + 0x3f, 0x57, 0xb8, 0x08, 0x37, 0x33, 0x1a, 0x76, 0xd0, 0x65, 0x8f, 0xbe, 0x86, 0x23, 0xc3, 0xdb, + 0x42, 0xba, 0xf4, 0x28, 0xe0, 0xde, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0xe0, 0x99, 0x12, + 0xfd, 0x01, 0x00, 0x00, } func (m *DirectOriginator) Marshal() (dAtA []byte, err error) { @@ -199,13 +219,20 @@ func (m *DirectOriginator) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Memo) i = encodeVarintOriginator(dAtA, i, uint64(len(m.Memo))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if len(m.Requester) > 0 { i -= len(m.Requester) copy(dAtA[i:], m.Requester) i = encodeVarintOriginator(dAtA, i, uint64(len(m.Requester))) i-- + dAtA[i] = 0x12 + } + if len(m.SourceChainID) > 0 { + i -= len(m.SourceChainID) + copy(dAtA[i:], m.SourceChainID) + i = encodeVarintOriginator(dAtA, i, uint64(len(m.SourceChainID))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -231,24 +258,31 @@ func (m *TunnelOriginator) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintOriginator(dAtA, i, uint64(len(m.ChainID))) + if len(m.TargetChainID) > 0 { + i -= len(m.TargetChainID) + copy(dAtA[i:], m.TargetChainID) + i = encodeVarintOriginator(dAtA, i, uint64(len(m.TargetChainID))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(m.ContractAddress) > 0 { i -= len(m.ContractAddress) copy(dAtA[i:], m.ContractAddress) i = encodeVarintOriginator(dAtA, i, uint64(len(m.ContractAddress))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if m.TunnelID != 0 { i = encodeVarintOriginator(dAtA, i, uint64(m.TunnelID)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x10 + } + if len(m.SourceChainID) > 0 { + i -= len(m.SourceChainID) + copy(dAtA[i:], m.SourceChainID) + i = encodeVarintOriginator(dAtA, i, uint64(len(m.SourceChainID))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -270,6 +304,10 @@ func (m *DirectOriginator) Size() (n int) { } var l int _ = l + l = len(m.SourceChainID) + if l > 0 { + n += 1 + l + sovOriginator(uint64(l)) + } l = len(m.Requester) if l > 0 { n += 1 + l + sovOriginator(uint64(l)) @@ -287,6 +325,10 @@ func (m *TunnelOriginator) Size() (n int) { } var l int _ = l + l = len(m.SourceChainID) + if l > 0 { + n += 1 + l + sovOriginator(uint64(l)) + } if m.TunnelID != 0 { n += 1 + sovOriginator(uint64(m.TunnelID)) } @@ -294,7 +336,7 @@ func (m *TunnelOriginator) Size() (n int) { if l > 0 { n += 1 + l + sovOriginator(uint64(l)) } - l = len(m.ChainID) + l = len(m.TargetChainID) if l > 0 { n += 1 + l + sovOriginator(uint64(l)) } @@ -337,6 +379,38 @@ func (m *DirectOriginator) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOriginator + } + 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 ErrInvalidLengthOriginator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOriginator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Requester", wireType) } @@ -368,7 +442,7 @@ func (m *DirectOriginator) Unmarshal(dAtA []byte) error { } m.Requester = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) } @@ -451,6 +525,38 @@ func (m *TunnelOriginator) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOriginator + } + 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 ErrInvalidLengthOriginator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOriginator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) } @@ -469,7 +575,7 @@ func (m *TunnelOriginator) Unmarshal(dAtA []byte) error { break } } - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) } @@ -501,9 +607,9 @@ func (m *TunnelOriginator) Unmarshal(dAtA []byte) error { } m.ContractAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetChainID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -531,7 +637,7 @@ func (m *TunnelOriginator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ChainID = string(dAtA[iNdEx:postIndex]) + m.TargetChainID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex From 5d3642c43c4d58ce9df42e5badbccff737fa661a Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 7 Nov 2024 16:51:31 +0700 Subject: [PATCH 231/272] fix triggerTunnel --- x/tunnel/keeper/msg_server.go | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index ad2f4ef4d..02e708429 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -5,9 +5,12 @@ import ( "errors" "fmt" + sdkerrors "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -214,15 +217,41 @@ func (ms msgServer) TriggerTunnel( signalIDs := tunnel.GetSignalIDs() currentPrices := ms.Keeper.feedsKeeper.GetCurrentPrices(ctx, signalIDs) - currentPricesMap := createPricesMap(currentPrices) - if err := ms.Keeper.ProducePacket(ctx, req.TunnelID, currentPricesMap, true); err != nil { + newSignalPrices := make([]types.SignalPrice, 0, len(signalIDs)) + for _, currentPrice := range currentPrices { + var price uint64 + if currentPrice.PriceStatus == feedstypes.PriceStatusAvailable { + price = currentPrice.Price + } + + newSignalPrices = append(newSignalPrices, types.NewSignalPrice(currentPrice.SignalID, price)) + } + + // create a new packet + packet, err := ms.CreatePacket(ctx, tunnel.ID, newSignalPrices) + if err != nil { + return nil, err + } + + // send packet + if err := ms.SendPacket(ctx, packet); err != nil { + return nil, sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) + } + + // update latest price info. + if err := ms.UpdatePriceTunnel(ctx, tunnel.ID, newSignalPrices); err != nil { + return nil, err + } + + if err := ms.UpdateLastInterval(ctx, tunnel.ID, ctx.BlockTime().Unix()); err != nil { return nil, err } ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeTriggerTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", tunnel.Sequence)), )) return &types.MsgTriggerTunnelResponse{}, nil From d5ca2d2768dabcca28b4cfaa245161a6a56108b5 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 7 Nov 2024 17:00:25 +0700 Subject: [PATCH 232/272] update latest price info --- x/tunnel/keeper/msg_server.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 02e708429..d8783a7a8 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -239,14 +239,15 @@ func (ms msgServer) TriggerTunnel( return nil, sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) } - // update latest price info. - if err := ms.UpdatePriceTunnel(ctx, tunnel.ID, newSignalPrices); err != nil { + latestSignalPrices, err := ms.GetLatestSignalPrices(ctx, tunnel.ID) + if err != nil { return nil, err } - if err := ms.UpdateLastInterval(ctx, tunnel.ID, ctx.BlockTime().Unix()); err != nil { - return nil, err - } + // update latest price info. + latestSignalPrices.LastInterval = ctx.BlockTime().Unix() + latestSignalPrices.SignalPrices = newSignalPrices + ms.SetLatestSignalPrices(ctx, latestSignalPrices) ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeTriggerTunnel, From 0388be24c576036474cf20612c1bfb390bd4b1d3 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 7 Nov 2024 17:22:38 +0700 Subject: [PATCH 233/272] fix from comments --- x/tunnel/keeper/deposit.go | 2 +- x/tunnel/keeper/packet.go | 32 +++++++++++--------------------- x/tunnel/keeper/packet_test.go | 23 +++++++++++++++++++---- x/tunnel/types/deposit.go | 4 ++-- 4 files changed, 33 insertions(+), 28 deletions(-) diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 3c48d6859..112f9e1a3 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -37,7 +37,7 @@ func (k Keeper) AddDeposit( // update the depositor's deposit deposit, found := k.GetDeposit(ctx, tunnelID, depositorAddr) if !found { - deposit = types.NewDeposit(tunnelID, depositorAddr, depositAmount) + deposit = types.NewDeposit(tunnelID, depositorAddr.String(), depositAmount) } else { deposit.Amount = deposit.Amount.Add(depositAmount...) } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index b70b7a56a..b7bd3e1c2 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -75,7 +75,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { } producePacketFunc := func(ctx sdk.Context) error { - return k.ProducePacket(ctx, id, currentPricesMap, false) + return k.ProducePacket(ctx, id, currentPricesMap) } // Produce a packet. If error, emits an event. @@ -94,7 +94,6 @@ func (k Keeper) ProducePacket( ctx sdk.Context, tunnelID uint64, currentPricesMap map[string]feedstypes.Price, - sendAll bool, ) error { unixNow := ctx.BlockTime().Unix() @@ -109,11 +108,15 @@ func (k Keeper) ProducePacket( } // check if the interval has passed - isIntervalReached := unixNow >= int64(tunnel.Interval)+latestSignalPrices.LastInterval - sendAll = sendAll || isIntervalReached + sendAll := unixNow >= int64(tunnel.Interval)+latestSignalPrices.LastInterval // generate new signal prices; if no new signal prices, stop the process. - newSignalPrices, err := k.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + newSignalPrices, err := k.GenerateNewSignalPrices( + latestSignalPrices, + tunnel.GetSignalDeviationMap(), + currentPricesMap, + sendAll, + ) if err != nil { return err } @@ -214,24 +217,11 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { // GenerateNewSignalPrices generates new signal prices based on the current prices // and signal deviations. func (k Keeper) GenerateNewSignalPrices( - ctx sdk.Context, - tunnelID uint64, + latestSignalPrices types.LatestSignalPrices, + signalDeviationsMap map[string]types.SignalDeviation, currentFeedsPricesMap map[string]feedstypes.Price, sendAll bool, ) ([]types.SignalPrice, error) { - // get deviation info from the tunnel - tunnel, err := k.GetTunnel(ctx, tunnelID) - if err != nil { - return nil, err - } - signalDeviations := tunnel.GetSignalDeviationMap() - - // get latest signal prices - latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) - if err != nil { - return nil, err - } - shouldSend := false newSignalPrices := make([]types.SignalPrice, 0) for _, sp := range latestSignalPrices.SignalPrices { @@ -246,7 +236,7 @@ func (k Keeper) GenerateNewSignalPrices( newPrice := sdkmath.NewIntFromUint64(price) // get hard/soft deviation, panic if not found; should not happen. - sd, ok := signalDeviations[sp.SignalID] + sd, ok := signalDeviationsMap[sp.SignalID] if !ok { panic(fmt.Sprintf("deviation not found for signal ID: %s", sp.SignalID)) } diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index 045fadc90..d65368e4c 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -89,7 +89,7 @@ func (s *KeeperTestSuite) TestProducePacket() { {SignalID: "BTC/USD", Price: 0}, }, 0)) - err = k.ProducePacket(ctx, tunnelID, currentPricesMap, false) + err = k.ProducePacket(ctx, tunnelID, currentPricesMap) s.Require().NoError(err) } @@ -224,7 +224,12 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesSendAll() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - newSignalPrices, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + newSignalPrices, err := s.keeper.GenerateNewSignalPrices( + latestSignalPrices, + tunnel.GetSignalDeviationMap(), + currentPricesMap, + sendAll, + ) s.Require().NoError(err) s.Require().Len(newSignalPrices, 1) } @@ -253,7 +258,12 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - newSignalPrices, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + newSignalPrices, err := s.keeper.GenerateNewSignalPrices( + latestSignalPrices, + tunnel.GetSignalDeviationMap(), + currentPricesMap, + sendAll, + ) s.Require().NoError(err) s.Require().Len(newSignalPrices, 2) } @@ -282,7 +292,12 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - newSignalPrices, err := s.keeper.GenerateNewSignalPrices(ctx, tunnelID, currentPricesMap, sendAll) + newSignalPrices, err := s.keeper.GenerateNewSignalPrices( + latestSignalPrices, + tunnel.GetSignalDeviationMap(), + currentPricesMap, + sendAll, + ) s.Require().NoError(err) s.Require().Len(newSignalPrices, 0) } diff --git a/x/tunnel/types/deposit.go b/x/tunnel/types/deposit.go index 1fb37ef2b..efdf3951b 100644 --- a/x/tunnel/types/deposit.go +++ b/x/tunnel/types/deposit.go @@ -3,10 +3,10 @@ package types import sdk "github.com/cosmos/cosmos-sdk/types" // NewDeposit creates a new Deposit instance -func NewDeposit(tunnelID uint64, depositor sdk.AccAddress, amount sdk.Coins) Deposit { +func NewDeposit(tunnelID uint64, depositor string, amount sdk.Coins) Deposit { return Deposit{ TunnelID: tunnelID, - Depositor: depositor.String(), + Depositor: depositor, Amount: amount, } } From c857d80b86572243247737d763204f67d685e6a6 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 7 Nov 2024 17:29:54 +0700 Subject: [PATCH 234/272] move to helper file --- x/tunnel/keeper/helper.go | 58 ++++++++++++++++++ x/tunnel/keeper/helper_test.go | 106 +++++++++++++++++++++++++++++++++ x/tunnel/keeper/packet.go | 50 +--------------- x/tunnel/keeper/packet_test.go | 99 ------------------------------ 4 files changed, 165 insertions(+), 148 deletions(-) create mode 100644 x/tunnel/keeper/helper.go create mode 100644 x/tunnel/keeper/helper_test.go diff --git a/x/tunnel/keeper/helper.go b/x/tunnel/keeper/helper.go new file mode 100644 index 000000000..1c4b18113 --- /dev/null +++ b/x/tunnel/keeper/helper.go @@ -0,0 +1,58 @@ +package keeper + +import ( + "fmt" + + sdkmath "cosmossdk.io/math" + + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +// GenerateNewSignalPrices generates new signal prices based on the current prices +// and signal deviations. +func GenerateNewSignalPrices( + latestSignalPrices types.LatestSignalPrices, + signalDeviationsMap map[string]types.SignalDeviation, + currentFeedsPricesMap map[string]feedstypes.Price, + sendAll bool, +) ([]types.SignalPrice, error) { + shouldSend := false + newSignalPrices := make([]types.SignalPrice, 0) + for _, sp := range latestSignalPrices.SignalPrices { + oldPrice := sdkmath.NewIntFromUint64(sp.Price) + + // get current price from the feed, if not found, set price to 0 + price := uint64(0) + feedPrice, ok := currentFeedsPricesMap[sp.SignalID] + if ok && feedPrice.PriceStatus == feedstypes.PriceStatusAvailable { + price = feedPrice.Price + } + newPrice := sdkmath.NewIntFromUint64(price) + + // get hard/soft deviation, panic if not found; should not happen. + sd, ok := signalDeviationsMap[sp.SignalID] + if !ok { + panic(fmt.Sprintf("deviation not found for signal ID: %s", sp.SignalID)) + } + hardDeviation := sdkmath.NewIntFromUint64(sd.HardDeviationBPS) + softDeviation := sdkmath.NewIntFromUint64(sd.SoftDeviationBPS) + + // calculate deviation between old price and new price and compare with the threshold. + // shouldSend is set to true if sendAll is true or there is a signal whose deviation + // is over the hard threshold. + deviation := calculateDeviationBPS(oldPrice, newPrice) + if sendAll || deviation.GTE(hardDeviation) { + newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) + shouldSend = true + } else if deviation.GTE(softDeviation) { + newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) + } + } + + if shouldSend { + return newSignalPrices, nil + } else { + return []types.SignalPrice{}, nil + } +} diff --git a/x/tunnel/keeper/helper_test.go b/x/tunnel/keeper/helper_test.go new file mode 100644 index 000000000..6d6e4bd74 --- /dev/null +++ b/x/tunnel/keeper/helper_test.go @@ -0,0 +1,106 @@ +package keeper_test + +import ( + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" + "github.com/bandprotocol/chain/v3/x/tunnel/keeper" + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func (s *KeeperTestSuite) TestGenerateSignalPricesSendAll() { + ctx := s.ctx + + tunnelID := uint64(1) + currentPricesMap := map[string]feedstypes.Price{ + "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + } + sendAll := true + tunnel := types.Tunnel{ + ID: tunnelID, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, + }, + } + latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 0}, + }, 0) + + s.keeper.SetTunnel(ctx, tunnel) + s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + + newSignalPrices, err := keeper.GenerateNewSignalPrices( + latestSignalPrices, + tunnel.GetSignalDeviationMap(), + currentPricesMap, + sendAll, + ) + s.Require().NoError(err) + s.Require().Len(newSignalPrices, 1) +} + +func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { + ctx := s.ctx + + tunnelID := uint64(1) + currentPricesMap := map[string]feedstypes.Price{ + "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "ETH/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, + } + sendAll := false + tunnel := types.Tunnel{ + ID: tunnelID, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, + {SignalID: "ETH/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, + }, + } + latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 48500}, // 3% + {SignalID: "ETH/USD", Price: 1980}, // 1% + }, 0) + + s.keeper.SetTunnel(ctx, tunnel) + s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + + newSignalPrices, err := keeper.GenerateNewSignalPrices( + latestSignalPrices, + tunnel.GetSignalDeviationMap(), + currentPricesMap, + sendAll, + ) + s.Require().NoError(err) + s.Require().Len(newSignalPrices, 2) +} + +func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { + ctx := s.ctx + + tunnelID := uint64(1) + currentPricesMap := map[string]feedstypes.Price{ + "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "ETH/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, + } + sendAll := false + tunnel := types.Tunnel{ + ID: tunnelID, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, + {SignalID: "ETH/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, + }, + } + latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + {SignalID: "BTC/USD", Price: 49000}, // 2% + {SignalID: "ETH/USD", Price: 1950}, // 2.5% + }, 0) + + s.keeper.SetTunnel(ctx, tunnel) + s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + + newSignalPrices, err := keeper.GenerateNewSignalPrices( + latestSignalPrices, + tunnel.GetSignalDeviationMap(), + currentPricesMap, + sendAll, + ) + s.Require().NoError(err) + s.Require().Len(newSignalPrices, 0) +} diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index b7bd3e1c2..3edf32810 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -111,7 +111,7 @@ func (k Keeper) ProducePacket( sendAll := unixNow >= int64(tunnel.Interval)+latestSignalPrices.LastInterval // generate new signal prices; if no new signal prices, stop the process. - newSignalPrices, err := k.GenerateNewSignalPrices( + newSignalPrices, err := GenerateNewSignalPrices( latestSignalPrices, tunnel.GetSignalDeviationMap(), currentPricesMap, @@ -214,54 +214,6 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { return nil } -// GenerateNewSignalPrices generates new signal prices based on the current prices -// and signal deviations. -func (k Keeper) GenerateNewSignalPrices( - latestSignalPrices types.LatestSignalPrices, - signalDeviationsMap map[string]types.SignalDeviation, - currentFeedsPricesMap map[string]feedstypes.Price, - sendAll bool, -) ([]types.SignalPrice, error) { - shouldSend := false - newSignalPrices := make([]types.SignalPrice, 0) - for _, sp := range latestSignalPrices.SignalPrices { - oldPrice := sdkmath.NewIntFromUint64(sp.Price) - - // get current price from the feed, if not found, set price to 0 - price := uint64(0) - feedPrice, ok := currentFeedsPricesMap[sp.SignalID] - if ok && feedPrice.PriceStatus == feedstypes.PriceStatusAvailable { - price = feedPrice.Price - } - newPrice := sdkmath.NewIntFromUint64(price) - - // get hard/soft deviation, panic if not found; should not happen. - sd, ok := signalDeviationsMap[sp.SignalID] - if !ok { - panic(fmt.Sprintf("deviation not found for signal ID: %s", sp.SignalID)) - } - hardDeviation := sdkmath.NewIntFromUint64(sd.HardDeviationBPS) - softDeviation := sdkmath.NewIntFromUint64(sd.SoftDeviationBPS) - - // calculate deviation between old price and new price and compare with the threshold. - // shouldSend is set to true if sendAll is true or there is a signal whose deviation - // is over the hard threshold. - deviation := calculateDeviationBPS(oldPrice, newPrice) - if sendAll || deviation.GTE(hardDeviation) { - newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) - shouldSend = true - } else if deviation.GTE(softDeviation) { - newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) - } - } - - if shouldSend { - return newSignalPrices, nil - } else { - return []types.SignalPrice{}, nil - } -} - // calculateDeviationBPS calculates the deviation between the old price and // the new price in basis points, i.e., |(newPrice - oldPrice)| * 10000 / oldPrice func calculateDeviationBPS(oldPrice, newPrice sdkmath.Int) sdkmath.Int { diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index d65368e4c..af857ac78 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -202,102 +202,3 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { activeTunnels := k.GetActiveTunnelIDs(ctx) s.Require().Len(activeTunnels, 0) } - -func (s *KeeperTestSuite) TestGenerateSignalPricesSendAll() { - ctx := s.ctx - - tunnelID := uint64(1) - currentPricesMap := map[string]feedstypes.Price{ - "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - } - sendAll := true - tunnel := types.Tunnel{ - ID: tunnelID, - SignalDeviations: []types.SignalDeviation{ - {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, - }, - } - latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ - {SignalID: "BTC/USD", Price: 0}, - }, 0) - - s.keeper.SetTunnel(ctx, tunnel) - s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - - newSignalPrices, err := s.keeper.GenerateNewSignalPrices( - latestSignalPrices, - tunnel.GetSignalDeviationMap(), - currentPricesMap, - sendAll, - ) - s.Require().NoError(err) - s.Require().Len(newSignalPrices, 1) -} - -func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { - ctx := s.ctx - - tunnelID := uint64(1) - currentPricesMap := map[string]feedstypes.Price{ - "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - "ETH/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, - } - sendAll := false - tunnel := types.Tunnel{ - ID: tunnelID, - SignalDeviations: []types.SignalDeviation{ - {SignalID: "BTC/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, - {SignalID: "ETH/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, - }, - } - latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ - {SignalID: "BTC/USD", Price: 48500}, // 3% - {SignalID: "ETH/USD", Price: 1980}, // 1% - }, 0) - - s.keeper.SetTunnel(ctx, tunnel) - s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - - newSignalPrices, err := s.keeper.GenerateNewSignalPrices( - latestSignalPrices, - tunnel.GetSignalDeviationMap(), - currentPricesMap, - sendAll, - ) - s.Require().NoError(err) - s.Require().Len(newSignalPrices, 2) -} - -func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { - ctx := s.ctx - - tunnelID := uint64(1) - currentPricesMap := map[string]feedstypes.Price{ - "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - "ETH/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, - } - sendAll := false - tunnel := types.Tunnel{ - ID: tunnelID, - SignalDeviations: []types.SignalDeviation{ - {SignalID: "BTC/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, - {SignalID: "ETH/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, - }, - } - latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ - {SignalID: "BTC/USD", Price: 49000}, // 2% - {SignalID: "ETH/USD", Price: 1950}, // 2.5% - }, 0) - - s.keeper.SetTunnel(ctx, tunnel) - s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) - - newSignalPrices, err := s.keeper.GenerateNewSignalPrices( - latestSignalPrices, - tunnel.GetSignalDeviationMap(), - currentPricesMap, - sendAll, - ) - s.Require().NoError(err) - s.Require().Len(newSignalPrices, 0) -} From 99e8c7bf9008840e566d3074e5260ec760c53607 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Thu, 7 Nov 2024 17:42:43 +0700 Subject: [PATCH 235/272] add error --- x/tunnel/keeper/helper.go | 4 +--- x/tunnel/types/errors.go | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x/tunnel/keeper/helper.go b/x/tunnel/keeper/helper.go index 1c4b18113..37ecdbb06 100644 --- a/x/tunnel/keeper/helper.go +++ b/x/tunnel/keeper/helper.go @@ -1,8 +1,6 @@ package keeper import ( - "fmt" - sdkmath "cosmossdk.io/math" feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" @@ -33,7 +31,7 @@ func GenerateNewSignalPrices( // get hard/soft deviation, panic if not found; should not happen. sd, ok := signalDeviationsMap[sp.SignalID] if !ok { - panic(fmt.Sprintf("deviation not found for signal ID: %s", sp.SignalID)) + return nil, types.ErrDeviationNotFound.Wrapf("deviation not found for signal ID :%s", sp.SignalID) } hardDeviation := sdkmath.NewIntFromUint64(sd.HardDeviationBPS) softDeviation := sdkmath.NewIntFromUint64(sd.SoftDeviationBPS) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index deef970bd..ad308879a 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -24,4 +24,5 @@ var ( ErrInsufficientDeposit = errorsmod.Register(ModuleName, 17, "insufficient deposit") ErrSignalPricesNotFound = errorsmod.Register(ModuleName, 18, "signal prices not found") ErrInsufficientFund = errorsmod.Register(ModuleName, 19, "insufficient fund") + ErrDeviationNotFound = errorsmod.Register(ModuleName, 20, "deviation not found") ) From 0eced5b658ce42b1a1a19fdbadd7a0c0b7f504ca Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 8 Nov 2024 12:07:46 +0700 Subject: [PATCH 236/272] add test --- x/tunnel/client/cli/tx.go | 2 +- x/tunnel/keeper/msg_server_test.go | 193 +++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+), 1 deletion(-) diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index fc7d06873..b128ee434 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -255,7 +255,7 @@ func GetTxCmdDepositTunnel() *cobra.Command { func GetTxCmdWithdrawTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "withdraw [tunnel-id] [amount]", + Use: "withdraw-tunnel [tunnel-id] [amount]", Short: "Withdraw deposit from a tunnel", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index ee991ba2f..8132195b5 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -6,6 +6,7 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" @@ -474,6 +475,198 @@ func (s *KeeperTestSuite) TestMsgTriggerTunnel() { } } +func (s *KeeperTestSuite) TestMsgDepositTunnel() { + cases := map[string]struct { + preRun func() *types.MsgDepositTunnel + expErr bool + expErrMsg string + }{ + "tunnel not found": { + preRun: func() *types.MsgDepositTunnel { + return types.NewMsgDepositTunnel( + 1, + sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + sdk.AccAddress([]byte("depositor")).String(), + ) + }, + expErr: true, + expErrMsg: "tunnel not found", + }, + "invalid deposit denom": { + preRun: func() *types.MsgDepositTunnel { + s.AddSampleTunnel(true) + + return types.NewMsgDepositTunnel( + 1, + sdk.NewCoins(sdk.NewCoin("invalid_denom", sdkmath.NewInt(100))), + sdk.AccAddress([]byte("depositor")).String(), + ) + }, + expErr: true, + expErrMsg: "invalid deposit denom", + }, + "insufficient fund": { + preRun: func() *types.MsgDepositTunnel { + s.AddSampleTunnel(true) + + s.bankKeeper.EXPECT(). + SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), types.ModuleName, gomock.Any()). + Return(sdkerrors.ErrInsufficientFunds) + + return types.NewMsgDepositTunnel( + 1, + sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + sdk.AccAddress([]byte("depositor")).String(), + ) + }, + expErr: true, + expErrMsg: "insufficient fund", + }, + "all good": { + preRun: func() *types.MsgDepositTunnel { + s.AddSampleTunnel(true) + + s.bankKeeper.EXPECT(). + SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), types.ModuleName, gomock.Any()). + Return(nil) + + return types.NewMsgDepositTunnel( + 1, + sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + sdk.AccAddress([]byte("depositor")).String(), + ) + }, + expErr: false, + expErrMsg: "", + }, + } + + for name, tc := range cases { + s.Run(name, func() { + msg := tc.preRun() + + _, err := s.msgServer.DepositTunnel(s.ctx, msg) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + } + + s.reset() + }) + } +} + +func (s *KeeperTestSuite) TestMsgWithdrawTunnel() { + cases := map[string]struct { + preRun func() *types.MsgWithdrawTunnel + expErr bool + expErrMsg string + }{ + "tunnel not found": { + preRun: func() *types.MsgWithdrawTunnel { + return types.NewMsgWithdrawTunnel( + 1, + sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + sdk.AccAddress([]byte("depositor")).String(), + ) + }, + expErr: true, + expErrMsg: "tunnel not found", + }, + "deposit not found": { + preRun: func() *types.MsgWithdrawTunnel { + s.AddSampleTunnel(true) + + return types.NewMsgWithdrawTunnel( + 1, + sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + sdk.AccAddress([]byte("depositor")).String(), + ) + }, + expErr: true, + expErrMsg: "deposit not found", + }, + "insufficient deposit": { + preRun: func() *types.MsgWithdrawTunnel { + s.AddSampleTunnel(true) + + depositor := sdk.AccAddress([]byte("depositor")) + deposit := types.Deposit{ + TunnelID: 1, + Depositor: depositor.String(), + Amount: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + } + + s.keeper.SetDeposit( + s.ctx, + deposit, + ) + + s.bankKeeper.EXPECT(). + SendCoinsFromModuleToAccount(gomock.Any(), gomock.Any(), types.ModuleName, gomock.Any()). + Return(sdkerrors.ErrInsufficientFunds) + + return types.NewMsgWithdrawTunnel( + 1, + sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(1000))), + depositor.String(), + ) + }, + expErr: true, + expErrMsg: "insufficient deposit", + }, + "all good": { + preRun: func() *types.MsgWithdrawTunnel { + s.AddSampleTunnel(true) + + amount := sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))) + + depositor := sdk.AccAddress([]byte("depositor")) + deposit := types.Deposit{ + TunnelID: 1, + Depositor: depositor.String(), + Amount: amount, + } + + s.keeper.SetDeposit( + s.ctx, + deposit, + ) + + s.bankKeeper.EXPECT(). + SendCoinsFromModuleToAccount(gomock.Any(), types.ModuleName, depositor, amount). + Return(nil) + + return types.NewMsgWithdrawTunnel( + 1, + amount, + depositor.String(), + ) + }, + expErr: false, + expErrMsg: "", + }, + } + + for name, tc := range cases { + s.Run(name, func() { + msg := tc.preRun() + + _, err := s.msgServer.WithdrawTunnel(s.ctx, msg) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + } + + s.reset() + }) + } +} + func (s *KeeperTestSuite) TestMsgUpdateParams() { params := types.DefaultParams() From 8170583d47f061a5012caf3139a02803f81e6e87 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 11 Nov 2024 03:56:27 +0700 Subject: [PATCH 237/272] fix issue and add script --- scripts/tunnel/activate_tunnel.sh | 1 + scripts/tunnel/create_tunnel.sh | 0 scripts/tunnel/deposit_tunnel.sh | 1 + scripts/tunnel/update_and_reset_tunnel.sh | 0 scripts/tunnel/withdraw.sh | 1 + x/tunnel/keeper/deposit.go | 2 +- x/tunnel/keeper/packet.go | 2 +- x/tunnel/keeper/tunnel.go | 4 ++-- x/tunnel/types/events.go | 4 ++-- 9 files changed, 9 insertions(+), 6 deletions(-) create mode 100755 scripts/tunnel/activate_tunnel.sh mode change 100644 => 100755 scripts/tunnel/create_tunnel.sh create mode 100755 scripts/tunnel/deposit_tunnel.sh mode change 100644 => 100755 scripts/tunnel/update_and_reset_tunnel.sh create mode 100755 scripts/tunnel/withdraw.sh diff --git a/scripts/tunnel/activate_tunnel.sh b/scripts/tunnel/activate_tunnel.sh new file mode 100755 index 000000000..5aa8099ce --- /dev/null +++ b/scripts/tunnel/activate_tunnel.sh @@ -0,0 +1 @@ +bandd tx tunnel activate 1 --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/create_tunnel.sh b/scripts/tunnel/create_tunnel.sh old mode 100644 new mode 100755 diff --git a/scripts/tunnel/deposit_tunnel.sh b/scripts/tunnel/deposit_tunnel.sh new file mode 100755 index 000000000..17f62e424 --- /dev/null +++ b/scripts/tunnel/deposit_tunnel.sh @@ -0,0 +1 @@ +bandd tx tunnel deposit-tunnel 1 1000000000uband --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/update_and_reset_tunnel.sh b/scripts/tunnel/update_and_reset_tunnel.sh old mode 100644 new mode 100755 diff --git a/scripts/tunnel/withdraw.sh b/scripts/tunnel/withdraw.sh new file mode 100755 index 000000000..26615cadb --- /dev/null +++ b/scripts/tunnel/withdraw.sh @@ -0,0 +1 @@ +bandd tx tunnel withdraw 1 1000000000uband --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 112f9e1a3..93f908db1 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -164,7 +164,7 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi // deactivate the tunnel if the total deposit is less than the min deposit minDeposit := k.GetParams(ctx).MinDeposit - if !tunnel.TotalDeposit.IsAllGTE(minDeposit) { + if tunnel.IsActive && !tunnel.TotalDeposit.IsAllGTE(minDeposit) { k.MustDeactivateTunnel(ctx, tunnelID) } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 3edf32810..5a6c14122 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -149,7 +149,7 @@ func (k Keeper) ProducePacket( ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeProducePacketSuccess, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", tunnel.Sequence)), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), )) return nil diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/tunnel.go index 4e02654b9..8f61e6e2b 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/tunnel.go @@ -193,7 +193,7 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { k.SetTunnel(ctx, tunnel) ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeActivate, + types.EventTypeActivateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", true)), )) @@ -216,7 +216,7 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { k.SetTunnel(ctx, tunnel) ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeDeactivate, + types.EventTypeDeactivateTunnel, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), )) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 06dd19a45..b933f6681 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -5,8 +5,8 @@ const ( EventTypeUpdateParams = "update_params" EventTypeCreateTunnel = "create_tunnel" EventTypeUpdateAndResetTunnel = "update_and_reset_tunnel" - EventTypeActivate = "activate" - EventTypeDeactivate = "deactivate" + EventTypeActivateTunnel = "activate_tunnel" + EventTypeDeactivateTunnel = "deactivate_tunnel" EventTypeTriggerTunnel = "trigger_tunnel" EventTypeProducePacketFail = "produce_packet_fail" EventTypeProducePacketSuccess = "produce_packet_success" From e81fdc379e1ff5da1c581d6fe3d4d6a3ee76e7d4 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 11 Nov 2024 14:08:49 +0700 Subject: [PATCH 238/272] fix validate --- x/tunnel/keeper/deposit.go | 16 ----- x/tunnel/keeper/deposit_test.go | 21 ------- x/tunnel/keeper/genesis.go | 19 ++++-- x/tunnel/keeper/msg_server.go | 100 ++++++++++++++++---------------- x/tunnel/types/genesis.go | 46 ++++++++++++--- 5 files changed, 102 insertions(+), 100 deletions(-) diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/deposit.go index 93f908db1..52021d201 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/deposit.go @@ -101,22 +101,6 @@ func (k Keeper) GetAllDeposits(ctx sdk.Context) []types.Deposit { return deposits } -// GetTotalDeposits returns the total deposits in the store -func (k Keeper) GetTotalDeposits(ctx sdk.Context) sdk.Coins { - var amount sdk.Coins - - iterator := storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.DepositStoreKeyPrefix) - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var deposit types.Deposit - k.cdc.MustUnmarshal(iterator.Value(), &deposit) - amount = amount.Add(deposit.Amount...) - } - - return amount -} - // DeleteDeposit deletes a deposit from the store func (k Keeper) DeleteDeposit(ctx sdk.Context, tunnelID uint64, depositorAddr sdk.AccAddress) { ctx.KVStore(k.storeKey). diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/deposit_test.go index 713a63241..c937ab12e 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/deposit_test.go @@ -98,27 +98,6 @@ func (s *KeeperTestSuite) TestGetAllDeposits() { s.Require().Equal(deposit2, deposits[1]) } -func (s *KeeperTestSuite) TestGetTotalDeposits() { - ctx, k := s.ctx, s.keeper - - tunnelID1 := uint64(1) - depositorAddr1 := sdk.AccAddress([]byte("depositor")) - depositAmount1 := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(100))) - - deposit := types.Deposit{TunnelID: tunnelID1, Depositor: depositorAddr1.String(), Amount: depositAmount1} - k.SetDeposit(ctx, deposit) - - tunnelID2 := uint64(2) - depositorAddr2 := sdk.AccAddress([]byte("depositor2")) - depositAmount2 := sdk.NewCoins(sdk.NewCoin("band", sdkmath.NewInt(200))) - - deposit2 := types.Deposit{TunnelID: tunnelID2, Depositor: depositorAddr2.String(), Amount: depositAmount2} - k.SetDeposit(ctx, deposit2) - - deposits := k.GetTotalDeposits(ctx) - s.Require().Equal(depositAmount1.Add(depositAmount2...), deposits) -} - func (s *KeeperTestSuite) TestDeleteDeposit() { ctx, k := s.ctx, s.keeper diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 662827a46..1dc93fe10 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -19,12 +19,6 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { if moduleAcc == nil { panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) } - // set module account if its balance is zero - if balance := k.GetModuleBalance(ctx); balance.IsZero() { - k.SetModuleAccount(ctx, moduleAcc) - } else if !balance.Equal(k.GetTotalDeposits(ctx).Add(k.GetTotalFees(ctx).TotalPacketFee...)) { - panic("balance in the module account is not equal to the sum of total fees and total deposits") - } // set the tunnel count k.SetTunnelCount(ctx, data.TunnelCount) @@ -43,12 +37,25 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { } // set the deposits + var totalDeposits sdk.Coins for _, deposit := range data.Deposits { k.SetDeposit(ctx, deposit) + totalDeposits = totalDeposits.Add(deposit.Amount...) } // set the total fees k.SetTotalFees(ctx, data.TotalFees) + + balance := k.GetModuleBalance(ctx) + // set module account if its balance is zero + if balance.IsZero() { + k.SetModuleAccount(ctx, moduleAcc) + } + + totalBalance := totalDeposits.Add(data.TotalFees.TotalPacketFee...) + if !balance.Equal(totalBalance) { + panic("balance in the module account is not equal to the sum of total fees and total deposits") + } } // ExportGenesis returns the module's exported genesis diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index d8783a7a8..3e0709c50 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -28,25 +28,25 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { // CreateTunnel creates a new tunnel. func (ms msgServer) CreateTunnel( goCtx context.Context, - req *types.MsgCreateTunnel, + msg *types.MsgCreateTunnel, ) (*types.MsgCreateTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // validate signal infos and interval params := ms.Keeper.GetParams(ctx) - if len(req.SignalDeviations) > int(params.MaxSignals) { + if len(msg.SignalDeviations) > int(params.MaxSignals) { return nil, types.ErrMaxSignalsExceeded } - if req.Interval < params.MinInterval { + if msg.Interval < params.MinInterval { return nil, types.ErrIntervalTooLow } - creator, err := sdk.AccAddressFromBech32(req.Creator) + creator, err := sdk.AccAddressFromBech32(msg.Creator) if err != nil { return nil, err } - route, ok := req.Route.GetCachedValue().(types.RouteI) + route, ok := msg.Route.GetCachedValue().(types.RouteI) if !ok { return nil, errors.New("cannot create tunnel, failed to convert proto Any to routeI") } @@ -55,9 +55,9 @@ func (ms msgServer) CreateTunnel( tunnel, err := ms.Keeper.AddTunnel( ctx, route, - req.Encoder, - req.SignalDeviations, - req.Interval, + msg.Encoder, + msg.SignalDeviations, + msg.Interval, creator, ) if err != nil { @@ -65,8 +65,8 @@ func (ms msgServer) CreateTunnel( } // Deposit the initial deposit to the tunnel - if !req.InitialDeposit.IsZero() { - if err := ms.Keeper.AddDeposit(ctx, tunnel.ID, creator, req.InitialDeposit); err != nil { + if !msg.InitialDeposit.IsZero() { + if err := ms.Keeper.AddDeposit(ctx, tunnel.ID, creator, msg.InitialDeposit); err != nil { return nil, err } } @@ -78,13 +78,13 @@ func (ms msgServer) CreateTunnel( sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), sdk.NewAttribute(types.AttributeKeyRoute, tunnel.Route.String()), sdk.NewAttribute(types.AttributeKeyEncoder, tunnel.Encoder.String()), - sdk.NewAttribute(types.AttributeKeyInitialDeposit, req.InitialDeposit.String()), + sdk.NewAttribute(types.AttributeKeyInitialDeposit, msg.InitialDeposit.String()), sdk.NewAttribute(types.AttributeKeyFeePayer, tunnel.FeePayer), sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), sdk.NewAttribute(types.AttributeKeyCreatedAt, fmt.Sprintf("%d", tunnel.CreatedAt)), sdk.NewAttribute(types.AttributeKeyCreator, tunnel.Creator), ) - for _, sd := range req.SignalDeviations { + for _, sd := range msg.SignalDeviations { event = event.AppendAttributes( sdk.NewAttribute(types.AttributeKeySignalDeviation, sd.String()), ) @@ -99,29 +99,29 @@ func (ms msgServer) CreateTunnel( // UpdateAndResetTunnel edits a tunnel and reset latest signal price interval. func (ms msgServer) UpdateAndResetTunnel( goCtx context.Context, - req *types.MsgUpdateAndResetTunnel, + msg *types.MsgUpdateAndResetTunnel, ) (*types.MsgUpdateAndResetTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) // validate signal infos and interval params := ms.Keeper.GetParams(ctx) - if len(req.SignalDeviations) > int(params.MaxSignals) { + if len(msg.SignalDeviations) > int(params.MaxSignals) { return nil, types.ErrMaxSignalsExceeded } - if req.Interval < params.MinInterval { + if msg.Interval < params.MinInterval { return nil, types.ErrIntervalTooLow } - tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) + tunnel, err := ms.Keeper.GetTunnel(ctx, msg.TunnelID) if err != nil { return nil, err } - if req.Creator != tunnel.Creator { - return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", req.Creator, req.TunnelID) + if msg.Creator != tunnel.Creator { + return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", msg.Creator, msg.TunnelID) } - err = ms.Keeper.UpdateAndResetTunnel(ctx, req.TunnelID, req.SignalDeviations, req.Interval) + err = ms.Keeper.UpdateAndResetTunnel(ctx, msg.TunnelID, msg.SignalDeviations, msg.Interval) if err != nil { return nil, err } @@ -132,26 +132,26 @@ func (ms msgServer) UpdateAndResetTunnel( // Activate activates a tunnel. func (ms msgServer) Activate( goCtx context.Context, - req *types.MsgActivate, + msg *types.MsgActivate, ) (*types.MsgActivateResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) + tunnel, err := ms.Keeper.GetTunnel(ctx, msg.TunnelID) if err != nil { return nil, err } // check if the creator is the same - if req.Creator != tunnel.Creator { - return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", req.Creator, req.TunnelID) + if msg.Creator != tunnel.Creator { + return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", msg.Creator, msg.TunnelID) } // check if the tunnel is already active if tunnel.IsActive { - return nil, types.ErrAlreadyActive.Wrapf("tunnelID %d", req.TunnelID) + return nil, types.ErrAlreadyActive.Wrapf("tunnelID %d", msg.TunnelID) } - if err := ms.Keeper.ActivateTunnel(ctx, req.TunnelID); err != nil { + if err := ms.Keeper.ActivateTunnel(ctx, msg.TunnelID); err != nil { return nil, err } @@ -161,24 +161,24 @@ func (ms msgServer) Activate( // Deactivate deactivates a tunnel. func (ms msgServer) Deactivate( goCtx context.Context, - req *types.MsgDeactivate, + msg *types.MsgDeactivate, ) (*types.MsgDeactivateResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) + tunnel, err := ms.Keeper.GetTunnel(ctx, msg.TunnelID) if err != nil { return nil, err } - if req.Creator != tunnel.Creator { - return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", req.Creator, req.TunnelID) + if msg.Creator != tunnel.Creator { + return nil, types.ErrInvalidTunnelCreator.Wrapf("creator %s, tunnelID %d", msg.Creator, msg.TunnelID) } if !tunnel.IsActive { - return nil, types.ErrAlreadyInactive.Wrapf("tunnelID %d", req.TunnelID) + return nil, types.ErrAlreadyInactive.Wrapf("tunnelID %d", msg.TunnelID) } - if err := ms.Keeper.DeactivateTunnel(ctx, req.TunnelID); err != nil { + if err := ms.Keeper.DeactivateTunnel(ctx, msg.TunnelID); err != nil { return nil, err } @@ -188,23 +188,23 @@ func (ms msgServer) Deactivate( // TriggerTunnel manually triggers a tunnel. func (ms msgServer) TriggerTunnel( goCtx context.Context, - req *types.MsgTriggerTunnel, + msg *types.MsgTriggerTunnel, ) (*types.MsgTriggerTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - tunnel, err := ms.Keeper.GetTunnel(ctx, req.TunnelID) + tunnel, err := ms.Keeper.GetTunnel(ctx, msg.TunnelID) if err != nil { return nil, err } - if req.Creator != tunnel.Creator { + if msg.Creator != tunnel.Creator { return nil, types.ErrInvalidTunnelCreator.Wrapf( "creator %s, tunnelID %d", - req.Creator, - req.TunnelID, + msg.Creator, + msg.TunnelID, ) } if !tunnel.IsActive { - return nil, types.ErrInactiveTunnel.Wrapf("tunnelID %d", req.TunnelID) + return nil, types.ErrInactiveTunnel.Wrapf("tunnelID %d", msg.TunnelID) } ok, err := ms.Keeper.HasEnoughFundToCreatePacket(ctx, tunnel.ID) @@ -212,7 +212,7 @@ func (ms msgServer) TriggerTunnel( return nil, err } if !ok { - return nil, types.ErrInsufficientFund.Wrapf("tunnelID %d", req.TunnelID) + return nil, types.ErrInsufficientFund.Wrapf("tunnelID %d", msg.TunnelID) } signalIDs := tunnel.GetSignalIDs() @@ -251,7 +251,7 @@ func (ms msgServer) TriggerTunnel( ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeTriggerTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", req.TunnelID)), + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", msg.TunnelID)), sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", tunnel.Sequence)), )) @@ -261,16 +261,16 @@ func (ms msgServer) TriggerTunnel( // DepositTunnel adds deposit to the tunnel. func (ms msgServer) DepositTunnel( goCtx context.Context, - req *types.MsgDepositTunnel, + msg *types.MsgDepositTunnel, ) (*types.MsgDepositTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - depositor, err := sdk.AccAddressFromBech32(req.Depositor) + depositor, err := sdk.AccAddressFromBech32(msg.Depositor) if err != nil { return nil, err } - if err := ms.Keeper.AddDeposit(ctx, req.TunnelID, depositor, req.Amount); err != nil { + if err := ms.Keeper.AddDeposit(ctx, msg.TunnelID, depositor, msg.Amount); err != nil { return nil, err } @@ -280,17 +280,17 @@ func (ms msgServer) DepositTunnel( // WithdrawTunnel withdraws deposit from the tunnel. func (ms msgServer) WithdrawTunnel( goCtx context.Context, - req *types.MsgWithdrawTunnel, + msg *types.MsgWithdrawTunnel, ) (*types.MsgWithdrawTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - withdrawer, err := sdk.AccAddressFromBech32(req.Withdrawer) + withdrawer, err := sdk.AccAddressFromBech32(msg.Withdrawer) if err != nil { return nil, err } // Withdraw the deposit from the tunnel - if err := ms.Keeper.WithdrawDeposit(ctx, req.TunnelID, req.Amount, withdrawer); err != nil { + if err := ms.Keeper.WithdrawDeposit(ctx, msg.TunnelID, msg.Amount, withdrawer); err != nil { return nil, err } @@ -300,25 +300,25 @@ func (ms msgServer) WithdrawTunnel( // UpdateParams updates the module params. func (ms msgServer) UpdateParams( goCtx context.Context, - req *types.MsgUpdateParams, + msg *types.MsgUpdateParams, ) (*types.MsgUpdateParamsResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - if ms.authority != req.Authority { + if ms.authority != msg.Authority { return nil, govtypes.ErrInvalidSigner.Wrapf( "invalid authority; expected %s, got %s", ms.authority, - req.Authority, + msg.Authority, ) } - if err := ms.SetParams(ctx, req.Params); err != nil { + if err := ms.SetParams(ctx, msg.Params); err != nil { return nil, err } ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeUpdateParams, - sdk.NewAttribute(types.AttributeKeyParams, req.Params.String()), + sdk.NewAttribute(types.AttributeKeyParams, msg.Params.String()), )) return &types.MsgUpdateParamsResponse{}, nil diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 873d41dd0..5135ae838 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -1,6 +1,10 @@ package types -import "fmt" +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) // NewGenesisState creates a new GenesisState instanc e func NewGenesisState( @@ -32,15 +36,15 @@ func ValidateGenesis(data GenesisState) error { } // validate the tunnel IDs - tunnelIDMap := make(map[uint64]bool) + tunnelIDs := make(map[uint64]bool) for _, t := range data.Tunnels { if t.ID > data.TunnelCount { return ErrInvalidGenesis.Wrapf("tunnel count mismatch in tunnels") } - if _, exists := tunnelIDMap[t.ID]; exists { + if _, exists := tunnelIDs[t.ID]; exists { return ErrInvalidGenesis.Wrapf("duplicate tunnel ID found: %d", t.ID) } - tunnelIDMap[t.ID] = true + tunnelIDs[t.ID] = true } // validate the latest signal prices count @@ -49,10 +53,38 @@ func ValidateGenesis(data GenesisState) error { } // validate latest signal prices - if err := validateLastSignalPricesList(data.Tunnels, data.LatestSignalPricesList); err != nil { + if err := validateLastestSignalPricesList(data.Tunnels, data.LatestSignalPricesList); err != nil { return ErrInvalidGenesis.Wrapf("invalid latest signal prices: %s", err.Error()) } + // validate no duplicated deposits + type depositKey struct { + TunnelID uint64 + Depositor string + } + deposits := make(map[depositKey]bool) + tunnelDeposit := make(map[uint64]sdk.Coins) + for _, d := range data.Deposits { + if _, ok := tunnelIDs[d.TunnelID]; !ok { + return ErrInvalidGenesis.Wrapf("deposit %v has non-existent tunnel id: %d", d, d.TunnelID) + } + + dk := depositKey{d.TunnelID, d.Depositor} + if _, ok := deposits[dk]; ok { + return ErrInvalidGenesis.Wrapf("duplicate deposit: %v", d) + } + + deposits[dk] = true + tunnelDeposit[d.TunnelID] = tunnelDeposit[d.TunnelID].Add(d.Amount...) + } + + // validate total deposit on tunnels with deposits + for _, t := range data.Tunnels { + if !t.TotalDeposit.Equal(tunnelDeposit[t.ID]) { + return ErrInvalidGenesis.Wrapf("deposits mismatch total deposit for tunnel %d", t.ID) + } + } + // validate the total fees if err := data.TotalFees.Validate(); err != nil { return ErrInvalidGenesis.Wrapf("invalid total fees: %s", err.Error()) @@ -69,8 +101,8 @@ func (tf TotalFees) Validate() error { return nil } -// validateLastSignalPricesList validates the latest signal prices list. -func validateLastSignalPricesList( +// validateLastestSignalPricesList validates the latest signal prices list. +func validateLastestSignalPricesList( tunnels []Tunnel, latestSignalPricesList []LatestSignalPrices, ) error { From 003cf534ac83ea2f31f6d8736acbd8abab24d157 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 11 Nov 2024 15:25:37 +0700 Subject: [PATCH 239/272] fix test --- x/tunnel/keeper/genesis_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index 10ec2f03c..f09a85922 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -145,7 +145,10 @@ func (s *KeeperTestSuite) TestInitExportGenesis() { AnyTimes() s.accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(sdk.AccAddress{}).AnyTimes() s.accountKeeper.EXPECT().SetModuleAccount(ctx, gomock.Any()).AnyTimes() - s.bankKeeper.EXPECT().GetAllBalances(ctx, gomock.Any()).Return(sdk.Coins{}).AnyTimes() + s.bankKeeper.EXPECT(). + GetAllBalances(ctx, gomock.Any()). + Return(sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100)))). + AnyTimes() // Create a valid genesis state genesisState := &types.GenesisState{ From 3fdc55e4651c73c6be65a99c916d9b9a36ab7098 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 11 Nov 2024 17:00:37 +0700 Subject: [PATCH 240/272] add test --- api/band/tunnel/v1beta1/tunnel.pulsar.go | 418 ++++++++++++++++++++--- proto/band/tunnel/v1beta1/tunnel.proto | 8 +- x/tunnel/keeper/msg_server.go | 14 + x/tunnel/keeper/packet.go | 23 +- x/tunnel/keeper/tss_packet.go | 12 +- x/tunnel/keeper/tss_packet_test.go | 7 +- x/tunnel/types/events.go | 6 + x/tunnel/types/genesis.go | 2 +- x/tunnel/types/genesis_test.go | 224 ++++++++++++ x/tunnel/types/keys_test.go | 53 +++ x/tunnel/types/msgs.go | 17 - x/tunnel/types/msgs_test.go | 164 +++++++++ x/tunnel/types/packet.go | 5 + x/tunnel/types/packet_test.go | 46 +++ x/tunnel/types/params_test.go | 52 +++ x/tunnel/types/signal_test.go | 72 ++++ x/tunnel/types/tunnel.pb.go | 284 +++++++++++---- x/tunnel/types/tunnel_test.go | 40 +++ 18 files changed, 1298 insertions(+), 149 deletions(-) create mode 100644 x/tunnel/types/genesis_test.go create mode 100644 x/tunnel/types/keys_test.go create mode 100644 x/tunnel/types/msgs_test.go create mode 100644 x/tunnel/types/packet_test.go create mode 100644 x/tunnel/types/params_test.go create mode 100644 x/tunnel/types/signal_test.go create mode 100644 x/tunnel/types/tunnel_test.go diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index 8ad4e9c45..06e1927d3 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -4359,12 +4359,116 @@ func (x *_Packet_3_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Packet_5_list)(nil) + +type _Packet_5_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Packet_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Packet_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Packet_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Packet_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Packet_5_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Packet_5_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Packet_6_list)(nil) + +type _Packet_6_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Packet_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Packet_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Packet_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Packet_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Packet_6_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Packet_6_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_6_list) IsValid() bool { + return x.list != nil +} + var ( md_Packet protoreflect.MessageDescriptor fd_Packet_tunnel_id protoreflect.FieldDescriptor fd_Packet_sequence protoreflect.FieldDescriptor fd_Packet_signal_prices protoreflect.FieldDescriptor fd_Packet_packet_content protoreflect.FieldDescriptor + fd_Packet_base_fee protoreflect.FieldDescriptor + fd_Packet_route_fee protoreflect.FieldDescriptor fd_Packet_created_at protoreflect.FieldDescriptor ) @@ -4375,6 +4479,8 @@ func init() { fd_Packet_sequence = md_Packet.Fields().ByName("sequence") fd_Packet_signal_prices = md_Packet.Fields().ByName("signal_prices") fd_Packet_packet_content = md_Packet.Fields().ByName("packet_content") + fd_Packet_base_fee = md_Packet.Fields().ByName("base_fee") + fd_Packet_route_fee = md_Packet.Fields().ByName("route_fee") fd_Packet_created_at = md_Packet.Fields().ByName("created_at") } @@ -4467,6 +4573,18 @@ func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, proto return } } + if len(x.BaseFee) != 0 { + value := protoreflect.ValueOfList(&_Packet_5_list{list: &x.BaseFee}) + if !f(fd_Packet_base_fee, value) { + return + } + } + if len(x.RouteFee) != 0 { + value := protoreflect.ValueOfList(&_Packet_6_list{list: &x.RouteFee}) + if !f(fd_Packet_route_fee, value) { + return + } + } if x.CreatedAt != int64(0) { value := protoreflect.ValueOfInt64(x.CreatedAt) if !f(fd_Packet_created_at, value) { @@ -4496,6 +4614,10 @@ func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { return len(x.SignalPrices) != 0 case "band.tunnel.v1beta1.Packet.packet_content": return x.PacketContent != nil + case "band.tunnel.v1beta1.Packet.base_fee": + return len(x.BaseFee) != 0 + case "band.tunnel.v1beta1.Packet.route_fee": + return len(x.RouteFee) != 0 case "band.tunnel.v1beta1.Packet.created_at": return x.CreatedAt != int64(0) default: @@ -4522,6 +4644,10 @@ func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { x.SignalPrices = nil case "band.tunnel.v1beta1.Packet.packet_content": x.PacketContent = nil + case "band.tunnel.v1beta1.Packet.base_fee": + x.BaseFee = nil + case "band.tunnel.v1beta1.Packet.route_fee": + x.RouteFee = nil case "band.tunnel.v1beta1.Packet.created_at": x.CreatedAt = int64(0) default: @@ -4555,6 +4681,18 @@ func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) pro case "band.tunnel.v1beta1.Packet.packet_content": value := x.PacketContent return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "band.tunnel.v1beta1.Packet.base_fee": + if len(x.BaseFee) == 0 { + return protoreflect.ValueOfList(&_Packet_5_list{}) + } + listValue := &_Packet_5_list{list: &x.BaseFee} + return protoreflect.ValueOfList(listValue) + case "band.tunnel.v1beta1.Packet.route_fee": + if len(x.RouteFee) == 0 { + return protoreflect.ValueOfList(&_Packet_6_list{}) + } + listValue := &_Packet_6_list{list: &x.RouteFee} + return protoreflect.ValueOfList(listValue) case "band.tunnel.v1beta1.Packet.created_at": value := x.CreatedAt return protoreflect.ValueOfInt64(value) @@ -4588,6 +4726,14 @@ func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value proto x.SignalPrices = *clv.list case "band.tunnel.v1beta1.Packet.packet_content": x.PacketContent = value.Message().Interface().(*anypb.Any) + case "band.tunnel.v1beta1.Packet.base_fee": + lv := value.List() + clv := lv.(*_Packet_5_list) + x.BaseFee = *clv.list + case "band.tunnel.v1beta1.Packet.route_fee": + lv := value.List() + clv := lv.(*_Packet_6_list) + x.RouteFee = *clv.list case "band.tunnel.v1beta1.Packet.created_at": x.CreatedAt = value.Int() default: @@ -4621,6 +4767,18 @@ func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protore x.PacketContent = new(anypb.Any) } return protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) + case "band.tunnel.v1beta1.Packet.base_fee": + if x.BaseFee == nil { + x.BaseFee = []*v1beta1.Coin{} + } + value := &_Packet_5_list{list: &x.BaseFee} + return protoreflect.ValueOfList(value) + case "band.tunnel.v1beta1.Packet.route_fee": + if x.RouteFee == nil { + x.RouteFee = []*v1beta1.Coin{} + } + value := &_Packet_6_list{list: &x.RouteFee} + return protoreflect.ValueOfList(value) case "band.tunnel.v1beta1.Packet.tunnel_id": panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.Packet is not mutable")) case "band.tunnel.v1beta1.Packet.sequence": @@ -4650,6 +4808,12 @@ func (x *fastReflection_Packet) NewField(fd protoreflect.FieldDescriptor) protor case "band.tunnel.v1beta1.Packet.packet_content": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "band.tunnel.v1beta1.Packet.base_fee": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Packet_5_list{list: &list}) + case "band.tunnel.v1beta1.Packet.route_fee": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Packet_6_list{list: &list}) case "band.tunnel.v1beta1.Packet.created_at": return protoreflect.ValueOfInt64(int64(0)) default: @@ -4737,6 +4901,18 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { l = options.Size(x.PacketContent) n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.BaseFee) > 0 { + for _, e := range x.BaseFee { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.RouteFee) > 0 { + for _, e := range x.RouteFee { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.CreatedAt != 0 { n += 1 + runtime.Sov(uint64(x.CreatedAt)) } @@ -4772,7 +4948,39 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { if x.CreatedAt != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x38 + } + if len(x.RouteFee) > 0 { + for iNdEx := len(x.RouteFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RouteFee[iNdEx]) + 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] = 0x32 + } + } + if len(x.BaseFee) > 0 { + for iNdEx := len(x.BaseFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.BaseFee[iNdEx]) + 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 x.PacketContent != nil { encoded, err := options.Marshal(x.PacketContent) @@ -4972,6 +5180,74 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseFee", 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 + } + x.BaseFee = append(x.BaseFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseFee[len(x.BaseFee)-1]); 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 RouteFee", 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 + } + x.RouteFee = append(x.RouteFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RouteFee[len(x.RouteFee)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -6058,8 +6334,12 @@ type Packet struct { SignalPrices []*SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` // packet_content is the content of the packet that implements PacketContentI PacketContent *anypb.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + // base_fee is the base fee of the packet + BaseFee []*v1beta1.Coin `protobuf:"bytes,5,rep,name=base_fee,json=baseFee,proto3" json:"base_fee,omitempty"` + // route_fee is the route fee of the packet + RouteFee []*v1beta1.Coin `protobuf:"bytes,6,rep,name=route_fee,json=routeFee,proto3" json:"route_fee,omitempty"` // created_at is the timestamp when the packet is created - CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (x *Packet) Reset() { @@ -6110,6 +6390,20 @@ func (x *Packet) GetPacketContent() *anypb.Any { return nil } +func (x *Packet) GetBaseFee() []*v1beta1.Coin { + if x != nil { + return x.BaseFee + } + return nil +} + +func (x *Packet) GetRouteFee() []*v1beta1.Coin { + if x != nil { + return x.RouteFee + } + return nil +} + func (x *Packet) GetCreatedAt() int64 { if x != nil { return x.CreatedAt @@ -6285,7 +6579,7 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x8c, 0x02, 0x0a, 0x06, 0x50, + 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xde, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, @@ -6300,52 +6594,66 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, - 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, - 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, - 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, 0x07, 0x45, - 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, - 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, - 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x4f, - 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, - 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, 0x4f, 0x44, - 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x41, - 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, - 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, 0x45, 0x4e, - 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x1a, 0x04, - 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, - 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, - 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, - 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, - 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x62, 0x61, + 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, + 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x46, + 0x65, 0x65, 0x12, 0x68, 0x0a, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, + 0x06, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, + 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, + 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, + 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, + 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, + 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, + 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, + 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, + 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, + 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, + 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, + 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, + 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, + 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, + 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, + 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -6386,11 +6694,13 @@ var file_band_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ 10, // 6: band.tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin 6, // 7: band.tunnel.v1beta1.Packet.signal_prices:type_name -> band.tunnel.v1beta1.SignalPrice 11, // 8: band.tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 10, // 9: band.tunnel.v1beta1.Packet.base_fee:type_name -> cosmos.base.v1beta1.Coin + 10, // 10: band.tunnel.v1beta1.Packet.route_fee:type_name -> cosmos.base.v1beta1.Coin + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_band_tunnel_v1beta1_tunnel_proto_init() } diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index f3fcb4b1e..062583c96 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -121,8 +121,14 @@ message Packet { repeated SignalPrice signal_prices = 3 [(gogoproto.nullable) = false]; // packet_content is the content of the packet that implements PacketContentI google.protobuf.Any packet_content = 4 [(cosmos_proto.accepts_interface) = "PacketContentI"]; + // base_fee is the base fee of the packet + repeated cosmos.base.v1beta1.Coin base_fee = 5 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // route_fee is the route fee of the packet + repeated cosmos.base.v1beta1.Coin route_fee = 6 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // created_at is the timestamp when the packet is created - int64 created_at = 5; + int64 created_at = 7; } // TSSPacketContent is the packet content for TSS diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 3e0709c50..d01b017e2 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -274,6 +274,13 @@ func (ms msgServer) DepositTunnel( return nil, err } + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeDepositTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", msg.TunnelID)), + sdk.NewAttribute(types.AttributeKeyDepositor, msg.Depositor), + sdk.NewAttribute(types.AttributeKeyAmount, msg.Amount.String()), + )) + return &types.MsgDepositTunnelResponse{}, nil } @@ -294,6 +301,13 @@ func (ms msgServer) WithdrawTunnel( return nil, err } + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeWithdrawTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", msg.TunnelID)), + sdk.NewAttribute(types.AttributeKeyWithdrawer, msg.Withdrawer), + sdk.NewAttribute(types.AttributeKeyAmount, msg.Amount.String()), + )) + return &types.MsgWithdrawTunnelResponse{}, nil } diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 5a6c14122..35414c762 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -174,7 +174,14 @@ func (k Keeper) CreatePacket( } tunnel.Sequence++ - packet := types.NewPacket(tunnelID, tunnel.Sequence, signalPrices, ctx.BlockTime().Unix()) + packet := types.NewPacket( + tunnelID, + tunnel.Sequence, + signalPrices, + k.GetParams(ctx).BasePacketFee, + sdk.Coins{}, + ctx.BlockTime().Unix(), + ) // update information in the store k.SetTunnel(ctx, tunnel) @@ -193,9 +200,10 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { // get the packet content, which is the information receiving after // sending packet to the destination route var content types.PacketContentI + var fee sdk.Coins switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - content, err = k.SendTSSPacket(ctx, r, packet) + content, fee, err = k.SendTSSPacket(ctx, r, packet) default: return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } @@ -205,12 +213,23 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { return err } + // set the route fee + packet.RouteFee = fee + // set the packet content if err := packet.SetPacketContent(content); err != nil { return sdkerrors.Wrapf(err, "failed to set packet content for tunnel ID: %d", tunnel.ID) } + k.SetPacket(ctx, packet) + // emit an event + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeSendPacket, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), + )) + return nil } diff --git a/x/tunnel/keeper/tss_packet.go b/x/tunnel/keeper/tss_packet.go index 4a178287c..c1cf111c3 100644 --- a/x/tunnel/keeper/tss_packet.go +++ b/x/tunnel/keeper/tss_packet.go @@ -11,17 +11,23 @@ func (k Keeper) SendTSSPacket( ctx sdk.Context, route *types.TSSRoute, packet types.Packet, -) (types.PacketContentI, error) { +) (packetContent types.PacketContentI, fee sdk.Coins, err error) { // TODO: Implement TSS packet handler logic // Sign TSS packet // Set the packet content - packetContent := types.TSSPacketContent{ + packetContent = &types.TSSPacketContent{ SigningID: 1, DestinationChainID: route.DestinationChainID, DestinationContractAddress: route.DestinationContractAddress, } - return &packetContent, nil + // TODO: return the actual fee that using in the route if possible + fee, err = route.Fee() + if err != nil { + return nil, nil, err + } + + return } diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/tss_packet_test.go index c32a30f32..7475e7bd7 100644 --- a/x/tunnel/keeper/tss_packet_test.go +++ b/x/tunnel/keeper/tss_packet_test.go @@ -3,6 +3,8 @@ package keeper_test import ( "time" + sdk "github.com/cosmos/cosmos-sdk/types" + bandtsstypes "github.com/bandprotocol/chain/v3/x/bandtss/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -18,15 +20,18 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { 1, // tunnelID 1, // sequence []types.SignalPrice{}, // signalPriceInfos[] + sdk.NewCoins(), // baseFee + sdk.NewCoins(), // routeFee time.Now().Unix(), ) - content, err := k.SendTSSPacket(ctx, &route, packet) + content, fee, err := k.SendTSSPacket(ctx, &route, packet) s.Require().NoError(err) packetContent, ok := content.(*types.TSSPacketContent) s.Require().True(ok) s.Require().Equal("chain-1", packetContent.DestinationChainID) s.Require().Equal("0x1234567890abcdef", packetContent.DestinationContractAddress) + s.Require().Equal(sdk.NewCoins(), fee) s.Require().Equal(bandtsstypes.SigningID(1), packetContent.SigningID) } diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index b933f6681..0a1051c2f 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -8,8 +8,11 @@ const ( EventTypeActivateTunnel = "activate_tunnel" EventTypeDeactivateTunnel = "deactivate_tunnel" EventTypeTriggerTunnel = "trigger_tunnel" + EventTypeSendPacket = "send_packet" EventTypeProducePacketFail = "produce_packet_fail" EventTypeProducePacketSuccess = "produce_packet_success" + EventTypeDepositTunnel = "deposit_tunnel" + EventTypeWithdrawTunnel = "withdraw_tunnel" AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" @@ -23,5 +26,8 @@ const ( AttributeKeyIsActive = "is_active" AttributeKeyCreatedAt = "created_at" AttributeKeyCreator = "creator" + AttributeKeyDepositor = "depositor" + AttributeKeyWithdrawer = "withdrawer" + AttributeKeyAmount = "amount" AttributeKeyReason = "reason" ) diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 5135ae838..14daf114f 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -66,7 +66,7 @@ func ValidateGenesis(data GenesisState) error { tunnelDeposit := make(map[uint64]sdk.Coins) for _, d := range data.Deposits { if _, ok := tunnelIDs[d.TunnelID]; !ok { - return ErrInvalidGenesis.Wrapf("deposit %v has non-existent tunnel id: %d", d, d.TunnelID) + return ErrInvalidGenesis.Wrapf("deposit has non-existent tunnel id: %d, deposit: %+v", d.TunnelID, d) } dk := depositKey{d.TunnelID, d.Depositor} diff --git a/x/tunnel/types/genesis_test.go b/x/tunnel/types/genesis_test.go new file mode 100644 index 000000000..cbe25be69 --- /dev/null +++ b/x/tunnel/types/genesis_test.go @@ -0,0 +1,224 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestValidateGenesis(t *testing.T) { + cases := map[string]struct { + genesisState types.GenesisState + expErr bool + expErrMsg string + }{ + "length of tunnels does not match tunnel count": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1}, + }, + }, + expErr: true, + expErrMsg: "length of tunnels does not match tunnel count", + }, + "invalid tunnel count": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1}, + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1}, + }, + }, + expErr: true, + expErrMsg: "length of tunnels does not match tunnel count", + }, + "duplicate tunnel ID": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1}, + {ID: 1}, // Duplicate ID + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1}, + {TunnelID: 1}, + }, + }, + expErr: true, + expErrMsg: "duplicate tunnel ID found", + }, + "tunnel count mismatch in latest signal prices": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1}, + {ID: 2}, + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1}, + }, + }, + expErr: true, + expErrMsg: "tunnel count mismatch in latest signal prices", + }, + "invalid latest signal prices": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1}, + {ID: 2}, + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1}, + {TunnelID: 2}, + }, + }, + expErr: true, + expErrMsg: "invalid latest signal prices", + }, + "deposit has non-existent": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1}, + {ID: 2}, + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1, SignalPrices: []types.SignalPrice{ + {SignalID: "signal1", Price: 100}, + }, LastInterval: 0}, + {TunnelID: 2, SignalPrices: []types.SignalPrice{ + {SignalID: "signal1", Price: 100}, + }, LastInterval: 0}, + }, + Deposits: []types.Deposit{ + { + TunnelID: 3, + Depositor: "addr1", + Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 100)), + }, // Non-existent tunnel ID + }, + }, + expErr: true, + expErrMsg: "deposit has non-existent", + }, + "duplicate deposit": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1}, + {ID: 2}, + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1, SignalPrices: []types.SignalPrice{ + {SignalID: "signal1", Price: 100}, + }, LastInterval: 0}, + {TunnelID: 2, SignalPrices: []types.SignalPrice{ + {SignalID: "signal1", Price: 100}, + }, LastInterval: 0}, + }, + Deposits: []types.Deposit{ + { + TunnelID: 1, + Depositor: "addr1", + Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 100)), + }, + { + TunnelID: 1, + Depositor: "addr1", + Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 100)), + }, // Duplicate deposit + }, + }, + expErr: true, + expErrMsg: "duplicate deposit", + }, + "deposits mismatch total deposit for tunnel": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 100))}, + {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 200))}, + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1, SignalPrices: []types.SignalPrice{ + {SignalID: "signal1", Price: 100}, + }, LastInterval: 0}, + {TunnelID: 2, SignalPrices: []types.SignalPrice{ + {SignalID: "signal1", Price: 100}, + }, LastInterval: 0}, + }, + Deposits: []types.Deposit{ + { + TunnelID: 1, + Depositor: "addr1", + Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 50)), + }, + }, + }, + expErr: true, + expErrMsg: "deposits mismatch total deposit for tunnel", + }, + "all good": { + genesisState: types.GenesisState{ + Params: types.DefaultParams(), + TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 100))}, + {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 200))}, + }, + LatestSignalPricesList: []types.LatestSignalPrices{ + {TunnelID: 1, SignalPrices: []types.SignalPrice{ + {SignalID: "signal1", Price: 100}, + }, LastInterval: 0}, + {TunnelID: 2, SignalPrices: []types.SignalPrice{ + {SignalID: "signal1", Price: 100}, + }, LastInterval: 0}, + }, + Deposits: []types.Deposit{ + { + TunnelID: 1, + Depositor: "addr1", + Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 100)), + }, + { + TunnelID: 2, + Depositor: "addr2", + Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 200)), + }, + }, + }, + expErr: false, + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + err := types.ValidateGenesis(tc.genesisState) + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/tunnel/types/keys_test.go b/x/tunnel/types/keys_test.go new file mode 100644 index 000000000..4b220d9d7 --- /dev/null +++ b/x/tunnel/types/keys_test.go @@ -0,0 +1,53 @@ +package types_test + +import ( + "encoding/hex" + "testing" + + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestTunnelStoreKey(t *testing.T) { + expect, _ := hex.DecodeString("110000000000000001") + require.Equal(t, expect, types.TunnelStoreKey(1)) +} + +func TestActiveTunnelIDStoreKey(t *testing.T) { + expect, _ := hex.DecodeString("100000000000000001") + require.Equal(t, expect, types.ActiveTunnelIDStoreKey(1)) +} + +func TestTunnelPacketsStoreKey(t *testing.T) { + expect, _ := hex.DecodeString("120000000000000001") + require.Equal(t, expect, types.TunnelPacketsStoreKey(1)) +} + +func TestTunnelPacketStoreKey(t *testing.T) { + expect, _ := hex.DecodeString("1200000000000000010000000000000002") + require.Equal(t, expect, types.TunnelPacketStoreKey(1, 2)) +} + +func TestLatestSignalPricesStoreKey(t *testing.T) { + expect, _ := hex.DecodeString("130000000000000001") + require.Equal(t, expect, types.LatestSignalPricesStoreKey(1)) +} + +func TestDepositsStoreKey(t *testing.T) { + expect, _ := hex.DecodeString("140000000000000001") + require.Equal(t, expect, types.DepositsStoreKey(1)) +} + +func TestDepositStoreKey(t *testing.T) { + depositor := sdk.AccAddress([]byte("addr1")) + expect, _ := hex.DecodeString("140000000000000001056164647231") + require.Equal(t, expect, types.DepositStoreKey(1, depositor)) +} + +func TestParamsKey(t *testing.T) { + expect, _ := hex.DecodeString("90") + require.Equal(t, expect, types.ParamsKey) +} diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 50dbecb39..adb55473b 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -1,8 +1,6 @@ package types import ( - "fmt" - "github.com/cosmos/gogoproto/proto" "github.com/cosmos/cosmos-sdk/codec/types" @@ -107,21 +105,6 @@ func (m MsgCreateTunnel) ValidateBasic() error { return nil } -// SetTunnelRoute sets the route of the tunnel. -func (m *MsgCreateTunnel) SetTunnelRoute(route RouteI) error { - msg, ok := route.(proto.Message) - if !ok { - return fmt.Errorf("can't proto marshal %T", msg) - } - any, err := types.NewAnyWithValue(msg) - if err != nil { - return err - } - m.Route = any - - return nil -} - // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (m MsgCreateTunnel) UnpackInterfaces(unpacker types.AnyUnpacker) error { var route RouteI diff --git a/x/tunnel/types/msgs_test.go b/x/tunnel/types/msgs_test.go new file mode 100644 index 000000000..8ff402153 --- /dev/null +++ b/x/tunnel/types/msgs_test.go @@ -0,0 +1,164 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +var ( + validAuthority = sdk.AccAddress("authority") + validCreator = sdk.AccAddress("creator") + validDepositor = sdk.AccAddress("depositor") + validParams = types.DefaultParams() +) + +// ==================================== +// MsgCreateTunnel +// ==================================== + +func TestMsgCreateTunnel_ValidateBasic(t *testing.T) { + signalDeviations := []types.SignalDeviation{ + {SignalID: "signal1", SoftDeviationBPS: 5000, HardDeviationBPS: 1000}, + } + initialDeposit := sdk.NewCoins(sdk.NewInt64Coin("uband", 100)) + route := &types.TSSRoute{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} + msg, err := types.NewMsgCreateTunnel( + signalDeviations, + 10, + route, + 1, + initialDeposit, + sdk.AccAddress([]byte("creator1")), + ) + require.NoError(t, err) + + // Valid case + err = msg.ValidateBasic() + require.NoError(t, err) + + // Invalid creator + msg.Creator = "invalidCreator" + err = msg.ValidateBasic() + require.Error(t, err) +} + +// ==================================== +// MsgUpdateAndResetTunnel +// ==================================== + +func TestMsgUpdateAndResetTunnel_ValidateBasic(t *testing.T) { + signalDeviations := []types.SignalDeviation{ + {SignalID: "signal1", SoftDeviationBPS: 5000, HardDeviationBPS: 1000}, + } + msg := types.NewMsgUpdateAndResetTunnel(1, signalDeviations, 10, validCreator.String()) + + // Valid case + err := msg.ValidateBasic() + require.NoError(t, err) + + // Invalid creator + msg.Creator = "invalidCreator" + err = msg.ValidateBasic() + require.Error(t, err) + + // Empty signal deviations + msg.Creator = validCreator.String() + msg.SignalDeviations = []types.SignalDeviation{} + err = msg.ValidateBasic() + require.Error(t, err) +} + +// ==================================== +// MsgActivate +// ==================================== + +func TestMsgActivate_ValidateBasic(t *testing.T) { + msg := types.NewMsgActivate(1, validCreator.String()) + + // Valid case + err := msg.ValidateBasic() + require.NoError(t, err) + + // Invalid creator + msg.Creator = "invalidCreator" + err = msg.ValidateBasic() + require.Error(t, err) +} + +// ==================================== +// MsgDeactivate +// ==================================== + +func TestMsgDeactivate_ValidateBasic(t *testing.T) { + msg := types.NewMsgDeactivate(1, validCreator.String()) + + // Valid case + err := msg.ValidateBasic() + require.NoError(t, err) + + // Invalid creator + msg.Creator = "invalidCreator" + err = msg.ValidateBasic() + require.Error(t, err) +} + +// ==================================== +// MsgTriggerTunnel +// ==================================== + +func TestMsgTriggerTunnel_ValidateBasic(t *testing.T) { + msg := types.NewMsgTriggerTunnel(1, validCreator.String()) + + // Valid case + err := msg.ValidateBasic() + require.NoError(t, err) + + // Invalid creator + msg.Creator = "invalidCreator" + err = msg.ValidateBasic() + require.Error(t, err) +} + +// ==================================== +// MsgWithdrawTunnel +// ==================================== + +func TestMsgWithdrawTunnel_ValidateBasic(t *testing.T) { + // Valid withdrawer + amount := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) + msg := types.NewMsgWithdrawTunnel(1, amount, validDepositor.String()) + err := msg.ValidateBasic() + require.NoError(t, err) + + // Invalid withdrawer + msg.Withdrawer = "invalidWithdrawer" + err = msg.ValidateBasic() + require.Error(t, err) + + // Invalid amount + msg.Withdrawer = validDepositor.String() + msg.Amount = sdk.Coins{} + err = msg.ValidateBasic() + require.Error(t, err) +} + +// ==================================== +// MsgUpdateParams +// ==================================== + +func TestMsgUpdateParams_ValidateBasic(t *testing.T) { + // Valid authority + msg := types.NewMsgUpdateParams(validAuthority.String(), validParams) + err := msg.ValidateBasic() + require.NoError(t, err) + + // Invalid authority + msg.Authority = "invalidAuthority" + err = msg.ValidateBasic() + require.Error(t, err) +} diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 9bb640539..a496cf4f0 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -2,6 +2,7 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) var _ types.UnpackInterfacesMessage = Packet{} @@ -10,6 +11,8 @@ func NewPacket( tunnelID uint64, sequence uint64, signalPrices []SignalPrice, + baseFee sdk.Coins, + routeFee sdk.Coins, createdAt int64, ) Packet { return Packet{ @@ -17,6 +20,8 @@ func NewPacket( Sequence: sequence, SignalPrices: signalPrices, PacketContent: nil, + BaseFee: baseFee, + RouteFee: routeFee, CreatedAt: createdAt, } } diff --git a/x/tunnel/types/packet_test.go b/x/tunnel/types/packet_test.go new file mode 100644 index 000000000..6d757c132 --- /dev/null +++ b/x/tunnel/types/packet_test.go @@ -0,0 +1,46 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestPacket_SetPacketContent(t *testing.T) { + packet := types.NewPacket(1, 1, nil, nil, nil, 0) + packetContent := &types.TSSPacketContent{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} + + err := packet.SetPacketContent(packetContent) + require.NoError(t, err) + require.NotNil(t, packet.PacketContent) + require.Equal(t, packetContent, packet.PacketContent.GetCachedValue()) +} + +func TestPacket_GetContent(t *testing.T) { + packet := types.NewPacket(1, 1, nil, nil, nil, 0) + packetContent := &types.TSSPacketContent{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} + + err := packet.SetPacketContent(packetContent) + require.NoError(t, err) + + content, err := packet.GetContent() + require.NoError(t, err) + require.NotNil(t, content) + require.Equal(t, packetContent, content) +} + +func TestPacket_UnpackInterfaces(t *testing.T) { + packet := types.NewPacket(1, 1, nil, nil, nil, 0) + packetContent := &types.TSSPacketContent{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} + + err := packet.SetPacketContent(packetContent) + require.NoError(t, err) + + unpacker := codectypes.NewInterfaceRegistry() + err = packet.UnpackInterfaces(unpacker) + require.NoError(t, err) +} diff --git a/x/tunnel/types/params_test.go b/x/tunnel/types/params_test.go new file mode 100644 index 000000000..f8a4b6054 --- /dev/null +++ b/x/tunnel/types/params_test.go @@ -0,0 +1,52 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestParams_Validate(t *testing.T) { + cases := map[string]struct { + genesisState types.Params + expErr bool + expErrMsg string + }{ + "invalid MinInterval": { + genesisState: func() types.Params { + p := types.DefaultParams() + p.MinInterval = 0 + return p + }(), + expErr: true, + expErrMsg: "min interval must be positive", + }, + "invalid MaxSignals": { + genesisState: func() types.Params { + p := types.DefaultParams() + p.MaxSignals = 0 + return p + }(), + expErr: true, + expErrMsg: "max signals must be positive", + }, + "valid params": { + genesisState: types.DefaultParams(), + expErr: false, + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + err := tc.genesisState.Validate() + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/tunnel/types/signal_test.go b/x/tunnel/types/signal_test.go new file mode 100644 index 000000000..abff8cefd --- /dev/null +++ b/x/tunnel/types/signal_test.go @@ -0,0 +1,72 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestLatestSignalPrices_Validate(t *testing.T) { + cases := map[string]struct { + latestSignalPrices types.LatestSignalPrices + expErr bool + expErrMsg string + }{ + "valid latest signal prices": { + latestSignalPrices: types.NewLatestSignalPrices( + 1, + []types.SignalPrice{{SignalID: "signal1", Price: 100}}, + 10, + ), + expErr: false, + }, + "invalid tunnel ID": { + latestSignalPrices: types.NewLatestSignalPrices( + 0, + []types.SignalPrice{{SignalID: "signal1", Price: 100}}, + 10, + ), + expErr: true, + expErrMsg: "tunnel ID cannot be 0", + }, + "empty signal prices": { + latestSignalPrices: types.NewLatestSignalPrices(1, []types.SignalPrice{}, 10), + expErr: true, + expErrMsg: "signal prices cannot be empty", + }, + "negative last interval": { + latestSignalPrices: types.NewLatestSignalPrices( + 1, + []types.SignalPrice{{SignalID: "signal1", Price: 100}}, + -1, + ), + expErr: true, + expErrMsg: "last interval cannot be negative", + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + err := tc.latestSignalPrices.Validate() + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestLatestSignalPrices_UpdateSignalPrices(t *testing.T) { + initialSignalPrices := []types.SignalPrice{{SignalID: "signal1", Price: 100}} + latestSignalPrices := types.NewLatestSignalPrices(1, initialSignalPrices, 10) + + newSignalPrices := []types.SignalPrice{{SignalID: "signal1", Price: 200}, {SignalID: "signal2", Price: 300}} + latestSignalPrices.UpdateSignalPrices(newSignalPrices) + + require.Len(t, latestSignalPrices.SignalPrices, 1) + require.Equal(t, uint64(200), latestSignalPrices.SignalPrices[0].Price) +} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 5acbd53d7..bd6741a05 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -555,8 +555,12 @@ type Packet struct { SignalPrices []SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` // packet_content is the content of the packet that implements PacketContentI PacketContent *types1.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + // base_fee is the base fee of the packet + BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` + // route_fee is the route fee of the packet + RouteFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=route_fee,json=routeFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"route_fee"` // created_at is the timestamp when the packet is created - CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` } func (m *Packet) Reset() { *m = Packet{} } @@ -620,6 +624,20 @@ func (m *Packet) GetPacketContent() *types1.Any { return nil } +func (m *Packet) GetBaseFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.BaseFee + } + return nil +} + +func (m *Packet) GetRouteFee() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.RouteFee + } + return nil +} + func (m *Packet) GetCreatedAt() int64 { if m != nil { return m.CreatedAt @@ -707,75 +725,77 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 1088 bytes of a gzipped FileDescriptorProto + // 1117 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0xda, 0x8e, 0x63, 0x4f, 0x3e, 0x70, 0xa7, 0x56, 0xbb, 0x75, 0x8b, 0x6d, 0x05, 0x0e, - 0xa6, 0x52, 0xbc, 0x6d, 0xaa, 0x46, 0x28, 0x27, 0xe2, 0x8f, 0xa8, 0xab, 0x40, 0x62, 0xad, 0x8d, - 0x40, 0x5c, 0x56, 0xe3, 0xdd, 0xb1, 0xb3, 0xd4, 0x99, 0x59, 0x76, 0xc6, 0x11, 0xf9, 0x07, 0x55, - 0xc4, 0x81, 0x3f, 0x10, 0x84, 0xe0, 0x40, 0xc5, 0x89, 0x43, 0x24, 0x7e, 0x01, 0x52, 0x95, 0x53, - 0xc5, 0x89, 0x03, 0x32, 0xc8, 0x39, 0xc0, 0x6f, 0xe0, 0x84, 0x76, 0x66, 0xd6, 0xb1, 0xdd, 0xa4, - 0x21, 0x02, 0x2e, 0x49, 0xde, 0xe7, 0xfd, 0x98, 0xf7, 0x7d, 0x9f, 0x67, 0x67, 0x02, 0x4a, 0x1d, - 0x44, 0x5c, 0x83, 0x0f, 0x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x50, 0x05, 0x10, 0x25, 0x1d, 0x66, + 0x3a, 0x61, 0xb0, 0xd9, 0x1e, 0x88, 0x16, 0xe2, 0x95, 0xec, 0x78, 0x54, 0xc8, 0x34, 0x49, 0x87, + 0x4d, 0x32, 0x57, 0x1a, 0x4d, 0x23, 0x43, 0x67, 0x34, 0x03, 0x1a, 0xe4, 0xe8, 0x59, 0xbe, 0x73, + 0x2e, 0x47, 0xec, 0x2c, 0xc7, 0x53, 0xcb, 0x77, 0x66, 0x73, 0xf4, 0x66, 0x34, 0x03, 0xba, 0x11, + 0xff, 0xeb, 0x9b, 0x82, 0xb2, 0xfc, 0x9b, 0x02, 0xc9, 0x1a, 0x1e, 0x10, 0xea, 0xb2, 0x60, 0x08, + 0xb1, 0x0e, 0xe1, 0x10, 0x71, 0x31, 0x44, 0x8b, 0x2b, 0x83, 0x21, 0x84, 0x59, 0x77, 0xd0, 0x3a, + 0xa4, 0x1d, 0x11, 0x45, 0x7c, 0x01, 0x5f, 0x45, 0xfd, 0xe5, 0x78, 0x35, 0x2b, 0xe9, 0x97, 0xb0, + 0x35, 0x99, 0xef, 0x7a, 0x5d, 0xe3, 0xcc, 0x15, 0xf5, 0x20, 0x61, 0xed, 0x91, 0xa1, 0xc7, 0xd4, + 0x58, 0x31, 0x56, 0x9a, 0x5f, 0xbb, 0x57, 0x96, 0x11, 0xc1, 0x76, 0x85, 0x5b, 0x58, 0xae, 0x12, + 0xd7, 0xab, 0x3c, 0x79, 0x39, 0x2a, 0x44, 0x7e, 0xf8, 0xbd, 0x50, 0xea, 0xba, 0xac, 0x37, 0x6c, + 0x97, 0x6d, 0xb2, 0x27, 0xb7, 0x4b, 0xfe, 0x5b, 0xa5, 0xce, 0x33, 0x8d, 0x1d, 0x0c, 0x30, 0xe5, + 0x01, 0xf4, 0xc5, 0x9f, 0x3f, 0xae, 0x28, 0x86, 0xcc, 0x2f, 0xc7, 0xfb, 0x39, 0x0e, 0x09, 0xd1, + 0x3e, 0xba, 0x03, 0x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xd5, 0x6d, 0x1e, 0x12, 0xcd, 0x65, 0x0f, 0x8f, 0x8a, 0xaf, 0xe9, 0x73, + 0xf1, 0xe7, 0xdf, 0xe5, 0x23, 0x95, 0x8f, 0x5e, 0x8c, 0xf3, 0xca, 0xcb, 0x71, 0x5e, 0x79, 0x35, + 0xce, 0x2b, 0x7f, 0x8c, 0xf3, 0xca, 0x57, 0xa7, 0xf9, 0xc8, 0xab, 0xd3, 0x7c, 0xe4, 0xd7, 0xd3, + 0x7c, 0xe4, 0x33, 0xed, 0x5f, 0xd0, 0x25, 0x5f, 0xb4, 0x9c, 0xad, 0x76, 0x82, 0x7b, 0x3c, 0xfe, + 0x27, 0x00, 0x00, 0xff, 0xff, 0x63, 0x9d, 0x16, 0x6c, 0xed, 0x0a, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -1061,6 +1081,22 @@ func (this *Packet) Equal(that interface{}) bool { if !this.PacketContent.Equal(that1.PacketContent) { return false } + if len(this.BaseFee) != len(that1.BaseFee) { + return false + } + for i := range this.BaseFee { + if !this.BaseFee[i].Equal(&that1.BaseFee[i]) { + return false + } + } + if len(this.RouteFee) != len(that1.RouteFee) { + return false + } + for i := range this.RouteFee { + if !this.RouteFee[i].Equal(&that1.RouteFee[i]) { + return false + } + } if this.CreatedAt != that1.CreatedAt { return false } @@ -1476,7 +1512,35 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.CreatedAt != 0 { i = encodeVarintTunnel(dAtA, i, uint64(m.CreatedAt)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x38 + } + if len(m.RouteFee) > 0 { + for iNdEx := len(m.RouteFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RouteFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTunnel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.BaseFee) > 0 { + for iNdEx := len(m.BaseFee) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BaseFee[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTunnel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } } if m.PacketContent != nil { { @@ -1753,6 +1817,18 @@ func (m *Packet) Size() (n int) { l = m.PacketContent.Size() n += 1 + l + sovTunnel(uint64(l)) } + if len(m.BaseFee) > 0 { + for _, e := range m.BaseFee { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + if len(m.RouteFee) > 0 { + for _, e := range m.RouteFee { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } if m.CreatedAt != 0 { n += 1 + sovTunnel(uint64(m.CreatedAt)) } @@ -2932,6 +3008,74 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseFee = append(m.BaseFee, types.Coin{}) + if err := m.BaseFee[len(m.BaseFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RouteFee", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RouteFee = append(m.RouteFee, types.Coin{}) + if err := m.RouteFee[len(m.RouteFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } diff --git a/x/tunnel/types/tunnel_test.go b/x/tunnel/types/tunnel_test.go new file mode 100644 index 000000000..4a4c631be --- /dev/null +++ b/x/tunnel/types/tunnel_test.go @@ -0,0 +1,40 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestTunnel_SetRoute(t *testing.T) { + tunnel := types.Tunnel{} + route := &types.TSSRoute{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} + + err := tunnel.SetRoute(route) + require.NoError(t, err) + require.Equal(t, route, tunnel.Route.GetCachedValue()) +} + +func TestTunnel_GetSignalDeviationMap(t *testing.T) { + signalDeviations := []types.SignalDeviation{{SignalID: "signal1", SoftDeviationBPS: 100, HardDeviationBPS: 200}} + tunnel := types.Tunnel{SignalDeviations: signalDeviations} + + signalDeviationMap := tunnel.GetSignalDeviationMap() + require.Len(t, signalDeviationMap, 1) + require.Equal(t, signalDeviations[0], signalDeviationMap["signal1"]) +} + +func TestTunnel_GetSignalIDs(t *testing.T) { + signalDeviations := []types.SignalDeviation{ + {SignalID: "signal1", SoftDeviationBPS: 100, HardDeviationBPS: 200}, + {SignalID: "signal2", SoftDeviationBPS: 100, HardDeviationBPS: 200}, + } + tunnel := types.Tunnel{SignalDeviations: signalDeviations} + + signalIDs := tunnel.GetSignalIDs() + require.Len(t, signalIDs, 2) + require.Contains(t, signalIDs, "signal1") + require.Contains(t, signalIDs, "signal2") +} From 5a6d6c1e4bb19aca07d6b25e5bac2d7d39e9d61e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 11 Nov 2024 17:11:00 +0700 Subject: [PATCH 241/272] add base fee and route fee --- x/tunnel/keeper/packet.go | 2 ++ x/tunnel/types/events.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 35414c762..47791e74f 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -228,6 +228,8 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { types.EventTypeSendPacket, sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), + sdk.NewAttribute(types.AttributeKeyBaseFee, packet.BaseFee.String()), + sdk.NewAttribute(types.AttributeKeyRouteFee, fee.String()), )) return nil diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index 0a1051c2f..c5264d71f 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -17,6 +17,8 @@ const ( AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" AttributeKeySequence = "sequence" + AttributeKeyBaseFee = "base_fee" + AttributeKeyRouteFee = "route_fee" AttributeKeyInterval = "interval" AttributeKeyRoute = "route" AttributeKeyEncoder = "encoder" From cef355168c619fd28ed539b82cd168bc091eeeca Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 11 Nov 2024 17:55:04 +0700 Subject: [PATCH 242/272] add validate --- x/tunnel/types/msgs.go | 5 +++++ x/tunnel/types/tunnel.go | 7 +++++++ x/tunnel/types/tunnel_test.go | 10 ++++++++++ 3 files changed, 22 insertions(+) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index adb55473b..3918c45a5 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -97,6 +97,11 @@ func (m MsgCreateTunnel) ValidateBasic() error { return err } + // encoder must be valid + if err := ValidateEncoder(m.Encoder); err != nil { + return err + } + // initial deposit must be valid if !m.InitialDeposit.IsValid() { return sdkerrors.ErrInvalidCoins.Wrapf("invalid initial deposit: %s", m.InitialDeposit) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 5e2754dde..46a4ada58 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -87,3 +87,10 @@ func (t Tunnel) GetSignalIDs() []string { } return signalIDs } + +func ValidateEncoder(encoder Encoder) error { + if encoder == ENCODER_FIXED_POINT_ABI || encoder == ENCODER_TICK_ABI { + return nil + } + return fmt.Errorf("invalid encoder: %s", encoder) +} diff --git a/x/tunnel/types/tunnel_test.go b/x/tunnel/types/tunnel_test.go index 4a4c631be..d99f3d0a1 100644 --- a/x/tunnel/types/tunnel_test.go +++ b/x/tunnel/types/tunnel_test.go @@ -38,3 +38,13 @@ func TestTunnel_GetSignalIDs(t *testing.T) { require.Contains(t, signalIDs, "signal1") require.Contains(t, signalIDs, "signal2") } + +func TestValidateEncoder(t *testing.T) { + // validate encoder + err := types.ValidateEncoder(1) + require.NoError(t, err) + + // invalid encoder + err = types.ValidateEncoder(999) + require.Error(t, err) +} From 00f5a532b8167af448878b3be1e8c82d92ff049a Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 11 Nov 2024 17:56:30 +0700 Subject: [PATCH 243/272] add comment --- x/tunnel/types/tunnel.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 46a4ada58..f2732b7f6 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -88,6 +88,7 @@ func (t Tunnel) GetSignalIDs() []string { return signalIDs } +// ValidateEncoder validates the encoder. func ValidateEncoder(encoder Encoder) error { if encoder == ENCODER_FIXED_POINT_ABI || encoder == ENCODER_TICK_ABI { return nil From fb292ad16be238467f2302a74f507afa0d1727c3 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Mon, 11 Nov 2024 18:21:41 +0700 Subject: [PATCH 244/272] fix feeds interfaces --- benchmark/tunnel_bench_test.go | 6 +----- x/tunnel/keeper/helper.go | 2 +- x/tunnel/keeper/helper_test.go | 10 ++++----- x/tunnel/keeper/msg_server.go | 4 ++-- x/tunnel/keeper/msg_server_test.go | 4 ++-- x/tunnel/keeper/packet.go | 2 +- x/tunnel/keeper/packet_test.go | 10 ++++----- x/tunnel/testutil/expected_keepers_mocks.go | 24 ++++++++++----------- x/tunnel/types/expected_keepers.go | 4 ++-- 9 files changed, 31 insertions(+), 35 deletions(-) diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go index 97de56e71..67b9ebcbd 100644 --- a/benchmark/tunnel_bench_test.go +++ b/benchmark/tunnel_bench_test.go @@ -175,11 +175,7 @@ func setupFeedsPrice(ba *BenchmarkApp, signalDeviations []types.SignalDeviation) // shiftFeedsPrice shifts current feeds price by given multiplier. func shiftFeedsPrice(ba *BenchmarkApp, signalDeviations []types.SignalDeviation, mltpyBps uint64) error { for _, sd := range signalDeviations { - p, err := ba.FeedsKeeper.GetPrice(ba.Ctx, sd.SignalID) - if err != nil { - return err - } - + p := ba.FeedsKeeper.GetPrice(ba.Ctx, sd.SignalID) p.Price = p.Price * mltpyBps / 10000 ba.FeedsKeeper.SetPrice(ba.Ctx, p) } diff --git a/x/tunnel/keeper/helper.go b/x/tunnel/keeper/helper.go index 37ecdbb06..1409e3952 100644 --- a/x/tunnel/keeper/helper.go +++ b/x/tunnel/keeper/helper.go @@ -23,7 +23,7 @@ func GenerateNewSignalPrices( // get current price from the feed, if not found, set price to 0 price := uint64(0) feedPrice, ok := currentFeedsPricesMap[sp.SignalID] - if ok && feedPrice.PriceStatus == feedstypes.PriceStatusAvailable { + if ok && feedPrice.Status == feedstypes.PriceStatusAvailable { price = feedPrice.Price } newPrice := sdkmath.NewIntFromUint64(price) diff --git a/x/tunnel/keeper/helper_test.go b/x/tunnel/keeper/helper_test.go index 6d6e4bd74..bb94725ce 100644 --- a/x/tunnel/keeper/helper_test.go +++ b/x/tunnel/keeper/helper_test.go @@ -11,7 +11,7 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesSendAll() { tunnelID := uint64(1) currentPricesMap := map[string]feedstypes.Price{ - "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, } sendAll := true tunnel := types.Tunnel{ @@ -42,8 +42,8 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { tunnelID := uint64(1) currentPricesMap := map[string]feedstypes.Price{ - "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - "ETH/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, + "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "ETH/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, } sendAll := false tunnel := types.Tunnel{ @@ -76,8 +76,8 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { tunnelID := uint64(1) currentPricesMap := map[string]feedstypes.Price{ - "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - "ETH/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, + "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "ETH/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, } sendAll := false tunnel := types.Tunnel{ diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index d8783a7a8..57e8855ae 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -216,12 +216,12 @@ func (ms msgServer) TriggerTunnel( } signalIDs := tunnel.GetSignalIDs() - currentPrices := ms.Keeper.feedsKeeper.GetCurrentPrices(ctx, signalIDs) + currentPrices := ms.Keeper.feedsKeeper.GetPrices(ctx, signalIDs) newSignalPrices := make([]types.SignalPrice, 0, len(signalIDs)) for _, currentPrice := range currentPrices { var price uint64 - if currentPrice.PriceStatus == feedstypes.PriceStatusAvailable { + if currentPrice.Status == feedstypes.PriceStatusAvailable { price = currentPrice.Price } diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 8132195b5..9039e13c3 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -443,8 +443,8 @@ func (s *KeeperTestSuite) TestMsgTriggerTunnel() { "all good": { preRun: func() *types.MsgTriggerTunnel { s.AddSampleTunnel(true) - s.feedsKeeper.EXPECT().GetCurrentPrices(gomock.Any(), []string{"BTC"}).Return([]feedstypes.Price{ - {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC", Price: 50000, Timestamp: 0}, + s.feedsKeeper.EXPECT().GetPrices(gomock.Any(), []string{"BTC"}).Return([]feedstypes.Price{ + {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT(). SendCoinsFromAccountToModule(gomock.Any(), feePayer, types.ModuleName, types.DefaultBasePacketFee). diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/packet.go index 5a6c14122..3241f1735 100644 --- a/x/tunnel/keeper/packet.go +++ b/x/tunnel/keeper/packet.go @@ -60,7 +60,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // get active tunnel IDs ids := k.GetActiveTunnelIDs(ctx) - currentPrices := k.feedsKeeper.GetAllCurrentPrices(ctx) + currentPrices := k.feedsKeeper.GetAllPrices(ctx) currentPricesMap := createPricesMap(currentPrices) // create new packet if possible for active tunnels. If not enough fund, deactivate the tunnel. diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/packet_test.go index af857ac78..cacfbc976 100644 --- a/x/tunnel/keeper/packet_test.go +++ b/x/tunnel/keeper/packet_test.go @@ -53,7 +53,7 @@ func (s *KeeperTestSuite) TestProducePacket() { tunnelID := uint64(1) currentPricesMap := map[string]feedstypes.Price{ - "BTC/USD": {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, } feePayer := sdk.AccAddress([]byte("fee_payer_address")) tunnel := types.Tunnel{ @@ -112,8 +112,8 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { DestinationContractAddress: "0x", } - s.feedsKeeper.EXPECT().GetAllCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ - {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + s.feedsKeeper.EXPECT().GetAllPrices(gomock.Any()).Return([]feedstypes.Price{ + {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) s.bankKeeper.EXPECT(). @@ -168,8 +168,8 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { DestinationContractAddress: "0x", } - s.feedsKeeper.EXPECT().GetAllCurrentPrices(gomock.Any()).Return([]feedstypes.Price{ - {PriceStatus: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + s.feedsKeeper.EXPECT().GetAllPrices(gomock.Any()).Return([]feedstypes.Price{ + {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer). Return(sdk.Coins{sdk.NewInt64Coin("uband", 1)}) diff --git a/x/tunnel/testutil/expected_keepers_mocks.go b/x/tunnel/testutil/expected_keepers_mocks.go index 013271667..8ad2cdbdc 100644 --- a/x/tunnel/testutil/expected_keepers_mocks.go +++ b/x/tunnel/testutil/expected_keepers_mocks.go @@ -228,32 +228,32 @@ func (m *MockFeedsKeeper) EXPECT() *MockFeedsKeeperMockRecorder { return m.recorder } -// GetAllCurrentPrices mocks base method. -func (m *MockFeedsKeeper) GetAllCurrentPrices(ctx types2.Context) []types0.Price { +// GetAllPrices mocks base method. +func (m *MockFeedsKeeper) GetAllPrices(ctx types2.Context) []types0.Price { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllCurrentPrices", ctx) + ret := m.ctrl.Call(m, "GetAllPrices", ctx) ret0, _ := ret[0].([]types0.Price) return ret0 } -// GetAllCurrentPrices indicates an expected call of GetAllCurrentPrices. -func (mr *MockFeedsKeeperMockRecorder) GetAllCurrentPrices(ctx any) *gomock.Call { +// GetAllPrices indicates an expected call of GetAllPrices. +func (mr *MockFeedsKeeperMockRecorder) GetAllPrices(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllCurrentPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetAllCurrentPrices), ctx) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetAllPrices), ctx) } -// GetCurrentPrices mocks base method. -func (m *MockFeedsKeeper) GetCurrentPrices(ctx types2.Context, signalIDs []string) []types0.Price { +// GetPrices mocks base method. +func (m *MockFeedsKeeper) GetPrices(ctx types2.Context, signalIDs []string) []types0.Price { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCurrentPrices", ctx, signalIDs) + ret := m.ctrl.Call(m, "GetPrices", ctx, signalIDs) ret0, _ := ret[0].([]types0.Price) return ret0 } -// GetCurrentPrices indicates an expected call of GetCurrentPrices. -func (mr *MockFeedsKeeperMockRecorder) GetCurrentPrices(ctx, signalIDs any) *gomock.Call { +// GetPrices indicates an expected call of GetPrices. +func (mr *MockFeedsKeeperMockRecorder) GetPrices(ctx, signalIDs any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetCurrentPrices), ctx, signalIDs) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrices", reflect.TypeOf((*MockFeedsKeeper)(nil).GetPrices), ctx, signalIDs) } // MockBandtssKeeper is a mock of BandtssKeeper interface. diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index e7bdca41f..878622864 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -40,8 +40,8 @@ type BankKeeper interface { } type FeedsKeeper interface { - GetAllCurrentPrices(ctx sdk.Context) (prices []feedstypes.Price) - GetCurrentPrices(ctx sdk.Context, signalIDs []string) (prices []feedstypes.Price) + GetAllPrices(ctx sdk.Context) (prices []feedstypes.Price) + GetPrices(ctx sdk.Context, signalIDs []string) (prices []feedstypes.Price) } type BandtssKeeper interface { From d44c51d7834490cd2c3c409222e01772458f77d9 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 11 Nov 2024 19:53:29 +0700 Subject: [PATCH 245/272] clean up --- api/band/tunnel/v1beta1/tx.pulsar.go | 949 +++++++++--------- api/band/tunnel/v1beta1/tx_grpc.pb.go | 68 +- benchmark/tunnel_bench_test.go | 2 +- proto/band/tunnel/v1beta1/tx.proto | 30 +- scripts/tunnel/deposit_to_tunnel.sh | 1 + scripts/tunnel/deposit_tunnel.sh | 1 - scripts/tunnel/withdraw.sh | 1 - scripts/tunnel/withdraw_from_tunnel.sh | 1 + x/tunnel/README.md | 79 +- x/tunnel/client/cli/tx.go | 16 +- x/tunnel/keeper/account.go | 43 - x/tunnel/keeper/account_test.go | 27 - .../keeper/{deposit.go => keeper_deposit.go} | 37 +- ...deposit_test.go => keeper_deposit_test.go} | 8 +- ...ices.go => keeper_latest_signal_prices.go} | 0 ...go => keeper_latest_signal_prices_test.go} | 0 .../keeper/{packet.go => keeper_packet.go} | 0 .../{packet_test.go => keeper_packet_test.go} | 0 x/tunnel/keeper/keeper_test.go | 5 + .../{tss_packet.go => keeper_tss_packet.go} | 0 ...cket_test.go => keeper_tss_packet_test.go} | 0 .../keeper/{tunnel.go => keeper_tunnel.go} | 63 +- .../{tunnel_test.go => keeper_tunnel_test.go} | 24 +- x/tunnel/keeper/msg_server.go | 68 +- x/tunnel/keeper/msg_server_test.go | 46 +- x/tunnel/types/codec.go | 8 +- x/tunnel/types/events.go | 42 +- x/tunnel/types/msgs.go | 24 +- x/tunnel/types/msgs_test.go | 6 +- x/tunnel/types/tx.pb.go | 393 ++++---- 30 files changed, 980 insertions(+), 962 deletions(-) create mode 100755 scripts/tunnel/deposit_to_tunnel.sh delete mode 100755 scripts/tunnel/deposit_tunnel.sh delete mode 100755 scripts/tunnel/withdraw.sh create mode 100755 scripts/tunnel/withdraw_from_tunnel.sh delete mode 100644 x/tunnel/keeper/account.go delete mode 100644 x/tunnel/keeper/account_test.go rename x/tunnel/keeper/{deposit.go => keeper_deposit.go} (81%) rename x/tunnel/keeper/{deposit_test.go => keeper_deposit_test.go} (94%) rename x/tunnel/keeper/{latest_signal_prices.go => keeper_latest_signal_prices.go} (100%) rename x/tunnel/keeper/{latest_signal_prices_test.go => keeper_latest_signal_prices_test.go} (100%) rename x/tunnel/keeper/{packet.go => keeper_packet.go} (100%) rename x/tunnel/keeper/{packet_test.go => keeper_packet_test.go} (100%) rename x/tunnel/keeper/{tss_packet.go => keeper_tss_packet.go} (100%) rename x/tunnel/keeper/{tss_packet_test.go => keeper_tss_packet_test.go} (100%) rename x/tunnel/keeper/{tunnel.go => keeper_tunnel.go} (76%) rename x/tunnel/keeper/{tunnel_test.go => keeper_tunnel_test.go} (90%) diff --git a/api/band/tunnel/v1beta1/tx.pulsar.go b/api/band/tunnel/v1beta1/tx.pulsar.go index c3a884f6a..504dfd2bd 100644 --- a/api/band/tunnel/v1beta1/tx.pulsar.go +++ b/api/band/tunnel/v1beta1/tx.pulsar.go @@ -4775,81 +4775,81 @@ func (x *fastReflection_MsgTriggerTunnelResponse) ProtoMethods() *protoiface.Met } } -var _ protoreflect.List = (*_MsgDepositTunnel_2_list)(nil) +var _ protoreflect.List = (*_MsgDepositToTunnel_2_list)(nil) -type _MsgDepositTunnel_2_list struct { +type _MsgDepositToTunnel_2_list struct { list *[]*v1beta1.Coin } -func (x *_MsgDepositTunnel_2_list) Len() int { +func (x *_MsgDepositToTunnel_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgDepositTunnel_2_list) Get(i int) protoreflect.Value { +func (x *_MsgDepositToTunnel_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgDepositTunnel_2_list) Set(i int, value protoreflect.Value) { +func (x *_MsgDepositToTunnel_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_MsgDepositTunnel_2_list) Append(value protoreflect.Value) { +func (x *_MsgDepositToTunnel_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_MsgDepositTunnel_2_list) AppendMutable() protoreflect.Value { +func (x *_MsgDepositToTunnel_2_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgDepositTunnel_2_list) Truncate(n int) { +func (x *_MsgDepositToTunnel_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgDepositTunnel_2_list) NewElement() protoreflect.Value { +func (x *_MsgDepositToTunnel_2_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgDepositTunnel_2_list) IsValid() bool { +func (x *_MsgDepositToTunnel_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgDepositTunnel protoreflect.MessageDescriptor - fd_MsgDepositTunnel_tunnel_id protoreflect.FieldDescriptor - fd_MsgDepositTunnel_amount protoreflect.FieldDescriptor - fd_MsgDepositTunnel_depositor protoreflect.FieldDescriptor + md_MsgDepositToTunnel protoreflect.MessageDescriptor + fd_MsgDepositToTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgDepositToTunnel_amount protoreflect.FieldDescriptor + fd_MsgDepositToTunnel_depositor protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tx_proto_init() - md_MsgDepositTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnel") - fd_MsgDepositTunnel_tunnel_id = md_MsgDepositTunnel.Fields().ByName("tunnel_id") - fd_MsgDepositTunnel_amount = md_MsgDepositTunnel.Fields().ByName("amount") - fd_MsgDepositTunnel_depositor = md_MsgDepositTunnel.Fields().ByName("depositor") + md_MsgDepositToTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositToTunnel") + fd_MsgDepositToTunnel_tunnel_id = md_MsgDepositToTunnel.Fields().ByName("tunnel_id") + fd_MsgDepositToTunnel_amount = md_MsgDepositToTunnel.Fields().ByName("amount") + fd_MsgDepositToTunnel_depositor = md_MsgDepositToTunnel.Fields().ByName("depositor") } -var _ protoreflect.Message = (*fastReflection_MsgDepositTunnel)(nil) +var _ protoreflect.Message = (*fastReflection_MsgDepositToTunnel)(nil) -type fastReflection_MsgDepositTunnel MsgDepositTunnel +type fastReflection_MsgDepositToTunnel MsgDepositToTunnel -func (x *MsgDepositTunnel) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDepositTunnel)(x) +func (x *MsgDepositToTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDepositToTunnel)(x) } -func (x *MsgDepositTunnel) slowProtoReflect() protoreflect.Message { +func (x *MsgDepositToTunnel) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4861,43 +4861,43 @@ func (x *MsgDepositTunnel) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgDepositTunnel_messageType fastReflection_MsgDepositTunnel_messageType -var _ protoreflect.MessageType = fastReflection_MsgDepositTunnel_messageType{} +var _fastReflection_MsgDepositToTunnel_messageType fastReflection_MsgDepositToTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgDepositToTunnel_messageType{} -type fastReflection_MsgDepositTunnel_messageType struct{} +type fastReflection_MsgDepositToTunnel_messageType struct{} -func (x fastReflection_MsgDepositTunnel_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDepositTunnel)(nil) +func (x fastReflection_MsgDepositToTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDepositToTunnel)(nil) } -func (x fastReflection_MsgDepositTunnel_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDepositTunnel) +func (x fastReflection_MsgDepositToTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDepositToTunnel) } -func (x fastReflection_MsgDepositTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDepositTunnel +func (x fastReflection_MsgDepositToTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositToTunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgDepositTunnel) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDepositTunnel +func (x *fastReflection_MsgDepositToTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositToTunnel } // 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_MsgDepositTunnel) Type() protoreflect.MessageType { - return _fastReflection_MsgDepositTunnel_messageType +func (x *fastReflection_MsgDepositToTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgDepositToTunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDepositTunnel) New() protoreflect.Message { - return new(fastReflection_MsgDepositTunnel) +func (x *fastReflection_MsgDepositToTunnel) New() protoreflect.Message { + return new(fastReflection_MsgDepositToTunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDepositTunnel) Interface() protoreflect.ProtoMessage { - return (*MsgDepositTunnel)(x) +func (x *fastReflection_MsgDepositToTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgDepositToTunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -4905,22 +4905,22 @@ func (x *fastReflection_MsgDepositTunnel) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgDepositTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgDepositToTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TunnelId != uint64(0) { value := protoreflect.ValueOfUint64(x.TunnelId) - if !f(fd_MsgDepositTunnel_tunnel_id, value) { + if !f(fd_MsgDepositToTunnel_tunnel_id, value) { return } } if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{list: &x.Amount}) - if !f(fd_MsgDepositTunnel_amount, value) { + value := protoreflect.ValueOfList(&_MsgDepositToTunnel_2_list{list: &x.Amount}) + if !f(fd_MsgDepositToTunnel_amount, value) { return } } if x.Depositor != "" { value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_MsgDepositTunnel_depositor, value) { + if !f(fd_MsgDepositToTunnel_depositor, value) { return } } @@ -4937,19 +4937,19 @@ func (x *fastReflection_MsgDepositTunnel) Range(f func(protoreflect.FieldDescrip // 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_MsgDepositTunnel) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgDepositToTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositToTunnel.tunnel_id": return x.TunnelId != uint64(0) - case "band.tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositToTunnel.amount": return len(x.Amount) != 0 - case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositToTunnel.depositor": return x.Depositor != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnel does not contain field %s", fd.FullName())) } } @@ -4959,19 +4959,19 @@ func (x *fastReflection_MsgDepositTunnel) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDepositTunnel) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgDepositToTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositToTunnel.tunnel_id": x.TunnelId = uint64(0) - case "band.tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositToTunnel.amount": x.Amount = nil - case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositToTunnel.depositor": x.Depositor = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnel does not contain field %s", fd.FullName())) } } @@ -4981,25 +4981,25 @@ func (x *fastReflection_MsgDepositTunnel) Clear(fd protoreflect.FieldDescriptor) // 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_MsgDepositTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositToTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositToTunnel.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositToTunnel.amount": if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{}) + return protoreflect.ValueOfList(&_MsgDepositToTunnel_2_list{}) } - listValue := &_MsgDepositTunnel_2_list{list: &x.Amount} + listValue := &_MsgDepositToTunnel_2_list{list: &x.Amount} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositToTunnel.depositor": value := x.Depositor return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnel does not contain field %s", descriptor.FullName())) } } @@ -5013,21 +5013,21 @@ func (x *fastReflection_MsgDepositTunnel) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDepositTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgDepositToTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositToTunnel.tunnel_id": x.TunnelId = value.Uint() - case "band.tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositToTunnel.amount": lv := value.List() - clv := lv.(*_MsgDepositTunnel_2_list) + clv := lv.(*_MsgDepositToTunnel_2_list) x.Amount = *clv.list - case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": + case "band.tunnel.v1beta1.MsgDepositToTunnel.depositor": x.Depositor = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnel does not contain field %s", fd.FullName())) } } @@ -5041,53 +5041,53 @@ func (x *fastReflection_MsgDepositTunnel) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDepositTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositToTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositToTunnel.amount": if x.Amount == nil { x.Amount = []*v1beta1.Coin{} } - value := &_MsgDepositTunnel_2_list{list: &x.Amount} + value := &_MsgDepositToTunnel_2_list{list: &x.Amount} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgDepositTunnel is not mutable")) - case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": - panic(fmt.Errorf("field depositor of message band.tunnel.v1beta1.MsgDepositTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgDepositToTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgDepositToTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgDepositToTunnel.depositor": + panic(fmt.Errorf("field depositor of message band.tunnel.v1beta1.MsgDepositToTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnel 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_MsgDepositTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositToTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgDepositTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgDepositToTunnel.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.MsgDepositTunnel.amount": + case "band.tunnel.v1beta1.MsgDepositToTunnel.amount": list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgDepositTunnel_2_list{list: &list}) - case "band.tunnel.v1beta1.MsgDepositTunnel.depositor": + return protoreflect.ValueOfList(&_MsgDepositToTunnel_2_list{list: &list}) + case "band.tunnel.v1beta1.MsgDepositToTunnel.depositor": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnel 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_MsgDepositTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgDepositToTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgDepositTunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgDepositToTunnel", d.FullName())) } panic("unreachable") } @@ -5095,7 +5095,7 @@ func (x *fastReflection_MsgDepositTunnel) WhichOneof(d protoreflect.OneofDescrip // 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_MsgDepositTunnel) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgDepositToTunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5106,7 +5106,7 @@ func (x *fastReflection_MsgDepositTunnel) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDepositTunnel) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgDepositToTunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5118,7 +5118,7 @@ func (x *fastReflection_MsgDepositTunnel) SetUnknown(fields protoreflect.RawFiel // 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_MsgDepositTunnel) IsValid() bool { +func (x *fastReflection_MsgDepositToTunnel) IsValid() bool { return x != nil } @@ -5128,9 +5128,9 @@ func (x *fastReflection_MsgDepositTunnel) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgDepositTunnel) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgDepositToTunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDepositTunnel) + x := input.Message.Interface().(*MsgDepositToTunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5165,7 +5165,7 @@ func (x *fastReflection_MsgDepositTunnel) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDepositTunnel) + x := input.Message.Interface().(*MsgDepositToTunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5223,7 +5223,7 @@ func (x *fastReflection_MsgDepositTunnel) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDepositTunnel) + x := input.Message.Interface().(*MsgDepositToTunnel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5255,10 +5255,10 @@ func (x *fastReflection_MsgDepositTunnel) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnel: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositToTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositToTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5382,23 +5382,23 @@ func (x *fastReflection_MsgDepositTunnel) ProtoMethods() *protoiface.Methods { } var ( - md_MsgDepositTunnelResponse protoreflect.MessageDescriptor + md_MsgDepositToTunnelResponse protoreflect.MessageDescriptor ) func init() { file_band_tunnel_v1beta1_tx_proto_init() - md_MsgDepositTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositTunnelResponse") + md_MsgDepositToTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgDepositToTunnelResponse") } -var _ protoreflect.Message = (*fastReflection_MsgDepositTunnelResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgDepositToTunnelResponse)(nil) -type fastReflection_MsgDepositTunnelResponse MsgDepositTunnelResponse +type fastReflection_MsgDepositToTunnelResponse MsgDepositToTunnelResponse -func (x *MsgDepositTunnelResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDepositTunnelResponse)(x) +func (x *MsgDepositToTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDepositToTunnelResponse)(x) } -func (x *MsgDepositTunnelResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgDepositToTunnelResponse) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5410,43 +5410,43 @@ func (x *MsgDepositTunnelResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgDepositTunnelResponse_messageType fastReflection_MsgDepositTunnelResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgDepositTunnelResponse_messageType{} +var _fastReflection_MsgDepositToTunnelResponse_messageType fastReflection_MsgDepositToTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDepositToTunnelResponse_messageType{} -type fastReflection_MsgDepositTunnelResponse_messageType struct{} +type fastReflection_MsgDepositToTunnelResponse_messageType struct{} -func (x fastReflection_MsgDepositTunnelResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDepositTunnelResponse)(nil) +func (x fastReflection_MsgDepositToTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDepositToTunnelResponse)(nil) } -func (x fastReflection_MsgDepositTunnelResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDepositTunnelResponse) +func (x fastReflection_MsgDepositToTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDepositToTunnelResponse) } -func (x fastReflection_MsgDepositTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDepositTunnelResponse +func (x fastReflection_MsgDepositToTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositToTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgDepositTunnelResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDepositTunnelResponse +func (x *fastReflection_MsgDepositToTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDepositToTunnelResponse } // 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_MsgDepositTunnelResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgDepositTunnelResponse_messageType +func (x *fastReflection_MsgDepositToTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDepositToTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDepositTunnelResponse) New() protoreflect.Message { - return new(fastReflection_MsgDepositTunnelResponse) +func (x *fastReflection_MsgDepositToTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgDepositToTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDepositTunnelResponse) Interface() protoreflect.ProtoMessage { - return (*MsgDepositTunnelResponse)(x) +func (x *fastReflection_MsgDepositToTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDepositToTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -5454,7 +5454,7 @@ func (x *fastReflection_MsgDepositTunnelResponse) Interface() protoreflect.Proto // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgDepositTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgDepositToTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -5468,13 +5468,13 @@ func (x *fastReflection_MsgDepositTunnelResponse) Range(f func(protoreflect.Fiel // 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_MsgDepositTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgDepositToTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5484,13 +5484,13 @@ func (x *fastReflection_MsgDepositTunnelResponse) Has(fd protoreflect.FieldDescr // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDepositTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgDepositToTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5500,13 +5500,13 @@ func (x *fastReflection_MsgDepositTunnelResponse) Clear(fd protoreflect.FieldDes // 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_MsgDepositTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositToTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -5520,13 +5520,13 @@ func (x *fastReflection_MsgDepositTunnelResponse) Get(descriptor protoreflect.Fi // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDepositTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgDepositToTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnelResponse does not contain field %s", fd.FullName())) } } @@ -5540,36 +5540,36 @@ func (x *fastReflection_MsgDepositTunnelResponse) Set(fd protoreflect.FieldDescr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDepositTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositToTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnelResponse 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_MsgDepositTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgDepositToTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgDepositToTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgDepositToTunnelResponse 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_MsgDepositTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgDepositToTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgDepositTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgDepositToTunnelResponse", d.FullName())) } panic("unreachable") } @@ -5577,7 +5577,7 @@ func (x *fastReflection_MsgDepositTunnelResponse) WhichOneof(d protoreflect.Oneo // 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_MsgDepositTunnelResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgDepositToTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5588,7 +5588,7 @@ func (x *fastReflection_MsgDepositTunnelResponse) GetUnknown() protoreflect.RawF // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDepositTunnelResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgDepositToTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5600,7 +5600,7 @@ func (x *fastReflection_MsgDepositTunnelResponse) SetUnknown(fields protoreflect // 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_MsgDepositTunnelResponse) IsValid() bool { +func (x *fastReflection_MsgDepositToTunnelResponse) IsValid() bool { return x != nil } @@ -5610,9 +5610,9 @@ func (x *fastReflection_MsgDepositTunnelResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgDepositTunnelResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgDepositToTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDepositTunnelResponse) + x := input.Message.Interface().(*MsgDepositToTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5634,7 +5634,7 @@ func (x *fastReflection_MsgDepositTunnelResponse) ProtoMethods() *protoiface.Met } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDepositTunnelResponse) + x := input.Message.Interface().(*MsgDepositToTunnelResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5664,7 +5664,7 @@ func (x *fastReflection_MsgDepositTunnelResponse) ProtoMethods() *protoiface.Met }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDepositTunnelResponse) + x := input.Message.Interface().(*MsgDepositToTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5696,10 +5696,10 @@ func (x *fastReflection_MsgDepositTunnelResponse) ProtoMethods() *protoiface.Met fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnelResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositToTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDepositToTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -5737,81 +5737,81 @@ func (x *fastReflection_MsgDepositTunnelResponse) ProtoMethods() *protoiface.Met } } -var _ protoreflect.List = (*_MsgWithdrawTunnel_2_list)(nil) +var _ protoreflect.List = (*_MsgWithdrawFromTunnel_2_list)(nil) -type _MsgWithdrawTunnel_2_list struct { +type _MsgWithdrawFromTunnel_2_list struct { list *[]*v1beta1.Coin } -func (x *_MsgWithdrawTunnel_2_list) Len() int { +func (x *_MsgWithdrawFromTunnel_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgWithdrawTunnel_2_list) Get(i int) protoreflect.Value { +func (x *_MsgWithdrawFromTunnel_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgWithdrawTunnel_2_list) Set(i int, value protoreflect.Value) { +func (x *_MsgWithdrawFromTunnel_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_MsgWithdrawTunnel_2_list) Append(value protoreflect.Value) { +func (x *_MsgWithdrawFromTunnel_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_MsgWithdrawTunnel_2_list) AppendMutable() protoreflect.Value { +func (x *_MsgWithdrawFromTunnel_2_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgWithdrawTunnel_2_list) Truncate(n int) { +func (x *_MsgWithdrawFromTunnel_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_MsgWithdrawTunnel_2_list) NewElement() protoreflect.Value { +func (x *_MsgWithdrawFromTunnel_2_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgWithdrawTunnel_2_list) IsValid() bool { +func (x *_MsgWithdrawFromTunnel_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgWithdrawTunnel protoreflect.MessageDescriptor - fd_MsgWithdrawTunnel_tunnel_id protoreflect.FieldDescriptor - fd_MsgWithdrawTunnel_amount protoreflect.FieldDescriptor - fd_MsgWithdrawTunnel_withdrawer protoreflect.FieldDescriptor + md_MsgWithdrawFromTunnel protoreflect.MessageDescriptor + fd_MsgWithdrawFromTunnel_tunnel_id protoreflect.FieldDescriptor + fd_MsgWithdrawFromTunnel_amount protoreflect.FieldDescriptor + fd_MsgWithdrawFromTunnel_withdrawer protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tx_proto_init() - md_MsgWithdrawTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnel") - fd_MsgWithdrawTunnel_tunnel_id = md_MsgWithdrawTunnel.Fields().ByName("tunnel_id") - fd_MsgWithdrawTunnel_amount = md_MsgWithdrawTunnel.Fields().ByName("amount") - fd_MsgWithdrawTunnel_withdrawer = md_MsgWithdrawTunnel.Fields().ByName("withdrawer") + md_MsgWithdrawFromTunnel = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawFromTunnel") + fd_MsgWithdrawFromTunnel_tunnel_id = md_MsgWithdrawFromTunnel.Fields().ByName("tunnel_id") + fd_MsgWithdrawFromTunnel_amount = md_MsgWithdrawFromTunnel.Fields().ByName("amount") + fd_MsgWithdrawFromTunnel_withdrawer = md_MsgWithdrawFromTunnel.Fields().ByName("withdrawer") } -var _ protoreflect.Message = (*fastReflection_MsgWithdrawTunnel)(nil) +var _ protoreflect.Message = (*fastReflection_MsgWithdrawFromTunnel)(nil) -type fastReflection_MsgWithdrawTunnel MsgWithdrawTunnel +type fastReflection_MsgWithdrawFromTunnel MsgWithdrawFromTunnel -func (x *MsgWithdrawTunnel) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawTunnel)(x) +func (x *MsgWithdrawFromTunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawFromTunnel)(x) } -func (x *MsgWithdrawTunnel) slowProtoReflect() protoreflect.Message { +func (x *MsgWithdrawFromTunnel) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5823,43 +5823,43 @@ func (x *MsgWithdrawTunnel) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgWithdrawTunnel_messageType fastReflection_MsgWithdrawTunnel_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawTunnel_messageType{} +var _fastReflection_MsgWithdrawFromTunnel_messageType fastReflection_MsgWithdrawFromTunnel_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawFromTunnel_messageType{} -type fastReflection_MsgWithdrawTunnel_messageType struct{} +type fastReflection_MsgWithdrawFromTunnel_messageType struct{} -func (x fastReflection_MsgWithdrawTunnel_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawTunnel)(nil) +func (x fastReflection_MsgWithdrawFromTunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawFromTunnel)(nil) } -func (x fastReflection_MsgWithdrawTunnel_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawTunnel) +func (x fastReflection_MsgWithdrawFromTunnel_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawFromTunnel) } -func (x fastReflection_MsgWithdrawTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawTunnel +func (x fastReflection_MsgWithdrawFromTunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawFromTunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgWithdrawTunnel) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawTunnel +func (x *fastReflection_MsgWithdrawFromTunnel) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawFromTunnel } // 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_MsgWithdrawTunnel) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawTunnel_messageType +func (x *fastReflection_MsgWithdrawFromTunnel) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawFromTunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawTunnel) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawTunnel) +func (x *fastReflection_MsgWithdrawFromTunnel) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawFromTunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawTunnel) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawTunnel)(x) +func (x *fastReflection_MsgWithdrawFromTunnel) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawFromTunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -5867,22 +5867,22 @@ func (x *fastReflection_MsgWithdrawTunnel) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgWithdrawTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgWithdrawFromTunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TunnelId != uint64(0) { value := protoreflect.ValueOfUint64(x.TunnelId) - if !f(fd_MsgWithdrawTunnel_tunnel_id, value) { + if !f(fd_MsgWithdrawFromTunnel_tunnel_id, value) { return } } if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{list: &x.Amount}) - if !f(fd_MsgWithdrawTunnel_amount, value) { + value := protoreflect.ValueOfList(&_MsgWithdrawFromTunnel_2_list{list: &x.Amount}) + if !f(fd_MsgWithdrawFromTunnel_amount, value) { return } } if x.Withdrawer != "" { value := protoreflect.ValueOfString(x.Withdrawer) - if !f(fd_MsgWithdrawTunnel_withdrawer, value) { + if !f(fd_MsgWithdrawFromTunnel_withdrawer, value) { return } } @@ -5899,19 +5899,19 @@ func (x *fastReflection_MsgWithdrawTunnel) Range(f func(protoreflect.FieldDescri // 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_MsgWithdrawTunnel) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgWithdrawFromTunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.tunnel_id": return x.TunnelId != uint64(0) - case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.amount": return len(x.Amount) != 0 - case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.withdrawer": return x.Withdrawer != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnel does not contain field %s", fd.FullName())) } } @@ -5921,19 +5921,19 @@ func (x *fastReflection_MsgWithdrawTunnel) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawTunnel) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgWithdrawFromTunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.tunnel_id": x.TunnelId = uint64(0) - case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.amount": x.Amount = nil - case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.withdrawer": x.Withdrawer = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnel does not contain field %s", fd.FullName())) } } @@ -5943,25 +5943,25 @@ func (x *fastReflection_MsgWithdrawTunnel) Clear(fd protoreflect.FieldDescriptor // 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_MsgWithdrawTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawFromTunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.amount": if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{}) + return protoreflect.ValueOfList(&_MsgWithdrawFromTunnel_2_list{}) } - listValue := &_MsgWithdrawTunnel_2_list{list: &x.Amount} + listValue := &_MsgWithdrawFromTunnel_2_list{list: &x.Amount} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.withdrawer": value := x.Withdrawer return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnel does not contain field %s", descriptor.FullName())) } } @@ -5975,21 +5975,21 @@ func (x *fastReflection_MsgWithdrawTunnel) Get(descriptor protoreflect.FieldDesc // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgWithdrawFromTunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.tunnel_id": x.TunnelId = value.Uint() - case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.amount": lv := value.List() - clv := lv.(*_MsgWithdrawTunnel_2_list) + clv := lv.(*_MsgWithdrawFromTunnel_2_list) x.Amount = *clv.list - case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.withdrawer": x.Withdrawer = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnel does not contain field %s", fd.FullName())) } } @@ -6003,53 +6003,53 @@ func (x *fastReflection_MsgWithdrawTunnel) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawFromTunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.amount": if x.Amount == nil { x.Amount = []*v1beta1.Coin{} } - value := &_MsgWithdrawTunnel_2_list{list: &x.Amount} + value := &_MsgWithdrawFromTunnel_2_list{list: &x.Amount} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) - case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": - panic(fmt.Errorf("field withdrawer of message band.tunnel.v1beta1.MsgWithdrawTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.MsgWithdrawFromTunnel is not mutable")) + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.withdrawer": + panic(fmt.Errorf("field withdrawer of message band.tunnel.v1beta1.MsgWithdrawFromTunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnel 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_MsgWithdrawTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawFromTunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.MsgWithdrawTunnel.tunnel_id": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.MsgWithdrawTunnel.amount": + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.amount": list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgWithdrawTunnel_2_list{list: &list}) - case "band.tunnel.v1beta1.MsgWithdrawTunnel.withdrawer": + return protoreflect.ValueOfList(&_MsgWithdrawFromTunnel_2_list{list: &list}) + case "band.tunnel.v1beta1.MsgWithdrawFromTunnel.withdrawer": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnel")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnel does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnel 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_MsgWithdrawTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgWithdrawFromTunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgWithdrawTunnel", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgWithdrawFromTunnel", d.FullName())) } panic("unreachable") } @@ -6057,7 +6057,7 @@ func (x *fastReflection_MsgWithdrawTunnel) WhichOneof(d protoreflect.OneofDescri // 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_MsgWithdrawTunnel) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgWithdrawFromTunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6068,7 +6068,7 @@ func (x *fastReflection_MsgWithdrawTunnel) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawTunnel) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgWithdrawFromTunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6080,7 +6080,7 @@ func (x *fastReflection_MsgWithdrawTunnel) SetUnknown(fields protoreflect.RawFie // 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_MsgWithdrawTunnel) IsValid() bool { +func (x *fastReflection_MsgWithdrawFromTunnel) IsValid() bool { return x != nil } @@ -6090,9 +6090,9 @@ func (x *fastReflection_MsgWithdrawTunnel) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgWithdrawTunnel) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgWithdrawFromTunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawTunnel) + x := input.Message.Interface().(*MsgWithdrawFromTunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6127,7 +6127,7 @@ func (x *fastReflection_MsgWithdrawTunnel) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawTunnel) + x := input.Message.Interface().(*MsgWithdrawFromTunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6185,7 +6185,7 @@ func (x *fastReflection_MsgWithdrawTunnel) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawTunnel) + x := input.Message.Interface().(*MsgWithdrawFromTunnel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6217,10 +6217,10 @@ func (x *fastReflection_MsgWithdrawTunnel) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnel: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawFromTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawFromTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6344,23 +6344,23 @@ func (x *fastReflection_MsgWithdrawTunnel) ProtoMethods() *protoiface.Methods { } var ( - md_MsgWithdrawTunnelResponse protoreflect.MessageDescriptor + md_MsgWithdrawFromTunnelResponse protoreflect.MessageDescriptor ) func init() { file_band_tunnel_v1beta1_tx_proto_init() - md_MsgWithdrawTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawTunnelResponse") + md_MsgWithdrawFromTunnelResponse = File_band_tunnel_v1beta1_tx_proto.Messages().ByName("MsgWithdrawFromTunnelResponse") } -var _ protoreflect.Message = (*fastReflection_MsgWithdrawTunnelResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgWithdrawFromTunnelResponse)(nil) -type fastReflection_MsgWithdrawTunnelResponse MsgWithdrawTunnelResponse +type fastReflection_MsgWithdrawFromTunnelResponse MsgWithdrawFromTunnelResponse -func (x *MsgWithdrawTunnelResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawTunnelResponse)(x) +func (x *MsgWithdrawFromTunnelResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgWithdrawFromTunnelResponse)(x) } -func (x *MsgWithdrawTunnelResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgWithdrawFromTunnelResponse) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -6372,43 +6372,43 @@ func (x *MsgWithdrawTunnelResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgWithdrawTunnelResponse_messageType fastReflection_MsgWithdrawTunnelResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawTunnelResponse_messageType{} +var _fastReflection_MsgWithdrawFromTunnelResponse_messageType fastReflection_MsgWithdrawFromTunnelResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgWithdrawFromTunnelResponse_messageType{} -type fastReflection_MsgWithdrawTunnelResponse_messageType struct{} +type fastReflection_MsgWithdrawFromTunnelResponse_messageType struct{} -func (x fastReflection_MsgWithdrawTunnelResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawTunnelResponse)(nil) +func (x fastReflection_MsgWithdrawFromTunnelResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgWithdrawFromTunnelResponse)(nil) } -func (x fastReflection_MsgWithdrawTunnelResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawTunnelResponse) +func (x fastReflection_MsgWithdrawFromTunnelResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawFromTunnelResponse) } -func (x fastReflection_MsgWithdrawTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawTunnelResponse +func (x fastReflection_MsgWithdrawFromTunnelResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawFromTunnelResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgWithdrawTunnelResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawTunnelResponse +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgWithdrawFromTunnelResponse } // 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_MsgWithdrawTunnelResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawTunnelResponse_messageType +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgWithdrawFromTunnelResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawTunnelResponse) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawTunnelResponse) +func (x *fastReflection_MsgWithdrawFromTunnelResponse) New() protoreflect.Message { + return new(fastReflection_MsgWithdrawFromTunnelResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawTunnelResponse) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawTunnelResponse)(x) +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Interface() protoreflect.ProtoMessage { + return (*MsgWithdrawFromTunnelResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -6416,7 +6416,7 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Interface() protoreflect.Prot // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgWithdrawTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -6430,13 +6430,13 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Range(f func(protoreflect.Fie // 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_MsgWithdrawTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6446,13 +6446,13 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Has(fd protoreflect.FieldDesc // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6462,13 +6462,13 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Clear(fd protoreflect.FieldDe // 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_MsgWithdrawTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse does not contain field %s", descriptor.FullName())) } } @@ -6482,13 +6482,13 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Get(descriptor protoreflect.F // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse does not contain field %s", fd.FullName())) } } @@ -6502,36 +6502,36 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) Set(fd protoreflect.FieldDesc // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse 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_MsgWithdrawTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawTunnelResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawTunnelResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse 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_MsgWithdrawTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgWithdrawTunnelResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse", d.FullName())) } panic("unreachable") } @@ -6539,7 +6539,7 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) WhichOneof(d protoreflect.One // 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_MsgWithdrawTunnelResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -6550,7 +6550,7 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) GetUnknown() protoreflect.Raw // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawTunnelResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -6562,7 +6562,7 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) SetUnknown(fields protoreflec // 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_MsgWithdrawTunnelResponse) IsValid() bool { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) IsValid() bool { return x != nil } @@ -6572,9 +6572,9 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgWithdrawTunnelResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgWithdrawFromTunnelResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawTunnelResponse) + x := input.Message.Interface().(*MsgWithdrawFromTunnelResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6596,7 +6596,7 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) ProtoMethods() *protoiface.Me } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawTunnelResponse) + x := input.Message.Interface().(*MsgWithdrawFromTunnelResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6626,7 +6626,7 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) ProtoMethods() *protoiface.Me }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawTunnelResponse) + x := input.Message.Interface().(*MsgWithdrawFromTunnelResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -6658,10 +6658,10 @@ func (x *fastReflection_MsgWithdrawTunnelResponse) ProtoMethods() *protoiface.Me fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnelResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawFromTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawFromTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -7996,8 +7996,8 @@ func (*MsgTriggerTunnelResponse) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{9} } -// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. -type MsgDepositTunnel struct { +// MsgDepositToTunnel defines a message to deposit to an existing tunnel. +type MsgDepositToTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -8010,8 +8010,8 @@ type MsgDepositTunnel struct { Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"` } -func (x *MsgDepositTunnel) Reset() { - *x = MsgDepositTunnel{} +func (x *MsgDepositToTunnel) Reset() { + *x = MsgDepositToTunnel{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8019,47 +8019,47 @@ func (x *MsgDepositTunnel) Reset() { } } -func (x *MsgDepositTunnel) String() string { +func (x *MsgDepositToTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgDepositTunnel) ProtoMessage() {} +func (*MsgDepositToTunnel) ProtoMessage() {} -// Deprecated: Use MsgDepositTunnel.ProtoReflect.Descriptor instead. -func (*MsgDepositTunnel) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgDepositToTunnel.ProtoReflect.Descriptor instead. +func (*MsgDepositToTunnel) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{10} } -func (x *MsgDepositTunnel) GetTunnelId() uint64 { +func (x *MsgDepositToTunnel) GetTunnelId() uint64 { if x != nil { return x.TunnelId } return 0 } -func (x *MsgDepositTunnel) GetAmount() []*v1beta1.Coin { +func (x *MsgDepositToTunnel) GetAmount() []*v1beta1.Coin { if x != nil { return x.Amount } return nil } -func (x *MsgDepositTunnel) GetDepositor() string { +func (x *MsgDepositToTunnel) GetDepositor() string { if x != nil { return x.Depositor } return "" } -// MsgDepositTunnelResponse defines the Msg/Deposit response type. -type MsgDepositTunnelResponse struct { +// MsgDepositToTunnelResponse defines the Msg/DepositToTunnel response type. +type MsgDepositToTunnelResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgDepositTunnelResponse) Reset() { - *x = MsgDepositTunnelResponse{} +func (x *MsgDepositToTunnelResponse) Reset() { + *x = MsgDepositToTunnelResponse{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8067,19 +8067,19 @@ func (x *MsgDepositTunnelResponse) Reset() { } } -func (x *MsgDepositTunnelResponse) String() string { +func (x *MsgDepositToTunnelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgDepositTunnelResponse) ProtoMessage() {} +func (*MsgDepositToTunnelResponse) ProtoMessage() {} -// Deprecated: Use MsgDepositTunnelResponse.ProtoReflect.Descriptor instead. -func (*MsgDepositTunnelResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgDepositToTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgDepositToTunnelResponse) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{11} } -// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. -type MsgWithdrawTunnel struct { +// MsgWithdrawFromTunnel is the transaction message to withdraw a deposit from an existing tunnel. +type MsgWithdrawFromTunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -8092,8 +8092,8 @@ type MsgWithdrawTunnel struct { Withdrawer string `protobuf:"bytes,3,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` } -func (x *MsgWithdrawTunnel) Reset() { - *x = MsgWithdrawTunnel{} +func (x *MsgWithdrawFromTunnel) Reset() { + *x = MsgWithdrawFromTunnel{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8101,47 +8101,47 @@ func (x *MsgWithdrawTunnel) Reset() { } } -func (x *MsgWithdrawTunnel) String() string { +func (x *MsgWithdrawFromTunnel) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgWithdrawTunnel) ProtoMessage() {} +func (*MsgWithdrawFromTunnel) ProtoMessage() {} -// Deprecated: Use MsgWithdrawTunnel.ProtoReflect.Descriptor instead. -func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgWithdrawFromTunnel.ProtoReflect.Descriptor instead. +func (*MsgWithdrawFromTunnel) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{12} } -func (x *MsgWithdrawTunnel) GetTunnelId() uint64 { +func (x *MsgWithdrawFromTunnel) GetTunnelId() uint64 { if x != nil { return x.TunnelId } return 0 } -func (x *MsgWithdrawTunnel) GetAmount() []*v1beta1.Coin { +func (x *MsgWithdrawFromTunnel) GetAmount() []*v1beta1.Coin { if x != nil { return x.Amount } return nil } -func (x *MsgWithdrawTunnel) GetWithdrawer() string { +func (x *MsgWithdrawFromTunnel) GetWithdrawer() string { if x != nil { return x.Withdrawer } return "" } -// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. -type MsgWithdrawTunnelResponse struct { +// MsgWithdrawFromTunnelResponse defines the Msg/WithdrawFromTunnel response type. +type MsgWithdrawFromTunnelResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgWithdrawTunnelResponse) Reset() { - *x = MsgWithdrawTunnelResponse{} +func (x *MsgWithdrawFromTunnelResponse) Reset() { + *x = MsgWithdrawFromTunnelResponse{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8149,14 +8149,14 @@ func (x *MsgWithdrawTunnelResponse) Reset() { } } -func (x *MsgWithdrawTunnelResponse) String() string { +func (x *MsgWithdrawFromTunnelResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgWithdrawTunnelResponse) ProtoMessage() {} +func (*MsgWithdrawFromTunnelResponse) ProtoMessage() {} -// Deprecated: Use MsgWithdrawTunnelResponse.ProtoReflect.Descriptor instead. -func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgWithdrawFromTunnelResponse.ProtoReflect.Descriptor instead. +func (*MsgWithdrawFromTunnelResponse) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_tx_proto_rawDescGZIP(), []int{13} } @@ -8340,125 +8340,128 @@ var file_band_tunnel_v1beta1_tx_proto_rawDesc = []byte{ 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x9d, 0x02, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, - 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, - 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x11, - 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, - 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x65, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, - 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x01, - 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, - 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbe, 0x06, 0x0a, 0x03, 0x4d, - 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2c, + 0xa1, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x03, 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, 0x35, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, + 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xaa, 0x02, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, + 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x3a, 0x30, 0x82, 0xe7, + 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, + 0x2a, 0x1c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1f, + 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, + 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xaf, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x06, 0x0a, + 0x03, 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x12, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x34, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, - 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x34, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x20, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x12, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, 0x44, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x2a, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x65, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x1a, 0x2e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x74, 0x65, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, + 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x2a, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2f, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, + 0x0a, 0x12, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd8, 0x01, 0x0a, 0x17, - 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, - 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, - 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, + 0xd8, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, + 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, + 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -8485,10 +8488,10 @@ var file_band_tunnel_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgDeactivateResponse)(nil), // 7: band.tunnel.v1beta1.MsgDeactivateResponse (*MsgTriggerTunnel)(nil), // 8: band.tunnel.v1beta1.MsgTriggerTunnel (*MsgTriggerTunnelResponse)(nil), // 9: band.tunnel.v1beta1.MsgTriggerTunnelResponse - (*MsgDepositTunnel)(nil), // 10: band.tunnel.v1beta1.MsgDepositTunnel - (*MsgDepositTunnelResponse)(nil), // 11: band.tunnel.v1beta1.MsgDepositTunnelResponse - (*MsgWithdrawTunnel)(nil), // 12: band.tunnel.v1beta1.MsgWithdrawTunnel - (*MsgWithdrawTunnelResponse)(nil), // 13: band.tunnel.v1beta1.MsgWithdrawTunnelResponse + (*MsgDepositToTunnel)(nil), // 10: band.tunnel.v1beta1.MsgDepositToTunnel + (*MsgDepositToTunnelResponse)(nil), // 11: band.tunnel.v1beta1.MsgDepositToTunnelResponse + (*MsgWithdrawFromTunnel)(nil), // 12: band.tunnel.v1beta1.MsgWithdrawFromTunnel + (*MsgWithdrawFromTunnelResponse)(nil), // 13: band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse (*MsgUpdateParams)(nil), // 14: band.tunnel.v1beta1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 15: band.tunnel.v1beta1.MsgUpdateParamsResponse (*SignalDeviation)(nil), // 16: band.tunnel.v1beta1.SignalDeviation @@ -8503,24 +8506,24 @@ var file_band_tunnel_v1beta1_tx_proto_depIdxs = []int32{ 18, // 2: band.tunnel.v1beta1.MsgCreateTunnel.encoder:type_name -> band.tunnel.v1beta1.Encoder 19, // 3: band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit:type_name -> cosmos.base.v1beta1.Coin 16, // 4: band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation - 19, // 5: band.tunnel.v1beta1.MsgDepositTunnel.amount:type_name -> cosmos.base.v1beta1.Coin - 19, // 6: band.tunnel.v1beta1.MsgWithdrawTunnel.amount:type_name -> cosmos.base.v1beta1.Coin + 19, // 5: band.tunnel.v1beta1.MsgDepositToTunnel.amount:type_name -> cosmos.base.v1beta1.Coin + 19, // 6: band.tunnel.v1beta1.MsgWithdrawFromTunnel.amount:type_name -> cosmos.base.v1beta1.Coin 20, // 7: band.tunnel.v1beta1.MsgUpdateParams.params:type_name -> band.tunnel.v1beta1.Params 0, // 8: band.tunnel.v1beta1.Msg.CreateTunnel:input_type -> band.tunnel.v1beta1.MsgCreateTunnel 2, // 9: band.tunnel.v1beta1.Msg.UpdateAndResetTunnel:input_type -> band.tunnel.v1beta1.MsgUpdateAndResetTunnel 4, // 10: band.tunnel.v1beta1.Msg.Activate:input_type -> band.tunnel.v1beta1.MsgActivate 6, // 11: band.tunnel.v1beta1.Msg.Deactivate:input_type -> band.tunnel.v1beta1.MsgDeactivate 8, // 12: band.tunnel.v1beta1.Msg.TriggerTunnel:input_type -> band.tunnel.v1beta1.MsgTriggerTunnel - 10, // 13: band.tunnel.v1beta1.Msg.DepositTunnel:input_type -> band.tunnel.v1beta1.MsgDepositTunnel - 12, // 14: band.tunnel.v1beta1.Msg.WithdrawTunnel:input_type -> band.tunnel.v1beta1.MsgWithdrawTunnel + 10, // 13: band.tunnel.v1beta1.Msg.DepositToTunnel:input_type -> band.tunnel.v1beta1.MsgDepositToTunnel + 12, // 14: band.tunnel.v1beta1.Msg.WithdrawFromTunnel:input_type -> band.tunnel.v1beta1.MsgWithdrawFromTunnel 14, // 15: band.tunnel.v1beta1.Msg.UpdateParams:input_type -> band.tunnel.v1beta1.MsgUpdateParams 1, // 16: band.tunnel.v1beta1.Msg.CreateTunnel:output_type -> band.tunnel.v1beta1.MsgCreateTunnelResponse 3, // 17: band.tunnel.v1beta1.Msg.UpdateAndResetTunnel:output_type -> band.tunnel.v1beta1.MsgUpdateAndResetTunnelResponse 5, // 18: band.tunnel.v1beta1.Msg.Activate:output_type -> band.tunnel.v1beta1.MsgActivateResponse 7, // 19: band.tunnel.v1beta1.Msg.Deactivate:output_type -> band.tunnel.v1beta1.MsgDeactivateResponse 9, // 20: band.tunnel.v1beta1.Msg.TriggerTunnel:output_type -> band.tunnel.v1beta1.MsgTriggerTunnelResponse - 11, // 21: band.tunnel.v1beta1.Msg.DepositTunnel:output_type -> band.tunnel.v1beta1.MsgDepositTunnelResponse - 13, // 22: band.tunnel.v1beta1.Msg.WithdrawTunnel:output_type -> band.tunnel.v1beta1.MsgWithdrawTunnelResponse + 11, // 21: band.tunnel.v1beta1.Msg.DepositToTunnel:output_type -> band.tunnel.v1beta1.MsgDepositToTunnelResponse + 13, // 22: band.tunnel.v1beta1.Msg.WithdrawFromTunnel:output_type -> band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse 15, // 23: band.tunnel.v1beta1.Msg.UpdateParams:output_type -> band.tunnel.v1beta1.MsgUpdateParamsResponse 16, // [16:24] is the sub-list for method output_type 8, // [8:16] is the sub-list for method input_type @@ -8658,7 +8661,7 @@ func file_band_tunnel_v1beta1_tx_proto_init() { } } file_band_tunnel_v1beta1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDepositTunnel); i { + switch v := v.(*MsgDepositToTunnel); i { case 0: return &v.state case 1: @@ -8670,7 +8673,7 @@ func file_band_tunnel_v1beta1_tx_proto_init() { } } file_band_tunnel_v1beta1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDepositTunnelResponse); i { + switch v := v.(*MsgDepositToTunnelResponse); i { case 0: return &v.state case 1: @@ -8682,7 +8685,7 @@ func file_band_tunnel_v1beta1_tx_proto_init() { } } file_band_tunnel_v1beta1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawTunnel); i { + switch v := v.(*MsgWithdrawFromTunnel); i { case 0: return &v.state case 1: @@ -8694,7 +8697,7 @@ func file_band_tunnel_v1beta1_tx_proto_init() { } } file_band_tunnel_v1beta1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawTunnelResponse); i { + switch v := v.(*MsgWithdrawFromTunnelResponse); i { case 0: return &v.state case 1: diff --git a/api/band/tunnel/v1beta1/tx_grpc.pb.go b/api/band/tunnel/v1beta1/tx_grpc.pb.go index b747806ff..61330dafd 100644 --- a/api/band/tunnel/v1beta1/tx_grpc.pb.go +++ b/api/band/tunnel/v1beta1/tx_grpc.pb.go @@ -24,8 +24,8 @@ const ( Msg_Activate_FullMethodName = "/band.tunnel.v1beta1.Msg/Activate" Msg_Deactivate_FullMethodName = "/band.tunnel.v1beta1.Msg/Deactivate" Msg_TriggerTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/TriggerTunnel" - Msg_DepositTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/DepositTunnel" - Msg_WithdrawTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/WithdrawTunnel" + Msg_DepositToTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/DepositToTunnel" + Msg_WithdrawFromTunnel_FullMethodName = "/band.tunnel.v1beta1.Msg/WithdrawFromTunnel" Msg_UpdateParams_FullMethodName = "/band.tunnel.v1beta1.Msg/UpdateParams" ) @@ -43,10 +43,10 @@ type MsgClient interface { Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) // TriggerTunnel is a RPC method to manually trigger a tunnel. TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) - // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. - DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) - // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. - WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) + // DepositToTunnel is a RPC method to deposit to an existing tunnel. + DepositToTunnel(ctx context.Context, in *MsgDepositToTunnel, opts ...grpc.CallOption) (*MsgDepositToTunnelResponse, error) + // WithdrawFromTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawFromTunnel(ctx context.Context, in *MsgWithdrawFromTunnel, opts ...grpc.CallOption) (*MsgWithdrawFromTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -104,18 +104,18 @@ func (c *msgClient) TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opt return out, nil } -func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) { - out := new(MsgDepositTunnelResponse) - err := c.cc.Invoke(ctx, Msg_DepositTunnel_FullMethodName, in, out, opts...) +func (c *msgClient) DepositToTunnel(ctx context.Context, in *MsgDepositToTunnel, opts ...grpc.CallOption) (*MsgDepositToTunnelResponse, error) { + out := new(MsgDepositToTunnelResponse) + err := c.cc.Invoke(ctx, Msg_DepositToTunnel_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) { - out := new(MsgWithdrawTunnelResponse) - err := c.cc.Invoke(ctx, Msg_WithdrawTunnel_FullMethodName, in, out, opts...) +func (c *msgClient) WithdrawFromTunnel(ctx context.Context, in *MsgWithdrawFromTunnel, opts ...grpc.CallOption) (*MsgWithdrawFromTunnelResponse, error) { + out := new(MsgWithdrawFromTunnelResponse) + err := c.cc.Invoke(ctx, Msg_WithdrawFromTunnel_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -145,10 +145,10 @@ type MsgServer interface { Deactivate(context.Context, *MsgDeactivate) (*MsgDeactivateResponse, error) // TriggerTunnel is a RPC method to manually trigger a tunnel. TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) - // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. - DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) - // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. - WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) + // DepositToTunnel is a RPC method to deposit to an existing tunnel. + DepositToTunnel(context.Context, *MsgDepositToTunnel) (*MsgDepositToTunnelResponse, error) + // WithdrawFromTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawFromTunnel(context.Context, *MsgWithdrawFromTunnel) (*MsgWithdrawFromTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) mustEmbedUnimplementedMsgServer() @@ -173,11 +173,11 @@ func (UnimplementedMsgServer) Deactivate(context.Context, *MsgDeactivate) (*MsgD func (UnimplementedMsgServer) TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TriggerTunnel not implemented") } -func (UnimplementedMsgServer) DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositTunnel not implemented") +func (UnimplementedMsgServer) DepositToTunnel(context.Context, *MsgDepositToTunnel) (*MsgDepositToTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositToTunnel not implemented") } -func (UnimplementedMsgServer) WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawTunnel not implemented") +func (UnimplementedMsgServer) WithdrawFromTunnel(context.Context, *MsgWithdrawFromTunnel) (*MsgWithdrawFromTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawFromTunnel not implemented") } func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") @@ -285,38 +285,38 @@ func _Msg_TriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_DepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDepositTunnel) +func _Msg_DepositToTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositToTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).DepositTunnel(ctx, in) + return srv.(MsgServer).DepositToTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_DepositTunnel_FullMethodName, + FullMethod: Msg_DepositToTunnel_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DepositTunnel(ctx, req.(*MsgDepositTunnel)) + return srv.(MsgServer).DepositToTunnel(ctx, req.(*MsgDepositToTunnel)) } return interceptor(ctx, in, info, handler) } -func _Msg_WithdrawTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawTunnel) +func _Msg_WithdrawFromTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawFromTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).WithdrawTunnel(ctx, in) + return srv.(MsgServer).WithdrawFromTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_WithdrawTunnel_FullMethodName, + FullMethod: Msg_WithdrawFromTunnel_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).WithdrawTunnel(ctx, req.(*MsgWithdrawTunnel)) + return srv.(MsgServer).WithdrawFromTunnel(ctx, req.(*MsgWithdrawFromTunnel)) } return interceptor(ctx, in, info, handler) } @@ -367,12 +367,12 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_TriggerTunnel_Handler, }, { - MethodName: "DepositTunnel", - Handler: _Msg_DepositTunnel_Handler, + MethodName: "DepositToTunnel", + Handler: _Msg_DepositToTunnel_Handler, }, { - MethodName: "WithdrawTunnel", - Handler: _Msg_WithdrawTunnel_Handler, + MethodName: "WithdrawFromTunnel", + Handler: _Msg_WithdrawFromTunnel_Handler, }, { MethodName: "UpdateParams", diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go index 97de56e71..5069c7dd6 100644 --- a/benchmark/tunnel_bench_test.go +++ b/benchmark/tunnel_bench_test.go @@ -134,7 +134,7 @@ func createNewTunnels( depositor := bandtesting.Bob.Address minDeposit := ba.TunnelKeeper.GetParams(ba.Ctx).MinDeposit - if err := ba.TunnelKeeper.AddDeposit(ba.Ctx, tunnel.ID, depositor, minDeposit); err != nil { + if err := ba.TunnelKeeper.DepositToTunnel(ba.Ctx, tunnel.ID, depositor, minDeposit); err != nil { return err } diff --git a/proto/band/tunnel/v1beta1/tx.proto b/proto/band/tunnel/v1beta1/tx.proto index 40932d8ef..79214c266 100644 --- a/proto/band/tunnel/v1beta1/tx.proto +++ b/proto/band/tunnel/v1beta1/tx.proto @@ -32,11 +32,11 @@ service Msg { // TriggerTunnel is a RPC method to manually trigger a tunnel. rpc TriggerTunnel(MsgTriggerTunnel) returns (MsgTriggerTunnelResponse); - // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. - rpc DepositTunnel(MsgDepositTunnel) returns (MsgDepositTunnelResponse); + // DepositToTunnel is a RPC method to deposit to an existing tunnel. + rpc DepositToTunnel(MsgDepositToTunnel) returns (MsgDepositToTunnelResponse); - // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. - rpc WithdrawTunnel(MsgWithdrawTunnel) returns (MsgWithdrawTunnelResponse); + // WithdrawFromTunnel is a RPC method to withdraw a deposit from an existing tunnel. + rpc WithdrawFromTunnel(MsgWithdrawFromTunnel) returns (MsgWithdrawFromTunnelResponse); // UpdateParams is a RPC method to update parameters rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); @@ -70,7 +70,7 @@ message MsgCreateTunnelResponse { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; } -// MsgUpdateAndResetTunnel is the transaction message to update a tunnel information +// MsgUpdateAndResetTunnel is the transaction message to update a tunnel information // and reset the interval. message MsgUpdateAndResetTunnel { option (cosmos.msg.v1.signer) = "creator"; @@ -131,10 +131,10 @@ message MsgTriggerTunnel { // MsgTriggerTunnelResponse is the response type for the Msg/TriggerTunnel RPC method. message MsgTriggerTunnelResponse {} -// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. -message MsgDepositTunnel { +// MsgDepositToTunnel defines a message to deposit to an existing tunnel. +message MsgDepositToTunnel { option (cosmos.msg.v1.signer) = "depositor"; - option (amino.name) = "tunnel/MsgDepositTunnel"; + option (amino.name) = "tunnel/MsgDepositToTunnel"; // tunnel_id defines the unique id of the tunnel. uint64 tunnel_id = 1 @@ -151,13 +151,13 @@ message MsgDepositTunnel { string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgDepositTunnelResponse defines the Msg/Deposit response type. -message MsgDepositTunnelResponse {} +// MsgDepositToTunnelResponse defines the Msg/DepositToTunnel response type. +message MsgDepositToTunnelResponse {} -// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. -message MsgWithdrawTunnel { +// MsgWithdrawFromTunnel is the transaction message to withdraw a deposit from an existing tunnel. +message MsgWithdrawFromTunnel { option (cosmos.msg.v1.signer) = "withdrawer"; - option (amino.name) = "tunnel/MsgWithdrawTunnel"; + option (amino.name) = "tunnel/MsgWithdrawFromTunnel"; // tunnel_id defines the unique id of the tunnel. uint64 tunnel_id = 1 @@ -174,8 +174,8 @@ message MsgWithdrawTunnel { string withdrawer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. -message MsgWithdrawTunnelResponse {} +// MsgWithdrawFromTunnelResponse defines the Msg/WithdrawFromTunnel response type. +message MsgWithdrawFromTunnelResponse {} // MsgUpdateParams is the transaction message to update parameters. message MsgUpdateParams { diff --git a/scripts/tunnel/deposit_to_tunnel.sh b/scripts/tunnel/deposit_to_tunnel.sh new file mode 100755 index 000000000..be29cec93 --- /dev/null +++ b/scripts/tunnel/deposit_to_tunnel.sh @@ -0,0 +1 @@ +bandd tx tunnel deposit-to-tunnel 1 1000000000uband --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/deposit_tunnel.sh b/scripts/tunnel/deposit_tunnel.sh deleted file mode 100755 index 17f62e424..000000000 --- a/scripts/tunnel/deposit_tunnel.sh +++ /dev/null @@ -1 +0,0 @@ -bandd tx tunnel deposit-tunnel 1 1000000000uband --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/withdraw.sh b/scripts/tunnel/withdraw.sh deleted file mode 100755 index 26615cadb..000000000 --- a/scripts/tunnel/withdraw.sh +++ /dev/null @@ -1 +0,0 @@ -bandd tx tunnel withdraw 1 1000000000uband --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/withdraw_from_tunnel.sh b/scripts/tunnel/withdraw_from_tunnel.sh new file mode 100755 index 000000000..98cb33daa --- /dev/null +++ b/scripts/tunnel/withdraw_from_tunnel.sh @@ -0,0 +1 @@ +bandd tx tunnel withdraw-from-tunnel 1 1000000000uband --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/x/tunnel/README.md b/x/tunnel/README.md index a58b385a7..432f26bf3 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -27,12 +27,12 @@ The Tunnel module is designed to decentralize the creation of push-based price d - [Params](#params) - [Msg](#msg) - [MsgCreateTunnel](#msgcreatetunnel) - - [MsgEditTunnel](#msgedittunnel) + - [MsgUpdateAndResetTunnel](#msgupdateandresettunnel) - [MsgActivate](#msgactivate) - [MsgDeactivate](#msgdeactivate) - [MsgTriggerTunnel](#msgtriggertunnel) - - [MsgDepositTunnel](#msgdeposittunnel) - - [MsgWithdrawTunnel](#msgwithdrawtunnel) + - [MsgDepositToTunnel](#MsgDepositToTunnel) + - [MsgWithdrawFromTunnel](#MsgWithdrawFromTunnel) - [Events](#events) - [Event: `create_tunnel`](#event-create_tunnel) - [Event: `edit_tunnel`](#event-edit_tunnel) @@ -234,15 +234,16 @@ message MsgCreateTunnel { - Tick - **Initial Deposit**: The initial deposit can be set to zero. Other users can contribute to the tunnel's deposit until it reaches the required minimum deposit. -### MsgEditTunnel +### MsgUpdateAndResetTunnel **Editable Arguments**: The following parameters can be modified within the tunnel: `signal_deviations` and `Interval` ```protobuf -// MsgEditTunnel is the transaction message to edit a tunnel. -message MsgEditTunnel { +// MsgUpdateAndResetTunnel is the transaction message to update a tunnel information +// and reset the interval. +message MsgUpdateAndResetTunnel { option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "tunnel/MsgEditTunnel"; + option (amino.name) = "tunnel/MsgUpdateAndResetTunnel"; // tunnel_id is the ID of the tunnel to edit. uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; @@ -253,6 +254,7 @@ message MsgEditTunnel { // creator is the address of the creator. string creator = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } + ``` ### MsgActivate @@ -309,15 +311,15 @@ message MsgTriggerTunnel { } ``` -### MsgDepositTunnel +### MsgDepositToTunnel Increase the `total_deposit` for the tunnel by depositing more coins. ```protobuf -// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. -message MsgDepositTunnel { +// MsgDepositToTunnel defines a message to submit a deposit to an existing tunnel. +message MsgDepositToTunnel { option (cosmos.msg.v1.signer) = "depositor"; - option (amino.name) = "tunnel/MsgDepositTunnel"; + option (amino.name) = "tunnel/MsgDepositToTunnel"; // tunnel_id defines the unique id of the tunnel. uint64 tunnel_id = 1 @@ -335,15 +337,15 @@ message MsgDepositTunnel { } ``` -### MsgWithdrawTunnel +### MsgWithdrawFromTunnel Allows users to withdraw their deposited coins from the tunnel. ```protobuf -// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. -message MsgWithdrawTunnel { +// MsgWithdrawFromTunnel is the transaction message to withdraw a deposit from an existing tunnel. +message MsgWithdrawFromTunnel { option (cosmos.msg.v1.signer) = "withdrawer"; - option (amino.name) = "tunnel/MsgWithdrawTunnel"; + option (amino.name) = "tunnel/MsgWithdrawFromTunnel"; // tunnel_id defines the unique id of the tunnel. uint64 tunnel_id = 1 @@ -369,27 +371,31 @@ The `x/tunnel` module emits several events that can be used to track the state c This event is emitted when a new tunnel is created. -| Attribute Key | Attribute Value | -| --------------- | --------------------------- | -| tunnel_id | `{ID}` | -| interval | `{Interval}` | -| route | `{Route.String()}` | -| encoder | `{Encoder.String()}` | -| initial_deposit | `{InitialDeposit.String()}` | -| fee_payer | `{FeePayer}` | -| is_active | `{IsActive}` | -| created_at | `{CreatedAt}` | -| creator | `{Creator}` | - -### Event: `edit_tunnel` +| Attribute Key | Attribute Value | +| -------------------- | ------------------------------------- | +| tunnel_id | `{ID}` | +| interval | `{Interval}` | +| route | `{Route.String()}` | +| encoder | `{Encoder.String()}` | +| fee_payer | `{FeePayer}` | +| is_active | `{IsActive}` | +| created_at | `{CreatedAt}` | +| creator | `{Creator}` | +| signal_id[] | `{SignalDeviation.SignalID}}` | +| soft_deviation_bps[] | `{SignalDeviation.SoftDeviationBPS}}` | +| hard_deviation_bps[] | `{SignalDeviation.hardDeviationBPS}}` | + +### Event: `update_and_reset_tunnel` This event is emitted when an existing tunnel is edited. -| Attribute Key | Attribute Value | -| ------------------ | ------------------------------ | -| tunnel_id | `{ID}` | -| interval | `{Interval}` | -| signal_deviation[] | `{[]SignalDeviation.String()}` | +| Attribute Key | Attribute Value | +| -------------------- | ------------------------------------- | +| tunnel_id | `{ID}` | +| interval | `{Interval}` | +| signal_id[] | `{SignalDeviation.SignalID}}` | +| soft_deviation_bps[] | `{SignalDeviation.SoftDeviationBPS}}` | +| hard_deviation_bps[] | `{SignalDeviation.hardDeviationBPS}}` | ### Event: `activate` @@ -413,9 +419,10 @@ This event is emitted when a tunnel is deactivated. This event is emitted when a tunnel is triggered to produce a packet due to deviations or intervals. -| Attribute Key | Attribute Value | -| ------------- | --------------- | -| tunnel_id | `{ID}` | +| Attribute Key | Attribute Value | +| ------------- | ------------------- | +| tunnel_id | `{ID}` | +| sequence | `{packet_sequence}` | ### Event: `produce_packet_fail` diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index b128ee434..7a4d3fad3 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -29,8 +29,8 @@ func GetTxCmd() *cobra.Command { GetTxCmdActivate(), GetTxCmdDeactivate(), GetTxCmdTriggerTunnel(), - GetTxCmdDepositTunnel(), - GetTxCmdWithdrawTunnel(), + GetTxCmdDepositToTunnel(), + GetTxCmdWithdrawFromTunnel(), ) return txCmd @@ -222,9 +222,9 @@ func GetTxCmdTriggerTunnel() *cobra.Command { return cmd } -func GetTxCmdDepositTunnel() *cobra.Command { +func GetTxCmdDepositToTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "deposit-tunnel [tunnel-id] [amount]", + Use: "deposit-to-tunnel [tunnel-id] [amount]", Short: "Deposit to a tunnel", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -243,7 +243,7 @@ func GetTxCmdDepositTunnel() *cobra.Command { return err } - msg := types.NewMsgDepositTunnel(id, amount, clientCtx.GetFromAddress().String()) + msg := types.NewMsgDepositToTunnel(id, amount, clientCtx.GetFromAddress().String()) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -253,9 +253,9 @@ func GetTxCmdDepositTunnel() *cobra.Command { return cmd } -func GetTxCmdWithdrawTunnel() *cobra.Command { +func GetTxCmdWithdrawFromTunnel() *cobra.Command { cmd := &cobra.Command{ - Use: "withdraw-tunnel [tunnel-id] [amount]", + Use: "withdraw-from-tunnel [tunnel-id] [amount]", Short: "Withdraw deposit from a tunnel", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -274,7 +274,7 @@ func GetTxCmdWithdrawTunnel() *cobra.Command { return err } - msg := types.NewMsgWithdrawTunnel(id, amount, clientCtx.GetFromAddress().String()) + msg := types.NewMsgWithdrawFromTunnel(id, amount, clientCtx.GetFromAddress().String()) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/tunnel/keeper/account.go b/x/tunnel/keeper/account.go deleted file mode 100644 index 8411a2285..000000000 --- a/x/tunnel/keeper/account.go +++ /dev/null @@ -1,43 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - "github.com/bandprotocol/chain/v3/x/tunnel/types" -) - -// TODO: patch account generation follow ibc-v8 -// https://github.com/cosmos/ibc-go/blob/v8.5.1/modules/apps/27-interchain-accounts/types/account.go#L46 -func (k Keeper) GenerateAccount(ctx sdk.Context, key string) (sdk.AccAddress, error) { - header := ctx.BlockHeader() - - buf := []byte(key) - buf = append(buf, header.AppHash...) - buf = append(buf, header.DataHash...) - - moduleCred, err := authtypes.NewModuleCredential(types.ModuleName, []byte(types.TunnelAccountsKey), buf) - if err != nil { - return nil, err - } - - tunnelAccAddr := sdk.AccAddress(moduleCred.Address()) - - if acc := k.authKeeper.GetAccount(ctx, tunnelAccAddr); acc != nil { - // this should not happen - return nil, types.ErrAccountAlreadyExist.Wrapf( - "existing account for newly generated key account address %s", - tunnelAccAddr.String(), - ) - } - - tunnelAcc, err := authtypes.NewBaseAccountWithPubKey(moduleCred) - if err != nil { - return nil, err - } - - k.authKeeper.NewAccount(ctx, tunnelAcc) - k.authKeeper.SetAccount(ctx, tunnelAcc) - - return tunnelAccAddr, nil -} diff --git a/x/tunnel/keeper/account_test.go b/x/tunnel/keeper/account_test.go deleted file mode 100644 index 5ac2e14c9..000000000 --- a/x/tunnel/keeper/account_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package keeper_test - -import ( - "fmt" - - "go.uber.org/mock/gomock" -) - -func (s *KeeperTestSuite) TestGenerateAccount() { - ctx, k := s.ctx, s.keeper - - tunnelID := uint64(1) - s.accountKeeper.EXPECT(). - GetAccount(ctx, gomock.Any()). - Return(nil).Times(1) - s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) - s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) - - addr, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", tunnelID)) - s.Require().NoError(err, "expected no error generating account") - s.Require().NotNil(addr, "expected generated address to be non-nil") - s.Require().Equal( - "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", - addr.String(), - "expected generated address to match", - ) -} diff --git a/x/tunnel/keeper/deposit.go b/x/tunnel/keeper/keeper_deposit.go similarity index 81% rename from x/tunnel/keeper/deposit.go rename to x/tunnel/keeper/keeper_deposit.go index 52021d201..16510cf6b 100644 --- a/x/tunnel/keeper/deposit.go +++ b/x/tunnel/keeper/keeper_deposit.go @@ -1,6 +1,8 @@ package keeper import ( + "fmt" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -8,11 +10,11 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -// AddDeposit adds a deposit to a tunnel -func (k Keeper) AddDeposit( +// DepositToTunnel deposits to a tunnel +func (k Keeper) DepositToTunnel( ctx sdk.Context, tunnelID uint64, - depositorAddr sdk.AccAddress, + depositor sdk.AccAddress, depositAmount sdk.Coins, ) error { tunnel, err := k.GetTunnel(ctx, tunnelID) @@ -27,7 +29,7 @@ func (k Keeper) AddDeposit( // transfer the deposit from the depositor to the tunnel module account if err := k.bankKeeper.SendCoinsFromAccountToModule( ctx, - depositorAddr, + depositor, types.ModuleName, depositAmount, ); err != nil { @@ -35,9 +37,9 @@ func (k Keeper) AddDeposit( } // update the depositor's deposit - deposit, found := k.GetDeposit(ctx, tunnelID, depositorAddr) + deposit, found := k.GetDeposit(ctx, tunnelID, depositor) if !found { - deposit = types.NewDeposit(tunnelID, depositorAddr.String(), depositAmount) + deposit = types.NewDeposit(tunnelID, depositor.String(), depositAmount) } else { deposit.Amount = deposit.Amount.Add(depositAmount...) } @@ -47,6 +49,13 @@ func (k Keeper) AddDeposit( tunnel.TotalDeposit = tunnel.TotalDeposit.Add(depositAmount...) k.SetTunnel(ctx, tunnel) + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeDepositToTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeyDepositor, depositor.String()), + sdk.NewAttribute(types.AttributeKeyAmount, depositAmount.String()), + )) + return nil } @@ -107,8 +116,13 @@ func (k Keeper) DeleteDeposit(ctx sdk.Context, tunnelID uint64, depositorAddr sd Delete(types.DepositStoreKey(tunnelID, depositorAddr)) } -// WithdrawDeposit withdraws a deposit from a tunnel -func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coins, withdrawer sdk.AccAddress) error { +// WithdrawFromTunnel withdraws a deposit from a tunnel +func (k Keeper) WithdrawFromTunnel( + ctx sdk.Context, + tunnelID uint64, + amount sdk.Coins, + withdrawer sdk.AccAddress, +) error { tunnel, err := k.GetTunnel(ctx, tunnelID) if err != nil { return err @@ -152,6 +166,13 @@ func (k Keeper) WithdrawDeposit(ctx sdk.Context, tunnelID uint64, amount sdk.Coi k.MustDeactivateTunnel(ctx, tunnelID) } + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeWithdrawFromTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnelID)), + sdk.NewAttribute(types.AttributeKeyWithdrawer, withdrawer.String()), + sdk.NewAttribute(types.AttributeKeyAmount, amount.String()), + )) + return nil } diff --git a/x/tunnel/keeper/deposit_test.go b/x/tunnel/keeper/keeper_deposit_test.go similarity index 94% rename from x/tunnel/keeper/deposit_test.go rename to x/tunnel/keeper/keeper_deposit_test.go index c937ab12e..33c6e011b 100644 --- a/x/tunnel/keeper/deposit_test.go +++ b/x/tunnel/keeper/keeper_deposit_test.go @@ -22,7 +22,7 @@ func (s *KeeperTestSuite) TestAddDeposit() { tunnel := types.Tunnel{ID: tunnelID, TotalDeposit: sdk.NewCoins()} k.SetTunnel(ctx, tunnel) - err := k.AddDeposit(ctx, tunnelID, depositorAddr, depositAmount) + err := k.DepositToTunnel(ctx, tunnelID, depositorAddr, depositAmount) s.Require().NoError(err) // check deposit @@ -114,7 +114,7 @@ func (s *KeeperTestSuite) TestDeleteDeposit() { s.Require().False(found) } -func (s *KeeperTestSuite) TestWithdrawDeposit() { +func (s *KeeperTestSuite) TestWithdrawFromDeposit() { ctx, k := s.ctx, s.keeper tunnelID := uint64(1) @@ -137,7 +137,7 @@ func (s *KeeperTestSuite) TestWithdrawDeposit() { k.SetDeposit(ctx, deposit) // partial withdraw - err := k.WithdrawDeposit(ctx, tunnelID, firstWithdraw, depositorAddr) + err := k.WithdrawFromTunnel(ctx, tunnelID, firstWithdraw, depositorAddr) s.Require().NoError(err) // check tunnel's total deposit @@ -146,7 +146,7 @@ func (s *KeeperTestSuite) TestWithdrawDeposit() { s.Require().Equal(deposit.Amount.Sub(firstWithdraw...), tunnel.TotalDeposit) // withdraw all - err = k.WithdrawDeposit(ctx, tunnelID, secondWithdraw, depositorAddr) + err = k.WithdrawFromTunnel(ctx, tunnelID, secondWithdraw, depositorAddr) s.Require().NoError(err) // check tunnel's total deposit diff --git a/x/tunnel/keeper/latest_signal_prices.go b/x/tunnel/keeper/keeper_latest_signal_prices.go similarity index 100% rename from x/tunnel/keeper/latest_signal_prices.go rename to x/tunnel/keeper/keeper_latest_signal_prices.go diff --git a/x/tunnel/keeper/latest_signal_prices_test.go b/x/tunnel/keeper/keeper_latest_signal_prices_test.go similarity index 100% rename from x/tunnel/keeper/latest_signal_prices_test.go rename to x/tunnel/keeper/keeper_latest_signal_prices_test.go diff --git a/x/tunnel/keeper/packet.go b/x/tunnel/keeper/keeper_packet.go similarity index 100% rename from x/tunnel/keeper/packet.go rename to x/tunnel/keeper/keeper_packet.go diff --git a/x/tunnel/keeper/packet_test.go b/x/tunnel/keeper/keeper_packet_test.go similarity index 100% rename from x/tunnel/keeper/packet_test.go rename to x/tunnel/keeper/keeper_packet_test.go diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go index 7446b04af..0650243cb 100644 --- a/x/tunnel/keeper/keeper_test.go +++ b/x/tunnel/keeper/keeper_test.go @@ -18,12 +18,17 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + band "github.com/bandprotocol/chain/v3/app" "github.com/bandprotocol/chain/v3/x/tunnel" "github.com/bandprotocol/chain/v3/x/tunnel/keeper" "github.com/bandprotocol/chain/v3/x/tunnel/testutil" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) +func init() { + band.SetBech32AddressPrefixesAndBip44CoinTypeAndSeal(sdk.GetConfig()) +} + type KeeperTestSuite struct { suite.Suite diff --git a/x/tunnel/keeper/tss_packet.go b/x/tunnel/keeper/keeper_tss_packet.go similarity index 100% rename from x/tunnel/keeper/tss_packet.go rename to x/tunnel/keeper/keeper_tss_packet.go diff --git a/x/tunnel/keeper/tss_packet_test.go b/x/tunnel/keeper/keeper_tss_packet_test.go similarity index 100% rename from x/tunnel/keeper/tss_packet_test.go rename to x/tunnel/keeper/keeper_tss_packet_test.go diff --git a/x/tunnel/keeper/tunnel.go b/x/tunnel/keeper/keeper_tunnel.go similarity index 76% rename from x/tunnel/keeper/tunnel.go rename to x/tunnel/keeper/keeper_tunnel.go index 8f61e6e2b..97749224d 100644 --- a/x/tunnel/keeper/tunnel.go +++ b/x/tunnel/keeper/keeper_tunnel.go @@ -6,6 +6,7 @@ import ( storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -22,8 +23,8 @@ func (k Keeper) AddTunnel( id := k.GetTunnelCount(ctx) newID := id + 1 - // generate a new fee payer account - feePayer, err := k.GenerateAccount(ctx, fmt.Sprintf("%d", newID)) + // generate a new tunnel account as a fee payer + feePayer, err := k.GenerateTunnelAccount(ctx, fmt.Sprintf("%d", newID)) if err != nil { return nil, err } @@ -57,6 +58,27 @@ func (k Keeper) AddTunnel( // increment the tunnel count k.SetTunnelCount(ctx, newID) + // Emit an event + event := sdk.NewEvent( + types.EventTypeCreateTunnel, + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), + sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), + sdk.NewAttribute(types.AttributeKeyRoute, tunnel.Route.String()), + sdk.NewAttribute(types.AttributeKeyEncoder, tunnel.Encoder.String()), + sdk.NewAttribute(types.AttributeKeyFeePayer, tunnel.FeePayer), + sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), + sdk.NewAttribute(types.AttributeKeyCreatedAt, fmt.Sprintf("%d", tunnel.CreatedAt)), + sdk.NewAttribute(types.AttributeKeyCreator, tunnel.Creator), + ) + for _, sd := range tunnel.SignalDeviations { + event = event.AppendAttributes( + sdk.NewAttribute(types.AttributeKeySignalID, sd.SignalID), + sdk.NewAttribute(types.AttributeKeySoftDeviationBPS, fmt.Sprintf("%d", sd.SoftDeviationBPS)), + sdk.NewAttribute(types.AttributeKeyHardDeviationBPS, fmt.Sprintf("%d", sd.HardDeviationBPS)), + ) + } + ctx.EventManager().EmitEvent(event) + return &tunnel, nil } @@ -91,7 +113,9 @@ func (k Keeper) UpdateAndResetTunnel( ) for _, sd := range signalDeviations { event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeySignalDeviation, sd.String()), + sdk.NewAttribute(types.AttributeKeySignalID, sd.SignalID), + sdk.NewAttribute(types.AttributeKeySoftDeviationBPS, fmt.Sprintf("%d", sd.SoftDeviationBPS)), + sdk.NewAttribute(types.AttributeKeyHardDeviationBPS, fmt.Sprintf("%d", sd.HardDeviationBPS)), ) } ctx.EventManager().EmitEvent(event) @@ -277,3 +301,36 @@ func (k Keeper) HasEnoughFundToCreatePacket(ctx sdk.Context, tunnelID uint64) (b balances := k.bankKeeper.SpendableCoins(ctx, feePayer) return balances.IsAllGTE(totalFee), nil } + +func (k Keeper) GenerateTunnelAccount(ctx sdk.Context, key string) (sdk.AccAddress, error) { + header := ctx.BlockHeader() + + buf := []byte(key) + buf = append(buf, header.AppHash...) + buf = append(buf, header.DataHash...) + + moduleCred, err := authtypes.NewModuleCredential(types.ModuleName, []byte(types.TunnelAccountsKey), buf) + if err != nil { + return nil, err + } + + tunnelAccAddr := sdk.AccAddress(moduleCred.Address()) + + if acc := k.authKeeper.GetAccount(ctx, tunnelAccAddr); acc != nil { + // this should not happen + return nil, types.ErrAccountAlreadyExist.Wrapf( + "existing account for newly generated key account address %s", + tunnelAccAddr.String(), + ) + } + + tunnelAcc, err := authtypes.NewBaseAccountWithPubKey(moduleCred) + if err != nil { + return nil, err + } + + k.authKeeper.NewAccount(ctx, tunnelAcc) + k.authKeeper.SetAccount(ctx, tunnelAcc) + + return tunnelAccAddr, nil +} diff --git a/x/tunnel/keeper/tunnel_test.go b/x/tunnel/keeper/keeper_tunnel_test.go similarity index 90% rename from x/tunnel/keeper/tunnel_test.go rename to x/tunnel/keeper/keeper_tunnel_test.go index 922b7d832..cb1a4a447 100644 --- a/x/tunnel/keeper/tunnel_test.go +++ b/x/tunnel/keeper/keeper_tunnel_test.go @@ -1,6 +1,8 @@ package keeper_test import ( + "fmt" + "go.uber.org/mock/gomock" sdkmath "cosmossdk.io/math" @@ -27,7 +29,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { ID: 1, Route: any, Encoder: types.ENCODER_FIXED_POINT_ABI, - FeePayer: "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", + FeePayer: "band1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62q2yggu0", Creator: creator.String(), Interval: interval, SignalDeviations: signalDeviations, @@ -255,3 +257,23 @@ func (s *KeeperTestSuite) TestGetSetTotalFees() { retrievedFees := k.GetTotalFees(ctx) s.Require().Equal(totalFees, retrievedFees) } + +func (s *KeeperTestSuite) TestGenerateTunnelAccount() { + ctx, k := s.ctx, s.keeper + + tunnelID := uint64(1) + s.accountKeeper.EXPECT(). + GetAccount(ctx, gomock.Any()). + Return(nil).Times(1) + s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) + s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) + + addr, err := k.GenerateTunnelAccount(ctx, fmt.Sprintf("%d", tunnelID)) + s.Require().NoError(err, "expected no error generating account") + s.Require().NotNil(addr, "expected generated address to be non-nil") + s.Require().Equal( + "band1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62q2yggu0", + addr.String(), + "expected generated address to match", + ) +} diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index d01b017e2..5f393422b 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -37,6 +37,7 @@ func (ms msgServer) CreateTunnel( if len(msg.SignalDeviations) > int(params.MaxSignals) { return nil, types.ErrMaxSignalsExceeded } + if msg.Interval < params.MinInterval { return nil, types.ErrIntervalTooLow } @@ -66,31 +67,11 @@ func (ms msgServer) CreateTunnel( // Deposit the initial deposit to the tunnel if !msg.InitialDeposit.IsZero() { - if err := ms.Keeper.AddDeposit(ctx, tunnel.ID, creator, msg.InitialDeposit); err != nil { + if err := ms.Keeper.DepositToTunnel(ctx, tunnel.ID, creator, msg.InitialDeposit); err != nil { return nil, err } } - // Emit an event - event := sdk.NewEvent( - types.EventTypeCreateTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), - sdk.NewAttribute(types.AttributeKeyInterval, fmt.Sprintf("%d", tunnel.Interval)), - sdk.NewAttribute(types.AttributeKeyRoute, tunnel.Route.String()), - sdk.NewAttribute(types.AttributeKeyEncoder, tunnel.Encoder.String()), - sdk.NewAttribute(types.AttributeKeyInitialDeposit, msg.InitialDeposit.String()), - sdk.NewAttribute(types.AttributeKeyFeePayer, tunnel.FeePayer), - sdk.NewAttribute(types.AttributeKeyIsActive, fmt.Sprintf("%t", tunnel.IsActive)), - sdk.NewAttribute(types.AttributeKeyCreatedAt, fmt.Sprintf("%d", tunnel.CreatedAt)), - sdk.NewAttribute(types.AttributeKeyCreator, tunnel.Creator), - ) - for _, sd := range msg.SignalDeviations { - event = event.AppendAttributes( - sdk.NewAttribute(types.AttributeKeySignalDeviation, sd.String()), - ) - } - ctx.EventManager().EmitEvent(event) - return &types.MsgCreateTunnelResponse{ TunnelID: tunnel.ID, }, nil @@ -196,6 +177,7 @@ func (ms msgServer) TriggerTunnel( if err != nil { return nil, err } + if msg.Creator != tunnel.Creator { return nil, types.ErrInvalidTunnelCreator.Wrapf( "creator %s, tunnelID %d", @@ -203,6 +185,7 @@ func (ms msgServer) TriggerTunnel( msg.TunnelID, ) } + if !tunnel.IsActive { return nil, types.ErrInactiveTunnel.Wrapf("tunnelID %d", msg.TunnelID) } @@ -211,6 +194,7 @@ func (ms msgServer) TriggerTunnel( if err != nil { return nil, err } + if !ok { return nil, types.ErrInsufficientFund.Wrapf("tunnelID %d", msg.TunnelID) } @@ -251,18 +235,18 @@ func (ms msgServer) TriggerTunnel( ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeTriggerTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", msg.TunnelID)), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", tunnel.Sequence)), + sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", packet.TunnelID)), + sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), )) return &types.MsgTriggerTunnelResponse{}, nil } -// DepositTunnel adds deposit to the tunnel. -func (ms msgServer) DepositTunnel( +// DepositToTunnel adds deposit to the tunnel. +func (ms msgServer) DepositToTunnel( goCtx context.Context, - msg *types.MsgDepositTunnel, -) (*types.MsgDepositTunnelResponse, error) { + msg *types.MsgDepositToTunnel, +) (*types.MsgDepositToTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) depositor, err := sdk.AccAddressFromBech32(msg.Depositor) @@ -270,25 +254,18 @@ func (ms msgServer) DepositTunnel( return nil, err } - if err := ms.Keeper.AddDeposit(ctx, msg.TunnelID, depositor, msg.Amount); err != nil { + if err := ms.Keeper.DepositToTunnel(ctx, msg.TunnelID, depositor, msg.Amount); err != nil { return nil, err } - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeDepositTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", msg.TunnelID)), - sdk.NewAttribute(types.AttributeKeyDepositor, msg.Depositor), - sdk.NewAttribute(types.AttributeKeyAmount, msg.Amount.String()), - )) - - return &types.MsgDepositTunnelResponse{}, nil + return &types.MsgDepositToTunnelResponse{}, nil } -// WithdrawTunnel withdraws deposit from the tunnel. -func (ms msgServer) WithdrawTunnel( +// WithdrawFromTunnel withdraws deposit from the tunnel. +func (ms msgServer) WithdrawFromTunnel( goCtx context.Context, - msg *types.MsgWithdrawTunnel, -) (*types.MsgWithdrawTunnelResponse, error) { + msg *types.MsgWithdrawFromTunnel, +) (*types.MsgWithdrawFromTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) withdrawer, err := sdk.AccAddressFromBech32(msg.Withdrawer) @@ -297,18 +274,11 @@ func (ms msgServer) WithdrawTunnel( } // Withdraw the deposit from the tunnel - if err := ms.Keeper.WithdrawDeposit(ctx, msg.TunnelID, msg.Amount, withdrawer); err != nil { + if err := ms.Keeper.WithdrawFromTunnel(ctx, msg.TunnelID, msg.Amount, withdrawer); err != nil { return nil, err } - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeWithdrawTunnel, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", msg.TunnelID)), - sdk.NewAttribute(types.AttributeKeyWithdrawer, msg.Withdrawer), - sdk.NewAttribute(types.AttributeKeyAmount, msg.Amount.String()), - )) - - return &types.MsgWithdrawTunnelResponse{}, nil + return &types.MsgWithdrawFromTunnelResponse{}, nil } // UpdateParams updates the module params. diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 8132195b5..357cc4b35 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -407,7 +407,7 @@ func (s *KeeperTestSuite) TestMsgDeactivate() { func (s *KeeperTestSuite) TestMsgTriggerTunnel() { feePayer := sdk.MustAccAddressFromBech32( - "cosmos1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62qh49enj", + "band1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62q2yggu0", ) cases := map[string]struct { @@ -475,15 +475,15 @@ func (s *KeeperTestSuite) TestMsgTriggerTunnel() { } } -func (s *KeeperTestSuite) TestMsgDepositTunnel() { +func (s *KeeperTestSuite) TestMsgDepositToTunnel() { cases := map[string]struct { - preRun func() *types.MsgDepositTunnel + preRun func() *types.MsgDepositToTunnel expErr bool expErrMsg string }{ "tunnel not found": { - preRun: func() *types.MsgDepositTunnel { - return types.NewMsgDepositTunnel( + preRun: func() *types.MsgDepositToTunnel { + return types.NewMsgDepositToTunnel( 1, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), sdk.AccAddress([]byte("depositor")).String(), @@ -493,10 +493,10 @@ func (s *KeeperTestSuite) TestMsgDepositTunnel() { expErrMsg: "tunnel not found", }, "invalid deposit denom": { - preRun: func() *types.MsgDepositTunnel { + preRun: func() *types.MsgDepositToTunnel { s.AddSampleTunnel(true) - return types.NewMsgDepositTunnel( + return types.NewMsgDepositToTunnel( 1, sdk.NewCoins(sdk.NewCoin("invalid_denom", sdkmath.NewInt(100))), sdk.AccAddress([]byte("depositor")).String(), @@ -506,14 +506,14 @@ func (s *KeeperTestSuite) TestMsgDepositTunnel() { expErrMsg: "invalid deposit denom", }, "insufficient fund": { - preRun: func() *types.MsgDepositTunnel { + preRun: func() *types.MsgDepositToTunnel { s.AddSampleTunnel(true) s.bankKeeper.EXPECT(). SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), types.ModuleName, gomock.Any()). Return(sdkerrors.ErrInsufficientFunds) - return types.NewMsgDepositTunnel( + return types.NewMsgDepositToTunnel( 1, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), sdk.AccAddress([]byte("depositor")).String(), @@ -523,14 +523,14 @@ func (s *KeeperTestSuite) TestMsgDepositTunnel() { expErrMsg: "insufficient fund", }, "all good": { - preRun: func() *types.MsgDepositTunnel { + preRun: func() *types.MsgDepositToTunnel { s.AddSampleTunnel(true) s.bankKeeper.EXPECT(). SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), types.ModuleName, gomock.Any()). Return(nil) - return types.NewMsgDepositTunnel( + return types.NewMsgDepositToTunnel( 1, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), sdk.AccAddress([]byte("depositor")).String(), @@ -545,7 +545,7 @@ func (s *KeeperTestSuite) TestMsgDepositTunnel() { s.Run(name, func() { msg := tc.preRun() - _, err := s.msgServer.DepositTunnel(s.ctx, msg) + _, err := s.msgServer.DepositToTunnel(s.ctx, msg) if tc.expErr { s.Require().Error(err) s.Require().Contains(err.Error(), tc.expErrMsg) @@ -558,15 +558,15 @@ func (s *KeeperTestSuite) TestMsgDepositTunnel() { } } -func (s *KeeperTestSuite) TestMsgWithdrawTunnel() { +func (s *KeeperTestSuite) TestMsgWithdrawFromTunnel() { cases := map[string]struct { - preRun func() *types.MsgWithdrawTunnel + preRun func() *types.MsgWithdrawFromTunnel expErr bool expErrMsg string }{ "tunnel not found": { - preRun: func() *types.MsgWithdrawTunnel { - return types.NewMsgWithdrawTunnel( + preRun: func() *types.MsgWithdrawFromTunnel { + return types.NewMsgWithdrawFromTunnel( 1, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), sdk.AccAddress([]byte("depositor")).String(), @@ -576,10 +576,10 @@ func (s *KeeperTestSuite) TestMsgWithdrawTunnel() { expErrMsg: "tunnel not found", }, "deposit not found": { - preRun: func() *types.MsgWithdrawTunnel { + preRun: func() *types.MsgWithdrawFromTunnel { s.AddSampleTunnel(true) - return types.NewMsgWithdrawTunnel( + return types.NewMsgWithdrawFromTunnel( 1, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), sdk.AccAddress([]byte("depositor")).String(), @@ -589,7 +589,7 @@ func (s *KeeperTestSuite) TestMsgWithdrawTunnel() { expErrMsg: "deposit not found", }, "insufficient deposit": { - preRun: func() *types.MsgWithdrawTunnel { + preRun: func() *types.MsgWithdrawFromTunnel { s.AddSampleTunnel(true) depositor := sdk.AccAddress([]byte("depositor")) @@ -608,7 +608,7 @@ func (s *KeeperTestSuite) TestMsgWithdrawTunnel() { SendCoinsFromModuleToAccount(gomock.Any(), gomock.Any(), types.ModuleName, gomock.Any()). Return(sdkerrors.ErrInsufficientFunds) - return types.NewMsgWithdrawTunnel( + return types.NewMsgWithdrawFromTunnel( 1, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(1000))), depositor.String(), @@ -618,7 +618,7 @@ func (s *KeeperTestSuite) TestMsgWithdrawTunnel() { expErrMsg: "insufficient deposit", }, "all good": { - preRun: func() *types.MsgWithdrawTunnel { + preRun: func() *types.MsgWithdrawFromTunnel { s.AddSampleTunnel(true) amount := sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))) @@ -639,7 +639,7 @@ func (s *KeeperTestSuite) TestMsgWithdrawTunnel() { SendCoinsFromModuleToAccount(gomock.Any(), types.ModuleName, depositor, amount). Return(nil) - return types.NewMsgWithdrawTunnel( + return types.NewMsgWithdrawFromTunnel( 1, amount, depositor.String(), @@ -654,7 +654,7 @@ func (s *KeeperTestSuite) TestMsgWithdrawTunnel() { s.Run(name, func() { msg := tc.preRun() - _, err := s.msgServer.WithdrawTunnel(s.ctx, msg) + _, err := s.msgServer.WithdrawFromTunnel(s.ctx, msg) if tc.expErr { s.Require().Error(err) s.Require().Contains(err.Error(), tc.expErrMsg) diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 45715f6dd..83b2f15e3 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -23,8 +23,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgActivate{}, "tunnel/MsgActivate") legacy.RegisterAminoMsg(cdc, &MsgDeactivate{}, "tunnel/MsgDeactivate") legacy.RegisterAminoMsg(cdc, &MsgTriggerTunnel{}, "tunnel/MsgTriggerTunnel") - legacy.RegisterAminoMsg(cdc, &MsgDepositTunnel{}, "tunnel/MsgDepositTunnel") - legacy.RegisterAminoMsg(cdc, &MsgWithdrawTunnel{}, "tunnel/MsgWithdrawTunnel") + legacy.RegisterAminoMsg(cdc, &MsgDepositToTunnel{}, "tunnel/MsgDepositToTunnel") + legacy.RegisterAminoMsg(cdc, &MsgWithdrawFromTunnel{}, "tunnel/MsgWithdrawFromTunnel") legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "tunnel/MsgUpdateParams") cdc.RegisterInterface((*RouteI)(nil), nil) @@ -42,8 +42,8 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, - &MsgDepositTunnel{}, - &MsgWithdrawTunnel{}, + &MsgDepositToTunnel{}, + &MsgWithdrawFromTunnel{}, &MsgUpdateParams{}, ) diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index c5264d71f..d275f0d37 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -11,25 +11,27 @@ const ( EventTypeSendPacket = "send_packet" EventTypeProducePacketFail = "produce_packet_fail" EventTypeProducePacketSuccess = "produce_packet_success" - EventTypeDepositTunnel = "deposit_tunnel" - EventTypeWithdrawTunnel = "withdraw_tunnel" + EventTypeDepositToTunnel = "deposit_to_tunnel" + EventTypeWithdrawFromTunnel = "withdraw_from_tunnel" - AttributeKeyParams = "params" - AttributeKeyTunnelID = "tunnel_id" - AttributeKeySequence = "sequence" - AttributeKeyBaseFee = "base_fee" - AttributeKeyRouteFee = "route_fee" - AttributeKeyInterval = "interval" - AttributeKeyRoute = "route" - AttributeKeyEncoder = "encoder" - AttributeKeyInitialDeposit = "initial_deposit" - AttributeKeyFeePayer = "fee_payer" - AttributeKeySignalDeviation = "signal_deviation" - AttributeKeyIsActive = "is_active" - AttributeKeyCreatedAt = "created_at" - AttributeKeyCreator = "creator" - AttributeKeyDepositor = "depositor" - AttributeKeyWithdrawer = "withdrawer" - AttributeKeyAmount = "amount" - AttributeKeyReason = "reason" + AttributeKeyParams = "params" + AttributeKeyTunnelID = "tunnel_id" + AttributeKeySequence = "sequence" + AttributeKeyBaseFee = "base_fee" + AttributeKeyRouteFee = "route_fee" + AttributeKeyInterval = "interval" + AttributeKeyRoute = "route" + AttributeKeyEncoder = "encoder" + AttributeKeyInitialDeposit = "initial_deposit" + AttributeKeyFeePayer = "fee_payer" + AttributeKeySignalID = "signal_id" + AttributeKeySoftDeviationBPS = "soft_deviation_bps" + AttributeKeyHardDeviationBPS = "hard_deviation_bps" + AttributeKeyIsActive = "is_active" + AttributeKeyCreatedAt = "created_at" + AttributeKeyCreator = "creator" + AttributeKeyDepositor = "depositor" + AttributeKeyWithdrawer = "withdrawer" + AttributeKeyAmount = "amount" + AttributeKeyReason = "reason" ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 3918c45a5..9d930c05a 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -9,8 +9,8 @@ import ( ) var ( - _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgUpdateAndResetTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawTunnel{}, &MsgUpdateParams{} - _, _, _, _, _, _, _, _ sdk.HasValidateBasic = &MsgCreateTunnel{}, &MsgUpdateAndResetTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgDepositTunnel{}, &MsgWithdrawTunnel{}, &MsgUpdateParams{} + _, _, _, _, _, _, _, _ sdk.Msg = &MsgCreateTunnel{}, &MsgUpdateAndResetTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgDepositToTunnel{}, &MsgWithdrawFromTunnel{}, &MsgUpdateParams{} + _, _, _, _, _, _, _, _ sdk.HasValidateBasic = &MsgCreateTunnel{}, &MsgUpdateAndResetTunnel{}, &MsgActivate{}, &MsgDeactivate{}, &MsgTriggerTunnel{}, &MsgDepositToTunnel{}, &MsgWithdrawFromTunnel{}, &MsgUpdateParams{} _ types.UnpackInterfacesMessage = &MsgCreateTunnel{} ) @@ -220,13 +220,13 @@ func (m MsgTriggerTunnel) ValidateBasic() error { return nil } -// NewMsgDepositTunnel creates a new MsgDeposit instance. -func NewMsgDepositTunnel( +// NewMsgDepositToTunnel creates a new MsgDepositToTunnel instance. +func NewMsgDepositToTunnel( tunnelID uint64, amount sdk.Coins, depositor string, -) *MsgDepositTunnel { - return &MsgDepositTunnel{ +) *MsgDepositToTunnel { + return &MsgDepositToTunnel{ TunnelID: tunnelID, Amount: amount, Depositor: depositor, @@ -234,7 +234,7 @@ func NewMsgDepositTunnel( } // ValidateBasic does a sanity check on the provided data -func (m MsgDepositTunnel) ValidateBasic() error { +func (m MsgDepositToTunnel) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Depositor); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } @@ -246,13 +246,13 @@ func (m MsgDepositTunnel) ValidateBasic() error { return nil } -// NewMsgWithdrawTunnel creates a new MsgWithdrawTunnel instance. -func NewMsgWithdrawTunnel( +// NewMsgWithdrawFromTunnel creates a new MsgWithdrawFromTunnel instance. +func NewMsgWithdrawFromTunnel( tunnelID uint64, amount sdk.Coins, withdrawer string, -) *MsgWithdrawTunnel { - return &MsgWithdrawTunnel{ +) *MsgWithdrawFromTunnel { + return &MsgWithdrawFromTunnel{ TunnelID: tunnelID, Amount: amount, Withdrawer: withdrawer, @@ -260,7 +260,7 @@ func NewMsgWithdrawTunnel( } // ValidateBasic does a sanity check on the provided data -func (m MsgWithdrawTunnel) ValidateBasic() error { +func (m MsgWithdrawFromTunnel) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Withdrawer); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid address: %s", err) } diff --git a/x/tunnel/types/msgs_test.go b/x/tunnel/types/msgs_test.go index 8ff402153..80049f267 100644 --- a/x/tunnel/types/msgs_test.go +++ b/x/tunnel/types/msgs_test.go @@ -125,13 +125,13 @@ func TestMsgTriggerTunnel_ValidateBasic(t *testing.T) { } // ==================================== -// MsgWithdrawTunnel +// MsgWithdrawFromTunnel // ==================================== -func TestMsgWithdrawTunnel_ValidateBasic(t *testing.T) { +func TestMsgWithdrawFromTunnel_ValidateBasic(t *testing.T) { // Valid withdrawer amount := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) - msg := types.NewMsgWithdrawTunnel(1, amount, validDepositor.String()) + msg := types.NewMsgWithdrawFromTunnel(1, amount, validDepositor.String()) err := msg.ValidateBasic() require.NoError(t, err) diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 24389feab..718d717c7 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -557,8 +557,8 @@ func (m *MsgTriggerTunnelResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgTriggerTunnelResponse proto.InternalMessageInfo -// MsgDepositTunnel defines a message to submit a deposit to an existing tunnel. -type MsgDepositTunnel struct { +// MsgDepositToTunnel defines a message to deposit to an existing tunnel. +type MsgDepositToTunnel struct { // tunnel_id defines the unique id of the tunnel. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` // amount to be deposited by depositor. @@ -567,18 +567,18 @@ type MsgDepositTunnel struct { Depositor string `protobuf:"bytes,3,opt,name=depositor,proto3" json:"depositor,omitempty"` } -func (m *MsgDepositTunnel) Reset() { *m = MsgDepositTunnel{} } -func (m *MsgDepositTunnel) String() string { return proto.CompactTextString(m) } -func (*MsgDepositTunnel) ProtoMessage() {} -func (*MsgDepositTunnel) Descriptor() ([]byte, []int) { +func (m *MsgDepositToTunnel) Reset() { *m = MsgDepositToTunnel{} } +func (m *MsgDepositToTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgDepositToTunnel) ProtoMessage() {} +func (*MsgDepositToTunnel) Descriptor() ([]byte, []int) { return fileDescriptor_d18351d83b4705d0, []int{10} } -func (m *MsgDepositTunnel) XXX_Unmarshal(b []byte) error { +func (m *MsgDepositToTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDepositTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDepositToTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDepositTunnel.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDepositToTunnel.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -588,55 +588,55 @@ func (m *MsgDepositTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgDepositTunnel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDepositTunnel.Merge(m, src) +func (m *MsgDepositToTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositToTunnel.Merge(m, src) } -func (m *MsgDepositTunnel) XXX_Size() int { +func (m *MsgDepositToTunnel) XXX_Size() int { return m.Size() } -func (m *MsgDepositTunnel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDepositTunnel.DiscardUnknown(m) +func (m *MsgDepositToTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositToTunnel.DiscardUnknown(m) } -var xxx_messageInfo_MsgDepositTunnel proto.InternalMessageInfo +var xxx_messageInfo_MsgDepositToTunnel proto.InternalMessageInfo -func (m *MsgDepositTunnel) GetTunnelID() uint64 { +func (m *MsgDepositToTunnel) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgDepositTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgDepositToTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } return nil } -func (m *MsgDepositTunnel) GetDepositor() string { +func (m *MsgDepositToTunnel) GetDepositor() string { if m != nil { return m.Depositor } return "" } -// MsgDepositTunnelResponse defines the Msg/Deposit response type. -type MsgDepositTunnelResponse struct { +// MsgDepositToTunnelResponse defines the Msg/DepositToTunnel response type. +type MsgDepositToTunnelResponse struct { } -func (m *MsgDepositTunnelResponse) Reset() { *m = MsgDepositTunnelResponse{} } -func (m *MsgDepositTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDepositTunnelResponse) ProtoMessage() {} -func (*MsgDepositTunnelResponse) Descriptor() ([]byte, []int) { +func (m *MsgDepositToTunnelResponse) Reset() { *m = MsgDepositToTunnelResponse{} } +func (m *MsgDepositToTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDepositToTunnelResponse) ProtoMessage() {} +func (*MsgDepositToTunnelResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d18351d83b4705d0, []int{11} } -func (m *MsgDepositTunnelResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgDepositToTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgDepositTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDepositToTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgDepositTunnelResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDepositToTunnelResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -646,20 +646,20 @@ func (m *MsgDepositTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgDepositTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDepositTunnelResponse.Merge(m, src) +func (m *MsgDepositToTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDepositToTunnelResponse.Merge(m, src) } -func (m *MsgDepositTunnelResponse) XXX_Size() int { +func (m *MsgDepositToTunnelResponse) XXX_Size() int { return m.Size() } -func (m *MsgDepositTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDepositTunnelResponse.DiscardUnknown(m) +func (m *MsgDepositToTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDepositToTunnelResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgDepositTunnelResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgDepositToTunnelResponse proto.InternalMessageInfo -// MsgWithdrawTunnel is the transaction message to withdraw a deposit from an existing tunnel. -type MsgWithdrawTunnel struct { +// MsgWithdrawFromTunnel is the transaction message to withdraw a deposit from an existing tunnel. +type MsgWithdrawFromTunnel struct { // tunnel_id defines the unique id of the tunnel. TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` // amount to be withdrawn by withdrawer. @@ -668,18 +668,18 @@ type MsgWithdrawTunnel struct { Withdrawer string `protobuf:"bytes,3,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` } -func (m *MsgWithdrawTunnel) Reset() { *m = MsgWithdrawTunnel{} } -func (m *MsgWithdrawTunnel) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawTunnel) ProtoMessage() {} -func (*MsgWithdrawTunnel) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawFromTunnel) Reset() { *m = MsgWithdrawFromTunnel{} } +func (m *MsgWithdrawFromTunnel) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawFromTunnel) ProtoMessage() {} +func (*MsgWithdrawFromTunnel) Descriptor() ([]byte, []int) { return fileDescriptor_d18351d83b4705d0, []int{12} } -func (m *MsgWithdrawTunnel) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawFromTunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawFromTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawTunnel.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawFromTunnel.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -689,55 +689,55 @@ func (m *MsgWithdrawTunnel) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *MsgWithdrawTunnel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawTunnel.Merge(m, src) +func (m *MsgWithdrawFromTunnel) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawFromTunnel.Merge(m, src) } -func (m *MsgWithdrawTunnel) XXX_Size() int { +func (m *MsgWithdrawFromTunnel) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawTunnel) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawTunnel.DiscardUnknown(m) +func (m *MsgWithdrawFromTunnel) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawFromTunnel.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawTunnel proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawFromTunnel proto.InternalMessageInfo -func (m *MsgWithdrawTunnel) GetTunnelID() uint64 { +func (m *MsgWithdrawFromTunnel) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *MsgWithdrawTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgWithdrawFromTunnel) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } return nil } -func (m *MsgWithdrawTunnel) GetWithdrawer() string { +func (m *MsgWithdrawFromTunnel) GetWithdrawer() string { if m != nil { return m.Withdrawer } return "" } -// MsgWithdrawTunnelResponse defines the Msg/Withdraw response type. -type MsgWithdrawTunnelResponse struct { +// MsgWithdrawFromTunnelResponse defines the Msg/WithdrawFromTunnel response type. +type MsgWithdrawFromTunnelResponse struct { } -func (m *MsgWithdrawTunnelResponse) Reset() { *m = MsgWithdrawTunnelResponse{} } -func (m *MsgWithdrawTunnelResponse) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawTunnelResponse) ProtoMessage() {} -func (*MsgWithdrawTunnelResponse) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawFromTunnelResponse) Reset() { *m = MsgWithdrawFromTunnelResponse{} } +func (m *MsgWithdrawFromTunnelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawFromTunnelResponse) ProtoMessage() {} +func (*MsgWithdrawFromTunnelResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d18351d83b4705d0, []int{13} } -func (m *MsgWithdrawTunnelResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawFromTunnelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawFromTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawTunnelResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawFromTunnelResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -747,17 +747,17 @@ func (m *MsgWithdrawTunnelResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgWithdrawTunnelResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawTunnelResponse.Merge(m, src) +func (m *MsgWithdrawFromTunnelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawFromTunnelResponse.Merge(m, src) } -func (m *MsgWithdrawTunnelResponse) XXX_Size() int { +func (m *MsgWithdrawFromTunnelResponse) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawTunnelResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawTunnelResponse.DiscardUnknown(m) +func (m *MsgWithdrawFromTunnelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawFromTunnelResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawTunnelResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawFromTunnelResponse proto.InternalMessageInfo // MsgUpdateParams is the transaction message to update parameters. type MsgUpdateParams struct { @@ -862,10 +862,10 @@ func init() { proto.RegisterType((*MsgDeactivateResponse)(nil), "band.tunnel.v1beta1.MsgDeactivateResponse") proto.RegisterType((*MsgTriggerTunnel)(nil), "band.tunnel.v1beta1.MsgTriggerTunnel") proto.RegisterType((*MsgTriggerTunnelResponse)(nil), "band.tunnel.v1beta1.MsgTriggerTunnelResponse") - proto.RegisterType((*MsgDepositTunnel)(nil), "band.tunnel.v1beta1.MsgDepositTunnel") - proto.RegisterType((*MsgDepositTunnelResponse)(nil), "band.tunnel.v1beta1.MsgDepositTunnelResponse") - proto.RegisterType((*MsgWithdrawTunnel)(nil), "band.tunnel.v1beta1.MsgWithdrawTunnel") - proto.RegisterType((*MsgWithdrawTunnelResponse)(nil), "band.tunnel.v1beta1.MsgWithdrawTunnelResponse") + proto.RegisterType((*MsgDepositToTunnel)(nil), "band.tunnel.v1beta1.MsgDepositToTunnel") + proto.RegisterType((*MsgDepositToTunnelResponse)(nil), "band.tunnel.v1beta1.MsgDepositToTunnelResponse") + proto.RegisterType((*MsgWithdrawFromTunnel)(nil), "band.tunnel.v1beta1.MsgWithdrawFromTunnel") + proto.RegisterType((*MsgWithdrawFromTunnelResponse)(nil), "band.tunnel.v1beta1.MsgWithdrawFromTunnelResponse") proto.RegisterType((*MsgUpdateParams)(nil), "band.tunnel.v1beta1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "band.tunnel.v1beta1.MsgUpdateParamsResponse") } @@ -873,72 +873,73 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tx.proto", fileDescriptor_d18351d83b4705d0) } var fileDescriptor_d18351d83b4705d0 = []byte{ - // 1033 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x3a, 0x89, 0x9b, 0x4c, 0xd2, 0xb4, 0xd9, 0xba, 0x64, 0xbd, 0xad, 0xd6, 0x66, 0x69, - 0xc0, 0xb5, 0x92, 0x5d, 0xc5, 0xa5, 0x15, 0x84, 0x53, 0x5c, 0x73, 0xc8, 0xc1, 0x12, 0xda, 0x16, - 0x2a, 0x21, 0xa4, 0x68, 0xed, 0x1d, 0xd6, 0x23, 0xec, 0x1d, 0x6b, 0x67, 0xec, 0xd6, 0x9c, 0x10, - 0x47, 0x4e, 0x70, 0xe0, 0x84, 0xe0, 0xc0, 0x09, 0x71, 0x21, 0x87, 0x9e, 0x39, 0x57, 0x48, 0x48, - 0x15, 0x27, 0x4e, 0x01, 0x25, 0x87,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 0x66, 0x1f, 0xe1, 0x5d, 0xdc, 0x37, 0xbb, 0x3d, 0x1b, 0x79, 0xe6, 0xf8, 0x8e, - 0xf9, 0x24, 0xfc, 0xaf, 0x82, 0x35, 0xbc, 0x4e, 0x91, 0x21, 0xee, 0xfc, 0x1b, 0x00, 0x00, 0xff, - 0xff, 0xac, 0x82, 0x6e, 0xda, 0x5e, 0x0d, 0x00, 0x00, + // 1046 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xda, 0x89, 0x9b, 0x4c, 0xd2, 0xa6, 0xdd, 0xba, 0xc4, 0x5e, 0x82, 0x6d, 0x96, 0x56, + 0x75, 0xa3, 0x64, 0x97, 0xb8, 0xb4, 0x82, 0x70, 0x8a, 0x6b, 0x90, 0x72, 0xb0, 0x84, 0xb6, 0x81, + 0x4a, 0x08, 0x29, 0x5a, 0x7b, 0x87, 0xf5, 0xa8, 0xf6, 0x8e, 0xb5, 0x33, 0x76, 0x6b, 0x4e, 0x88, + 0x23, 0x27, 0x38, 0x70, 0x42, 0x42, 0xe2, 0x86, 0x7a, 0x21, 0x87, 0xfe, 0x88, 0x0a, 0x09, 0x29, + 0xe2, 0xc4, 0x29, 0xa0, 0xe4, 0x10, 0x89, 0x5f, 0x81, 0x76, 0x66, 0x76, 0x76, 0xbd, 0x59, 0x27, + 0x0e, 0x8a, 0x90, 0x7a, 0x89, 0x77, 0xde, 0xfb, 0xe6, 0xbd, 0xef, 0x7d, 0x33, 0xfb, 0xde, 0x06, + 0xac, 0xb6, 0x6c, 0xcf, 0x31, 0xe9, 0xc0, 0xf3, 0x60, 0xd7, 0x1c, 0x6e, 0xb6, 0x20, 0xb5, 0x37, + 0x4d, 0xfa, 0xdc, 0xe8, 0xfb, 0x98, 0x62, 0xf5, 0x66, 0xe0, 0x35, 0xb8, 0xd7, 0x10, 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92, 0x86, 0xd6, 0xde, 0xbb, 0x08, 0x5a, 0xe6, 0xfe, 0x0c, 0xcc, + 0xcb, 0xb1, 0x52, 0x99, 0x14, 0x21, 0x44, 0x68, 0xd5, 0xf3, 0x10, 0x32, 0xee, 0x17, 0x00, 0xc4, + 0x66, 0x80, 0x3e, 0x69, 0x5f, 0x84, 0xd1, 0xd6, 0xce, 0xc7, 0xc8, 0xe8, 0x10, 0x5c, 0x1d, 0x6f, + 0xd8, 0x77, 0x26, 0x6d, 0x1e, 0x83, 0x69, 0x1b, 0x53, 0xc1, 0x64, 0x9a, 0xa7, 0x60, 0x39, 0xd9, + 0x5d, 0xef, 0x4e, 0x66, 0x39, 0x06, 0xd4, 0xcc, 0x29, 0x81, 0x32, 0x19, 0x05, 0x6a, 0x4a, 0x23, + 0x9a, 0xa8, 0xca, 0x69, 0xac, 0x56, 0x9b, 0x1e, 0x2b, 0xb3, 0xb6, 0xc0, 0xd2, 0xd8, 0x0b, 0x7b, + 0xfb, 0xec, 0x5b, 0xc4, 0x51, 0xda, 0xfa, 0x34, 0xa8, 0x30, 0x87, 0x36, 0xf7, 0x75, 0xd0, 0xb4, + 0xea, 0x3b, 0xaf, 0x8e, 0x4a, 0xca, 0xc1, 0x51, 0x49, 0xf9, 0xfb, 0xa8, 0xa4, 0x7c, 0x77, 0x5c, + 0x9a, 0x39, 0x38, 0x2e, 0xcd, 0xfc, 0x79, 0x5c, 0x9a, 0xf9, 0xdc, 0x8c, 0x75, 0xbf, 0x20, 0x30, + 0xfb, 0x50, 0x6f, 0xe3, 0xae, 0xd9, 0xee, 0xd8, 0xc8, 0x33, 0x87, 0xf7, 0xcd, 0xe7, 0xe1, 0x7f, + 0x1e, 0xac, 0x15, 0xb6, 0x72, 0x0c, 0x71, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0x1e, + 0x7b, 0x0b, 0x82, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -963,10 +964,10 @@ type MsgClient interface { Deactivate(ctx context.Context, in *MsgDeactivate, opts ...grpc.CallOption) (*MsgDeactivateResponse, error) // TriggerTunnel is a RPC method to manually trigger a tunnel. TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opts ...grpc.CallOption) (*MsgTriggerTunnelResponse, error) - // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. - DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) - // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. - WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) + // DepositToTunnel is a RPC method to deposit to an existing tunnel. + DepositToTunnel(ctx context.Context, in *MsgDepositToTunnel, opts ...grpc.CallOption) (*MsgDepositToTunnelResponse, error) + // WithdrawFromTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawFromTunnel(ctx context.Context, in *MsgWithdrawFromTunnel, opts ...grpc.CallOption) (*MsgWithdrawFromTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -1024,18 +1025,18 @@ func (c *msgClient) TriggerTunnel(ctx context.Context, in *MsgTriggerTunnel, opt return out, nil } -func (c *msgClient) DepositTunnel(ctx context.Context, in *MsgDepositTunnel, opts ...grpc.CallOption) (*MsgDepositTunnelResponse, error) { - out := new(MsgDepositTunnelResponse) - err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/DepositTunnel", in, out, opts...) +func (c *msgClient) DepositToTunnel(ctx context.Context, in *MsgDepositToTunnel, opts ...grpc.CallOption) (*MsgDepositToTunnelResponse, error) { + out := new(MsgDepositToTunnelResponse) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/DepositToTunnel", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) WithdrawTunnel(ctx context.Context, in *MsgWithdrawTunnel, opts ...grpc.CallOption) (*MsgWithdrawTunnelResponse, error) { - out := new(MsgWithdrawTunnelResponse) - err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/WithdrawTunnel", in, out, opts...) +func (c *msgClient) WithdrawFromTunnel(ctx context.Context, in *MsgWithdrawFromTunnel, opts ...grpc.CallOption) (*MsgWithdrawFromTunnelResponse, error) { + out := new(MsgWithdrawFromTunnelResponse) + err := c.cc.Invoke(ctx, "/band.tunnel.v1beta1.Msg/WithdrawFromTunnel", in, out, opts...) if err != nil { return nil, err } @@ -1063,10 +1064,10 @@ type MsgServer interface { Deactivate(context.Context, *MsgDeactivate) (*MsgDeactivateResponse, error) // TriggerTunnel is a RPC method to manually trigger a tunnel. TriggerTunnel(context.Context, *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) - // DepositTunnel is a RPC method to submit a deposit to an existing tunnel. - DepositTunnel(context.Context, *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) - // WithdrawTunnel is a RPC method to withdraw a deposit from an existing tunnel. - WithdrawTunnel(context.Context, *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) + // DepositToTunnel is a RPC method to deposit to an existing tunnel. + DepositToTunnel(context.Context, *MsgDepositToTunnel) (*MsgDepositToTunnelResponse, error) + // WithdrawFromTunnel is a RPC method to withdraw a deposit from an existing tunnel. + WithdrawFromTunnel(context.Context, *MsgWithdrawFromTunnel) (*MsgWithdrawFromTunnelResponse, error) // UpdateParams is a RPC method to update parameters UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } @@ -1090,11 +1091,11 @@ func (*UnimplementedMsgServer) Deactivate(ctx context.Context, req *MsgDeactivat func (*UnimplementedMsgServer) TriggerTunnel(ctx context.Context, req *MsgTriggerTunnel) (*MsgTriggerTunnelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TriggerTunnel not implemented") } -func (*UnimplementedMsgServer) DepositTunnel(ctx context.Context, req *MsgDepositTunnel) (*MsgDepositTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositTunnel not implemented") +func (*UnimplementedMsgServer) DepositToTunnel(ctx context.Context, req *MsgDepositToTunnel) (*MsgDepositToTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositToTunnel not implemented") } -func (*UnimplementedMsgServer) WithdrawTunnel(ctx context.Context, req *MsgWithdrawTunnel) (*MsgWithdrawTunnelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WithdrawTunnel not implemented") +func (*UnimplementedMsgServer) WithdrawFromTunnel(ctx context.Context, req *MsgWithdrawFromTunnel) (*MsgWithdrawFromTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawFromTunnel not implemented") } func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") @@ -1194,38 +1195,38 @@ func _Msg_TriggerTunnel_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_DepositTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDepositTunnel) +func _Msg_DepositToTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDepositToTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).DepositTunnel(ctx, in) + return srv.(MsgServer).DepositToTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/band.tunnel.v1beta1.Msg/DepositTunnel", + FullMethod: "/band.tunnel.v1beta1.Msg/DepositToTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DepositTunnel(ctx, req.(*MsgDepositTunnel)) + return srv.(MsgServer).DepositToTunnel(ctx, req.(*MsgDepositToTunnel)) } return interceptor(ctx, in, info, handler) } -func _Msg_WithdrawTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawTunnel) +func _Msg_WithdrawFromTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawFromTunnel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).WithdrawTunnel(ctx, in) + return srv.(MsgServer).WithdrawFromTunnel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/band.tunnel.v1beta1.Msg/WithdrawTunnel", + FullMethod: "/band.tunnel.v1beta1.Msg/WithdrawFromTunnel", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).WithdrawTunnel(ctx, req.(*MsgWithdrawTunnel)) + return srv.(MsgServer).WithdrawFromTunnel(ctx, req.(*MsgWithdrawFromTunnel)) } return interceptor(ctx, in, info, handler) } @@ -1273,12 +1274,12 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_TriggerTunnel_Handler, }, { - MethodName: "DepositTunnel", - Handler: _Msg_DepositTunnel_Handler, + MethodName: "DepositToTunnel", + Handler: _Msg_DepositToTunnel_Handler, }, { - MethodName: "WithdrawTunnel", - Handler: _Msg_WithdrawTunnel_Handler, + MethodName: "WithdrawFromTunnel", + Handler: _Msg_WithdrawFromTunnel_Handler, }, { MethodName: "UpdateParams", @@ -1648,7 +1649,7 @@ func (m *MsgTriggerTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgDepositTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgDepositToTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1658,12 +1659,12 @@ func (m *MsgDepositTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDepositTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDepositToTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDepositTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDepositToTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1697,7 +1698,7 @@ func (m *MsgDepositTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgDepositTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgDepositToTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1707,12 +1708,12 @@ func (m *MsgDepositTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgDepositTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDepositToTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgDepositTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDepositToTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1720,7 +1721,7 @@ func (m *MsgDepositTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgWithdrawTunnel) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawFromTunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1730,12 +1731,12 @@ func (m *MsgWithdrawTunnel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgWithdrawTunnel) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawFromTunnel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawFromTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1769,7 +1770,7 @@ func (m *MsgWithdrawTunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgWithdrawTunnelResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawFromTunnelResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1779,12 +1780,12 @@ func (m *MsgWithdrawTunnelResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgWithdrawTunnelResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawFromTunnelResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawFromTunnelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2022,7 +2023,7 @@ func (m *MsgTriggerTunnelResponse) Size() (n int) { return n } -func (m *MsgDepositTunnel) Size() (n int) { +func (m *MsgDepositToTunnel) Size() (n int) { if m == nil { return 0 } @@ -2044,7 +2045,7 @@ func (m *MsgDepositTunnel) Size() (n int) { return n } -func (m *MsgDepositTunnelResponse) Size() (n int) { +func (m *MsgDepositToTunnelResponse) Size() (n int) { if m == nil { return 0 } @@ -2053,7 +2054,7 @@ func (m *MsgDepositTunnelResponse) Size() (n int) { return n } -func (m *MsgWithdrawTunnel) Size() (n int) { +func (m *MsgWithdrawFromTunnel) Size() (n int) { if m == nil { return 0 } @@ -2075,7 +2076,7 @@ func (m *MsgWithdrawTunnel) Size() (n int) { return n } -func (m *MsgWithdrawTunnelResponse) Size() (n int) { +func (m *MsgWithdrawFromTunnelResponse) Size() (n int) { if m == nil { return 0 } @@ -3064,7 +3065,7 @@ func (m *MsgTriggerTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDepositTunnel) Unmarshal(dAtA []byte) error { +func (m *MsgDepositToTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3087,10 +3088,10 @@ func (m *MsgDepositTunnel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDepositTunnel: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDepositToTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDepositTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDepositToTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3199,7 +3200,7 @@ func (m *MsgDepositTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDepositTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDepositToTunnelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3222,10 +3223,10 @@ func (m *MsgDepositTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDepositTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDepositToTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDepositTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDepositToTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3249,7 +3250,7 @@ func (m *MsgDepositTunnelResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawTunnel) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawFromTunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3272,10 +3273,10 @@ func (m *MsgWithdrawTunnel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawTunnel: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawFromTunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawTunnel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawFromTunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3384,7 +3385,7 @@ func (m *MsgWithdrawTunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawTunnelResponse) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawFromTunnelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3407,10 +3408,10 @@ func (m *MsgWithdrawTunnelResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawTunnelResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawFromTunnelResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawFromTunnelResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From ccfa625b2cf710d3b23bb4d81dc44e469d5aaa3a Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 11 Nov 2024 19:56:18 +0700 Subject: [PATCH 246/272] fix readme --- x/tunnel/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/README.md b/x/tunnel/README.md index 432f26bf3..eb5e3c822 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -35,7 +35,7 @@ The Tunnel module is designed to decentralize the creation of push-based price d - [MsgWithdrawFromTunnel](#MsgWithdrawFromTunnel) - [Events](#events) - [Event: `create_tunnel`](#event-create_tunnel) - - [Event: `edit_tunnel`](#event-edit_tunnel) + - [Event: `update_and_reset_tunnel`](#event-update_and_reset_tunnel) - [Event: `activate`](#event-activate) - [Event: `deactivate`](#event-deactivate) - [Event: `trigger_tunnel`](#event-trigger_tunnel) From e01227a8aeaabcfbb8d1680c2d351ae0b2eb3ddd Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 11 Nov 2024 23:33:13 +0700 Subject: [PATCH 247/272] fix test --- x/tunnel/keeper/msg_server_test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 4e8d78e85..62d3ed1c0 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -604,10 +604,6 @@ func (s *KeeperTestSuite) TestMsgWithdrawFromTunnel() { deposit, ) - s.bankKeeper.EXPECT(). - SendCoinsFromModuleToAccount(gomock.Any(), gomock.Any(), types.ModuleName, gomock.Any()). - Return(sdkerrors.ErrInsufficientFunds) - return types.NewMsgWithdrawFromTunnel( 1, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(1000))), From 64de96f4ab9406bdd8ba7d53e8f575b4aa3fa0db Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Tue, 12 Nov 2024 02:34:13 +0700 Subject: [PATCH 248/272] fix function name --- x/tunnel/keeper/keeper_deposit_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/keeper_deposit_test.go b/x/tunnel/keeper/keeper_deposit_test.go index 33c6e011b..983bd10dd 100644 --- a/x/tunnel/keeper/keeper_deposit_test.go +++ b/x/tunnel/keeper/keeper_deposit_test.go @@ -8,7 +8,7 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func (s *KeeperTestSuite) TestAddDeposit() { +func (s *KeeperTestSuite) TestDepositToTunnel() { ctx, k := s.ctx, s.keeper tunnelID := uint64(1) From d8c8edcc34b385ecf2dfab48cf196cd1b832aa4d Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Tue, 12 Nov 2024 03:57:17 +0700 Subject: [PATCH 249/272] clean --- scripts/tunnel/create_tunnel.sh | 2 +- scripts/tunnel/signal_deviations.json | 4 ++-- x/tunnel/testutil/expected_keepers_mocks.go | 12 ++++++------ x/tunnel/types/expected_keepers.go | 6 ++++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/scripts/tunnel/create_tunnel.sh b/scripts/tunnel/create_tunnel.sh index 628ceb54a..72646b450 100755 --- a/scripts/tunnel/create_tunnel.sh +++ b/scripts/tunnel/create_tunnel.sh @@ -1 +1 @@ -bandd tx tunnel create-tunnel tss evm-1 0x0001 1 1uband 10 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain +bandd tx tunnel create-tunnel tss eth 0xe00F1f85abDB2aF6760759547d450da68CE66Bb1 1 1uband 10 ./scripts/tunnel/signal_deviations.json --from requester --keyring-backend test --gas-prices 0.0025uband -y --chain-id bandchain diff --git a/scripts/tunnel/signal_deviations.json b/scripts/tunnel/signal_deviations.json index bd7287a9b..532051c90 100644 --- a/scripts/tunnel/signal_deviations.json +++ b/scripts/tunnel/signal_deviations.json @@ -1,11 +1,11 @@ { "signal_deviations": [ { - "signal_id": "BTC", + "signal_id": "CS:BTC-USD", "deviation_bps": 2000 }, { - "signal_id": "ETH", + "signal_id": "CS:ETH-USD", "deviation_bps": 4000 } ] diff --git a/x/tunnel/testutil/expected_keepers_mocks.go b/x/tunnel/testutil/expected_keepers_mocks.go index 8ad2cdbdc..6f628647b 100644 --- a/x/tunnel/testutil/expected_keepers_mocks.go +++ b/x/tunnel/testutil/expected_keepers_mocks.go @@ -280,17 +280,17 @@ func (m *MockBandtssKeeper) EXPECT() *MockBandtssKeeperMockRecorder { return m.recorder } -// CreateDirectSigningRequest mocks base method. -func (m *MockBandtssKeeper) CreateDirectSigningRequest(ctx types2.Context, content types1.Content, memo string, sender types2.AccAddress, feeLimit types2.Coins) (types.SigningID, error) { +// CreateTunnelSigningRequest mocks base method. +func (m *MockBandtssKeeper) CreateTunnelSigningRequest(ctx types2.Context, tunnelID uint64, destinationContractAddr, destinationChainID string, content types1.Content, sender types2.AccAddress, feeLimit types2.Coins) (types.SigningID, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateDirectSigningRequest", ctx, content, memo, sender, feeLimit) + ret := m.ctrl.Call(m, "CreateTunnelSigningRequest", ctx, tunnelID, destinationContractAddr, destinationChainID, content, sender, feeLimit) ret0, _ := ret[0].(types.SigningID) ret1, _ := ret[1].(error) return ret0, ret1 } -// CreateDirectSigningRequest indicates an expected call of CreateDirectSigningRequest. -func (mr *MockBandtssKeeperMockRecorder) CreateDirectSigningRequest(ctx, content, memo, sender, feeLimit any) *gomock.Call { +// CreateTunnelSigningRequest indicates an expected call of CreateTunnelSigningRequest. +func (mr *MockBandtssKeeperMockRecorder) CreateTunnelSigningRequest(ctx, tunnelID, destinationContractAddr, destinationChainID, content, sender, feeLimit any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDirectSigningRequest", reflect.TypeOf((*MockBandtssKeeper)(nil).CreateDirectSigningRequest), ctx, content, memo, sender, feeLimit) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTunnelSigningRequest", reflect.TypeOf((*MockBandtssKeeper)(nil).CreateTunnelSigningRequest), ctx, tunnelID, destinationContractAddr, destinationChainID, content, sender, feeLimit) } diff --git a/x/tunnel/types/expected_keepers.go b/x/tunnel/types/expected_keepers.go index 878622864..8c814fd78 100644 --- a/x/tunnel/types/expected_keepers.go +++ b/x/tunnel/types/expected_keepers.go @@ -45,10 +45,12 @@ type FeedsKeeper interface { } type BandtssKeeper interface { - CreateDirectSigningRequest( + CreateTunnelSigningRequest( ctx sdk.Context, + tunnelID uint64, + destinationContractAddr string, + destinationChainID string, content tsstypes.Content, - memo string, sender sdk.AccAddress, feeLimit sdk.Coins, ) (bandtsstypes.SigningID, error) From f208c64a014a11c63a79fd862d6929720802536e Mon Sep 17 00:00:00 2001 From: Natthakun Kitthaworn Date: Tue, 12 Nov 2024 16:06:05 +0700 Subject: [PATCH 250/272] [tunnel] use object in feeds module (#259) * use object in feeds module * fix from comments * add params concrete types * update get fee * fix updatePrice * fix updatePrice * fix msg server * refactor * Revert "refactor" This reverts commit d4ea5ed772f924caee8a997360fb669d66c2b001. * refactor * remove unused * update prices --------- Co-authored-by: satawatnack Co-authored-by: Kitipong Sirirueangsakul --- api/band/tunnel/v1beta1/genesis.pulsar.go | 272 +--- api/band/tunnel/v1beta1/tunnel.pulsar.go | 1245 +++++------------ api/band/tunnel/v1beta1/tx.pulsar.go | 395 +++--- benchmark/tunnel_bench_test.go | 28 +- proto/band/tunnel/v1beta1/genesis.proto | 6 +- proto/band/tunnel/v1beta1/tunnel.proto | 40 +- proto/band/tunnel/v1beta1/tx.proto | 3 +- x/feeds/types/feeds_price_data.go | 9 + x/feeds/types/feeds_price_data_test.go | 10 + x/tunnel/client/cli/tx.go | 3 +- x/tunnel/keeper/genesis.go | 18 +- x/tunnel/keeper/genesis_test.go | 70 +- x/tunnel/keeper/helper.go | 48 +- x/tunnel/keeper/helper_test.go | 68 +- .../keeper/keeper_latest_signal_prices.go | 67 +- .../keeper_latest_signal_prices_test.go | 41 +- x/tunnel/keeper/keeper_packet.go | 63 +- x/tunnel/keeper/keeper_packet_test.go | 63 +- x/tunnel/keeper/keeper_test.go | 3 +- x/tunnel/keeper/keeper_tss_packet.go | 15 +- x/tunnel/keeper/keeper_tss_packet_test.go | 14 +- x/tunnel/keeper/keeper_tunnel.go | 19 +- x/tunnel/keeper/keeper_tunnel_test.go | 36 +- x/tunnel/keeper/msg_server.go | 25 +- x/tunnel/keeper/msg_server_test.go | 8 +- x/tunnel/types/codec.go | 1 + x/tunnel/types/errors.go | 37 +- x/tunnel/types/genesis.go | 50 +- x/tunnel/types/genesis.pb.go | 116 +- x/tunnel/types/genesis_test.go | 73 - x/tunnel/types/keys.go | 16 +- x/tunnel/types/keys_test.go | 4 +- x/tunnel/types/msgs.go | 8 +- x/tunnel/types/packet.go | 6 +- x/tunnel/types/signal.go | 59 +- x/tunnel/types/signal_test.go | 68 +- x/tunnel/types/tunnel.go | 12 +- x/tunnel/types/tunnel.pb.go | 535 ++----- x/tunnel/types/tunnel_test.go | 10 - x/tunnel/types/tx.pb.go | 148 +- 40 files changed, 1230 insertions(+), 2482 deletions(-) diff --git a/api/band/tunnel/v1beta1/genesis.pulsar.go b/api/band/tunnel/v1beta1/genesis.pulsar.go index fcfddd223..9b9483edb 100644 --- a/api/band/tunnel/v1beta1/genesis.pulsar.go +++ b/api/band/tunnel/v1beta1/genesis.pulsar.go @@ -67,7 +67,7 @@ func (x *_GenesisState_3_list) IsValid() bool { var _ protoreflect.List = (*_GenesisState_4_list)(nil) type _GenesisState_4_list struct { - list *[]*LatestSignalPrices + list *[]*Deposit } func (x *_GenesisState_4_list) Len() int { @@ -83,18 +83,18 @@ func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*LatestSignalPrices) + concreteValue := valueUnwrapped.Interface().(*Deposit) (*x.list)[i] = concreteValue } func (x *_GenesisState_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*LatestSignalPrices) + concreteValue := valueUnwrapped.Interface().(*Deposit) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { - v := new(LatestSignalPrices) + v := new(Deposit) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -107,73 +107,21 @@ func (x *_GenesisState_4_list) Truncate(n int) { } func (x *_GenesisState_4_list) NewElement() protoreflect.Value { - v := new(LatestSignalPrices) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_5_list)(nil) - -type _GenesisState_5_list struct { - list *[]*Deposit -} - -func (x *_GenesisState_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Deposit) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { - v := new(Deposit) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_5_list) NewElement() protoreflect.Value { v := new(Deposit) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_GenesisState_5_list) IsValid() bool { +func (x *_GenesisState_4_list) IsValid() bool { return x.list != nil } var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_tunnel_count protoreflect.FieldDescriptor - fd_GenesisState_tunnels protoreflect.FieldDescriptor - fd_GenesisState_latest_signal_prices_list protoreflect.FieldDescriptor - fd_GenesisState_deposits protoreflect.FieldDescriptor - fd_GenesisState_total_fees protoreflect.FieldDescriptor + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_tunnel_count protoreflect.FieldDescriptor + fd_GenesisState_tunnels protoreflect.FieldDescriptor + fd_GenesisState_deposits protoreflect.FieldDescriptor + fd_GenesisState_total_fees protoreflect.FieldDescriptor ) func init() { @@ -182,7 +130,6 @@ func init() { fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_tunnel_count = md_GenesisState.Fields().ByName("tunnel_count") fd_GenesisState_tunnels = md_GenesisState.Fields().ByName("tunnels") - fd_GenesisState_latest_signal_prices_list = md_GenesisState.Fields().ByName("latest_signal_prices_list") fd_GenesisState_deposits = md_GenesisState.Fields().ByName("deposits") fd_GenesisState_total_fees = md_GenesisState.Fields().ByName("total_fees") } @@ -270,14 +217,8 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } - if len(x.LatestSignalPricesList) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.LatestSignalPricesList}) - if !f(fd_GenesisState_latest_signal_prices_list, value) { - return - } - } if len(x.Deposits) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.Deposits}) + value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.Deposits}) if !f(fd_GenesisState_deposits, value) { return } @@ -309,8 +250,6 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return x.TunnelCount != uint64(0) case "band.tunnel.v1beta1.GenesisState.tunnels": return len(x.Tunnels) != 0 - case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": - return len(x.LatestSignalPricesList) != 0 case "band.tunnel.v1beta1.GenesisState.deposits": return len(x.Deposits) != 0 case "band.tunnel.v1beta1.GenesisState.total_fees": @@ -337,8 +276,6 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.TunnelCount = uint64(0) case "band.tunnel.v1beta1.GenesisState.tunnels": x.Tunnels = nil - case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": - x.LatestSignalPricesList = nil case "band.tunnel.v1beta1.GenesisState.deposits": x.Deposits = nil case "band.tunnel.v1beta1.GenesisState.total_fees": @@ -371,17 +308,11 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_3_list{list: &x.Tunnels} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": - if len(x.LatestSignalPricesList) == 0 { - return protoreflect.ValueOfList(&_GenesisState_4_list{}) - } - listValue := &_GenesisState_4_list{list: &x.LatestSignalPricesList} - return protoreflect.ValueOfList(listValue) case "band.tunnel.v1beta1.GenesisState.deposits": if len(x.Deposits) == 0 { - return protoreflect.ValueOfList(&_GenesisState_5_list{}) + return protoreflect.ValueOfList(&_GenesisState_4_list{}) } - listValue := &_GenesisState_5_list{list: &x.Deposits} + listValue := &_GenesisState_4_list{list: &x.Deposits} return protoreflect.ValueOfList(listValue) case "band.tunnel.v1beta1.GenesisState.total_fees": value := x.TotalFees @@ -414,13 +345,9 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_3_list) x.Tunnels = *clv.list - case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": - lv := value.List() - clv := lv.(*_GenesisState_4_list) - x.LatestSignalPricesList = *clv.list case "band.tunnel.v1beta1.GenesisState.deposits": lv := value.List() - clv := lv.(*_GenesisState_5_list) + clv := lv.(*_GenesisState_4_list) x.Deposits = *clv.list case "band.tunnel.v1beta1.GenesisState.total_fees": x.TotalFees = value.Message().Interface().(*TotalFees) @@ -455,17 +382,11 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_3_list{list: &x.Tunnels} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": - if x.LatestSignalPricesList == nil { - x.LatestSignalPricesList = []*LatestSignalPrices{} - } - value := &_GenesisState_4_list{list: &x.LatestSignalPricesList} - return protoreflect.ValueOfList(value) case "band.tunnel.v1beta1.GenesisState.deposits": if x.Deposits == nil { x.Deposits = []*Deposit{} } - value := &_GenesisState_5_list{list: &x.Deposits} + value := &_GenesisState_4_list{list: &x.Deposits} return protoreflect.ValueOfList(value) case "band.tunnel.v1beta1.GenesisState.total_fees": if x.TotalFees == nil { @@ -495,12 +416,9 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "band.tunnel.v1beta1.GenesisState.tunnels": list := []*Tunnel{} return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "band.tunnel.v1beta1.GenesisState.latest_signal_prices_list": - list := []*LatestSignalPrices{} - return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) case "band.tunnel.v1beta1.GenesisState.deposits": list := []*Deposit{} - return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) + return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) case "band.tunnel.v1beta1.GenesisState.total_fees": m := new(TotalFees) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -586,12 +504,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if len(x.LatestSignalPricesList) > 0 { - for _, e := range x.LatestSignalPricesList { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if len(x.Deposits) > 0 { for _, e := range x.Deposits { l = options.Size(e) @@ -643,7 +555,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(x.Deposits) > 0 { for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { @@ -658,22 +570,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x2a - } - } - if len(x.LatestSignalPricesList) > 0 { - for iNdEx := len(x.LatestSignalPricesList) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.LatestSignalPricesList[iNdEx]) - 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] = 0x22 } } @@ -851,40 +747,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LatestSignalPricesList", 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 - } - x.LatestSignalPricesList = append(x.LatestSignalPricesList, &LatestSignalPrices{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LatestSignalPricesList[len(x.LatestSignalPricesList)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) } @@ -918,7 +780,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalFees", wireType) } @@ -1014,12 +876,10 @@ type GenesisState struct { TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` // tunnels is the list of tunnels. Tunnels []*Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels,omitempty"` - // latest_signal_prices_list is the list of latest signal prices. - LatestSignalPricesList []*LatestSignalPrices `protobuf:"bytes,4,rep,name=latest_signal_prices_list,json=latestSignalPricesList,proto3" json:"latest_signal_prices_list,omitempty"` // deposits is the list of deposits. - Deposits []*Deposit `protobuf:"bytes,5,rep,name=deposits,proto3" json:"deposits,omitempty"` + Deposits []*Deposit `protobuf:"bytes,4,rep,name=deposits,proto3" json:"deposits,omitempty"` // total_fees is the type for the total fees collected by the tunnel - TotalFees *TotalFees `protobuf:"bytes,6,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"` + TotalFees *TotalFees `protobuf:"bytes,5,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"` } func (x *GenesisState) Reset() { @@ -1063,13 +923,6 @@ func (x *GenesisState) GetTunnels() []*Tunnel { return nil } -func (x *GenesisState) GetLatestSignalPricesList() []*LatestSignalPrices { - if x != nil { - return x.LatestSignalPricesList - } - return nil -} - func (x *GenesisState) GetDeposits() []*Deposit { if x != nil { return x.Deposits @@ -1096,7 +949,7 @@ var file_band_tunnel_v1beta1_genesis_proto_rawDesc = []byte{ 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x98, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, + 0x74, 0x6f, 0x22, 0xae, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, @@ -1106,37 +959,30 @@ var file_band_tunnel_v1beta1_genesis_proto_rawDesc = []byte{ 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x68, - 0x0a, 0x19, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, - 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x16, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x42, 0xdd, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, - 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x3e, + 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x43, + 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, + 0x65, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, + 0x65, 0x65, 0x73, 0x42, 0xdd, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, + 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, + 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, + 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, + 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1153,24 +999,22 @@ func file_band_tunnel_v1beta1_genesis_proto_rawDescGZIP() []byte { var file_band_tunnel_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_band_tunnel_v1beta1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: band.tunnel.v1beta1.GenesisState - (*Params)(nil), // 1: band.tunnel.v1beta1.Params - (*Tunnel)(nil), // 2: band.tunnel.v1beta1.Tunnel - (*LatestSignalPrices)(nil), // 3: band.tunnel.v1beta1.LatestSignalPrices - (*Deposit)(nil), // 4: band.tunnel.v1beta1.Deposit - (*TotalFees)(nil), // 5: band.tunnel.v1beta1.TotalFees + (*GenesisState)(nil), // 0: band.tunnel.v1beta1.GenesisState + (*Params)(nil), // 1: band.tunnel.v1beta1.Params + (*Tunnel)(nil), // 2: band.tunnel.v1beta1.Tunnel + (*Deposit)(nil), // 3: band.tunnel.v1beta1.Deposit + (*TotalFees)(nil), // 4: band.tunnel.v1beta1.TotalFees } var file_band_tunnel_v1beta1_genesis_proto_depIdxs = []int32{ 1, // 0: band.tunnel.v1beta1.GenesisState.params:type_name -> band.tunnel.v1beta1.Params 2, // 1: band.tunnel.v1beta1.GenesisState.tunnels:type_name -> band.tunnel.v1beta1.Tunnel - 3, // 2: band.tunnel.v1beta1.GenesisState.latest_signal_prices_list:type_name -> band.tunnel.v1beta1.LatestSignalPrices - 4, // 3: band.tunnel.v1beta1.GenesisState.deposits:type_name -> band.tunnel.v1beta1.Deposit - 5, // 4: band.tunnel.v1beta1.GenesisState.total_fees:type_name -> band.tunnel.v1beta1.TotalFees - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 3, // 2: band.tunnel.v1beta1.GenesisState.deposits:type_name -> band.tunnel.v1beta1.Deposit + 4, // 3: band.tunnel.v1beta1.GenesisState.total_fees:type_name -> band.tunnel.v1beta1.TotalFees + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_band_tunnel_v1beta1_genesis_proto_init() } diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index 06e1927d3..e4a2bf2a6 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -5,6 +5,7 @@ import ( _ "cosmossdk.io/api/amino" v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" fmt "fmt" + v1beta11 "github.com/bandprotocol/chain/v3/api/band/feeds/v1beta1" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -2044,7 +2045,7 @@ func (x *fastReflection_Tunnel) Set(fd protoreflect.FieldDescriptor, value proto case "band.tunnel.v1beta1.Tunnel.route": x.Route = value.Message().Interface().(*anypb.Any) case "band.tunnel.v1beta1.Tunnel.encoder": - x.Encoder = (Encoder)(value.Enum()) + x.Encoder = (v1beta11.Encoder)(value.Enum()) case "band.tunnel.v1beta1.Tunnel.fee_payer": x.FeePayer = value.Interface().(string) case "band.tunnel.v1beta1.Tunnel.signal_deviations": @@ -2526,7 +2527,7 @@ func (x *fastReflection_Tunnel) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Encoder |= Encoder(b&0x7F) << shift + x.Encoder |= v1beta11.Encoder(b&0x7F) << shift if b < 0x80 { break } @@ -2756,81 +2757,81 @@ func (x *fastReflection_Tunnel) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_LatestSignalPrices_2_list)(nil) +var _ protoreflect.List = (*_LatestPrices_2_list)(nil) -type _LatestSignalPrices_2_list struct { - list *[]*SignalPrice +type _LatestPrices_2_list struct { + list *[]*v1beta11.Price } -func (x *_LatestSignalPrices_2_list) Len() int { +func (x *_LatestPrices_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_LatestSignalPrices_2_list) Get(i int) protoreflect.Value { +func (x *_LatestPrices_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_LatestSignalPrices_2_list) Set(i int, value protoreflect.Value) { +func (x *_LatestPrices_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignalPrice) + concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) (*x.list)[i] = concreteValue } -func (x *_LatestSignalPrices_2_list) Append(value protoreflect.Value) { +func (x *_LatestPrices_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignalPrice) + concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) *x.list = append(*x.list, concreteValue) } -func (x *_LatestSignalPrices_2_list) AppendMutable() protoreflect.Value { - v := new(SignalPrice) +func (x *_LatestPrices_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta11.Price) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_LatestSignalPrices_2_list) Truncate(n int) { +func (x *_LatestPrices_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_LatestSignalPrices_2_list) NewElement() protoreflect.Value { - v := new(SignalPrice) +func (x *_LatestPrices_2_list) NewElement() protoreflect.Value { + v := new(v1beta11.Price) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_LatestSignalPrices_2_list) IsValid() bool { +func (x *_LatestPrices_2_list) IsValid() bool { return x.list != nil } var ( - md_LatestSignalPrices protoreflect.MessageDescriptor - fd_LatestSignalPrices_tunnel_id protoreflect.FieldDescriptor - fd_LatestSignalPrices_signal_prices protoreflect.FieldDescriptor - fd_LatestSignalPrices_last_interval protoreflect.FieldDescriptor + md_LatestPrices protoreflect.MessageDescriptor + fd_LatestPrices_tunnel_id protoreflect.FieldDescriptor + fd_LatestPrices_prices protoreflect.FieldDescriptor + fd_LatestPrices_last_interval protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tunnel_proto_init() - md_LatestSignalPrices = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestSignalPrices") - fd_LatestSignalPrices_tunnel_id = md_LatestSignalPrices.Fields().ByName("tunnel_id") - fd_LatestSignalPrices_signal_prices = md_LatestSignalPrices.Fields().ByName("signal_prices") - fd_LatestSignalPrices_last_interval = md_LatestSignalPrices.Fields().ByName("last_interval") + md_LatestPrices = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestPrices") + fd_LatestPrices_tunnel_id = md_LatestPrices.Fields().ByName("tunnel_id") + fd_LatestPrices_prices = md_LatestPrices.Fields().ByName("prices") + fd_LatestPrices_last_interval = md_LatestPrices.Fields().ByName("last_interval") } -var _ protoreflect.Message = (*fastReflection_LatestSignalPrices)(nil) +var _ protoreflect.Message = (*fastReflection_LatestPrices)(nil) -type fastReflection_LatestSignalPrices LatestSignalPrices +type fastReflection_LatestPrices LatestPrices -func (x *LatestSignalPrices) ProtoReflect() protoreflect.Message { - return (*fastReflection_LatestSignalPrices)(x) +func (x *LatestPrices) ProtoReflect() protoreflect.Message { + return (*fastReflection_LatestPrices)(x) } -func (x *LatestSignalPrices) slowProtoReflect() protoreflect.Message { +func (x *LatestPrices) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2842,43 +2843,43 @@ func (x *LatestSignalPrices) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_LatestSignalPrices_messageType fastReflection_LatestSignalPrices_messageType -var _ protoreflect.MessageType = fastReflection_LatestSignalPrices_messageType{} +var _fastReflection_LatestPrices_messageType fastReflection_LatestPrices_messageType +var _ protoreflect.MessageType = fastReflection_LatestPrices_messageType{} -type fastReflection_LatestSignalPrices_messageType struct{} +type fastReflection_LatestPrices_messageType struct{} -func (x fastReflection_LatestSignalPrices_messageType) Zero() protoreflect.Message { - return (*fastReflection_LatestSignalPrices)(nil) +func (x fastReflection_LatestPrices_messageType) Zero() protoreflect.Message { + return (*fastReflection_LatestPrices)(nil) } -func (x fastReflection_LatestSignalPrices_messageType) New() protoreflect.Message { - return new(fastReflection_LatestSignalPrices) +func (x fastReflection_LatestPrices_messageType) New() protoreflect.Message { + return new(fastReflection_LatestPrices) } -func (x fastReflection_LatestSignalPrices_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LatestSignalPrices +func (x fastReflection_LatestPrices_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LatestPrices } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_LatestSignalPrices) Descriptor() protoreflect.MessageDescriptor { - return md_LatestSignalPrices +func (x *fastReflection_LatestPrices) Descriptor() protoreflect.MessageDescriptor { + return md_LatestPrices } // 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_LatestSignalPrices) Type() protoreflect.MessageType { - return _fastReflection_LatestSignalPrices_messageType +func (x *fastReflection_LatestPrices) Type() protoreflect.MessageType { + return _fastReflection_LatestPrices_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_LatestSignalPrices) New() protoreflect.Message { - return new(fastReflection_LatestSignalPrices) +func (x *fastReflection_LatestPrices) New() protoreflect.Message { + return new(fastReflection_LatestPrices) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_LatestSignalPrices) Interface() protoreflect.ProtoMessage { - return (*LatestSignalPrices)(x) +func (x *fastReflection_LatestPrices) Interface() protoreflect.ProtoMessage { + return (*LatestPrices)(x) } // Range iterates over every populated field in an undefined order, @@ -2886,22 +2887,22 @@ func (x *fastReflection_LatestSignalPrices) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_LatestSignalPrices) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_LatestPrices) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TunnelId != uint64(0) { value := protoreflect.ValueOfUint64(x.TunnelId) - if !f(fd_LatestSignalPrices_tunnel_id, value) { + if !f(fd_LatestPrices_tunnel_id, value) { return } } - if len(x.SignalPrices) != 0 { - value := protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &x.SignalPrices}) - if !f(fd_LatestSignalPrices_signal_prices, value) { + if len(x.Prices) != 0 { + value := protoreflect.ValueOfList(&_LatestPrices_2_list{list: &x.Prices}) + if !f(fd_LatestPrices_prices, value) { return } } if x.LastInterval != int64(0) { value := protoreflect.ValueOfInt64(x.LastInterval) - if !f(fd_LatestSignalPrices_last_interval, value) { + if !f(fd_LatestPrices_last_interval, value) { return } } @@ -2918,19 +2919,19 @@ func (x *fastReflection_LatestSignalPrices) Range(f func(protoreflect.FieldDescr // 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_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_LatestPrices) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": return x.TunnelId != uint64(0) - case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": - return len(x.SignalPrices) != 0 - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + case "band.tunnel.v1beta1.LatestPrices.prices": + return len(x.Prices) != 0 + case "band.tunnel.v1beta1.LatestPrices.last_interval": return x.LastInterval != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) } } @@ -2940,19 +2941,19 @@ func (x *fastReflection_LatestSignalPrices) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LatestSignalPrices) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_LatestPrices) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": x.TunnelId = uint64(0) - case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": - x.SignalPrices = nil - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + case "band.tunnel.v1beta1.LatestPrices.prices": + x.Prices = nil + case "band.tunnel.v1beta1.LatestPrices.last_interval": x.LastInterval = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) } } @@ -2962,25 +2963,25 @@ func (x *fastReflection_LatestSignalPrices) Clear(fd protoreflect.FieldDescripto // 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_LatestSignalPrices) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LatestPrices) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": - if len(x.SignalPrices) == 0 { - return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{}) + case "band.tunnel.v1beta1.LatestPrices.prices": + if len(x.Prices) == 0 { + return protoreflect.ValueOfList(&_LatestPrices_2_list{}) } - listValue := &_LatestSignalPrices_2_list{list: &x.SignalPrices} + listValue := &_LatestPrices_2_list{list: &x.Prices} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + case "band.tunnel.v1beta1.LatestPrices.last_interval": value := x.LastInterval return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", descriptor.FullName())) } } @@ -2994,21 +2995,21 @@ func (x *fastReflection_LatestSignalPrices) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_LatestPrices) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": x.TunnelId = value.Uint() - case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": + case "band.tunnel.v1beta1.LatestPrices.prices": lv := value.List() - clv := lv.(*_LatestSignalPrices_2_list) - x.SignalPrices = *clv.list - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + clv := lv.(*_LatestPrices_2_list) + x.Prices = *clv.list + case "band.tunnel.v1beta1.LatestPrices.last_interval": x.LastInterval = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) } } @@ -3022,53 +3023,53 @@ func (x *fastReflection_LatestSignalPrices) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LatestSignalPrices) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LatestPrices) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": - if x.SignalPrices == nil { - x.SignalPrices = []*SignalPrice{} + case "band.tunnel.v1beta1.LatestPrices.prices": + if x.Prices == nil { + x.Prices = []*v1beta11.Price{} } - value := &_LatestSignalPrices_2_list{list: &x.SignalPrices} + value := &_LatestPrices_2_list{list: &x.Prices} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": - panic(fmt.Errorf("field last_interval of message band.tunnel.v1beta1.LatestSignalPrices is not mutable")) + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.LatestPrices is not mutable")) + case "band.tunnel.v1beta1.LatestPrices.last_interval": + panic(fmt.Errorf("field last_interval of message band.tunnel.v1beta1.LatestPrices is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices 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_LatestSignalPrices) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LatestPrices) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestSignalPrices.tunnel_id": + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.LatestSignalPrices.signal_prices": - list := []*SignalPrice{} - return protoreflect.ValueOfList(&_LatestSignalPrices_2_list{list: &list}) - case "band.tunnel.v1beta1.LatestSignalPrices.last_interval": + case "band.tunnel.v1beta1.LatestPrices.prices": + list := []*v1beta11.Price{} + return protoreflect.ValueOfList(&_LatestPrices_2_list{list: &list}) + case "band.tunnel.v1beta1.LatestPrices.last_interval": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestSignalPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestSignalPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices 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_LatestSignalPrices) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_LatestPrices) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.LatestSignalPrices", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.LatestPrices", d.FullName())) } panic("unreachable") } @@ -3076,7 +3077,7 @@ func (x *fastReflection_LatestSignalPrices) WhichOneof(d protoreflect.OneofDescr // 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_LatestSignalPrices) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_LatestPrices) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3087,7 +3088,7 @@ func (x *fastReflection_LatestSignalPrices) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LatestSignalPrices) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_LatestPrices) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3099,7 +3100,7 @@ func (x *fastReflection_LatestSignalPrices) SetUnknown(fields protoreflect.RawFi // 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_LatestSignalPrices) IsValid() bool { +func (x *fastReflection_LatestPrices) IsValid() bool { return x != nil } @@ -3109,9 +3110,9 @@ func (x *fastReflection_LatestSignalPrices) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LatestSignalPrices) + x := input.Message.Interface().(*LatestPrices) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3126,8 +3127,8 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { if x.TunnelId != 0 { n += 1 + runtime.Sov(uint64(x.TunnelId)) } - if len(x.SignalPrices) > 0 { - for _, e := range x.SignalPrices { + if len(x.Prices) > 0 { + for _, e := range x.Prices { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } @@ -3145,7 +3146,7 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*LatestSignalPrices) + x := input.Message.Interface().(*LatestPrices) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3169,9 +3170,9 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x18 } - if len(x.SignalPrices) > 0 { - for iNdEx := len(x.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SignalPrices[iNdEx]) + if len(x.Prices) > 0 { + for iNdEx := len(x.Prices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Prices[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3201,7 +3202,7 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*LatestSignalPrices) + x := input.Message.Interface().(*LatestPrices) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3233,10 +3234,10 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestSignalPrices: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestPrices: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestSignalPrices: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestPrices: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3260,7 +3261,7 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { } case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3287,8 +3288,8 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.SignalPrices = append(x.SignalPrices, &SignalPrice{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalPrices[len(x.SignalPrices)-1]); err != nil { + x.Prices = append(x.Prices, &v1beta11.Price{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Prices[len(x.Prices)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -3346,474 +3347,6 @@ func (x *fastReflection_LatestSignalPrices) ProtoMethods() *protoiface.Methods { } } -var ( - md_SignalPrice protoreflect.MessageDescriptor - fd_SignalPrice_signal_id protoreflect.FieldDescriptor - fd_SignalPrice_price protoreflect.FieldDescriptor -) - -func init() { - file_band_tunnel_v1beta1_tunnel_proto_init() - md_SignalPrice = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalPrice") - fd_SignalPrice_signal_id = md_SignalPrice.Fields().ByName("signal_id") - fd_SignalPrice_price = md_SignalPrice.Fields().ByName("price") -} - -var _ protoreflect.Message = (*fastReflection_SignalPrice)(nil) - -type fastReflection_SignalPrice SignalPrice - -func (x *SignalPrice) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignalPrice)(x) -} - -func (x *SignalPrice) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] - 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_SignalPrice_messageType fastReflection_SignalPrice_messageType -var _ protoreflect.MessageType = fastReflection_SignalPrice_messageType{} - -type fastReflection_SignalPrice_messageType struct{} - -func (x fastReflection_SignalPrice_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignalPrice)(nil) -} -func (x fastReflection_SignalPrice_messageType) New() protoreflect.Message { - return new(fastReflection_SignalPrice) -} -func (x fastReflection_SignalPrice_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignalPrice -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignalPrice) Descriptor() protoreflect.MessageDescriptor { - return md_SignalPrice -} - -// 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_SignalPrice) Type() protoreflect.MessageType { - return _fastReflection_SignalPrice_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignalPrice) New() protoreflect.Message { - return new(fastReflection_SignalPrice) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignalPrice) Interface() protoreflect.ProtoMessage { - return (*SignalPrice)(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_SignalPrice) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SignalId != "" { - value := protoreflect.ValueOfString(x.SignalId) - if !f(fd_SignalPrice_signal_id, value) { - return - } - } - if x.Price != uint64(0) { - value := protoreflect.ValueOfUint64(x.Price) - if !f(fd_SignalPrice_price, 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_SignalPrice) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "band.tunnel.v1beta1.SignalPrice.signal_id": - return x.SignalId != "" - case "band.tunnel.v1beta1.SignalPrice.price": - return x.Price != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice 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_SignalPrice) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "band.tunnel.v1beta1.SignalPrice.signal_id": - x.SignalId = "" - case "band.tunnel.v1beta1.SignalPrice.price": - x.Price = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice 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_SignalPrice) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "band.tunnel.v1beta1.SignalPrice.signal_id": - value := x.SignalId - return protoreflect.ValueOfString(value) - case "band.tunnel.v1beta1.SignalPrice.price": - value := x.Price - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice 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_SignalPrice) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "band.tunnel.v1beta1.SignalPrice.signal_id": - x.SignalId = value.Interface().(string) - case "band.tunnel.v1beta1.SignalPrice.price": - x.Price = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice 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_SignalPrice) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.tunnel.v1beta1.SignalPrice.signal_id": - panic(fmt.Errorf("field signal_id of message band.tunnel.v1beta1.SignalPrice is not mutable")) - case "band.tunnel.v1beta1.SignalPrice.price": - panic(fmt.Errorf("field price of message band.tunnel.v1beta1.SignalPrice is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice 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_SignalPrice) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.tunnel.v1beta1.SignalPrice.signal_id": - return protoreflect.ValueOfString("") - case "band.tunnel.v1beta1.SignalPrice.price": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalPrice")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalPrice 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_SignalPrice) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.SignalPrice", 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_SignalPrice) 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_SignalPrice) 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_SignalPrice) 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_SignalPrice) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignalPrice) - 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.SignalId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Price != 0 { - n += 1 + runtime.Sov(uint64(x.Price)) - } - 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().(*SignalPrice) - 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 x.Price != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Price)) - i-- - dAtA[i] = 0x10 - } - if len(x.SignalId) > 0 { - i -= len(x.SignalId) - copy(dAtA[i:], x.SignalId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignalId))) - 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().(*SignalPrice) - 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: SignalPrice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignalPrice: 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 SignalId", 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.SignalId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) - } - x.Price = 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.Price |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 _ protoreflect.List = (*_TotalFees_1_list)(nil) type _TotalFees_1_list struct { @@ -3885,7 +3418,7 @@ func (x *TotalFees) ProtoReflect() protoreflect.Message { } func (x *TotalFees) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4311,7 +3844,7 @@ func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { var _ protoreflect.List = (*_Packet_3_list)(nil) type _Packet_3_list struct { - list *[]*SignalPrice + list *[]*v1beta11.Price } func (x *_Packet_3_list) Len() int { @@ -4327,18 +3860,18 @@ func (x *_Packet_3_list) Get(i int) protoreflect.Value { func (x *_Packet_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignalPrice) + concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) (*x.list)[i] = concreteValue } func (x *_Packet_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignalPrice) + concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) *x.list = append(*x.list, concreteValue) } func (x *_Packet_3_list) AppendMutable() protoreflect.Value { - v := new(SignalPrice) + v := new(v1beta11.Price) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -4351,7 +3884,7 @@ func (x *_Packet_3_list) Truncate(n int) { } func (x *_Packet_3_list) NewElement() protoreflect.Value { - v := new(SignalPrice) + v := new(v1beta11.Price) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -4465,7 +3998,7 @@ var ( md_Packet protoreflect.MessageDescriptor fd_Packet_tunnel_id protoreflect.FieldDescriptor fd_Packet_sequence protoreflect.FieldDescriptor - fd_Packet_signal_prices protoreflect.FieldDescriptor + fd_Packet_prices protoreflect.FieldDescriptor fd_Packet_packet_content protoreflect.FieldDescriptor fd_Packet_base_fee protoreflect.FieldDescriptor fd_Packet_route_fee protoreflect.FieldDescriptor @@ -4477,7 +4010,7 @@ func init() { md_Packet = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Packet") fd_Packet_tunnel_id = md_Packet.Fields().ByName("tunnel_id") fd_Packet_sequence = md_Packet.Fields().ByName("sequence") - fd_Packet_signal_prices = md_Packet.Fields().ByName("signal_prices") + fd_Packet_prices = md_Packet.Fields().ByName("prices") fd_Packet_packet_content = md_Packet.Fields().ByName("packet_content") fd_Packet_base_fee = md_Packet.Fields().ByName("base_fee") fd_Packet_route_fee = md_Packet.Fields().ByName("route_fee") @@ -4493,7 +4026,7 @@ func (x *Packet) ProtoReflect() protoreflect.Message { } func (x *Packet) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4561,9 +4094,9 @@ func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, proto return } } - if len(x.SignalPrices) != 0 { - value := protoreflect.ValueOfList(&_Packet_3_list{list: &x.SignalPrices}) - if !f(fd_Packet_signal_prices, value) { + if len(x.Prices) != 0 { + value := protoreflect.ValueOfList(&_Packet_3_list{list: &x.Prices}) + if !f(fd_Packet_prices, value) { return } } @@ -4610,8 +4143,8 @@ func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { return x.TunnelId != uint64(0) case "band.tunnel.v1beta1.Packet.sequence": return x.Sequence != uint64(0) - case "band.tunnel.v1beta1.Packet.signal_prices": - return len(x.SignalPrices) != 0 + case "band.tunnel.v1beta1.Packet.prices": + return len(x.Prices) != 0 case "band.tunnel.v1beta1.Packet.packet_content": return x.PacketContent != nil case "band.tunnel.v1beta1.Packet.base_fee": @@ -4640,8 +4173,8 @@ func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { x.TunnelId = uint64(0) case "band.tunnel.v1beta1.Packet.sequence": x.Sequence = uint64(0) - case "band.tunnel.v1beta1.Packet.signal_prices": - x.SignalPrices = nil + case "band.tunnel.v1beta1.Packet.prices": + x.Prices = nil case "band.tunnel.v1beta1.Packet.packet_content": x.PacketContent = nil case "band.tunnel.v1beta1.Packet.base_fee": @@ -4672,11 +4205,11 @@ func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) pro case "band.tunnel.v1beta1.Packet.sequence": value := x.Sequence return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.Packet.signal_prices": - if len(x.SignalPrices) == 0 { + case "band.tunnel.v1beta1.Packet.prices": + if len(x.Prices) == 0 { return protoreflect.ValueOfList(&_Packet_3_list{}) } - listValue := &_Packet_3_list{list: &x.SignalPrices} + listValue := &_Packet_3_list{list: &x.Prices} return protoreflect.ValueOfList(listValue) case "band.tunnel.v1beta1.Packet.packet_content": value := x.PacketContent @@ -4720,10 +4253,10 @@ func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value proto x.TunnelId = value.Uint() case "band.tunnel.v1beta1.Packet.sequence": x.Sequence = value.Uint() - case "band.tunnel.v1beta1.Packet.signal_prices": + case "band.tunnel.v1beta1.Packet.prices": lv := value.List() clv := lv.(*_Packet_3_list) - x.SignalPrices = *clv.list + x.Prices = *clv.list case "band.tunnel.v1beta1.Packet.packet_content": x.PacketContent = value.Message().Interface().(*anypb.Any) case "band.tunnel.v1beta1.Packet.base_fee": @@ -4756,11 +4289,11 @@ func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.Packet.signal_prices": - if x.SignalPrices == nil { - x.SignalPrices = []*SignalPrice{} + case "band.tunnel.v1beta1.Packet.prices": + if x.Prices == nil { + x.Prices = []*v1beta11.Price{} } - value := &_Packet_3_list{list: &x.SignalPrices} + value := &_Packet_3_list{list: &x.Prices} return protoreflect.ValueOfList(value) case "band.tunnel.v1beta1.Packet.packet_content": if x.PacketContent == nil { @@ -4802,8 +4335,8 @@ func (x *fastReflection_Packet) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfUint64(uint64(0)) case "band.tunnel.v1beta1.Packet.sequence": return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.Packet.signal_prices": - list := []*SignalPrice{} + case "band.tunnel.v1beta1.Packet.prices": + list := []*v1beta11.Price{} return protoreflect.ValueOfList(&_Packet_3_list{list: &list}) case "band.tunnel.v1beta1.Packet.packet_content": m := new(anypb.Any) @@ -4891,8 +4424,8 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { if x.Sequence != 0 { n += 1 + runtime.Sov(uint64(x.Sequence)) } - if len(x.SignalPrices) > 0 { - for _, e := range x.SignalPrices { + if len(x.Prices) > 0 { + for _, e := range x.Prices { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } @@ -4996,9 +4529,9 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } - if len(x.SignalPrices) > 0 { - for iNdEx := len(x.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SignalPrices[iNdEx]) + if len(x.Prices) > 0 { + for iNdEx := len(x.Prices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Prices[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5111,7 +4644,7 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { } case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5138,8 +4671,8 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.SignalPrices = append(x.SignalPrices, &SignalPrice{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalPrices[len(x.SignalPrices)-1]); err != nil { + x.Prices = append(x.Prices, &v1beta11.Price{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Prices[len(x.Prices)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -5325,7 +4858,7 @@ func (x *TSSPacketContent) ProtoReflect() protoreflect.Message { } func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[8] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5846,59 +5379,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Encoder is an enumerator that defines the mode of encoding message in tunnel module. -type Encoder int32 - -const ( - // ENCODER_UNSPECIFIED is an unspecified encoder mode. - Encoder_ENCODER_UNSPECIFIED Encoder = 0 - // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). - Encoder_ENCODER_FIXED_POINT_ABI Encoder = 1 - // ENCODER_TICK_ABI is a tick abi encoder. - Encoder_ENCODER_TICK_ABI Encoder = 2 -) - -// Enum value maps for Encoder. -var ( - Encoder_name = map[int32]string{ - 0: "ENCODER_UNSPECIFIED", - 1: "ENCODER_FIXED_POINT_ABI", - 2: "ENCODER_TICK_ABI", - } - Encoder_value = map[string]int32{ - "ENCODER_UNSPECIFIED": 0, - "ENCODER_FIXED_POINT_ABI": 1, - "ENCODER_TICK_ABI": 2, - } -) - -func (x Encoder) Enum() *Encoder { - p := new(Encoder) - *p = x - return p -} - -func (x Encoder) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Encoder) Descriptor() protoreflect.EnumDescriptor { - return file_band_tunnel_v1beta1_tunnel_proto_enumTypes[0].Descriptor() -} - -func (Encoder) Type() protoreflect.EnumType { - return &file_band_tunnel_v1beta1_tunnel_proto_enumTypes[0] -} - -func (x Encoder) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Encoder.Descriptor instead. -func (Encoder) EnumDescriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} -} - // TSSRoute is the type for a TSS route type TSSRoute struct { state protoimpl.MessageState @@ -6068,7 +5548,7 @@ type Tunnel struct { // route is the route for delivering the signal prices Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder v1beta11.Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.feeds.v1beta1.Encoder" json:"encoder,omitempty"` // fee_payer is the address of the fee payer FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` // signal_deviations is the list of signal deviations @@ -6126,11 +5606,11 @@ func (x *Tunnel) GetRoute() *anypb.Any { return nil } -func (x *Tunnel) GetEncoder() Encoder { +func (x *Tunnel) GetEncoder() v1beta11.Encoder { if x != nil { return x.Encoder } - return Encoder_ENCODER_UNSPECIFIED + return v1beta11.Encoder(0) } func (x *Tunnel) GetFeePayer() string { @@ -6182,22 +5662,22 @@ func (x *Tunnel) GetCreator() string { return "" } -// LatestSignalPrices is the type for signal prices that tunnel produces -type LatestSignalPrices struct { +// LatestPrices is the type for prices that tunnel produces +type LatestPrices struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // tunnel_id is the tunnel ID TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // signal_prices is the list of signal prices - SignalPrices []*SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` + // prices is the list of prices information from feeds module. + Prices []*v1beta11.Price `protobuf:"bytes,2,rep,name=prices,proto3" json:"prices,omitempty"` // last_interval is the last interval when the signal prices are produced by interval trigger LastInterval int64 `protobuf:"varint,3,opt,name=last_interval,json=lastInterval,proto3" json:"last_interval,omitempty"` } -func (x *LatestSignalPrices) Reset() { - *x = LatestSignalPrices{} +func (x *LatestPrices) Reset() { + *x = LatestPrices{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -6205,84 +5685,38 @@ func (x *LatestSignalPrices) Reset() { } } -func (x *LatestSignalPrices) String() string { +func (x *LatestPrices) String() string { return protoimpl.X.MessageStringOf(x) } -func (*LatestSignalPrices) ProtoMessage() {} +func (*LatestPrices) ProtoMessage() {} -// Deprecated: Use LatestSignalPrices.ProtoReflect.Descriptor instead. -func (*LatestSignalPrices) Descriptor() ([]byte, []int) { +// Deprecated: Use LatestPrices.ProtoReflect.Descriptor instead. +func (*LatestPrices) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{4} } -func (x *LatestSignalPrices) GetTunnelId() uint64 { +func (x *LatestPrices) GetTunnelId() uint64 { if x != nil { return x.TunnelId } return 0 } -func (x *LatestSignalPrices) GetSignalPrices() []*SignalPrice { +func (x *LatestPrices) GetPrices() []*v1beta11.Price { if x != nil { - return x.SignalPrices + return x.Prices } return nil } -func (x *LatestSignalPrices) GetLastInterval() int64 { +func (x *LatestPrices) GetLastInterval() int64 { if x != nil { return x.LastInterval } return 0 } -// SignalPrice is the type for a signal price -type SignalPrice struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // signal_id is the signal ID - SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - // price is the price of the signal - Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` -} - -func (x *SignalPrice) Reset() { - *x = SignalPrice{} - if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignalPrice) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignalPrice) ProtoMessage() {} - -// Deprecated: Use SignalPrice.ProtoReflect.Descriptor instead. -func (*SignalPrice) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{5} -} - -func (x *SignalPrice) GetSignalId() string { - if x != nil { - return x.SignalId - } - return "" -} - -func (x *SignalPrice) GetPrice() uint64 { - if x != nil { - return x.Price - } - return 0 -} - // TotalFees is the type for the total fees collected by the tunnel type TotalFees struct { state protoimpl.MessageState @@ -6296,7 +5730,7 @@ type TotalFees struct { func (x *TotalFees) Reset() { *x = TotalFees{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6310,7 +5744,7 @@ func (*TotalFees) ProtoMessage() {} // Deprecated: Use TotalFees.ProtoReflect.Descriptor instead. func (*TotalFees) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{6} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{5} } func (x *TotalFees) GetTotalPacketFee() []*v1beta1.Coin { @@ -6330,8 +5764,8 @@ type Packet struct { TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // sequence is representing the sequence of the tunnel packet. Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` - // signal_prices is the list of signal prices - SignalPrices []*SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices,omitempty"` + // prices is the list of prices information from feeds module. + Prices []*v1beta11.Price `protobuf:"bytes,3,rep,name=prices,proto3" json:"prices,omitempty"` // packet_content is the content of the packet that implements PacketContentI PacketContent *anypb.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` // base_fee is the base fee of the packet @@ -6345,7 +5779,7 @@ type Packet struct { func (x *Packet) Reset() { *x = Packet{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6359,7 +5793,7 @@ func (*Packet) ProtoMessage() {} // Deprecated: Use Packet.ProtoReflect.Descriptor instead. func (*Packet) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{7} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{6} } func (x *Packet) GetTunnelId() uint64 { @@ -6376,9 +5810,9 @@ func (x *Packet) GetSequence() uint64 { return 0 } -func (x *Packet) GetSignalPrices() []*SignalPrice { +func (x *Packet) GetPrices() []*v1beta11.Price { if x != nil { - return x.SignalPrices + return x.Prices } return nil } @@ -6428,7 +5862,7 @@ type TSSPacketContent struct { func (x *TSSPacketContent) Reset() { *x = TSSPacketContent{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[8] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6442,7 +5876,7 @@ func (*TSSPacketContent) ProtoMessage() {} // Deprecated: Use TSSPacketContent.ProtoReflect.Descriptor instead. func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{8} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{7} } func (x *TSSPacketContent) GetSigningId() uint64 { @@ -6480,6 +5914,8 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x1e, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, @@ -6517,143 +5953,124 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc5, 0x04, 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e, + 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc4, 0x04, 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x06, 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, 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, 0x0a, 0xca, 0xb4, 0x2d, - 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x36, + 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, - 0x79, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x08, 0x66, 0x65, 0x65, 0x50, 0x61, 0x79, 0x65, 0x72, 0x12, 0x57, 0x0a, - 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x18, 0x08, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, - 0xb7, 0x01, 0x0a, 0x12, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x64, 0x12, 0x4b, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x23, - 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x54, 0x0a, 0x0b, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, - 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, - 0x88, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, - 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, - 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, 0x79, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x08, 0x66, 0x65, 0x65, 0x50, 0x61, 0x79, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x11, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x18, 0x08, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x9d, + 0x01, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, + 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, + 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x88, + 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, + 0x18, 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, + 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, 0x03, 0x0a, 0x06, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, + 0x65, 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xde, 0x03, 0x0a, 0x06, 0x50, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0d, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x62, 0x61, - 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, - 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x46, - 0x65, 0x65, 0x12, 0x68, 0x0a, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, - 0x06, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, - 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, - 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, - 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x2a, 0xa7, 0x01, 0x0a, - 0x07, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x45, 0x4e, 0x43, 0x4f, - 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x1a, 0x17, 0x8a, 0x9d, 0x20, 0x13, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x45, 0x4e, - 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, - 0x54, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x01, 0x1a, 0x1b, 0x8a, 0x9d, 0x20, 0x17, 0x45, 0x4e, 0x43, - 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, - 0x5f, 0x41, 0x42, 0x49, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, - 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, 0x10, 0x02, 0x1a, 0x14, 0x8a, 0x9d, 0x20, 0x10, - 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x43, 0x4b, 0x5f, 0x41, 0x42, 0x49, - 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, - 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, - 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, - 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x68, 0x0a, + 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x08, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, + 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, + 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, + 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, + 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -6668,34 +6085,33 @@ func file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP() []byte { return file_band_tunnel_v1beta1_tunnel_proto_rawDescData } -var file_band_tunnel_v1beta1_tunnel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_band_tunnel_v1beta1_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_band_tunnel_v1beta1_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_band_tunnel_v1beta1_tunnel_proto_goTypes = []interface{}{ - (Encoder)(0), // 0: band.tunnel.v1beta1.Encoder - (*TSSRoute)(nil), // 1: band.tunnel.v1beta1.TSSRoute - (*SignalDeviation)(nil), // 2: band.tunnel.v1beta1.SignalDeviation - (*Deposit)(nil), // 3: band.tunnel.v1beta1.Deposit - (*Tunnel)(nil), // 4: band.tunnel.v1beta1.Tunnel - (*LatestSignalPrices)(nil), // 5: band.tunnel.v1beta1.LatestSignalPrices - (*SignalPrice)(nil), // 6: band.tunnel.v1beta1.SignalPrice - (*TotalFees)(nil), // 7: band.tunnel.v1beta1.TotalFees - (*Packet)(nil), // 8: band.tunnel.v1beta1.Packet - (*TSSPacketContent)(nil), // 9: band.tunnel.v1beta1.TSSPacketContent - (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 11: google.protobuf.Any + (*TSSRoute)(nil), // 0: band.tunnel.v1beta1.TSSRoute + (*SignalDeviation)(nil), // 1: band.tunnel.v1beta1.SignalDeviation + (*Deposit)(nil), // 2: band.tunnel.v1beta1.Deposit + (*Tunnel)(nil), // 3: band.tunnel.v1beta1.Tunnel + (*LatestPrices)(nil), // 4: band.tunnel.v1beta1.LatestPrices + (*TotalFees)(nil), // 5: band.tunnel.v1beta1.TotalFees + (*Packet)(nil), // 6: band.tunnel.v1beta1.Packet + (*TSSPacketContent)(nil), // 7: band.tunnel.v1beta1.TSSPacketContent + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 9: google.protobuf.Any + (v1beta11.Encoder)(0), // 10: band.feeds.v1beta1.Encoder + (*v1beta11.Price)(nil), // 11: band.feeds.v1beta1.Price } var file_band_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ - 10, // 0: band.tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin - 11, // 1: band.tunnel.v1beta1.Tunnel.route:type_name -> google.protobuf.Any - 0, // 2: band.tunnel.v1beta1.Tunnel.encoder:type_name -> band.tunnel.v1beta1.Encoder - 2, // 3: band.tunnel.v1beta1.Tunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation - 10, // 4: band.tunnel.v1beta1.Tunnel.total_deposit:type_name -> cosmos.base.v1beta1.Coin - 6, // 5: band.tunnel.v1beta1.LatestSignalPrices.signal_prices:type_name -> band.tunnel.v1beta1.SignalPrice - 10, // 6: band.tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin - 6, // 7: band.tunnel.v1beta1.Packet.signal_prices:type_name -> band.tunnel.v1beta1.SignalPrice - 11, // 8: band.tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any - 10, // 9: band.tunnel.v1beta1.Packet.base_fee:type_name -> cosmos.base.v1beta1.Coin - 10, // 10: band.tunnel.v1beta1.Packet.route_fee:type_name -> cosmos.base.v1beta1.Coin + 8, // 0: band.tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin + 9, // 1: band.tunnel.v1beta1.Tunnel.route:type_name -> google.protobuf.Any + 10, // 2: band.tunnel.v1beta1.Tunnel.encoder:type_name -> band.feeds.v1beta1.Encoder + 1, // 3: band.tunnel.v1beta1.Tunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation + 8, // 4: band.tunnel.v1beta1.Tunnel.total_deposit:type_name -> cosmos.base.v1beta1.Coin + 11, // 5: band.tunnel.v1beta1.LatestPrices.prices:type_name -> band.feeds.v1beta1.Price + 8, // 6: band.tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin + 11, // 7: band.tunnel.v1beta1.Packet.prices:type_name -> band.feeds.v1beta1.Price + 9, // 8: band.tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any + 8, // 9: band.tunnel.v1beta1.Packet.base_fee:type_name -> cosmos.base.v1beta1.Coin + 8, // 10: band.tunnel.v1beta1.Packet.route_fee:type_name -> cosmos.base.v1beta1.Coin 11, // [11:11] is the sub-list for method output_type 11, // [11:11] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name @@ -6758,7 +6174,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { } } file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LatestSignalPrices); i { + switch v := v.(*LatestPrices); i { case 0: return &v.state case 1: @@ -6770,18 +6186,6 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { } } file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignalPrice); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TotalFees); i { case 0: return &v.state @@ -6793,7 +6197,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Packet); i { case 0: return &v.state @@ -6805,7 +6209,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { return nil } } - file_band_tunnel_v1beta1_tunnel_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TSSPacketContent); i { case 0: return &v.state @@ -6823,14 +6227,13 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_band_tunnel_v1beta1_tunnel_proto_rawDesc, - NumEnums: 1, - NumMessages: 9, + NumEnums: 0, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, GoTypes: file_band_tunnel_v1beta1_tunnel_proto_goTypes, DependencyIndexes: file_band_tunnel_v1beta1_tunnel_proto_depIdxs, - EnumInfos: file_band_tunnel_v1beta1_tunnel_proto_enumTypes, MessageInfos: file_band_tunnel_v1beta1_tunnel_proto_msgTypes, }.Build() File_band_tunnel_v1beta1_tunnel_proto = out.File diff --git a/api/band/tunnel/v1beta1/tx.pulsar.go b/api/band/tunnel/v1beta1/tx.pulsar.go index 504dfd2bd..bf16e33bc 100644 --- a/api/band/tunnel/v1beta1/tx.pulsar.go +++ b/api/band/tunnel/v1beta1/tx.pulsar.go @@ -6,6 +6,7 @@ import ( v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" + v1beta11 "github.com/bandprotocol/chain/v3/api/band/feeds/v1beta1" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -366,7 +367,7 @@ func (x *fastReflection_MsgCreateTunnel) Set(fd protoreflect.FieldDescriptor, va case "band.tunnel.v1beta1.MsgCreateTunnel.route": x.Route = value.Message().Interface().(*anypb.Any) case "band.tunnel.v1beta1.MsgCreateTunnel.encoder": - x.Encoder = (Encoder)(value.Enum()) + x.Encoder = (v1beta11.Encoder)(value.Enum()) case "band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit": lv := value.List() clv := lv.(*_MsgCreateTunnel_5_list) @@ -783,7 +784,7 @@ func (x *fastReflection_MsgCreateTunnel) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Encoder |= Encoder(b&0x7F) << shift + x.Encoder |= v1beta11.Encoder(b&0x7F) << shift if b < 0x80 { break } @@ -7580,7 +7581,7 @@ type MsgCreateTunnel struct { // route is the route for delivering the signal prices Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder v1beta11.Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.feeds.v1beta1.Encoder" json:"encoder,omitempty"` // initial_deposit is the deposit value that must be paid at tunnel creation. InitialDeposit []*v1beta1.Coin `protobuf:"bytes,5,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"` // creator is the address of the creator. @@ -7628,11 +7629,11 @@ func (x *MsgCreateTunnel) GetRoute() *anypb.Any { return nil } -func (x *MsgCreateTunnel) GetEncoder() Encoder { +func (x *MsgCreateTunnel) GetEncoder() v1beta11.Encoder { if x != nil { return x.Encoder } - return Encoder_ENCODER_UNSPECIFIED + return v1beta11.Encoder(0) } func (x *MsgCreateTunnel) GetInitialDeposit() []*v1beta1.Coin { @@ -8248,12 +8249,14 @@ var file_band_tunnel_v1beta1_tx_proto_rawDesc = []byte{ 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 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, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, - 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, 0x61, 0x6e, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x62, 0x61, 0x6e, + 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xcd, 0x03, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, + 0xcc, 0x03, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x57, 0x0a, 0x11, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, @@ -8265,203 +8268,203 @@ var file_band_tunnel_v1beta1_tx_proto_rawDesc = []byte{ 0x65, 0x18, 0x03, 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, 0x09, 0xca, 0xb4, 0x2d, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, - 0x36, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, - 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x27, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, - 0x44, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, - 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x9e, 0x02, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x35, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x79, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x05, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x4d, 0x73, - 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x27, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, + 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x44, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, + 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x22, 0x9e, 0x02, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, + 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x57, 0x0a, 0x11, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, 0x13, + 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4d, + 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x15, 0x0a, - 0x13, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x25, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x17, 0x0a, 0x15, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, - 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, - 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xa1, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x03, 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, 0x35, - 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, - 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xaa, 0x02, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, - 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x3a, 0x30, 0x82, 0xe7, - 0xb0, 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, - 0x2a, 0x1c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1f, - 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, - 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xaf, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x06, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x12, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x34, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, - 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x12, 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, - 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, + 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x28, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa1, + 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, + 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, 0x35, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, + 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xaa, 0x02, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, + 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x3a, 0x30, 0x82, 0xe7, 0xb0, + 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, + 0x1c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1f, 0x0a, + 0x1d, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, + 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x2a, - 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x54, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2f, 0x2e, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x06, 0x0a, 0x03, + 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, + 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x34, 0x2e, + 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, + 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, 0x44, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, - 0x0a, 0x12, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x1a, 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, - 0xd8, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, - 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x6b, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2f, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, + 0x12, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, + 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd8, + 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, + 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, + 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, + 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -8496,14 +8499,14 @@ var file_band_tunnel_v1beta1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParamsResponse)(nil), // 15: band.tunnel.v1beta1.MsgUpdateParamsResponse (*SignalDeviation)(nil), // 16: band.tunnel.v1beta1.SignalDeviation (*anypb.Any)(nil), // 17: google.protobuf.Any - (Encoder)(0), // 18: band.tunnel.v1beta1.Encoder + (v1beta11.Encoder)(0), // 18: band.feeds.v1beta1.Encoder (*v1beta1.Coin)(nil), // 19: cosmos.base.v1beta1.Coin (*Params)(nil), // 20: band.tunnel.v1beta1.Params } var file_band_tunnel_v1beta1_tx_proto_depIdxs = []int32{ 16, // 0: band.tunnel.v1beta1.MsgCreateTunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation 17, // 1: band.tunnel.v1beta1.MsgCreateTunnel.route:type_name -> google.protobuf.Any - 18, // 2: band.tunnel.v1beta1.MsgCreateTunnel.encoder:type_name -> band.tunnel.v1beta1.Encoder + 18, // 2: band.tunnel.v1beta1.MsgCreateTunnel.encoder:type_name -> band.feeds.v1beta1.Encoder 19, // 3: band.tunnel.v1beta1.MsgCreateTunnel.initial_deposit:type_name -> cosmos.base.v1beta1.Coin 16, // 4: band.tunnel.v1beta1.MsgUpdateAndResetTunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation 19, // 5: band.tunnel.v1beta1.MsgDepositToTunnel.amount:type_name -> cosmos.base.v1beta1.Coin diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go index 6fb8a9019..f4b1efc45 100644 --- a/benchmark/tunnel_bench_test.go +++ b/benchmark/tunnel_bench_test.go @@ -22,18 +22,18 @@ func BenchmarkTunnelABCI(b *testing.B) { numTunnels int numSignals int maxSignals int - encoderType types.Encoder + encoderType feedstypes.Encoder }{ - {1, 1, 1, types.ENCODER_FIXED_POINT_ABI}, - {1, 100, 100, types.ENCODER_FIXED_POINT_ABI}, - {10, 10, 100, types.ENCODER_FIXED_POINT_ABI}, - {10, 100, 100, types.ENCODER_FIXED_POINT_ABI}, - {100, 100, 100, types.ENCODER_FIXED_POINT_ABI}, - {1, 1, 1, types.ENCODER_TICK_ABI}, - {1, 100, 100, types.ENCODER_TICK_ABI}, - {10, 10, 100, types.ENCODER_TICK_ABI}, - {10, 100, 100, types.ENCODER_TICK_ABI}, - {100, 100, 100, types.ENCODER_TICK_ABI}, + {1, 1, 1, feedstypes.ENCODER_FIXED_POINT_ABI}, + {1, 100, 100, feedstypes.ENCODER_FIXED_POINT_ABI}, + {10, 10, 100, feedstypes.ENCODER_FIXED_POINT_ABI}, + {10, 100, 100, feedstypes.ENCODER_FIXED_POINT_ABI}, + {100, 100, 100, feedstypes.ENCODER_FIXED_POINT_ABI}, + {1, 1, 1, feedstypes.ENCODER_TICK_ABI}, + {1, 100, 100, feedstypes.ENCODER_TICK_ABI}, + {10, 10, 100, feedstypes.ENCODER_TICK_ABI}, + {10, 100, 100, feedstypes.ENCODER_TICK_ABI}, + {100, 100, 100, feedstypes.ENCODER_TICK_ABI}, } for _, tc := range testcases { @@ -47,10 +47,10 @@ func BenchmarkTunnelABCI(b *testing.B) { } // testBenchmarkTunnel is a helper function to benchmark tunnel endblock process. -func testBenchmarkTunnel(numTunnels, numSignals, maxSignals int, encoder types.Encoder) func(b *testing.B) { +func testBenchmarkTunnel(numTunnels, numSignals, maxSignals int, encoder feedstypes.Encoder) func(b *testing.B) { return func(b *testing.B) { require.GreaterOrEqual(b, maxSignals, numSignals) - require.NotEqual(b, types.ENCODER_UNSPECIFIED, encoder) + require.NotEqual(b, feedstypes.ENCODER_UNSPECIFIED, encoder) ba := InitializeBenchmarkApp(b, -1) @@ -122,7 +122,7 @@ func createNewTunnels( ba *BenchmarkApp, route types.RouteI, signalDeviations []types.SignalDeviation, - encoder types.Encoder, + encoder feedstypes.Encoder, ) error { creator := bandtesting.Alice.Address tunnel, err := ba.TunnelKeeper.AddTunnel( diff --git a/proto/band/tunnel/v1beta1/genesis.proto b/proto/band/tunnel/v1beta1/genesis.proto index a5c9fe1de..645a8511d 100644 --- a/proto/band/tunnel/v1beta1/genesis.proto +++ b/proto/band/tunnel/v1beta1/genesis.proto @@ -16,10 +16,8 @@ message GenesisState { uint64 tunnel_count = 2; // tunnels is the list of tunnels. repeated Tunnel tunnels = 3 [(gogoproto.nullable) = false]; - // latest_signal_prices_list is the list of latest signal prices. - repeated LatestSignalPrices latest_signal_prices_list = 4 [(gogoproto.nullable) = false]; // deposits is the list of deposits. - repeated Deposit deposits = 5 [(gogoproto.nullable) = false]; + repeated Deposit deposits = 4 [(gogoproto.nullable) = false]; // total_fees is the type for the total fees collected by the tunnel - TotalFees total_fees = 6 [(gogoproto.nullable) = false]; + TotalFees total_fees = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index 062583c96..d183512f1 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -7,6 +7,8 @@ import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; +import "band/feeds/v1beta1/feeds.proto"; + option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; option (gogoproto.equal_all) = true; @@ -59,7 +61,7 @@ message Tunnel { // route is the route for delivering the signal prices google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "RouteI"]; // encoder is the mode of encoding price signal data. - Encoder encoder = 4; + band.feeds.v1beta1.Encoder encoder = 4; // fee_payer is the address of the fee payer string fee_payer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // signal_deviations is the list of signal deviations @@ -80,28 +82,18 @@ message Tunnel { string creator = 11 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// LatestSignalPrices is the type for signal prices that tunnel produces -message LatestSignalPrices { +// LatestPrices is the type for prices that tunnel produces +message LatestPrices { option (gogoproto.equal) = true; // tunnel_id is the tunnel ID uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - // signal_prices is the list of signal prices - repeated SignalPrice signal_prices = 2 [(gogoproto.nullable) = false]; + // prices is the list of prices information from feeds module. + repeated band.feeds.v1beta1.Price prices = 2 [(gogoproto.nullable) = false]; // last_interval is the last interval when the signal prices are produced by interval trigger int64 last_interval = 3; } -// SignalPrice is the type for a signal price -message SignalPrice { - option (gogoproto.equal) = true; - - // signal_id is the signal ID - string signal_id = 1 [(gogoproto.customname) = "SignalID"]; - // price is the price of the signal - uint64 price = 2; -} - // TotalFees is the type for the total fees collected by the tunnel message TotalFees { option (gogoproto.equal) = true; @@ -117,8 +109,8 @@ message Packet { uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // sequence is representing the sequence of the tunnel packet. uint64 sequence = 2; - // signal_prices is the list of signal prices - repeated SignalPrice signal_prices = 3 [(gogoproto.nullable) = false]; + // prices is the list of prices information from feeds module. + repeated band.feeds.v1beta1.Price prices = 3 [(gogoproto.nullable) = false]; // packet_content is the content of the packet that implements PacketContentI google.protobuf.Any packet_content = 4 [(cosmos_proto.accepts_interface) = "PacketContentI"]; // base_fee is the base fee of the packet @@ -145,17 +137,3 @@ message TSSPacketContent { // destination_contract_address is the destination contract address string destination_contract_address = 3; } - -// Encoder is an enumerator that defines the mode of encoding message in tunnel module. -enum Encoder { - option (gogoproto.goproto_enum_prefix) = false; - - // ENCODER_UNSPECIFIED is an unspecified encoder mode. - ENCODER_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "ENCODER_UNSPECIFIED"]; - - // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). - ENCODER_FIXED_POINT_ABI = 1 [(gogoproto.enumvalue_customname) = "ENCODER_FIXED_POINT_ABI"]; - - // ENCODER_TICK_ABI is a tick abi encoder. - ENCODER_TICK_ABI = 2 [(gogoproto.enumvalue_customname) = "ENCODER_TICK_ABI"]; -} diff --git a/proto/band/tunnel/v1beta1/tx.proto b/proto/band/tunnel/v1beta1/tx.proto index 79214c266..cba95092d 100644 --- a/proto/band/tunnel/v1beta1/tx.proto +++ b/proto/band/tunnel/v1beta1/tx.proto @@ -10,6 +10,7 @@ import "cosmos/base/v1beta1/coin.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; +import "band/feeds/v1beta1/feeds.proto"; import "band/tunnel/v1beta1/params.proto"; import "band/tunnel/v1beta1/tunnel.proto"; @@ -54,7 +55,7 @@ message MsgCreateTunnel { // route is the route for delivering the signal prices google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; // encoder is the mode of encoding price signal data. - Encoder encoder = 4; + band.feeds.v1beta1.Encoder encoder = 4; // initial_deposit is the deposit value that must be paid at tunnel creation. repeated cosmos.base.v1beta1.Coin initial_deposit = 5 [ (gogoproto.nullable) = false, diff --git a/x/feeds/types/feeds_price_data.go b/x/feeds/types/feeds_price_data.go index 0aaba4338..63e3a02ee 100644 --- a/x/feeds/types/feeds_price_data.go +++ b/x/feeds/types/feeds_price_data.go @@ -47,3 +47,12 @@ func (f FeedsPriceData) ABIEncode() ([]byte, error) { return feedsPriceDataArgs.Pack(signalPriceABIs, f.Timestamp) } + +// ValidateEncoder validates the encoder. +func ValidateEncoder(encoder Encoder) error { + if _, ok := Encoder_name[int32(encoder)]; ok && encoder != ENCODER_UNSPECIFIED { + return nil + } + + return ErrInvalidEncoder.Wrapf("invalid encoder: %s", encoder) +} diff --git a/x/feeds/types/feeds_price_data_test.go b/x/feeds/types/feeds_price_data_test.go index 891200816..9b7816811 100644 --- a/x/feeds/types/feeds_price_data_test.go +++ b/x/feeds/types/feeds_price_data_test.go @@ -24,3 +24,13 @@ func TestABIEncodeFeedsPriceData(t *testing.T) { require.NoError(t, err) require.Equal(t, expected, hex.EncodeToString(result)) } + +func TestValidateEncoder(t *testing.T) { + // validate encoder + err := types.ValidateEncoder(1) + require.NoError(t, err) + + // invalid encoder + err = types.ValidateEncoder(999) + require.Error(t, err) +} diff --git a/x/tunnel/client/cli/tx.go b/x/tunnel/client/cli/tx.go index 7a4d3fad3..fe2142e4e 100644 --- a/x/tunnel/client/cli/tx.go +++ b/x/tunnel/client/cli/tx.go @@ -10,6 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -86,7 +87,7 @@ func GetTxCmdCreateTSSTunnel() *cobra.Command { interval, args[0], args[1], - types.Encoder(encoder), + feedstypes.Encoder(encoder), initialDeposit, clientCtx.GetFromAddress(), ) diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 1dc93fe10..6174b7a26 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -26,16 +27,12 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { // set tunnels for _, t := range data.Tunnels { k.SetTunnel(ctx, t) + k.SetLatestPrices(ctx, types.NewLatestPrices(t.ID, []feedstypes.Price{}, 0)) if t.IsActive { k.ActiveTunnelID(ctx, t.ID) } } - // set the latest signal prices - for _, latestSignalPrices := range data.LatestSignalPricesList { - k.SetLatestSignalPrices(ctx, latestSignalPrices) - } - // set the deposits var totalDeposits sdk.Coins for _, deposit := range data.Deposits { @@ -61,11 +58,10 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { // ExportGenesis returns the module's exported genesis func ExportGenesis(ctx sdk.Context, k Keeper) *types.GenesisState { return &types.GenesisState{ - Params: k.GetParams(ctx), - TunnelCount: k.GetTunnelCount(ctx), - Tunnels: k.GetTunnels(ctx), - LatestSignalPricesList: k.GetAllLatestSignalPrices(ctx), - Deposits: k.GetAllDeposits(ctx), - TotalFees: k.GetTotalFees(ctx), + Params: k.GetParams(ctx), + TunnelCount: k.GetTunnelCount(ctx), + Tunnels: k.GetTunnels(ctx), + Deposits: k.GetAllDeposits(ctx), + TotalFees: k.GetTotalFees(ctx), } } diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index f09a85922..fd46b5594 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -11,6 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/keeper" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -41,47 +42,12 @@ func TestValidateGenesis(t *testing.T) { requireErr: true, errMsg: "tunnel count mismatch in tunnels", }, - "tunnel count mismatch in latest signal prices": { - genesis: &types.GenesisState{ - Tunnels: []types.Tunnel{ - {ID: 1}, - }, - TunnelCount: 1, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1}, - {TunnelID: 2}, - }, - }, - requireErr: true, - errMsg: "tunnel count mismatch in latest signal prices", - }, - "invalid latest signal prices": { - genesis: &types.GenesisState{ - Tunnels: []types.Tunnel{ - {ID: 1}, - }, - TunnelCount: 1, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 0}, - }, - }, - requireErr: true, - errMsg: "invalid latest signal prices", - }, "invalid total fees": { genesis: &types.GenesisState{ Tunnels: []types.Tunnel{ {ID: 1}, }, TunnelCount: 1, - LatestSignalPricesList: []types.LatestSignalPrices{ - { - TunnelID: 1, - SignalPrices: []types.SignalPrice{ - {SignalID: "ETH", Price: 5000}, - }, - }, - }, TotalFees: types.TotalFees{ TotalPacketFee: sdk.Coins{ {Denom: "uband", Amount: sdkmath.NewInt(-100)}, @@ -98,20 +64,6 @@ func TestValidateGenesis(t *testing.T) { {ID: 2}, }, TunnelCount: 2, - LatestSignalPricesList: []types.LatestSignalPrices{ - { - TunnelID: 1, - SignalPrices: []types.SignalPrice{ - {SignalID: "ETH", Price: 5000}, - }, - }, - { - TunnelID: 2, - SignalPrices: []types.SignalPrice{ - {SignalID: "ETH", Price: 5000}, - }, - }, - }, TotalFees: types.TotalFees{ TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), }, @@ -157,15 +109,6 @@ func (s *KeeperTestSuite) TestInitExportGenesis() { Tunnels: []types.Tunnel{ {ID: 1}, }, - LatestSignalPricesList: []types.LatestSignalPrices{ - { - TunnelID: 1, - SignalPrices: []types.SignalPrice{ - {SignalID: "ETH", Price: 5000}, - }, - LastInterval: 0, - }, - }, TotalFees: types.TotalFees{ TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), }, @@ -179,4 +122,15 @@ func (s *KeeperTestSuite) TestInitExportGenesis() { // Verify the exported state matches the initialized state s.Require().Equal(genesisState, exportedGenesisState) + + // check latest price on chain. + for _, t := range genesisState.Tunnels { + latestPrices, err := k.GetLatestPrices(ctx, t.ID) + s.Require().NoError(err) + s.Require().Equal(types.LatestPrices{ + TunnelID: t.ID, + Prices: []feedstypes.Price(nil), + LastInterval: 0, + }, latestPrices) + } } diff --git a/x/tunnel/keeper/helper.go b/x/tunnel/keeper/helper.go index 1409e3952..1ef075227 100644 --- a/x/tunnel/keeper/helper.go +++ b/x/tunnel/keeper/helper.go @@ -7,50 +7,42 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -// GenerateNewSignalPrices generates new signal prices based on the current prices -// and signal deviations. -func GenerateNewSignalPrices( - latestSignalPrices types.LatestSignalPrices, - signalDeviationsMap map[string]types.SignalDeviation, - currentFeedsPricesMap map[string]feedstypes.Price, +// GenerateNewPrices generates new prices based on the current prices and signal deviations. +func GenerateNewPrices( + signalDeviations []types.SignalDeviation, + latestPricesMap map[string]feedstypes.Price, + feedsPricesMap map[string]feedstypes.Price, sendAll bool, -) ([]types.SignalPrice, error) { +) ([]feedstypes.Price, error) { shouldSend := false - newSignalPrices := make([]types.SignalPrice, 0) - for _, sp := range latestSignalPrices.SignalPrices { - oldPrice := sdkmath.NewIntFromUint64(sp.Price) - // get current price from the feed, if not found, set price to 0 - price := uint64(0) - feedPrice, ok := currentFeedsPricesMap[sp.SignalID] - if ok && feedPrice.Status == feedstypes.PriceStatusAvailable { - price = feedPrice.Price + newFeedPrices := make([]feedstypes.Price, 0) + for _, sd := range signalDeviations { + oldPrice := sdkmath.NewInt(0) + if latestPrices, ok := latestPricesMap[sd.SignalID]; ok { + oldPrice = sdkmath.NewIntFromUint64(latestPrices.Price) } - newPrice := sdkmath.NewIntFromUint64(price) - // get hard/soft deviation, panic if not found; should not happen. - sd, ok := signalDeviationsMap[sp.SignalID] + feedPrice, ok := feedsPricesMap[sd.SignalID] if !ok { - return nil, types.ErrDeviationNotFound.Wrapf("deviation not found for signal ID :%s", sp.SignalID) + feedPrice = feedstypes.NewPrice(feedstypes.PriceStatusNotInCurrentFeeds, sd.SignalID, 0, 0) } - hardDeviation := sdkmath.NewIntFromUint64(sd.HardDeviationBPS) - softDeviation := sdkmath.NewIntFromUint64(sd.SoftDeviationBPS) // calculate deviation between old price and new price and compare with the threshold. // shouldSend is set to true if sendAll is true or there is a signal whose deviation // is over the hard threshold. - deviation := calculateDeviationBPS(oldPrice, newPrice) - if sendAll || deviation.GTE(hardDeviation) { - newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) + deviation := calculateDeviationBPS(oldPrice, sdkmath.NewIntFromUint64(feedPrice.Price)) + if sendAll || deviation.GTE(sdkmath.NewIntFromUint64(sd.HardDeviationBPS)) { + newFeedPrices = append(newFeedPrices, feedPrice) shouldSend = true - } else if deviation.GTE(softDeviation) { - newSignalPrices = append(newSignalPrices, types.NewSignalPrice(sp.SignalID, price)) + } else if deviation.GTE(sdkmath.NewIntFromUint64(sd.SoftDeviationBPS)) { + newFeedPrices = append(newFeedPrices, feedPrice) } } if shouldSend { - return newSignalPrices, nil + return newFeedPrices, nil } else { - return []types.SignalPrice{}, nil + return []feedstypes.Price{}, nil } } diff --git a/x/tunnel/keeper/helper_test.go b/x/tunnel/keeper/helper_test.go index bb94725ce..11f19f580 100644 --- a/x/tunnel/keeper/helper_test.go +++ b/x/tunnel/keeper/helper_test.go @@ -6,11 +6,11 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func (s *KeeperTestSuite) TestGenerateSignalPricesSendAll() { +func (s *KeeperTestSuite) TestGeneratePricesSendAll() { ctx := s.ctx tunnelID := uint64(1) - currentPricesMap := map[string]feedstypes.Price{ + pricesMap := map[string]feedstypes.Price{ "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, } sendAll := true @@ -20,28 +20,30 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesSendAll() { {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, }, } - latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ - {SignalID: "BTC/USD", Price: 0}, + latestPrices := types.NewLatestPrices(tunnelID, []feedstypes.Price{ + {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC/USD", Price: 0}, }, 0) + latestPricesMap := keeper.CreatePricesMap(latestPrices.Prices) + s.keeper.SetTunnel(ctx, tunnel) - s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + s.keeper.SetLatestPrices(ctx, latestPrices) - newSignalPrices, err := keeper.GenerateNewSignalPrices( - latestSignalPrices, - tunnel.GetSignalDeviationMap(), - currentPricesMap, + newPrices, err := keeper.GenerateNewPrices( + tunnel.SignalDeviations, + latestPricesMap, + pricesMap, sendAll, ) s.Require().NoError(err) - s.Require().Len(newSignalPrices, 1) + s.Require().Len(newPrices, 1) } -func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { +func (s *KeeperTestSuite) TestGeneratePricesMeetHardDeviation() { ctx := s.ctx tunnelID := uint64(1) - currentPricesMap := map[string]feedstypes.Price{ + pricesMap := map[string]feedstypes.Price{ "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, "ETH/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, } @@ -53,29 +55,30 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesMeetHardDeviation() { {SignalID: "ETH/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, }, } - latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ - {SignalID: "BTC/USD", Price: 48500}, // 3% - {SignalID: "ETH/USD", Price: 1980}, // 1% + latestPrices := types.NewLatestPrices(tunnelID, []feedstypes.Price{ + {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC/USD", Price: 48500}, // 3% + {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "ETH/USD", Price: 1980}, // 1% }, 0) + latestPricesMap := keeper.CreatePricesMap(latestPrices.Prices) s.keeper.SetTunnel(ctx, tunnel) - s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + s.keeper.SetLatestPrices(ctx, latestPrices) - newSignalPrices, err := keeper.GenerateNewSignalPrices( - latestSignalPrices, - tunnel.GetSignalDeviationMap(), - currentPricesMap, + newPrices, err := keeper.GenerateNewPrices( + tunnel.SignalDeviations, + latestPricesMap, + pricesMap, sendAll, ) s.Require().NoError(err) - s.Require().Len(newSignalPrices, 2) + s.Require().Len(newPrices, 2) } -func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { +func (s *KeeperTestSuite) TestGeneratePricesNotMeetHardDeviation() { ctx := s.ctx tunnelID := uint64(1) - currentPricesMap := map[string]feedstypes.Price{ + pricesMap := map[string]feedstypes.Price{ "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, "ETH/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, } @@ -87,20 +90,21 @@ func (s *KeeperTestSuite) TestGenerateSignalPricesNotMeetHardDeviation() { {SignalID: "ETH/USD", SoftDeviationBPS: 100, HardDeviationBPS: 300}, }, } - latestSignalPrices := types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ - {SignalID: "BTC/USD", Price: 49000}, // 2% - {SignalID: "ETH/USD", Price: 1950}, // 2.5% + latestPrices := types.NewLatestPrices(tunnelID, []feedstypes.Price{ + {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC/USD", Price: 49000}, // 2% + {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "ETH/USD", Price: 1950}, // 2.5% }, 0) + latestPricesMap := keeper.CreatePricesMap(latestPrices.Prices) s.keeper.SetTunnel(ctx, tunnel) - s.keeper.SetLatestSignalPrices(ctx, latestSignalPrices) + s.keeper.SetLatestPrices(ctx, latestPrices) - newSignalPrices, err := keeper.GenerateNewSignalPrices( - latestSignalPrices, - tunnel.GetSignalDeviationMap(), - currentPricesMap, + newPrices, err := keeper.GenerateNewPrices( + tunnel.SignalDeviations, + latestPricesMap, + pricesMap, sendAll, ) s.Require().NoError(err) - s.Require().Len(newSignalPrices, 0) + s.Require().Len(newPrices, 0) } diff --git a/x/tunnel/keeper/keeper_latest_signal_prices.go b/x/tunnel/keeper/keeper_latest_signal_prices.go index dbbb2e4c2..376bc10ca 100644 --- a/x/tunnel/keeper/keeper_latest_signal_prices.go +++ b/x/tunnel/keeper/keeper_latest_signal_prices.go @@ -5,73 +5,74 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -// SetLatestSignalPrices sets the latest signal prices in the store -func (k Keeper) SetLatestSignalPrices(ctx sdk.Context, latestSignalPrices types.LatestSignalPrices) { +// SetLatestPrices sets the latest prices in the store +func (k Keeper) SetLatestPrices(ctx sdk.Context, latestPrices types.LatestPrices) { ctx.KVStore(k.storeKey). - Set(types.LatestSignalPricesStoreKey(latestSignalPrices.TunnelID), k.cdc.MustMarshal(&latestSignalPrices)) + Set(types.LatestPricesStoreKey(latestPrices.TunnelID), k.cdc.MustMarshal(&latestPrices)) } -// GetLatestSignalPrices gets the latest signal prices from the store -func (k Keeper) GetLatestSignalPrices(ctx sdk.Context, tunnelID uint64) (types.LatestSignalPrices, error) { - bz := ctx.KVStore(k.storeKey).Get(types.LatestSignalPricesStoreKey(tunnelID)) +// GetLatestPrices gets the latest prices from the store +func (k Keeper) GetLatestPrices(ctx sdk.Context, tunnelID uint64) (types.LatestPrices, error) { + bz := ctx.KVStore(k.storeKey).Get(types.LatestPricesStoreKey(tunnelID)) if bz == nil { - return types.LatestSignalPrices{}, types.ErrLatestSignalPricesNotFound.Wrapf("tunnelID: %d", tunnelID) + return types.LatestPrices{}, types.ErrLatestPricesNotFound.Wrapf("tunnelID: %d", tunnelID) } - var latestSignalPrices types.LatestSignalPrices - k.cdc.MustUnmarshal(bz, &latestSignalPrices) - return latestSignalPrices, nil + var latestPrices types.LatestPrices + k.cdc.MustUnmarshal(bz, &latestPrices) + return latestPrices, nil } -// MustGetLatestSignalPrices retrieves the latest signal prices by its tunnel ID. Panics if the signal prices does not exist. -func (k Keeper) MustGetLatestSignalPrices(ctx sdk.Context, tunnelID uint64) types.LatestSignalPrices { - latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) +// MustGetLatestPrices retrieves the latest prices by its tunnel ID. Panics if the prices does not exist. +func (k Keeper) MustGetLatestPrices(ctx sdk.Context, tunnelID uint64) types.LatestPrices { + latestPrices, err := k.GetLatestPrices(ctx, tunnelID) if err != nil { panic(err) } - return latestSignalPrices + return latestPrices } -// GetAllLatestSignalPrices gets all the latest signal prices from the store -func (k Keeper) GetAllLatestSignalPrices(ctx sdk.Context) []types.LatestSignalPrices { - var allLatestSignalPrices []types.LatestSignalPrices - iterator := storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.LatestSignalPricesStoreKeyPrefix) +// GetAllLatestPrices gets all the latest prices from the store +func (k Keeper) GetAllLatestPrices(ctx sdk.Context) []types.LatestPrices { + var allLatestPrices []types.LatestPrices + iterator := storetypes.KVStorePrefixIterator(ctx.KVStore(k.storeKey), types.LatestPricesStoreKeyPrefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - var latestSignalPrices types.LatestSignalPrices - k.cdc.MustUnmarshal(iterator.Value(), &latestSignalPrices) - allLatestSignalPrices = append(allLatestSignalPrices, latestSignalPrices) + var latestPrices types.LatestPrices + k.cdc.MustUnmarshal(iterator.Value(), &latestPrices) + allLatestPrices = append(allLatestPrices, latestPrices) } - return allLatestSignalPrices + return allLatestPrices } -// UpdateLastInterval updates the last interval timestamp of the tunnel in the LatestSignalPrices. -// LatestSignalPrices of the tunnel must be set before calling this function. +// UpdateLastInterval updates the last interval timestamp of the tunnel in the LatestPrices. +// LatestPrices of the tunnel must be set before calling this function. func (k Keeper) UpdateLastInterval(ctx sdk.Context, tunnelID uint64, timestamp int64) error { - latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + latestPrices, err := k.GetLatestPrices(ctx, tunnelID) if err != nil { return err } - latestSignalPrices.LastInterval = timestamp - k.SetLatestSignalPrices(ctx, latestSignalPrices) + latestPrices.LastInterval = timestamp + k.SetLatestPrices(ctx, latestPrices) return nil } -// UpdatePriceTunnel updates the signal prices of the tunnel in the LatestSignalPrices. -// LatestSignalPrices of the tunnel must be set before calling this function. -func (k Keeper) UpdatePriceTunnel(ctx sdk.Context, tunnelID uint64, signalPrices []types.SignalPrice) error { - latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) +// UpdatePriceTunnel updates the prices of the tunnel in the LatestPrices. +// LatestPrices of the tunnel must be set before calling this function. +func (k Keeper) UpdatePriceTunnel(ctx sdk.Context, tunnelID uint64, prices []feedstypes.Price) error { + latestPrices, err := k.GetLatestPrices(ctx, tunnelID) if err != nil { return err } - latestSignalPrices.SignalPrices = signalPrices - k.SetLatestSignalPrices(ctx, latestSignalPrices) + latestPrices.UpdatePrices(prices) + k.SetLatestPrices(ctx, latestPrices) return nil } diff --git a/x/tunnel/keeper/keeper_latest_signal_prices_test.go b/x/tunnel/keeper/keeper_latest_signal_prices_test.go index d09ec8203..efd62155f 100644 --- a/x/tunnel/keeper/keeper_latest_signal_prices_test.go +++ b/x/tunnel/keeper/keeper_latest_signal_prices_test.go @@ -1,48 +1,49 @@ package keeper_test import ( + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func (s *KeeperTestSuite) TestGetSetLatestSignalPrices() { +func (s *KeeperTestSuite) TestGetSetLatestPrices() { ctx, k := s.ctx, s.keeper tunnelID := uint64(1) - latestSignalPrices := types.LatestSignalPrices{ + latestPrices := types.LatestPrices{ TunnelID: tunnelID, - SignalPrices: []types.SignalPrice{ - {SignalID: "BTC", Price: 50000}, + Prices: []feedstypes.Price{ + {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC", Price: 50000}, }, } - k.SetLatestSignalPrices(ctx, latestSignalPrices) + k.SetLatestPrices(ctx, latestPrices) - retrievedSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + retrievedPrices, err := k.GetLatestPrices(ctx, tunnelID) s.Require().NoError(err) - s.Require().Equal(latestSignalPrices, retrievedSignalPrices) + s.Require().Equal(latestPrices, retrievedPrices) } -func (s *KeeperTestSuite) TestGetAllLatestSignalPrices() { +func (s *KeeperTestSuite) TestGetAllLatestPrices() { ctx, k := s.ctx, s.keeper - latestSignalPrices1 := types.LatestSignalPrices{ + latestPrices1 := types.LatestPrices{ TunnelID: 1, - SignalPrices: []types.SignalPrice{ - {SignalID: "BTC", Price: 50000}, + Prices: []feedstypes.Price{ + {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC", Price: 50000}, }, } - latestSignalPrices2 := types.LatestSignalPrices{ + latestPrices2 := types.LatestPrices{ TunnelID: 2, - SignalPrices: []types.SignalPrice{ - {SignalID: "ETH", Price: 3000}, + Prices: []feedstypes.Price{ + {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "ETH", Price: 3000}, }, } - k.SetLatestSignalPrices(ctx, latestSignalPrices1) - k.SetLatestSignalPrices(ctx, latestSignalPrices2) + k.SetLatestPrices(ctx, latestPrices1) + k.SetLatestPrices(ctx, latestPrices2) - allLatestSignalPrices := k.GetAllLatestSignalPrices(ctx) - s.Require().Len(allLatestSignalPrices, 2) - s.Require().Contains(allLatestSignalPrices, latestSignalPrices1) - s.Require().Contains(allLatestSignalPrices, latestSignalPrices2) + allLatestPrices := k.GetAllLatestPrices(ctx) + s.Require().Len(allLatestPrices, 2) + s.Require().Contains(allLatestPrices, latestPrices1) + s.Require().Contains(allLatestPrices, latestPrices2) } diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index e97ddb804..52371bd12 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -60,8 +60,8 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // get active tunnel IDs ids := k.GetActiveTunnelIDs(ctx) - currentPrices := k.feedsKeeper.GetAllPrices(ctx) - currentPricesMap := createPricesMap(currentPrices) + prices := k.feedsKeeper.GetAllPrices(ctx) + pricesMap := CreatePricesMap(prices) // create new packet if possible for active tunnels. If not enough fund, deactivate the tunnel. for _, id := range ids { @@ -75,7 +75,7 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { } producePacketFunc := func(ctx sdk.Context) error { - return k.ProducePacket(ctx, id, currentPricesMap) + return k.ProducePacket(ctx, id, pricesMap) } // Produce a packet. If error, emits an event. @@ -93,39 +93,36 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { func (k Keeper) ProducePacket( ctx sdk.Context, tunnelID uint64, - currentPricesMap map[string]feedstypes.Price, + feedsPricesMap map[string]feedstypes.Price, ) error { unixNow := ctx.BlockTime().Unix() - // get tunnel and signal prices info + // get tunnel and prices info tunnel, err := k.GetTunnel(ctx, tunnelID) if err != nil { return err } - latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnelID) + + latestPrices, err := k.GetLatestPrices(ctx, tunnelID) if err != nil { return err } + latestPricesMap := CreatePricesMap(latestPrices.Prices) // check if the interval has passed - sendAll := unixNow >= int64(tunnel.Interval)+latestSignalPrices.LastInterval - - // generate new signal prices; if no new signal prices, stop the process. - newSignalPrices, err := GenerateNewSignalPrices( - latestSignalPrices, - tunnel.GetSignalDeviationMap(), - currentPricesMap, - sendAll, - ) + sendAll := unixNow >= int64(tunnel.Interval)+latestPrices.LastInterval + + // generate newPrices; if no newPrices, stop the process. + newPrices, err := GenerateNewPrices(tunnel.SignalDeviations, latestPricesMap, feedsPricesMap, sendAll) if err != nil { return err } - if len(newSignalPrices) == 0 { + if len(newPrices) == 0 { return nil } // create a new packet - packet, err := k.CreatePacket(ctx, tunnel.ID, newSignalPrices) + packet, err := k.CreatePacket(ctx, tunnel.ID, newPrices) if err != nil { return err } @@ -136,7 +133,7 @@ func (k Keeper) ProducePacket( } // update latest price info. - if err := k.UpdatePriceTunnel(ctx, tunnel.ID, newSignalPrices); err != nil { + if err := k.UpdatePriceTunnel(ctx, tunnel.ID, newPrices); err != nil { return err } if sendAll { @@ -160,8 +157,11 @@ func (k Keeper) ProducePacket( func (k Keeper) CreatePacket( ctx sdk.Context, tunnelID uint64, - signalPrices []types.SignalPrice, + prices []feedstypes.Price, ) (types.Packet, error) { + // get tunnel and prices info + params := k.GetParams(ctx) + tunnel, err := k.GetTunnel(ctx, tunnelID) if err != nil { return types.Packet{}, err @@ -173,13 +173,19 @@ func (k Keeper) CreatePacket( return types.Packet{}, sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) } + // get the route fee + routeFee, err := tunnel.Route.GetCachedValue().(types.RouteI).Fee() + if err != nil { + return types.Packet{}, sdkerrors.Wrapf(err, "failed to get route fee for tunnel %d", tunnel.ID) + } + tunnel.Sequence++ packet := types.NewPacket( tunnelID, tunnel.Sequence, - signalPrices, - k.GetParams(ctx).BasePacketFee, - sdk.Coins{}, + prices, + params.BasePacketFee, + routeFee, ctx.BlockTime().Unix(), ) @@ -200,22 +206,17 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { // get the packet content, which is the information receiving after // sending packet to the destination route var content types.PacketContentI - var fee sdk.Coins switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - content, fee, err = k.SendTSSPacket(ctx, r, packet) + content, err = k.SendTSSPacket(ctx, r, packet) default: return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } - // return error if failed to send packet if err != nil { return err } - // set the route fee - packet.RouteFee = fee - // set the packet content if err := packet.SetPacketContent(content); err != nil { return sdkerrors.Wrapf(err, "failed to set packet content for tunnel ID: %d", tunnel.ID) @@ -229,7 +230,7 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), sdk.NewAttribute(types.AttributeKeyBaseFee, packet.BaseFee.String()), - sdk.NewAttribute(types.AttributeKeyRouteFee, fee.String()), + sdk.NewAttribute(types.AttributeKeyRouteFee, packet.RouteFee.String()), )) return nil @@ -249,8 +250,8 @@ func calculateDeviationBPS(oldPrice, newPrice sdkmath.Int) sdkmath.Int { return newPrice.Sub(oldPrice).Abs().MulRaw(10000).Quo(oldPrice) } -// createPricesMap creates a map of prices with signal ID as the key -func createPricesMap(prices []feedstypes.Price) map[string]feedstypes.Price { +// CreatePricesMap creates a map of prices with signal ID as the key +func CreatePricesMap(prices []feedstypes.Price) map[string]feedstypes.Price { pricesMap := make(map[string]feedstypes.Price, len(prices)) for _, p := range prices { pricesMap[p.SignalID] = p diff --git a/x/tunnel/keeper/keeper_packet_test.go b/x/tunnel/keeper/keeper_packet_test.go index cacfbc976..86f701876 100644 --- a/x/tunnel/keeper/keeper_packet_test.go +++ b/x/tunnel/keeper/keeper_packet_test.go @@ -48,11 +48,64 @@ func (s *KeeperTestSuite) TestGetSetPacket() { s.Require().Equal(packet, storedPacket) } +func (s *KeeperTestSuite) TestCreatePacket() { + ctx, k := s.ctx, s.keeper + + params := k.GetParams(ctx) + + feePayer := sdk.AccAddress([]byte("fee_payer_address")) + tunnel := types.Tunnel{ + ID: 1, + FeePayer: feePayer.String(), + IsActive: true, + SignalDeviations: []types.SignalDeviation{ + {SignalID: "BTC/USD", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, + }, + CreatedAt: ctx.BlockTime().Unix(), + } + route := &types.TSSRoute{ + DestinationChainID: "0x", + DestinationContractAddress: "0x", + } + prices := []feedstypes.Price{ + {SignalID: "BTC/USD", Price: 0}, + } + + s.bankKeeper.EXPECT(). + SendCoinsFromAccountToModule(ctx, feePayer, types.ModuleName, k.GetParams(ctx).BasePacketFee). + Return(nil) + + err := tunnel.SetRoute(route) + s.Require().NoError(err) + + // set tunnel to the store + k.SetTunnel(ctx, tunnel) + + expectedPacket := types.Packet{ + TunnelID: 1, + Sequence: 1, + Prices: prices, + BaseFee: params.BasePacketFee, + RouteFee: sdk.NewCoins(), + CreatedAt: ctx.BlockTime().Unix(), + } + + // create a packet + packet, err := k.CreatePacket(ctx, tunnel.ID, prices) + s.Require().NoError(err) + s.Require().Equal(expectedPacket, packet) + + // Verify that the tunnel sequence was incremented + updatedTunnel, err := k.GetTunnel(ctx, tunnel.ID) + s.Require().NoError(err) + s.Require().Equal(uint64(1), updatedTunnel.Sequence) +} + func (s *KeeperTestSuite) TestProducePacket() { ctx, k := s.ctx, s.keeper tunnelID := uint64(1) - currentPricesMap := map[string]feedstypes.Price{ + pricesMap := map[string]feedstypes.Price{ "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, } feePayer := sdk.AccAddress([]byte("fee_payer_address")) @@ -85,11 +138,11 @@ func (s *KeeperTestSuite) TestProducePacket() { err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) - k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + k.SetLatestPrices(ctx, types.NewLatestPrices(tunnelID, []feedstypes.Price{ {SignalID: "BTC/USD", Price: 0}, }, 0)) - err = k.ProducePacket(ctx, tunnelID, currentPricesMap) + err = k.ProducePacket(ctx, tunnelID, pricesMap) s.Require().NoError(err) } @@ -134,7 +187,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) - k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + k.SetLatestPrices(ctx, types.NewLatestPrices(tunnelID, []feedstypes.Price{ {SignalID: "BTC/USD", Price: 0}, }, 0)) @@ -188,7 +241,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { err = k.ActivateTunnel(ctx, tunnelID) s.Require().NoError(err) - k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, []types.SignalPrice{ + k.SetLatestPrices(ctx, types.NewLatestPrices(tunnelID, []feedstypes.Price{ {SignalID: "BTC/USD", Price: 0}, }, 0)) diff --git a/x/tunnel/keeper/keeper_test.go b/x/tunnel/keeper/keeper_test.go index 0650243cb..e02ddacf3 100644 --- a/x/tunnel/keeper/keeper_test.go +++ b/x/tunnel/keeper/keeper_test.go @@ -19,6 +19,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" band "github.com/bandprotocol/chain/v3/app" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel" "github.com/bandprotocol/chain/v3/x/tunnel/keeper" "github.com/bandprotocol/chain/v3/x/tunnel/testutil" @@ -110,7 +111,7 @@ func (s *KeeperTestSuite) AddSampleTunnel(isActive bool) { tunnel, err := k.AddTunnel( ctx, route, - types.ENCODER_FIXED_POINT_ABI, + feedstypes.ENCODER_FIXED_POINT_ABI, signalDeviations, 10, sdk.AccAddress([]byte("creator_address")), diff --git a/x/tunnel/keeper/keeper_tss_packet.go b/x/tunnel/keeper/keeper_tss_packet.go index c1cf111c3..abe80e240 100644 --- a/x/tunnel/keeper/keeper_tss_packet.go +++ b/x/tunnel/keeper/keeper_tss_packet.go @@ -11,23 +11,14 @@ func (k Keeper) SendTSSPacket( ctx sdk.Context, route *types.TSSRoute, packet types.Packet, -) (packetContent types.PacketContentI, fee sdk.Coins, err error) { +) (types.PacketContentI, error) { // TODO: Implement TSS packet handler logic // Sign TSS packet - // Set the packet content - packetContent = &types.TSSPacketContent{ + return &types.TSSPacketContent{ SigningID: 1, DestinationChainID: route.DestinationChainID, DestinationContractAddress: route.DestinationContractAddress, - } - - // TODO: return the actual fee that using in the route if possible - fee, err = route.Fee() - if err != nil { - return nil, nil, err - } - - return + }, nil } diff --git a/x/tunnel/keeper/keeper_tss_packet_test.go b/x/tunnel/keeper/keeper_tss_packet_test.go index 7475e7bd7..d35a5bcc7 100644 --- a/x/tunnel/keeper/keeper_tss_packet_test.go +++ b/x/tunnel/keeper/keeper_tss_packet_test.go @@ -6,6 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" bandtsstypes "github.com/bandprotocol/chain/v3/x/bandtss/types" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -17,21 +18,20 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { DestinationContractAddress: "0x1234567890abcdef", } packet := types.NewPacket( - 1, // tunnelID - 1, // sequence - []types.SignalPrice{}, // signalPriceInfos[] - sdk.NewCoins(), // baseFee - sdk.NewCoins(), // routeFee + 1, // tunnelID + 1, // sequence + []feedstypes.Price{}, // priceInfos[] + sdk.NewCoins(), // baseFee + sdk.NewCoins(), // routeFee time.Now().Unix(), ) - content, fee, err := k.SendTSSPacket(ctx, &route, packet) + content, err := k.SendTSSPacket(ctx, &route, packet) s.Require().NoError(err) packetContent, ok := content.(*types.TSSPacketContent) s.Require().True(ok) s.Require().Equal("chain-1", packetContent.DestinationChainID) s.Require().Equal("0x1234567890abcdef", packetContent.DestinationContractAddress) - s.Require().Equal(sdk.NewCoins(), fee) s.Require().Equal(bandtsstypes.SigningID(1), packetContent.SigningID) } diff --git a/x/tunnel/keeper/keeper_tunnel.go b/x/tunnel/keeper/keeper_tunnel.go index 97749224d..4be7e0136 100644 --- a/x/tunnel/keeper/keeper_tunnel.go +++ b/x/tunnel/keeper/keeper_tunnel.go @@ -8,6 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -15,7 +16,7 @@ import ( func (k Keeper) AddTunnel( ctx sdk.Context, route types.RouteI, - encoder types.Encoder, + encoder feedstypes.Encoder, signalDeviations []types.SignalDeviation, interval uint64, creator sdk.AccAddress, @@ -29,12 +30,8 @@ func (k Keeper) AddTunnel( return nil, err } - // set the signal prices info - var signalPrices []types.SignalPrice - for _, sd := range signalDeviations { - signalPrices = append(signalPrices, types.NewSignalPrice(sd.SignalID, 0)) - } - k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(newID, signalPrices, 0)) + // set the prices info + k.SetLatestPrices(ctx, types.NewLatestPrices(newID, []feedstypes.Price{}, 0)) // create a new tunnel tunnel, err := types.NewTunnel( @@ -99,12 +96,8 @@ func (k Keeper) UpdateAndResetTunnel( tunnel.Interval = interval k.SetTunnel(ctx, tunnel) - // edit the signal prices info - var signalPrices []types.SignalPrice - for _, sd := range signalDeviations { - signalPrices = append(signalPrices, types.NewSignalPrice(sd.SignalID, 0)) - } - k.SetLatestSignalPrices(ctx, types.NewLatestSignalPrices(tunnelID, signalPrices, 0)) + // edit the prices info + k.SetLatestPrices(ctx, types.NewLatestPrices(tunnelID, []feedstypes.Price{}, 0)) event := sdk.NewEvent( types.EventTypeUpdateAndResetTunnel, diff --git a/x/tunnel/keeper/keeper_tunnel_test.go b/x/tunnel/keeper/keeper_tunnel_test.go index cb1a4a447..7160d70c6 100644 --- a/x/tunnel/keeper/keeper_tunnel_test.go +++ b/x/tunnel/keeper/keeper_tunnel_test.go @@ -10,6 +10,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -28,7 +29,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { expectedTunnel := types.Tunnel{ ID: 1, Route: any, - Encoder: types.ENCODER_FIXED_POINT_ABI, + Encoder: feedstypes.ENCODER_FIXED_POINT_ABI, FeePayer: "band1mdnfc2ehu7vkkg5nttc8tuvwpa9f3dxskf75yxfr7zwhevvcj62q2yggu0", Creator: creator.String(), Interval: interval, @@ -38,12 +39,9 @@ func (s *KeeperTestSuite) TestAddTunnel() { TotalDeposit: sdk.NewCoins(), } - expectedSignalPrices := types.LatestSignalPrices{ - TunnelID: 1, - SignalPrices: []types.SignalPrice{ - {SignalID: "BTC", Price: 0}, - {SignalID: "ETH", Price: 0}, - }, + expectedPrices := types.LatestPrices{ + TunnelID: 1, + Prices: []feedstypes.Price(nil), LastInterval: 0, } @@ -53,7 +51,7 @@ func (s *KeeperTestSuite) TestAddTunnel() { s.accountKeeper.EXPECT().NewAccount(ctx, gomock.Any()).Times(1) s.accountKeeper.EXPECT().SetAccount(ctx, gomock.Any()).Times(1) - tunnel, err := k.AddTunnel(ctx, route, types.ENCODER_FIXED_POINT_ABI, signalDeviations, interval, creator) + tunnel, err := k.AddTunnel(ctx, route, feedstypes.ENCODER_FIXED_POINT_ABI, signalDeviations, interval, creator) s.Require().NoError(err) s.Require().Equal(expectedTunnel, *tunnel) @@ -61,17 +59,17 @@ func (s *KeeperTestSuite) TestAddTunnel() { tunnelCount := k.GetTunnelCount(ctx) s.Require().Equal(uint64(1), tunnelCount) - // check the latest signal prices - latestSignalPrices, err := k.GetLatestSignalPrices(ctx, tunnel.ID) + // check the latest prices + latestPrices, err := k.GetLatestPrices(ctx, tunnel.ID) s.Require().NoError(err) - s.Require().Equal(expectedSignalPrices, latestSignalPrices) + s.Require().Equal(expectedPrices, latestPrices) } func (s *KeeperTestSuite) TestUpdateAndResetTunnel() { ctx, k := s.ctx, s.keeper initialRoute := &types.TSSRoute{} - initialEncoder := types.ENCODER_FIXED_POINT_ABI + initialEncoder := feedstypes.ENCODER_FIXED_POINT_ABI initialSignalDeviations := []types.SignalDeviation{ {SignalID: "BTC", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, {SignalID: "ETH", SoftDeviationBPS: 1000, HardDeviationBPS: 1000}, @@ -112,12 +110,12 @@ func (s *KeeperTestSuite) TestUpdateAndResetTunnel() { s.Require().Equal(newSignalDeviations, editedTunnel.SignalDeviations) s.Require().Equal(newInterval, editedTunnel.Interval) - // check the latest signal prices - latestSignalPrices, err := k.GetLatestSignalPrices(ctx, editedTunnel.ID) + // check the latest prices + latestPrices, err := k.GetLatestPrices(ctx, editedTunnel.ID) s.Require().NoError(err) - s.Require().Equal(editedTunnel.ID, latestSignalPrices.TunnelID) - s.Require().Len(latestSignalPrices.SignalPrices, len(newSignalDeviations)) - for i, sp := range latestSignalPrices.SignalPrices { + s.Require().Equal(editedTunnel.ID, latestPrices.TunnelID) + s.Require().Len(latestPrices.Prices, 0) + for i, sp := range latestPrices.Prices { s.Require().Equal(newSignalDeviations[i].SignalID, sp.SignalID) s.Require().Equal(uint64(0), sp.Price) } @@ -173,7 +171,7 @@ func (s *KeeperTestSuite) TestActivateTunnel() { tunnelID := uint64(1) route := &codectypes.Any{} - encoder := types.ENCODER_FIXED_POINT_ABI + encoder := feedstypes.ENCODER_FIXED_POINT_ABI signalDeviations := []types.SignalDeviation{ {SignalID: "BTC"}, {SignalID: "ETH"}, @@ -213,7 +211,7 @@ func (s *KeeperTestSuite) TestDeactivateTunnel() { tunnelID := uint64(1) route := &codectypes.Any{} - encoder := types.ENCODER_FIXED_POINT_ABI + encoder := feedstypes.ENCODER_FIXED_POINT_ABI signalDeviations := []types.SignalDeviation{ {SignalID: "BTC"}, {SignalID: "ETH"}, diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 60d016814..4e24b7d02 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -10,7 +10,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -77,7 +76,7 @@ func (ms msgServer) CreateTunnel( }, nil } -// UpdateAndResetTunnel edits a tunnel and reset latest signal price interval. +// UpdateAndResetTunnel edits a tunnel and reset latest price interval. func (ms msgServer) UpdateAndResetTunnel( goCtx context.Context, msg *types.MsgUpdateAndResetTunnel, @@ -200,20 +199,10 @@ func (ms msgServer) TriggerTunnel( } signalIDs := tunnel.GetSignalIDs() - currentPrices := ms.Keeper.feedsKeeper.GetPrices(ctx, signalIDs) - - newSignalPrices := make([]types.SignalPrice, 0, len(signalIDs)) - for _, currentPrice := range currentPrices { - var price uint64 - if currentPrice.Status == feedstypes.PriceStatusAvailable { - price = currentPrice.Price - } - - newSignalPrices = append(newSignalPrices, types.NewSignalPrice(currentPrice.SignalID, price)) - } + prices := ms.Keeper.feedsKeeper.GetPrices(ctx, signalIDs) // create a new packet - packet, err := ms.CreatePacket(ctx, tunnel.ID, newSignalPrices) + packet, err := ms.CreatePacket(ctx, tunnel.ID, prices) if err != nil { return nil, err } @@ -223,15 +212,15 @@ func (ms msgServer) TriggerTunnel( return nil, sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) } - latestSignalPrices, err := ms.GetLatestSignalPrices(ctx, tunnel.ID) + latestPrices, err := ms.GetLatestPrices(ctx, tunnel.ID) if err != nil { return nil, err } // update latest price info. - latestSignalPrices.LastInterval = ctx.BlockTime().Unix() - latestSignalPrices.SignalPrices = newSignalPrices - ms.SetLatestSignalPrices(ctx, latestSignalPrices) + latestPrices.LastInterval = ctx.BlockTime().Unix() + latestPrices.UpdatePrices(prices) + ms.SetLatestPrices(ctx, latestPrices) ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeTriggerTunnel, diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 62d3ed1c0..570046e77 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -45,7 +45,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { signalDeviations, 10, route, - types.ENCODER_FIXED_POINT_ABI, + feedstypes.ENCODER_FIXED_POINT_ABI, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), sdk.AccAddress([]byte("creator_address")), ) @@ -63,7 +63,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { signalDeviations, 1, route, - types.ENCODER_FIXED_POINT_ABI, + feedstypes.ENCODER_FIXED_POINT_ABI, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), sdk.AccAddress([]byte("creator_address")), ) @@ -83,7 +83,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { signalDeviations, 10, route, - types.ENCODER_FIXED_POINT_ABI, + feedstypes.ENCODER_FIXED_POINT_ABI, sdk.NewCoins(), sdk.AccAddress([]byte("creator_address")), ) @@ -109,7 +109,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { signalDeviations, 10, route, - types.ENCODER_FIXED_POINT_ABI, + feedstypes.ENCODER_FIXED_POINT_ABI, depositAmount, depositor, ) diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 83b2f15e3..f878023e2 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -31,6 +31,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) cdc.RegisterInterface((*PacketContentI)(nil), nil) cdc.RegisterConcrete(&TSSPacketContent{}, "tunnel/TSSPacketContent", nil) + cdc.RegisterConcrete(Params{}, "tunnel/Params", nil) } // RegisterInterfaces registers the x/tunnel interfaces types with the interface registry diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index ad308879a..66d0922b2 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -6,23 +6,22 @@ import ( // x/tunnel module sentinel errors var ( - ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") - ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") - ErrIntervalTooLow = errorsmod.Register(ModuleName, 4, "interval too low") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") - ErrLatestSignalPricesNotFound = errorsmod.Register(ModuleName, 6, "latest signal prices not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 8, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of the tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") - ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") - ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") - ErrAlreadyActive = errorsmod.Register(ModuleName, 13, "already active") - ErrAlreadyInactive = errorsmod.Register(ModuleName, 14, "already inactive") - ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") - ErrDepositNotFound = errorsmod.Register(ModuleName, 16, "deposit not found") - ErrInsufficientDeposit = errorsmod.Register(ModuleName, 17, "insufficient deposit") - ErrSignalPricesNotFound = errorsmod.Register(ModuleName, 18, "signal prices not found") - ErrInsufficientFund = errorsmod.Register(ModuleName, 19, "insufficient fund") - ErrDeviationNotFound = errorsmod.Register(ModuleName, 20, "deviation not found") + ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") + ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") + ErrIntervalTooLow = errorsmod.Register(ModuleName, 4, "interval too low") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") + ErrLatestPricesNotFound = errorsmod.Register(ModuleName, 6, "latest prices not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 8, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of the tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") + ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") + ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") + ErrAlreadyActive = errorsmod.Register(ModuleName, 13, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 14, "already inactive") + ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") + ErrDepositNotFound = errorsmod.Register(ModuleName, 16, "deposit not found") + ErrInsufficientDeposit = errorsmod.Register(ModuleName, 17, "insufficient deposit") + ErrInsufficientFund = errorsmod.Register(ModuleName, 18, "insufficient fund") + ErrDeviationNotFound = errorsmod.Register(ModuleName, 19, "deviation not found") ) diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 14daf114f..28475df48 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -6,26 +6,24 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -// NewGenesisState creates a new GenesisState instanc e +// NewGenesisState creates a new GenesisState instance func NewGenesisState( params Params, tunnelCount uint64, tunnels []Tunnel, - latestSignalPricesList []LatestSignalPrices, totalFees TotalFees, ) *GenesisState { return &GenesisState{ - Params: params, - TunnelCount: tunnelCount, - Tunnels: tunnels, - LatestSignalPricesList: latestSignalPricesList, - TotalFees: totalFees, + Params: params, + TunnelCount: tunnelCount, + Tunnels: tunnels, + TotalFees: totalFees, } } // DefaultGenesisState gets the raw genesis raw message for testing func DefaultGenesisState() *GenesisState { - return NewGenesisState(DefaultParams(), 0, []Tunnel{}, []LatestSignalPrices{}, TotalFees{}) + return NewGenesisState(DefaultParams(), 0, []Tunnel{}, TotalFees{}) } // ValidateGenesis validates the provided genesis state. @@ -47,16 +45,6 @@ func ValidateGenesis(data GenesisState) error { tunnelIDs[t.ID] = true } - // validate the latest signal prices count - if len(data.LatestSignalPricesList) != int(data.TunnelCount) { - return ErrInvalidGenesis.Wrapf("tunnel count mismatch in latest signal prices") - } - - // validate latest signal prices - if err := validateLastestSignalPricesList(data.Tunnels, data.LatestSignalPricesList); err != nil { - return ErrInvalidGenesis.Wrapf("invalid latest signal prices: %s", err.Error()) - } - // validate no duplicated deposits type depositKey struct { TunnelID uint64 @@ -100,29 +88,3 @@ func (tf TotalFees) Validate() error { } return nil } - -// validateLastestSignalPricesList validates the latest signal prices list. -func validateLastestSignalPricesList( - tunnels []Tunnel, - latestSignalPricesList []LatestSignalPrices, -) error { - if len(tunnels) != len(latestSignalPricesList) { - return fmt.Errorf("tunnels and latest signal prices list length mismatch") - } - - tunnelIDMap := make(map[uint64]bool) - for _, t := range tunnels { - tunnelIDMap[t.ID] = true - } - - for _, latestSignalPrices := range latestSignalPricesList { - if !tunnelIDMap[latestSignalPrices.TunnelID] { - return fmt.Errorf("tunnel ID %d not found in tunnels", latestSignalPrices.TunnelID) - } - if err := latestSignalPrices.Validate(); err != nil { - return err - } - } - - return nil -} diff --git a/x/tunnel/types/genesis.pb.go b/x/tunnel/types/genesis.pb.go index e0550b6a7..4d5e2b284 100644 --- a/x/tunnel/types/genesis.pb.go +++ b/x/tunnel/types/genesis.pb.go @@ -31,12 +31,10 @@ type GenesisState struct { TunnelCount uint64 `protobuf:"varint,2,opt,name=tunnel_count,json=tunnelCount,proto3" json:"tunnel_count,omitempty"` // tunnels is the list of tunnels. Tunnels []Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels"` - // latest_signal_prices_list is the list of latest signal prices. - LatestSignalPricesList []LatestSignalPrices `protobuf:"bytes,4,rep,name=latest_signal_prices_list,json=latestSignalPricesList,proto3" json:"latest_signal_prices_list"` // deposits is the list of deposits. - Deposits []Deposit `protobuf:"bytes,5,rep,name=deposits,proto3" json:"deposits"` + Deposits []Deposit `protobuf:"bytes,4,rep,name=deposits,proto3" json:"deposits"` // total_fees is the type for the total fees collected by the tunnel - TotalFees TotalFees `protobuf:"bytes,6,opt,name=total_fees,json=totalFees,proto3" json:"total_fees"` + TotalFees TotalFees `protobuf:"bytes,5,opt,name=total_fees,json=totalFees,proto3" json:"total_fees"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -93,13 +91,6 @@ func (m *GenesisState) GetTunnels() []Tunnel { return nil } -func (m *GenesisState) GetLatestSignalPricesList() []LatestSignalPrices { - if m != nil { - return m.LatestSignalPricesList - } - return nil -} - func (m *GenesisState) GetDeposits() []Deposit { if m != nil { return m.Deposits @@ -121,30 +112,27 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/genesis.proto", fileDescriptor_e920a50d5f95d889) } var fileDescriptor_e920a50d5f95d889 = []byte{ - // 359 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x41, 0x4f, 0xe2, 0x40, - 0x14, 0xc7, 0xdb, 0x85, 0x65, 0x77, 0x07, 0x4e, 0x5d, 0x63, 0x2a, 0x9a, 0xb1, 0x78, 0x91, 0x53, - 0x27, 0xc8, 0xc9, 0x98, 0x78, 0x10, 0xa3, 0x31, 0xe1, 0x40, 0xc0, 0x93, 0x97, 0x66, 0x5a, 0xc6, - 0x32, 0xc9, 0x30, 0xd3, 0x30, 0x0f, 0xa2, 0xdf, 0xc2, 0xa3, 0x1f, 0x89, 0x23, 0x47, 0x4f, 0xc6, - 0xc0, 0x17, 0x31, 0x9d, 0x29, 0x5c, 0xac, 0xde, 0xfa, 0xde, 0xfb, 0xfd, 0x7f, 0x79, 0x9d, 0x87, - 0x5a, 0x31, 0x95, 0x63, 0x02, 0x73, 0x29, 0x99, 0x20, 0x8b, 0x4e, 0xcc, 0x80,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91, 0x31, 0xed, 0xd7, 0xcc, 0x43, 0xe2, 0xf2, 0x3f, 0xcd, 0xb1, 0x1b, 0xb6, 0xdb, - 0xe8, 0x1f, 0xec, 0x1a, 0x77, 0xcb, 0x35, 0x76, 0x57, 0x6b, 0xec, 0x7e, 0xac, 0xb1, 0xfb, 0xb2, - 0xc1, 0xce, 0x6a, 0x83, 0x9d, 0xb7, 0x0d, 0x76, 0x1e, 0x48, 0xca, 0x61, 0x32, 0x8f, 0xc3, 0x44, - 0x4d, 0x49, 0x2e, 0x35, 0xa7, 0x4c, 0x94, 0x20, 0xc9, 0x84, 0x72, 0x49, 0x16, 0x5d, 0xf2, 0xb4, - 0x3d, 0x3a, 0x3c, 0x67, 0x4c, 0xc7, 0x35, 0x43, 0x74, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x12, - 0xa8, 0xd1, 0xca, 0x80, 0x02, 0x00, 0x00, + // 313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x86, 0xe3, 0xb6, 0x14, 0x70, 0x3b, 0x19, 0x86, 0xa8, 0x20, 0x93, 0x32, 0x75, 0xb2, 0x55, + 0x3a, 0x21, 0x24, 0x06, 0x8a, 0x40, 0x6c, 0xa8, 0x30, 0xb1, 0x54, 0x4e, 0x6a, 0xd2, 0x48, 0xad, + 0x1d, 0xd5, 0xd7, 0x0a, 0xde, 0x82, 0x27, 0xe1, 0x39, 0x3a, 0x76, 0x64, 0x42, 0xa8, 0x79, 0x11, + 0x14, 0x3b, 0xe9, 0x14, 0xd8, 0x72, 0x97, 0xef, 0xff, 0x7c, 0x67, 0xe3, 0x6e, 0x28, 0xd4, 0x84, + 0xc3, 0x52, 0x29, 0x39, 0xe3, 0xab, 0x7e, 0x28, 0x41, 0xf4, 0x79, 0x2c, 0x95, 0x34, 0x89, 0x61, + 0xe9,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0xa4, 0x67, 0x3c, 0x9a, 0x8a, 0x44, 0xf1, 0xd5, 0x80, + 0xbf, 0x95, 0x4f, 0x01, 0xef, 0xa9, 0x34, 0x61, 0xd3, 0x12, 0x83, 0xdf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x47, 0x82, 0xdd, 0x45, 0x16, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -176,7 +164,7 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a if len(m.Deposits) > 0 { for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { { @@ -188,20 +176,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - } - } - if len(m.LatestSignalPricesList) > 0 { - for iNdEx := len(m.LatestSignalPricesList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LatestSignalPricesList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x22 } } @@ -265,12 +239,6 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.LatestSignalPricesList) > 0 { - for _, e := range m.LatestSignalPricesList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } if len(m.Deposits) > 0 { for _, e := range m.Deposits { l = e.Size() @@ -404,40 +372,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestSignalPricesList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LatestSignalPricesList = append(m.LatestSignalPricesList, LatestSignalPrices{}) - if err := m.LatestSignalPricesList[len(m.LatestSignalPricesList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) } @@ -471,7 +405,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalFees", wireType) } diff --git a/x/tunnel/types/genesis_test.go b/x/tunnel/types/genesis_test.go index cbe25be69..e5d192e33 100644 --- a/x/tunnel/types/genesis_test.go +++ b/x/tunnel/types/genesis_test.go @@ -23,9 +23,6 @@ func TestValidateGenesis(t *testing.T) { Tunnels: []types.Tunnel{ {ID: 1}, }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1}, - }, }, expErr: true, expErrMsg: "length of tunnels does not match tunnel count", @@ -37,9 +34,6 @@ func TestValidateGenesis(t *testing.T) { Tunnels: []types.Tunnel{ {ID: 1}, }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1}, - }, }, expErr: true, expErrMsg: "length of tunnels does not match tunnel count", @@ -52,45 +46,10 @@ func TestValidateGenesis(t *testing.T) { {ID: 1}, {ID: 1}, // Duplicate ID }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1}, - {TunnelID: 1}, - }, }, expErr: true, expErrMsg: "duplicate tunnel ID found", }, - "tunnel count mismatch in latest signal prices": { - genesisState: types.GenesisState{ - Params: types.DefaultParams(), - TunnelCount: 2, - Tunnels: []types.Tunnel{ - {ID: 1}, - {ID: 2}, - }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1}, - }, - }, - expErr: true, - expErrMsg: "tunnel count mismatch in latest signal prices", - }, - "invalid latest signal prices": { - genesisState: types.GenesisState{ - Params: types.DefaultParams(), - TunnelCount: 2, - Tunnels: []types.Tunnel{ - {ID: 1}, - {ID: 2}, - }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1}, - {TunnelID: 2}, - }, - }, - expErr: true, - expErrMsg: "invalid latest signal prices", - }, "deposit has non-existent": { genesisState: types.GenesisState{ Params: types.DefaultParams(), @@ -99,14 +58,6 @@ func TestValidateGenesis(t *testing.T) { {ID: 1}, {ID: 2}, }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1, SignalPrices: []types.SignalPrice{ - {SignalID: "signal1", Price: 100}, - }, LastInterval: 0}, - {TunnelID: 2, SignalPrices: []types.SignalPrice{ - {SignalID: "signal1", Price: 100}, - }, LastInterval: 0}, - }, Deposits: []types.Deposit{ { TunnelID: 3, @@ -126,14 +77,6 @@ func TestValidateGenesis(t *testing.T) { {ID: 1}, {ID: 2}, }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1, SignalPrices: []types.SignalPrice{ - {SignalID: "signal1", Price: 100}, - }, LastInterval: 0}, - {TunnelID: 2, SignalPrices: []types.SignalPrice{ - {SignalID: "signal1", Price: 100}, - }, LastInterval: 0}, - }, Deposits: []types.Deposit{ { TunnelID: 1, @@ -158,14 +101,6 @@ func TestValidateGenesis(t *testing.T) { {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 100))}, {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 200))}, }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1, SignalPrices: []types.SignalPrice{ - {SignalID: "signal1", Price: 100}, - }, LastInterval: 0}, - {TunnelID: 2, SignalPrices: []types.SignalPrice{ - {SignalID: "signal1", Price: 100}, - }, LastInterval: 0}, - }, Deposits: []types.Deposit{ { TunnelID: 1, @@ -185,14 +120,6 @@ func TestValidateGenesis(t *testing.T) { {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 100))}, {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 200))}, }, - LatestSignalPricesList: []types.LatestSignalPrices{ - {TunnelID: 1, SignalPrices: []types.SignalPrice{ - {SignalID: "signal1", Price: 100}, - }, LastInterval: 0}, - {TunnelID: 2, SignalPrices: []types.SignalPrice{ - {SignalID: "signal1", Price: 100}, - }, LastInterval: 0}, - }, Deposits: []types.Deposit{ { TunnelID: 1, diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 246b872a2..54eff7627 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -34,11 +34,11 @@ var ( TotalFeeStoreKey = []byte{0x01} // store prefixes - ActiveTunnelIDStoreKeyPrefix = []byte{0x10} - TunnelStoreKeyPrefix = []byte{0x11} - PacketStoreKeyPrefix = []byte{0x12} - LatestSignalPricesStoreKeyPrefix = []byte{0x13} - DepositStoreKeyPrefix = []byte{0x14} + ActiveTunnelIDStoreKeyPrefix = []byte{0x10} + TunnelStoreKeyPrefix = []byte{0x11} + PacketStoreKeyPrefix = []byte{0x12} + LatestPricesStoreKeyPrefix = []byte{0x13} + DepositStoreKeyPrefix = []byte{0x14} // params store keys ParamsKey = []byte{0x90} @@ -64,9 +64,9 @@ func TunnelPacketStoreKey(tunnelID uint64, packetID uint64) []byte { return append(TunnelPacketsStoreKey(tunnelID), sdk.Uint64ToBigEndian(packetID)...) } -// LatestSignalPricesStoreKey returns the key to retrieve the latest signal prices from the store. -func LatestSignalPricesStoreKey(tunnelID uint64) []byte { - return append(LatestSignalPricesStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) +// LatestPricesStoreKey returns the key to retrieve the latest prices from the store. +func LatestPricesStoreKey(tunnelID uint64) []byte { + return append(LatestPricesStoreKeyPrefix, sdk.Uint64ToBigEndian(tunnelID)...) } // DepositsStoreKey returns the key to retrieve all deposits of a tunnel from the store. diff --git a/x/tunnel/types/keys_test.go b/x/tunnel/types/keys_test.go index 4b220d9d7..f46471be5 100644 --- a/x/tunnel/types/keys_test.go +++ b/x/tunnel/types/keys_test.go @@ -31,9 +31,9 @@ func TestTunnelPacketStoreKey(t *testing.T) { require.Equal(t, expect, types.TunnelPacketStoreKey(1, 2)) } -func TestLatestSignalPricesStoreKey(t *testing.T) { +func TestLatestPricesStoreKey(t *testing.T) { expect, _ := hex.DecodeString("130000000000000001") - require.Equal(t, expect, types.LatestSignalPricesStoreKey(1)) + require.Equal(t, expect, types.LatestPricesStoreKey(1)) } func TestDepositsStoreKey(t *testing.T) { diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 9d930c05a..9c8db9764 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -6,6 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" ) var ( @@ -19,7 +21,7 @@ func NewMsgCreateTunnel( signalDeviations []SignalDeviation, interval uint64, route RouteI, - encoder Encoder, + encoder feedstypes.Encoder, initialDeposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { @@ -48,7 +50,7 @@ func NewMsgCreateTSSTunnel( interval uint64, destinationChainID string, destinationContractAddress string, - encoder Encoder, + encoder feedstypes.Encoder, initialDeposit sdk.Coins, creator sdk.AccAddress, ) (*MsgCreateTunnel, error) { @@ -98,7 +100,7 @@ func (m MsgCreateTunnel) ValidateBasic() error { } // encoder must be valid - if err := ValidateEncoder(m.Encoder); err != nil { + if err := feedstypes.ValidateEncoder(m.Encoder); err != nil { return err } diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index a496cf4f0..8b3d3599c 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -3,6 +3,8 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" ) var _ types.UnpackInterfacesMessage = Packet{} @@ -10,7 +12,7 @@ var _ types.UnpackInterfacesMessage = Packet{} func NewPacket( tunnelID uint64, sequence uint64, - signalPrices []SignalPrice, + prices []feedstypes.Price, baseFee sdk.Coins, routeFee sdk.Coins, createdAt int64, @@ -18,7 +20,7 @@ func NewPacket( return Packet{ TunnelID: tunnelID, Sequence: sequence, - SignalPrices: signalPrices, + Prices: prices, PacketContent: nil, BaseFee: baseFee, RouteFee: routeFee, diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 3236314da..643317f2e 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -1,6 +1,10 @@ package types -import "fmt" +import ( + "fmt" + + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" +) // NewSignalDeviation creates a new SignalDeviation instance. func NewSignalDeviation( @@ -15,56 +19,45 @@ func NewSignalDeviation( } } -// NewLatestSignalPrices creates a new LatestSignalPrices instance. -func NewLatestSignalPrices( +// NewLatestPrices creates a new LatestPrices instance. +func NewLatestPrices( tunnelID uint64, - signalPrices []SignalPrice, + prices []feedstypes.Price, lastInterval int64, -) LatestSignalPrices { - return LatestSignalPrices{ +) LatestPrices { + return LatestPrices{ TunnelID: tunnelID, - SignalPrices: signalPrices, + Prices: prices, LastInterval: lastInterval, } } -// Validate validates the latest signal prices. -func (l LatestSignalPrices) Validate() error { +// Validate validates the latest prices. +func (l LatestPrices) Validate() error { if l.TunnelID == 0 { return fmt.Errorf("tunnel ID cannot be 0") } - if len(l.SignalPrices) == 0 { - return fmt.Errorf("signal prices cannot be empty") - } + if l.LastInterval < 0 { return fmt.Errorf("last interval cannot be negative") } + return nil } -// UpdateSignalPrices updates the signal prices in the latest signal prices. -func (l *LatestSignalPrices) UpdateSignalPrices(newSignalPrices []SignalPrice) { - // create a map of new signal prices - newSpMap := make(map[string]SignalPrice) - for _, sp := range newSignalPrices { - newSpMap[sp.SignalID] = sp +// UpdatePrices updates prices in the latest prices. +func (l *LatestPrices) UpdatePrices(newPrices []feedstypes.Price) { + pricesIndex := make(map[string]int) + for i, p := range l.Prices { + pricesIndex[p.SignalID] = i } - // update signal prices - for i, sp := range l.SignalPrices { - if newSp, ok := newSpMap[sp.SignalID]; ok { - l.SignalPrices[i] = newSp + for _, p := range newPrices { + if i, ok := pricesIndex[p.SignalID]; ok { + l.Prices[i] = p + } else { + l.Prices = append(l.Prices, p) + pricesIndex[p.SignalID] = len(l.Prices) - 1 } } } - -// NewSignalPrice creates a new SignalPrice instance. -func NewSignalPrice( - signalID string, - price uint64, -) SignalPrice { - return SignalPrice{ - SignalID: signalID, - Price: price, - } -} diff --git a/x/tunnel/types/signal_test.go b/x/tunnel/types/signal_test.go index abff8cefd..62cb85380 100644 --- a/x/tunnel/types/signal_test.go +++ b/x/tunnel/types/signal_test.go @@ -5,51 +5,39 @@ import ( "github.com/stretchr/testify/require" + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) func TestLatestSignalPrices_Validate(t *testing.T) { + examplePrices := []feedstypes.Price{ + feedstypes.NewPrice(feedstypes.PriceStatusAvailable, "signal1", 100, 0), + } + cases := map[string]struct { - latestSignalPrices types.LatestSignalPrices - expErr bool - expErrMsg string + latestPrices types.LatestPrices + expErr bool + expErrMsg string }{ - "valid latest signal prices": { - latestSignalPrices: types.NewLatestSignalPrices( - 1, - []types.SignalPrice{{SignalID: "signal1", Price: 100}}, - 10, - ), - expErr: false, + "valid latest prices": { + latestPrices: types.NewLatestPrices(1, examplePrices, 10), + expErr: false, }, "invalid tunnel ID": { - latestSignalPrices: types.NewLatestSignalPrices( - 0, - []types.SignalPrice{{SignalID: "signal1", Price: 100}}, - 10, - ), - expErr: true, - expErrMsg: "tunnel ID cannot be 0", - }, - "empty signal prices": { - latestSignalPrices: types.NewLatestSignalPrices(1, []types.SignalPrice{}, 10), - expErr: true, - expErrMsg: "signal prices cannot be empty", + latestPrices: types.NewLatestPrices(0, examplePrices, 10), + expErr: true, + expErrMsg: "tunnel ID cannot be 0", }, "negative last interval": { - latestSignalPrices: types.NewLatestSignalPrices( - 1, - []types.SignalPrice{{SignalID: "signal1", Price: 100}}, - -1, - ), - expErr: true, - expErrMsg: "last interval cannot be negative", + latestPrices: types.NewLatestPrices(1, examplePrices, -1), + expErr: true, + expErrMsg: "last interval cannot be negative", }, } for name, tc := range cases { t.Run(name, func(t *testing.T) { - err := tc.latestSignalPrices.Validate() + err := tc.latestPrices.Validate() if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) @@ -60,13 +48,19 @@ func TestLatestSignalPrices_Validate(t *testing.T) { } } -func TestLatestSignalPrices_UpdateSignalPrices(t *testing.T) { - initialSignalPrices := []types.SignalPrice{{SignalID: "signal1", Price: 100}} - latestSignalPrices := types.NewLatestSignalPrices(1, initialSignalPrices, 10) +func TestLatestPrices_UpdatePrices(t *testing.T) { + initialPrices := []feedstypes.Price{ + {Status: feedstypes.PriceStatusAvailable, SignalID: "signal1", Price: 100}, + } + latestPrices := types.NewLatestPrices(1, initialPrices, 10) - newSignalPrices := []types.SignalPrice{{SignalID: "signal1", Price: 200}, {SignalID: "signal2", Price: 300}} - latestSignalPrices.UpdateSignalPrices(newSignalPrices) + newPrices := []feedstypes.Price{ + {Status: feedstypes.PriceStatusAvailable, SignalID: "signal1", Price: 200}, + {Status: feedstypes.PriceStatusAvailable, SignalID: "signal2", Price: 300}, + } + latestPrices.UpdatePrices(newPrices) - require.Len(t, latestSignalPrices.SignalPrices, 1) - require.Equal(t, uint64(200), latestSignalPrices.SignalPrices[0].Price) + require.Len(t, latestPrices.Prices, 2) + require.Equal(t, uint64(200), latestPrices.Prices[0].Price) + require.Equal(t, uint64(300), latestPrices.Prices[1].Price) } diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index f2732b7f6..dcdc42605 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -7,6 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" ) var _ types.UnpackInterfacesMessage = Tunnel{} @@ -16,7 +18,7 @@ func NewTunnel( id uint64, sequence uint64, route RouteI, - encoder Encoder, + encoder feedstypes.Encoder, feePayer string, signalDeviations []SignalDeviation, interval uint64, @@ -87,11 +89,3 @@ func (t Tunnel) GetSignalIDs() []string { } return signalIDs } - -// ValidateEncoder validates the encoder. -func ValidateEncoder(encoder Encoder) error { - if encoder == ENCODER_FIXED_POINT_ABI || encoder == ENCODER_TICK_ABI { - return nil - } - return fmt.Errorf("invalid encoder: %s", encoder) -} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index bd6741a05..17999146b 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -6,6 +6,7 @@ package types import ( fmt "fmt" github_com_bandprotocol_chain_v3_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" + types2 "github.com/bandprotocol/chain/v3/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -29,38 +30,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Encoder is an enumerator that defines the mode of encoding message in tunnel module. -type Encoder int32 - -const ( - // ENCODER_UNSPECIFIED is an unspecified encoder mode. - ENCODER_UNSPECIFIED Encoder = 0 - // ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9). - ENCODER_FIXED_POINT_ABI Encoder = 1 - // ENCODER_TICK_ABI is a tick abi encoder. - ENCODER_TICK_ABI Encoder = 2 -) - -var Encoder_name = map[int32]string{ - 0: "ENCODER_UNSPECIFIED", - 1: "ENCODER_FIXED_POINT_ABI", - 2: "ENCODER_TICK_ABI", -} - -var Encoder_value = map[string]int32{ - "ENCODER_UNSPECIFIED": 0, - "ENCODER_FIXED_POINT_ABI": 1, - "ENCODER_TICK_ABI": 2, -} - -func (x Encoder) String() string { - return proto.EnumName(Encoder_name, int32(x)) -} - -func (Encoder) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{0} -} - // TSSRoute is the type for a TSS route type TSSRoute struct { // destination_chain_id is the destination chain ID @@ -253,7 +222,7 @@ type Tunnel struct { // route is the route for delivering the signal prices Route *types1.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder types2.Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.feeds.v1beta1.Encoder" json:"encoder,omitempty"` // fee_payer is the address of the fee payer FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` // signal_deviations is the list of signal deviations @@ -324,11 +293,11 @@ func (m *Tunnel) GetRoute() *types1.Any { return nil } -func (m *Tunnel) GetEncoder() Encoder { +func (m *Tunnel) GetEncoder() types2.Encoder { if m != nil { return m.Encoder } - return ENCODER_UNSPECIFIED + return types2.ENCODER_UNSPECIFIED } func (m *Tunnel) GetFeePayer() string { @@ -380,28 +349,28 @@ func (m *Tunnel) GetCreator() string { return "" } -// LatestSignalPrices is the type for signal prices that tunnel produces -type LatestSignalPrices struct { +// LatestPrices is the type for prices that tunnel produces +type LatestPrices struct { // tunnel_id is the tunnel ID TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // signal_prices is the list of signal prices - SignalPrices []SignalPrice `protobuf:"bytes,2,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` + // prices is the list of prices information from feeds module. + Prices []types2.Price `protobuf:"bytes,2,rep,name=prices,proto3" json:"prices"` // last_interval is the last interval when the signal prices are produced by interval trigger LastInterval int64 `protobuf:"varint,3,opt,name=last_interval,json=lastInterval,proto3" json:"last_interval,omitempty"` } -func (m *LatestSignalPrices) Reset() { *m = LatestSignalPrices{} } -func (m *LatestSignalPrices) String() string { return proto.CompactTextString(m) } -func (*LatestSignalPrices) ProtoMessage() {} -func (*LatestSignalPrices) Descriptor() ([]byte, []int) { +func (m *LatestPrices) Reset() { *m = LatestPrices{} } +func (m *LatestPrices) String() string { return proto.CompactTextString(m) } +func (*LatestPrices) ProtoMessage() {} +func (*LatestPrices) Descriptor() ([]byte, []int) { return fileDescriptor_6bb6151451ba2f25, []int{4} } -func (m *LatestSignalPrices) XXX_Unmarshal(b []byte) error { +func (m *LatestPrices) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *LatestSignalPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *LatestPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_LatestSignalPrices.Marshal(b, m, deterministic) + return xxx_messageInfo_LatestPrices.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -411,94 +380,39 @@ func (m *LatestSignalPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *LatestSignalPrices) XXX_Merge(src proto.Message) { - xxx_messageInfo_LatestSignalPrices.Merge(m, src) +func (m *LatestPrices) XXX_Merge(src proto.Message) { + xxx_messageInfo_LatestPrices.Merge(m, src) } -func (m *LatestSignalPrices) XXX_Size() int { +func (m *LatestPrices) XXX_Size() int { return m.Size() } -func (m *LatestSignalPrices) XXX_DiscardUnknown() { - xxx_messageInfo_LatestSignalPrices.DiscardUnknown(m) +func (m *LatestPrices) XXX_DiscardUnknown() { + xxx_messageInfo_LatestPrices.DiscardUnknown(m) } -var xxx_messageInfo_LatestSignalPrices proto.InternalMessageInfo +var xxx_messageInfo_LatestPrices proto.InternalMessageInfo -func (m *LatestSignalPrices) GetTunnelID() uint64 { +func (m *LatestPrices) GetTunnelID() uint64 { if m != nil { return m.TunnelID } return 0 } -func (m *LatestSignalPrices) GetSignalPrices() []SignalPrice { +func (m *LatestPrices) GetPrices() []types2.Price { if m != nil { - return m.SignalPrices + return m.Prices } return nil } -func (m *LatestSignalPrices) GetLastInterval() int64 { +func (m *LatestPrices) GetLastInterval() int64 { if m != nil { return m.LastInterval } return 0 } -// SignalPrice is the type for a signal price -type SignalPrice struct { - // signal_id is the signal ID - SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - // price is the price of the signal - Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` -} - -func (m *SignalPrice) Reset() { *m = SignalPrice{} } -func (m *SignalPrice) String() string { return proto.CompactTextString(m) } -func (*SignalPrice) ProtoMessage() {} -func (*SignalPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{5} -} -func (m *SignalPrice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignalPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignalPrice.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 *SignalPrice) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignalPrice.Merge(m, src) -} -func (m *SignalPrice) XXX_Size() int { - return m.Size() -} -func (m *SignalPrice) XXX_DiscardUnknown() { - xxx_messageInfo_SignalPrice.DiscardUnknown(m) -} - -var xxx_messageInfo_SignalPrice proto.InternalMessageInfo - -func (m *SignalPrice) GetSignalID() string { - if m != nil { - return m.SignalID - } - return "" -} - -func (m *SignalPrice) GetPrice() uint64 { - if m != nil { - return m.Price - } - return 0 -} - // TotalFees is the type for the total fees collected by the tunnel type TotalFees struct { // total_packet_fee is the total packet fee collected @@ -509,7 +423,7 @@ func (m *TotalFees) Reset() { *m = TotalFees{} } func (m *TotalFees) String() string { return proto.CompactTextString(m) } func (*TotalFees) ProtoMessage() {} func (*TotalFees) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{6} + return fileDescriptor_6bb6151451ba2f25, []int{5} } func (m *TotalFees) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -551,8 +465,8 @@ type Packet struct { TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // sequence is representing the sequence of the tunnel packet. Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` - // signal_prices is the list of signal prices - SignalPrices []SignalPrice `protobuf:"bytes,3,rep,name=signal_prices,json=signalPrices,proto3" json:"signal_prices"` + // prices is the list of prices information from feeds module. + Prices []types2.Price `protobuf:"bytes,3,rep,name=prices,proto3" json:"prices"` // packet_content is the content of the packet that implements PacketContentI PacketContent *types1.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` // base_fee is the base fee of the packet @@ -567,7 +481,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{7} + return fileDescriptor_6bb6151451ba2f25, []int{6} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,9 +524,9 @@ func (m *Packet) GetSequence() uint64 { return 0 } -func (m *Packet) GetSignalPrices() []SignalPrice { +func (m *Packet) GetPrices() []types2.Price { if m != nil { - return m.SignalPrices + return m.Prices } return nil } @@ -659,7 +573,7 @@ func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } func (*TSSPacketContent) ProtoMessage() {} func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{8} + return fileDescriptor_6bb6151451ba2f25, []int{7} } func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -710,13 +624,11 @@ func (m *TSSPacketContent) GetDestinationContractAddress() string { } func init() { - proto.RegisterEnum("band.tunnel.v1beta1.Encoder", Encoder_name, Encoder_value) proto.RegisterType((*TSSRoute)(nil), "band.tunnel.v1beta1.TSSRoute") proto.RegisterType((*SignalDeviation)(nil), "band.tunnel.v1beta1.SignalDeviation") proto.RegisterType((*Deposit)(nil), "band.tunnel.v1beta1.Deposit") proto.RegisterType((*Tunnel)(nil), "band.tunnel.v1beta1.Tunnel") - proto.RegisterType((*LatestSignalPrices)(nil), "band.tunnel.v1beta1.LatestSignalPrices") - proto.RegisterType((*SignalPrice)(nil), "band.tunnel.v1beta1.SignalPrice") + proto.RegisterType((*LatestPrices)(nil), "band.tunnel.v1beta1.LatestPrices") proto.RegisterType((*TotalFees)(nil), "band.tunnel.v1beta1.TotalFees") proto.RegisterType((*Packet)(nil), "band.tunnel.v1beta1.Packet") proto.RegisterType((*TSSPacketContent)(nil), "band.tunnel.v1beta1.TSSPacketContent") @@ -725,77 +637,71 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 1117 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0xda, 0x8e, 0x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0a, 0x00, 0x00, + // 1014 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0xe3, 0x44, + 0x18, 0xae, 0x93, 0x34, 0xb1, 0xa7, 0x1f, 0x74, 0x87, 0x68, 0xe5, 0xed, 0x42, 0x12, 0x15, 0x0e, + 0x01, 0xa9, 0x36, 0xdb, 0x55, 0x17, 0xa9, 0x27, 0x9a, 0x86, 0x6a, 0x2d, 0x40, 0x54, 0x4e, 0x25, + 0x24, 0x2e, 0xd6, 0xc4, 0x9e, 0x24, 0xc3, 0xa6, 0x33, 0xc6, 0x33, 0x89, 0xe8, 0x3f, 0xe0, 0xc8, + 0x1f, 0x00, 0x21, 0x4e, 0x2b, 0x4e, 0x1c, 0xfa, 0x13, 0x38, 0xac, 0x7a, 0x5a, 0x71, 0xe2, 0x80, + 0x02, 0x4a, 0x0f, 0xf0, 0x1b, 0x38, 0xa1, 0xf9, 0x70, 0xd2, 0x54, 0x5d, 0x4a, 0xa5, 0x72, 0x69, + 0xfb, 0xbe, 0xf3, 0xbc, 0x5f, 0xcf, 0xfb, 0x8c, 0x3b, 0xa0, 0xd1, 0x45, 0x34, 0xf1, 0xc5, 0x88, + 0x52, 0x3c, 0xf4, 0xc7, 0x8f, 0xba, 0x58, 0xa0, 0x47, 0xc6, 0xf4, 0xd2, 0x8c, 0x09, 0x06, 0x5f, + 0x97, 0x08, 0xcf, 0xb8, 0x0c, 0x62, 0xf3, 0x1e, 0x3a, 0x21, 0x94, 0xf9, 0xea, 0xa7, 0xc6, 0x6d, + 0xd6, 0x62, 0xc6, 0x4f, 0x18, 0xf7, 0xbb, 0x88, 0xe3, 0x59, 0xa6, 0x98, 0x11, 0x6a, 0xce, 0x1f, + 0xe8, 0xf3, 0x48, 0x59, 0xbe, 0x36, 0xcc, 0x51, 0xb5, 0xcf, 0xfa, 0x4c, 0xfb, 0xe5, 0x5f,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0x4e, 0xea, 0x4e, 0x47, 0x7b, 0x83, 0xf6, 0xdf, + 0x93, 0xfa, 0xde, 0xa5, 0x66, 0xe4, 0xba, 0x14, 0xd5, 0x31, 0x1b, 0xfa, 0xea, 0xdf, 0xb8, 0x3f, + 0x7e, 0xec, 0x7f, 0xa5, 0xfc, 0x82, 0x73, 0xd3, 0xda, 0x2c, 0x3a, 0x74, 0x4c, 0xfa, 0x20, 0x79, + 0xe5, 0x1b, 0xa0, 0x70, 0xe7, 0x6f, 0x80, 0xe2, 0x8d, 0x6f, 0x80, 0x6b, 0x04, 0xd2, 0xfa, 0xe4, + 0xf9, 0xb4, 0x66, 0xbd, 0x98, 0xd6, 0xac, 0x97, 0xd3, 0x9a, 0xf5, 0xc7, 0xb4, 0x66, 0x7d, 0x73, + 0x51, 0x5b, 0x7a, 0x79, 0x51, 0x5b, 0xfa, 0xf5, 0xa2, 0xb6, 0xf4, 0xb9, 0xff, 0x1f, 0x48, 0x30, + 0x4f, 0x38, 0xc5, 0x41, 0xb7, 0xac, 0x10, 0x8f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x3a, + 0xe1, 0x4d, 0xde, 0x09, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -954,14 +860,14 @@ func (this *Tunnel) Equal(that interface{}) bool { } return true } -func (this *LatestSignalPrices) Equal(that interface{}) bool { +func (this *LatestPrices) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*LatestSignalPrices) + that1, ok := that.(*LatestPrices) if !ok { - that2, ok := that.(LatestSignalPrices) + that2, ok := that.(LatestPrices) if ok { that1 = &that2 } else { @@ -976,11 +882,11 @@ func (this *LatestSignalPrices) Equal(that interface{}) bool { if this.TunnelID != that1.TunnelID { return false } - if len(this.SignalPrices) != len(that1.SignalPrices) { + if len(this.Prices) != len(that1.Prices) { return false } - for i := range this.SignalPrices { - if !this.SignalPrices[i].Equal(&that1.SignalPrices[i]) { + for i := range this.Prices { + if !this.Prices[i].Equal(&that1.Prices[i]) { return false } } @@ -989,33 +895,6 @@ func (this *LatestSignalPrices) Equal(that interface{}) bool { } return true } -func (this *SignalPrice) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SignalPrice) - if !ok { - that2, ok := that.(SignalPrice) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.SignalID != that1.SignalID { - return false - } - if this.Price != that1.Price { - return false - } - return true -} func (this *TotalFees) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1070,11 +949,11 @@ func (this *Packet) Equal(that interface{}) bool { if this.Sequence != that1.Sequence { return false } - if len(this.SignalPrices) != len(that1.SignalPrices) { + if len(this.Prices) != len(that1.Prices) { return false } - for i := range this.SignalPrices { - if !this.SignalPrices[i].Equal(&that1.SignalPrices[i]) { + for i := range this.Prices { + if !this.Prices[i].Equal(&that1.Prices[i]) { return false } } @@ -1370,7 +1249,7 @@ func (m *Tunnel) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *LatestSignalPrices) Marshal() (dAtA []byte, err error) { +func (m *LatestPrices) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1380,12 +1259,12 @@ func (m *LatestSignalPrices) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *LatestSignalPrices) MarshalTo(dAtA []byte) (int, error) { +func (m *LatestPrices) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *LatestSignalPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *LatestPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1395,10 +1274,10 @@ func (m *LatestSignalPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if len(m.SignalPrices) > 0 { - for iNdEx := len(m.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Prices) > 0 { + for iNdEx := len(m.Prices) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SignalPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Prices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1417,41 +1296,6 @@ func (m *LatestSignalPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SignalPrice) 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 *SignalPrice) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignalPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Price != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.Price)) - i-- - dAtA[i] = 0x10 - } - if len(m.SignalID) > 0 { - i -= len(m.SignalID) - copy(dAtA[i:], m.SignalID) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.SignalID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *TotalFees) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1554,10 +1398,10 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.SignalPrices) > 0 { - for iNdEx := len(m.SignalPrices) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Prices) > 0 { + for iNdEx := len(m.Prices) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.SignalPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Prices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1743,7 +1587,7 @@ func (m *Tunnel) Size() (n int) { return n } -func (m *LatestSignalPrices) Size() (n int) { +func (m *LatestPrices) Size() (n int) { if m == nil { return 0 } @@ -1752,8 +1596,8 @@ func (m *LatestSignalPrices) Size() (n int) { if m.TunnelID != 0 { n += 1 + sovTunnel(uint64(m.TunnelID)) } - if len(m.SignalPrices) > 0 { - for _, e := range m.SignalPrices { + if len(m.Prices) > 0 { + for _, e := range m.Prices { l = e.Size() n += 1 + l + sovTunnel(uint64(l)) } @@ -1764,22 +1608,6 @@ func (m *LatestSignalPrices) Size() (n int) { return n } -func (m *SignalPrice) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SignalID) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - if m.Price != 0 { - n += 1 + sovTunnel(uint64(m.Price)) - } - return n -} - func (m *TotalFees) Size() (n int) { if m == nil { return 0 @@ -1807,8 +1635,8 @@ func (m *Packet) Size() (n int) { if m.Sequence != 0 { n += 1 + sovTunnel(uint64(m.Sequence)) } - if len(m.SignalPrices) > 0 { - for _, e := range m.SignalPrices { + if len(m.Prices) > 0 { + for _, e := range m.Prices { l = e.Size() n += 1 + l + sovTunnel(uint64(l)) } @@ -2347,7 +2175,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Encoder |= Encoder(b&0x7F) << shift + m.Encoder |= types2.Encoder(b&0x7F) << shift if b < 0x80 { break } @@ -2563,7 +2391,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } return nil } -func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { +func (m *LatestPrices) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2586,10 +2414,10 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LatestSignalPrices: wiretype end group for non-group") + return fmt.Errorf("proto: LatestPrices: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LatestSignalPrices: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: LatestPrices: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2613,7 +2441,7 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2640,8 +2468,8 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPrices = append(m.SignalPrices, SignalPrice{}) - if err := m.SignalPrices[len(m.SignalPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Prices = append(m.Prices, types2.Price{}) + if err := m.Prices[len(m.Prices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2685,107 +2513,6 @@ func (m *LatestSignalPrices) Unmarshal(dAtA []byte) error { } return nil } -func (m *SignalPrice) 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 ErrIntOverflowTunnel - } - 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: SignalPrice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignalPrice: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SignalID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) - } - m.Price = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Price |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTunnel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *TotalFees) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2939,7 +2666,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalPrices", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2966,8 +2693,8 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SignalPrices = append(m.SignalPrices, SignalPrice{}) - if err := m.SignalPrices[len(m.SignalPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Prices = append(m.Prices, types2.Price{}) + if err := m.Prices[len(m.Prices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/tunnel/types/tunnel_test.go b/x/tunnel/types/tunnel_test.go index d99f3d0a1..4a4c631be 100644 --- a/x/tunnel/types/tunnel_test.go +++ b/x/tunnel/types/tunnel_test.go @@ -38,13 +38,3 @@ func TestTunnel_GetSignalIDs(t *testing.T) { require.Contains(t, signalIDs, "signal1") require.Contains(t, signalIDs, "signal2") } - -func TestValidateEncoder(t *testing.T) { - // validate encoder - err := types.ValidateEncoder(1) - require.NoError(t, err) - - // invalid encoder - err = types.ValidateEncoder(999) - require.Error(t, err) -} diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 718d717c7..e6322a318 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -6,10 +6,11 @@ package types import ( context "context" fmt "fmt" + types1 "github.com/bandprotocol/chain/v3/x/feeds/types" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/cosmos-sdk/types" + types2 "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" @@ -43,7 +44,7 @@ type MsgCreateTunnel struct { // route is the route for delivering the signal prices Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.tunnel.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder types1.Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.feeds.v1beta1.Encoder" json:"encoder,omitempty"` // initial_deposit is the deposit value that must be paid at tunnel creation. InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit"` // creator is the address of the creator. @@ -104,11 +105,11 @@ func (m *MsgCreateTunnel) GetRoute() *types.Any { return nil } -func (m *MsgCreateTunnel) GetEncoder() Encoder { +func (m *MsgCreateTunnel) GetEncoder() types1.Encoder { if m != nil { return m.Encoder } - return ENCODER_UNSPECIFIED + return types1.ENCODER_UNSPECIFIED } func (m *MsgCreateTunnel) GetInitialDeposit() github_com_cosmos_cosmos_sdk_types.Coins { @@ -873,73 +874,74 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tx.proto", fileDescriptor_d18351d83b4705d0) } var fileDescriptor_d18351d83b4705d0 = []byte{ - // 1046 bytes of a gzipped FileDescriptorProto + // 1059 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x41, 0x6f, 0x1b, 0x45, 0x14, 0xce, 0xda, 0x89, 0x9b, 0x4c, 0xd2, 0xa6, 0xdd, 0xba, 0xc4, 0x5e, 0x82, 0x6d, 0x96, 0x56, - 0x75, 0xa3, 0x64, 0x97, 0xb8, 0xb4, 0x82, 0x70, 0x8a, 0x6b, 0x90, 0x72, 0xb0, 0x84, 0xb6, 0x81, - 0x4a, 0x08, 0x29, 0x5a, 0x7b, 0x87, 0xf5, 0xa8, 0xf6, 0x8e, 0xb5, 0x33, 0x76, 0x6b, 0x4e, 0x88, - 0x23, 0x27, 0x38, 0x70, 0x42, 0x42, 0xe2, 0x86, 0x7a, 0x21, 0x87, 0xfe, 0x88, 0x0a, 0x09, 0x29, - 0xe2, 0xc4, 0x29, 0xa0, 0xe4, 0x10, 0x89, 0x5f, 0x81, 0x76, 0x66, 0x76, 0x76, 0xbd, 0x59, 0x27, - 0x0e, 0x8a, 0x90, 0x7a, 0x89, 0x77, 0xde, 0xfb, 0xe6, 0xbd, 0xef, 0x7d, 0x33, 0xfb,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, 0x31, 0xd2, 0x3b, 0x04, 0x57, 0xc7, 0x1b, 0xf6, 0x9d, + 0x49, 0x87, 0xc7, 0x60, 0xda, 0xc6, 0x54, 0x30, 0x19, 0xe6, 0x09, 0x58, 0x4e, 0x76, 0xd7, 0xbb, + 0x93, 0x59, 0x8e, 0x01, 0x35, 0x73, 0x4a, 0xa0, 0x0c, 0x46, 0x81, 0x9a, 0xd2, 0x88, 0x26, 0xaa, + 0x72, 0x16, 0xab, 0xd5, 0xa6, 0xc7, 0xca, 0xa8, 0x2d, 0xb0, 0x34, 0xf6, 0xc2, 0xde, 0x3e, 0xff, + 0x16, 0x71, 0x94, 0xb6, 0x3e, 0x0d, 0x2a, 0x8c, 0xa1, 0xcd, 0x7d, 0x1d, 0x34, 0xad, 0xfa, 0xee, + 0xcb, 0xe3, 0x92, 0x72, 0x78, 0x5c, 0x52, 0xfe, 0x3e, 0x2e, 0x29, 0xdf, 0x9d, 0x94, 0x66, 0x0e, + 0x4f, 0x4a, 0x33, 0x7f, 0x9e, 0x94, 0x66, 0xbe, 0x30, 0x63, 0xdd, 0x2f, 0x70, 0xcc, 0xbe, 0xd3, + 0xdb, 0xb8, 0x6b, 0xb6, 0x3b, 0x36, 0xf2, 0xcc, 0xe1, 0x7d, 0xf3, 0x59, 0xf8, 0x8f, 0x07, 0x6b, + 0x85, 0xad, 0x1c, 0x43, 0xdc, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xef, 0x4b, 0x21, 0xa1, + 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2247,7 +2249,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Encoder |= Encoder(b&0x7F) << shift + m.Encoder |= types1.Encoder(b&0x7F) << shift if b < 0x80 { break } @@ -2281,7 +2283,7 @@ func (m *MsgCreateTunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.InitialDeposit = append(m.InitialDeposit, types1.Coin{}) + m.InitialDeposit = append(m.InitialDeposit, types2.Coin{}) if err := m.InitialDeposit[len(m.InitialDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3142,7 +3144,7 @@ func (m *MsgDepositToTunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = append(m.Amount, types1.Coin{}) + m.Amount = append(m.Amount, types2.Coin{}) if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3327,7 +3329,7 @@ func (m *MsgWithdrawFromTunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = append(m.Amount, types1.Coin{}) + m.Amount = append(m.Amount, types2.Coin{}) if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } From f7ba778e30fb40f28ed0d6df7725d30f912142d8 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 12 Nov 2024 16:39:58 +0700 Subject: [PATCH 251/272] remove latest price update price and interval function --- .../keeper/keeper_latest_signal_prices.go | 29 ------------------- x/tunnel/keeper/keeper_packet.go | 9 ++---- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/x/tunnel/keeper/keeper_latest_signal_prices.go b/x/tunnel/keeper/keeper_latest_signal_prices.go index 376bc10ca..feb41e30b 100644 --- a/x/tunnel/keeper/keeper_latest_signal_prices.go +++ b/x/tunnel/keeper/keeper_latest_signal_prices.go @@ -5,7 +5,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) @@ -48,31 +47,3 @@ func (k Keeper) GetAllLatestPrices(ctx sdk.Context) []types.LatestPrices { } return allLatestPrices } - -// UpdateLastInterval updates the last interval timestamp of the tunnel in the LatestPrices. -// LatestPrices of the tunnel must be set before calling this function. -func (k Keeper) UpdateLastInterval(ctx sdk.Context, tunnelID uint64, timestamp int64) error { - latestPrices, err := k.GetLatestPrices(ctx, tunnelID) - if err != nil { - return err - } - - latestPrices.LastInterval = timestamp - k.SetLatestPrices(ctx, latestPrices) - - return nil -} - -// UpdatePriceTunnel updates the prices of the tunnel in the LatestPrices. -// LatestPrices of the tunnel must be set before calling this function. -func (k Keeper) UpdatePriceTunnel(ctx sdk.Context, tunnelID uint64, prices []feedstypes.Price) error { - latestPrices, err := k.GetLatestPrices(ctx, tunnelID) - if err != nil { - return err - } - - latestPrices.UpdatePrices(prices) - k.SetLatestPrices(ctx, latestPrices) - - return nil -} diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index 52371bd12..e75ea8ed9 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -133,14 +133,11 @@ func (k Keeper) ProducePacket( } // update latest price info. - if err := k.UpdatePriceTunnel(ctx, tunnel.ID, newPrices); err != nil { - return err - } + latestPrices.UpdatePrices(newPrices) if sendAll { - if err := k.UpdateLastInterval(ctx, tunnel.ID, unixNow); err != nil { - return err - } + latestPrices.LastInterval = unixNow } + k.SetLatestPrices(ctx, latestPrices) // emit an event ctx.EventManager().EmitEvent(sdk.NewEvent( From 87a64fe61742820df3c35391e168a44e85b04a55 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Tue, 12 Nov 2024 17:20:29 +0700 Subject: [PATCH 252/272] fix price to use from packet --- x/tunnel/keeper/msg_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 4e24b7d02..feb55e576 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -219,7 +219,7 @@ func (ms msgServer) TriggerTunnel( // update latest price info. latestPrices.LastInterval = ctx.BlockTime().Unix() - latestPrices.UpdatePrices(prices) + latestPrices.UpdatePrices(packet.Prices) ms.SetLatestPrices(ctx, latestPrices) ctx.EventManager().EmitEvent(sdk.NewEvent( From 7fe2e23ff6a5152e57fa40ca7d88a3a019e54e00 Mon Sep 17 00:00:00 2001 From: nkitlabs Date: Wed, 13 Nov 2024 18:34:21 +0700 Subject: [PATCH 253/272] get RouteFee and fix signalPrice --- x/tunnel/README.md | 8 ++++---- x/tunnel/keeper/keeper_packet.go | 9 +++++++-- x/tunnel/keeper/keeper_tunnel.go | 13 ++++++++++++- x/tunnel/types/route.go | 3 --- x/tunnel/types/signal_test.go | 2 +- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/x/tunnel/README.md b/x/tunnel/README.md index eb5e3c822..dca74cb9f 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -22,7 +22,7 @@ The Tunnel module is designed to decentralize the creation of push-based price d - [ActiveTunnelID](#activetunnelid) - [Tunnel](#tunnel-1) - [Packet](#packet-1) - - [LatestSignalPrices](#latestsignalprices) + - [LatestPrices](#latestPrices) - [Deposit](#deposit) - [Params](#params) - [Msg](#msg) @@ -114,7 +114,7 @@ type Packet struct { // sequence is representing the sequence of the tunnel packet. Sequence uint64 // signal_prices is the list of signal prices - SignalPrices []SignalPrice + Prices []feedstypes.Price // packet_content is the content of the packet that implements PacketContentI PacketContent *types1.Any // created_at is the timestamp when the packet is created @@ -163,11 +163,11 @@ Stores information about packets sent via the routes declared in tunnels. - **Packet**: `0x12 | TunnelID | Sequence -> Packet` -### LatestSignalPrices +### LatestPrices Stores the latest prices that the tunnel has sent to the destination route. These are used to compare intervals and deviations at the end of each block. -- **LatestSignalPrices**: `0x13 | TunnelID -> LatestSignalPrices` +- **LatestPrices**: `0x13 | TunnelID -> LatestPrices` ### Deposit diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index e75ea8ed9..affe8896e 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -171,9 +171,14 @@ func (k Keeper) CreatePacket( } // get the route fee - routeFee, err := tunnel.Route.GetCachedValue().(types.RouteI).Fee() + route, ok := tunnel.Route.GetCachedValue().(types.RouteI) + if !ok { + return types.Packet{}, types.ErrInvalidRoute + } + + routeFee, err := k.GetRouterFee(ctx, route) if err != nil { - return types.Packet{}, sdkerrors.Wrapf(err, "failed to get route fee for tunnel %d", tunnel.ID) + return types.Packet{}, err } tunnel.Sequence++ diff --git a/x/tunnel/keeper/keeper_tunnel.go b/x/tunnel/keeper/keeper_tunnel.go index 4be7e0136..d70097656 100644 --- a/x/tunnel/keeper/keeper_tunnel.go +++ b/x/tunnel/keeper/keeper_tunnel.go @@ -277,7 +277,8 @@ func (k Keeper) HasEnoughFundToCreatePacket(ctx sdk.Context, tunnelID uint64) (b if !ok { return false, types.ErrInvalidRoute } - routeFee, err := route.Fee() + + routeFee, err := k.GetRouterFee(ctx, route) if err != nil { return false, err } @@ -327,3 +328,13 @@ func (k Keeper) GenerateTunnelAccount(ctx sdk.Context, key string) (sdk.AccAddre return tunnelAccAddr, nil } + +// GetRouterFee returns the fee of the given router +func (k Keeper) GetRouterFee(ctx sdk.Context, router types.RouteI) (sdk.Coins, error) { + switch router.(type) { + case *types.TSSRoute: + return sdk.Coins{}, nil + default: + return sdk.Coins{}, types.ErrInvalidRoute + } +} diff --git a/x/tunnel/types/route.go b/x/tunnel/types/route.go index fdace3321..593b66ac3 100644 --- a/x/tunnel/types/route.go +++ b/x/tunnel/types/route.go @@ -2,8 +2,6 @@ package types import ( "github.com/cosmos/gogoproto/proto" - - sdk "github.com/cosmos/cosmos-sdk/types" ) // RouteI defines a routing path to deliver data to the destination. @@ -11,5 +9,4 @@ type RouteI interface { proto.Message ValidateBasic() error - Fee() (sdk.Coins, error) } diff --git a/x/tunnel/types/signal_test.go b/x/tunnel/types/signal_test.go index 62cb85380..c853c9617 100644 --- a/x/tunnel/types/signal_test.go +++ b/x/tunnel/types/signal_test.go @@ -9,7 +9,7 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func TestLatestSignalPrices_Validate(t *testing.T) { +func TestLatestPrices_Validate(t *testing.T) { examplePrices := []feedstypes.Price{ feedstypes.NewPrice(feedstypes.PriceStatusAvailable, "signal1", 100, 0), } From 4bc42b6f3ff46172f8c65ca5abde68d518b9d308 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 14 Nov 2024 15:23:28 +0700 Subject: [PATCH 254/272] remove dup event --- x/tunnel/keeper/keeper_packet.go | 9 --------- x/tunnel/types/events.go | 3 --- 2 files changed, 12 deletions(-) diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index affe8896e..0e64f79ee 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -226,15 +226,6 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { k.SetPacket(ctx, packet) - // emit an event - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSendPacket, - sdk.NewAttribute(types.AttributeKeyTunnelID, fmt.Sprintf("%d", tunnel.ID)), - sdk.NewAttribute(types.AttributeKeySequence, fmt.Sprintf("%d", packet.Sequence)), - sdk.NewAttribute(types.AttributeKeyBaseFee, packet.BaseFee.String()), - sdk.NewAttribute(types.AttributeKeyRouteFee, packet.RouteFee.String()), - )) - return nil } diff --git a/x/tunnel/types/events.go b/x/tunnel/types/events.go index d275f0d37..b32f3531e 100644 --- a/x/tunnel/types/events.go +++ b/x/tunnel/types/events.go @@ -8,7 +8,6 @@ const ( EventTypeActivateTunnel = "activate_tunnel" EventTypeDeactivateTunnel = "deactivate_tunnel" EventTypeTriggerTunnel = "trigger_tunnel" - EventTypeSendPacket = "send_packet" EventTypeProducePacketFail = "produce_packet_fail" EventTypeProducePacketSuccess = "produce_packet_success" EventTypeDepositToTunnel = "deposit_to_tunnel" @@ -17,8 +16,6 @@ const ( AttributeKeyParams = "params" AttributeKeyTunnelID = "tunnel_id" AttributeKeySequence = "sequence" - AttributeKeyBaseFee = "base_fee" - AttributeKeyRouteFee = "route_fee" AttributeKeyInterval = "interval" AttributeKeyRoute = "route" AttributeKeyEncoder = "encoder" From d902c40613438334fb5a5d8d237564c63a17f351 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Fri, 15 Nov 2024 16:01:45 +0700 Subject: [PATCH 255/272] fix --- x/tunnel/keeper/helper.go | 2 +- x/tunnel/keeper/helper_test.go | 20 +++++++++---------- .../keeper_latest_signal_prices_test.go | 6 +++--- x/tunnel/keeper/keeper_packet_test.go | 6 +++--- x/tunnel/keeper/msg_server_test.go | 2 +- x/tunnel/types/signal_test.go | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/x/tunnel/keeper/helper.go b/x/tunnel/keeper/helper.go index 1ef075227..cd6a26583 100644 --- a/x/tunnel/keeper/helper.go +++ b/x/tunnel/keeper/helper.go @@ -25,7 +25,7 @@ func GenerateNewPrices( feedPrice, ok := feedsPricesMap[sd.SignalID] if !ok { - feedPrice = feedstypes.NewPrice(feedstypes.PriceStatusNotInCurrentFeeds, sd.SignalID, 0, 0) + feedPrice = feedstypes.NewPrice(feedstypes.PRICE_STATUS_NOT_IN_CURRENT_FEEDS, sd.SignalID, 0, 0) } // calculate deviation between old price and new price and compare with the threshold. diff --git a/x/tunnel/keeper/helper_test.go b/x/tunnel/keeper/helper_test.go index 11f19f580..96ca97229 100644 --- a/x/tunnel/keeper/helper_test.go +++ b/x/tunnel/keeper/helper_test.go @@ -11,7 +11,7 @@ func (s *KeeperTestSuite) TestGeneratePricesSendAll() { tunnelID := uint64(1) pricesMap := map[string]feedstypes.Price{ - "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "BTC/USD": {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, } sendAll := true tunnel := types.Tunnel{ @@ -21,7 +21,7 @@ func (s *KeeperTestSuite) TestGeneratePricesSendAll() { }, } latestPrices := types.NewLatestPrices(tunnelID, []feedstypes.Price{ - {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC/USD", Price: 0}, + {Status: feedstypes.PRICE_STATUS_NOT_IN_CURRENT_FEEDS, SignalID: "BTC/USD", Price: 0}, }, 0) latestPricesMap := keeper.CreatePricesMap(latestPrices.Prices) @@ -44,8 +44,8 @@ func (s *KeeperTestSuite) TestGeneratePricesMeetHardDeviation() { tunnelID := uint64(1) pricesMap := map[string]feedstypes.Price{ - "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - "ETH/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, + "BTC/USD": {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "ETH/USD": {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, } sendAll := false tunnel := types.Tunnel{ @@ -56,8 +56,8 @@ func (s *KeeperTestSuite) TestGeneratePricesMeetHardDeviation() { }, } latestPrices := types.NewLatestPrices(tunnelID, []feedstypes.Price{ - {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC/USD", Price: 48500}, // 3% - {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "ETH/USD", Price: 1980}, // 1% + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 48500}, // 3% + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "ETH/USD", Price: 1980}, // 1% }, 0) latestPricesMap := keeper.CreatePricesMap(latestPrices.Prices) @@ -79,8 +79,8 @@ func (s *KeeperTestSuite) TestGeneratePricesNotMeetHardDeviation() { tunnelID := uint64(1) pricesMap := map[string]feedstypes.Price{ - "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, - "ETH/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, + "BTC/USD": {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "ETH/USD": {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 2000, Timestamp: 0}, } sendAll := false tunnel := types.Tunnel{ @@ -91,8 +91,8 @@ func (s *KeeperTestSuite) TestGeneratePricesNotMeetHardDeviation() { }, } latestPrices := types.NewLatestPrices(tunnelID, []feedstypes.Price{ - {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC/USD", Price: 49000}, // 2% - {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "ETH/USD", Price: 1950}, // 2.5% + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 49000}, // 2% + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "ETH/USD", Price: 1950}, // 2.5% }, 0) latestPricesMap := keeper.CreatePricesMap(latestPrices.Prices) diff --git a/x/tunnel/keeper/keeper_latest_signal_prices_test.go b/x/tunnel/keeper/keeper_latest_signal_prices_test.go index efd62155f..e2207f338 100644 --- a/x/tunnel/keeper/keeper_latest_signal_prices_test.go +++ b/x/tunnel/keeper/keeper_latest_signal_prices_test.go @@ -12,7 +12,7 @@ func (s *KeeperTestSuite) TestGetSetLatestPrices() { latestPrices := types.LatestPrices{ TunnelID: tunnelID, Prices: []feedstypes.Price{ - {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC", Price: 50000}, + {Status: feedstypes.PRICE_STATUS_NOT_IN_CURRENT_FEEDS, SignalID: "BTC", Price: 50000}, }, } @@ -29,13 +29,13 @@ func (s *KeeperTestSuite) TestGetAllLatestPrices() { latestPrices1 := types.LatestPrices{ TunnelID: 1, Prices: []feedstypes.Price{ - {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "BTC", Price: 50000}, + {Status: feedstypes.PRICE_STATUS_NOT_IN_CURRENT_FEEDS, SignalID: "BTC", Price: 50000}, }, } latestPrices2 := types.LatestPrices{ TunnelID: 2, Prices: []feedstypes.Price{ - {Status: feedstypes.PriceStatusNotInCurrentFeeds, SignalID: "ETH", Price: 3000}, + {Status: feedstypes.PRICE_STATUS_NOT_IN_CURRENT_FEEDS, SignalID: "ETH", Price: 3000}, }, } diff --git a/x/tunnel/keeper/keeper_packet_test.go b/x/tunnel/keeper/keeper_packet_test.go index 86f701876..1e2142a5f 100644 --- a/x/tunnel/keeper/keeper_packet_test.go +++ b/x/tunnel/keeper/keeper_packet_test.go @@ -106,7 +106,7 @@ func (s *KeeperTestSuite) TestProducePacket() { tunnelID := uint64(1) pricesMap := map[string]feedstypes.Price{ - "BTC/USD": {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + "BTC/USD": {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, } feePayer := sdk.AccAddress([]byte("fee_payer_address")) tunnel := types.Tunnel{ @@ -166,7 +166,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { } s.feedsKeeper.EXPECT().GetAllPrices(gomock.Any()).Return([]feedstypes.Price{ - {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer).Return(types.DefaultBasePacketFee) s.bankKeeper.EXPECT(). @@ -222,7 +222,7 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { } s.feedsKeeper.EXPECT().GetAllPrices(gomock.Any()).Return([]feedstypes.Price{ - {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC/USD", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT().SpendableCoins(gomock.Any(), feePayer). Return(sdk.Coins{sdk.NewInt64Coin("uband", 1)}) diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index 570046e77..d63786ec2 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -444,7 +444,7 @@ func (s *KeeperTestSuite) TestMsgTriggerTunnel() { preRun: func() *types.MsgTriggerTunnel { s.AddSampleTunnel(true) s.feedsKeeper.EXPECT().GetPrices(gomock.Any(), []string{"BTC"}).Return([]feedstypes.Price{ - {Status: feedstypes.PriceStatusAvailable, SignalID: "BTC", Price: 50000, Timestamp: 0}, + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "BTC", Price: 50000, Timestamp: 0}, }) s.bankKeeper.EXPECT(). SendCoinsFromAccountToModule(gomock.Any(), feePayer, types.ModuleName, types.DefaultBasePacketFee). diff --git a/x/tunnel/types/signal_test.go b/x/tunnel/types/signal_test.go index c853c9617..3f3b8492d 100644 --- a/x/tunnel/types/signal_test.go +++ b/x/tunnel/types/signal_test.go @@ -11,7 +11,7 @@ import ( func TestLatestPrices_Validate(t *testing.T) { examplePrices := []feedstypes.Price{ - feedstypes.NewPrice(feedstypes.PriceStatusAvailable, "signal1", 100, 0), + feedstypes.NewPrice(feedstypes.PRICE_STATUS_AVAILABLE, "signal1", 100, 0), } cases := map[string]struct { @@ -50,13 +50,13 @@ func TestLatestPrices_Validate(t *testing.T) { func TestLatestPrices_UpdatePrices(t *testing.T) { initialPrices := []feedstypes.Price{ - {Status: feedstypes.PriceStatusAvailable, SignalID: "signal1", Price: 100}, + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "signal1", Price: 100}, } latestPrices := types.NewLatestPrices(1, initialPrices, 10) newPrices := []feedstypes.Price{ - {Status: feedstypes.PriceStatusAvailable, SignalID: "signal1", Price: 200}, - {Status: feedstypes.PriceStatusAvailable, SignalID: "signal2", Price: 300}, + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "signal1", Price: 200}, + {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "signal2", Price: 300}, } latestPrices.UpdatePrices(newPrices) From 8556dec02d1414d7a0ac8341cb6cd931c5c604cd Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 18 Nov 2024 15:55:08 +0700 Subject: [PATCH 256/272] add max min interval deviation --- api/band/tunnel/v1beta1/params.pulsar.go | 284 +++++++++++++++++++---- proto/band/tunnel/v1beta1/params.proto | 10 +- x/tunnel/keeper/msg_server.go | 35 ++- x/tunnel/keeper/msg_server_test.go | 69 +++++- x/tunnel/types/errors.go | 33 +-- x/tunnel/types/params.go | 59 ++++- x/tunnel/types/params.pb.go | 173 +++++++++++--- x/tunnel/types/params_test.go | 47 ++++ x/tunnel/types/signal.go | 25 ++ 9 files changed, 611 insertions(+), 124 deletions(-) diff --git a/api/band/tunnel/v1beta1/params.pulsar.go b/api/band/tunnel/v1beta1/params.pulsar.go index a861c3785..170fc8db1 100644 --- a/api/band/tunnel/v1beta1/params.pulsar.go +++ b/api/band/tunnel/v1beta1/params.pulsar.go @@ -65,63 +65,66 @@ func (x *_Params_1_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_Params_4_list)(nil) +var _ protoreflect.List = (*_Params_7_list)(nil) -type _Params_4_list struct { +type _Params_7_list struct { list *[]*v1beta1.Coin } -func (x *_Params_4_list) Len() int { +func (x *_Params_7_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Params_4_list) Get(i int) protoreflect.Value { +func (x *_Params_7_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_Params_4_list) Set(i int, value protoreflect.Value) { +func (x *_Params_7_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_Params_4_list) Append(value protoreflect.Value) { +func (x *_Params_7_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_Params_4_list) AppendMutable() protoreflect.Value { +func (x *_Params_7_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_Params_4_list) Truncate(n int) { +func (x *_Params_7_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_Params_4_list) NewElement() protoreflect.Value { +func (x *_Params_7_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_Params_4_list) IsValid() bool { +func (x *_Params_7_list) IsValid() bool { return x.list != nil } var ( - md_Params protoreflect.MessageDescriptor - fd_Params_min_deposit protoreflect.FieldDescriptor - fd_Params_min_interval protoreflect.FieldDescriptor - fd_Params_max_signals protoreflect.FieldDescriptor - fd_Params_base_packet_fee protoreflect.FieldDescriptor + md_Params protoreflect.MessageDescriptor + fd_Params_min_deposit protoreflect.FieldDescriptor + fd_Params_min_interval protoreflect.FieldDescriptor + fd_Params_max_interval protoreflect.FieldDescriptor + fd_Params_min_deviation_bps protoreflect.FieldDescriptor + fd_Params_max_deviation_bps protoreflect.FieldDescriptor + fd_Params_max_signals protoreflect.FieldDescriptor + fd_Params_base_packet_fee protoreflect.FieldDescriptor ) func init() { @@ -129,6 +132,9 @@ func init() { md_Params = File_band_tunnel_v1beta1_params_proto.Messages().ByName("Params") fd_Params_min_deposit = md_Params.Fields().ByName("min_deposit") fd_Params_min_interval = md_Params.Fields().ByName("min_interval") + fd_Params_max_interval = md_Params.Fields().ByName("max_interval") + fd_Params_min_deviation_bps = md_Params.Fields().ByName("min_deviation_bps") + fd_Params_max_deviation_bps = md_Params.Fields().ByName("max_deviation_bps") fd_Params_max_signals = md_Params.Fields().ByName("max_signals") fd_Params_base_packet_fee = md_Params.Fields().ByName("base_packet_fee") } @@ -210,6 +216,24 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.MaxInterval != uint64(0) { + value := protoreflect.ValueOfUint64(x.MaxInterval) + if !f(fd_Params_max_interval, value) { + return + } + } + if x.MinDeviationBps != uint64(0) { + value := protoreflect.ValueOfUint64(x.MinDeviationBps) + if !f(fd_Params_min_deviation_bps, value) { + return + } + } + if x.MaxDeviationBps != uint64(0) { + value := protoreflect.ValueOfUint64(x.MaxDeviationBps) + if !f(fd_Params_max_deviation_bps, value) { + return + } + } if x.MaxSignals != uint64(0) { value := protoreflect.ValueOfUint64(x.MaxSignals) if !f(fd_Params_max_signals, value) { @@ -217,7 +241,7 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto } } if len(x.BasePacketFee) != 0 { - value := protoreflect.ValueOfList(&_Params_4_list{list: &x.BasePacketFee}) + value := protoreflect.ValueOfList(&_Params_7_list{list: &x.BasePacketFee}) if !f(fd_Params_base_packet_fee, value) { return } @@ -241,6 +265,12 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return len(x.MinDeposit) != 0 case "band.tunnel.v1beta1.Params.min_interval": return x.MinInterval != uint64(0) + case "band.tunnel.v1beta1.Params.max_interval": + return x.MaxInterval != uint64(0) + case "band.tunnel.v1beta1.Params.min_deviation_bps": + return x.MinDeviationBps != uint64(0) + case "band.tunnel.v1beta1.Params.max_deviation_bps": + return x.MaxDeviationBps != uint64(0) case "band.tunnel.v1beta1.Params.max_signals": return x.MaxSignals != uint64(0) case "band.tunnel.v1beta1.Params.base_packet_fee": @@ -265,6 +295,12 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.MinDeposit = nil case "band.tunnel.v1beta1.Params.min_interval": x.MinInterval = uint64(0) + case "band.tunnel.v1beta1.Params.max_interval": + x.MaxInterval = uint64(0) + case "band.tunnel.v1beta1.Params.min_deviation_bps": + x.MinDeviationBps = uint64(0) + case "band.tunnel.v1beta1.Params.max_deviation_bps": + x.MaxDeviationBps = uint64(0) case "band.tunnel.v1beta1.Params.max_signals": x.MaxSignals = uint64(0) case "band.tunnel.v1beta1.Params.base_packet_fee": @@ -294,14 +330,23 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "band.tunnel.v1beta1.Params.min_interval": value := x.MinInterval return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.Params.max_interval": + value := x.MaxInterval + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.Params.min_deviation_bps": + value := x.MinDeviationBps + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.Params.max_deviation_bps": + value := x.MaxDeviationBps + return protoreflect.ValueOfUint64(value) case "band.tunnel.v1beta1.Params.max_signals": value := x.MaxSignals return protoreflect.ValueOfUint64(value) case "band.tunnel.v1beta1.Params.base_packet_fee": if len(x.BasePacketFee) == 0 { - return protoreflect.ValueOfList(&_Params_4_list{}) + return protoreflect.ValueOfList(&_Params_7_list{}) } - listValue := &_Params_4_list{list: &x.BasePacketFee} + listValue := &_Params_7_list{list: &x.BasePacketFee} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -329,11 +374,17 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.MinDeposit = *clv.list case "band.tunnel.v1beta1.Params.min_interval": x.MinInterval = value.Uint() + case "band.tunnel.v1beta1.Params.max_interval": + x.MaxInterval = value.Uint() + case "band.tunnel.v1beta1.Params.min_deviation_bps": + x.MinDeviationBps = value.Uint() + case "band.tunnel.v1beta1.Params.max_deviation_bps": + x.MaxDeviationBps = value.Uint() case "band.tunnel.v1beta1.Params.max_signals": x.MaxSignals = value.Uint() case "band.tunnel.v1beta1.Params.base_packet_fee": lv := value.List() - clv := lv.(*_Params_4_list) + clv := lv.(*_Params_7_list) x.BasePacketFee = *clv.list default: if fd.IsExtension() { @@ -365,10 +416,16 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore if x.BasePacketFee == nil { x.BasePacketFee = []*v1beta1.Coin{} } - value := &_Params_4_list{list: &x.BasePacketFee} + value := &_Params_7_list{list: &x.BasePacketFee} return protoreflect.ValueOfList(value) case "band.tunnel.v1beta1.Params.min_interval": panic(fmt.Errorf("field min_interval of message band.tunnel.v1beta1.Params is not mutable")) + case "band.tunnel.v1beta1.Params.max_interval": + panic(fmt.Errorf("field max_interval of message band.tunnel.v1beta1.Params is not mutable")) + case "band.tunnel.v1beta1.Params.min_deviation_bps": + panic(fmt.Errorf("field min_deviation_bps of message band.tunnel.v1beta1.Params is not mutable")) + case "band.tunnel.v1beta1.Params.max_deviation_bps": + panic(fmt.Errorf("field max_deviation_bps of message band.tunnel.v1beta1.Params is not mutable")) case "band.tunnel.v1beta1.Params.max_signals": panic(fmt.Errorf("field max_signals of message band.tunnel.v1beta1.Params is not mutable")) default: @@ -389,11 +446,17 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfList(&_Params_1_list{list: &list}) case "band.tunnel.v1beta1.Params.min_interval": return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.Params.max_interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.Params.min_deviation_bps": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.Params.max_deviation_bps": + return protoreflect.ValueOfUint64(uint64(0)) case "band.tunnel.v1beta1.Params.max_signals": return protoreflect.ValueOfUint64(uint64(0)) case "band.tunnel.v1beta1.Params.base_packet_fee": list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Params_4_list{list: &list}) + return protoreflect.ValueOfList(&_Params_7_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Params")) @@ -472,6 +535,15 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if x.MinInterval != 0 { n += 1 + runtime.Sov(uint64(x.MinInterval)) } + if x.MaxInterval != 0 { + n += 1 + runtime.Sov(uint64(x.MaxInterval)) + } + if x.MinDeviationBps != 0 { + n += 1 + runtime.Sov(uint64(x.MinDeviationBps)) + } + if x.MaxDeviationBps != 0 { + n += 1 + runtime.Sov(uint64(x.MaxDeviationBps)) + } if x.MaxSignals != 0 { n += 1 + runtime.Sov(uint64(x.MaxSignals)) } @@ -523,12 +595,27 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x3a } } if x.MaxSignals != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxSignals)) i-- + dAtA[i] = 0x30 + } + if x.MaxDeviationBps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxDeviationBps)) + i-- + dAtA[i] = 0x28 + } + if x.MinDeviationBps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MinDeviationBps)) + i-- + dAtA[i] = 0x20 + } + if x.MaxInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxInterval)) + i-- dAtA[i] = 0x18 } if x.MinInterval != 0 { @@ -655,6 +742,63 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } } case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxInterval", wireType) + } + x.MaxInterval = 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.MaxInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinDeviationBps", wireType) + } + x.MinDeviationBps = 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.MinDeviationBps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxDeviationBps", wireType) + } + x.MaxDeviationBps = 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.MaxDeviationBps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxSignals", wireType) } @@ -673,7 +817,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { break } } - case 4: + case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BasePacketFee", wireType) } @@ -765,10 +909,16 @@ type Params struct { MinDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` // min_interval is the minimum interval in seconds MinInterval uint64 `protobuf:"varint,2,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` + // max_interval is the maximum interval in seconds + MaxInterval uint64 `protobuf:"varint,3,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` + // min_deviation_bps is the minimum deviation in basis points + MinDeviationBps uint64 `protobuf:"varint,4,opt,name=min_deviation_bps,json=minDeviationBps,proto3" json:"min_deviation_bps,omitempty"` + // max_deviation_bps is the maximum deviation in basis points + MaxDeviationBps uint64 `protobuf:"varint,5,opt,name=max_deviation_bps,json=maxDeviationBps,proto3" json:"max_deviation_bps,omitempty"` // max_signals defines the maximum number of signals allowed per tunnel. - MaxSignals uint64 `protobuf:"varint,3,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` + MaxSignals uint64 `protobuf:"varint,6,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` // base_packet_fee is the base fee for each packet - BasePacketFee []*v1beta1.Coin `protobuf:"bytes,4,rep,name=base_packet_fee,json=basePacketFee,proto3" json:"base_packet_fee,omitempty"` + BasePacketFee []*v1beta1.Coin `protobuf:"bytes,7,rep,name=base_packet_fee,json=basePacketFee,proto3" json:"base_packet_fee,omitempty"` } func (x *Params) Reset() { @@ -805,6 +955,27 @@ func (x *Params) GetMinInterval() uint64 { return 0 } +func (x *Params) GetMaxInterval() uint64 { + if x != nil { + return x.MaxInterval + } + return 0 +} + +func (x *Params) GetMinDeviationBps() uint64 { + if x != nil { + return x.MinDeviationBps + } + return 0 +} + +func (x *Params) GetMaxDeviationBps() uint64 { + if x != nil { + return x.MaxDeviationBps + } + return 0 +} + func (x *Params) GetMaxSignals() uint64 { if x != nil { return x.MaxSignals @@ -828,7 +999,7 @@ var file_band_tunnel_v1beta1_params_proto_rawDesc = []byte{ 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 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, 0x22, 0xb5, 0x02, + 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6c, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, @@ -838,31 +1009,42 @@ var file_band_tunnel_v1beta1_params_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x69, - 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, - 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x6d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x73, 0x0a, 0x0f, 0x62, 0x61, - 0x73, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, - 0x03, 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, 0x30, - 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, - 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, 0x65, 0x65, 0x3a, - 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xdc, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, - 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, - 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, - 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, - 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3f, 0x0a, 0x11, + 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x13, 0xe2, 0xde, 0x1f, 0x0f, 0x4d, 0x69, 0x6e, + 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x0f, 0x6d, 0x69, + 0x6e, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, 0x3f, 0x0a, + 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, + 0x70, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x13, 0xe2, 0xde, 0x1f, 0x0f, 0x4d, 0x61, + 0x78, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x0f, 0x6d, + 0x61, 0x78, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x12, + 0x73, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, + 0x65, 0x65, 0x18, 0x07, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xdc, 0x01, 0x0a, 0x17, 0x63, + 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, + 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, + 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, + 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/proto/band/tunnel/v1beta1/params.proto b/proto/band/tunnel/v1beta1/params.proto index 59a954202..05fbfe5ef 100644 --- a/proto/band/tunnel/v1beta1/params.proto +++ b/proto/band/tunnel/v1beta1/params.proto @@ -15,9 +15,15 @@ message Params { [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // min_interval is the minimum interval in seconds uint64 min_interval = 2; + // max_interval is the maximum interval in seconds + uint64 max_interval = 3; + // min_deviation_bps is the minimum deviation in basis points + uint64 min_deviation_bps = 4 [(gogoproto.customname) = "MinDeviationBPS"]; + // max_deviation_bps is the maximum deviation in basis points + uint64 max_deviation_bps = 5 [(gogoproto.customname) = "MaxDeviationBPS"]; // max_signals defines the maximum number of signals allowed per tunnel. - uint64 max_signals = 3; + uint64 max_signals = 6; // base_packet_fee is the base fee for each packet - repeated cosmos.base.v1beta1.Coin base_packet_fee = 4 + repeated cosmos.base.v1beta1.Coin base_packet_fee = 7 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index feb55e576..10586929d 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -31,14 +31,21 @@ func (ms msgServer) CreateTunnel( ) (*types.MsgCreateTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - // validate signal infos and interval params := ms.Keeper.GetParams(ctx) - if len(msg.SignalDeviations) > int(params.MaxSignals) { - return nil, types.ErrMaxSignalsExceeded + + // validate signal infos and interval + if err := types.ValidateSignalDeviations(msg.SignalDeviations, params); err != nil { + return nil, err } - if msg.Interval < params.MinInterval { - return nil, types.ErrIntervalTooLow + // validate interval + if msg.Interval < params.MinInterval || msg.Interval > params.MaxInterval { + return nil, types.ErrIntervalOutOfRange.Wrapf( + "max %d, min %d, got %d", + params.MaxInterval, + params.MinInterval, + msg.Interval, + ) } creator, err := sdk.AccAddressFromBech32(msg.Creator) @@ -83,13 +90,21 @@ func (ms msgServer) UpdateAndResetTunnel( ) (*types.MsgUpdateAndResetTunnelResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - // validate signal infos and interval params := ms.Keeper.GetParams(ctx) - if len(msg.SignalDeviations) > int(params.MaxSignals) { - return nil, types.ErrMaxSignalsExceeded + + // validate signal infos and interval + if err := types.ValidateSignalDeviations(msg.SignalDeviations, params); err != nil { + return nil, err } - if msg.Interval < params.MinInterval { - return nil, types.ErrIntervalTooLow + + // validate interval + if msg.Interval < params.MinInterval || msg.Interval > params.MaxInterval { + return nil, types.ErrIntervalOutOfRange.Wrapf( + "max %d, min %d, got %d", + params.MaxInterval, + params.MinInterval, + msg.Interval, + ) } tunnel, err := ms.Keeper.GetTunnel(ctx, msg.TunnelID) diff --git a/x/tunnel/keeper/msg_server_test.go b/x/tunnel/keeper/msg_server_test.go index d63786ec2..73bc36b6f 100644 --- a/x/tunnel/keeper/msg_server_test.go +++ b/x/tunnel/keeper/msg_server_test.go @@ -43,7 +43,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { return types.NewMsgCreateTunnel( signalDeviations, - 10, + 60, route, feedstypes.ENCODER_FIXED_POINT_ABI, sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), @@ -53,7 +53,26 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { expErr: true, expErrMsg: "max signals exceeded", }, - "interval too low": { + "deviation out of range": { + preRun: func() (*types.MsgCreateTunnel, error) { + params := types.DefaultParams() + params.MinDeviationBPS = 1000 + params.MaxDeviationBPS = 10000 + s.Require().NoError(s.keeper.SetParams(s.ctx, params)) + + return types.NewMsgCreateTunnel( + signalDeviations, + 60, + route, + feedstypes.ENCODER_FIXED_POINT_ABI, + sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + sdk.AccAddress([]byte("creator_address")), + ) + }, + expErr: true, + expErrMsg: "deviation out of range", + }, + "interval out of range": { preRun: func() (*types.MsgCreateTunnel, error) { params := types.DefaultParams() params.MinInterval = 5 @@ -69,7 +88,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { ) }, expErr: true, - expErrMsg: "interval too low", + expErrMsg: "interval out of range", }, "all good without initial deposit": { preRun: func() (*types.MsgCreateTunnel, error) { @@ -81,7 +100,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { return types.NewMsgCreateTunnel( signalDeviations, - 10, + 60, route, feedstypes.ENCODER_FIXED_POINT_ABI, sdk.NewCoins(), @@ -107,7 +126,7 @@ func (s *KeeperTestSuite) TestMsgCreateTunnel() { return types.NewMsgCreateTunnel( signalDeviations, - 10, + 60, route, feedstypes.ENCODER_FIXED_POINT_ABI, depositAmount, @@ -169,14 +188,42 @@ func (s *KeeperTestSuite) TestMsgUpdateAndResetTunnel() { return types.NewMsgUpdateAndResetTunnel( 1, editedSignalDeviations, - 10, + 60, sdk.AccAddress([]byte("creator_address")).String(), ) }, expErr: true, expErrMsg: "max signals exceeded", }, - "interval too low": { + "deviation out of range": { + preRun: func() *types.MsgUpdateAndResetTunnel { + params := types.DefaultParams() + params.MinDeviationBPS = 1000 + params.MaxDeviationBPS = 10000 + err := s.keeper.SetParams(s.ctx, params) + s.Require().NoError(err) + + s.AddSampleTunnel(false) + + editedSignalDeviations := []types.SignalDeviation{ + { + SignalID: "BTC", + SoftDeviationBPS: 200, + HardDeviationBPS: 200, + }, + } + + return types.NewMsgUpdateAndResetTunnel( + 1, + editedSignalDeviations, + 60, + sdk.AccAddress([]byte("creator_address")).String(), + ) + }, + expErr: true, + expErrMsg: "deviation out of range", + }, + "interval out of range": { preRun: func() *types.MsgUpdateAndResetTunnel { params := types.DefaultParams() params.MinInterval = 5 @@ -201,14 +248,14 @@ func (s *KeeperTestSuite) TestMsgUpdateAndResetTunnel() { ) }, expErr: true, - expErrMsg: "interval too low", + expErrMsg: "interval out of range", }, "tunnel not found": { preRun: func() *types.MsgUpdateAndResetTunnel { return types.NewMsgUpdateAndResetTunnel( 1, []types.SignalDeviation{}, - 10, + 60, sdk.AccAddress([]byte("creator_address")).String(), ) }, @@ -222,7 +269,7 @@ func (s *KeeperTestSuite) TestMsgUpdateAndResetTunnel() { return types.NewMsgUpdateAndResetTunnel( 1, []types.SignalDeviation{}, - 10, + 60, sdk.AccAddress([]byte("wrong_creator_address")).String(), ) }, @@ -244,7 +291,7 @@ func (s *KeeperTestSuite) TestMsgUpdateAndResetTunnel() { return types.NewMsgUpdateAndResetTunnel( 1, editedSignalDeviations, - 10, + 60, sdk.AccAddress([]byte("creator_address")).String(), ) }, diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 66d0922b2..7b14aa6c7 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -8,20 +8,21 @@ import ( var ( ErrInvalidGenesis = errorsmod.Register(ModuleName, 2, "invalid genesis") ErrMaxSignalsExceeded = errorsmod.Register(ModuleName, 3, "max signals exceeded") - ErrIntervalTooLow = errorsmod.Register(ModuleName, 4, "interval too low") - ErrTunnelNotFound = errorsmod.Register(ModuleName, 5, "tunnel not found") - ErrLatestPricesNotFound = errorsmod.Register(ModuleName, 6, "latest prices not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 7, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 8, "no packet content") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 9, "invalid creator of the tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 10, "account already exist") - ErrInvalidRoute = errorsmod.Register(ModuleName, 11, "invalid tunnel route") - ErrInactiveTunnel = errorsmod.Register(ModuleName, 12, "inactive tunnel") - ErrAlreadyActive = errorsmod.Register(ModuleName, 13, "already active") - ErrAlreadyInactive = errorsmod.Register(ModuleName, 14, "already inactive") - ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 15, "invalid deposit denom") - ErrDepositNotFound = errorsmod.Register(ModuleName, 16, "deposit not found") - ErrInsufficientDeposit = errorsmod.Register(ModuleName, 17, "insufficient deposit") - ErrInsufficientFund = errorsmod.Register(ModuleName, 18, "insufficient fund") - ErrDeviationNotFound = errorsmod.Register(ModuleName, 19, "deviation not found") + ErrIntervalOutOfRange = errorsmod.Register(ModuleName, 4, "interval out of range") + ErrDeviationOutOfRange = errorsmod.Register(ModuleName, 5, "deviation out of range") + ErrTunnelNotFound = errorsmod.Register(ModuleName, 6, "tunnel not found") + ErrLatestPricesNotFound = errorsmod.Register(ModuleName, 7, "latest prices not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 8, "packet not found") + ErrNoPacketContent = errorsmod.Register(ModuleName, 9, "no packet content") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 10, "invalid creator of the tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") + ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") + ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") + ErrAlreadyActive = errorsmod.Register(ModuleName, 14, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 15, "already inactive") + ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 16, "invalid deposit denom") + ErrDepositNotFound = errorsmod.Register(ModuleName, 17, "deposit not found") + ErrInsufficientDeposit = errorsmod.Register(ModuleName, 18, "insufficient deposit") + ErrInsufficientFund = errorsmod.Register(ModuleName, 19, "insufficient fund") + ErrDeviationNotFound = errorsmod.Register(ModuleName, 20, "deviation not found") ) diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index fde56d942..fab42e267 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -7,24 +7,35 @@ import ( ) var ( - DefaultMinInterval = uint64(1) - DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 1_000_000_000)) - DefaultMaxSignals = uint64(100) - DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10_000)) + // Each value below is the default value for each parameter when generating the default + // genesis file. See comments in types.proto for explanation for each parameter. + DefaultMinInterval = uint64(60) + DefaultMaxInterval = uint64(3600) + DefaultMinDeviationBPS = uint64(50) + DefaultMaxDeviationBPS = uint64(3000) + DefaultMinDeposit = sdk.NewCoins(sdk.NewInt64Coin("uband", 1_000_000_000)) + DefaultMaxSignals = uint64(25) + DefaultBasePacketFee = sdk.NewCoins(sdk.NewInt64Coin("uband", 10_000)) ) // NewParams creates a new Params instance func NewParams( minDeposit sdk.Coins, minInterval uint64, + maxInterval uint64, + minDeviationBPS uint64, + maxDeviationBPS uint64, maxSignals uint64, basePacketFee sdk.Coins, ) Params { return Params{ - MinDeposit: minDeposit, - MinInterval: minInterval, - MaxSignals: maxSignals, - BasePacketFee: basePacketFee, + MinDeposit: minDeposit, + MinInterval: minInterval, + MaxInterval: maxInterval, + MinDeviationBPS: minInterval, + MaxDeviationBPS: maxDeviationBPS, + MaxSignals: maxSignals, + BasePacketFee: basePacketFee, } } @@ -33,6 +44,9 @@ func DefaultParams() Params { return NewParams( DefaultMinDeposit, DefaultMinInterval, + DefaultMaxInterval, + DefaultMinDeviationBPS, + DefaultMaxDeviationBPS, DefaultMaxSignals, DefaultBasePacketFee, ) @@ -50,6 +64,35 @@ func (p Params) Validate() error { return err } + // validate MaxInterval + if err := validateUint64("max interval", true)(p.MaxInterval); err != nil { + return err + } + + // validate max interval is greater than min interval + if p.MaxInterval <= p.MinInterval { + return fmt.Errorf("max interval must be greater than min interval: %d <= %d", p.MaxInterval, p.MinInterval) + } + + // validate MinDeviationBPS + if err := validateUint64("min deviation bps", true)(p.MinDeviationBPS); err != nil { + return err + } + + // validate MaxDeviationBPS + if err := validateUint64("max deviation bps", true)(p.MaxDeviationBPS); err != nil { + return err + } + + // validate max deviation bps is greater than min deviation bps + if p.MaxDeviationBPS <= p.MinDeviationBPS { + return fmt.Errorf( + "max deviation bps must be greater than min deviation bps: %d <= %d", + p.MaxDeviationBPS, + p.MinDeviationBPS, + ) + } + // validate MaxSignals if err := validateUint64("max signals", true)(p.MaxSignals); err != nil { return err diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index 67996ab45..b210d86c5 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -31,10 +31,16 @@ type Params struct { MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` // min_interval is the minimum interval in seconds MinInterval uint64 `protobuf:"varint,2,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` + // max_interval is the maximum interval in seconds + MaxInterval uint64 `protobuf:"varint,3,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` + // min_deviation_bps is the minimum deviation in basis points + MinDeviationBPS uint64 `protobuf:"varint,4,opt,name=min_deviation_bps,json=minDeviationBps,proto3" json:"min_deviation_bps,omitempty"` + // max_deviation_bps is the maximum deviation in basis points + MaxDeviationBPS uint64 `protobuf:"varint,5,opt,name=max_deviation_bps,json=maxDeviationBps,proto3" json:"max_deviation_bps,omitempty"` // max_signals defines the maximum number of signals allowed per tunnel. - MaxSignals uint64 `protobuf:"varint,3,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` + MaxSignals uint64 `protobuf:"varint,6,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` // base_packet_fee is the base fee for each packet - BasePacketFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=base_packet_fee,json=basePacketFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_packet_fee"` + BasePacketFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=base_packet_fee,json=basePacketFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_packet_fee"` } func (m *Params) Reset() { *m = Params{} } @@ -84,6 +90,27 @@ func (m *Params) GetMinInterval() uint64 { return 0 } +func (m *Params) GetMaxInterval() uint64 { + if m != nil { + return m.MaxInterval + } + return 0 +} + +func (m *Params) GetMinDeviationBPS() uint64 { + if m != nil { + return m.MinDeviationBPS + } + return 0 +} + +func (m *Params) GetMaxDeviationBPS() uint64 { + if m != nil { + return m.MaxDeviationBPS + } + return 0 +} + func (m *Params) GetMaxSignals() uint64 { if m != nil { return m.MaxSignals @@ -105,28 +132,32 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/params.proto", fileDescriptor_842b3bf03f22bf82) } var fileDescriptor_842b3bf03f22bf82 = []byte{ - // 332 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xb1, 0x4e, 0x02, 0x31, - 0x18, 0xc7, 0xef, 0x80, 0x30, 0x14, 0x8d, 0xc9, 0xe9, 0x70, 0x32, 0xf4, 0xd0, 0x89, 0xc5, 0x56, - 0x64, 0x73, 0x44, 0x63, 0xc2, 0x46, 0x70, 0x73, 0xb9, 0xf4, 0x4a, 0x3d, 0x1a, 0xae, 0xed, 0x85, - 0x16, 0x82, 0x6f, 0xe1, 0x23, 0x38, 0xbb, 0xfb, 0x0e, 0x8c, 0x8c, 0x4e, 0x6a, 0x60, 0xf1, 0x31, - 0x4c, 0xdb, 0xc3, 0xf8, 0x00, 0x4e, 0x6d, 0xbe, 0xef, 0xd7, 0xdf, 0xff, 0x4b, 0x3f, 0xd0, 0xc9, - 0x88, 0x9c, 0x60, 0xb3, 0x90, 0x92, 0x15, 0x78, 0xd9, 0xcb, 0x98, 0x21, 0x3d, 0x5c, 0x92, 0x39, - 0x11, 0x1a, 0x95, 0x73, 0x65, 0x54, 0x74, 0x6c, 0x09, 0xe4, 0x09, 0x54, 0x11, 0xed, 0x93, 0x5c, - 0xe5, 0xca, 0xf5, 0xb1, 0xbd, 0x79, 0xb4, 0x0d, 0xa9, 0xd2, 0x42, 0x69, 0x9c, 0x11, 0xcd, 0x7e, - 0x65, 0x54, 0x71, 0xe9, 0xfb, 0xe7, 0x6f, 0x35, 0xd0, 0x1c, 0x39, 0x77, 0x54, 0x80, 0x96, 0xe0, - 0x32, 0x9d, 0xb0, 0x52, 0x69, 0x6e, 0xe2, 0xb0, 0x53, 0xef, 0xb6, 0xae, 0x4e, 0x91, 0x17, 0x20, - 0x2b, 0xd8, 0x67, 0xa1, 0x1b, 0xc5, 0xe5, 0xe0, 0x72, 0xfd, 0x91, 0x04, 0xaf, 0x9f, 0x49, 0x37, - 0xe7, 0x66, 0xba, 0xc8, 0x10, 0x55, 0x02, 0x57, 0x69, 0xfe, 0xb8, 0xd0, 0x93, 0x19, 0x36, 0x4f, - 0x25, 0xd3, 0xee, 0x81, 0x1e, 0x03, 0xc1, 0xe5, 0xad, 0xd7, 0x47, 0x67, 0xe0, 0xc0, 0xa6, 0x71, - 0x69, 0xd8, 0x7c, 0x49, 0x8a, 0xb8, 0xd6, 0x09, 0xbb, 0x8d, 0xb1, 0x9d, 0x60, 0x58, 0x95, 0xa2, - 0x04, 0xb4, 0x04, 0x59, 0xa5, 0x9a, 0xe7, 0x92, 0x14, 0x3a, 0xae, 0x3b, 0x02, 0x08, 0xb2, 0xba, - 0xf7, 0x95, 0x48, 0x83, 0x23, 0x3b, 0x56, 0x5a, 0x12, 0x3a, 0x63, 0x26, 0x7d, 0x64, 0x2c, 0x6e, - 0xfc, 0xff, 0xd4, 0x87, 0x56, 0x32, 0x72, 0x11, 0x77, 0x8c, 0x5d, 0x37, 0xbe, 0x5f, 0x92, 0x70, - 0x30, 0x5c, 0x6f, 0x61, 0xb8, 0xd9, 0xc2, 0xf0, 0x6b, 0x0b, 0xc3, 0xe7, 0x1d, 0x0c, 0x36, 0x3b, - 0x18, 0xbc, 0xef, 0x60, 0xf0, 0x80, 0xff, 0x88, 0xed, 0x9e, 0xdc, 0x3f, 0x53, 0x55, 0x60, 0x3a, - 0x25, 0x5c, 0xe2, 0x65, 0x1f, 0xaf, 0xf6, 0xcb, 0x75, 0x29, 0x59, 0xd3, 0x11, 0xfd, 0x9f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x24, 0xea, 0x35, 0x13, 0xf8, 0x01, 0x00, 0x00, + // 398 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x31, 0x8f, 0xda, 0x30, + 0x14, 0xc7, 0x93, 0x42, 0xa9, 0x64, 0x5a, 0xa1, 0x86, 0x0e, 0x29, 0x43, 0x42, 0x3b, 0xb1, 0x34, + 0x2e, 0x65, 0xeb, 0x52, 0x29, 0xad, 0x2a, 0x31, 0x54, 0x42, 0xb0, 0x75, 0x89, 0x9c, 0xe0, 0x06, + 0x8b, 0xc4, 0xb6, 0xb0, 0x89, 0xd2, 0x6f, 0x71, 0x1f, 0xe1, 0xe6, 0xfb, 0x24, 0x8c, 0x8c, 0xa7, + 0x1b, 0xb8, 0x53, 0x58, 0xee, 0x63, 0x9c, 0x6c, 0x07, 0x2e, 0x62, 0xbe, 0x29, 0xd1, 0x7b, 0x3f, + 0xff, 0xfe, 0x4f, 0x4f, 0x0f, 0x0c, 0x63, 0x44, 0x97, 0x50, 0x6e, 0x29, 0xc5, 0x19, 0x2c, 0xc6, + 0x31, 0x96, 0x68, 0x0c, 0x39, 0xda, 0xa0, 0x5c, 0x04, 0x7c, 0xc3, 0x24, 0x73, 0xfa, 0x8a, 0x08, + 0x0c, 0x11, 0xd4, 0xc4, 0xe0, 0x43, 0xca, 0x52, 0xa6, 0xfb, 0x50, 0xfd, 0x19, 0x74, 0xe0, 0x25, + 0x4c, 0xe4, 0x4c, 0xc0, 0x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58, 0x46, 0xff, 0x30, 0x76, + 0xdf, 0xbc, 0xfc, 0x6a, 0xdf, 0x29, 0xc9, 0x4c, 0x47, 0xfc, 0xc6, 0xf8, 0x7b, 0xfb, 0xf1, 0xda, + 0xb7, 0xc3, 0xe9, 0xae, 0xf2, 0xec, 0x7d, 0xe5, 0xd9, 0x0f, 0x95, 0x67, 0x5f, 0x1d, 0x3d, 0x6b, + 0x7f, 0xf4, 0xac, 0xdb, 0xa3, 0x67, 0xfd, 0x85, 0x0d, 0xb1, 0x3a, 0x26, 0x7d, 0x0c, 0x09, 0xcb, + 0x60, 0xb2, 0x42, 0x84, 0xc2, 0x62, 0x02, 0xcb, 0xd3, 0x05, 0xea, 0x94, 0xb8, 0xa3, 0x89, 0xc9, + 0x53, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x4c, 0x65, 0x68, 0x9d, 0x02, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -159,6 +190,15 @@ func (this *Params) Equal(that interface{}) bool { if this.MinInterval != that1.MinInterval { return false } + if this.MaxInterval != that1.MaxInterval { + return false + } + if this.MinDeviationBPS != that1.MinDeviationBPS { + return false + } + if this.MaxDeviationBPS != that1.MaxDeviationBPS { + return false + } if this.MaxSignals != that1.MaxSignals { return false } @@ -203,12 +243,27 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintParams(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x3a } } if m.MaxSignals != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MaxSignals)) i-- + dAtA[i] = 0x30 + } + if m.MaxDeviationBPS != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxDeviationBPS)) + i-- + dAtA[i] = 0x28 + } + if m.MinDeviationBPS != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MinDeviationBPS)) + i-- + dAtA[i] = 0x20 + } + if m.MaxInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxInterval)) + i-- dAtA[i] = 0x18 } if m.MinInterval != 0 { @@ -259,6 +314,15 @@ func (m *Params) Size() (n int) { if m.MinInterval != 0 { n += 1 + sovParams(uint64(m.MinInterval)) } + if m.MaxInterval != 0 { + n += 1 + sovParams(uint64(m.MaxInterval)) + } + if m.MinDeviationBPS != 0 { + n += 1 + sovParams(uint64(m.MinDeviationBPS)) + } + if m.MaxDeviationBPS != 0 { + n += 1 + sovParams(uint64(m.MaxDeviationBPS)) + } if m.MaxSignals != 0 { n += 1 + sovParams(uint64(m.MaxSignals)) } @@ -360,6 +424,63 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxInterval", wireType) + } + m.MaxInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDeviationBPS", wireType) + } + m.MinDeviationBPS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinDeviationBPS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxDeviationBPS", wireType) + } + m.MaxDeviationBPS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxDeviationBPS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MaxSignals", wireType) } @@ -378,7 +499,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } - case 4: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BasePacketFee", wireType) } diff --git a/x/tunnel/types/params_test.go b/x/tunnel/types/params_test.go index f8a4b6054..00491d4fa 100644 --- a/x/tunnel/types/params_test.go +++ b/x/tunnel/types/params_test.go @@ -23,6 +23,53 @@ func TestParams_Validate(t *testing.T) { expErr: true, expErrMsg: "min interval must be positive", }, + "invalid MaxInterval": { + genesisState: func() types.Params { + p := types.DefaultParams() + p.MaxInterval = 0 + return p + }(), + expErr: true, + expErrMsg: "max interval must be positive", + }, + "invalid interval range": { + genesisState: func() types.Params { + p := types.DefaultParams() + p.MinInterval = 10 + p.MaxInterval = 5 + return p + }(), + expErr: true, + expErrMsg: "max interval must be greater than min interval: 5 <= 10", + }, + "invalid MinDeviationBPS": { + genesisState: func() types.Params { + p := types.DefaultParams() + p.MinDeviationBPS = 0 + return p + }(), + expErr: true, + expErrMsg: "min deviation bps must be positive", + }, + "invalid MaxDeviationBPS": { + genesisState: func() types.Params { + p := types.DefaultParams() + p.MaxDeviationBPS = 0 + return p + }(), + expErr: true, + expErrMsg: "max deviation bps must be positive", + }, + "invalid deviation range": { + genesisState: func() types.Params { + p := types.DefaultParams() + p.MinDeviationBPS = 10 + p.MaxDeviationBPS = 5 + return p + }(), + expErr: true, + expErrMsg: "max deviation bps must be greater than min deviation bps: 5 <= 10", + }, "invalid MaxSignals": { genesisState: func() types.Params { p := types.DefaultParams() diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal.go index 643317f2e..35051c929 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal.go @@ -61,3 +61,28 @@ func (l *LatestPrices) UpdatePrices(newPrices []feedstypes.Price) { } } } + +// ValidateSignalDeviations validates the signal deviations with the given params. +func ValidateSignalDeviations(signalDeviations []SignalDeviation, params Params) error { + // validate max signals + if len(signalDeviations) > int(params.MaxSignals) { + return ErrMaxSignalsExceeded.Wrapf("max signals %d, got %d", params.MaxSignals, len(signalDeviations)) + } + + // validate min and max deviation + for _, signalDeviation := range signalDeviations { + if signalDeviation.HardDeviationBPS < params.MinDeviationBPS || + signalDeviation.SoftDeviationBPS < params.MinDeviationBPS || + signalDeviation.HardDeviationBPS > params.MaxDeviationBPS || + signalDeviation.SoftDeviationBPS > params.MaxDeviationBPS { + return ErrDeviationOutOfRange.Wrapf( + "min %d, max %d, got %d, %d", + params.MinDeviationBPS, + params.MaxDeviationBPS, + signalDeviation.SoftDeviationBPS, + signalDeviation.HardDeviationBPS, + ) + } + } + return nil +} From 37f48daf54407e0ec9ffcf26ad7442c40ba44877 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 18 Nov 2024 16:02:20 +0700 Subject: [PATCH 257/272] clean up --- api/band/tunnel/v1beta1/params.pulsar.go | 12 ++++++------ proto/band/tunnel/v1beta1/params.proto | 12 ++++++------ x/tunnel/README.md | 12 +++++++++--- x/tunnel/types/params.pb.go | 12 ++++++------ 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/api/band/tunnel/v1beta1/params.pulsar.go b/api/band/tunnel/v1beta1/params.pulsar.go index 170fc8db1..30cfe5fef 100644 --- a/api/band/tunnel/v1beta1/params.pulsar.go +++ b/api/band/tunnel/v1beta1/params.pulsar.go @@ -905,19 +905,19 @@ type Params struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // min_deposit is the minimum deposit required to create a tunnel + // min_deposit is the minimum deposit required to create a tunnel. MinDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` - // min_interval is the minimum interval in seconds + // min_interval is the minimum interval in seconds. MinInterval uint64 `protobuf:"varint,2,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` - // max_interval is the maximum interval in seconds + // max_interval is the maximum interval in seconds. MaxInterval uint64 `protobuf:"varint,3,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` - // min_deviation_bps is the minimum deviation in basis points + // min_deviation_bps is the minimum deviation in basis points. MinDeviationBps uint64 `protobuf:"varint,4,opt,name=min_deviation_bps,json=minDeviationBps,proto3" json:"min_deviation_bps,omitempty"` - // max_deviation_bps is the maximum deviation in basis points + // max_deviation_bps is the maximum deviation in basis points. MaxDeviationBps uint64 `protobuf:"varint,5,opt,name=max_deviation_bps,json=maxDeviationBps,proto3" json:"max_deviation_bps,omitempty"` // max_signals defines the maximum number of signals allowed per tunnel. MaxSignals uint64 `protobuf:"varint,6,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` - // base_packet_fee is the base fee for each packet + // base_packet_fee is the base fee for each packet. BasePacketFee []*v1beta1.Coin `protobuf:"bytes,7,rep,name=base_packet_fee,json=basePacketFee,proto3" json:"base_packet_fee,omitempty"` } diff --git a/proto/band/tunnel/v1beta1/params.proto b/proto/band/tunnel/v1beta1/params.proto index 05fbfe5ef..41e1f2bff 100644 --- a/proto/band/tunnel/v1beta1/params.proto +++ b/proto/band/tunnel/v1beta1/params.proto @@ -10,20 +10,20 @@ import "cosmos/base/v1beta1/coin.proto"; message Params { option (gogoproto.equal) = true; // Use gogoproto.equal for proto3 message equality checks - // min_deposit is the minimum deposit required to create a tunnel + // min_deposit is the minimum deposit required to create a tunnel. repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - // min_interval is the minimum interval in seconds + // min_interval is the minimum interval in seconds. uint64 min_interval = 2; - // max_interval is the maximum interval in seconds + // max_interval is the maximum interval in seconds. uint64 max_interval = 3; - // min_deviation_bps is the minimum deviation in basis points + // min_deviation_bps is the minimum deviation in basis points. uint64 min_deviation_bps = 4 [(gogoproto.customname) = "MinDeviationBPS"]; - // max_deviation_bps is the maximum deviation in basis points + // max_deviation_bps is the maximum deviation in basis points. uint64 max_deviation_bps = 5 [(gogoproto.customname) = "MaxDeviationBPS"]; // max_signals defines the maximum number of signals allowed per tunnel. uint64 max_signals = 6; - // base_packet_fee is the base fee for each packet + // base_packet_fee is the base fee for each packet. repeated cosmos.base.v1beta1.Coin base_packet_fee = 7 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/x/tunnel/README.md b/x/tunnel/README.md index dca74cb9f..5421d50cf 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -22,7 +22,7 @@ The Tunnel module is designed to decentralize the creation of push-based price d - [ActiveTunnelID](#activetunnelid) - [Tunnel](#tunnel-1) - [Packet](#packet-1) - - [LatestPrices](#latestPrices) + - [LatestPrices](#latestprices) - [Deposit](#deposit) - [Params](#params) - [Msg](#msg) @@ -31,8 +31,8 @@ The Tunnel module is designed to decentralize the creation of push-based price d - [MsgActivate](#msgactivate) - [MsgDeactivate](#msgdeactivate) - [MsgTriggerTunnel](#msgtriggertunnel) - - [MsgDepositToTunnel](#MsgDepositToTunnel) - - [MsgWithdrawFromTunnel](#MsgWithdrawFromTunnel) + - [MsgDepositToTunnel](#msgdeposittotunnel) + - [MsgWithdrawFromTunnel](#msgwithdrawfromtunnel) - [Events](#events) - [Event: `create_tunnel`](#event-create_tunnel) - [Event: `update_and_reset_tunnel`](#event-update_and_reset_tunnel) @@ -189,6 +189,12 @@ type Params struct { MinDeposit sdk.Coins // MinInterval is the minimum interval in seconds. MinInterval uint64 + // MinInterval is the minimum interval in seconds. + MinInterval uint64 + // MinDeviationBPS is the minimum deviation in basis points. + MinDeviationBPS uint64 + // MaxDeviationBPS is the maximum deviation in basis points. + MaxDeviationBPS uint64 // MaxSignals defines the maximum number of signals allowed per tunnel. MaxSignals uint64 // BasePacketFee is the base fee for each packet. diff --git a/x/tunnel/types/params.pb.go b/x/tunnel/types/params.pb.go index b210d86c5..249c701bd 100644 --- a/x/tunnel/types/params.pb.go +++ b/x/tunnel/types/params.pb.go @@ -27,19 +27,19 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params is the data structure that keeps the parameters of the module. type Params struct { - // min_deposit is the minimum deposit required to create a tunnel + // min_deposit is the minimum deposit required to create a tunnel. MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit"` - // min_interval is the minimum interval in seconds + // min_interval is the minimum interval in seconds. MinInterval uint64 `protobuf:"varint,2,opt,name=min_interval,json=minInterval,proto3" json:"min_interval,omitempty"` - // max_interval is the maximum interval in seconds + // max_interval is the maximum interval in seconds. MaxInterval uint64 `protobuf:"varint,3,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` - // min_deviation_bps is the minimum deviation in basis points + // min_deviation_bps is the minimum deviation in basis points. MinDeviationBPS uint64 `protobuf:"varint,4,opt,name=min_deviation_bps,json=minDeviationBps,proto3" json:"min_deviation_bps,omitempty"` - // max_deviation_bps is the maximum deviation in basis points + // max_deviation_bps is the maximum deviation in basis points. MaxDeviationBPS uint64 `protobuf:"varint,5,opt,name=max_deviation_bps,json=maxDeviationBps,proto3" json:"max_deviation_bps,omitempty"` // max_signals defines the maximum number of signals allowed per tunnel. MaxSignals uint64 `protobuf:"varint,6,opt,name=max_signals,json=maxSignals,proto3" json:"max_signals,omitempty"` - // base_packet_fee is the base fee for each packet + // base_packet_fee is the base fee for each packet. BasePacketFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=base_packet_fee,json=basePacketFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_packet_fee"` } From 9d54f77984761fd8778fcf79d1eb039b95024f0e Mon Sep 17 00:00:00 2001 From: satawatnack Date: Mon, 18 Nov 2024 17:06:17 +0700 Subject: [PATCH 258/272] add validate func --- x/tunnel/keeper/msg_server.go | 18 ++++-------------- x/tunnel/types/params.go | 4 ++-- x/tunnel/types/tunnel.go | 13 +++++++++++++ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 10586929d..9bdf286f4 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -39,13 +39,8 @@ func (ms msgServer) CreateTunnel( } // validate interval - if msg.Interval < params.MinInterval || msg.Interval > params.MaxInterval { - return nil, types.ErrIntervalOutOfRange.Wrapf( - "max %d, min %d, got %d", - params.MaxInterval, - params.MinInterval, - msg.Interval, - ) + if err := types.ValidateInterval(msg.Interval, params); err != nil { + return nil, err } creator, err := sdk.AccAddressFromBech32(msg.Creator) @@ -98,13 +93,8 @@ func (ms msgServer) UpdateAndResetTunnel( } // validate interval - if msg.Interval < params.MinInterval || msg.Interval > params.MaxInterval { - return nil, types.ErrIntervalOutOfRange.Wrapf( - "max %d, min %d, got %d", - params.MaxInterval, - params.MinInterval, - msg.Interval, - ) + if err := types.ValidateInterval(msg.Interval, params); err != nil { + return nil, err } tunnel, err := ms.Keeper.GetTunnel(ctx, msg.TunnelID) diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index fab42e267..7d460f02f 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -70,7 +70,7 @@ func (p Params) Validate() error { } // validate max interval is greater than min interval - if p.MaxInterval <= p.MinInterval { + if p.MaxInterval < p.MinInterval { return fmt.Errorf("max interval must be greater than min interval: %d <= %d", p.MaxInterval, p.MinInterval) } @@ -85,7 +85,7 @@ func (p Params) Validate() error { } // validate max deviation bps is greater than min deviation bps - if p.MaxDeviationBPS <= p.MinDeviationBPS { + if p.MaxDeviationBPS < p.MinDeviationBPS { return fmt.Errorf( "max deviation bps must be greater than min deviation bps: %d <= %d", p.MaxDeviationBPS, diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index dcdc42605..e07193d85 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -89,3 +89,16 @@ func (t Tunnel) GetSignalIDs() []string { } return signalIDs } + +// ValidateInterval validates the interval. +func ValidateInterval(interval uint64, params Params) error { + if interval < params.MinInterval || interval > params.MaxInterval { + return ErrIntervalOutOfRange.Wrapf( + "max %d, min %d, got %d", + params.MaxInterval, + params.MinInterval, + interval, + ) + } + return nil +} From 0fa4776b1997514e50851760408ec075d28a9f48 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 18 Nov 2024 18:55:31 +0700 Subject: [PATCH 259/272] clean --- api/band/tunnel/v1beta1/tx.pulsar.go | 231 +++++++++++++-------------- proto/band/tunnel/v1beta1/tx.proto | 6 +- x/tunnel/types/tx.pb.go | 137 ++++++++-------- 3 files changed, 184 insertions(+), 190 deletions(-) diff --git a/api/band/tunnel/v1beta1/tx.pulsar.go b/api/band/tunnel/v1beta1/tx.pulsar.go index bf16e33bc..5eddb0a4e 100644 --- a/api/band/tunnel/v1beta1/tx.pulsar.go +++ b/api/band/tunnel/v1beta1/tx.pulsar.go @@ -8342,129 +8342,126 @@ var file_band_tunnel_v1beta1_tx_proto_rawDesc = []byte{ 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa1, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, - 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, 0x35, 0xc8, - 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xaa, 0x02, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1e, 0xe2, - 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0xea, 0xde, 0x1f, 0x09, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x08, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x3a, 0x30, 0x82, 0xe7, 0xb0, - 0x2a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, - 0x1c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1f, 0x0a, - 0x1d, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, - 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, - 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x06, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, + 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x98, + 0x02, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, + 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x03, 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, 0x35, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x38, 0x0a, + 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 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, 0x0a, 0x77, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x3a, 0x30, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1c, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, + 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x0f, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, + 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 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, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, + 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2c, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x34, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, - 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, - 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x34, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, + 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, - 0x20, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, 0x44, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0a, 0x44, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x2a, 0x2e, + 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x25, 0x2e, 0x62, 0x61, 0x6e, - 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x6b, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x12, 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2f, 0x2e, 0x62, - 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, - 0x12, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x12, 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, - 0x32, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0f, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, + 0x27, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x2f, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x12, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, + 0x2a, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, - 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd8, - 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, - 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, - 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, - 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, - 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, - 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, 0x32, 0x2e, 0x62, 0x61, + 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, + 0x6d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd8, 0x01, 0x0a, 0x17, 0x63, + 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, + 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, + 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, + 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, + 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/band/tunnel/v1beta1/tx.proto b/proto/band/tunnel/v1beta1/tx.proto index cba95092d..2d3b02573 100644 --- a/proto/band/tunnel/v1beta1/tx.proto +++ b/proto/band/tunnel/v1beta1/tx.proto @@ -138,8 +138,7 @@ message MsgDepositToTunnel { option (amino.name) = "tunnel/MsgDepositToTunnel"; // tunnel_id defines the unique id of the tunnel. - uint64 tunnel_id = 1 - [(gogoproto.customname) = "TunnelID", (gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // amount to be deposited by depositor. repeated cosmos.base.v1beta1.Coin amount = 2 [ @@ -161,8 +160,7 @@ message MsgWithdrawFromTunnel { option (amino.name) = "tunnel/MsgWithdrawFromTunnel"; // tunnel_id defines the unique id of the tunnel. - uint64 tunnel_id = 1 - [(gogoproto.customname) = "TunnelID", (gogoproto.jsontag) = "tunnel_id", (amino.dont_omitempty) = true]; + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; // amount to be withdrawn by withdrawer. repeated cosmos.base.v1beta1.Coin amount = 2 [ diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index e6322a318..9cf253b0f 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -561,7 +561,7 @@ var xxx_messageInfo_MsgTriggerTunnelResponse proto.InternalMessageInfo // MsgDepositToTunnel defines a message to deposit to an existing tunnel. type MsgDepositToTunnel struct { // tunnel_id defines the unique id of the tunnel. - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // amount to be deposited by depositor. Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` // depositor defines the deposit addresses from the tunnel. @@ -662,7 +662,7 @@ var xxx_messageInfo_MsgDepositToTunnelResponse proto.InternalMessageInfo // MsgWithdrawFromTunnel is the transaction message to withdraw a deposit from an existing tunnel. type MsgWithdrawFromTunnel struct { // tunnel_id defines the unique id of the tunnel. - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id"` + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // amount to be withdrawn by withdrawer. Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` // withdrawer defines the withdraw addresses from the tunnel. @@ -874,73 +874,72 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tx.proto", fileDescriptor_d18351d83b4705d0) } var fileDescriptor_d18351d83b4705d0 = []byte{ - // 1059 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x89, 0x9b, 0x4c, 0xd2, 0xa6, 0xdd, 0xba, 0xc4, 0x5e, 0x82, 0x6d, 0x96, 0x56, - 0x75, 0xa3, 0x64, 0x97, 0xb8, 0x04, 0x41, 0x38, 0xc5, 0x35, 0x48, 0x39, 0x58, 0x42, 0xdb, 0x40, - 0x25, 0x84, 0x14, 0xad, 0xbd, 0xd3, 0xf5, 0xa8, 0xf6, 0x8e, 0xb5, 0x33, 0x76, 0x6b, 0x4e, 0x88, - 0x23, 0x27, 0x38, 0x70, 0x42, 0x42, 0xe2, 0x86, 0x7a, 0x21, 0x87, 0xfe, 0x88, 0x0a, 0x71, 0x88, - 0x38, 0x71, 0x0a, 0x28, 0x39, 0x44, 0xe2, 0x57, 0xa0, 0x9d, 0x99, 0x9d, 0x5d, 0x6f, 0xd6, 0x89, - 0x83, 0x2a, 0xa4, 0x5e, 0xe2, 0x9d, 0x79, 0xdf, 0xbc, 0xf7, 0xbd, 0xef, 0xcd, 0xbe, 0xb7, 0x01, - 0xab, 0x2d, 0xdb, 0x73, 0x4c, 0x3a, 0xf0, 0x3c, 0xd8, 0x35, 0x87, 0x9b, 0x2d, 0x48, 0xed, 0x4d, - 0x93, 0x3e, 0x33, 0xfa, 0x3e, 0xa6, 0x58, 0xbd, 0x19, 0x58, 0x0d, 0x6e, 0x35, 0x84, 0x55, 0x2b, - 0xba, 0x18, 0xbb, 0x5d, 0x68, 0x32, 0x48, 0x6b, 0xf0, 0xd8, 0xb4, 0xbd, 0x11, 0xc7, 0x6b, 0x79, - 0x17, 0xbb, 0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f, 0x07, 0xf3, 0x72, 0xac, - 0x54, 0x26, 0x79, 0x08, 0x11, 0x5a, 0xf5, 0x22, 0x84, 0xf4, 0xfb, 0x25, 0x00, 0xb1, 0x19, 0xa0, - 0x4f, 0x3a, 0x17, 0x61, 0xb4, 0xb5, 0x8b, 0x31, 0xd2, 0x3b, 0x04, 0x57, 0xc7, 0x1b, 0xf6, 0x9d, - 0x49, 0x87, 0xc7, 0x60, 0xda, 0xc6, 0x54, 0x30, 0x19, 0xe6, 0x09, 0x58, 0x4e, 0x76, 0xd7, 0xbb, - 0x93, 0x59, 0x8e, 0x01, 0x35, 0x73, 0x4a, 0xa0, 0x0c, 0x46, 0x81, 0x9a, 0xd2, 0x88, 0x26, 0xaa, - 0x72, 0x16, 0xab, 0xd5, 0xa6, 0xc7, 0xca, 0xa8, 0x2d, 0xb0, 0x34, 0xf6, 0xc2, 0xde, 0x3e, 0xff, - 0x16, 0x71, 0x94, 0xb6, 0x3e, 0x0d, 0x2a, 0x8c, 0xa1, 0xcd, 0x7d, 0x1d, 0x34, 0xad, 0xfa, 0xee, - 0xcb, 0xe3, 0x92, 0x72, 0x78, 0x5c, 0x52, 0xfe, 0x3e, 0x2e, 0x29, 0xdf, 0x9d, 0x94, 0x66, 0x0e, - 0x4f, 0x4a, 0x33, 0x7f, 0x9e, 0x94, 0x66, 0xbe, 0x30, 0x63, 0xdd, 0x2f, 0x70, 0xcc, 0xbe, 0xd3, - 0xdb, 0xb8, 0x6b, 0xb6, 0x3b, 0x36, 0xf2, 0xcc, 0xe1, 0x7d, 0xf3, 0x59, 0xf8, 0x8f, 0x07, 0x6b, - 0x85, 0xad, 0x1c, 0x43, 0xdc, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xef, 0x4b, 0x21, 0xa1, + // 1043 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x41, 0x6f, 0x1b,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 0xf3, 0xee, + 0x64, 0x96, 0x63, 0x40, 0xc3, 0x9e, 0x12, 0xa8, 0x82, 0x31, 0xa0, 0xa7, 0xb4, 0x9d, 0x89, 0xaa, + 0x9c, 0xc5, 0x1a, 0xd5, 0xe9, 0xb1, 0x2a, 0x6a, 0x13, 0x2c, 0x8f, 0xbd, 0xb0, 0xb7, 0xcf, 0xbf, + 0x45, 0x02, 0x65, 0x6c, 0x4c, 0x83, 0x8a, 0x62, 0x18, 0xf3, 0x5f, 0x85, 0x4d, 0xab, 0xb6, 0xf7, + 0xe2, 0xb8, 0xa8, 0x1d, 0x1d, 0x17, 0xb5, 0x7f, 0x8e, 0x8b, 0xda, 0x77, 0x27, 0xc5, 0x99, 0xa3, + 0x93, 0xe2, 0xcc, 0x5f, 0x27, 0xc5, 0x99, 0xcf, 0xed, 0x58, 0xf7, 0x0b, 0x1d, 0xf3, 0x6f, 0xf0, + 0x16, 0xe9, 0xd8, 0xad, 0xb6, 0x8b, 0xb0, 0x3d, 0xb8, 0x6f, 0x3f, 0x8b, 0xfe, 0xa9, 0xe0, 0xad, + 0xb0, 0x99, 0xe5, 0x88, 0xfb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x50, 0x74, 0xfe, 0x7d, 0x0d, 0x00, 0x00, } From 3acf76508ddb6309c86660c8cb8c8763b366aa7a Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Tue, 19 Nov 2024 00:18:11 +0700 Subject: [PATCH 260/272] cleanup --- x/tunnel/client/cli/util_test.go | 1 - x/tunnel/keeper/keeper.go | 2 +- .../{keeper_latest_signal_prices.go => keeper_latest_prices.go} | 0 ...atest_signal_prices_test.go => keeper_latest_prices_test.go} | 0 4 files changed, 1 insertion(+), 2 deletions(-) rename x/tunnel/keeper/{keeper_latest_signal_prices.go => keeper_latest_prices.go} (100%) rename x/tunnel/keeper/{keeper_latest_signal_prices_test.go => keeper_latest_prices_test.go} (100%) diff --git a/x/tunnel/client/cli/util_test.go b/x/tunnel/client/cli/util_test.go index 809ddcddb..c24a63731 100644 --- a/x/tunnel/client/cli/util_test.go +++ b/x/tunnel/client/cli/util_test.go @@ -17,7 +17,6 @@ func TestParseSignalDeviations(t *testing.T) { defer cleanup() result, err := parseSignalDeviations(file) - require.NoError(t, err) require.Equal(t, signalDeviations, result.SignalDeviations) } diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index b402a2303..bf1ac1cee 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -42,7 +42,7 @@ func NewKeeper( // ensure that authority is a valid AccAddress if _, err := sdk.AccAddressFromBech32(authority); err != nil { - panic(fmt.Errorf("invalid bandtss authority address: %w", err)) + panic(fmt.Errorf("invalid authority address: %w", err)) } return Keeper{ diff --git a/x/tunnel/keeper/keeper_latest_signal_prices.go b/x/tunnel/keeper/keeper_latest_prices.go similarity index 100% rename from x/tunnel/keeper/keeper_latest_signal_prices.go rename to x/tunnel/keeper/keeper_latest_prices.go diff --git a/x/tunnel/keeper/keeper_latest_signal_prices_test.go b/x/tunnel/keeper/keeper_latest_prices_test.go similarity index 100% rename from x/tunnel/keeper/keeper_latest_signal_prices_test.go rename to x/tunnel/keeper/keeper_latest_prices_test.go From 8632eb279b338ba667d8bb19300a52f07827a6fa Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 19 Nov 2024 13:37:58 +0700 Subject: [PATCH 261/272] fix reviews --- api/band/tunnel/v1beta1/tunnel.pulsar.go | 2 +- benchmark/tunnel_bench_test.go | 14 ++-- proto/band/tunnel/v1beta1/tunnel.proto | 2 +- x/tunnel/client/cli/util.go | 2 +- x/tunnel/client/cli/util_test.go | 6 +- x/tunnel/keeper/keeper.go | 1 - x/tunnel/keeper/keeper_packet.go | 2 +- x/tunnel/keeper/keeper_tunnel.go | 8 +- x/tunnel/module.go | 4 - x/tunnel/types/genesis.go | 10 --- x/tunnel/types/latest_prices.go | 50 +++++++++++++ .../{signal_test.go => latest_prices_test.go} | 0 x/tunnel/types/msgs.go | 13 ---- x/tunnel/types/packet_content.go | 2 +- x/tunnel/types/params.go | 12 ++- x/tunnel/types/params_test.go | 4 +- .../types/{signal.go => signal_deviation.go} | 49 ------------ x/tunnel/types/signal_deviation_test.go | 75 +++++++++++++++++++ x/tunnel/types/tss_route.go | 6 -- x/tunnel/types/tunnel.go | 8 ++ x/tunnel/types/tunnel.pb.go | 2 +- 21 files changed, 162 insertions(+), 110 deletions(-) create mode 100644 x/tunnel/types/latest_prices.go rename x/tunnel/types/{signal_test.go => latest_prices_test.go} (100%) rename x/tunnel/types/{signal.go => signal_deviation.go} (55%) create mode 100644 x/tunnel/types/signal_deviation_test.go diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index e4a2bf2a6..e23399f9e 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -5535,7 +5535,7 @@ func (x *Deposit) GetAmount() []*v1beta1.Coin { return nil } -// Tunnel is the type for a tunnel +// Tunnel contains the information of the tunnel that is created by the user type Tunnel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/benchmark/tunnel_bench_test.go b/benchmark/tunnel_bench_test.go index f4b1efc45..fbb6fe495 100644 --- a/benchmark/tunnel_bench_test.go +++ b/benchmark/tunnel_bench_test.go @@ -75,7 +75,7 @@ func testBenchmarkTunnel(numTunnels, numSignals, maxSignals int, encoder feedsty signalDeviations = append(signalDeviations, globalSignalDeviations[signalIdx[j]]) } - err := createNewTunnels(ba, &types.TSSRoute{}, signalDeviations, encoder) + err := createNewTunnel(ba, &types.TSSRoute{}, signalDeviations, 1000, encoder) require.NoError(b, err) } @@ -117,16 +117,17 @@ func testBenchmarkTunnel(numTunnels, numSignals, maxSignals int, encoder feedsty } } -// createNewTunnels creates new tunnels with given signalInfos and encoder. -func createNewTunnels( +// createNewTunnel creates new tunnel with given signalInfos and encoder. +func createNewTunnel( ba *BenchmarkApp, route types.RouteI, signalDeviations []types.SignalDeviation, + interval uint64, encoder feedstypes.Encoder, ) error { creator := bandtesting.Alice.Address tunnel, err := ba.TunnelKeeper.AddTunnel( - ba.Ctx, route, encoder, signalDeviations, 1000, creator, + ba.Ctx, route, encoder, signalDeviations, interval, creator, ) if err != nil { return err @@ -142,12 +143,13 @@ func createNewTunnels( return err } - depositAmt := sdk.NewCoins(sdk.NewInt64Coin("uband", 50000)) + // send coins to fee payer + amt := sdk.NewCoins(sdk.NewInt64Coin("uband", 50000)) if err := ba.BankKeeper.SendCoins( ba.Ctx, bandtesting.Validators[0].Address, sdk.MustAccAddressFromBech32(tunnel.FeePayer), - depositAmt, + amt, ); err != nil { return err } diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index d183512f1..5c2faa645 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -50,7 +50,7 @@ message Deposit { ]; } -// Tunnel is the type for a tunnel +// Tunnel contains the information of the tunnel that is created by the user message Tunnel { option (gogoproto.equal) = true; diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index 117b134c0..c1a9e8d09 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -20,7 +20,7 @@ type SignalDeviation struct { } // ToSignalDeviations converts signal information to types.SignalDeviation, excluding soft deviation. -// Note: Soft deviation may be utilized in the future for deviation adjustments. +// Note: Soft deviation may be utilized in the future when deviation adjustments are needed. func (ss SignalDeviations) ToSignalDeviations() []types.SignalDeviation { var signalDeviations []types.SignalDeviation for _, sd := range ss.SignalDeviations { diff --git a/x/tunnel/client/cli/util_test.go b/x/tunnel/client/cli/util_test.go index c24a63731..fa089707c 100644 --- a/x/tunnel/client/cli/util_test.go +++ b/x/tunnel/client/cli/util_test.go @@ -29,11 +29,7 @@ func createTempSignalDeviationFile(signalDeviations []SignalDeviation) (string, } filePath := file.Name() - data := struct { - SignalDeviations []SignalDeviation `json:"signal_deviations"` - }{SignalDeviations: signalDeviations} - - content, err := json.Marshal(data) + content, err := json.Marshal(SignalDeviations{SignalDeviations: signalDeviations}) if err != nil { panic(err) } diff --git a/x/tunnel/keeper/keeper.go b/x/tunnel/keeper/keeper.go index bf1ac1cee..ae10531dc 100644 --- a/x/tunnel/keeper/keeper.go +++ b/x/tunnel/keeper/keeper.go @@ -12,7 +12,6 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -// Keeper of the x/tunnel store type Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index 0e64f79ee..220a19713 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -176,7 +176,7 @@ func (k Keeper) CreatePacket( return types.Packet{}, types.ErrInvalidRoute } - routeFee, err := k.GetRouterFee(ctx, route) + routeFee, err := k.GetRouteFee(ctx, route) if err != nil { return types.Packet{}, err } diff --git a/x/tunnel/keeper/keeper_tunnel.go b/x/tunnel/keeper/keeper_tunnel.go index d70097656..8119cee35 100644 --- a/x/tunnel/keeper/keeper_tunnel.go +++ b/x/tunnel/keeper/keeper_tunnel.go @@ -278,7 +278,7 @@ func (k Keeper) HasEnoughFundToCreatePacket(ctx sdk.Context, tunnelID uint64) (b return false, types.ErrInvalidRoute } - routeFee, err := k.GetRouterFee(ctx, route) + routeFee, err := k.GetRouteFee(ctx, route) if err != nil { return false, err } @@ -329,9 +329,9 @@ func (k Keeper) GenerateTunnelAccount(ctx sdk.Context, key string) (sdk.AccAddre return tunnelAccAddr, nil } -// GetRouterFee returns the fee of the given router -func (k Keeper) GetRouterFee(ctx sdk.Context, router types.RouteI) (sdk.Coins, error) { - switch router.(type) { +// GetRouteFee returns the fee of the given route +func (k Keeper) GetRouteFee(ctx sdk.Context, route types.RouteI) (sdk.Coins, error) { + switch route.(type) { case *types.TSSRoute: return sdk.Coins{}, nil default: diff --git a/x/tunnel/module.go b/x/tunnel/module.go index ae2351ba0..4d1ce407d 100644 --- a/x/tunnel/module.go +++ b/x/tunnel/module.go @@ -118,10 +118,6 @@ func (AppModule) Name() string { return types.ModuleName } -// RegisterInvariants registers the tunnel module invariants. -func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { -} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index 28475df48..d2cfc4020 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -1,8 +1,6 @@ package types import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -80,11 +78,3 @@ func ValidateGenesis(data GenesisState) error { return data.Params.Validate() } - -// Validate validates the total fees -func (tf TotalFees) Validate() error { - if !tf.TotalPacketFee.IsValid() { - return fmt.Errorf("invalid total packet fee: %s", tf.TotalPacketFee) - } - return nil -} diff --git a/x/tunnel/types/latest_prices.go b/x/tunnel/types/latest_prices.go new file mode 100644 index 000000000..a7205d507 --- /dev/null +++ b/x/tunnel/types/latest_prices.go @@ -0,0 +1,50 @@ +package types + +import ( + fmt "fmt" + + feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" +) + +// NewLatestPrices creates a new LatestPrices instance. +func NewLatestPrices( + tunnelID uint64, + prices []feedstypes.Price, + lastInterval int64, +) LatestPrices { + return LatestPrices{ + TunnelID: tunnelID, + Prices: prices, + LastInterval: lastInterval, + } +} + +// Validate validates the latest prices. +func (l LatestPrices) Validate() error { + if l.TunnelID == 0 { + return fmt.Errorf("tunnel ID cannot be 0") + } + + if l.LastInterval < 0 { + return fmt.Errorf("last interval cannot be negative") + } + + return nil +} + +// UpdatePrices updates prices in the latest prices. +func (l *LatestPrices) UpdatePrices(newPrices []feedstypes.Price) { + pricesIndex := make(map[string]int) + for i, p := range l.Prices { + pricesIndex[p.SignalID] = i + } + + for _, p := range newPrices { + if i, ok := pricesIndex[p.SignalID]; ok { + l.Prices[i] = p + } else { + l.Prices = append(l.Prices, p) + pricesIndex[p.SignalID] = len(l.Prices) - 1 + } + } +} diff --git a/x/tunnel/types/signal_test.go b/x/tunnel/types/latest_prices_test.go similarity index 100% rename from x/tunnel/types/signal_test.go rename to x/tunnel/types/latest_prices_test.go diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 9c8db9764..56a892172 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -66,14 +66,6 @@ func NewMsgCreateTSSTunnel( return m, nil } -// Type Implements Msg. -func (m MsgCreateTunnel) Type() string { return sdk.MsgTypeURL(&m) } - -// GetSigners returns the expected signers for the message. -func (m *MsgCreateTunnel) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Creator)} -} - // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { // creator address must be valid @@ -288,11 +280,6 @@ func NewMsgUpdateParams( // Type Implements Msg. func (m MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&m) } -// GetSigners returns the expected signers for the message. -func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Authority)} -} - // ValidateBasic does a check on the provided data. func (m *MsgUpdateParams) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { diff --git a/x/tunnel/types/packet_content.go b/x/tunnel/types/packet_content.go index 90f710627..a6f9c8221 100644 --- a/x/tunnel/types/packet_content.go +++ b/x/tunnel/types/packet_content.go @@ -2,7 +2,7 @@ package types import "github.com/cosmos/gogoproto/proto" -// PacketI defines a type that implements the Packet interface +// PacketContentI defines the interface for packet content. type PacketContentI interface { proto.Message } diff --git a/x/tunnel/types/params.go b/x/tunnel/types/params.go index 7d460f02f..369e66cb7 100644 --- a/x/tunnel/types/params.go +++ b/x/tunnel/types/params.go @@ -69,9 +69,13 @@ func (p Params) Validate() error { return err } - // validate max interval is greater than min interval + // validate max interval is greater than or equal to min interval if p.MaxInterval < p.MinInterval { - return fmt.Errorf("max interval must be greater than min interval: %d <= %d", p.MaxInterval, p.MinInterval) + return fmt.Errorf( + "max interval must be greater than or equal to min interval: %d <= %d", + p.MaxInterval, + p.MinInterval, + ) } // validate MinDeviationBPS @@ -84,10 +88,10 @@ func (p Params) Validate() error { return err } - // validate max deviation bps is greater than min deviation bps + // validate max deviation bps is greater than or equal to min deviation bps if p.MaxDeviationBPS < p.MinDeviationBPS { return fmt.Errorf( - "max deviation bps must be greater than min deviation bps: %d <= %d", + "max deviation bps must be greater than or equal to min deviation bps: %d <= %d", p.MaxDeviationBPS, p.MinDeviationBPS, ) diff --git a/x/tunnel/types/params_test.go b/x/tunnel/types/params_test.go index 00491d4fa..70383932f 100644 --- a/x/tunnel/types/params_test.go +++ b/x/tunnel/types/params_test.go @@ -40,7 +40,7 @@ func TestParams_Validate(t *testing.T) { return p }(), expErr: true, - expErrMsg: "max interval must be greater than min interval: 5 <= 10", + expErrMsg: "max interval must be greater than or equal to min interval", }, "invalid MinDeviationBPS": { genesisState: func() types.Params { @@ -68,7 +68,7 @@ func TestParams_Validate(t *testing.T) { return p }(), expErr: true, - expErrMsg: "max deviation bps must be greater than min deviation bps: 5 <= 10", + expErrMsg: "max deviation bps must be greater than or equal to min deviation bps", }, "invalid MaxSignals": { genesisState: func() types.Params { diff --git a/x/tunnel/types/signal.go b/x/tunnel/types/signal_deviation.go similarity index 55% rename from x/tunnel/types/signal.go rename to x/tunnel/types/signal_deviation.go index 35051c929..48358d8ee 100644 --- a/x/tunnel/types/signal.go +++ b/x/tunnel/types/signal_deviation.go @@ -1,11 +1,5 @@ package types -import ( - "fmt" - - feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" -) - // NewSignalDeviation creates a new SignalDeviation instance. func NewSignalDeviation( signalID string, @@ -19,49 +13,6 @@ func NewSignalDeviation( } } -// NewLatestPrices creates a new LatestPrices instance. -func NewLatestPrices( - tunnelID uint64, - prices []feedstypes.Price, - lastInterval int64, -) LatestPrices { - return LatestPrices{ - TunnelID: tunnelID, - Prices: prices, - LastInterval: lastInterval, - } -} - -// Validate validates the latest prices. -func (l LatestPrices) Validate() error { - if l.TunnelID == 0 { - return fmt.Errorf("tunnel ID cannot be 0") - } - - if l.LastInterval < 0 { - return fmt.Errorf("last interval cannot be negative") - } - - return nil -} - -// UpdatePrices updates prices in the latest prices. -func (l *LatestPrices) UpdatePrices(newPrices []feedstypes.Price) { - pricesIndex := make(map[string]int) - for i, p := range l.Prices { - pricesIndex[p.SignalID] = i - } - - for _, p := range newPrices { - if i, ok := pricesIndex[p.SignalID]; ok { - l.Prices[i] = p - } else { - l.Prices = append(l.Prices, p) - pricesIndex[p.SignalID] = len(l.Prices) - 1 - } - } -} - // ValidateSignalDeviations validates the signal deviations with the given params. func ValidateSignalDeviations(signalDeviations []SignalDeviation, params Params) error { // validate max signals diff --git a/x/tunnel/types/signal_deviation_test.go b/x/tunnel/types/signal_deviation_test.go new file mode 100644 index 000000000..346170f07 --- /dev/null +++ b/x/tunnel/types/signal_deviation_test.go @@ -0,0 +1,75 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestValidateSignalDeviations(t *testing.T) { + params := types.Params{ + MaxSignals: 5, + MinDeviationBPS: 10, + MaxDeviationBPS: 100, + } + + tests := []struct { + name string + signalDeviations []types.SignalDeviation + expErr bool + expErrMsg string + }{ + { + name: "too many signals", + signalDeviations: []types.SignalDeviation{ + {SignalID: "CS:BTC-USD", HardDeviationBPS: 20, SoftDeviationBPS: 30}, + {SignalID: "CS:ETH-USD", HardDeviationBPS: 40, SoftDeviationBPS: 50}, + {SignalID: "CS:XRP-USD", HardDeviationBPS: 60, SoftDeviationBPS: 70}, + {SignalID: "CS:LTC-USD", HardDeviationBPS: 80, SoftDeviationBPS: 90}, + {SignalID: "CS:BCH-USD", HardDeviationBPS: 100, SoftDeviationBPS: 110}, + {SignalID: "CS:ADA-USD", HardDeviationBPS: 120, SoftDeviationBPS: 130}, + }, + expErr: true, + expErrMsg: "max signals 5, got 6", + }, + { + name: "deviation too low", + signalDeviations: []types.SignalDeviation{ + {SignalID: "CS:BTC-USD", HardDeviationBPS: 5, SoftDeviationBPS: 5}, + }, + expErr: true, + expErrMsg: "min 10, max 100, got 5, 5", + }, + { + name: "deviation too high", + signalDeviations: []types.SignalDeviation{ + {SignalID: "CS:BTC-USD", HardDeviationBPS: 150, SoftDeviationBPS: 150}, + }, + expErr: true, + expErrMsg: "min 10, max 100, got 150, 150", + }, + { + name: "all good", + signalDeviations: []types.SignalDeviation{ + {SignalID: "CS:BTC-USD", HardDeviationBPS: 20, SoftDeviationBPS: 30}, + {SignalID: "CS:ETH-USD", HardDeviationBPS: 40, SoftDeviationBPS: 50}, + }, + expErr: false, + expErrMsg: "", + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + err := types.ValidateSignalDeviations(tc.signalDeviations, params) + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/tunnel/types/tss_route.go b/x/tunnel/types/tss_route.go index 17812925e..285935a48 100644 --- a/x/tunnel/types/tss_route.go +++ b/x/tunnel/types/tss_route.go @@ -1,13 +1,7 @@ package types -import sdk "github.com/cosmos/cosmos-sdk/types" - var _ RouteI = &TSSRoute{} func (r *TSSRoute) ValidateBasic() error { return nil } - -func (r *TSSRoute) Fee() (sdk.Coins, error) { - return sdk.NewCoins(), nil -} diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index e07193d85..79196c1cb 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -90,6 +90,14 @@ func (t Tunnel) GetSignalIDs() []string { return signalIDs } +// Validate validates the total fees +func (tf TotalFees) Validate() error { + if !tf.TotalPacketFee.IsValid() { + return fmt.Errorf("invalid total packet fee: %s", tf.TotalPacketFee) + } + return nil +} + // ValidateInterval validates the interval. func ValidateInterval(interval uint64, params Params) error { if interval < params.MinInterval || interval > params.MaxInterval { diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 17999146b..2592b6b63 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -213,7 +213,7 @@ func (m *Deposit) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { return nil } -// Tunnel is the type for a tunnel +// Tunnel contains the information of the tunnel that is created by the user type Tunnel struct { // id is the tunnel ID ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` From 50468416093853cbd02053376899eda3d6a49ec6 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Tue, 19 Nov 2024 13:42:32 +0700 Subject: [PATCH 262/272] clean up --- api/band/tunnel/v1beta1/tx.pulsar.go | 2 +- proto/band/tunnel/v1beta1/tx.proto | 2 +- x/tunnel/README.md | 6 ++++-- x/tunnel/types/tx.pb.go | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/api/band/tunnel/v1beta1/tx.pulsar.go b/api/band/tunnel/v1beta1/tx.pulsar.go index 5eddb0a4e..1bd8c69c3 100644 --- a/api/band/tunnel/v1beta1/tx.pulsar.go +++ b/api/band/tunnel/v1beta1/tx.pulsar.go @@ -7576,7 +7576,7 @@ type MsgCreateTunnel struct { // signal_deviations is the list of signal deviations. SignalDeviations []*SignalDeviation `protobuf:"bytes,1,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations,omitempty"` - // interval is the interval for delivering the signal prices. + // interval is the interval for delivering the signal prices in seconds. Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` // route is the route for delivering the signal prices Route *anypb.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` diff --git a/proto/band/tunnel/v1beta1/tx.proto b/proto/band/tunnel/v1beta1/tx.proto index 2d3b02573..982fa3932 100644 --- a/proto/band/tunnel/v1beta1/tx.proto +++ b/proto/band/tunnel/v1beta1/tx.proto @@ -50,7 +50,7 @@ message MsgCreateTunnel { // signal_deviations is the list of signal deviations. repeated SignalDeviation signal_deviations = 1 [(gogoproto.nullable) = false]; - // interval is the interval for delivering the signal prices. + // interval is the interval for delivering the signal prices in seconds. uint64 interval = 2; // route is the route for delivering the signal prices google.protobuf.Any route = 3 [(cosmos_proto.accepts_interface) = "Route"]; diff --git a/x/tunnel/README.md b/x/tunnel/README.md index 5421d50cf..095f29114 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -103,6 +103,8 @@ bandd tx tunnel create-tunnel ibc [channel-id] [encoder] [initial-deposit] [inte #### TSS Route +// TODO: waiting for implementation + ### Packet A Packet is the data unit produced and sent to the destination chain based on the specified route. @@ -189,8 +191,8 @@ type Params struct { MinDeposit sdk.Coins // MinInterval is the minimum interval in seconds. MinInterval uint64 - // MinInterval is the minimum interval in seconds. - MinInterval uint64 + // MaxInterval is the maximum interval in seconds. + MaxInterval uint64 // MinDeviationBPS is the minimum deviation in basis points. MinDeviationBPS uint64 // MaxDeviationBPS is the maximum deviation in basis points. diff --git a/x/tunnel/types/tx.pb.go b/x/tunnel/types/tx.pb.go index 9cf253b0f..92847dbe8 100644 --- a/x/tunnel/types/tx.pb.go +++ b/x/tunnel/types/tx.pb.go @@ -39,7 +39,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgCreateTunnel struct { // signal_deviations is the list of signal deviations. SignalDeviations []SignalDeviation `protobuf:"bytes,1,rep,name=signal_deviations,json=signalDeviations,proto3" json:"signal_deviations"` - // interval is the interval for delivering the signal prices. + // interval is the interval for delivering the signal prices in seconds. Interval uint64 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"` // route is the route for delivering the signal prices Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` From 9903af74bb443a2c4a5d10b49e7c16cc04609845 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 20 Nov 2024 17:13:16 +0700 Subject: [PATCH 263/272] fix from reviews --- api/band/tunnel/v1beta1/route.pulsar.go | 1276 +++++ api/band/tunnel/v1beta1/tunnel.pulsar.go | 6184 +++++++++------------- proto/band/tunnel/v1beta1/route.proto | 33 + proto/band/tunnel/v1beta1/tunnel.proto | 73 +- x/tunnel/README.md | 40 +- x/tunnel/keeper/genesis.go | 2 +- x/tunnel/keeper/genesis_test.go | 42 +- x/tunnel/keeper/helper.go | 6 +- x/tunnel/keeper/helper_test.go | 9 +- x/tunnel/keeper/keeper_deposit.go | 7 +- x/tunnel/keeper/keeper_packet.go | 23 +- x/tunnel/keeper/keeper_tunnel.go | 7 - x/tunnel/types/genesis.go | 5 + x/tunnel/types/keys.go | 2 +- x/tunnel/types/route.pb.go | 701 +++ x/tunnel/types/tunnel.pb.go | 1600 ++---- 16 files changed, 5171 insertions(+), 4839 deletions(-) create mode 100644 api/band/tunnel/v1beta1/route.pulsar.go create mode 100644 proto/band/tunnel/v1beta1/route.proto create mode 100644 x/tunnel/types/route.pb.go diff --git a/api/band/tunnel/v1beta1/route.pulsar.go b/api/band/tunnel/v1beta1/route.pulsar.go new file mode 100644 index 000000000..71a2d5797 --- /dev/null +++ b/api/band/tunnel/v1beta1/route.pulsar.go @@ -0,0 +1,1276 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package tunnelv1beta1 + +import ( + 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" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_TSSRoute protoreflect.MessageDescriptor + fd_TSSRoute_destination_chain_id protoreflect.FieldDescriptor + fd_TSSRoute_destination_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_band_tunnel_v1beta1_route_proto_init() + md_TSSRoute = File_band_tunnel_v1beta1_route_proto.Messages().ByName("TSSRoute") + fd_TSSRoute_destination_chain_id = md_TSSRoute.Fields().ByName("destination_chain_id") + fd_TSSRoute_destination_contract_address = md_TSSRoute.Fields().ByName("destination_contract_address") +} + +var _ protoreflect.Message = (*fastReflection_TSSRoute)(nil) + +type fastReflection_TSSRoute TSSRoute + +func (x *TSSRoute) ProtoReflect() protoreflect.Message { + return (*fastReflection_TSSRoute)(x) +} + +func (x *TSSRoute) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_route_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_TSSRoute_messageType fastReflection_TSSRoute_messageType +var _ protoreflect.MessageType = fastReflection_TSSRoute_messageType{} + +type fastReflection_TSSRoute_messageType struct{} + +func (x fastReflection_TSSRoute_messageType) Zero() protoreflect.Message { + return (*fastReflection_TSSRoute)(nil) +} +func (x fastReflection_TSSRoute_messageType) New() protoreflect.Message { + return new(fastReflection_TSSRoute) +} +func (x fastReflection_TSSRoute_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TSSRoute +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TSSRoute) Descriptor() protoreflect.MessageDescriptor { + return md_TSSRoute +} + +// 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_TSSRoute) Type() protoreflect.MessageType { + return _fastReflection_TSSRoute_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TSSRoute) New() protoreflect.Message { + return new(fastReflection_TSSRoute) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TSSRoute) Interface() protoreflect.ProtoMessage { + return (*TSSRoute)(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_TSSRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_TSSRoute_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_TSSRoute_destination_contract_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_TSSRoute) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": + return x.DestinationChainId != "" + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": + return x.DestinationContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute 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_TSSRoute) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": + x.DestinationChainId = "" + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": + x.DestinationContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute 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_TSSRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute 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_TSSRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute 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_TSSRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message band.tunnel.v1beta1.TSSRoute is not mutable")) + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message band.tunnel.v1beta1.TSSRoute is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute 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_TSSRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": + return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute 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_TSSRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSRoute", 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_TSSRoute) 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_TSSRoute) 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_TSSRoute) 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_TSSRoute) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TSSRoute) + 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.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + 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().(*TSSRoute) + 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.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + 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().(*TSSRoute) + 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: TSSRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRoute: 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 DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = 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_TSSPacketContent protoreflect.MessageDescriptor + fd_TSSPacketContent_signing_id protoreflect.FieldDescriptor + fd_TSSPacketContent_destination_chain_id protoreflect.FieldDescriptor + fd_TSSPacketContent_destination_contract_address protoreflect.FieldDescriptor +) + +func init() { + file_band_tunnel_v1beta1_route_proto_init() + md_TSSPacketContent = File_band_tunnel_v1beta1_route_proto.Messages().ByName("TSSPacketContent") + fd_TSSPacketContent_signing_id = md_TSSPacketContent.Fields().ByName("signing_id") + fd_TSSPacketContent_destination_chain_id = md_TSSPacketContent.Fields().ByName("destination_chain_id") + fd_TSSPacketContent_destination_contract_address = md_TSSPacketContent.Fields().ByName("destination_contract_address") +} + +var _ protoreflect.Message = (*fastReflection_TSSPacketContent)(nil) + +type fastReflection_TSSPacketContent TSSPacketContent + +func (x *TSSPacketContent) ProtoReflect() protoreflect.Message { + return (*fastReflection_TSSPacketContent)(x) +} + +func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_route_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_TSSPacketContent_messageType fastReflection_TSSPacketContent_messageType +var _ protoreflect.MessageType = fastReflection_TSSPacketContent_messageType{} + +type fastReflection_TSSPacketContent_messageType struct{} + +func (x fastReflection_TSSPacketContent_messageType) Zero() protoreflect.Message { + return (*fastReflection_TSSPacketContent)(nil) +} +func (x fastReflection_TSSPacketContent_messageType) New() protoreflect.Message { + return new(fastReflection_TSSPacketContent) +} +func (x fastReflection_TSSPacketContent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TSSPacketContent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TSSPacketContent) Descriptor() protoreflect.MessageDescriptor { + return md_TSSPacketContent +} + +// 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_TSSPacketContent) Type() protoreflect.MessageType { + return _fastReflection_TSSPacketContent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TSSPacketContent) New() protoreflect.Message { + return new(fastReflection_TSSPacketContent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TSSPacketContent) Interface() protoreflect.ProtoMessage { + return (*TSSPacketContent)(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_TSSPacketContent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SigningId != uint64(0) { + value := protoreflect.ValueOfUint64(x.SigningId) + if !f(fd_TSSPacketContent_signing_id, value) { + return + } + } + if x.DestinationChainId != "" { + value := protoreflect.ValueOfString(x.DestinationChainId) + if !f(fd_TSSPacketContent_destination_chain_id, value) { + return + } + } + if x.DestinationContractAddress != "" { + value := protoreflect.ValueOfString(x.DestinationContractAddress) + if !f(fd_TSSPacketContent_destination_contract_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_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + return x.SigningId != uint64(0) + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": + return x.DestinationChainId != "" + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": + return x.DestinationContractAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + x.SigningId = uint64(0) + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": + x.DestinationChainId = "" + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": + x.DestinationContractAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + value := x.SigningId + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": + value := x.DestinationChainId + return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": + value := x.DestinationContractAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + x.SigningId = value.Uint() + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": + x.DestinationChainId = value.Interface().(string) + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": + x.DestinationContractAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + panic(fmt.Errorf("field signing_id of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": + panic(fmt.Errorf("field destination_chain_id of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": + panic(fmt.Errorf("field destination_contract_address of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": + return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent 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_TSSPacketContent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSPacketContent", 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_TSSPacketContent) 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_TSSPacketContent) 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_TSSPacketContent) 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_TSSPacketContent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TSSPacketContent) + 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.SigningId != 0 { + n += 1 + runtime.Sov(uint64(x.SigningId)) + } + l = len(x.DestinationChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationContractAddress) + 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().(*TSSPacketContent) + 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.DestinationContractAddress) > 0 { + i -= len(x.DestinationContractAddress) + copy(dAtA[i:], x.DestinationContractAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + i-- + dAtA[i] = 0x1a + } + if len(x.DestinationChainId) > 0 { + i -= len(x.DestinationChainId) + copy(dAtA[i:], x.DestinationChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + i-- + dAtA[i] = 0x12 + } + if x.SigningId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SigningId)) + i-- + dAtA[i] = 0x8 + } + 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().(*TSSPacketContent) + 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: TSSPacketContent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigningId", wireType) + } + x.SigningId = 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.SigningId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = 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: band/tunnel/v1beta1/route.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) +) + +// TSSRoute is the type for a TSS route +type TSSRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (x *TSSRoute) Reset() { + *x = TSSRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TSSRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TSSRoute) ProtoMessage() {} + +// Deprecated: Use TSSRoute.ProtoReflect.Descriptor instead. +func (*TSSRoute) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{0} +} + +func (x *TSSRoute) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *TSSRoute) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +// TSSPacketContent is the packet content for TSS +type TSSPacketContent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signing_id is the signing ID + SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainId string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (x *TSSPacketContent) Reset() { + *x = TSSPacketContent{} + if protoimpl.UnsafeEnabled { + mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TSSPacketContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TSSPacketContent) ProtoMessage() {} + +// Deprecated: Use TSSPacketContent.ProtoReflect.Descriptor instead. +func (*TSSPacketContent) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{1} +} + +func (x *TSSPacketContent) GetSigningId() uint64 { + if x != nil { + return x.SigningId + } + return 0 +} + +func (x *TSSPacketContent) GetDestinationChainId() string { + if x != nil { + return x.DestinationChainId + } + return "" +} + +func (x *TSSPacketContent) GetDestinationContractAddress() string { + if x != nil { + return x.DestinationContractAddress + } + return "" +} + +var File_band_tunnel_v1beta1_route_proto protoreflect.FileDescriptor + +var file_band_tunnel_v1beta1_route_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, + 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0x9e, 0x02, 0x0a, + 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, + 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, + 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x42, 0xdf, 0x01, + 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, + 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, + 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, + 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_band_tunnel_v1beta1_route_proto_rawDescOnce sync.Once + file_band_tunnel_v1beta1_route_proto_rawDescData = file_band_tunnel_v1beta1_route_proto_rawDesc +) + +func file_band_tunnel_v1beta1_route_proto_rawDescGZIP() []byte { + file_band_tunnel_v1beta1_route_proto_rawDescOnce.Do(func() { + file_band_tunnel_v1beta1_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_band_tunnel_v1beta1_route_proto_rawDescData) + }) + return file_band_tunnel_v1beta1_route_proto_rawDescData +} + +var file_band_tunnel_v1beta1_route_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_band_tunnel_v1beta1_route_proto_goTypes = []interface{}{ + (*TSSRoute)(nil), // 0: band.tunnel.v1beta1.TSSRoute + (*TSSPacketContent)(nil), // 1: band.tunnel.v1beta1.TSSPacketContent +} +var file_band_tunnel_v1beta1_route_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_band_tunnel_v1beta1_route_proto_init() } +func file_band_tunnel_v1beta1_route_proto_init() { + if File_band_tunnel_v1beta1_route_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_band_tunnel_v1beta1_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TSSRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_band_tunnel_v1beta1_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TSSPacketContent); 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_band_tunnel_v1beta1_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_band_tunnel_v1beta1_route_proto_goTypes, + DependencyIndexes: file_band_tunnel_v1beta1_route_proto_depIdxs, + MessageInfos: file_band_tunnel_v1beta1_route_proto_msgTypes, + }.Build() + File_band_tunnel_v1beta1_route_proto = out.File + file_band_tunnel_v1beta1_route_proto_rawDesc = nil + file_band_tunnel_v1beta1_route_proto_goTypes = nil + file_band_tunnel_v1beta1_route_proto_depIdxs = nil +} diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index e23399f9e..f1a86c4ae 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -18,28 +18,148 @@ import ( sync "sync" ) +var _ protoreflect.List = (*_Tunnel_6_list)(nil) + +type _Tunnel_6_list struct { + list *[]*SignalDeviation +} + +func (x *_Tunnel_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Tunnel_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Tunnel_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + (*x.list)[i] = concreteValue +} + +func (x *_Tunnel_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*SignalDeviation) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Tunnel_6_list) AppendMutable() protoreflect.Value { + v := new(SignalDeviation) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Tunnel_6_list) NewElement() protoreflect.Value { + v := new(SignalDeviation) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Tunnel_8_list)(nil) + +type _Tunnel_8_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Tunnel_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Tunnel_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Tunnel_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Tunnel_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Tunnel_8_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Tunnel_8_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Tunnel_8_list) IsValid() bool { + return x.list != nil +} + var ( - md_TSSRoute protoreflect.MessageDescriptor - fd_TSSRoute_destination_chain_id protoreflect.FieldDescriptor - fd_TSSRoute_destination_contract_address protoreflect.FieldDescriptor + md_Tunnel protoreflect.MessageDescriptor + fd_Tunnel_id protoreflect.FieldDescriptor + fd_Tunnel_sequence protoreflect.FieldDescriptor + fd_Tunnel_route protoreflect.FieldDescriptor + fd_Tunnel_encoder protoreflect.FieldDescriptor + fd_Tunnel_fee_payer protoreflect.FieldDescriptor + fd_Tunnel_signal_deviations protoreflect.FieldDescriptor + fd_Tunnel_interval protoreflect.FieldDescriptor + fd_Tunnel_total_deposit protoreflect.FieldDescriptor + fd_Tunnel_is_active protoreflect.FieldDescriptor + fd_Tunnel_created_at protoreflect.FieldDescriptor + fd_Tunnel_creator protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tunnel_proto_init() - md_TSSRoute = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSRoute") - fd_TSSRoute_destination_chain_id = md_TSSRoute.Fields().ByName("destination_chain_id") - fd_TSSRoute_destination_contract_address = md_TSSRoute.Fields().ByName("destination_contract_address") + md_Tunnel = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Tunnel") + fd_Tunnel_id = md_Tunnel.Fields().ByName("id") + fd_Tunnel_sequence = md_Tunnel.Fields().ByName("sequence") + fd_Tunnel_route = md_Tunnel.Fields().ByName("route") + fd_Tunnel_encoder = md_Tunnel.Fields().ByName("encoder") + fd_Tunnel_fee_payer = md_Tunnel.Fields().ByName("fee_payer") + fd_Tunnel_signal_deviations = md_Tunnel.Fields().ByName("signal_deviations") + fd_Tunnel_interval = md_Tunnel.Fields().ByName("interval") + fd_Tunnel_total_deposit = md_Tunnel.Fields().ByName("total_deposit") + fd_Tunnel_is_active = md_Tunnel.Fields().ByName("is_active") + fd_Tunnel_created_at = md_Tunnel.Fields().ByName("created_at") + fd_Tunnel_creator = md_Tunnel.Fields().ByName("creator") } -var _ protoreflect.Message = (*fastReflection_TSSRoute)(nil) +var _ protoreflect.Message = (*fastReflection_Tunnel)(nil) -type fastReflection_TSSRoute TSSRoute +type fastReflection_Tunnel Tunnel -func (x *TSSRoute) ProtoReflect() protoreflect.Message { - return (*fastReflection_TSSRoute)(x) +func (x *Tunnel) ProtoReflect() protoreflect.Message { + return (*fastReflection_Tunnel)(x) } -func (x *TSSRoute) slowProtoReflect() protoreflect.Message { +func (x *Tunnel) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -51,43 +171,43 @@ func (x *TSSRoute) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_TSSRoute_messageType fastReflection_TSSRoute_messageType -var _ protoreflect.MessageType = fastReflection_TSSRoute_messageType{} +var _fastReflection_Tunnel_messageType fastReflection_Tunnel_messageType +var _ protoreflect.MessageType = fastReflection_Tunnel_messageType{} -type fastReflection_TSSRoute_messageType struct{} +type fastReflection_Tunnel_messageType struct{} -func (x fastReflection_TSSRoute_messageType) Zero() protoreflect.Message { - return (*fastReflection_TSSRoute)(nil) +func (x fastReflection_Tunnel_messageType) Zero() protoreflect.Message { + return (*fastReflection_Tunnel)(nil) } -func (x fastReflection_TSSRoute_messageType) New() protoreflect.Message { - return new(fastReflection_TSSRoute) +func (x fastReflection_Tunnel_messageType) New() protoreflect.Message { + return new(fastReflection_Tunnel) } -func (x fastReflection_TSSRoute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TSSRoute +func (x fastReflection_Tunnel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Tunnel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_TSSRoute) Descriptor() protoreflect.MessageDescriptor { - return md_TSSRoute +func (x *fastReflection_Tunnel) Descriptor() protoreflect.MessageDescriptor { + return md_Tunnel } // 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_TSSRoute) Type() protoreflect.MessageType { - return _fastReflection_TSSRoute_messageType +func (x *fastReflection_Tunnel) Type() protoreflect.MessageType { + return _fastReflection_Tunnel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_TSSRoute) New() protoreflect.Message { - return new(fastReflection_TSSRoute) +func (x *fastReflection_Tunnel) New() protoreflect.Message { + return new(fastReflection_Tunnel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_TSSRoute) Interface() protoreflect.ProtoMessage { - return (*TSSRoute)(x) +func (x *fastReflection_Tunnel) Interface() protoreflect.ProtoMessage { + return (*Tunnel)(x) } // Range iterates over every populated field in an undefined order, @@ -95,16 +215,70 @@ func (x *fastReflection_TSSRoute) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_TSSRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DestinationChainId != "" { - value := protoreflect.ValueOfString(x.DestinationChainId) - if !f(fd_TSSRoute_destination_chain_id, value) { +func (x *fastReflection_Tunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_Tunnel_id, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_Tunnel_sequence, value) { + return + } + } + if x.Route != nil { + value := protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + if !f(fd_Tunnel_route, value) { + return + } + } + if x.Encoder != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoder)) + if !f(fd_Tunnel_encoder, value) { + return + } + } + if x.FeePayer != "" { + value := protoreflect.ValueOfString(x.FeePayer) + if !f(fd_Tunnel_fee_payer, value) { + return + } + } + if len(x.SignalDeviations) != 0 { + value := protoreflect.ValueOfList(&_Tunnel_6_list{list: &x.SignalDeviations}) + if !f(fd_Tunnel_signal_deviations, value) { + return + } + } + if x.Interval != uint64(0) { + value := protoreflect.ValueOfUint64(x.Interval) + if !f(fd_Tunnel_interval, value) { + return + } + } + if len(x.TotalDeposit) != 0 { + value := protoreflect.ValueOfList(&_Tunnel_8_list{list: &x.TotalDeposit}) + if !f(fd_Tunnel_total_deposit, value) { + return + } + } + if x.IsActive != false { + value := protoreflect.ValueOfBool(x.IsActive) + if !f(fd_Tunnel_is_active, value) { return } } - if x.DestinationContractAddress != "" { - value := protoreflect.ValueOfString(x.DestinationContractAddress) - if !f(fd_TSSRoute_destination_contract_address, value) { + if x.CreatedAt != int64(0) { + value := protoreflect.ValueOfInt64(x.CreatedAt) + if !f(fd_Tunnel_created_at, value) { + return + } + } + if x.Creator != "" { + value := protoreflect.ValueOfString(x.Creator) + if !f(fd_Tunnel_creator, value) { return } } @@ -121,17 +295,35 @@ func (x *fastReflection_TSSRoute) Range(f func(protoreflect.FieldDescriptor, pro // 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_TSSRoute) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Tunnel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": - return x.DestinationChainId != "" - case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": - return x.DestinationContractAddress != "" + case "band.tunnel.v1beta1.Tunnel.id": + return x.Id != uint64(0) + case "band.tunnel.v1beta1.Tunnel.sequence": + return x.Sequence != uint64(0) + case "band.tunnel.v1beta1.Tunnel.route": + return x.Route != nil + case "band.tunnel.v1beta1.Tunnel.encoder": + return x.Encoder != 0 + case "band.tunnel.v1beta1.Tunnel.fee_payer": + return x.FeePayer != "" + case "band.tunnel.v1beta1.Tunnel.signal_deviations": + return len(x.SignalDeviations) != 0 + case "band.tunnel.v1beta1.Tunnel.interval": + return x.Interval != uint64(0) + case "band.tunnel.v1beta1.Tunnel.total_deposit": + return len(x.TotalDeposit) != 0 + case "band.tunnel.v1beta1.Tunnel.is_active": + return x.IsActive != false + case "band.tunnel.v1beta1.Tunnel.created_at": + return x.CreatedAt != int64(0) + case "band.tunnel.v1beta1.Tunnel.creator": + return x.Creator != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) } } @@ -141,42 +333,93 @@ func (x *fastReflection_TSSRoute) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSRoute) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Tunnel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": - x.DestinationChainId = "" - case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": - x.DestinationContractAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute 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_TSSRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": - value := x.DestinationChainId - return protoreflect.ValueOfString(value) - case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": - value := x.DestinationContractAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", descriptor.FullName())) - } -} - + case "band.tunnel.v1beta1.Tunnel.id": + x.Id = uint64(0) + case "band.tunnel.v1beta1.Tunnel.sequence": + x.Sequence = uint64(0) + case "band.tunnel.v1beta1.Tunnel.route": + x.Route = nil + case "band.tunnel.v1beta1.Tunnel.encoder": + x.Encoder = 0 + case "band.tunnel.v1beta1.Tunnel.fee_payer": + x.FeePayer = "" + case "band.tunnel.v1beta1.Tunnel.signal_deviations": + x.SignalDeviations = nil + case "band.tunnel.v1beta1.Tunnel.interval": + x.Interval = uint64(0) + case "band.tunnel.v1beta1.Tunnel.total_deposit": + x.TotalDeposit = nil + case "band.tunnel.v1beta1.Tunnel.is_active": + x.IsActive = false + case "band.tunnel.v1beta1.Tunnel.created_at": + x.CreatedAt = int64(0) + case "band.tunnel.v1beta1.Tunnel.creator": + x.Creator = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_Tunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "band.tunnel.v1beta1.Tunnel.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.Tunnel.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.Tunnel.route": + value := x.Route + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "band.tunnel.v1beta1.Tunnel.encoder": + value := x.Encoder + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "band.tunnel.v1beta1.Tunnel.fee_payer": + value := x.FeePayer + return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.Tunnel.signal_deviations": + if len(x.SignalDeviations) == 0 { + return protoreflect.ValueOfList(&_Tunnel_6_list{}) + } + listValue := &_Tunnel_6_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(listValue) + case "band.tunnel.v1beta1.Tunnel.interval": + value := x.Interval + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.Tunnel.total_deposit": + if len(x.TotalDeposit) == 0 { + return protoreflect.ValueOfList(&_Tunnel_8_list{}) + } + listValue := &_Tunnel_8_list{list: &x.TotalDeposit} + return protoreflect.ValueOfList(listValue) + case "band.tunnel.v1beta1.Tunnel.is_active": + value := x.IsActive + return protoreflect.ValueOfBool(value) + case "band.tunnel.v1beta1.Tunnel.created_at": + value := x.CreatedAt + return protoreflect.ValueOfInt64(value) + case "band.tunnel.v1beta1.Tunnel.creator": + value := x.Creator + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) + } + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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 @@ -187,17 +430,39 @@ func (x *fastReflection_TSSRoute) Get(descriptor protoreflect.FieldDescriptor) p // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Tunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": - x.DestinationChainId = value.Interface().(string) - case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": - x.DestinationContractAddress = value.Interface().(string) + case "band.tunnel.v1beta1.Tunnel.id": + x.Id = value.Uint() + case "band.tunnel.v1beta1.Tunnel.sequence": + x.Sequence = value.Uint() + case "band.tunnel.v1beta1.Tunnel.route": + x.Route = value.Message().Interface().(*anypb.Any) + case "band.tunnel.v1beta1.Tunnel.encoder": + x.Encoder = (v1beta11.Encoder)(value.Enum()) + case "band.tunnel.v1beta1.Tunnel.fee_payer": + x.FeePayer = value.Interface().(string) + case "band.tunnel.v1beta1.Tunnel.signal_deviations": + lv := value.List() + clv := lv.(*_Tunnel_6_list) + x.SignalDeviations = *clv.list + case "band.tunnel.v1beta1.Tunnel.interval": + x.Interval = value.Uint() + case "band.tunnel.v1beta1.Tunnel.total_deposit": + lv := value.List() + clv := lv.(*_Tunnel_8_list) + x.TotalDeposit = *clv.list + case "band.tunnel.v1beta1.Tunnel.is_active": + x.IsActive = value.Bool() + case "band.tunnel.v1beta1.Tunnel.created_at": + x.CreatedAt = value.Int() + case "band.tunnel.v1beta1.Tunnel.creator": + x.Creator = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel does not contain field %s", fd.FullName())) } } @@ -211,44 +476,94 @@ func (x *fastReflection_TSSRoute) Set(fd protoreflect.FieldDescriptor, value pro // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Tunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": - panic(fmt.Errorf("field destination_chain_id of message band.tunnel.v1beta1.TSSRoute is not mutable")) - case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": - panic(fmt.Errorf("field destination_contract_address of message band.tunnel.v1beta1.TSSRoute is not mutable")) + case "band.tunnel.v1beta1.Tunnel.route": + if x.Route == nil { + x.Route = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Route.ProtoReflect()) + case "band.tunnel.v1beta1.Tunnel.signal_deviations": + if x.SignalDeviations == nil { + x.SignalDeviations = []*SignalDeviation{} + } + value := &_Tunnel_6_list{list: &x.SignalDeviations} + return protoreflect.ValueOfList(value) + case "band.tunnel.v1beta1.Tunnel.total_deposit": + if x.TotalDeposit == nil { + x.TotalDeposit = []*v1beta1.Coin{} + } + value := &_Tunnel_8_list{list: &x.TotalDeposit} + return protoreflect.ValueOfList(value) + case "band.tunnel.v1beta1.Tunnel.id": + panic(fmt.Errorf("field id of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.sequence": + panic(fmt.Errorf("field sequence of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.encoder": + panic(fmt.Errorf("field encoder of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.fee_payer": + panic(fmt.Errorf("field fee_payer of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.interval": + panic(fmt.Errorf("field interval of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.is_active": + panic(fmt.Errorf("field is_active of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.created_at": + panic(fmt.Errorf("field created_at of message band.tunnel.v1beta1.Tunnel is not mutable")) + case "band.tunnel.v1beta1.Tunnel.creator": + panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.Tunnel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_TSSRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Tunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRoute.destination_chain_id": + case "band.tunnel.v1beta1.Tunnel.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.Tunnel.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.Tunnel.route": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "band.tunnel.v1beta1.Tunnel.encoder": + return protoreflect.ValueOfEnum(0) + case "band.tunnel.v1beta1.Tunnel.fee_payer": return protoreflect.ValueOfString("") - case "band.tunnel.v1beta1.TSSRoute.destination_contract_address": + case "band.tunnel.v1beta1.Tunnel.signal_deviations": + list := []*SignalDeviation{} + return protoreflect.ValueOfList(&_Tunnel_6_list{list: &list}) + case "band.tunnel.v1beta1.Tunnel.interval": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.Tunnel.total_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Tunnel_8_list{list: &list}) + case "band.tunnel.v1beta1.Tunnel.is_active": + return protoreflect.ValueOfBool(false) + case "band.tunnel.v1beta1.Tunnel.created_at": + return protoreflect.ValueOfInt64(int64(0)) + case "band.tunnel.v1beta1.Tunnel.creator": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRoute")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRoute does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_TSSRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Tunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSRoute", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Tunnel", d.FullName())) } panic("unreachable") } @@ -256,7 +571,7 @@ func (x *fastReflection_TSSRoute) WhichOneof(d protoreflect.OneofDescriptor) pro // 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_TSSRoute) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Tunnel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -267,7 +582,7 @@ func (x *fastReflection_TSSRoute) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSRoute) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Tunnel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -279,7 +594,7 @@ func (x *fastReflection_TSSRoute) SetUnknown(fields protoreflect.RawFields) { // 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_TSSRoute) IsValid() bool { +func (x *fastReflection_Tunnel) IsValid() bool { return x != nil } @@ -289,9 +604,9 @@ func (x *fastReflection_TSSRoute) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Tunnel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TSSRoute) + x := input.Message.Interface().(*Tunnel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -303,11 +618,45 @@ func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.DestinationChainId) + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.Route != nil { + l = options.Size(x.Route) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Encoder != 0 { + n += 1 + runtime.Sov(uint64(x.Encoder)) + } + l = len(x.FeePayer) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.DestinationContractAddress) + if len(x.SignalDeviations) > 0 { + for _, e := range x.SignalDeviations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Interval != 0 { + n += 1 + runtime.Sov(uint64(x.Interval)) + } + if len(x.TotalDeposit) > 0 { + for _, e := range x.TotalDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.IsActive { + n += 2 + } + if x.CreatedAt != 0 { + n += 1 + runtime.Sov(uint64(x.CreatedAt)) + } + l = len(x.Creator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -321,7 +670,7 @@ func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TSSRoute) + x := input.Message.Interface().(*Tunnel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -340,39 +689,120 @@ func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.DestinationContractAddress) > 0 { - i -= len(x.DestinationContractAddress) - copy(dAtA[i:], x.DestinationContractAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + if len(x.Creator) > 0 { + i -= len(x.Creator) + copy(dAtA[i:], x.Creator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x5a } - if len(x.DestinationChainId) > 0 { - i -= len(x.DestinationChainId) - copy(dAtA[i:], x.DestinationChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + if x.CreatedAt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA + dAtA[i] = 0x50 } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TSSRoute) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil + if x.IsActive { + i-- + if x.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 } - options := runtime.UnmarshalInputToOptions(input) + if len(x.TotalDeposit) > 0 { + for iNdEx := len(x.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TotalDeposit[iNdEx]) + 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] = 0x42 + } + } + if x.Interval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Interval)) + i-- + dAtA[i] = 0x38 + } + if len(x.SignalDeviations) > 0 { + for iNdEx := len(x.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SignalDeviations[iNdEx]) + 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] = 0x32 + } + } + if len(x.FeePayer) > 0 { + i -= len(x.FeePayer) + copy(dAtA[i:], x.FeePayer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeePayer))) + i-- + dAtA[i] = 0x2a + } + if x.Encoder != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoder)) + i-- + dAtA[i] = 0x20 + } + if x.Route != nil { + encoded, err := options.Marshal(x.Route) + 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.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x10 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + 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().(*Tunnel) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) @@ -397,17 +827,55 @@ func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRoute: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Tunnel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRoute: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Tunnel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 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.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -417,27 +885,50 @@ func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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 } - x.DestinationChainId = string(dAtA[iNdEx:postIndex]) + if x.Route == nil { + x.Route = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Route); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex - case 2: + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) + } + x.Encoder = 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.Encoder |= v1beta11.Encoder(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 DestinationContractAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -465,167 +956,376 @@ func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + x.FeePayer = 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 + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + 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 } - if (iNdEx + skippy) > l { + 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 !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + x.SignalDeviations = append(x.SignalDeviations, &SignalDeviation{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalDeviations[len(x.SignalDeviations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - 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_SignalDeviation protoreflect.MessageDescriptor - fd_SignalDeviation_signal_id protoreflect.FieldDescriptor - fd_SignalDeviation_soft_deviation_bps protoreflect.FieldDescriptor - fd_SignalDeviation_hard_deviation_bps protoreflect.FieldDescriptor -) - -func init() { - file_band_tunnel_v1beta1_tunnel_proto_init() - md_SignalDeviation = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalDeviation") - fd_SignalDeviation_signal_id = md_SignalDeviation.Fields().ByName("signal_id") - fd_SignalDeviation_soft_deviation_bps = md_SignalDeviation.Fields().ByName("soft_deviation_bps") - fd_SignalDeviation_hard_deviation_bps = md_SignalDeviation.Fields().ByName("hard_deviation_bps") -} - -var _ protoreflect.Message = (*fastReflection_SignalDeviation)(nil) - -type fastReflection_SignalDeviation SignalDeviation - -func (x *SignalDeviation) ProtoReflect() protoreflect.Message { - return (*fastReflection_SignalDeviation)(x) -} - -func (x *SignalDeviation) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + x.Interval = 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.Interval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", 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 + } + x.TotalDeposit = append(x.TotalDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalDeposit[len(x.TotalDeposit)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.IsActive = bool(v != 0) + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + x.CreatedAt = 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.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = 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 + } } - return ms + + 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, } - return mi.MessageOf(x) } -var _fastReflection_SignalDeviation_messageType fastReflection_SignalDeviation_messageType -var _ protoreflect.MessageType = fastReflection_SignalDeviation_messageType{} +var _ protoreflect.List = (*_LatestPrices_2_list)(nil) -type fastReflection_SignalDeviation_messageType struct{} +type _LatestPrices_2_list struct { + list *[]*v1beta11.Price +} -func (x fastReflection_SignalDeviation_messageType) Zero() protoreflect.Message { - return (*fastReflection_SignalDeviation)(nil) +func (x *_LatestPrices_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) } -func (x fastReflection_SignalDeviation_messageType) New() protoreflect.Message { - return new(fastReflection_SignalDeviation) + +func (x *_LatestPrices_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x fastReflection_SignalDeviation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SignalDeviation + +func (x *_LatestPrices_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) + (*x.list)[i] = concreteValue } -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SignalDeviation) Descriptor() protoreflect.MessageDescriptor { - return md_SignalDeviation +func (x *_LatestPrices_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) + *x.list = append(*x.list, concreteValue) } -// 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_SignalDeviation) Type() protoreflect.MessageType { - return _fastReflection_SignalDeviation_messageType +func (x *_LatestPrices_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta11.Price) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SignalDeviation) New() protoreflect.Message { - return new(fastReflection_SignalDeviation) +func (x *_LatestPrices_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] } -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SignalDeviation) Interface() protoreflect.ProtoMessage { - return (*SignalDeviation)(x) +func (x *_LatestPrices_2_list) NewElement() protoreflect.Value { + v := new(v1beta11.Price) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } -// 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_SignalDeviation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SignalId != "" { - value := protoreflect.ValueOfString(x.SignalId) - if !f(fd_SignalDeviation_signal_id, value) { - return - } - } - if x.SoftDeviationBps != uint64(0) { - value := protoreflect.ValueOfUint64(x.SoftDeviationBps) - if !f(fd_SignalDeviation_soft_deviation_bps, value) { - return - } - } - if x.HardDeviationBps != uint64(0) { - value := protoreflect.ValueOfUint64(x.HardDeviationBps) - if !f(fd_SignalDeviation_hard_deviation_bps, value) { - return - } - } +func (x *_LatestPrices_2_list) IsValid() bool { + return x.list != nil } -// 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_SignalDeviation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "band.tunnel.v1beta1.SignalDeviation.signal_id": - return x.SignalId != "" - case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": - return x.SoftDeviationBps != uint64(0) - case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": - return x.HardDeviationBps != uint64(0) +var ( + md_LatestPrices protoreflect.MessageDescriptor + fd_LatestPrices_tunnel_id protoreflect.FieldDescriptor + fd_LatestPrices_prices protoreflect.FieldDescriptor + fd_LatestPrices_last_interval protoreflect.FieldDescriptor +) + +func init() { + file_band_tunnel_v1beta1_tunnel_proto_init() + md_LatestPrices = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestPrices") + fd_LatestPrices_tunnel_id = md_LatestPrices.Fields().ByName("tunnel_id") + fd_LatestPrices_prices = md_LatestPrices.Fields().ByName("prices") + fd_LatestPrices_last_interval = md_LatestPrices.Fields().ByName("last_interval") +} + +var _ protoreflect.Message = (*fastReflection_LatestPrices)(nil) + +type fastReflection_LatestPrices LatestPrices + +func (x *LatestPrices) ProtoReflect() protoreflect.Message { + return (*fastReflection_LatestPrices)(x) +} + +func (x *LatestPrices) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_tunnel_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_LatestPrices_messageType fastReflection_LatestPrices_messageType +var _ protoreflect.MessageType = fastReflection_LatestPrices_messageType{} + +type fastReflection_LatestPrices_messageType struct{} + +func (x fastReflection_LatestPrices_messageType) Zero() protoreflect.Message { + return (*fastReflection_LatestPrices)(nil) +} +func (x fastReflection_LatestPrices_messageType) New() protoreflect.Message { + return new(fastReflection_LatestPrices) +} +func (x fastReflection_LatestPrices_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LatestPrices +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_LatestPrices) Descriptor() protoreflect.MessageDescriptor { + return md_LatestPrices +} + +// 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_LatestPrices) Type() protoreflect.MessageType { + return _fastReflection_LatestPrices_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_LatestPrices) New() protoreflect.Message { + return new(fastReflection_LatestPrices) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_LatestPrices) Interface() protoreflect.ProtoMessage { + return (*LatestPrices)(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_LatestPrices) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_LatestPrices_tunnel_id, value) { + return + } + } + if len(x.Prices) != 0 { + value := protoreflect.ValueOfList(&_LatestPrices_2_list{list: &x.Prices}) + if !f(fd_LatestPrices_prices, value) { + return + } + } + if x.LastInterval != int64(0) { + value := protoreflect.ValueOfInt64(x.LastInterval) + if !f(fd_LatestPrices_last_interval, 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_LatestPrices) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": + return x.TunnelId != uint64(0) + case "band.tunnel.v1beta1.LatestPrices.prices": + return len(x.Prices) != 0 + case "band.tunnel.v1beta1.LatestPrices.last_interval": + return x.LastInterval != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) } } @@ -635,19 +1335,19 @@ func (x *fastReflection_SignalDeviation) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SignalDeviation) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_LatestPrices) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.SignalDeviation.signal_id": - x.SignalId = "" - case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": - x.SoftDeviationBps = uint64(0) - case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": - x.HardDeviationBps = uint64(0) + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": + x.TunnelId = uint64(0) + case "band.tunnel.v1beta1.LatestPrices.prices": + x.Prices = nil + case "band.tunnel.v1beta1.LatestPrices.last_interval": + x.LastInterval = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) } } @@ -657,22 +1357,25 @@ func (x *fastReflection_SignalDeviation) Clear(fd protoreflect.FieldDescriptor) // 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_SignalDeviation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LatestPrices) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.SignalDeviation.signal_id": - value := x.SignalId - return protoreflect.ValueOfString(value) - case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": - value := x.SoftDeviationBps - return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": - value := x.HardDeviationBps + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": + value := x.TunnelId return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.LatestPrices.prices": + if len(x.Prices) == 0 { + return protoreflect.ValueOfList(&_LatestPrices_2_list{}) + } + listValue := &_LatestPrices_2_list{list: &x.Prices} + return protoreflect.ValueOfList(listValue) + case "band.tunnel.v1beta1.LatestPrices.last_interval": + value := x.LastInterval + return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", descriptor.FullName())) } } @@ -686,19 +1389,21 @@ func (x *fastReflection_SignalDeviation) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SignalDeviation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_LatestPrices) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.SignalDeviation.signal_id": - x.SignalId = value.Interface().(string) - case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": - x.SoftDeviationBps = value.Uint() - case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": - x.HardDeviationBps = value.Uint() + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": + x.TunnelId = value.Uint() + case "band.tunnel.v1beta1.LatestPrices.prices": + lv := value.List() + clv := lv.(*_LatestPrices_2_list) + x.Prices = *clv.list + case "band.tunnel.v1beta1.LatestPrices.last_interval": + x.LastInterval = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) } } @@ -712,48 +1417,53 @@ func (x *fastReflection_SignalDeviation) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SignalDeviation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LatestPrices) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.SignalDeviation.signal_id": - panic(fmt.Errorf("field signal_id of message band.tunnel.v1beta1.SignalDeviation is not mutable")) - case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": - panic(fmt.Errorf("field soft_deviation_bps of message band.tunnel.v1beta1.SignalDeviation is not mutable")) - case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": - panic(fmt.Errorf("field hard_deviation_bps of message band.tunnel.v1beta1.SignalDeviation is not mutable")) + case "band.tunnel.v1beta1.LatestPrices.prices": + if x.Prices == nil { + x.Prices = []*v1beta11.Price{} + } + value := &_LatestPrices_2_list{list: &x.Prices} + return protoreflect.ValueOfList(value) + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.LatestPrices is not mutable")) + case "band.tunnel.v1beta1.LatestPrices.last_interval": + panic(fmt.Errorf("field last_interval of message band.tunnel.v1beta1.LatestPrices is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices 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_SignalDeviation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LatestPrices) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.SignalDeviation.signal_id": - return protoreflect.ValueOfString("") - case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": - return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + case "band.tunnel.v1beta1.LatestPrices.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.LatestPrices.prices": + list := []*v1beta11.Price{} + return protoreflect.ValueOfList(&_LatestPrices_2_list{list: &list}) + case "band.tunnel.v1beta1.LatestPrices.last_interval": + return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices 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_SignalDeviation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_LatestPrices) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.SignalDeviation", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.LatestPrices", d.FullName())) } panic("unreachable") } @@ -761,7 +1471,7 @@ func (x *fastReflection_SignalDeviation) WhichOneof(d protoreflect.OneofDescript // 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_SignalDeviation) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_LatestPrices) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -772,7 +1482,7 @@ func (x *fastReflection_SignalDeviation) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SignalDeviation) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_LatestPrices) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -784,7 +1494,7 @@ func (x *fastReflection_SignalDeviation) SetUnknown(fields protoreflect.RawField // 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_SignalDeviation) IsValid() bool { +func (x *fastReflection_LatestPrices) IsValid() bool { return x != nil } @@ -794,9 +1504,9 @@ func (x *fastReflection_SignalDeviation) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_SignalDeviation) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SignalDeviation) + x := input.Message.Interface().(*LatestPrices) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -804,1805 +1514,131 @@ func (x *fastReflection_SignalDeviation) ProtoMethods() *protoiface.Methods { } } options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.SignalId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.SoftDeviationBps != 0 { - n += 1 + runtime.Sov(uint64(x.SoftDeviationBps)) - } - if x.HardDeviationBps != 0 { - n += 1 + runtime.Sov(uint64(x.HardDeviationBps)) - } - 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().(*SignalDeviation) - 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 x.HardDeviationBps != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.HardDeviationBps)) - i-- - dAtA[i] = 0x18 - } - if x.SoftDeviationBps != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SoftDeviationBps)) - i-- - dAtA[i] = 0x10 - } - if len(x.SignalId) > 0 { - i -= len(x.SignalId) - copy(dAtA[i:], x.SignalId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignalId))) - 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().(*SignalDeviation) - 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: SignalDeviation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignalDeviation: 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 SignalId", 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.SignalId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBps", wireType) - } - x.SoftDeviationBps = 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.SoftDeviationBps |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBps", wireType) - } - x.HardDeviationBps = 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.HardDeviationBps |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 _ protoreflect.List = (*_Deposit_3_list)(nil) - -type _Deposit_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Deposit_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Deposit_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Deposit_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Deposit_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Deposit_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Deposit_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Deposit_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Deposit_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Deposit protoreflect.MessageDescriptor - fd_Deposit_tunnel_id protoreflect.FieldDescriptor - fd_Deposit_depositor protoreflect.FieldDescriptor - fd_Deposit_amount protoreflect.FieldDescriptor -) - -func init() { - file_band_tunnel_v1beta1_tunnel_proto_init() - md_Deposit = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Deposit") - fd_Deposit_tunnel_id = md_Deposit.Fields().ByName("tunnel_id") - fd_Deposit_depositor = md_Deposit.Fields().ByName("depositor") - fd_Deposit_amount = md_Deposit.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_Deposit)(nil) - -type fastReflection_Deposit Deposit - -func (x *Deposit) ProtoReflect() protoreflect.Message { - return (*fastReflection_Deposit)(x) -} - -func (x *Deposit) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_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_Deposit_messageType fastReflection_Deposit_messageType -var _ protoreflect.MessageType = fastReflection_Deposit_messageType{} - -type fastReflection_Deposit_messageType struct{} - -func (x fastReflection_Deposit_messageType) Zero() protoreflect.Message { - return (*fastReflection_Deposit)(nil) -} -func (x fastReflection_Deposit_messageType) New() protoreflect.Message { - return new(fastReflection_Deposit) -} -func (x fastReflection_Deposit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Deposit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Deposit) Descriptor() protoreflect.MessageDescriptor { - return md_Deposit -} - -// 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_Deposit) Type() protoreflect.MessageType { - return _fastReflection_Deposit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Deposit) New() protoreflect.Message { - return new(fastReflection_Deposit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Deposit) Interface() protoreflect.ProtoMessage { - return (*Deposit)(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_Deposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.TunnelId != uint64(0) { - value := protoreflect.ValueOfUint64(x.TunnelId) - if !f(fd_Deposit_tunnel_id, value) { - return - } - } - if x.Depositor != "" { - value := protoreflect.ValueOfString(x.Depositor) - if !f(fd_Deposit_depositor, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_Deposit_3_list{list: &x.Amount}) - if !f(fd_Deposit_amount, 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_Deposit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "band.tunnel.v1beta1.Deposit.tunnel_id": - return x.TunnelId != uint64(0) - case "band.tunnel.v1beta1.Deposit.depositor": - return x.Depositor != "" - case "band.tunnel.v1beta1.Deposit.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit 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_Deposit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "band.tunnel.v1beta1.Deposit.tunnel_id": - x.TunnelId = uint64(0) - case "band.tunnel.v1beta1.Deposit.depositor": - x.Depositor = "" - case "band.tunnel.v1beta1.Deposit.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit 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_Deposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "band.tunnel.v1beta1.Deposit.tunnel_id": - value := x.TunnelId - return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.Deposit.depositor": - value := x.Depositor - return protoreflect.ValueOfString(value) - case "band.tunnel.v1beta1.Deposit.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_Deposit_3_list{}) - } - listValue := &_Deposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit 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_Deposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "band.tunnel.v1beta1.Deposit.tunnel_id": - x.TunnelId = value.Uint() - case "band.tunnel.v1beta1.Deposit.depositor": - x.Depositor = value.Interface().(string) - case "band.tunnel.v1beta1.Deposit.amount": - lv := value.List() - clv := lv.(*_Deposit_3_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit 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_Deposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.tunnel.v1beta1.Deposit.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_Deposit_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.Deposit.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.Deposit is not mutable")) - case "band.tunnel.v1beta1.Deposit.depositor": - panic(fmt.Errorf("field depositor of message band.tunnel.v1beta1.Deposit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit 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_Deposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.tunnel.v1beta1.Deposit.tunnel_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.Deposit.depositor": - return protoreflect.ValueOfString("") - case "band.tunnel.v1beta1.Deposit.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Deposit_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit 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_Deposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Deposit", 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_Deposit) 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_Deposit) 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_Deposit) 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_Deposit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Deposit) - 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.TunnelId != 0 { - n += 1 + runtime.Sov(uint64(x.TunnelId)) - } - l = len(x.Depositor) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - 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().(*Deposit) - 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.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - 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 len(x.Depositor) > 0 { - i -= len(x.Depositor) - copy(dAtA[i:], x.Depositor) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) - i-- - dAtA[i] = 0x12 - } - if x.TunnelId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) - i-- - dAtA[i] = 0x8 - } - 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().(*Deposit) - 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: Deposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) - } - x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", 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.Depositor = 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 Amount", 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 - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - 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 _ protoreflect.List = (*_Tunnel_6_list)(nil) - -type _Tunnel_6_list struct { - list *[]*SignalDeviation -} - -func (x *_Tunnel_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Tunnel_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Tunnel_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignalDeviation) - (*x.list)[i] = concreteValue -} - -func (x *_Tunnel_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SignalDeviation) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Tunnel_6_list) AppendMutable() protoreflect.Value { - v := new(SignalDeviation) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Tunnel_6_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Tunnel_6_list) NewElement() protoreflect.Value { - v := new(SignalDeviation) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Tunnel_6_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Tunnel_8_list)(nil) - -type _Tunnel_8_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Tunnel_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Tunnel_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Tunnel_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Tunnel_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Tunnel_8_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Tunnel_8_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Tunnel_8_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Tunnel_8_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Tunnel protoreflect.MessageDescriptor - fd_Tunnel_id protoreflect.FieldDescriptor - fd_Tunnel_sequence protoreflect.FieldDescriptor - fd_Tunnel_route protoreflect.FieldDescriptor - fd_Tunnel_encoder protoreflect.FieldDescriptor - fd_Tunnel_fee_payer protoreflect.FieldDescriptor - fd_Tunnel_signal_deviations protoreflect.FieldDescriptor - fd_Tunnel_interval protoreflect.FieldDescriptor - fd_Tunnel_total_deposit protoreflect.FieldDescriptor - fd_Tunnel_is_active protoreflect.FieldDescriptor - fd_Tunnel_created_at protoreflect.FieldDescriptor - fd_Tunnel_creator protoreflect.FieldDescriptor -) - -func init() { - file_band_tunnel_v1beta1_tunnel_proto_init() - md_Tunnel = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Tunnel") - fd_Tunnel_id = md_Tunnel.Fields().ByName("id") - fd_Tunnel_sequence = md_Tunnel.Fields().ByName("sequence") - fd_Tunnel_route = md_Tunnel.Fields().ByName("route") - fd_Tunnel_encoder = md_Tunnel.Fields().ByName("encoder") - fd_Tunnel_fee_payer = md_Tunnel.Fields().ByName("fee_payer") - fd_Tunnel_signal_deviations = md_Tunnel.Fields().ByName("signal_deviations") - fd_Tunnel_interval = md_Tunnel.Fields().ByName("interval") - fd_Tunnel_total_deposit = md_Tunnel.Fields().ByName("total_deposit") - fd_Tunnel_is_active = md_Tunnel.Fields().ByName("is_active") - fd_Tunnel_created_at = md_Tunnel.Fields().ByName("created_at") - fd_Tunnel_creator = md_Tunnel.Fields().ByName("creator") -} - -var _ protoreflect.Message = (*fastReflection_Tunnel)(nil) - -type fastReflection_Tunnel Tunnel - -func (x *Tunnel) ProtoReflect() protoreflect.Message { - return (*fastReflection_Tunnel)(x) -} - -func (x *Tunnel) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_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_Tunnel_messageType fastReflection_Tunnel_messageType -var _ protoreflect.MessageType = fastReflection_Tunnel_messageType{} - -type fastReflection_Tunnel_messageType struct{} - -func (x fastReflection_Tunnel_messageType) Zero() protoreflect.Message { - return (*fastReflection_Tunnel)(nil) -} -func (x fastReflection_Tunnel_messageType) New() protoreflect.Message { - return new(fastReflection_Tunnel) -} -func (x fastReflection_Tunnel_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Tunnel -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Tunnel) Descriptor() protoreflect.MessageDescriptor { - return md_Tunnel -} - -// 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_Tunnel) Type() protoreflect.MessageType { - return _fastReflection_Tunnel_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Tunnel) New() protoreflect.Message { - return new(fastReflection_Tunnel) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Tunnel) Interface() protoreflect.ProtoMessage { - return (*Tunnel)(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_Tunnel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_Tunnel_id, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_Tunnel_sequence, value) { - return - } - } - if x.Route != nil { - value := protoreflect.ValueOfMessage(x.Route.ProtoReflect()) - if !f(fd_Tunnel_route, value) { - return - } - } - if x.Encoder != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoder)) - if !f(fd_Tunnel_encoder, value) { - return - } - } - if x.FeePayer != "" { - value := protoreflect.ValueOfString(x.FeePayer) - if !f(fd_Tunnel_fee_payer, value) { - return - } - } - if len(x.SignalDeviations) != 0 { - value := protoreflect.ValueOfList(&_Tunnel_6_list{list: &x.SignalDeviations}) - if !f(fd_Tunnel_signal_deviations, value) { - return - } - } - if x.Interval != uint64(0) { - value := protoreflect.ValueOfUint64(x.Interval) - if !f(fd_Tunnel_interval, value) { - return - } - } - if len(x.TotalDeposit) != 0 { - value := protoreflect.ValueOfList(&_Tunnel_8_list{list: &x.TotalDeposit}) - if !f(fd_Tunnel_total_deposit, value) { - return - } - } - if x.IsActive != false { - value := protoreflect.ValueOfBool(x.IsActive) - if !f(fd_Tunnel_is_active, value) { - return - } - } - if x.CreatedAt != int64(0) { - value := protoreflect.ValueOfInt64(x.CreatedAt) - if !f(fd_Tunnel_created_at, value) { - return - } - } - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_Tunnel_creator, 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_Tunnel) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "band.tunnel.v1beta1.Tunnel.id": - return x.Id != uint64(0) - case "band.tunnel.v1beta1.Tunnel.sequence": - return x.Sequence != uint64(0) - case "band.tunnel.v1beta1.Tunnel.route": - return x.Route != nil - case "band.tunnel.v1beta1.Tunnel.encoder": - return x.Encoder != 0 - case "band.tunnel.v1beta1.Tunnel.fee_payer": - return x.FeePayer != "" - case "band.tunnel.v1beta1.Tunnel.signal_deviations": - return len(x.SignalDeviations) != 0 - case "band.tunnel.v1beta1.Tunnel.interval": - return x.Interval != uint64(0) - case "band.tunnel.v1beta1.Tunnel.total_deposit": - return len(x.TotalDeposit) != 0 - case "band.tunnel.v1beta1.Tunnel.is_active": - return x.IsActive != false - case "band.tunnel.v1beta1.Tunnel.created_at": - return x.CreatedAt != int64(0) - case "band.tunnel.v1beta1.Tunnel.creator": - return x.Creator != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_Tunnel) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "band.tunnel.v1beta1.Tunnel.id": - x.Id = uint64(0) - case "band.tunnel.v1beta1.Tunnel.sequence": - x.Sequence = uint64(0) - case "band.tunnel.v1beta1.Tunnel.route": - x.Route = nil - case "band.tunnel.v1beta1.Tunnel.encoder": - x.Encoder = 0 - case "band.tunnel.v1beta1.Tunnel.fee_payer": - x.FeePayer = "" - case "band.tunnel.v1beta1.Tunnel.signal_deviations": - x.SignalDeviations = nil - case "band.tunnel.v1beta1.Tunnel.interval": - x.Interval = uint64(0) - case "band.tunnel.v1beta1.Tunnel.total_deposit": - x.TotalDeposit = nil - case "band.tunnel.v1beta1.Tunnel.is_active": - x.IsActive = false - case "band.tunnel.v1beta1.Tunnel.created_at": - x.CreatedAt = int64(0) - case "band.tunnel.v1beta1.Tunnel.creator": - x.Creator = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_Tunnel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "band.tunnel.v1beta1.Tunnel.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.Tunnel.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.Tunnel.route": - value := x.Route - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "band.tunnel.v1beta1.Tunnel.encoder": - value := x.Encoder - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "band.tunnel.v1beta1.Tunnel.fee_payer": - value := x.FeePayer - return protoreflect.ValueOfString(value) - case "band.tunnel.v1beta1.Tunnel.signal_deviations": - if len(x.SignalDeviations) == 0 { - return protoreflect.ValueOfList(&_Tunnel_6_list{}) - } - listValue := &_Tunnel_6_list{list: &x.SignalDeviations} - return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.Tunnel.interval": - value := x.Interval - return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.Tunnel.total_deposit": - if len(x.TotalDeposit) == 0 { - return protoreflect.ValueOfList(&_Tunnel_8_list{}) - } - listValue := &_Tunnel_8_list{list: &x.TotalDeposit} - return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.Tunnel.is_active": - value := x.IsActive - return protoreflect.ValueOfBool(value) - case "band.tunnel.v1beta1.Tunnel.created_at": - value := x.CreatedAt - return protoreflect.ValueOfInt64(value) - case "band.tunnel.v1beta1.Tunnel.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_Tunnel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "band.tunnel.v1beta1.Tunnel.id": - x.Id = value.Uint() - case "band.tunnel.v1beta1.Tunnel.sequence": - x.Sequence = value.Uint() - case "band.tunnel.v1beta1.Tunnel.route": - x.Route = value.Message().Interface().(*anypb.Any) - case "band.tunnel.v1beta1.Tunnel.encoder": - x.Encoder = (v1beta11.Encoder)(value.Enum()) - case "band.tunnel.v1beta1.Tunnel.fee_payer": - x.FeePayer = value.Interface().(string) - case "band.tunnel.v1beta1.Tunnel.signal_deviations": - lv := value.List() - clv := lv.(*_Tunnel_6_list) - x.SignalDeviations = *clv.list - case "band.tunnel.v1beta1.Tunnel.interval": - x.Interval = value.Uint() - case "band.tunnel.v1beta1.Tunnel.total_deposit": - lv := value.List() - clv := lv.(*_Tunnel_8_list) - x.TotalDeposit = *clv.list - case "band.tunnel.v1beta1.Tunnel.is_active": - x.IsActive = value.Bool() - case "band.tunnel.v1beta1.Tunnel.created_at": - x.CreatedAt = value.Int() - case "band.tunnel.v1beta1.Tunnel.creator": - x.Creator = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_Tunnel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.tunnel.v1beta1.Tunnel.route": - if x.Route == nil { - x.Route = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.Route.ProtoReflect()) - case "band.tunnel.v1beta1.Tunnel.signal_deviations": - if x.SignalDeviations == nil { - x.SignalDeviations = []*SignalDeviation{} - } - value := &_Tunnel_6_list{list: &x.SignalDeviations} - return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.Tunnel.total_deposit": - if x.TotalDeposit == nil { - x.TotalDeposit = []*v1beta1.Coin{} - } - value := &_Tunnel_8_list{list: &x.TotalDeposit} - return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.Tunnel.id": - panic(fmt.Errorf("field id of message band.tunnel.v1beta1.Tunnel is not mutable")) - case "band.tunnel.v1beta1.Tunnel.sequence": - panic(fmt.Errorf("field sequence of message band.tunnel.v1beta1.Tunnel is not mutable")) - case "band.tunnel.v1beta1.Tunnel.encoder": - panic(fmt.Errorf("field encoder of message band.tunnel.v1beta1.Tunnel is not mutable")) - case "band.tunnel.v1beta1.Tunnel.fee_payer": - panic(fmt.Errorf("field fee_payer of message band.tunnel.v1beta1.Tunnel is not mutable")) - case "band.tunnel.v1beta1.Tunnel.interval": - panic(fmt.Errorf("field interval of message band.tunnel.v1beta1.Tunnel is not mutable")) - case "band.tunnel.v1beta1.Tunnel.is_active": - panic(fmt.Errorf("field is_active of message band.tunnel.v1beta1.Tunnel is not mutable")) - case "band.tunnel.v1beta1.Tunnel.created_at": - panic(fmt.Errorf("field created_at of message band.tunnel.v1beta1.Tunnel is not mutable")) - case "band.tunnel.v1beta1.Tunnel.creator": - panic(fmt.Errorf("field creator of message band.tunnel.v1beta1.Tunnel is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_Tunnel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "band.tunnel.v1beta1.Tunnel.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.Tunnel.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.Tunnel.route": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "band.tunnel.v1beta1.Tunnel.encoder": - return protoreflect.ValueOfEnum(0) - case "band.tunnel.v1beta1.Tunnel.fee_payer": - return protoreflect.ValueOfString("") - case "band.tunnel.v1beta1.Tunnel.signal_deviations": - list := []*SignalDeviation{} - return protoreflect.ValueOfList(&_Tunnel_6_list{list: &list}) - case "band.tunnel.v1beta1.Tunnel.interval": - return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.Tunnel.total_deposit": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Tunnel_8_list{list: &list}) - case "band.tunnel.v1beta1.Tunnel.is_active": - return protoreflect.ValueOfBool(false) - case "band.tunnel.v1beta1.Tunnel.created_at": - return protoreflect.ValueOfInt64(int64(0)) - case "band.tunnel.v1beta1.Tunnel.creator": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Tunnel")) - } - panic(fmt.Errorf("message band.tunnel.v1beta1.Tunnel 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_Tunnel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Tunnel", 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_Tunnel) 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_Tunnel) 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_Tunnel) 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_Tunnel) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Tunnel) - 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.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - if x.Route != nil { - l = options.Size(x.Route) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Encoder != 0 { - n += 1 + runtime.Sov(uint64(x.Encoder)) - } - l = len(x.FeePayer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.SignalDeviations) > 0 { - for _, e := range x.SignalDeviations { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Interval != 0 { - n += 1 + runtime.Sov(uint64(x.Interval)) - } - if len(x.TotalDeposit) > 0 { - for _, e := range x.TotalDeposit { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.IsActive { - n += 2 - } - if x.CreatedAt != 0 { - n += 1 + runtime.Sov(uint64(x.CreatedAt)) - } - l = len(x.Creator) - 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().(*Tunnel) - 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.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0x5a - } - if x.CreatedAt != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) - i-- - dAtA[i] = 0x50 - } - if x.IsActive { - i-- - if x.IsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if len(x.TotalDeposit) > 0 { - for iNdEx := len(x.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.TotalDeposit[iNdEx]) - 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] = 0x42 - } - } - if x.Interval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Interval)) - i-- - dAtA[i] = 0x38 - } - if len(x.SignalDeviations) > 0 { - for iNdEx := len(x.SignalDeviations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SignalDeviations[iNdEx]) - 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] = 0x32 - } - } - if len(x.FeePayer) > 0 { - i -= len(x.FeePayer) - copy(dAtA[i:], x.FeePayer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeePayer))) - i-- - dAtA[i] = 0x2a - } - if x.Encoder != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoder)) - i-- - dAtA[i] = 0x20 - } - if x.Route != nil { - encoded, err := options.Marshal(x.Route) - 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.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x10 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - 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().(*Tunnel) - 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: Tunnel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Tunnel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 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.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Route", 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.Route == nil { - x.Route = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Route); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoder", wireType) - } - x.Encoder = 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.Encoder |= v1beta11.Encoder(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 FeePayer", 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.FeePayer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalDeviations", 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 + _ = options + var n int + var l int + _ = l + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if len(x.Prices) > 0 { + for _, e := range x.Prices { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.LastInterval != 0 { + n += 1 + runtime.Sov(uint64(x.LastInterval)) + } + 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().(*LatestPrices) + 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 x.LastInterval != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.LastInterval)) + i-- + dAtA[i] = 0x18 + } + if len(x.Prices) > 0 { + for iNdEx := len(x.Prices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Prices[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } + 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().(*LatestPrices) + 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 postIndex > l { + if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.SignalDeviations = append(x.SignalDeviations, &SignalDeviation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SignalDeviations[len(x.SignalDeviations)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 7: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestPrices: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestPrices: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) } - x.Interval = 0 + x.TunnelId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2612,14 +1648,14 @@ func (x *fastReflection_Tunnel) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Interval |= uint64(b&0x7F) << shift + x.TunnelId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 8: + case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2646,55 +1682,16 @@ func (x *fastReflection_Tunnel) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.TotalDeposit = append(x.TotalDeposit, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalDeposit[len(x.TotalDeposit)-1]); err != nil { + x.Prices = append(x.Prices, &v1beta11.Price{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Prices[len(x.Prices)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) - } - var v 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsActive = bool(v != 0) - case 10: + case 3: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - x.CreatedAt = 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.CreatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastInterval", wireType) } - var stringLen uint64 + x.LastInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2704,24 +1701,11 @@ func (x *fastReflection_Tunnel) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.LastInterval |= int64(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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2757,82 +1741,78 @@ func (x *fastReflection_Tunnel) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_LatestPrices_2_list)(nil) +var _ protoreflect.List = (*_TotalFees_1_list)(nil) -type _LatestPrices_2_list struct { - list *[]*v1beta11.Price +type _TotalFees_1_list struct { + list *[]*v1beta1.Coin } -func (x *_LatestPrices_2_list) Len() int { +func (x *_TotalFees_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_LatestPrices_2_list) Get(i int) protoreflect.Value { +func (x *_TotalFees_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_LatestPrices_2_list) Set(i int, value protoreflect.Value) { +func (x *_TotalFees_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_LatestPrices_2_list) Append(value protoreflect.Value) { +func (x *_TotalFees_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_LatestPrices_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta11.Price) +func (x *_TotalFees_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_LatestPrices_2_list) Truncate(n int) { +func (x *_TotalFees_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_LatestPrices_2_list) NewElement() protoreflect.Value { - v := new(v1beta11.Price) +func (x *_TotalFees_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_LatestPrices_2_list) IsValid() bool { +func (x *_TotalFees_1_list) IsValid() bool { return x.list != nil } var ( - md_LatestPrices protoreflect.MessageDescriptor - fd_LatestPrices_tunnel_id protoreflect.FieldDescriptor - fd_LatestPrices_prices protoreflect.FieldDescriptor - fd_LatestPrices_last_interval protoreflect.FieldDescriptor + md_TotalFees protoreflect.MessageDescriptor + fd_TotalFees_total_packet_fee protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tunnel_proto_init() - md_LatestPrices = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("LatestPrices") - fd_LatestPrices_tunnel_id = md_LatestPrices.Fields().ByName("tunnel_id") - fd_LatestPrices_prices = md_LatestPrices.Fields().ByName("prices") - fd_LatestPrices_last_interval = md_LatestPrices.Fields().ByName("last_interval") + md_TotalFees = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("TotalFees") + fd_TotalFees_total_packet_fee = md_TotalFees.Fields().ByName("total_packet_fee") } -var _ protoreflect.Message = (*fastReflection_LatestPrices)(nil) +var _ protoreflect.Message = (*fastReflection_TotalFees)(nil) -type fastReflection_LatestPrices LatestPrices +type fastReflection_TotalFees TotalFees -func (x *LatestPrices) ProtoReflect() protoreflect.Message { - return (*fastReflection_LatestPrices)(x) +func (x *TotalFees) ProtoReflect() protoreflect.Message { + return (*fastReflection_TotalFees)(x) } -func (x *LatestPrices) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4] +func (x *TotalFees) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2843,43 +1823,43 @@ func (x *LatestPrices) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_LatestPrices_messageType fastReflection_LatestPrices_messageType -var _ protoreflect.MessageType = fastReflection_LatestPrices_messageType{} - -type fastReflection_LatestPrices_messageType struct{} +var _fastReflection_TotalFees_messageType fastReflection_TotalFees_messageType +var _ protoreflect.MessageType = fastReflection_TotalFees_messageType{} -func (x fastReflection_LatestPrices_messageType) Zero() protoreflect.Message { - return (*fastReflection_LatestPrices)(nil) +type fastReflection_TotalFees_messageType struct{} + +func (x fastReflection_TotalFees_messageType) Zero() protoreflect.Message { + return (*fastReflection_TotalFees)(nil) } -func (x fastReflection_LatestPrices_messageType) New() protoreflect.Message { - return new(fastReflection_LatestPrices) +func (x fastReflection_TotalFees_messageType) New() protoreflect.Message { + return new(fastReflection_TotalFees) } -func (x fastReflection_LatestPrices_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LatestPrices +func (x fastReflection_TotalFees_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TotalFees } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_LatestPrices) Descriptor() protoreflect.MessageDescriptor { - return md_LatestPrices +func (x *fastReflection_TotalFees) Descriptor() protoreflect.MessageDescriptor { + return md_TotalFees } // 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_LatestPrices) Type() protoreflect.MessageType { - return _fastReflection_LatestPrices_messageType +func (x *fastReflection_TotalFees) Type() protoreflect.MessageType { + return _fastReflection_TotalFees_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_LatestPrices) New() protoreflect.Message { - return new(fastReflection_LatestPrices) +func (x *fastReflection_TotalFees) New() protoreflect.Message { + return new(fastReflection_TotalFees) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_LatestPrices) Interface() protoreflect.ProtoMessage { - return (*LatestPrices)(x) +func (x *fastReflection_TotalFees) Interface() protoreflect.ProtoMessage { + return (*TotalFees)(x) } // Range iterates over every populated field in an undefined order, @@ -2887,22 +1867,10 @@ func (x *fastReflection_LatestPrices) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_LatestPrices) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.TunnelId != uint64(0) { - value := protoreflect.ValueOfUint64(x.TunnelId) - if !f(fd_LatestPrices_tunnel_id, value) { - return - } - } - if len(x.Prices) != 0 { - value := protoreflect.ValueOfList(&_LatestPrices_2_list{list: &x.Prices}) - if !f(fd_LatestPrices_prices, value) { - return - } - } - if x.LastInterval != int64(0) { - value := protoreflect.ValueOfInt64(x.LastInterval) - if !f(fd_LatestPrices_last_interval, value) { +func (x *fastReflection_TotalFees) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.TotalPacketFee) != 0 { + value := protoreflect.ValueOfList(&_TotalFees_1_list{list: &x.TotalPacketFee}) + if !f(fd_TotalFees_total_packet_fee, value) { return } } @@ -2919,19 +1887,15 @@ func (x *fastReflection_LatestPrices) Range(f func(protoreflect.FieldDescriptor, // 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_LatestPrices) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TotalFees) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestPrices.tunnel_id": - return x.TunnelId != uint64(0) - case "band.tunnel.v1beta1.LatestPrices.prices": - return len(x.Prices) != 0 - case "band.tunnel.v1beta1.LatestPrices.last_interval": - return x.LastInterval != int64(0) + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": + return len(x.TotalPacketFee) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) } } @@ -2941,19 +1905,15 @@ func (x *fastReflection_LatestPrices) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LatestPrices) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TotalFees) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestPrices.tunnel_id": - x.TunnelId = uint64(0) - case "band.tunnel.v1beta1.LatestPrices.prices": - x.Prices = nil - case "band.tunnel.v1beta1.LatestPrices.last_interval": - x.LastInterval = int64(0) + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": + x.TotalPacketFee = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) } } @@ -2963,25 +1923,19 @@ func (x *fastReflection_LatestPrices) Clear(fd protoreflect.FieldDescriptor) { // 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_LatestPrices) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TotalFees) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.LatestPrices.tunnel_id": - value := x.TunnelId - return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.LatestPrices.prices": - if len(x.Prices) == 0 { - return protoreflect.ValueOfList(&_LatestPrices_2_list{}) + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": + if len(x.TotalPacketFee) == 0 { + return protoreflect.ValueOfList(&_TotalFees_1_list{}) } - listValue := &_LatestPrices_2_list{list: &x.Prices} + listValue := &_TotalFees_1_list{list: &x.TotalPacketFee} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.LatestPrices.last_interval": - value := x.LastInterval - return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", descriptor.FullName())) } } @@ -2995,21 +1949,17 @@ func (x *fastReflection_LatestPrices) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LatestPrices) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TotalFees) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestPrices.tunnel_id": - x.TunnelId = value.Uint() - case "band.tunnel.v1beta1.LatestPrices.prices": + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": lv := value.List() - clv := lv.(*_LatestPrices_2_list) - x.Prices = *clv.list - case "band.tunnel.v1beta1.LatestPrices.last_interval": - x.LastInterval = value.Int() + clv := lv.(*_TotalFees_1_list) + x.TotalPacketFee = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) } } @@ -3023,53 +1973,45 @@ func (x *fastReflection_LatestPrices) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LatestPrices) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TotalFees) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestPrices.prices": - if x.Prices == nil { - x.Prices = []*v1beta11.Price{} + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": + if x.TotalPacketFee == nil { + x.TotalPacketFee = []*v1beta1.Coin{} } - value := &_LatestPrices_2_list{list: &x.Prices} + value := &_TotalFees_1_list{list: &x.TotalPacketFee} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.LatestPrices.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.LatestPrices is not mutable")) - case "band.tunnel.v1beta1.LatestPrices.last_interval": - panic(fmt.Errorf("field last_interval of message band.tunnel.v1beta1.LatestPrices is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees 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_LatestPrices) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TotalFees) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.LatestPrices.tunnel_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.LatestPrices.prices": - list := []*v1beta11.Price{} - return protoreflect.ValueOfList(&_LatestPrices_2_list{list: &list}) - case "band.tunnel.v1beta1.LatestPrices.last_interval": - return protoreflect.ValueOfInt64(int64(0)) + case "band.tunnel.v1beta1.TotalFees.total_packet_fee": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_TotalFees_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.LatestPrices")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.LatestPrices does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees 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_LatestPrices) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TotalFees) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.LatestPrices", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TotalFees", d.FullName())) } panic("unreachable") } @@ -3077,7 +2019,7 @@ func (x *fastReflection_LatestPrices) WhichOneof(d protoreflect.OneofDescriptor) // 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_LatestPrices) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TotalFees) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3088,7 +2030,7 @@ func (x *fastReflection_LatestPrices) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LatestPrices) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TotalFees) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3100,7 +2042,7 @@ func (x *fastReflection_LatestPrices) SetUnknown(fields protoreflect.RawFields) // 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_LatestPrices) IsValid() bool { +func (x *fastReflection_TotalFees) IsValid() bool { return x != nil } @@ -3110,9 +2052,9 @@ func (x *fastReflection_LatestPrices) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LatestPrices) + x := input.Message.Interface().(*TotalFees) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3124,18 +2066,12 @@ func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.TunnelId != 0 { - n += 1 + runtime.Sov(uint64(x.TunnelId)) - } - if len(x.Prices) > 0 { - for _, e := range x.Prices { + if len(x.TotalPacketFee) > 0 { + for _, e := range x.TotalPacketFee { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } - if x.LastInterval != 0 { - n += 1 + runtime.Sov(uint64(x.LastInterval)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3146,7 +2082,7 @@ func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*LatestPrices) + x := input.Message.Interface().(*TotalFees) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3165,14 +2101,9 @@ func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.LastInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.LastInterval)) - i-- - dAtA[i] = 0x18 - } - if len(x.Prices) > 0 { - for iNdEx := len(x.Prices) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Prices[iNdEx]) + if len(x.TotalPacketFee) > 0 { + for iNdEx := len(x.TotalPacketFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TotalPacketFee[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3183,14 +2114,9 @@ func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } } - if x.TunnelId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) - i-- - dAtA[i] = 0x8 - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -3202,7 +2128,7 @@ func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*LatestPrices) + x := input.Message.Interface().(*TotalFees) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3234,34 +2160,15 @@ func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestPrices: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TotalFees: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LatestPrices: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TotalFees: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) - } - x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalPacketFee", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3278,40 +2185,21 @@ func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { 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 - } - x.Prices = append(x.Prices, &v1beta11.Price{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Prices[len(x.Prices)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastInterval", wireType) - } - x.LastInterval = 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.LastInterval |= int64(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 + } + x.TotalPacketFee = append(x.TotalPacketFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalPacketFee[len(x.TotalPacketFee)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3347,78 +2235,192 @@ func (x *fastReflection_LatestPrices) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_TotalFees_1_list)(nil) +var _ protoreflect.List = (*_Packet_3_list)(nil) -type _TotalFees_1_list struct { +type _Packet_3_list struct { + list *[]*v1beta11.Price +} + +func (x *_Packet_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Packet_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Packet_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) + (*x.list)[i] = concreteValue +} + +func (x *_Packet_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Packet_3_list) AppendMutable() protoreflect.Value { + v := new(v1beta11.Price) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Packet_3_list) NewElement() protoreflect.Value { + v := new(v1beta11.Price) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Packet_5_list)(nil) + +type _Packet_5_list struct { list *[]*v1beta1.Coin } -func (x *_TotalFees_1_list) Len() int { +func (x *_Packet_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_TotalFees_1_list) Get(i int) protoreflect.Value { +func (x *_Packet_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_TotalFees_1_list) Set(i int, value protoreflect.Value) { +func (x *_Packet_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_TotalFees_1_list) Append(value protoreflect.Value) { +func (x *_Packet_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_TotalFees_1_list) AppendMutable() protoreflect.Value { +func (x *_Packet_5_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_TotalFees_1_list) Truncate(n int) { +func (x *_Packet_5_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_TotalFees_1_list) NewElement() protoreflect.Value { +func (x *_Packet_5_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_TotalFees_1_list) IsValid() bool { +func (x *_Packet_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Packet_6_list)(nil) + +type _Packet_6_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Packet_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Packet_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Packet_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Packet_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Packet_6_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Packet_6_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Packet_6_list) IsValid() bool { return x.list != nil } var ( - md_TotalFees protoreflect.MessageDescriptor - fd_TotalFees_total_packet_fee protoreflect.FieldDescriptor + md_Packet protoreflect.MessageDescriptor + fd_Packet_tunnel_id protoreflect.FieldDescriptor + fd_Packet_sequence protoreflect.FieldDescriptor + fd_Packet_prices protoreflect.FieldDescriptor + fd_Packet_packet_content protoreflect.FieldDescriptor + fd_Packet_base_fee protoreflect.FieldDescriptor + fd_Packet_route_fee protoreflect.FieldDescriptor + fd_Packet_created_at protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tunnel_proto_init() - md_TotalFees = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("TotalFees") - fd_TotalFees_total_packet_fee = md_TotalFees.Fields().ByName("total_packet_fee") + md_Packet = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Packet") + fd_Packet_tunnel_id = md_Packet.Fields().ByName("tunnel_id") + fd_Packet_sequence = md_Packet.Fields().ByName("sequence") + fd_Packet_prices = md_Packet.Fields().ByName("prices") + fd_Packet_packet_content = md_Packet.Fields().ByName("packet_content") + fd_Packet_base_fee = md_Packet.Fields().ByName("base_fee") + fd_Packet_route_fee = md_Packet.Fields().ByName("route_fee") + fd_Packet_created_at = md_Packet.Fields().ByName("created_at") } -var _ protoreflect.Message = (*fastReflection_TotalFees)(nil) +var _ protoreflect.Message = (*fastReflection_Packet)(nil) -type fastReflection_TotalFees TotalFees +type fastReflection_Packet Packet -func (x *TotalFees) ProtoReflect() protoreflect.Message { - return (*fastReflection_TotalFees)(x) +func (x *Packet) ProtoReflect() protoreflect.Message { + return (*fastReflection_Packet)(x) } -func (x *TotalFees) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] +func (x *Packet) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3429,43 +2431,43 @@ func (x *TotalFees) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_TotalFees_messageType fastReflection_TotalFees_messageType -var _ protoreflect.MessageType = fastReflection_TotalFees_messageType{} +var _fastReflection_Packet_messageType fastReflection_Packet_messageType +var _ protoreflect.MessageType = fastReflection_Packet_messageType{} -type fastReflection_TotalFees_messageType struct{} +type fastReflection_Packet_messageType struct{} -func (x fastReflection_TotalFees_messageType) Zero() protoreflect.Message { - return (*fastReflection_TotalFees)(nil) +func (x fastReflection_Packet_messageType) Zero() protoreflect.Message { + return (*fastReflection_Packet)(nil) } -func (x fastReflection_TotalFees_messageType) New() protoreflect.Message { - return new(fastReflection_TotalFees) +func (x fastReflection_Packet_messageType) New() protoreflect.Message { + return new(fastReflection_Packet) } -func (x fastReflection_TotalFees_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TotalFees +func (x fastReflection_Packet_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Packet } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_TotalFees) Descriptor() protoreflect.MessageDescriptor { - return md_TotalFees +func (x *fastReflection_Packet) Descriptor() protoreflect.MessageDescriptor { + return md_Packet } // 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_TotalFees) Type() protoreflect.MessageType { - return _fastReflection_TotalFees_messageType +func (x *fastReflection_Packet) Type() protoreflect.MessageType { + return _fastReflection_Packet_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_TotalFees) New() protoreflect.Message { - return new(fastReflection_TotalFees) +func (x *fastReflection_Packet) New() protoreflect.Message { + return new(fastReflection_Packet) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_TotalFees) Interface() protoreflect.ProtoMessage { - return (*TotalFees)(x) +func (x *fastReflection_Packet) Interface() protoreflect.ProtoMessage { + return (*Packet)(x) } // Range iterates over every populated field in an undefined order, @@ -3473,10 +2475,46 @@ func (x *fastReflection_TotalFees) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_TotalFees) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.TotalPacketFee) != 0 { - value := protoreflect.ValueOfList(&_TotalFees_1_list{list: &x.TotalPacketFee}) - if !f(fd_TotalFees_total_packet_fee, value) { +func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TunnelId != uint64(0) { + value := protoreflect.ValueOfUint64(x.TunnelId) + if !f(fd_Packet_tunnel_id, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_Packet_sequence, value) { + return + } + } + if len(x.Prices) != 0 { + value := protoreflect.ValueOfList(&_Packet_3_list{list: &x.Prices}) + if !f(fd_Packet_prices, value) { + return + } + } + if x.PacketContent != nil { + value := protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) + if !f(fd_Packet_packet_content, value) { + return + } + } + if len(x.BaseFee) != 0 { + value := protoreflect.ValueOfList(&_Packet_5_list{list: &x.BaseFee}) + if !f(fd_Packet_base_fee, value) { + return + } + } + if len(x.RouteFee) != 0 { + value := protoreflect.ValueOfList(&_Packet_6_list{list: &x.RouteFee}) + if !f(fd_Packet_route_fee, value) { + return + } + } + if x.CreatedAt != int64(0) { + value := protoreflect.ValueOfInt64(x.CreatedAt) + if !f(fd_Packet_created_at, value) { return } } @@ -3493,15 +2531,27 @@ func (x *fastReflection_TotalFees) Range(f func(protoreflect.FieldDescriptor, pr // 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_TotalFees) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.TotalFees.total_packet_fee": - return len(x.TotalPacketFee) != 0 + case "band.tunnel.v1beta1.Packet.tunnel_id": + return x.TunnelId != uint64(0) + case "band.tunnel.v1beta1.Packet.sequence": + return x.Sequence != uint64(0) + case "band.tunnel.v1beta1.Packet.prices": + return len(x.Prices) != 0 + case "band.tunnel.v1beta1.Packet.packet_content": + return x.PacketContent != nil + case "band.tunnel.v1beta1.Packet.base_fee": + return len(x.BaseFee) != 0 + case "band.tunnel.v1beta1.Packet.route_fee": + return len(x.RouteFee) != 0 + case "band.tunnel.v1beta1.Packet.created_at": + return x.CreatedAt != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) } } @@ -3511,15 +2561,27 @@ func (x *fastReflection_TotalFees) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TotalFees) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.TotalFees.total_packet_fee": - x.TotalPacketFee = nil + case "band.tunnel.v1beta1.Packet.tunnel_id": + x.TunnelId = uint64(0) + case "band.tunnel.v1beta1.Packet.sequence": + x.Sequence = uint64(0) + case "band.tunnel.v1beta1.Packet.prices": + x.Prices = nil + case "band.tunnel.v1beta1.Packet.packet_content": + x.PacketContent = nil + case "band.tunnel.v1beta1.Packet.base_fee": + x.BaseFee = nil + case "band.tunnel.v1beta1.Packet.route_fee": + x.RouteFee = nil + case "band.tunnel.v1beta1.Packet.created_at": + x.CreatedAt = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) } } @@ -3529,19 +2591,43 @@ func (x *fastReflection_TotalFees) Clear(fd protoreflect.FieldDescriptor) { // 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_TotalFees) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.TotalFees.total_packet_fee": - if len(x.TotalPacketFee) == 0 { - return protoreflect.ValueOfList(&_TotalFees_1_list{}) + case "band.tunnel.v1beta1.Packet.tunnel_id": + value := x.TunnelId + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.Packet.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.Packet.prices": + if len(x.Prices) == 0 { + return protoreflect.ValueOfList(&_Packet_3_list{}) } - listValue := &_TotalFees_1_list{list: &x.TotalPacketFee} + listValue := &_Packet_3_list{list: &x.Prices} + return protoreflect.ValueOfList(listValue) + case "band.tunnel.v1beta1.Packet.packet_content": + value := x.PacketContent + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "band.tunnel.v1beta1.Packet.base_fee": + if len(x.BaseFee) == 0 { + return protoreflect.ValueOfList(&_Packet_5_list{}) + } + listValue := &_Packet_5_list{list: &x.BaseFee} + return protoreflect.ValueOfList(listValue) + case "band.tunnel.v1beta1.Packet.route_fee": + if len(x.RouteFee) == 0 { + return protoreflect.ValueOfList(&_Packet_6_list{}) + } + listValue := &_Packet_6_list{list: &x.RouteFee} return protoreflect.ValueOfList(listValue) + case "band.tunnel.v1beta1.Packet.created_at": + value := x.CreatedAt + return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", descriptor.FullName())) } } @@ -3555,17 +2641,33 @@ func (x *fastReflection_TotalFees) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TotalFees) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.TotalFees.total_packet_fee": + case "band.tunnel.v1beta1.Packet.tunnel_id": + x.TunnelId = value.Uint() + case "band.tunnel.v1beta1.Packet.sequence": + x.Sequence = value.Uint() + case "band.tunnel.v1beta1.Packet.prices": lv := value.List() - clv := lv.(*_TotalFees_1_list) - x.TotalPacketFee = *clv.list + clv := lv.(*_Packet_3_list) + x.Prices = *clv.list + case "band.tunnel.v1beta1.Packet.packet_content": + x.PacketContent = value.Message().Interface().(*anypb.Any) + case "band.tunnel.v1beta1.Packet.base_fee": + lv := value.List() + clv := lv.(*_Packet_5_list) + x.BaseFee = *clv.list + case "band.tunnel.v1beta1.Packet.route_fee": + lv := value.List() + clv := lv.(*_Packet_6_list) + x.RouteFee = *clv.list + case "band.tunnel.v1beta1.Packet.created_at": + x.CreatedAt = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) } } @@ -3579,45 +2681,83 @@ func (x *fastReflection_TotalFees) Set(fd protoreflect.FieldDescriptor, value pr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TotalFees) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TotalFees.total_packet_fee": - if x.TotalPacketFee == nil { - x.TotalPacketFee = []*v1beta1.Coin{} + case "band.tunnel.v1beta1.Packet.prices": + if x.Prices == nil { + x.Prices = []*v1beta11.Price{} } - value := &_TotalFees_1_list{list: &x.TotalPacketFee} + value := &_Packet_3_list{list: &x.Prices} + return protoreflect.ValueOfList(value) + case "band.tunnel.v1beta1.Packet.packet_content": + if x.PacketContent == nil { + x.PacketContent = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) + case "band.tunnel.v1beta1.Packet.base_fee": + if x.BaseFee == nil { + x.BaseFee = []*v1beta1.Coin{} + } + value := &_Packet_5_list{list: &x.BaseFee} + return protoreflect.ValueOfList(value) + case "band.tunnel.v1beta1.Packet.route_fee": + if x.RouteFee == nil { + x.RouteFee = []*v1beta1.Coin{} + } + value := &_Packet_6_list{list: &x.RouteFee} return protoreflect.ValueOfList(value) + case "band.tunnel.v1beta1.Packet.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.Packet is not mutable")) + case "band.tunnel.v1beta1.Packet.sequence": + panic(fmt.Errorf("field sequence of message band.tunnel.v1beta1.Packet is not mutable")) + case "band.tunnel.v1beta1.Packet.created_at": + panic(fmt.Errorf("field created_at of message band.tunnel.v1beta1.Packet is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet 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_TotalFees) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Packet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TotalFees.total_packet_fee": + case "band.tunnel.v1beta1.Packet.tunnel_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.Packet.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.Packet.prices": + list := []*v1beta11.Price{} + return protoreflect.ValueOfList(&_Packet_3_list{list: &list}) + case "band.tunnel.v1beta1.Packet.packet_content": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "band.tunnel.v1beta1.Packet.base_fee": list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_TotalFees_1_list{list: &list}) + return protoreflect.ValueOfList(&_Packet_5_list{list: &list}) + case "band.tunnel.v1beta1.Packet.route_fee": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Packet_6_list{list: &list}) + case "band.tunnel.v1beta1.Packet.created_at": + return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TotalFees")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TotalFees does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Packet 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_TotalFees) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Packet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TotalFees", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Packet", d.FullName())) } panic("unreachable") } @@ -3625,7 +2765,7 @@ func (x *fastReflection_TotalFees) WhichOneof(d protoreflect.OneofDescriptor) pr // 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_TotalFees) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Packet) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3636,7 +2776,7 @@ func (x *fastReflection_TotalFees) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TotalFees) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Packet) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3648,7 +2788,7 @@ func (x *fastReflection_TotalFees) SetUnknown(fields protoreflect.RawFields) { // 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_TotalFees) IsValid() bool { +func (x *fastReflection_Packet) IsValid() bool { return x != nil } @@ -3658,9 +2798,9 @@ func (x *fastReflection_TotalFees) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TotalFees) + x := input.Message.Interface().(*Packet) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3672,12 +2812,37 @@ func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if len(x.TotalPacketFee) > 0 { - for _, e := range x.TotalPacketFee { + if x.TunnelId != 0 { + n += 1 + runtime.Sov(uint64(x.TunnelId)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if len(x.Prices) > 0 { + for _, e := range x.Prices { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.PacketContent != nil { + l = options.Size(x.PacketContent) + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.BaseFee) > 0 { + for _, e := range x.BaseFee { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.RouteFee) > 0 { + for _, e := range x.RouteFee { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } + if x.CreatedAt != 0 { + n += 1 + runtime.Sov(uint64(x.CreatedAt)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3688,7 +2853,7 @@ func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TotalFees) + x := input.Message.Interface().(*Packet) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3707,9 +2872,60 @@ func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.TotalPacketFee) > 0 { - for iNdEx := len(x.TotalPacketFee) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.TotalPacketFee[iNdEx]) + if x.CreatedAt != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) + i-- + dAtA[i] = 0x38 + } + if len(x.RouteFee) > 0 { + for iNdEx := len(x.RouteFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RouteFee[iNdEx]) + 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] = 0x32 + } + } + if len(x.BaseFee) > 0 { + for iNdEx := len(x.BaseFee) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.BaseFee[iNdEx]) + 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 x.PacketContent != nil { + encoded, err := options.Marshal(x.PacketContent) + 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] = 0x22 + } + if len(x.Prices) > 0 { + for iNdEx := len(x.Prices) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Prices[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3720,9 +2936,19 @@ func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x1a } } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x10 + } + if x.TunnelId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) + i-- + dAtA[i] = 0x8 + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -3734,7 +2960,7 @@ func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TotalFees) + x := input.Message.Interface().(*Packet) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3766,15 +2992,53 @@ func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TotalFees: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Packet: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TotalFees: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TunnelId", wireType) + } + x.TunnelId = 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.TunnelId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalPacketFee", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3801,232 +3065,245 @@ func (x *fastReflection_TotalFees) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.TotalPacketFee = append(x.TotalPacketFee, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TotalPacketFee[len(x.TotalPacketFee)-1]); err != nil { + x.Prices = append(x.Prices, &v1beta11.Price{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Prices[len(x.Prices)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PacketContent", 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.PacketContent == nil { + x.PacketContent = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PacketContent); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseFee", 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 } - if (iNdEx + skippy) > l { + 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 !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + x.BaseFee = append(x.BaseFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseFee[len(x.BaseFee)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - 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 _ protoreflect.List = (*_Packet_3_list)(nil) - -type _Packet_3_list struct { - list *[]*v1beta11.Price -} - -func (x *_Packet_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Packet_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Packet_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) - (*x.list)[i] = concreteValue -} - -func (x *_Packet_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta11.Price) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Packet_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta11.Price) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Packet_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Packet_3_list) NewElement() protoreflect.Value { - v := new(v1beta11.Price) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Packet_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Packet_5_list)(nil) - -type _Packet_5_list struct { - list *[]*v1beta1.Coin -} + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RouteFee", 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 + } + x.RouteFee = append(x.RouteFee, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RouteFee[len(x.RouteFee)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + x.CreatedAt = 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.CreatedAt |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 + } + } -func (x *_Packet_5_list) Len() int { - if x.list == nil { - return 0 + 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 len(*x.list) -} - -func (x *_Packet_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Packet_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Packet_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Packet_5_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Packet_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, } - *x.list = (*x.list)[:n] -} - -func (x *_Packet_5_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Packet_5_list) IsValid() bool { - return x.list != nil } -var _ protoreflect.List = (*_Packet_6_list)(nil) +var _ protoreflect.List = (*_Deposit_3_list)(nil) -type _Packet_6_list struct { +type _Deposit_3_list struct { list *[]*v1beta1.Coin } -func (x *_Packet_6_list) Len() int { +func (x *_Deposit_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Packet_6_list) Get(i int) protoreflect.Value { +func (x *_Deposit_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_Packet_6_list) Set(i int, value protoreflect.Value) { +func (x *_Deposit_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) (*x.list)[i] = concreteValue } -func (x *_Packet_6_list) Append(value protoreflect.Value) { +func (x *_Deposit_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) *x.list = append(*x.list, concreteValue) } -func (x *_Packet_6_list) AppendMutable() protoreflect.Value { +func (x *_Deposit_3_list) AppendMutable() protoreflect.Value { v := new(v1beta1.Coin) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_Packet_6_list) Truncate(n int) { +func (x *_Deposit_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_Packet_6_list) NewElement() protoreflect.Value { +func (x *_Deposit_3_list) NewElement() protoreflect.Value { v := new(v1beta1.Coin) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_Packet_6_list) IsValid() bool { +func (x *_Deposit_3_list) IsValid() bool { return x.list != nil } var ( - md_Packet protoreflect.MessageDescriptor - fd_Packet_tunnel_id protoreflect.FieldDescriptor - fd_Packet_sequence protoreflect.FieldDescriptor - fd_Packet_prices protoreflect.FieldDescriptor - fd_Packet_packet_content protoreflect.FieldDescriptor - fd_Packet_base_fee protoreflect.FieldDescriptor - fd_Packet_route_fee protoreflect.FieldDescriptor - fd_Packet_created_at protoreflect.FieldDescriptor + md_Deposit protoreflect.MessageDescriptor + fd_Deposit_tunnel_id protoreflect.FieldDescriptor + fd_Deposit_depositor protoreflect.FieldDescriptor + fd_Deposit_amount protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tunnel_proto_init() - md_Packet = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Packet") - fd_Packet_tunnel_id = md_Packet.Fields().ByName("tunnel_id") - fd_Packet_sequence = md_Packet.Fields().ByName("sequence") - fd_Packet_prices = md_Packet.Fields().ByName("prices") - fd_Packet_packet_content = md_Packet.Fields().ByName("packet_content") - fd_Packet_base_fee = md_Packet.Fields().ByName("base_fee") - fd_Packet_route_fee = md_Packet.Fields().ByName("route_fee") - fd_Packet_created_at = md_Packet.Fields().ByName("created_at") + md_Deposit = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("Deposit") + fd_Deposit_tunnel_id = md_Deposit.Fields().ByName("tunnel_id") + fd_Deposit_depositor = md_Deposit.Fields().ByName("depositor") + fd_Deposit_amount = md_Deposit.Fields().ByName("amount") } -var _ protoreflect.Message = (*fastReflection_Packet)(nil) +var _ protoreflect.Message = (*fastReflection_Deposit)(nil) -type fastReflection_Packet Packet +type fastReflection_Deposit Deposit -func (x *Packet) ProtoReflect() protoreflect.Message { - return (*fastReflection_Packet)(x) +func (x *Deposit) ProtoReflect() protoreflect.Message { + return (*fastReflection_Deposit)(x) } -func (x *Packet) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6] +func (x *Deposit) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4037,43 +3314,43 @@ func (x *Packet) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Packet_messageType fastReflection_Packet_messageType -var _ protoreflect.MessageType = fastReflection_Packet_messageType{} +var _fastReflection_Deposit_messageType fastReflection_Deposit_messageType +var _ protoreflect.MessageType = fastReflection_Deposit_messageType{} -type fastReflection_Packet_messageType struct{} +type fastReflection_Deposit_messageType struct{} -func (x fastReflection_Packet_messageType) Zero() protoreflect.Message { - return (*fastReflection_Packet)(nil) +func (x fastReflection_Deposit_messageType) Zero() protoreflect.Message { + return (*fastReflection_Deposit)(nil) } -func (x fastReflection_Packet_messageType) New() protoreflect.Message { - return new(fastReflection_Packet) +func (x fastReflection_Deposit_messageType) New() protoreflect.Message { + return new(fastReflection_Deposit) } -func (x fastReflection_Packet_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Packet +func (x fastReflection_Deposit_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Deposit } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Packet) Descriptor() protoreflect.MessageDescriptor { - return md_Packet +func (x *fastReflection_Deposit) Descriptor() protoreflect.MessageDescriptor { + return md_Deposit } // 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_Packet) Type() protoreflect.MessageType { - return _fastReflection_Packet_messageType +func (x *fastReflection_Deposit) Type() protoreflect.MessageType { + return _fastReflection_Deposit_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Packet) New() protoreflect.Message { - return new(fastReflection_Packet) +func (x *fastReflection_Deposit) New() protoreflect.Message { + return new(fastReflection_Deposit) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Packet) Interface() protoreflect.ProtoMessage { - return (*Packet)(x) +func (x *fastReflection_Deposit) Interface() protoreflect.ProtoMessage { + return (*Deposit)(x) } // Range iterates over every populated field in an undefined order, @@ -4081,46 +3358,22 @@ func (x *fastReflection_Packet) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Deposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TunnelId != uint64(0) { value := protoreflect.ValueOfUint64(x.TunnelId) - if !f(fd_Packet_tunnel_id, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_Packet_sequence, value) { - return - } - } - if len(x.Prices) != 0 { - value := protoreflect.ValueOfList(&_Packet_3_list{list: &x.Prices}) - if !f(fd_Packet_prices, value) { - return - } - } - if x.PacketContent != nil { - value := protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) - if !f(fd_Packet_packet_content, value) { - return - } - } - if len(x.BaseFee) != 0 { - value := protoreflect.ValueOfList(&_Packet_5_list{list: &x.BaseFee}) - if !f(fd_Packet_base_fee, value) { + if !f(fd_Deposit_tunnel_id, value) { return } } - if len(x.RouteFee) != 0 { - value := protoreflect.ValueOfList(&_Packet_6_list{list: &x.RouteFee}) - if !f(fd_Packet_route_fee, value) { + if x.Depositor != "" { + value := protoreflect.ValueOfString(x.Depositor) + if !f(fd_Deposit_depositor, value) { return } } - if x.CreatedAt != int64(0) { - value := protoreflect.ValueOfInt64(x.CreatedAt) - if !f(fd_Packet_created_at, value) { + if len(x.Amount) != 0 { + value := protoreflect.ValueOfList(&_Deposit_3_list{list: &x.Amount}) + if !f(fd_Deposit_amount, value) { return } } @@ -4137,27 +3390,19 @@ func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, proto // 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_Packet) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Deposit) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.Packet.tunnel_id": + case "band.tunnel.v1beta1.Deposit.tunnel_id": return x.TunnelId != uint64(0) - case "band.tunnel.v1beta1.Packet.sequence": - return x.Sequence != uint64(0) - case "band.tunnel.v1beta1.Packet.prices": - return len(x.Prices) != 0 - case "band.tunnel.v1beta1.Packet.packet_content": - return x.PacketContent != nil - case "band.tunnel.v1beta1.Packet.base_fee": - return len(x.BaseFee) != 0 - case "band.tunnel.v1beta1.Packet.route_fee": - return len(x.RouteFee) != 0 - case "band.tunnel.v1beta1.Packet.created_at": - return x.CreatedAt != int64(0) + case "band.tunnel.v1beta1.Deposit.depositor": + return x.Depositor != "" + case "band.tunnel.v1beta1.Deposit.amount": + return len(x.Amount) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) } } @@ -4167,27 +3412,19 @@ func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Deposit) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.Packet.tunnel_id": - x.TunnelId = uint64(0) - case "band.tunnel.v1beta1.Packet.sequence": - x.Sequence = uint64(0) - case "band.tunnel.v1beta1.Packet.prices": - x.Prices = nil - case "band.tunnel.v1beta1.Packet.packet_content": - x.PacketContent = nil - case "band.tunnel.v1beta1.Packet.base_fee": - x.BaseFee = nil - case "band.tunnel.v1beta1.Packet.route_fee": - x.RouteFee = nil - case "band.tunnel.v1beta1.Packet.created_at": - x.CreatedAt = int64(0) + case "band.tunnel.v1beta1.Deposit.tunnel_id": + x.TunnelId = uint64(0) + case "band.tunnel.v1beta1.Deposit.depositor": + x.Depositor = "" + case "band.tunnel.v1beta1.Deposit.amount": + x.Amount = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) } } @@ -4197,43 +3434,25 @@ func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { // 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_Packet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Deposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.Packet.tunnel_id": + case "band.tunnel.v1beta1.Deposit.tunnel_id": value := x.TunnelId return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.Packet.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.Packet.prices": - if len(x.Prices) == 0 { - return protoreflect.ValueOfList(&_Packet_3_list{}) - } - listValue := &_Packet_3_list{list: &x.Prices} - return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.Packet.packet_content": - value := x.PacketContent - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "band.tunnel.v1beta1.Packet.base_fee": - if len(x.BaseFee) == 0 { - return protoreflect.ValueOfList(&_Packet_5_list{}) - } - listValue := &_Packet_5_list{list: &x.BaseFee} - return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.Packet.route_fee": - if len(x.RouteFee) == 0 { - return protoreflect.ValueOfList(&_Packet_6_list{}) + case "band.tunnel.v1beta1.Deposit.depositor": + value := x.Depositor + return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.Deposit.amount": + if len(x.Amount) == 0 { + return protoreflect.ValueOfList(&_Deposit_3_list{}) } - listValue := &_Packet_6_list{list: &x.RouteFee} + listValue := &_Deposit_3_list{list: &x.Amount} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.Packet.created_at": - value := x.CreatedAt - return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", descriptor.FullName())) } } @@ -4247,33 +3466,21 @@ func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) pro // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Deposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.Packet.tunnel_id": + case "band.tunnel.v1beta1.Deposit.tunnel_id": x.TunnelId = value.Uint() - case "band.tunnel.v1beta1.Packet.sequence": - x.Sequence = value.Uint() - case "band.tunnel.v1beta1.Packet.prices": - lv := value.List() - clv := lv.(*_Packet_3_list) - x.Prices = *clv.list - case "band.tunnel.v1beta1.Packet.packet_content": - x.PacketContent = value.Message().Interface().(*anypb.Any) - case "band.tunnel.v1beta1.Packet.base_fee": - lv := value.List() - clv := lv.(*_Packet_5_list) - x.BaseFee = *clv.list - case "band.tunnel.v1beta1.Packet.route_fee": + case "band.tunnel.v1beta1.Deposit.depositor": + x.Depositor = value.Interface().(string) + case "band.tunnel.v1beta1.Deposit.amount": lv := value.List() - clv := lv.(*_Packet_6_list) - x.RouteFee = *clv.list - case "band.tunnel.v1beta1.Packet.created_at": - x.CreatedAt = value.Int() + clv := lv.(*_Deposit_3_list) + x.Amount = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit does not contain field %s", fd.FullName())) } } @@ -4287,83 +3494,53 @@ func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value proto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Deposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.Packet.prices": - if x.Prices == nil { - x.Prices = []*v1beta11.Price{} - } - value := &_Packet_3_list{list: &x.Prices} - return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.Packet.packet_content": - if x.PacketContent == nil { - x.PacketContent = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) - case "band.tunnel.v1beta1.Packet.base_fee": - if x.BaseFee == nil { - x.BaseFee = []*v1beta1.Coin{} - } - value := &_Packet_5_list{list: &x.BaseFee} - return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.Packet.route_fee": - if x.RouteFee == nil { - x.RouteFee = []*v1beta1.Coin{} + case "band.tunnel.v1beta1.Deposit.amount": + if x.Amount == nil { + x.Amount = []*v1beta1.Coin{} } - value := &_Packet_6_list{list: &x.RouteFee} + value := &_Deposit_3_list{list: &x.Amount} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.Packet.tunnel_id": - panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.Packet is not mutable")) - case "band.tunnel.v1beta1.Packet.sequence": - panic(fmt.Errorf("field sequence of message band.tunnel.v1beta1.Packet is not mutable")) - case "band.tunnel.v1beta1.Packet.created_at": - panic(fmt.Errorf("field created_at of message band.tunnel.v1beta1.Packet is not mutable")) + case "band.tunnel.v1beta1.Deposit.tunnel_id": + panic(fmt.Errorf("field tunnel_id of message band.tunnel.v1beta1.Deposit is not mutable")) + case "band.tunnel.v1beta1.Deposit.depositor": + panic(fmt.Errorf("field depositor of message band.tunnel.v1beta1.Deposit is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit 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_Packet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Deposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.Packet.tunnel_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.Packet.sequence": + case "band.tunnel.v1beta1.Deposit.tunnel_id": return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.Packet.prices": - list := []*v1beta11.Price{} - return protoreflect.ValueOfList(&_Packet_3_list{list: &list}) - case "band.tunnel.v1beta1.Packet.packet_content": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "band.tunnel.v1beta1.Packet.base_fee": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Packet_5_list{list: &list}) - case "band.tunnel.v1beta1.Packet.route_fee": + case "band.tunnel.v1beta1.Deposit.depositor": + return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.Deposit.amount": list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Packet_6_list{list: &list}) - case "band.tunnel.v1beta1.Packet.created_at": - return protoreflect.ValueOfInt64(int64(0)) + return protoreflect.ValueOfList(&_Deposit_3_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Packet")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.Deposit")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.Packet does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.Deposit 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_Packet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Deposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Packet", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.Deposit", d.FullName())) } panic("unreachable") } @@ -4371,7 +3548,7 @@ func (x *fastReflection_Packet) WhichOneof(d protoreflect.OneofDescriptor) proto // 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_Packet) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Deposit) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4382,7 +3559,7 @@ func (x *fastReflection_Packet) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Packet) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Deposit) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4394,7 +3571,7 @@ func (x *fastReflection_Packet) SetUnknown(fields protoreflect.RawFields) { // 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_Packet) IsValid() bool { +func (x *fastReflection_Deposit) IsValid() bool { return x != nil } @@ -4404,9 +3581,9 @@ func (x *fastReflection_Packet) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Deposit) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Packet) + x := input.Message.Interface().(*Deposit) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4421,34 +3598,16 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { if x.TunnelId != 0 { n += 1 + runtime.Sov(uint64(x.TunnelId)) } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - if len(x.Prices) > 0 { - for _, e := range x.Prices { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.PacketContent != nil { - l = options.Size(x.PacketContent) + l = len(x.Depositor) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.BaseFee) > 0 { - for _, e := range x.BaseFee { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.RouteFee) > 0 { - for _, e := range x.RouteFee { + if len(x.Amount) > 0 { + for _, e := range x.Amount { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } - if x.CreatedAt != 0 { - n += 1 + runtime.Sov(uint64(x.CreatedAt)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4459,79 +3618,28 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Packet) - 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 x.CreatedAt != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CreatedAt)) - i-- - dAtA[i] = 0x38 - } - if len(x.RouteFee) > 0 { - for iNdEx := len(x.RouteFee) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.RouteFee[iNdEx]) - 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] = 0x32 - } - } - if len(x.BaseFee) > 0 { - for iNdEx := len(x.BaseFee) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BaseFee[iNdEx]) - 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 x.PacketContent != nil { - encoded, err := options.Marshal(x.PacketContent) - 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] = 0x22 + x := input.Message.Interface().(*Deposit) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil } - if len(x.Prices) > 0 { - for iNdEx := len(x.Prices) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Prices[iNdEx]) + 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.Amount) > 0 { + for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Amount[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4545,10 +3653,12 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x1a } } - if x.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + if len(x.Depositor) > 0 { + i -= len(x.Depositor) + copy(dAtA[i:], x.Depositor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Depositor))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } if x.TunnelId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.TunnelId)) @@ -4566,7 +3676,7 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Packet) + x := input.Message.Interface().(*Deposit) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4598,10 +3708,10 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Packet: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Deposit: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4624,99 +3734,10 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { } } case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 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.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prices", 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 - } - x.Prices = append(x.Prices, &v1beta11.Price{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Prices[len(x.Prices)-1]); 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 PacketContent", 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.PacketContent == nil { - x.PacketContent = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PacketContent); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseFee", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4726,29 +3747,27 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + 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.BaseFee = append(x.BaseFee, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BaseFee[len(x.BaseFee)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } + x.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RouteFee", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4775,30 +3794,11 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.RouteFee = append(x.RouteFee, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RouteFee[len(x.RouteFee)-1]); err != nil { + x.Amount = append(x.Amount, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) - } - x.CreatedAt = 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.CreatedAt |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4835,30 +3835,30 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { } var ( - md_TSSPacketContent protoreflect.MessageDescriptor - fd_TSSPacketContent_signing_id protoreflect.FieldDescriptor - fd_TSSPacketContent_destination_chain_id protoreflect.FieldDescriptor - fd_TSSPacketContent_destination_contract_address protoreflect.FieldDescriptor + md_SignalDeviation protoreflect.MessageDescriptor + fd_SignalDeviation_signal_id protoreflect.FieldDescriptor + fd_SignalDeviation_soft_deviation_bps protoreflect.FieldDescriptor + fd_SignalDeviation_hard_deviation_bps protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_tunnel_proto_init() - md_TSSPacketContent = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("TSSPacketContent") - fd_TSSPacketContent_signing_id = md_TSSPacketContent.Fields().ByName("signing_id") - fd_TSSPacketContent_destination_chain_id = md_TSSPacketContent.Fields().ByName("destination_chain_id") - fd_TSSPacketContent_destination_contract_address = md_TSSPacketContent.Fields().ByName("destination_contract_address") + md_SignalDeviation = File_band_tunnel_v1beta1_tunnel_proto.Messages().ByName("SignalDeviation") + fd_SignalDeviation_signal_id = md_SignalDeviation.Fields().ByName("signal_id") + fd_SignalDeviation_soft_deviation_bps = md_SignalDeviation.Fields().ByName("soft_deviation_bps") + fd_SignalDeviation_hard_deviation_bps = md_SignalDeviation.Fields().ByName("hard_deviation_bps") } -var _ protoreflect.Message = (*fastReflection_TSSPacketContent)(nil) +var _ protoreflect.Message = (*fastReflection_SignalDeviation)(nil) -type fastReflection_TSSPacketContent TSSPacketContent +type fastReflection_SignalDeviation SignalDeviation -func (x *TSSPacketContent) ProtoReflect() protoreflect.Message { - return (*fastReflection_TSSPacketContent)(x) +func (x *SignalDeviation) ProtoReflect() protoreflect.Message { + return (*fastReflection_SignalDeviation)(x) } -func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7] +func (x *SignalDeviation) slowProtoReflect() protoreflect.Message { + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4869,43 +3869,43 @@ func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_TSSPacketContent_messageType fastReflection_TSSPacketContent_messageType -var _ protoreflect.MessageType = fastReflection_TSSPacketContent_messageType{} +var _fastReflection_SignalDeviation_messageType fastReflection_SignalDeviation_messageType +var _ protoreflect.MessageType = fastReflection_SignalDeviation_messageType{} -type fastReflection_TSSPacketContent_messageType struct{} +type fastReflection_SignalDeviation_messageType struct{} -func (x fastReflection_TSSPacketContent_messageType) Zero() protoreflect.Message { - return (*fastReflection_TSSPacketContent)(nil) +func (x fastReflection_SignalDeviation_messageType) Zero() protoreflect.Message { + return (*fastReflection_SignalDeviation)(nil) } -func (x fastReflection_TSSPacketContent_messageType) New() protoreflect.Message { - return new(fastReflection_TSSPacketContent) +func (x fastReflection_SignalDeviation_messageType) New() protoreflect.Message { + return new(fastReflection_SignalDeviation) } -func (x fastReflection_TSSPacketContent_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TSSPacketContent +func (x fastReflection_SignalDeviation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SignalDeviation } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_TSSPacketContent) Descriptor() protoreflect.MessageDescriptor { - return md_TSSPacketContent +func (x *fastReflection_SignalDeviation) Descriptor() protoreflect.MessageDescriptor { + return md_SignalDeviation } // 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_TSSPacketContent) Type() protoreflect.MessageType { - return _fastReflection_TSSPacketContent_messageType +func (x *fastReflection_SignalDeviation) Type() protoreflect.MessageType { + return _fastReflection_SignalDeviation_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_TSSPacketContent) New() protoreflect.Message { - return new(fastReflection_TSSPacketContent) +func (x *fastReflection_SignalDeviation) New() protoreflect.Message { + return new(fastReflection_SignalDeviation) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_TSSPacketContent) Interface() protoreflect.ProtoMessage { - return (*TSSPacketContent)(x) +func (x *fastReflection_SignalDeviation) Interface() protoreflect.ProtoMessage { + return (*SignalDeviation)(x) } // Range iterates over every populated field in an undefined order, @@ -4913,22 +3913,22 @@ func (x *fastReflection_TSSPacketContent) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_TSSPacketContent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SigningId != uint64(0) { - value := protoreflect.ValueOfUint64(x.SigningId) - if !f(fd_TSSPacketContent_signing_id, value) { +func (x *fastReflection_SignalDeviation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SignalId != "" { + value := protoreflect.ValueOfString(x.SignalId) + if !f(fd_SignalDeviation_signal_id, value) { return } } - if x.DestinationChainId != "" { - value := protoreflect.ValueOfString(x.DestinationChainId) - if !f(fd_TSSPacketContent_destination_chain_id, value) { + if x.SoftDeviationBps != uint64(0) { + value := protoreflect.ValueOfUint64(x.SoftDeviationBps) + if !f(fd_SignalDeviation_soft_deviation_bps, value) { return } } - if x.DestinationContractAddress != "" { - value := protoreflect.ValueOfString(x.DestinationContractAddress) - if !f(fd_TSSPacketContent_destination_contract_address, value) { + if x.HardDeviationBps != uint64(0) { + value := protoreflect.ValueOfUint64(x.HardDeviationBps) + if !f(fd_SignalDeviation_hard_deviation_bps, value) { return } } @@ -4945,19 +3945,19 @@ func (x *fastReflection_TSSPacketContent) Range(f func(protoreflect.FieldDescrip // 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_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_SignalDeviation) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": - return x.SigningId != uint64(0) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - return x.DestinationChainId != "" - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - return x.DestinationContractAddress != "" + case "band.tunnel.v1beta1.SignalDeviation.signal_id": + return x.SignalId != "" + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + return x.SoftDeviationBps != uint64(0) + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + return x.HardDeviationBps != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) } } @@ -4967,19 +3967,19 @@ func (x *fastReflection_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_SignalDeviation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": - x.SigningId = uint64(0) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - x.DestinationChainId = "" - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - x.DestinationContractAddress = "" + case "band.tunnel.v1beta1.SignalDeviation.signal_id": + x.SignalId = "" + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + x.SoftDeviationBps = uint64(0) + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + x.HardDeviationBps = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) } } @@ -4989,22 +3989,22 @@ func (x *fastReflection_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) // 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_TSSPacketContent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SignalDeviation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": - value := x.SigningId - return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - value := x.DestinationChainId - return protoreflect.ValueOfString(value) - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - value := x.DestinationContractAddress + case "band.tunnel.v1beta1.SignalDeviation.signal_id": + value := x.SignalId return protoreflect.ValueOfString(value) + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + value := x.SoftDeviationBps + return protoreflect.ValueOfUint64(value) + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + value := x.HardDeviationBps + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", descriptor.FullName())) } } @@ -5018,19 +4018,19 @@ func (x *fastReflection_TSSPacketContent) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_SignalDeviation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": - x.SigningId = value.Uint() - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - x.DestinationChainId = value.Interface().(string) - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - x.DestinationContractAddress = value.Interface().(string) + case "band.tunnel.v1beta1.SignalDeviation.signal_id": + x.SignalId = value.Interface().(string) + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + x.SoftDeviationBps = value.Uint() + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + x.HardDeviationBps = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation does not contain field %s", fd.FullName())) } } @@ -5044,48 +4044,48 @@ func (x *fastReflection_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSPacketContent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SignalDeviation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": - panic(fmt.Errorf("field signing_id of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - panic(fmt.Errorf("field destination_chain_id of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - panic(fmt.Errorf("field destination_contract_address of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) + case "band.tunnel.v1beta1.SignalDeviation.signal_id": + panic(fmt.Errorf("field signal_id of message band.tunnel.v1beta1.SignalDeviation is not mutable")) + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + panic(fmt.Errorf("field soft_deviation_bps of message band.tunnel.v1beta1.SignalDeviation is not mutable")) + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + panic(fmt.Errorf("field hard_deviation_bps of message band.tunnel.v1beta1.SignalDeviation is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation 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_TSSPacketContent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SignalDeviation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - return protoreflect.ValueOfString("") - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": + case "band.tunnel.v1beta1.SignalDeviation.signal_id": return protoreflect.ValueOfString("") + case "band.tunnel.v1beta1.SignalDeviation.soft_deviation_bps": + return protoreflect.ValueOfUint64(uint64(0)) + case "band.tunnel.v1beta1.SignalDeviation.hard_deviation_bps": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.SignalDeviation")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.SignalDeviation 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_TSSPacketContent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_SignalDeviation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSPacketContent", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.SignalDeviation", d.FullName())) } panic("unreachable") } @@ -5093,7 +4093,7 @@ func (x *fastReflection_TSSPacketContent) WhichOneof(d protoreflect.OneofDescrip // 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_TSSPacketContent) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_SignalDeviation) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5104,7 +4104,7 @@ func (x *fastReflection_TSSPacketContent) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSPacketContent) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_SignalDeviation) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5116,7 +4116,7 @@ func (x *fastReflection_TSSPacketContent) SetUnknown(fields protoreflect.RawFiel // 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_TSSPacketContent) IsValid() bool { +func (x *fastReflection_SignalDeviation) IsValid() bool { return x != nil } @@ -5126,9 +4126,9 @@ func (x *fastReflection_TSSPacketContent) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_SignalDeviation) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TSSPacketContent) + x := input.Message.Interface().(*SignalDeviation) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5140,16 +4140,15 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.SigningId != 0 { - n += 1 + runtime.Sov(uint64(x.SigningId)) - } - l = len(x.DestinationChainId) + l = len(x.SignalId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.DestinationContractAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.SoftDeviationBps != 0 { + n += 1 + runtime.Sov(uint64(x.SoftDeviationBps)) + } + if x.HardDeviationBps != 0 { + n += 1 + runtime.Sov(uint64(x.HardDeviationBps)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -5161,7 +4160,7 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TSSPacketContent) + x := input.Message.Interface().(*SignalDeviation) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5180,24 +4179,22 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.DestinationContractAddress) > 0 { - i -= len(x.DestinationContractAddress) - copy(dAtA[i:], x.DestinationContractAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) + if x.HardDeviationBps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.HardDeviationBps)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x18 } - if len(x.DestinationChainId) > 0 { - i -= len(x.DestinationChainId) - copy(dAtA[i:], x.DestinationChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) + if x.SoftDeviationBps != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.SoftDeviationBps)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if x.SigningId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SigningId)) + if len(x.SignalId) > 0 { + i -= len(x.SignalId) + copy(dAtA[i:], x.SignalId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SignalId))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -5210,7 +4207,7 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TSSPacketContent) + x := input.Message.Interface().(*SignalDeviation) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5242,66 +4239,15 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketContent: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignalDeviation: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SignalDeviation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SigningId", wireType) - } - x.SigningId = 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.SigningId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignalId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5315,225 +4261,107 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { 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.DestinationContractAddress = 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: band/tunnel/v1beta1/tunnel.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) -) - -// TSSRoute is the type for a TSS route -type TSSRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // destination_chain_id is the destination chain ID - DestinationChainId string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` -} - -func (x *TSSRoute) Reset() { - *x = TSSRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TSSRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TSSRoute) ProtoMessage() {} - -// Deprecated: Use TSSRoute.ProtoReflect.Descriptor instead. -func (*TSSRoute) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} -} - -func (x *TSSRoute) GetDestinationChainId() string { - if x != nil { - return x.DestinationChainId - } - return "" -} - -func (x *TSSRoute) GetDestinationContractAddress() string { - if x != nil { - return x.DestinationContractAddress - } - return "" -} - -// SignalDeviation is the type for a signal with soft and hard deviation -type SignalDeviation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // signal_id is the signal ID - SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - // soft_deviation_bps is the soft deviation in basis points - SoftDeviationBps uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` - // hard_deviation_bps is the hard deviation in basis points - HardDeviationBps uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` -} - -func (x *SignalDeviation) Reset() { - *x = SignalDeviation{} - if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignalDeviation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignalDeviation) ProtoMessage() {} - -// Deprecated: Use SignalDeviation.ProtoReflect.Descriptor instead. -func (*SignalDeviation) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{1} -} - -func (x *SignalDeviation) GetSignalId() string { - if x != nil { - return x.SignalId - } - return "" -} - -func (x *SignalDeviation) GetSoftDeviationBps() uint64 { - if x != nil { - return x.SoftDeviationBps - } - return 0 -} - -func (x *SignalDeviation) GetHardDeviationBps() uint64 { - if x != nil { - return x.HardDeviationBps - } - return 0 -} - -// Deposit defines an amount deposited by an account address to the tunnel. -type Deposit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // tunnel_id defines the unique id of the tunnel. - TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // depositor defines the deposit addresses from the proposals. - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` - // amount to be deposited by depositor. - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` -} + 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.SignalId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBps", wireType) + } + x.SoftDeviationBps = 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.SoftDeviationBps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBps", wireType) + } + x.HardDeviationBps = 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.HardDeviationBps |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 + } + } -func (x *Deposit) Reset() { - *x = Deposit{} - if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } -} - -func (x *Deposit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Deposit) ProtoMessage() {} - -// Deprecated: Use Deposit.ProtoReflect.Descriptor instead. -func (*Deposit) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{2} -} - -func (x *Deposit) GetTunnelId() uint64 { - if x != nil { - return x.TunnelId + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, } - return 0 } -func (x *Deposit) GetDepositor() string { - if x != nil { - return x.Depositor - } - return "" -} +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: band/tunnel/v1beta1/tunnel.proto -func (x *Deposit) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} +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) +) // Tunnel contains the information of the tunnel that is created by the user type Tunnel struct { @@ -5568,7 +4396,7 @@ type Tunnel struct { func (x *Tunnel) Reset() { *x = Tunnel{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[3] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5582,7 +4410,7 @@ func (*Tunnel) ProtoMessage() {} // Deprecated: Use Tunnel.ProtoReflect.Descriptor instead. func (*Tunnel) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{3} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{0} } func (x *Tunnel) GetId() uint64 { @@ -5679,7 +4507,7 @@ type LatestPrices struct { func (x *LatestPrices) Reset() { *x = LatestPrices{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5693,7 +4521,7 @@ func (*LatestPrices) ProtoMessage() {} // Deprecated: Use LatestPrices.ProtoReflect.Descriptor instead. func (*LatestPrices) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{4} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{1} } func (x *LatestPrices) GetTunnelId() uint64 { @@ -5730,7 +4558,7 @@ type TotalFees struct { func (x *TotalFees) Reset() { *x = TotalFees{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5744,7 +4572,7 @@ func (*TotalFees) ProtoMessage() {} // Deprecated: Use TotalFees.ProtoReflect.Descriptor instead. func (*TotalFees) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{5} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{2} } func (x *TotalFees) GetTotalPacketFee() []*v1beta1.Coin { @@ -5779,7 +4607,7 @@ type Packet struct { func (x *Packet) Reset() { *x = Packet{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5793,7 +4621,7 @@ func (*Packet) ProtoMessage() {} // Deprecated: Use Packet.ProtoReflect.Descriptor instead. func (*Packet) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{6} + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{3} } func (x *Packet) GetTunnelId() uint64 { @@ -5845,61 +4673,116 @@ func (x *Packet) GetCreatedAt() int64 { return 0 } -// TSSPacketContent is the packet content for TSS -type TSSPacketContent struct { +// Deposit defines an amount deposited by an account address to the tunnel. +type Deposit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // signing_id is the signing ID - SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` - // destination_chain_id is the destination chain ID - DestinationChainId string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` + // tunnel_id defines the unique id of the tunnel. + TunnelId uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // depositor defines the deposit addresses from the proposals. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` + // amount to be deposited by depositor. + Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` } -func (x *TSSPacketContent) Reset() { - *x = TSSPacketContent{} +func (x *Deposit) Reset() { + *x = Deposit{} if protoimpl.UnsafeEnabled { - mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7] + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TSSPacketContent) String() string { +func (x *Deposit) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TSSPacketContent) ProtoMessage() {} +func (*Deposit) ProtoMessage() {} -// Deprecated: Use TSSPacketContent.ProtoReflect.Descriptor instead. -func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{7} +// Deprecated: Use Deposit.ProtoReflect.Descriptor instead. +func (*Deposit) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{4} } -func (x *TSSPacketContent) GetSigningId() uint64 { +func (x *Deposit) GetTunnelId() uint64 { if x != nil { - return x.SigningId + return x.TunnelId } return 0 } -func (x *TSSPacketContent) GetDestinationChainId() string { +func (x *Deposit) GetDepositor() string { if x != nil { - return x.DestinationChainId + return x.Depositor } return "" } -func (x *TSSPacketContent) GetDestinationContractAddress() string { +func (x *Deposit) GetAmount() []*v1beta1.Coin { + if x != nil { + return x.Amount + } + return nil +} + +// SignalDeviation is the type for a signal with soft and hard deviation +type SignalDeviation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signal_id is the signal ID + SignalId string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // soft_deviation_bps is the soft deviation in basis points + SoftDeviationBps uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` + // hard_deviation_bps is the hard deviation in basis points + HardDeviationBps uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` +} + +func (x *SignalDeviation) Reset() { + *x = SignalDeviation{} + if protoimpl.UnsafeEnabled { + mi := &file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignalDeviation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignalDeviation) ProtoMessage() {} + +// Deprecated: Use SignalDeviation.ProtoReflect.Descriptor instead. +func (*SignalDeviation) Descriptor() ([]byte, []int) { + return file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP(), []int{5} +} + +func (x *SignalDeviation) GetSignalId() string { if x != nil { - return x.DestinationContractAddress + return x.SignalId } return "" } +func (x *SignalDeviation) GetSoftDeviationBps() uint64 { + if x != nil { + return x.SoftDeviationBps + } + return 0 +} + +func (x *SignalDeviation) GetHardDeviationBps() uint64 { + if x != nil { + return x.HardDeviationBps + } + return 0 +} + var File_band_tunnel_v1beta1_tunnel_proto protoreflect.FileDescriptor var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ @@ -5916,161 +4799,132 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x54, 0x53, 0x53, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, - 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0xca, 0x01, 0x0a, 0x0f, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, - 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x12, 0x73, 0x6f, - 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, 0x6f, 0x66, 0x74, - 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x73, 0x6f, - 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, 0x42, - 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, - 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, - 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, - 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x04, 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x06, 0xe2, + 0xde, 0x1f, 0x02, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, + 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, 0x0a, 0xca, 0xb4, 0x2d, 0x06, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x35, 0x0a, + 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, + 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, 0x6e, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x08, 0x66, 0x65, 0x65, 0x50, 0x61, 0x79, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x11, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x18, 0x08, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc4, 0x04, 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x06, - 0xe2, 0xde, 0x1f, 0x02, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, - 0x03, 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, 0x0a, 0xca, 0xb4, 0x2d, - 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x35, - 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1b, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x52, 0x07, 0x65, 0x6e, - 0x63, 0x6f, 0x64, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, 0x79, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x08, 0x66, 0x65, 0x65, 0x50, 0x61, 0x79, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x11, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x12, 0x75, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x18, 0x08, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x9d, - 0x01, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, - 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, - 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, + 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x07, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x9d, 0x01, + 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x29, + 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, + 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, + 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x88, 0x01, + 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, + 0x01, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, + 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x88, - 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x66, 0x65, 0x65, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, + 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x46, 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, 0x03, 0x0a, 0x06, 0x50, 0x61, - 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, - 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, - 0x65, 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x68, 0x0a, - 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x08, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x9e, 0x02, 0x0a, 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, - 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, - 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, - 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, - 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, - 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, - 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, - 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x68, 0x0a, 0x09, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, + 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x08, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x03, 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, + 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, + 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, + 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, + 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, + 0x01, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, + 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, + 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6085,33 +4939,31 @@ func file_band_tunnel_v1beta1_tunnel_proto_rawDescGZIP() []byte { return file_band_tunnel_v1beta1_tunnel_proto_rawDescData } -var file_band_tunnel_v1beta1_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_band_tunnel_v1beta1_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_band_tunnel_v1beta1_tunnel_proto_goTypes = []interface{}{ - (*TSSRoute)(nil), // 0: band.tunnel.v1beta1.TSSRoute - (*SignalDeviation)(nil), // 1: band.tunnel.v1beta1.SignalDeviation - (*Deposit)(nil), // 2: band.tunnel.v1beta1.Deposit - (*Tunnel)(nil), // 3: band.tunnel.v1beta1.Tunnel - (*LatestPrices)(nil), // 4: band.tunnel.v1beta1.LatestPrices - (*TotalFees)(nil), // 5: band.tunnel.v1beta1.TotalFees - (*Packet)(nil), // 6: band.tunnel.v1beta1.Packet - (*TSSPacketContent)(nil), // 7: band.tunnel.v1beta1.TSSPacketContent - (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 9: google.protobuf.Any - (v1beta11.Encoder)(0), // 10: band.feeds.v1beta1.Encoder - (*v1beta11.Price)(nil), // 11: band.feeds.v1beta1.Price + (*Tunnel)(nil), // 0: band.tunnel.v1beta1.Tunnel + (*LatestPrices)(nil), // 1: band.tunnel.v1beta1.LatestPrices + (*TotalFees)(nil), // 2: band.tunnel.v1beta1.TotalFees + (*Packet)(nil), // 3: band.tunnel.v1beta1.Packet + (*Deposit)(nil), // 4: band.tunnel.v1beta1.Deposit + (*SignalDeviation)(nil), // 5: band.tunnel.v1beta1.SignalDeviation + (*anypb.Any)(nil), // 6: google.protobuf.Any + (v1beta11.Encoder)(0), // 7: band.feeds.v1beta1.Encoder + (*v1beta1.Coin)(nil), // 8: cosmos.base.v1beta1.Coin + (*v1beta11.Price)(nil), // 9: band.feeds.v1beta1.Price } var file_band_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ - 8, // 0: band.tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin - 9, // 1: band.tunnel.v1beta1.Tunnel.route:type_name -> google.protobuf.Any - 10, // 2: band.tunnel.v1beta1.Tunnel.encoder:type_name -> band.feeds.v1beta1.Encoder - 1, // 3: band.tunnel.v1beta1.Tunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation - 8, // 4: band.tunnel.v1beta1.Tunnel.total_deposit:type_name -> cosmos.base.v1beta1.Coin - 11, // 5: band.tunnel.v1beta1.LatestPrices.prices:type_name -> band.feeds.v1beta1.Price - 8, // 6: band.tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin - 11, // 7: band.tunnel.v1beta1.Packet.prices:type_name -> band.feeds.v1beta1.Price - 9, // 8: band.tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any - 8, // 9: band.tunnel.v1beta1.Packet.base_fee:type_name -> cosmos.base.v1beta1.Coin - 8, // 10: band.tunnel.v1beta1.Packet.route_fee:type_name -> cosmos.base.v1beta1.Coin + 6, // 0: band.tunnel.v1beta1.Tunnel.route:type_name -> google.protobuf.Any + 7, // 1: band.tunnel.v1beta1.Tunnel.encoder:type_name -> band.feeds.v1beta1.Encoder + 5, // 2: band.tunnel.v1beta1.Tunnel.signal_deviations:type_name -> band.tunnel.v1beta1.SignalDeviation + 8, // 3: band.tunnel.v1beta1.Tunnel.total_deposit:type_name -> cosmos.base.v1beta1.Coin + 9, // 4: band.tunnel.v1beta1.LatestPrices.prices:type_name -> band.feeds.v1beta1.Price + 8, // 5: band.tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin + 9, // 6: band.tunnel.v1beta1.Packet.prices:type_name -> band.feeds.v1beta1.Price + 6, // 7: band.tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any + 8, // 8: band.tunnel.v1beta1.Packet.base_fee:type_name -> cosmos.base.v1beta1.Coin + 8, // 9: band.tunnel.v1beta1.Packet.route_fee:type_name -> cosmos.base.v1beta1.Coin + 8, // 10: band.tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin 11, // [11:11] is the sub-list for method output_type 11, // [11:11] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name @@ -6126,7 +4978,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { } if !protoimpl.UnsafeEnabled { file_band_tunnel_v1beta1_tunnel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TSSRoute); i { + switch v := v.(*Tunnel); i { case 0: return &v.state case 1: @@ -6138,7 +4990,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { } } file_band_tunnel_v1beta1_tunnel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignalDeviation); i { + switch v := v.(*LatestPrices); i { case 0: return &v.state case 1: @@ -6150,7 +5002,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { } } file_band_tunnel_v1beta1_tunnel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Deposit); i { + switch v := v.(*TotalFees); i { case 0: return &v.state case 1: @@ -6162,7 +5014,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { } } file_band_tunnel_v1beta1_tunnel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tunnel); i { + switch v := v.(*Packet); i { case 0: return &v.state case 1: @@ -6174,7 +5026,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { } } file_band_tunnel_v1beta1_tunnel_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LatestPrices); i { + switch v := v.(*Deposit); i { case 0: return &v.state case 1: @@ -6186,31 +5038,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { } } file_band_tunnel_v1beta1_tunnel_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TotalFees); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_band_tunnel_v1beta1_tunnel_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Packet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_band_tunnel_v1beta1_tunnel_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TSSPacketContent); i { + switch v := v.(*SignalDeviation); i { case 0: return &v.state case 1: @@ -6228,7 +5056,7 @@ func file_band_tunnel_v1beta1_tunnel_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_band_tunnel_v1beta1_tunnel_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/band/tunnel/v1beta1/route.proto b/proto/band/tunnel/v1beta1/route.proto new file mode 100644 index 000000000..297d86209 --- /dev/null +++ b/proto/band/tunnel/v1beta1/route.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; +package band.tunnel.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; +option (gogoproto.equal_all) = true; + +// TSSRoute is the type for a TSS route +message TSSRoute { + option (cosmos_proto.implements_interface) = "RouteI"; + + // destination_chain_id is the destination chain ID + string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; + // destination_contract_address is the destination contract address + string destination_contract_address = 2; +} + +// TSSPacketContent is the packet content for TSS +message TSSPacketContent { + option (cosmos_proto.implements_interface) = "PacketContentI"; + + // signing_id is the signing ID + uint64 signing_id = 1 [ + (gogoproto.customname) = "SigningID", + (gogoproto.casttype) = "github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" + ]; + // destination_chain_id is the destination chain ID + string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; + // destination_contract_address is the destination contract address + string destination_contract_address = 3; +} diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index 5c2faa645..39f0bbdee 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -12,44 +12,6 @@ import "band/feeds/v1beta1/feeds.proto"; option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; option (gogoproto.equal_all) = true; -// TSSRoute is the type for a TSS route -message TSSRoute { - option (cosmos_proto.implements_interface) = "RouteI"; - - // destination_chain_id is the destination chain ID - string destination_chain_id = 1 [(gogoproto.customname) = "DestinationChainID"]; - // destination_contract_address is the destination contract address - string destination_contract_address = 2; -} - -// SignalDeviation is the type for a signal with soft and hard deviation -message SignalDeviation { - option (gogoproto.equal) = true; - - // signal_id is the signal ID - string signal_id = 1 [(gogoproto.customname) = "SignalID"]; - // soft_deviation_bps is the soft deviation in basis points - uint64 soft_deviation_bps = 2 [(gogoproto.customname) = "SoftDeviationBPS"]; - // hard_deviation_bps is the hard deviation in basis points - uint64 hard_deviation_bps = 3 [(gogoproto.customname) = "HardDeviationBPS"]; -} - -// Deposit defines an amount deposited by an account address to the tunnel. -message Deposit { - option (gogoproto.equal) = true; - - // tunnel_id defines the unique id of the tunnel. - uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (amino.dont_omitempty) = true - ]; -} - // Tunnel contains the information of the tunnel that is created by the user message Tunnel { option (gogoproto.equal) = true; @@ -123,17 +85,30 @@ message Packet { int64 created_at = 7; } -// TSSPacketContent is the packet content for TSS -message TSSPacketContent { - option (cosmos_proto.implements_interface) = "PacketContentI"; +// Deposit defines an amount deposited by an account address to the tunnel. +message Deposit { + option (gogoproto.equal) = true; - // signing_id is the signing ID - uint64 signing_id = 1 [ - (gogoproto.customname) = "SigningID", - (gogoproto.casttype) = "github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" + // tunnel_id defines the unique id of the tunnel. + uint64 tunnel_id = 1 [(gogoproto.customname) = "TunnelID"]; + // depositor defines the deposit addresses from the proposals. + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount to be deposited by depositor. + repeated cosmos.base.v1beta1.Coin amount = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (amino.dont_omitempty) = true ]; - // destination_chain_id is the destination chain ID - string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; - // destination_contract_address is the destination contract address - string destination_contract_address = 3; +} + +// SignalDeviation is the type for a signal with soft and hard deviation +message SignalDeviation { + option (gogoproto.equal) = true; + + // signal_id is the signal ID + string signal_id = 1 [(gogoproto.customname) = "SignalID"]; + // soft_deviation_bps is the soft deviation in basis points + uint64 soft_deviation_bps = 2 [(gogoproto.customname) = "SoftDeviationBPS"]; + // hard_deviation_bps is the hard deviation in basis points + uint64 hard_deviation_bps = 3 [(gogoproto.customname) = "HardDeviationBPS"]; } diff --git a/x/tunnel/README.md b/x/tunnel/README.md index 095f29114..0b83c87cb 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -36,10 +36,13 @@ The Tunnel module is designed to decentralize the creation of push-based price d - [Events](#events) - [Event: `create_tunnel`](#event-create_tunnel) - [Event: `update_and_reset_tunnel`](#event-update_and_reset_tunnel) - - [Event: `activate`](#event-activate) - - [Event: `deactivate`](#event-deactivate) + - [Event: `activate_tunnel`](#event-activate_tunnel) + - [Event: `deactivate_tunnel`](#event-deactivate_tunnel) - [Event: `trigger_tunnel`](#event-trigger_tunnel) - [Event: `produce_packet_fail`](#event-produce_packet_fail) + - [Event: `produce_packet_success`](#event-produce_packet_success) + - [Event: `deposit_to_tunnel`](#event-deposit_to_tunnel) + - [Event: `withdraw_from_tunnel`](#event-withdraw_from_tunnel) - [Clients](#clients) - [CLI Commands](#cli-commands) - [Query Commands](#query-commands) @@ -405,7 +408,7 @@ This event is emitted when an existing tunnel is edited. | soft_deviation_bps[] | `{SignalDeviation.SoftDeviationBPS}}` | | hard_deviation_bps[] | `{SignalDeviation.hardDeviationBPS}}` | -### Event: `activate` +### Event: `activate_tunnel` This event is emitted when a tunnel is activated. @@ -414,7 +417,7 @@ This event is emitted when a tunnel is activated. | tunnel_id | `{ID}` | | is_active | `true` | -### Event: `deactivate` +### Event: `deactivate_tunnel` This event is emitted when a tunnel is deactivated. @@ -441,6 +444,35 @@ This event is emitted when the tunnel fails to produce a packet. | tunnel_id | `{ID}` | | reason | `{err.Error()}` | +### Event: `produce_packet_success` + +This event is emitted when the tunnel successes to produce a packet. + +| Attribute Key | Attribute Value | +| ------------- | ------------------- | +| tunnel_id | `{ID}` | +| sequence | `{packet.Sequence}` | + +### Event: `deposit_to_tunnel` + +This event is emitted when a deposit is made to the tunnel. + +| Attribute Key | Attribute Value | +| ------------- | -------------------------- | +| tunnel_id | `{tunnelID}` | +| depositor | `{depositor.String()}` | +| amount | `{depositAmount.String()}` | + +### Event: `withdraw_from_tunnel` + +This event is emitted when a withdrawal deposit is made to the tunnel. + +| Attribute Key | Attribute Value | +| ------------- | -------------------------- | +| tunnel_id | `{tunnelID}` | +| depositor | `{depositor.String()}` | +| amount | `{depositAmount.String()}` | + ## Clients Users can interact with the `x/tunnel` module via the Command-Line Interface (CLI). The CLI allows for querying tunnel states and performing various operations. diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 6174b7a26..90056fcea 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -49,7 +49,7 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { k.SetModuleAccount(ctx, moduleAcc) } - totalBalance := totalDeposits.Add(data.TotalFees.TotalPacketFee...) + totalBalance := totalDeposits.Add(data.TotalFees.Total()...) if !balance.Equal(totalBalance) { panic("balance in the module account is not equal to the sum of total fees and total deposits") } diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index fd46b5594..64c2e01fe 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -24,30 +24,30 @@ func TestValidateGenesis(t *testing.T) { }{ "length of tunnels does not match tunnel count": { genesis: &types.GenesisState{ + TunnelCount: 2, Tunnels: []types.Tunnel{ {ID: 1}, }, - TunnelCount: 2, }, requireErr: true, errMsg: "length of tunnels does not match tunnel count", }, "tunnel count mismatch in tunnels": { genesis: &types.GenesisState{ + TunnelCount: 1, Tunnels: []types.Tunnel{ {ID: 3}, }, - TunnelCount: 1, }, requireErr: true, errMsg: "tunnel count mismatch in tunnels", }, "invalid total fees": { genesis: &types.GenesisState{ + TunnelCount: 1, Tunnels: []types.Tunnel{ {ID: 1}, }, - TunnelCount: 1, TotalFees: types.TotalFees{ TotalPacketFee: sdk.Coins{ {Denom: "uband", Amount: sdkmath.NewInt(-100)}, @@ -57,16 +57,46 @@ func TestValidateGenesis(t *testing.T) { requireErr: true, errMsg: "invalid total fees", }, - "all good": { + "deposits mismatch total deposit for tunnel": { genesis: &types.GenesisState{ + TunnelCount: 1, Tunnels: []types.Tunnel{ - {ID: 1}, - {ID: 2}, + {ID: 1, TotalDeposit: sdk.NewCoins()}, }, + TotalFees: types.TotalFees{}, + Deposits: []types.Deposit{ + { + TunnelID: 1, + Depositor: sdk.AccAddress("account1").String(), + Amount: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + }, + }, + }, + requireErr: true, + errMsg: "deposits mismatch total deposit for tunnel", + }, + "all good": { + genesis: &types.GenesisState{ TunnelCount: 2, + Tunnels: []types.Tunnel{ + {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100)))}, + {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100)))}, + }, TotalFees: types.TotalFees{ TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), }, + Deposits: []types.Deposit{ + { + TunnelID: 1, + Depositor: sdk.AccAddress("account1").String(), + Amount: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + }, + { + TunnelID: 2, + Depositor: sdk.AccAddress("account2").String(), + Amount: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), + }, + }, Params: types.DefaultParams(), }, requireErr: false, diff --git a/x/tunnel/keeper/helper.go b/x/tunnel/keeper/helper.go index cd6a26583..199e96ca3 100644 --- a/x/tunnel/keeper/helper.go +++ b/x/tunnel/keeper/helper.go @@ -13,7 +13,7 @@ func GenerateNewPrices( latestPricesMap map[string]feedstypes.Price, feedsPricesMap map[string]feedstypes.Price, sendAll bool, -) ([]feedstypes.Price, error) { +) []feedstypes.Price { shouldSend := false newFeedPrices := make([]feedstypes.Price, 0) @@ -41,8 +41,8 @@ func GenerateNewPrices( } if shouldSend { - return newFeedPrices, nil + return newFeedPrices } else { - return []feedstypes.Price{}, nil + return []feedstypes.Price{} } } diff --git a/x/tunnel/keeper/helper_test.go b/x/tunnel/keeper/helper_test.go index 96ca97229..a3174d1ec 100644 --- a/x/tunnel/keeper/helper_test.go +++ b/x/tunnel/keeper/helper_test.go @@ -29,13 +29,12 @@ func (s *KeeperTestSuite) TestGeneratePricesSendAll() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestPrices(ctx, latestPrices) - newPrices, err := keeper.GenerateNewPrices( + newPrices := keeper.GenerateNewPrices( tunnel.SignalDeviations, latestPricesMap, pricesMap, sendAll, ) - s.Require().NoError(err) s.Require().Len(newPrices, 1) } @@ -64,13 +63,12 @@ func (s *KeeperTestSuite) TestGeneratePricesMeetHardDeviation() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestPrices(ctx, latestPrices) - newPrices, err := keeper.GenerateNewPrices( + newPrices := keeper.GenerateNewPrices( tunnel.SignalDeviations, latestPricesMap, pricesMap, sendAll, ) - s.Require().NoError(err) s.Require().Len(newPrices, 2) } @@ -99,12 +97,11 @@ func (s *KeeperTestSuite) TestGeneratePricesNotMeetHardDeviation() { s.keeper.SetTunnel(ctx, tunnel) s.keeper.SetLatestPrices(ctx, latestPrices) - newPrices, err := keeper.GenerateNewPrices( + newPrices := keeper.GenerateNewPrices( tunnel.SignalDeviations, latestPricesMap, pricesMap, sendAll, ) - s.Require().NoError(err) s.Require().Len(newPrices, 0) } diff --git a/x/tunnel/keeper/keeper_deposit.go b/x/tunnel/keeper/keeper_deposit.go index 16510cf6b..815c30059 100644 --- a/x/tunnel/keeper/keeper_deposit.go +++ b/x/tunnel/keeper/keeper_deposit.go @@ -163,7 +163,12 @@ func (k Keeper) WithdrawFromTunnel( // deactivate the tunnel if the total deposit is less than the min deposit minDeposit := k.GetParams(ctx).MinDeposit if tunnel.IsActive && !tunnel.TotalDeposit.IsAllGTE(minDeposit) { - k.MustDeactivateTunnel(ctx, tunnelID) + // deactivate the tunnel if the total deposit is less than the min deposit + // error should not happen here since the tunnel is already validated + err := k.DeactivateTunnel(ctx, tunnelID) + if err != nil { + return err + } } ctx.EventManager().EmitEvent(sdk.NewEvent( diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index 220a19713..db96afc25 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -56,7 +56,7 @@ func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, sequence uint64) } // ProduceActiveTunnelPackets generates packets and sends packets to the destination route for all active tunnels -func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { +func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) error { // get active tunnel IDs ids := k.GetActiveTunnelIDs(ctx) @@ -65,12 +65,20 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { // create new packet if possible for active tunnels. If not enough fund, deactivate the tunnel. for _, id := range ids { + // check if the tunnel has enough fund to create a packet + // error should not happen here since the tunnel is already validated ok, err := k.HasEnoughFundToCreatePacket(ctx, id) if err != nil { - continue + return err } if !ok { - k.MustDeactivateTunnel(ctx, id) + // deactivate the tunnel if not enough fund + // error should not happen here since the tunnel is already validated + err := k.DeactivateTunnel(ctx, id) + if err != nil { + return err + } + continue } @@ -87,6 +95,8 @@ func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) { )) } } + + return nil } // ProducePacket generates a packet and sends it to the destination route @@ -113,10 +123,7 @@ func (k Keeper) ProducePacket( sendAll := unixNow >= int64(tunnel.Interval)+latestPrices.LastInterval // generate newPrices; if no newPrices, stop the process. - newPrices, err := GenerateNewPrices(tunnel.SignalDeviations, latestPricesMap, feedsPricesMap, sendAll) - if err != nil { - return err - } + newPrices := GenerateNewPrices(tunnel.SignalDeviations, latestPricesMap, feedsPricesMap, sendAll) if len(newPrices) == 0 { return nil } @@ -129,7 +136,7 @@ func (k Keeper) ProducePacket( // send packet if err := k.SendPacket(ctx, packet); err != nil { - return sdkerrors.Wrapf(err, "failed to create packet for tunnel %d", tunnel.ID) + return sdkerrors.Wrapf(err, "failed to send packet for tunnel %d", tunnel.ID) } // update latest price info. diff --git a/x/tunnel/keeper/keeper_tunnel.go b/x/tunnel/keeper/keeper_tunnel.go index 8119cee35..da5129797 100644 --- a/x/tunnel/keeper/keeper_tunnel.go +++ b/x/tunnel/keeper/keeper_tunnel.go @@ -241,13 +241,6 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { return nil } -// MustDeactivateTunnel deactivates a tunnel and panics if the tunnel does not exist -func (k Keeper) MustDeactivateTunnel(ctx sdk.Context, tunnelID uint64) { - if err := k.DeactivateTunnel(ctx, tunnelID); err != nil { - panic(err) - } -} - // SetTotalFees sets the total fees in the store func (k Keeper) SetTotalFees(ctx sdk.Context, totalFee types.TotalFees) { ctx.KVStore(k.storeKey).Set(types.TotalFeeStoreKey, k.cdc.MustMarshal(&totalFee)) diff --git a/x/tunnel/types/genesis.go b/x/tunnel/types/genesis.go index d2cfc4020..6ad6afcb4 100644 --- a/x/tunnel/types/genesis.go +++ b/x/tunnel/types/genesis.go @@ -78,3 +78,8 @@ func ValidateGenesis(data GenesisState) error { return data.Params.Validate() } + +// Total returns the total fees +func (tf TotalFees) Total() sdk.Coins { + return tf.TotalPacketFee +} diff --git a/x/tunnel/types/keys.go b/x/tunnel/types/keys.go index 54eff7627..a2b8dca32 100644 --- a/x/tunnel/types/keys.go +++ b/x/tunnel/types/keys.go @@ -24,7 +24,7 @@ const ( // QuerierRoute is the querier route for the tunnel module QuerierRoute = ModuleName - // PortID is the default port id that oracle module binds to. + // PortID is the default port id that tunnel module binds to. PortID = ModuleName ) diff --git a/x/tunnel/types/route.pb.go b/x/tunnel/types/route.pb.go new file mode 100644 index 000000000..9fc16ebc3 --- /dev/null +++ b/x/tunnel/types/route.pb.go @@ -0,0 +1,701 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: band/tunnel/v1beta1/route.proto + +package types + +import ( + fmt "fmt" + github_com_bandprotocol_chain_v3_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" + _ "github.com/cosmos/cosmos-proto" + _ "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 + +// TSSRoute is the type for a TSS route +type TSSRoute struct { + // destination_chain_id is the destination chain ID + DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (m *TSSRoute) Reset() { *m = TSSRoute{} } +func (m *TSSRoute) String() string { return proto.CompactTextString(m) } +func (*TSSRoute) ProtoMessage() {} +func (*TSSRoute) Descriptor() ([]byte, []int) { + return fileDescriptor_543238289d94b7a6, []int{0} +} +func (m *TSSRoute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TSSRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TSSRoute.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 *TSSRoute) XXX_Merge(src proto.Message) { + xxx_messageInfo_TSSRoute.Merge(m, src) +} +func (m *TSSRoute) XXX_Size() int { + return m.Size() +} +func (m *TSSRoute) XXX_DiscardUnknown() { + xxx_messageInfo_TSSRoute.DiscardUnknown(m) +} + +var xxx_messageInfo_TSSRoute proto.InternalMessageInfo + +func (m *TSSRoute) GetDestinationChainID() string { + if m != nil { + return m.DestinationChainID + } + return "" +} + +func (m *TSSRoute) GetDestinationContractAddress() string { + if m != nil { + return m.DestinationContractAddress + } + return "" +} + +// TSSPacketContent is the packet content for TSS +type TSSPacketContent struct { + // signing_id is the signing ID + SigningID github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" json:"signing_id,omitempty"` + // destination_chain_id is the destination chain ID + DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` + // destination_contract_address is the destination contract address + DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +} + +func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } +func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } +func (*TSSPacketContent) ProtoMessage() {} +func (*TSSPacketContent) Descriptor() ([]byte, []int) { + return fileDescriptor_543238289d94b7a6, []int{1} +} +func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TSSPacketContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TSSPacketContent.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 *TSSPacketContent) XXX_Merge(src proto.Message) { + xxx_messageInfo_TSSPacketContent.Merge(m, src) +} +func (m *TSSPacketContent) XXX_Size() int { + return m.Size() +} +func (m *TSSPacketContent) XXX_DiscardUnknown() { + xxx_messageInfo_TSSPacketContent.DiscardUnknown(m) +} + +var xxx_messageInfo_TSSPacketContent proto.InternalMessageInfo + +func (m *TSSPacketContent) GetSigningID() github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID { + if m != nil { + return m.SigningID + } + return 0 +} + +func (m *TSSPacketContent) GetDestinationChainID() string { + if m != nil { + return m.DestinationChainID + } + return "" +} + +func (m *TSSPacketContent) GetDestinationContractAddress() string { + if m != nil { + return m.DestinationContractAddress + } + return "" +} + +func init() { + proto.RegisterType((*TSSRoute)(nil), "band.tunnel.v1beta1.TSSRoute") + proto.RegisterType((*TSSPacketContent)(nil), "band.tunnel.v1beta1.TSSPacketContent") +} + +func init() { proto.RegisterFile("band/tunnel/v1beta1/route.proto", fileDescriptor_543238289d94b7a6) } + +var fileDescriptor_543238289d94b7a6 = []byte{ + // 360 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4a, 0xcc, 0x4b, + 0xd1, 0x2f, 0x29, 0xcd, 0xcb, 0x4b, 0xcd, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, + 0x2f, 0xca, 0x2f, 0x2d, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x06, 0x29, 0xd0, + 0x83, 0x28, 0xd0, 0x83, 0x2a, 0x90, 0x92, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x8e, 0x07, 0x2b, + 0xd1, 0x87, 0x70, 0x20, 0xea, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0x21, 0xe2, 0x20, 0x16, 0x44, + 0x54, 0x69, 0x11, 0x23, 0x17, 0x47, 0x48, 0x70, 0x70, 0x10, 0xc8, 0x60, 0x21, 0x0f, 0x2e, 0x91, + 0x94, 0xd4, 0xe2, 0x92, 0xcc, 0xbc, 0xc4, 0x92, 0xcc, 0xfc, 0xbc, 0xf8, 0xe4, 0x8c, 0xc4, 0xcc, + 0xbc, 0xf8, 0xcc, 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xb1, 0x47, 0xf7, 0xe4, 0x85, + 0x5c, 0x10, 0xf2, 0xce, 0x20, 0x69, 0x4f, 0x97, 0x20, 0xa1, 0x14, 0x74, 0xb1, 0x14, 0x21, 0x07, + 0x2e, 0x19, 0x14, 0x93, 0xf2, 0xf3, 0x4a, 0x8a, 0x12,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x04, 0x68, 0x42, 0x03, 0x87, 0x41, 0x12, 0x1b, 0x58, 0x85, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, + 0xad, 0xb3, 0xc7, 0x86, 0x84, 0x02, 0x00, 0x00, +} + +func (this *TSSRoute) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TSSRoute) + if !ok { + that2, ok := that.(TSSRoute) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DestinationChainID != that1.DestinationChainID { + return false + } + if this.DestinationContractAddress != that1.DestinationContractAddress { + return false + } + return true +} +func (this *TSSPacketContent) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TSSPacketContent) + if !ok { + that2, ok := that.(TSSPacketContent) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SigningID != that1.SigningID { + return false + } + if this.DestinationChainID != that1.DestinationChainID { + return false + } + if this.DestinationContractAddress != that1.DestinationContractAddress { + return false + } + return true +} +func (m *TSSRoute) 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 *TSSRoute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TSSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DestinationContractAddress) > 0 { + i -= len(m.DestinationContractAddress) + copy(dAtA[i:], m.DestinationContractAddress) + i = encodeVarintRoute(dAtA, i, uint64(len(m.DestinationContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.DestinationChainID) > 0 { + i -= len(m.DestinationChainID) + copy(dAtA[i:], m.DestinationChainID) + i = encodeVarintRoute(dAtA, i, uint64(len(m.DestinationChainID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TSSPacketContent) 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 *TSSPacketContent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TSSPacketContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DestinationContractAddress) > 0 { + i -= len(m.DestinationContractAddress) + copy(dAtA[i:], m.DestinationContractAddress) + i = encodeVarintRoute(dAtA, i, uint64(len(m.DestinationContractAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.DestinationChainID) > 0 { + i -= len(m.DestinationChainID) + copy(dAtA[i:], m.DestinationChainID) + i = encodeVarintRoute(dAtA, i, uint64(len(m.DestinationChainID))) + i-- + dAtA[i] = 0x12 + } + if m.SigningID != 0 { + i = encodeVarintRoute(dAtA, i, uint64(m.SigningID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintRoute(dAtA []byte, offset int, v uint64) int { + offset -= sovRoute(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TSSRoute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationChainID) + if l > 0 { + n += 1 + l + sovRoute(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovRoute(uint64(l)) + } + return n +} + +func (m *TSSPacketContent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SigningID != 0 { + n += 1 + sovRoute(uint64(m.SigningID)) + } + l = len(m.DestinationChainID) + if l > 0 { + n += 1 + l + sovRoute(uint64(l)) + } + l = len(m.DestinationContractAddress) + if l > 0 { + n += 1 + l + sovRoute(uint64(l)) + } + return n +} + +func sovRoute(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRoute(x uint64) (n int) { + return sovRoute(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TSSRoute) 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 ErrIntOverflowRoute + } + 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: TSSRoute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TSSRoute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + 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 ErrInvalidLengthRoute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + 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 ErrInvalidLengthRoute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRoute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TSSPacketContent) 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 ErrIntOverflowRoute + } + 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: TSSPacketContent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SigningID", wireType) + } + m.SigningID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SigningID |= github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + 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 ErrInvalidLengthRoute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoute + } + 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 ErrInvalidLengthRoute + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoute + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoute(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRoute + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRoute(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, ErrIntOverflowRoute + } + 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, ErrIntOverflowRoute + } + 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, ErrIntOverflowRoute + } + 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, ErrInvalidLengthRoute + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRoute + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRoute + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRoute = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRoute = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRoute = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 2592b6b63..276efda08 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" - github_com_bandprotocol_chain_v3_x_bandtss_types "github.com/bandprotocol/chain/v3/x/bandtss/types" - types2 "github.com/bandprotocol/chain/v3/x/feeds/types" + types1 "github.com/bandprotocol/chain/v3/x/feeds/types" _ "github.com/cosmos/cosmos-proto" - types1 "github.com/cosmos/cosmos-sdk/codec/types" + types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" + types2 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -30,189 +29,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// TSSRoute is the type for a TSS route -type TSSRoute struct { - // destination_chain_id is the destination chain ID - DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,2,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` -} - -func (m *TSSRoute) Reset() { *m = TSSRoute{} } -func (m *TSSRoute) String() string { return proto.CompactTextString(m) } -func (*TSSRoute) ProtoMessage() {} -func (*TSSRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{0} -} -func (m *TSSRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TSSRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TSSRoute.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 *TSSRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_TSSRoute.Merge(m, src) -} -func (m *TSSRoute) XXX_Size() int { - return m.Size() -} -func (m *TSSRoute) XXX_DiscardUnknown() { - xxx_messageInfo_TSSRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_TSSRoute proto.InternalMessageInfo - -func (m *TSSRoute) GetDestinationChainID() string { - if m != nil { - return m.DestinationChainID - } - return "" -} - -func (m *TSSRoute) GetDestinationContractAddress() string { - if m != nil { - return m.DestinationContractAddress - } - return "" -} - -// SignalDeviation is the type for a signal with soft and hard deviation -type SignalDeviation struct { - // signal_id is the signal ID - SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` - // soft_deviation_bps is the soft deviation in basis points - SoftDeviationBPS uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` - // hard_deviation_bps is the hard deviation in basis points - HardDeviationBPS uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` -} - -func (m *SignalDeviation) Reset() { *m = SignalDeviation{} } -func (m *SignalDeviation) String() string { return proto.CompactTextString(m) } -func (*SignalDeviation) ProtoMessage() {} -func (*SignalDeviation) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{1} -} -func (m *SignalDeviation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignalDeviation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignalDeviation.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 *SignalDeviation) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignalDeviation.Merge(m, src) -} -func (m *SignalDeviation) XXX_Size() int { - return m.Size() -} -func (m *SignalDeviation) XXX_DiscardUnknown() { - xxx_messageInfo_SignalDeviation.DiscardUnknown(m) -} - -var xxx_messageInfo_SignalDeviation proto.InternalMessageInfo - -func (m *SignalDeviation) GetSignalID() string { - if m != nil { - return m.SignalID - } - return "" -} - -func (m *SignalDeviation) GetSoftDeviationBPS() uint64 { - if m != nil { - return m.SoftDeviationBPS - } - return 0 -} - -func (m *SignalDeviation) GetHardDeviationBPS() uint64 { - if m != nil { - return m.HardDeviationBPS - } - return 0 -} - -// Deposit defines an amount deposited by an account address to the tunnel. -type Deposit struct { - // tunnel_id defines the unique id of the tunnel. - TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` - // depositor defines the deposit addresses from the proposals. - Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` - // amount to be deposited by depositor. - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` -} - -func (m *Deposit) Reset() { *m = Deposit{} } -func (m *Deposit) String() string { return proto.CompactTextString(m) } -func (*Deposit) ProtoMessage() {} -func (*Deposit) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{2} -} -func (m *Deposit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Deposit.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 *Deposit) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deposit.Merge(m, src) -} -func (m *Deposit) XXX_Size() int { - return m.Size() -} -func (m *Deposit) XXX_DiscardUnknown() { - xxx_messageInfo_Deposit.DiscardUnknown(m) -} - -var xxx_messageInfo_Deposit proto.InternalMessageInfo - -func (m *Deposit) GetTunnelID() uint64 { - if m != nil { - return m.TunnelID - } - return 0 -} - -func (m *Deposit) GetDepositor() string { - if m != nil { - return m.Depositor - } - return "" -} - -func (m *Deposit) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Amount - } - return nil -} - // Tunnel contains the information of the tunnel that is created by the user type Tunnel struct { // id is the tunnel ID @@ -220,9 +36,9 @@ type Tunnel struct { // sequence is representing the sequence of the tunnel packet. Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // route is the route for delivering the signal prices - Route *types1.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + Route *types.Any `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` // encoder is the mode of encoding price signal data. - Encoder types2.Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.feeds.v1beta1.Encoder" json:"encoder,omitempty"` + Encoder types1.Encoder `protobuf:"varint,4,opt,name=encoder,proto3,enum=band.feeds.v1beta1.Encoder" json:"encoder,omitempty"` // fee_payer is the address of the fee payer FeePayer string `protobuf:"bytes,5,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` // signal_deviations is the list of signal deviations @@ -243,7 +59,7 @@ func (m *Tunnel) Reset() { *m = Tunnel{} } func (m *Tunnel) String() string { return proto.CompactTextString(m) } func (*Tunnel) ProtoMessage() {} func (*Tunnel) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{3} + return fileDescriptor_6bb6151451ba2f25, []int{0} } func (m *Tunnel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -286,18 +102,18 @@ func (m *Tunnel) GetSequence() uint64 { return 0 } -func (m *Tunnel) GetRoute() *types1.Any { +func (m *Tunnel) GetRoute() *types.Any { if m != nil { return m.Route } return nil } -func (m *Tunnel) GetEncoder() types2.Encoder { +func (m *Tunnel) GetEncoder() types1.Encoder { if m != nil { return m.Encoder } - return types2.ENCODER_UNSPECIFIED + return types1.ENCODER_UNSPECIFIED } func (m *Tunnel) GetFeePayer() string { @@ -354,7 +170,7 @@ type LatestPrices struct { // tunnel_id is the tunnel ID TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` // prices is the list of prices information from feeds module. - Prices []types2.Price `protobuf:"bytes,2,rep,name=prices,proto3" json:"prices"` + Prices []types1.Price `protobuf:"bytes,2,rep,name=prices,proto3" json:"prices"` // last_interval is the last interval when the signal prices are produced by interval trigger LastInterval int64 `protobuf:"varint,3,opt,name=last_interval,json=lastInterval,proto3" json:"last_interval,omitempty"` } @@ -363,7 +179,7 @@ func (m *LatestPrices) Reset() { *m = LatestPrices{} } func (m *LatestPrices) String() string { return proto.CompactTextString(m) } func (*LatestPrices) ProtoMessage() {} func (*LatestPrices) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{4} + return fileDescriptor_6bb6151451ba2f25, []int{1} } func (m *LatestPrices) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -399,7 +215,7 @@ func (m *LatestPrices) GetTunnelID() uint64 { return 0 } -func (m *LatestPrices) GetPrices() []types2.Price { +func (m *LatestPrices) GetPrices() []types1.Price { if m != nil { return m.Prices } @@ -423,7 +239,7 @@ func (m *TotalFees) Reset() { *m = TotalFees{} } func (m *TotalFees) String() string { return proto.CompactTextString(m) } func (*TotalFees) ProtoMessage() {} func (*TotalFees) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{5} + return fileDescriptor_6bb6151451ba2f25, []int{2} } func (m *TotalFees) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -466,9 +282,9 @@ type Packet struct { // sequence is representing the sequence of the tunnel packet. Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // prices is the list of prices information from feeds module. - Prices []types2.Price `protobuf:"bytes,3,rep,name=prices,proto3" json:"prices"` + Prices []types1.Price `protobuf:"bytes,3,rep,name=prices,proto3" json:"prices"` // packet_content is the content of the packet that implements PacketContentI - PacketContent *types1.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + PacketContent *types.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` // base_fee is the base fee of the packet BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` // route_fee is the route fee of the packet @@ -481,7 +297,7 @@ func (m *Packet) Reset() { *m = Packet{} } func (m *Packet) String() string { return proto.CompactTextString(m) } func (*Packet) ProtoMessage() {} func (*Packet) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{6} + return fileDescriptor_6bb6151451ba2f25, []int{3} } func (m *Packet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -524,14 +340,14 @@ func (m *Packet) GetSequence() uint64 { return 0 } -func (m *Packet) GetPrices() []types2.Price { +func (m *Packet) GetPrices() []types1.Price { if m != nil { return m.Prices } return nil } -func (m *Packet) GetPacketContent() *types1.Any { +func (m *Packet) GetPacketContent() *types.Any { if m != nil { return m.PacketContent } @@ -559,28 +375,28 @@ func (m *Packet) GetCreatedAt() int64 { return 0 } -// TSSPacketContent is the packet content for TSS -type TSSPacketContent struct { - // signing_id is the signing ID - SigningID github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" json:"signing_id,omitempty"` - // destination_chain_id is the destination chain ID - DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` +// Deposit defines an amount deposited by an account address to the tunnel. +type Deposit struct { + // tunnel_id defines the unique id of the tunnel. + TunnelID uint64 `protobuf:"varint,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // depositor defines the deposit addresses from the proposals. + Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` + // amount to be deposited by depositor. + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` } -func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } -func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } -func (*TSSPacketContent) ProtoMessage() {} -func (*TSSPacketContent) Descriptor() ([]byte, []int) { - return fileDescriptor_6bb6151451ba2f25, []int{7} +func (m *Deposit) Reset() { *m = Deposit{} } +func (m *Deposit) String() string { return proto.CompactTextString(m) } +func (*Deposit) ProtoMessage() {} +func (*Deposit) Descriptor() ([]byte, []int) { + return fileDescriptor_6bb6151451ba2f25, []int{4} } -func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { +func (m *Deposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TSSPacketContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TSSPacketContent.Marshal(b, m, deterministic) + return xxx_messageInfo_Deposit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -590,212 +406,174 @@ func (m *TSSPacketContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *TSSPacketContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_TSSPacketContent.Merge(m, src) +func (m *Deposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_Deposit.Merge(m, src) } -func (m *TSSPacketContent) XXX_Size() int { +func (m *Deposit) XXX_Size() int { return m.Size() } -func (m *TSSPacketContent) XXX_DiscardUnknown() { - xxx_messageInfo_TSSPacketContent.DiscardUnknown(m) +func (m *Deposit) XXX_DiscardUnknown() { + xxx_messageInfo_Deposit.DiscardUnknown(m) } -var xxx_messageInfo_TSSPacketContent proto.InternalMessageInfo +var xxx_messageInfo_Deposit proto.InternalMessageInfo -func (m *TSSPacketContent) GetSigningID() github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID { +func (m *Deposit) GetTunnelID() uint64 { if m != nil { - return m.SigningID + return m.TunnelID } return 0 } -func (m *TSSPacketContent) GetDestinationChainID() string { +func (m *Deposit) GetDepositor() string { if m != nil { - return m.DestinationChainID + return m.Depositor } return "" } -func (m *TSSPacketContent) GetDestinationContractAddress() string { +func (m *Deposit) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.DestinationContractAddress + return m.Amount } - return "" + return nil } -func init() { - proto.RegisterType((*TSSRoute)(nil), "band.tunnel.v1beta1.TSSRoute") - proto.RegisterType((*SignalDeviation)(nil), "band.tunnel.v1beta1.SignalDeviation") - proto.RegisterType((*Deposit)(nil), "band.tunnel.v1beta1.Deposit") - proto.RegisterType((*Tunnel)(nil), "band.tunnel.v1beta1.Tunnel") - proto.RegisterType((*LatestPrices)(nil), "band.tunnel.v1beta1.LatestPrices") - proto.RegisterType((*TotalFees)(nil), "band.tunnel.v1beta1.TotalFees") - proto.RegisterType((*Packet)(nil), "band.tunnel.v1beta1.Packet") - proto.RegisterType((*TSSPacketContent)(nil), "band.tunnel.v1beta1.TSSPacketContent") +// SignalDeviation is the type for a signal with soft and hard deviation +type SignalDeviation struct { + // signal_id is the signal ID + SignalID string `protobuf:"bytes,1,opt,name=signal_id,json=signalId,proto3" json:"signal_id,omitempty"` + // soft_deviation_bps is the soft deviation in basis points + SoftDeviationBPS uint64 `protobuf:"varint,2,opt,name=soft_deviation_bps,json=softDeviationBps,proto3" json:"soft_deviation_bps,omitempty"` + // hard_deviation_bps is the hard deviation in basis points + HardDeviationBPS uint64 `protobuf:"varint,3,opt,name=hard_deviation_bps,json=hardDeviationBps,proto3" json:"hard_deviation_bps,omitempty"` } -func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } - -var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 1014 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0xae, 0x93, 0x34, 0xb1, 0xa7, 0x1f, 0x74, 0x87, 0x68, 0xe5, 0xed, 0x42, 0x12, 0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, 0x4c, 0xfa, 0x20, 0x79, - 0xe5, 0x1b, 0xa0, 0x70, 0xe7, 0x6f, 0x80, 0xe2, 0x8d, 0x6f, 0x80, 0x6b, 0x04, 0xd2, 0xfa, 0xe4, - 0xf9, 0xb4, 0x66, 0xbd, 0x98, 0xd6, 0xac, 0x97, 0xd3, 0x9a, 0xf5, 0xc7, 0xb4, 0x66, 0x7d, 0x73, - 0x51, 0x5b, 0x7a, 0x79, 0x51, 0x5b, 0xfa, 0xf5, 0xa2, 0xb6, 0xf4, 0xb9, 0xff, 0x1f, 0x48, 0x30, - 0x4f, 0x38, 0xc5, 0x41, 0xb7, 0xac, 0x10, 0x8f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x3a, - 0xe1, 0x4d, 0xde, 0x09, 0x00, 0x00, -} - -func (this *TSSRoute) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TSSRoute) - if !ok { - that2, ok := that.(TSSRoute) - if ok { - that1 = &that2 - } else { - return false +func (m *SignalDeviation) Reset() { *m = SignalDeviation{} } +func (m *SignalDeviation) String() string { return proto.CompactTextString(m) } +func (*SignalDeviation) ProtoMessage() {} +func (*SignalDeviation) Descriptor() ([]byte, []int) { + return fileDescriptor_6bb6151451ba2f25, []int{5} +} +func (m *SignalDeviation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignalDeviation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignalDeviation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.DestinationChainID != that1.DestinationChainID { - return false - } - if this.DestinationContractAddress != that1.DestinationContractAddress { - return false - } - return true } -func (this *SignalDeviation) Equal(that interface{}) bool { - if that == nil { - return this == nil - } +func (m *SignalDeviation) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalDeviation.Merge(m, src) +} +func (m *SignalDeviation) XXX_Size() int { + return m.Size() +} +func (m *SignalDeviation) XXX_DiscardUnknown() { + xxx_messageInfo_SignalDeviation.DiscardUnknown(m) +} - that1, ok := that.(*SignalDeviation) - if !ok { - that2, ok := that.(SignalDeviation) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.SignalID != that1.SignalID { - return false - } - if this.SoftDeviationBPS != that1.SoftDeviationBPS { - return false - } - if this.HardDeviationBPS != that1.HardDeviationBPS { - return false +var xxx_messageInfo_SignalDeviation proto.InternalMessageInfo + +func (m *SignalDeviation) GetSignalID() string { + if m != nil { + return m.SignalID } - return true + return "" } -func (this *Deposit) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - that1, ok := that.(*Deposit) - if !ok { - that2, ok := that.(Deposit) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.TunnelID != that1.TunnelID { - return false - } - if this.Depositor != that1.Depositor { - return false - } - if len(this.Amount) != len(that1.Amount) { - return false +func (m *SignalDeviation) GetSoftDeviationBPS() uint64 { + if m != nil { + return m.SoftDeviationBPS } - for i := range this.Amount { - if !this.Amount[i].Equal(&that1.Amount[i]) { - return false - } + return 0 +} + +func (m *SignalDeviation) GetHardDeviationBPS() uint64 { + if m != nil { + return m.HardDeviationBPS } - return true + return 0 +} + +func init() { + proto.RegisterType((*Tunnel)(nil), "band.tunnel.v1beta1.Tunnel") + proto.RegisterType((*LatestPrices)(nil), "band.tunnel.v1beta1.LatestPrices") + proto.RegisterType((*TotalFees)(nil), "band.tunnel.v1beta1.TotalFees") + proto.RegisterType((*Packet)(nil), "band.tunnel.v1beta1.Packet") + proto.RegisterType((*Deposit)(nil), "band.tunnel.v1beta1.Deposit") + proto.RegisterType((*SignalDeviation)(nil), "band.tunnel.v1beta1.SignalDeviation") } + +func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } + +var fileDescriptor_6bb6151451ba2f25 = []byte{ + // 888 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0x23, 0x45, + 0x10, 0x4e, 0xdb, 0x8e, 0x3d, 0xd3, 0xf9, 0x21, 0xdb, 0x44, 0x68, 0x36, 0x2b, 0x6c, 0x2b, 0x70, + 0x30, 0x48, 0x99, 0x61, 0xb3, 0xca, 0x22, 0x71, 0x8b, 0x37, 0x44, 0x58, 0x02, 0x11, 0x4d, 0x56, + 0x42, 0xe2, 0x32, 0x6a, 0xcf, 0x94, 0xed, 0xd6, 0x3a, 0xdd, 0xc3, 0x74, 0xdb, 0x22, 0x6f, 0xc0, + 0x91, 0x17, 0x40, 0xe2, 0xb8, 0xe2, 0xc4, 0x21, 0x8f, 0xc0, 0x61, 0x95, 0xd3, 0x8a, 0x13, 0x07, + 0x14, 0x90, 0x73, 0x80, 0xc7, 0x40, 0xfd, 0x33, 0xf6, 0x3a, 0x5a, 0x76, 0x15, 0x29, 0x17, 0xdb, + 0x55, 0xf5, 0x75, 0x7d, 0xd5, 0x5f, 0x75, 0x95, 0x71, 0xbb, 0x4f, 0x79, 0x16, 0xa9, 0x09, 0xe7, + 0x30, 0x8e, 0xa6, 0x0f, 0xfb, 0xa0, 0xe8, 0x43, 0x67, 0x86, 0x79, 0x21, 0x94, 0x20, 0xef, 0x6a, + 0x44, 0xe8, 0x5c, 0x0e, 0xb1, 0x73, 0x8f, 0x9e, 0x31, 0x2e, 0x22, 0xf3, 0x69, 0x71, 0x3b, 0xcd, + 0x54, 0xc8, 0x33, 0x21, 0xa3, 0x3e, 0x95, 0x30, 0xcf, 0x94, 0x0a, 0xc6, 0x5d, 0xfc, 0xbe, 0x8d, + 0x27, 0xc6, 0x8a, 0xac, 0xe1, 0x42, 0xdb, 0x43, 0x31, 0x14, 0xd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0x88, 0xc2, 0xb4, + 0xf3, 0x4d, 0xa3, 0xb6, 0x80, 0x92, 0x11, 0xae, 0xd3, 0x33, 0x31, 0xe1, 0x6a, 0xde, 0xe9, 0xbb, + 0x5e, 0x26, 0x2e, 0x7f, 0xf9, 0x56, 0x11, 0x7e, 0xe7, 0xc6, 0x2e, 0xd4, 0xd7, 0x74, 0xcb, 0xd4, + 0x5d, 0xd3, 0xb7, 0xd7, 0xb4, 0x38, 0x7d, 0x4d, 0x1b, 0xee, 0x65, 0xa4, 0x8b, 0x89, 0x14, 0x03, + 0xb5, 0xd8, 0xba, 0x49, 0x3f, 0x97, 0xf6, 0xf9, 0x76, 0xb7, 0x67, 0x57, 0xad, 0xad, 0x53, 0x31, + 0x50, 0x8b, 0x2d, 0x7b, 0x72, 0x1a, 0x6f, 0xc9, 0x25, 0x4f, 0x2e, 0x75, 0x8e, 0x11, 0x2d, 0xb2, + 0x1b, 0x39, 0xaa, 0x8b, 0x1c, 0x5f, 0xd0, 0x22, 0x5b, 0xce, 0x31, 0x5a, 0xf2, 0xe4, 0xd2, 0x5e, + 0xa6, 0xfb, 0xd5, 0xf3, 0x59, 0x13, 0xbd, 0x98, 0x35, 0xd1, 0xcb, 0x59, 0x13, 0xfd, 0x3d, 0x6b, + 0xa2, 0x1f, 0xaf, 0x9b, 0x2b, 0x2f, 0xaf, 0x9b, 0x2b, 0x7f, 0x5c, 0x37, 0x57, 0xbe, 0x8d, 0x5e, + 0xd1, 0x49, 0x8f, 0x8f, 0x79, 0xfa, 0xa9, 0x18, 0x47, 0xe9, 0x88, 0x32, 0x1e, 0x4d, 0x1f, 0x45, + 0xdf, 0x97, 0x7f, 0xfe, 0x46, 0xb4, 0x7e, 0xdd, 0x20, 0x1e, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, + 0x38, 0xd5, 0x86, 0xfa, 0x18, 0x08, 0x00, 0x00, +} + func (this *Tunnel) Equal(that interface{}) bool { if that == nil { return this == nil @@ -981,14 +759,14 @@ func (this *Packet) Equal(that interface{}) bool { } return true } -func (this *TSSPacketContent) Equal(that interface{}) bool { +func (this *Deposit) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*TSSPacketContent) + that1, ok := that.(*Deposit) if !ok { - that2, ok := that.(TSSPacketContent) + that2, ok := that.(Deposit) if ok { that1 = &that2 } else { @@ -1000,143 +778,52 @@ func (this *TSSPacketContent) Equal(that interface{}) bool { } else if this == nil { return false } - if this.SigningID != that1.SigningID { + if this.TunnelID != that1.TunnelID { return false } - if this.DestinationChainID != that1.DestinationChainID { + if this.Depositor != that1.Depositor { return false } - if this.DestinationContractAddress != that1.DestinationContractAddress { + if len(this.Amount) != len(that1.Amount) { return false } - return true -} -func (m *TSSRoute) 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 *TSSRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TSSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DestinationContractAddress) > 0 { - i -= len(m.DestinationContractAddress) - copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.DestinationChainID) > 0 { - i -= len(m.DestinationChainID) - copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) - i-- - dAtA[i] = 0xa + for i := range this.Amount { + if !this.Amount[i].Equal(&that1.Amount[i]) { + return false + } } - return len(dAtA) - i, nil + return true } - -func (m *SignalDeviation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (this *SignalDeviation) Equal(that interface{}) bool { + if that == nil { + return this == nil } - return dAtA[:n], nil -} - -func (m *SignalDeviation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} -func (m *SignalDeviation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HardDeviationBPS != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.HardDeviationBPS)) - i-- - dAtA[i] = 0x18 - } - if m.SoftDeviationBPS != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.SoftDeviationBPS)) - i-- - dAtA[i] = 0x10 - } - if len(m.SignalID) > 0 { - i -= len(m.SignalID) - copy(dAtA[i:], m.SignalID) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.SignalID))) - i-- - dAtA[i] = 0xa + that1, ok := that.(*SignalDeviation) + if !ok { + that2, ok := that.(SignalDeviation) + if ok { + that1 = &that2 + } else { + return false + } } - return len(dAtA) - i, nil -} - -func (m *Deposit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if that1 == nil { + return this == nil + } else if this == nil { + return false } - return dAtA[:n], nil -} - -func (m *Deposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Amount) > 0 { - for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTunnel(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } + if this.SignalID != that1.SignalID { + return false } - if len(m.Depositor) > 0 { - i -= len(m.Depositor) - copy(dAtA[i:], m.Depositor) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.Depositor))) - i-- - dAtA[i] = 0x12 + if this.SoftDeviationBPS != that1.SoftDeviationBPS { + return false } - if m.TunnelID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) - i-- - dAtA[i] = 0x8 + if this.HardDeviationBPS != that1.HardDeviationBPS { + return false } - return len(dAtA) - i, nil + return true } - func (m *Tunnel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1425,7 +1112,7 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TSSPacketContent) Marshal() (dAtA []byte, err error) { +func (m *Deposit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1435,107 +1122,96 @@ func (m *TSSPacketContent) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TSSPacketContent) MarshalTo(dAtA []byte) (int, error) { +func (m *Deposit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TSSPacketContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.DestinationContractAddress) > 0 { - i -= len(m.DestinationContractAddress) - copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationContractAddress))) - i-- - dAtA[i] = 0x1a + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTunnel(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - if len(m.DestinationChainID) > 0 { - i -= len(m.DestinationChainID) - copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintTunnel(dAtA, i, uint64(len(m.DestinationChainID))) + if len(m.Depositor) > 0 { + i -= len(m.Depositor) + copy(dAtA[i:], m.Depositor) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.Depositor))) i-- dAtA[i] = 0x12 } - if m.SigningID != 0 { - i = encodeVarintTunnel(dAtA, i, uint64(m.SigningID)) + if m.TunnelID != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.TunnelID)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func encodeVarintTunnel(dAtA []byte, offset int, v uint64) int { - offset -= sovTunnel(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *SignalDeviation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *TSSRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DestinationChainID) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - l = len(m.DestinationContractAddress) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - return n + +func (m *SignalDeviation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SignalDeviation) Size() (n int) { - if m == nil { - return 0 - } +func (m *SignalDeviation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SignalID) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) + if m.HardDeviationBPS != 0 { + i = encodeVarintTunnel(dAtA, i, uint64(m.HardDeviationBPS)) + i-- + dAtA[i] = 0x18 } if m.SoftDeviationBPS != 0 { - n += 1 + sovTunnel(uint64(m.SoftDeviationBPS)) + i = encodeVarintTunnel(dAtA, i, uint64(m.SoftDeviationBPS)) + i-- + dAtA[i] = 0x10 } - if m.HardDeviationBPS != 0 { - n += 1 + sovTunnel(uint64(m.HardDeviationBPS)) + if len(m.SignalID) > 0 { + i -= len(m.SignalID) + copy(dAtA[i:], m.SignalID) + i = encodeVarintTunnel(dAtA, i, uint64(len(m.SignalID))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *Deposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TunnelID != 0 { - n += 1 + sovTunnel(uint64(m.TunnelID)) - } - l = len(m.Depositor) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - if len(m.Amount) > 0 { - for _, e := range m.Amount { - l = e.Size() - n += 1 + l + sovTunnel(uint64(l)) - } +func encodeVarintTunnel(dAtA []byte, offset int, v uint64) int { + offset -= sovTunnel(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return n + dAtA[offset] = uint8(v) + return base } - func (m *Tunnel) Size() (n int) { if m == nil { return 0 @@ -1583,480 +1259,132 @@ func (m *Tunnel) Size() (n int) { l = len(m.Creator) if l > 0 { n += 1 + l + sovTunnel(uint64(l)) - } - return n -} - -func (m *LatestPrices) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TunnelID != 0 { - n += 1 + sovTunnel(uint64(m.TunnelID)) - } - if len(m.Prices) > 0 { - for _, e := range m.Prices { - l = e.Size() - n += 1 + l + sovTunnel(uint64(l)) - } - } - if m.LastInterval != 0 { - n += 1 + sovTunnel(uint64(m.LastInterval)) - } - return n -} - -func (m *TotalFees) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TotalPacketFee) > 0 { - for _, e := range m.TotalPacketFee { - l = e.Size() - n += 1 + l + sovTunnel(uint64(l)) - } - } - return n -} - -func (m *Packet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TunnelID != 0 { - n += 1 + sovTunnel(uint64(m.TunnelID)) - } - if m.Sequence != 0 { - n += 1 + sovTunnel(uint64(m.Sequence)) - } - if len(m.Prices) > 0 { - for _, e := range m.Prices { - l = e.Size() - n += 1 + l + sovTunnel(uint64(l)) - } - } - if m.PacketContent != nil { - l = m.PacketContent.Size() - n += 1 + l + sovTunnel(uint64(l)) - } - if len(m.BaseFee) > 0 { - for _, e := range m.BaseFee { - l = e.Size() - n += 1 + l + sovTunnel(uint64(l)) - } - } - if len(m.RouteFee) > 0 { - for _, e := range m.RouteFee { - l = e.Size() - n += 1 + l + sovTunnel(uint64(l)) - } - } - if m.CreatedAt != 0 { - n += 1 + sovTunnel(uint64(m.CreatedAt)) - } - return n -} - -func (m *TSSPacketContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SigningID != 0 { - n += 1 + sovTunnel(uint64(m.SigningID)) - } - l = len(m.DestinationChainID) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - l = len(m.DestinationContractAddress) - if l > 0 { - n += 1 + l + sovTunnel(uint64(l)) - } - return n -} - -func sovTunnel(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTunnel(x uint64) (n int) { - return sovTunnel(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TSSRoute) 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 ErrIntOverflowTunnel - } - 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: TSSRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TSSRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTunnel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignalDeviation) 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 ErrIntOverflowTunnel - } - 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: SignalDeviation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignalDeviation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignalID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SignalID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBPS", wireType) - } - m.SoftDeviationBPS = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SoftDeviationBPS |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBPS", wireType) - } - m.HardDeviationBPS = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HardDeviationBPS |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTunnel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Deposit) 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 ErrIntOverflowTunnel - } - 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: Deposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) - } - m.TunnelID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TunnelID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - 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 ErrInvalidLengthTunnel - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Depositor = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTunnel - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTunnel - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTunnel - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = append(m.Amount, types.Coin{}) - if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTunnel(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTunnel - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + } + return n +} + +func (m *LatestPrices) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTunnel(uint64(m.TunnelID)) + } + if len(m.Prices) > 0 { + for _, e := range m.Prices { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) } } + if m.LastInterval != 0 { + n += 1 + sovTunnel(uint64(m.LastInterval)) + } + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *TotalFees) Size() (n int) { + if m == nil { + return 0 } - return nil + var l int + _ = l + if len(m.TotalPacketFee) > 0 { + for _, e := range m.TotalPacketFee { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + return n +} + +func (m *Packet) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTunnel(uint64(m.TunnelID)) + } + if m.Sequence != 0 { + n += 1 + sovTunnel(uint64(m.Sequence)) + } + if len(m.Prices) > 0 { + for _, e := range m.Prices { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + if m.PacketContent != nil { + l = m.PacketContent.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + if len(m.BaseFee) > 0 { + for _, e := range m.BaseFee { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + if len(m.RouteFee) > 0 { + for _, e := range m.RouteFee { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + if m.CreatedAt != 0 { + n += 1 + sovTunnel(uint64(m.CreatedAt)) + } + return n +} + +func (m *Deposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TunnelID != 0 { + n += 1 + sovTunnel(uint64(m.TunnelID)) + } + l = len(m.Depositor) + if l > 0 { + n += 1 + l + sovTunnel(uint64(l)) + } + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTunnel(uint64(l)) + } + } + return n +} + +func (m *SignalDeviation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SignalID) + if l > 0 { + n += 1 + l + sovTunnel(uint64(l)) + } + if m.SoftDeviationBPS != 0 { + n += 1 + sovTunnel(uint64(m.SoftDeviationBPS)) + } + if m.HardDeviationBPS != 0 { + n += 1 + sovTunnel(uint64(m.HardDeviationBPS)) + } + return n +} + +func sovTunnel(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTunnel(x uint64) (n int) { + return sovTunnel(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Tunnel) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -2155,7 +1483,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Route == nil { - m.Route = &types1.Any{} + m.Route = &types.Any{} } if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2175,7 +1503,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Encoder |= types2.Encoder(b&0x7F) << shift + m.Encoder |= types1.Encoder(b&0x7F) << shift if b < 0x80 { break } @@ -2294,7 +1622,7 @@ func (m *Tunnel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TotalDeposit = append(m.TotalDeposit, types.Coin{}) + m.TotalDeposit = append(m.TotalDeposit, types2.Coin{}) if err := m.TotalDeposit[len(m.TotalDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2468,7 +1796,7 @@ func (m *LatestPrices) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Prices = append(m.Prices, types2.Price{}) + m.Prices = append(m.Prices, types1.Price{}) if err := m.Prices[len(m.Prices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2571,7 +1899,7 @@ func (m *TotalFees) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TotalPacketFee = append(m.TotalPacketFee, types.Coin{}) + m.TotalPacketFee = append(m.TotalPacketFee, types2.Coin{}) if err := m.TotalPacketFee[len(m.TotalPacketFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2693,7 +2021,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Prices = append(m.Prices, types2.Price{}) + m.Prices = append(m.Prices, types1.Price{}) if err := m.Prices[len(m.Prices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2728,7 +2056,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.PacketContent == nil { - m.PacketContent = &types1.Any{} + m.PacketContent = &types.Any{} } if err := m.PacketContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2763,7 +2091,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BaseFee = append(m.BaseFee, types.Coin{}) + m.BaseFee = append(m.BaseFee, types2.Coin{}) if err := m.BaseFee[len(m.BaseFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2797,7 +2125,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RouteFee = append(m.RouteFee, types.Coin{}) + m.RouteFee = append(m.RouteFee, types2.Coin{}) if err := m.RouteFee[len(m.RouteFee)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2842,7 +2170,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { } return nil } -func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { +func (m *Deposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2865,17 +2193,17 @@ func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TSSPacketContent: wiretype end group for non-group") + return fmt.Errorf("proto: Deposit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SigningID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TunnelID", wireType) } - m.SigningID = 0 + m.TunnelID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTunnel @@ -2885,14 +2213,14 @@ func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SigningID |= github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID(b&0x7F) << shift + m.TunnelID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2920,11 +2248,95 @@ func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DestinationChainID = string(dAtA[iNdEx:postIndex]) + m.Depositor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTunnel + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTunnel + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types2.Coin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTunnel(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTunnel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignalDeviation) 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 ErrIntOverflowTunnel + } + 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: SignalDeviation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignalDeviation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2952,8 +2364,46 @@ func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) + m.SignalID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SoftDeviationBPS", wireType) + } + m.SoftDeviationBPS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SoftDeviationBPS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HardDeviationBPS", wireType) + } + m.HardDeviationBPS = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTunnel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HardDeviationBPS |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTunnel(dAtA[iNdEx:]) From b61b8086abc383672c2195461353ef19f2311854 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Wed, 20 Nov 2024 17:26:35 +0700 Subject: [PATCH 264/272] add error --- x/tunnel/abci.go | 10 +++++++--- x/tunnel/keeper/keeper_packet_test.go | 6 ++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index 6b2df6a6c..d13ecfa3a 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -7,9 +7,13 @@ import ( ) func EndBlocker(ctx sdk.Context, k keeper.Keeper) error { - // produce packets for all tunnels that are active and have passed the interval time trigger - // or deviated from the last price to destination route - k.ProduceActiveTunnelPackets(ctx) + // Produce packets for all tunnels that are active and have passed the interval time trigger + // or deviated from the last price to destination route. + // Error should not happen here since the tunnel is already validated. + err := k.ProduceActiveTunnelPackets(ctx) + if err != nil { + return err + } return nil } diff --git a/x/tunnel/keeper/keeper_packet_test.go b/x/tunnel/keeper/keeper_packet_test.go index 1e2142a5f..2d49d93de 100644 --- a/x/tunnel/keeper/keeper_packet_test.go +++ b/x/tunnel/keeper/keeper_packet_test.go @@ -191,7 +191,8 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPackets() { {SignalID: "BTC/USD", Price: 0}, }, 0)) - k.ProduceActiveTunnelPackets(ctx) + err = k.ProduceActiveTunnelPackets(ctx) + s.Require().NoError(err) newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) @@ -245,7 +246,8 @@ func (s *KeeperTestSuite) TestProduceActiveTunnelPacketsNotEnoughMoney() { {SignalID: "BTC/USD", Price: 0}, }, 0)) - k.ProduceActiveTunnelPackets(ctx) + err = k.ProduceActiveTunnelPackets(ctx) + s.Require().NoError(err) newTunnelInfo, err := k.GetTunnel(ctx, tunnelID) s.Require().NoError(err) From 9bfc143d28625d4c3b383aa42215785fc26212ea Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 21 Nov 2024 13:41:53 +0700 Subject: [PATCH 265/272] move test --- x/tunnel/keeper/genesis_test.go | 103 -------------------------------- 1 file changed, 103 deletions(-) diff --git a/x/tunnel/keeper/genesis_test.go b/x/tunnel/keeper/genesis_test.go index 64c2e01fe..1accb7025 100644 --- a/x/tunnel/keeper/genesis_test.go +++ b/x/tunnel/keeper/genesis_test.go @@ -1,9 +1,6 @@ package keeper_test import ( - "testing" - - "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" sdkmath "cosmossdk.io/math" @@ -16,106 +13,6 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func TestValidateGenesis(t *testing.T) { - cases := map[string]struct { - genesis *types.GenesisState - requireErr bool - errMsg string - }{ - "length of tunnels does not match tunnel count": { - genesis: &types.GenesisState{ - TunnelCount: 2, - Tunnels: []types.Tunnel{ - {ID: 1}, - }, - }, - requireErr: true, - errMsg: "length of tunnels does not match tunnel count", - }, - "tunnel count mismatch in tunnels": { - genesis: &types.GenesisState{ - TunnelCount: 1, - Tunnels: []types.Tunnel{ - {ID: 3}, - }, - }, - requireErr: true, - errMsg: "tunnel count mismatch in tunnels", - }, - "invalid total fees": { - genesis: &types.GenesisState{ - TunnelCount: 1, - Tunnels: []types.Tunnel{ - {ID: 1}, - }, - TotalFees: types.TotalFees{ - TotalPacketFee: sdk.Coins{ - {Denom: "uband", Amount: sdkmath.NewInt(-100)}, - }, // Invalid coin - }, - }, - requireErr: true, - errMsg: "invalid total fees", - }, - "deposits mismatch total deposit for tunnel": { - genesis: &types.GenesisState{ - TunnelCount: 1, - Tunnels: []types.Tunnel{ - {ID: 1, TotalDeposit: sdk.NewCoins()}, - }, - TotalFees: types.TotalFees{}, - Deposits: []types.Deposit{ - { - TunnelID: 1, - Depositor: sdk.AccAddress("account1").String(), - Amount: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), - }, - }, - }, - requireErr: true, - errMsg: "deposits mismatch total deposit for tunnel", - }, - "all good": { - genesis: &types.GenesisState{ - TunnelCount: 2, - Tunnels: []types.Tunnel{ - {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100)))}, - {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100)))}, - }, - TotalFees: types.TotalFees{ - TotalPacketFee: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), - }, - Deposits: []types.Deposit{ - { - TunnelID: 1, - Depositor: sdk.AccAddress("account1").String(), - Amount: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), - }, - { - TunnelID: 2, - Depositor: sdk.AccAddress("account2").String(), - Amount: sdk.NewCoins(sdk.NewCoin("uband", sdkmath.NewInt(100))), - }, - }, - Params: types.DefaultParams(), - }, - requireErr: false, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - err := types.ValidateGenesis(*tc.genesis) - if tc.requireErr { - require.Error(t, err) - require.Contains(t, err.Error(), tc.errMsg) - } else { - require.NoError(t, err) - } - }) - } -} - func (s *KeeperTestSuite) TestInitExportGenesis() { ctx, k := s.ctx, s.keeper From 7710a3932d924703b80143a46797b18786c0dcb8 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Thu, 21 Nov 2024 16:17:01 +0700 Subject: [PATCH 266/272] update route --- api/band/tunnel/v1beta1/route.pulsar.go | 327 +++++------------- api/band/tunnel/v1beta1/tunnel.pulsar.go | 202 +++++------ proto/band/tunnel/v1beta1/route.proto | 10 +- proto/band/tunnel/v1beta1/tunnel.proto | 4 +- x/tunnel/keeper/grpc_query_test.go | 30 +- x/tunnel/keeper/keeper_packet.go | 18 +- x/tunnel/keeper/keeper_tss_packet.go | 8 +- x/tunnel/keeper/keeper_tss_packet_test.go | 4 +- x/tunnel/types/codec.go | 11 +- x/tunnel/types/errors.go | 2 +- x/tunnel/types/packet.go | 36 +- x/tunnel/types/packet_content.go | 8 - x/tunnel/types/packet_test.go | 28 +- x/tunnel/types/route.pb.go | 211 +++-------- x/tunnel/types/route_result.go | 8 + x/tunnel/types/{tss_route.go => route_tss.go} | 0 x/tunnel/types/tunnel.pb.go | 140 ++++---- 17 files changed, 378 insertions(+), 669 deletions(-) delete mode 100644 x/tunnel/types/packet_content.go create mode 100644 x/tunnel/types/route_result.go rename x/tunnel/types/{tss_route.go => route_tss.go} (100%) diff --git a/api/band/tunnel/v1beta1/route.pulsar.go b/api/band/tunnel/v1beta1/route.pulsar.go index 71a2d5797..666ff39d7 100644 --- a/api/band/tunnel/v1beta1/route.pulsar.go +++ b/api/band/tunnel/v1beta1/route.pulsar.go @@ -499,29 +499,25 @@ func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { } var ( - md_TSSPacketContent protoreflect.MessageDescriptor - fd_TSSPacketContent_signing_id protoreflect.FieldDescriptor - fd_TSSPacketContent_destination_chain_id protoreflect.FieldDescriptor - fd_TSSPacketContent_destination_contract_address protoreflect.FieldDescriptor + md_TSSRouteResult protoreflect.MessageDescriptor + fd_TSSRouteResult_signing_id protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_route_proto_init() - md_TSSPacketContent = File_band_tunnel_v1beta1_route_proto.Messages().ByName("TSSPacketContent") - fd_TSSPacketContent_signing_id = md_TSSPacketContent.Fields().ByName("signing_id") - fd_TSSPacketContent_destination_chain_id = md_TSSPacketContent.Fields().ByName("destination_chain_id") - fd_TSSPacketContent_destination_contract_address = md_TSSPacketContent.Fields().ByName("destination_contract_address") + md_TSSRouteResult = File_band_tunnel_v1beta1_route_proto.Messages().ByName("TSSRouteResult") + fd_TSSRouteResult_signing_id = md_TSSRouteResult.Fields().ByName("signing_id") } -var _ protoreflect.Message = (*fastReflection_TSSPacketContent)(nil) +var _ protoreflect.Message = (*fastReflection_TSSRouteResult)(nil) -type fastReflection_TSSPacketContent TSSPacketContent +type fastReflection_TSSRouteResult TSSRouteResult -func (x *TSSPacketContent) ProtoReflect() protoreflect.Message { - return (*fastReflection_TSSPacketContent)(x) +func (x *TSSRouteResult) ProtoReflect() protoreflect.Message { + return (*fastReflection_TSSRouteResult)(x) } -func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { +func (x *TSSRouteResult) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -533,43 +529,43 @@ func (x *TSSPacketContent) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_TSSPacketContent_messageType fastReflection_TSSPacketContent_messageType -var _ protoreflect.MessageType = fastReflection_TSSPacketContent_messageType{} +var _fastReflection_TSSRouteResult_messageType fastReflection_TSSRouteResult_messageType +var _ protoreflect.MessageType = fastReflection_TSSRouteResult_messageType{} -type fastReflection_TSSPacketContent_messageType struct{} +type fastReflection_TSSRouteResult_messageType struct{} -func (x fastReflection_TSSPacketContent_messageType) Zero() protoreflect.Message { - return (*fastReflection_TSSPacketContent)(nil) +func (x fastReflection_TSSRouteResult_messageType) Zero() protoreflect.Message { + return (*fastReflection_TSSRouteResult)(nil) } -func (x fastReflection_TSSPacketContent_messageType) New() protoreflect.Message { - return new(fastReflection_TSSPacketContent) +func (x fastReflection_TSSRouteResult_messageType) New() protoreflect.Message { + return new(fastReflection_TSSRouteResult) } -func (x fastReflection_TSSPacketContent_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TSSPacketContent +func (x fastReflection_TSSRouteResult_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TSSRouteResult } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_TSSPacketContent) Descriptor() protoreflect.MessageDescriptor { - return md_TSSPacketContent +func (x *fastReflection_TSSRouteResult) Descriptor() protoreflect.MessageDescriptor { + return md_TSSRouteResult } // 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_TSSPacketContent) Type() protoreflect.MessageType { - return _fastReflection_TSSPacketContent_messageType +func (x *fastReflection_TSSRouteResult) Type() protoreflect.MessageType { + return _fastReflection_TSSRouteResult_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_TSSPacketContent) New() protoreflect.Message { - return new(fastReflection_TSSPacketContent) +func (x *fastReflection_TSSRouteResult) New() protoreflect.Message { + return new(fastReflection_TSSRouteResult) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_TSSPacketContent) Interface() protoreflect.ProtoMessage { - return (*TSSPacketContent)(x) +func (x *fastReflection_TSSRouteResult) Interface() protoreflect.ProtoMessage { + return (*TSSRouteResult)(x) } // Range iterates over every populated field in an undefined order, @@ -577,22 +573,10 @@ func (x *fastReflection_TSSPacketContent) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_TSSPacketContent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_TSSRouteResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.SigningId != uint64(0) { value := protoreflect.ValueOfUint64(x.SigningId) - if !f(fd_TSSPacketContent_signing_id, value) { - return - } - } - if x.DestinationChainId != "" { - value := protoreflect.ValueOfString(x.DestinationChainId) - if !f(fd_TSSPacketContent_destination_chain_id, value) { - return - } - } - if x.DestinationContractAddress != "" { - value := protoreflect.ValueOfString(x.DestinationContractAddress) - if !f(fd_TSSPacketContent_destination_contract_address, value) { + if !f(fd_TSSRouteResult_signing_id, value) { return } } @@ -609,19 +593,15 @@ func (x *fastReflection_TSSPacketContent) Range(f func(protoreflect.FieldDescrip // 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_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TSSRouteResult) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSRouteResult.signing_id": return x.SigningId != uint64(0) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - return x.DestinationChainId != "" - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - return x.DestinationContractAddress != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", fd.FullName())) } } @@ -631,19 +611,15 @@ func (x *fastReflection_TSSPacketContent) Has(fd protoreflect.FieldDescriptor) b // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TSSRouteResult) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSRouteResult.signing_id": x.SigningId = uint64(0) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - x.DestinationChainId = "" - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - x.DestinationContractAddress = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", fd.FullName())) } } @@ -653,22 +629,16 @@ func (x *fastReflection_TSSPacketContent) Clear(fd protoreflect.FieldDescriptor) // 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_TSSPacketContent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TSSRouteResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSRouteResult.signing_id": value := x.SigningId return protoreflect.ValueOfUint64(value) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - value := x.DestinationChainId - return protoreflect.ValueOfString(value) - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - value := x.DestinationContractAddress - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", descriptor.FullName())) } } @@ -682,19 +652,15 @@ func (x *fastReflection_TSSPacketContent) Get(descriptor protoreflect.FieldDescr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TSSRouteResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSRouteResult.signing_id": x.SigningId = value.Uint() - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - x.DestinationChainId = value.Interface().(string) - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - x.DestinationContractAddress = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", fd.FullName())) } } @@ -708,48 +674,40 @@ func (x *fastReflection_TSSPacketContent) Set(fd protoreflect.FieldDescriptor, v // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSPacketContent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TSSRouteResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": - panic(fmt.Errorf("field signing_id of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - panic(fmt.Errorf("field destination_chain_id of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - panic(fmt.Errorf("field destination_contract_address of message band.tunnel.v1beta1.TSSPacketContent is not mutable")) + case "band.tunnel.v1beta1.TSSRouteResult.signing_id": + panic(fmt.Errorf("field signing_id of message band.tunnel.v1beta1.TSSRouteResult is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult 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_TSSPacketContent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TSSRouteResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSPacketContent.signing_id": + case "band.tunnel.v1beta1.TSSRouteResult.signing_id": return protoreflect.ValueOfUint64(uint64(0)) - case "band.tunnel.v1beta1.TSSPacketContent.destination_chain_id": - return protoreflect.ValueOfString("") - case "band.tunnel.v1beta1.TSSPacketContent.destination_contract_address": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketContent")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketContent does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult 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_TSSPacketContent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TSSRouteResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSPacketContent", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSRouteResult", d.FullName())) } panic("unreachable") } @@ -757,7 +715,7 @@ func (x *fastReflection_TSSPacketContent) WhichOneof(d protoreflect.OneofDescrip // 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_TSSPacketContent) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TSSRouteResult) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -768,7 +726,7 @@ func (x *fastReflection_TSSPacketContent) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSPacketContent) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TSSRouteResult) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -780,7 +738,7 @@ func (x *fastReflection_TSSPacketContent) SetUnknown(fields protoreflect.RawFiel // 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_TSSPacketContent) IsValid() bool { +func (x *fastReflection_TSSRouteResult) IsValid() bool { return x != nil } @@ -790,9 +748,9 @@ func (x *fastReflection_TSSPacketContent) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TSSRouteResult) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TSSPacketContent) + x := input.Message.Interface().(*TSSRouteResult) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -807,14 +765,6 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { if x.SigningId != 0 { n += 1 + runtime.Sov(uint64(x.SigningId)) } - l = len(x.DestinationChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DestinationContractAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -825,7 +775,7 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TSSPacketContent) + x := input.Message.Interface().(*TSSRouteResult) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -844,20 +794,6 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.DestinationContractAddress) > 0 { - i -= len(x.DestinationContractAddress) - copy(dAtA[i:], x.DestinationContractAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationContractAddress))) - i-- - dAtA[i] = 0x1a - } - if len(x.DestinationChainId) > 0 { - i -= len(x.DestinationChainId) - copy(dAtA[i:], x.DestinationChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChainId))) - i-- - dAtA[i] = 0x12 - } if x.SigningId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.SigningId)) i-- @@ -874,7 +810,7 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TSSPacketContent) + x := input.Message.Interface().(*TSSRouteResult) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -906,10 +842,10 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketContent: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRouteResult: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRouteResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -931,70 +867,6 @@ func (x *fastReflection_TSSPacketContent) ProtoMethods() *protoiface.Methods { break } } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChainId", 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.DestinationChainId = 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 DestinationContractAddress", 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.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1089,22 +961,18 @@ func (x *TSSRoute) GetDestinationContractAddress() string { return "" } -// TSSPacketContent is the packet content for TSS -type TSSPacketContent struct { +// TSSRouteResult is the type for a TSS route result +type TSSRouteResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // signing_id is the signing ID SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` - // destination_chain_id is the destination chain ID - DestinationChainId string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } -func (x *TSSPacketContent) Reset() { - *x = TSSPacketContent{} +func (x *TSSRouteResult) Reset() { + *x = TSSRouteResult{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1112,38 +980,24 @@ func (x *TSSPacketContent) Reset() { } } -func (x *TSSPacketContent) String() string { +func (x *TSSRouteResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TSSPacketContent) ProtoMessage() {} +func (*TSSRouteResult) ProtoMessage() {} -// Deprecated: Use TSSPacketContent.ProtoReflect.Descriptor instead. -func (*TSSPacketContent) Descriptor() ([]byte, []int) { +// Deprecated: Use TSSRouteResult.ProtoReflect.Descriptor instead. +func (*TSSRouteResult) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{1} } -func (x *TSSPacketContent) GetSigningId() uint64 { +func (x *TSSRouteResult) GetSigningId() uint64 { if x != nil { return x.SigningId } return 0 } -func (x *TSSPacketContent) GetDestinationChainId() string { - if x != nil { - return x.DestinationChainId - } - return "" -} - -func (x *TSSPacketContent) GetDestinationContractAddress() string { - if x != nil { - return x.DestinationContractAddress - } - return "" -} - var File_band_tunnel_v1beta1_route_proto protoreflect.FileDescriptor var file_band_tunnel_v1beta1_route_proto_rawDesc = []byte{ @@ -1163,25 +1017,16 @@ var file_band_tunnel_v1beta1_route_proto_rawDesc = []byte{ 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0x9e, 0x02, 0x0a, - 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, - 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x48, 0x0a, - 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xe2, 0xde, 0x1f, - 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x44, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x49, 0x42, 0xdf, 0x01, + 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0x8e, 0x01, 0x0a, + 0x0e, 0x54, 0x53, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x3a, 0x10, 0xca, 0xb4, 0x2d, + 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x42, 0xdf, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, @@ -1213,8 +1058,8 @@ func file_band_tunnel_v1beta1_route_proto_rawDescGZIP() []byte { var file_band_tunnel_v1beta1_route_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_band_tunnel_v1beta1_route_proto_goTypes = []interface{}{ - (*TSSRoute)(nil), // 0: band.tunnel.v1beta1.TSSRoute - (*TSSPacketContent)(nil), // 1: band.tunnel.v1beta1.TSSPacketContent + (*TSSRoute)(nil), // 0: band.tunnel.v1beta1.TSSRoute + (*TSSRouteResult)(nil), // 1: band.tunnel.v1beta1.TSSRouteResult } var file_band_tunnel_v1beta1_route_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -1243,7 +1088,7 @@ func file_band_tunnel_v1beta1_route_proto_init() { } } file_band_tunnel_v1beta1_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TSSPacketContent); i { + switch v := v.(*TSSRouteResult); i { case 0: return &v.state case 1: diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index f1a86c4ae..490bbd700 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -2389,14 +2389,14 @@ func (x *_Packet_6_list) IsValid() bool { } var ( - md_Packet protoreflect.MessageDescriptor - fd_Packet_tunnel_id protoreflect.FieldDescriptor - fd_Packet_sequence protoreflect.FieldDescriptor - fd_Packet_prices protoreflect.FieldDescriptor - fd_Packet_packet_content protoreflect.FieldDescriptor - fd_Packet_base_fee protoreflect.FieldDescriptor - fd_Packet_route_fee protoreflect.FieldDescriptor - fd_Packet_created_at protoreflect.FieldDescriptor + md_Packet protoreflect.MessageDescriptor + fd_Packet_tunnel_id protoreflect.FieldDescriptor + fd_Packet_sequence protoreflect.FieldDescriptor + fd_Packet_prices protoreflect.FieldDescriptor + fd_Packet_route_result protoreflect.FieldDescriptor + fd_Packet_base_fee protoreflect.FieldDescriptor + fd_Packet_route_fee protoreflect.FieldDescriptor + fd_Packet_created_at protoreflect.FieldDescriptor ) func init() { @@ -2405,7 +2405,7 @@ func init() { fd_Packet_tunnel_id = md_Packet.Fields().ByName("tunnel_id") fd_Packet_sequence = md_Packet.Fields().ByName("sequence") fd_Packet_prices = md_Packet.Fields().ByName("prices") - fd_Packet_packet_content = md_Packet.Fields().ByName("packet_content") + fd_Packet_route_result = md_Packet.Fields().ByName("route_result") fd_Packet_base_fee = md_Packet.Fields().ByName("base_fee") fd_Packet_route_fee = md_Packet.Fields().ByName("route_fee") fd_Packet_created_at = md_Packet.Fields().ByName("created_at") @@ -2494,9 +2494,9 @@ func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.PacketContent != nil { - value := protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) - if !f(fd_Packet_packet_content, value) { + if x.RouteResult != nil { + value := protoreflect.ValueOfMessage(x.RouteResult.ProtoReflect()) + if !f(fd_Packet_route_result, value) { return } } @@ -2539,8 +2539,8 @@ func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { return x.Sequence != uint64(0) case "band.tunnel.v1beta1.Packet.prices": return len(x.Prices) != 0 - case "band.tunnel.v1beta1.Packet.packet_content": - return x.PacketContent != nil + case "band.tunnel.v1beta1.Packet.route_result": + return x.RouteResult != nil case "band.tunnel.v1beta1.Packet.base_fee": return len(x.BaseFee) != 0 case "band.tunnel.v1beta1.Packet.route_fee": @@ -2569,8 +2569,8 @@ func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { x.Sequence = uint64(0) case "band.tunnel.v1beta1.Packet.prices": x.Prices = nil - case "band.tunnel.v1beta1.Packet.packet_content": - x.PacketContent = nil + case "band.tunnel.v1beta1.Packet.route_result": + x.RouteResult = nil case "band.tunnel.v1beta1.Packet.base_fee": x.BaseFee = nil case "band.tunnel.v1beta1.Packet.route_fee": @@ -2605,8 +2605,8 @@ func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) pro } listValue := &_Packet_3_list{list: &x.Prices} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.Packet.packet_content": - value := x.PacketContent + case "band.tunnel.v1beta1.Packet.route_result": + value := x.RouteResult return protoreflect.ValueOfMessage(value.ProtoReflect()) case "band.tunnel.v1beta1.Packet.base_fee": if len(x.BaseFee) == 0 { @@ -2651,8 +2651,8 @@ func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value proto lv := value.List() clv := lv.(*_Packet_3_list) x.Prices = *clv.list - case "band.tunnel.v1beta1.Packet.packet_content": - x.PacketContent = value.Message().Interface().(*anypb.Any) + case "band.tunnel.v1beta1.Packet.route_result": + x.RouteResult = value.Message().Interface().(*anypb.Any) case "band.tunnel.v1beta1.Packet.base_fee": lv := value.List() clv := lv.(*_Packet_5_list) @@ -2689,11 +2689,11 @@ func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Packet_3_list{list: &x.Prices} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.Packet.packet_content": - if x.PacketContent == nil { - x.PacketContent = new(anypb.Any) + case "band.tunnel.v1beta1.Packet.route_result": + if x.RouteResult == nil { + x.RouteResult = new(anypb.Any) } - return protoreflect.ValueOfMessage(x.PacketContent.ProtoReflect()) + return protoreflect.ValueOfMessage(x.RouteResult.ProtoReflect()) case "band.tunnel.v1beta1.Packet.base_fee": if x.BaseFee == nil { x.BaseFee = []*v1beta1.Coin{} @@ -2732,7 +2732,7 @@ func (x *fastReflection_Packet) NewField(fd protoreflect.FieldDescriptor) protor case "band.tunnel.v1beta1.Packet.prices": list := []*v1beta11.Price{} return protoreflect.ValueOfList(&_Packet_3_list{list: &list}) - case "band.tunnel.v1beta1.Packet.packet_content": + case "band.tunnel.v1beta1.Packet.route_result": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "band.tunnel.v1beta1.Packet.base_fee": @@ -2824,8 +2824,8 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.PacketContent != nil { - l = options.Size(x.PacketContent) + if x.RouteResult != nil { + l = options.Size(x.RouteResult) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.BaseFee) > 0 { @@ -2909,8 +2909,8 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x2a } } - if x.PacketContent != nil { - encoded, err := options.Marshal(x.PacketContent) + if x.RouteResult != nil { + encoded, err := options.Marshal(x.RouteResult) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3072,7 +3072,7 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PacketContent", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RouteResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3099,10 +3099,10 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.PacketContent == nil { - x.PacketContent = &anypb.Any{} + if x.RouteResult == nil { + x.RouteResult = &anypb.Any{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PacketContent); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RouteResult); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -4594,8 +4594,8 @@ type Packet struct { Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // prices is the list of prices information from feeds module. Prices []*v1beta11.Price `protobuf:"bytes,3,rep,name=prices,proto3" json:"prices,omitempty"` - // packet_content is the content of the packet that implements PacketContentI - PacketContent *anypb.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + // route_result represents the outcome of the packet delivery, implementing the RouteResultI interface. + RouteResult *anypb.Any `protobuf:"bytes,4,opt,name=route_result,json=routeResult,proto3" json:"route_result,omitempty"` // base_fee is the base fee of the packet BaseFee []*v1beta1.Coin `protobuf:"bytes,5,rep,name=base_fee,json=baseFee,proto3" json:"base_fee,omitempty"` // route_fee is the route fee of the packet @@ -4645,9 +4645,9 @@ func (x *Packet) GetPrices() []*v1beta11.Price { return nil } -func (x *Packet) GetPacketContent() *anypb.Any { +func (x *Packet) GetRouteResult() *anypb.Any { if x != nil { - return x.PacketContent + return x.RouteResult } return nil } @@ -4854,7 +4854,7 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, - 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x63, + 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc4, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, @@ -4863,68 +4863,68 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x49, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, - 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x68, 0x0a, 0x09, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, - 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x08, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x03, 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, - 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, - 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, - 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, - 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, - 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, - 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, - 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, - 0x01, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, - 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, - 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x04, 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, + 0x10, 0xca, 0xb4, 0x2d, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x49, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x66, + 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, + 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, + 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, + 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x68, 0x0a, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, + 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, + 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, + 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, + 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, + 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x62, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, + 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, + 0x10, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, + 0x73, 0x12, 0x42, 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, + 0xde, 0x1f, 0x10, 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x50, 0x53, 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xe0, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, + 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, + 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, + 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4960,7 +4960,7 @@ var file_band_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ 9, // 4: band.tunnel.v1beta1.LatestPrices.prices:type_name -> band.feeds.v1beta1.Price 8, // 5: band.tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin 9, // 6: band.tunnel.v1beta1.Packet.prices:type_name -> band.feeds.v1beta1.Price - 6, // 7: band.tunnel.v1beta1.Packet.packet_content:type_name -> google.protobuf.Any + 6, // 7: band.tunnel.v1beta1.Packet.route_result:type_name -> google.protobuf.Any 8, // 8: band.tunnel.v1beta1.Packet.base_fee:type_name -> cosmos.base.v1beta1.Coin 8, // 9: band.tunnel.v1beta1.Packet.route_fee:type_name -> cosmos.base.v1beta1.Coin 8, // 10: band.tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin diff --git a/proto/band/tunnel/v1beta1/route.proto b/proto/band/tunnel/v1beta1/route.proto index 297d86209..38b4eff50 100644 --- a/proto/band/tunnel/v1beta1/route.proto +++ b/proto/band/tunnel/v1beta1/route.proto @@ -17,17 +17,13 @@ message TSSRoute { string destination_contract_address = 2; } -// TSSPacketContent is the packet content for TSS -message TSSPacketContent { - option (cosmos_proto.implements_interface) = "PacketContentI"; +// TSSRouteResult is the type for a TSS route result +message TSSRouteResult { + option (cosmos_proto.implements_interface) = "RouteResultI"; // signing_id is the signing ID uint64 signing_id = 1 [ (gogoproto.customname) = "SigningID", (gogoproto.casttype) = "github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" ]; - // destination_chain_id is the destination chain ID - string destination_chain_id = 2 [(gogoproto.customname) = "DestinationChainID"]; - // destination_contract_address is the destination contract address - string destination_contract_address = 3; } diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index 39f0bbdee..bf80bdae8 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -73,8 +73,8 @@ message Packet { uint64 sequence = 2; // prices is the list of prices information from feeds module. repeated band.feeds.v1beta1.Price prices = 3 [(gogoproto.nullable) = false]; - // packet_content is the content of the packet that implements PacketContentI - google.protobuf.Any packet_content = 4 [(cosmos_proto.accepts_interface) = "PacketContentI"]; + // route_result represents the outcome of the packet delivery, implementing the RouteResultI interface. + google.protobuf.Any route_result = 4 [(cosmos_proto.accepts_interface) = "RouteResultI"]; // base_fee is the base fee of the packet repeated cosmos.base.v1beta1.Coin base_fee = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index 800d0e339..4cea57e78 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -72,22 +72,16 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { TunnelID: 2, Sequence: 1, } - err = packet1.SetPacketContent(&types.TSSPacketContent{ - SigningID: 1, - DestinationChainID: r.DestinationChainID, - DestinationContractAddress: r.DestinationContractAddress, + err = packet1.SetRouteResultValue(&types.TSSRouteResult{ + SigningID: 1, }) s.Require().NoError(err) - err = packet2.SetPacketContent(&types.TSSPacketContent{ - SigningID: 2, - DestinationChainID: r.DestinationChainID, - DestinationContractAddress: r.DestinationContractAddress, + err = packet2.SetRouteResultValue(&types.TSSRouteResult{ + SigningID: 2, }) s.Require().NoError(err) - err = packet3.SetPacketContent(&types.TSSPacketContent{ - SigningID: 3, - DestinationChainID: r.DestinationChainID, - DestinationContractAddress: r.DestinationContractAddress, + err = packet3.SetRouteResultValue(&types.TSSRouteResult{ + SigningID: 3, }) s.Require().NoError(err) @@ -125,10 +119,8 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { TunnelID: 1, Sequence: 1, } - err = packet1.SetPacketContent(&types.TSSPacketContent{ - SigningID: 1, - DestinationChainID: r.DestinationChainID, - DestinationContractAddress: r.DestinationContractAddress, + err = packet1.SetRouteResultValue(&types.TSSRouteResult{ + SigningID: 1, }) s.Require().NoError(err) k.SetPacket(ctx, packet1) @@ -137,11 +129,7 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { TunnelID: 1, Sequence: 2, } - err = packet2.SetPacketContent(&types.TSSPacketContent{ - SigningID: 2, - DestinationChainID: r.DestinationChainID, - DestinationContractAddress: r.DestinationContractAddress, - }) + err = packet2.SetRouteResultValue(&types.TSSRouteResult{}) s.Require().NoError(err) k.SetPacket(ctx, packet2) diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index db96afc25..485518432 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -212,12 +212,11 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { return err } - // get the packet content, which is the information receiving after - // sending packet to the destination route - var content types.PacketContentI + // send packet to the destination route and get the route result + var result types.RouteResultI switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - content, err = k.SendTSSPacket(ctx, r, packet) + result, err = k.SendTSSPacket(ctx, r, packet) default: return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } @@ -226,9 +225,14 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { return err } - // set the packet content - if err := packet.SetPacketContent(content); err != nil { - return sdkerrors.Wrapf(err, "failed to set packet content for tunnel ID: %d", tunnel.ID) + // set route result to the packet + if err := packet.SetRouteResultValue(result); err != nil { + return sdkerrors.Wrapf( + err, + "failed to set route result for tunnel %d, sequence %d", + packet.TunnelID, + packet.Sequence, + ) } k.SetPacket(ctx, packet) diff --git a/x/tunnel/keeper/keeper_tss_packet.go b/x/tunnel/keeper/keeper_tss_packet.go index abe80e240..e088c26c4 100644 --- a/x/tunnel/keeper/keeper_tss_packet.go +++ b/x/tunnel/keeper/keeper_tss_packet.go @@ -11,14 +11,12 @@ func (k Keeper) SendTSSPacket( ctx sdk.Context, route *types.TSSRoute, packet types.Packet, -) (types.PacketContentI, error) { +) (types.RouteResultI, error) { // TODO: Implement TSS packet handler logic // Sign TSS packet - return &types.TSSPacketContent{ - SigningID: 1, - DestinationChainID: route.DestinationChainID, - DestinationContractAddress: route.DestinationContractAddress, + return &types.TSSRouteResult{ + SigningID: 1, }, nil } diff --git a/x/tunnel/keeper/keeper_tss_packet_test.go b/x/tunnel/keeper/keeper_tss_packet_test.go index d35a5bcc7..706b921e3 100644 --- a/x/tunnel/keeper/keeper_tss_packet_test.go +++ b/x/tunnel/keeper/keeper_tss_packet_test.go @@ -29,9 +29,7 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { content, err := k.SendTSSPacket(ctx, &route, packet) s.Require().NoError(err) - packetContent, ok := content.(*types.TSSPacketContent) + packetContent, ok := content.(*types.TSSRouteResult) s.Require().True(ok) - s.Require().Equal("chain-1", packetContent.DestinationChainID) - s.Require().Equal("0x1234567890abcdef", packetContent.DestinationContractAddress) s.Require().Equal(bandtsstypes.SigningID(1), packetContent.SigningID) } diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index f878023e2..1725fd5aa 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -29,8 +29,9 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterInterface((*RouteI)(nil), nil) cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) - cdc.RegisterInterface((*PacketContentI)(nil), nil) - cdc.RegisterConcrete(&TSSPacketContent{}, "tunnel/TSSPacketContent", nil) + cdc.RegisterInterface((*RouteResultI)(nil), nil) + cdc.RegisterConcrete(&TSSRouteResult{}, "tunnel/TSSRouteResult", nil) + cdc.RegisterConcrete(Params{}, "tunnel/Params", nil) } @@ -55,9 +56,9 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { ) registry.RegisterInterface( - "tunnel.v1beta1.PacketContentI", - (*PacketContentI)(nil), - &TSSPacketContent{}, + "tunnel.v1beta1.RouteResultI", + (*RouteResultI)(nil), + &TSSRouteResult{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index 7b14aa6c7..d25f8c2f4 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -13,7 +13,7 @@ var ( ErrTunnelNotFound = errorsmod.Register(ModuleName, 6, "tunnel not found") ErrLatestPricesNotFound = errorsmod.Register(ModuleName, 7, "latest prices not found") ErrPacketNotFound = errorsmod.Register(ModuleName, 8, "packet not found") - ErrNoPacketContent = errorsmod.Register(ModuleName, 9, "no packet content") + ErrNoRouteResult = errorsmod.Register(ModuleName, 9, "no route result") ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 10, "invalid creator of the tunnel") ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 8b3d3599c..69412a1d4 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -18,39 +18,39 @@ func NewPacket( createdAt int64, ) Packet { return Packet{ - TunnelID: tunnelID, - Sequence: sequence, - Prices: prices, - PacketContent: nil, - BaseFee: baseFee, - RouteFee: routeFee, - CreatedAt: createdAt, + TunnelID: tunnelID, + Sequence: sequence, + Prices: prices, + RouteResult: nil, + BaseFee: baseFee, + RouteFee: routeFee, + CreatedAt: createdAt, } } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (p Packet) UnpackInterfaces(unpacker types.AnyUnpacker) error { - var packetContent PacketContentI - return unpacker.UnpackAny(p.PacketContent, &packetContent) + var routeResult RouteResultI + return unpacker.UnpackAny(p.RouteResult, &routeResult) } -// SetPacketContent sets the packet content of the packet. -func (p *Packet) SetPacketContent(packetContent PacketContentI) error { - any, err := types.NewAnyWithValue(packetContent) +// SetRouteResultValue sets the route result of the packet. +func (p *Packet) SetRouteResultValue(routeResult RouteResultI) error { + any, err := types.NewAnyWithValue(routeResult) if err != nil { return err } - p.PacketContent = any + p.RouteResult = any return nil } -// GetContent returns the content of the packet. -func (p Packet) GetContent() (PacketContentI, error) { - packetContent, ok := p.PacketContent.GetCachedValue().(PacketContentI) +// GetRouteResultValue returns the route result of the packet. +func (p Packet) GetRouteResultValue() (RouteResultI, error) { + routeResult, ok := p.RouteResult.GetCachedValue().(RouteResultI) if !ok { - return nil, ErrNoPacketContent.Wrapf("tunnelID: %d, sequence: %d", p.TunnelID, p.Sequence) + return nil, ErrNoRouteResult.Wrapf("tunnelID: %d, sequence: %d", p.TunnelID, p.Sequence) } - return packetContent, nil + return routeResult, nil } diff --git a/x/tunnel/types/packet_content.go b/x/tunnel/types/packet_content.go deleted file mode 100644 index a6f9c8221..000000000 --- a/x/tunnel/types/packet_content.go +++ /dev/null @@ -1,8 +0,0 @@ -package types - -import "github.com/cosmos/gogoproto/proto" - -// PacketContentI defines the interface for packet content. -type PacketContentI interface { - proto.Message -} diff --git a/x/tunnel/types/packet_test.go b/x/tunnel/types/packet_test.go index 6d757c132..79e3a46e5 100644 --- a/x/tunnel/types/packet_test.go +++ b/x/tunnel/types/packet_test.go @@ -10,34 +10,24 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func TestPacket_SetPacketContent(t *testing.T) { +func TestGetSetRouteResultValue(t *testing.T) { packet := types.NewPacket(1, 1, nil, nil, nil, 0) - packetContent := &types.TSSPacketContent{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} + routeResult := &types.TSSRouteResult{SigningID: 1} - err := packet.SetPacketContent(packetContent) - require.NoError(t, err) - require.NotNil(t, packet.PacketContent) - require.Equal(t, packetContent, packet.PacketContent.GetCachedValue()) -} - -func TestPacket_GetContent(t *testing.T) { - packet := types.NewPacket(1, 1, nil, nil, nil, 0) - packetContent := &types.TSSPacketContent{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} - - err := packet.SetPacketContent(packetContent) + err := packet.SetRouteResultValue(routeResult) require.NoError(t, err) + require.NotNil(t, packet.RouteResult) - content, err := packet.GetContent() + result, err := packet.GetRouteResultValue() require.NoError(t, err) - require.NotNil(t, content) - require.Equal(t, packetContent, content) + require.Equal(t, routeResult, result) } -func TestPacket_UnpackInterfaces(t *testing.T) { +func TestRouteUnpackInterfaces(t *testing.T) { packet := types.NewPacket(1, 1, nil, nil, nil, 0) - packetContent := &types.TSSPacketContent{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} + packetResult := &types.TSSRouteResult{SigningID: 1} - err := packet.SetPacketContent(packetContent) + err := packet.SetRouteResultValue(packetResult) require.NoError(t, err) unpacker := codectypes.NewInterfaceRegistry() diff --git a/x/tunnel/types/route.pb.go b/x/tunnel/types/route.pb.go index 9fc16ebc3..ad9ffcda6 100644 --- a/x/tunnel/types/route.pb.go +++ b/x/tunnel/types/route.pb.go @@ -80,28 +80,24 @@ func (m *TSSRoute) GetDestinationContractAddress() string { return "" } -// TSSPacketContent is the packet content for TSS -type TSSPacketContent struct { +// TSSRouteResult is the type for a TSS route result +type TSSRouteResult struct { // signing_id is the signing ID SigningID github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" json:"signing_id,omitempty"` - // destination_chain_id is the destination chain ID - DestinationChainID string `protobuf:"bytes,2,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` - // destination_contract_address is the destination contract address - DestinationContractAddress string `protobuf:"bytes,3,opt,name=destination_contract_address,json=destinationContractAddress,proto3" json:"destination_contract_address,omitempty"` } -func (m *TSSPacketContent) Reset() { *m = TSSPacketContent{} } -func (m *TSSPacketContent) String() string { return proto.CompactTextString(m) } -func (*TSSPacketContent) ProtoMessage() {} -func (*TSSPacketContent) Descriptor() ([]byte, []int) { +func (m *TSSRouteResult) Reset() { *m = TSSRouteResult{} } +func (m *TSSRouteResult) String() string { return proto.CompactTextString(m) } +func (*TSSRouteResult) ProtoMessage() {} +func (*TSSRouteResult) Descriptor() ([]byte, []int) { return fileDescriptor_543238289d94b7a6, []int{1} } -func (m *TSSPacketContent) XXX_Unmarshal(b []byte) error { +func (m *TSSRouteResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TSSPacketContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TSSRouteResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TSSPacketContent.Marshal(b, m, deterministic) + return xxx_messageInfo_TSSRouteResult.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -111,71 +107,56 @@ func (m *TSSPacketContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *TSSPacketContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_TSSPacketContent.Merge(m, src) +func (m *TSSRouteResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_TSSRouteResult.Merge(m, src) } -func (m *TSSPacketContent) XXX_Size() int { +func (m *TSSRouteResult) XXX_Size() int { return m.Size() } -func (m *TSSPacketContent) XXX_DiscardUnknown() { - xxx_messageInfo_TSSPacketContent.DiscardUnknown(m) +func (m *TSSRouteResult) XXX_DiscardUnknown() { + xxx_messageInfo_TSSRouteResult.DiscardUnknown(m) } -var xxx_messageInfo_TSSPacketContent proto.InternalMessageInfo +var xxx_messageInfo_TSSRouteResult proto.InternalMessageInfo -func (m *TSSPacketContent) GetSigningID() github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID { +func (m *TSSRouteResult) GetSigningID() github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID { if m != nil { return m.SigningID } return 0 } -func (m *TSSPacketContent) GetDestinationChainID() string { - if m != nil { - return m.DestinationChainID - } - return "" -} - -func (m *TSSPacketContent) GetDestinationContractAddress() string { - if m != nil { - return m.DestinationContractAddress - } - return "" -} - func init() { proto.RegisterType((*TSSRoute)(nil), "band.tunnel.v1beta1.TSSRoute") - proto.RegisterType((*TSSPacketContent)(nil), "band.tunnel.v1beta1.TSSPacketContent") + proto.RegisterType((*TSSRouteResult)(nil), "band.tunnel.v1beta1.TSSRouteResult") } func init() { proto.RegisterFile("band/tunnel/v1beta1/route.proto", fileDescriptor_543238289d94b7a6) } var fileDescriptor_543238289d94b7a6 = []byte{ - // 360 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4a, 0xcc, 0x4b, - 0xd1, 0x2f, 0x29, 0xcd, 0xcb, 0x4b, 0xcd, 0xd1, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, - 0x2f, 0xca, 0x2f, 0x2d, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x06, 0x29, 0xd0, - 0x83, 0x28, 0xd0, 0x83, 0x2a, 0x90, 0x92, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x8e, 0x07, 0x2b, - 0xd1, 0x87, 0x70, 0x20, 0xea, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0x21, 0xe2, 0x20, 0x16, 0x44, - 0x54, 0x69, 0x11, 0x23, 0x17, 0x47, 0x48, 0x70, 0x70, 0x10, 0xc8, 0x60, 0x21, 0x0f, 0x2e, 0x91, - 0x94, 0xd4, 0xe2, 0x92, 0xcc, 0xbc, 0xc4, 0x92, 0xcc, 0xfc, 0xbc, 0xf8, 0xe4, 0x8c, 0xc4, 0xcc, - 0xbc, 0xf8, 0xcc, 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xb1, 0x47, 0xf7, 0xe4, 0x85, - 0x5c, 0x10, 0xf2, 0xce, 0x20, 0x69, 0x4f, 0x97, 0x20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f0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xf4, 0x89, 0x08, - 0x04, 0x68, 0x42, 0x03, 0x87, 0x41, 0x12, 0x1b, 0x58, 0x85, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, - 0xad, 0xb3, 0xc7, 0x86, 0x84, 0x02, 0x00, 0x00, + // 344 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xb1, 0x4e, 0xf3, 0x30, + 0x14, 0x85, 0xeb, 0x5f, 0xbf, 0x2a, 0x6a, 0x21, 0x84, 0x42, 0x85, 0x4a, 0x85, 0x1c, 0xd4, 0x89, + 0xa5, 0xb1, 0xaa, 0x6e, 0x9d, 0xa0, 0x74, 0x20, 0x42, 0x2c, 0x29, 0x13, 0x4b, 0x94, 0xc4, 0x56, + 0x6a, 0xd4, 0xda, 0x55, 0xec, 0x54, 0xf0, 0x12, 0x88, 0x67, 0x60, 0xe2, 0x01, 0xfa, 0x10, 0xa8, + 0x53, 0x47, 0xa6, 0x0a, 0xa5, 0x6f, 0xc1, 0x84, 0x6c, 0xa7, 0x50, 0x98, 0xd8, 0xec, 0x73, 0xbf, + 0x7b, 0xee, 0xb9, 0x36, 0x74, 0xe3, 0x88, 0x13, 0xac, 0x72, 0xce, 0xe9, 0x18, 0xcf, 0x3a, 0x31, + 0x55, 0x51, 0x07, 0x67, 0x22, 0x57, 0xd4, 0x9b, 0x66, 0x42, 0x09, 0xe7, 0x40, 0x03, 0x9e, 0x05, + 0xbc, 0x12, 0x68, 0x1e, 0x25, 0x42, 0x4e, 0x84, 0x0c, 0x0d, 0x82, 0xed, 0xc5, 0xf2, 0xcd, 0x7a, + 0x2a, 0x52, 0x61, 0x75, 0x7d, 0xb2, 0x6a, 0xeb, 0x19, 0xc0, 0x9d, 0x9b, 0xe1, 0x30, 0xd0, 0xc6, + 0xce, 0x25, 0xac, 0x13, 0x2a, 0x15, 0xe3, 0x91, 0x62, 0x82, 0x87, 0xc9, 0x28, 0x62, 0x3c, 0x64, + 0xa4, 0x01, 0x4e, 0xc0, 0x69, 0xad, 0x7f, 0x58, 0xac, 0x5c, 0x67, 0xf0, 0x5d, 0xbf, 0xd0, 0x65, + 0x7f, 0x10, 0x38, 0xe4, 0xb7, 0x46, 0x9c, 0x33, 0x78, 0xfc, 0xc3, 0x49, 0x70, 0x95, 0x45, 0x89, + 0x0a, 0x23, 0x42, 0x32, 0x2a, 0x65, 0xe3, 0x9f, 0x76, 0x0c, 0x9a, 0xdb, 0x9d, 0x25, 0x72, 0x6e, + 0x89, 0x1e, 0x5c, 0xcc, 0xdb, 0x55, 0x13, 0xcb, 0x6f, 0x3d, 0x02, 0xb8, 0xb7, 0x09, 0x19, 0x50, + 0x99, 0x8f, 0x95, 0x73, 0x07, 0xa1, 0x64, 0x29, 0x67, 0x3c, 0xdd, 0x04, 0xfc, 0xdf, 0xbf, 0x2a, + 0x56, 0x6e, 0x6d, 0x68, 0x55, 0x7f, 0xf0, 0xb1, 0x72, 0x7b, 0x29, 0x53, 0xa3, 0x3c, 0xf6, 0x12, + 0x31, 0xc1, 0xfa, 0xb5, 0xcc, 0xca, 0x89, 0x18, 0x63, 0xb3, 0x19, 0x9e, 0x75, 0xf1, 0xbd, 0xd1, + 0x95, 0x94, 0x58, 0x3d, 0x4c, 0xa9, 0xf4, 0xbe, 0xba, 0x83, 0x5a, 0x69, 0xef, 0x93, 0xde, 0xfe, + 0x62, 0xde, 0xde, 0xdd, 0x1a, 0xee, 0xf7, 0xaf, 0x5f, 0x0a, 0x04, 0x5e, 0x0b, 0x04, 0x96, 0x05, + 0x02, 0xef, 0x05, 0x02, 0x4f, 0x6b, 0x54, 0x59, 0xae, 0x51, 0xe5, 0x6d, 0x8d, 0x2a, 0xb7, 0xf8, + 0x0f, 0x63, 0xcb, 0x8f, 0x35, 0x53, 0xe3, 0xaa, 0x21, 0xba, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x5b, 0xb7, 0xbb, 0xfc, 0xf4, 0x01, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -205,14 +186,14 @@ func (this *TSSRoute) Equal(that interface{}) bool { } return true } -func (this *TSSPacketContent) Equal(that interface{}) bool { +func (this *TSSRouteResult) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*TSSPacketContent) + that1, ok := that.(*TSSRouteResult) if !ok { - that2, ok := that.(TSSPacketContent) + that2, ok := that.(TSSRouteResult) if ok { that1 = &that2 } else { @@ -227,12 +208,6 @@ func (this *TSSPacketContent) Equal(that interface{}) bool { if this.SigningID != that1.SigningID { return false } - if this.DestinationChainID != that1.DestinationChainID { - return false - } - if this.DestinationContractAddress != that1.DestinationContractAddress { - return false - } return true } func (m *TSSRoute) Marshal() (dAtA []byte, err error) { @@ -272,7 +247,7 @@ func (m *TSSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TSSPacketContent) Marshal() (dAtA []byte, err error) { +func (m *TSSRouteResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -282,30 +257,16 @@ func (m *TSSPacketContent) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TSSPacketContent) MarshalTo(dAtA []byte) (int, error) { +func (m *TSSRouteResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TSSPacketContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TSSRouteResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.DestinationContractAddress) > 0 { - i -= len(m.DestinationContractAddress) - copy(dAtA[i:], m.DestinationContractAddress) - i = encodeVarintRoute(dAtA, i, uint64(len(m.DestinationContractAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.DestinationChainID) > 0 { - i -= len(m.DestinationChainID) - copy(dAtA[i:], m.DestinationChainID) - i = encodeVarintRoute(dAtA, i, uint64(len(m.DestinationChainID))) - i-- - dAtA[i] = 0x12 - } if m.SigningID != 0 { i = encodeVarintRoute(dAtA, i, uint64(m.SigningID)) i-- @@ -342,7 +303,7 @@ func (m *TSSRoute) Size() (n int) { return n } -func (m *TSSPacketContent) Size() (n int) { +func (m *TSSRouteResult) Size() (n int) { if m == nil { return 0 } @@ -351,14 +312,6 @@ func (m *TSSPacketContent) Size() (n int) { if m.SigningID != 0 { n += 1 + sovRoute(uint64(m.SigningID)) } - l = len(m.DestinationChainID) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } - l = len(m.DestinationContractAddress) - if l > 0 { - n += 1 + l + sovRoute(uint64(l)) - } return n } @@ -482,7 +435,7 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { } return nil } -func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { +func (m *TSSRouteResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -505,10 +458,10 @@ func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TSSPacketContent: wiretype end group for non-group") + return fmt.Errorf("proto: TSSRouteResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TSSPacketContent: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TSSRouteResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -530,70 +483,6 @@ func (m *TSSPacketContent) Unmarshal(dAtA []byte) error { break } } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - 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 ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationContractAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRoute - } - 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 ErrInvalidLengthRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationContractAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRoute(dAtA[iNdEx:]) diff --git a/x/tunnel/types/route_result.go b/x/tunnel/types/route_result.go new file mode 100644 index 000000000..a05c21512 --- /dev/null +++ b/x/tunnel/types/route_result.go @@ -0,0 +1,8 @@ +package types + +import "github.com/cosmos/gogoproto/proto" + +// RouteResultI defines the interface for route result types. +type RouteResultI interface { + proto.Message +} diff --git a/x/tunnel/types/tss_route.go b/x/tunnel/types/route_tss.go similarity index 100% rename from x/tunnel/types/tss_route.go rename to x/tunnel/types/route_tss.go diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 276efda08..96bd529a4 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -283,8 +283,8 @@ type Packet struct { Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // prices is the list of prices information from feeds module. Prices []types1.Price `protobuf:"bytes,3,rep,name=prices,proto3" json:"prices"` - // packet_content is the content of the packet that implements PacketContentI - PacketContent *types.Any `protobuf:"bytes,4,opt,name=packet_content,json=packetContent,proto3" json:"packet_content,omitempty"` + // route_result represents the outcome of the packet delivery, implementing the RouteResultI interface. + RouteResult *types.Any `protobuf:"bytes,4,opt,name=route_result,json=routeResult,proto3" json:"route_result,omitempty"` // base_fee is the base fee of the packet BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` // route_fee is the route fee of the packet @@ -347,9 +347,9 @@ func (m *Packet) GetPrices() []types1.Price { return nil } -func (m *Packet) GetPacketContent() *types.Any { +func (m *Packet) GetRouteResult() *types.Any { if m != nil { - return m.PacketContent + return m.RouteResult } return nil } @@ -515,63 +515,63 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 888 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0x23, 0x45, - 0x10, 0x4e, 0xdb, 0x8e, 0x3d, 0xd3, 0xf9, 0x21, 0xdb, 0x44, 0x68, 0x36, 0x2b, 0x6c, 0x2b, 0x70, - 0x30, 0x48, 0x99, 0x61, 0xb3, 0xca, 0x22, 0x71, 0x8b, 0x37, 0x44, 0x58, 0x02, 0x11, 0x4d, 0x56, - 0x42, 0xe2, 0x32, 0x6a, 0xcf, 0x94, 0xed, 0xd6, 0x3a, 0xdd, 0xc3, 0x74, 0xdb, 0x22, 0x6f, 0xc0, - 0x91, 0x17, 0x40, 0xe2, 0xb8, 0xe2, 0xc4, 0x21, 0x8f, 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0xaa, 0x8b, 0x1c, 0x5f, 0xd0, 0x22, 0x5b, 0xce, 0x31, 0x5a, 0xf2, 0xe4, 0xd2, 0x5e, - 0xa6, 0xfb, 0xd5, 0xf3, 0x59, 0x13, 0xbd, 0x98, 0x35, 0xd1, 0xcb, 0x59, 0x13, 0xfd, 0x3d, 0x6b, - 0xa2, 0x1f, 0xaf, 0x9b, 0x2b, 0x2f, 0xaf, 0x9b, 0x2b, 0x7f, 0x5c, 0x37, 0x57, 0xbe, 0x8d, 0x5e, - 0xd1, 0x49, 0x8f, 0x8f, 0x79, 0xfa, 0xa9, 0x18, 0x47, 0xe9, 0x88, 0x32, 0x1e, 0x4d, 0x1f, 0x45, - 0xdf, 0x97, 0x7f, 0xfe, 0x46, 0xb4, 0x7e, 0xdd, 0x20, 0x1e, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, - 0x38, 0xd5, 0x86, 0xfa, 0x18, 0x08, 0x00, 0x00, + // 889 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xd8, 0xee, 0x7a, 0x77, 0xe2, 0x16, 0x77, 0x88, 0xd0, 0x36, 0x15, 0xb6, 0x15, 0x38, + 0x18, 0xa4, 0xec, 0xd2, 0x54, 0x29, 0x12, 0xb7, 0x98, 0x10, 0x61, 0x09, 0xa4, 0x68, 0x53, 0x09, + 0x89, 0xcb, 0x6a, 0xbc, 0xfb, 0x6c, 0x8f, 0xea, 0xec, 0x2c, 0x3b, 0xb3, 0x16, 0xf9, 0x06, 0x1c, + 0xf9, 0x02, 0x48, 0x1c, 0x2b, 0x4e, 0x1c, 0xf2, 0x11, 0x7a, 0xa8, 0x72, 0xaa, 0x38, 0x71, 0x40, + 0x01, 0x39, 0x07, 0xf8, 0x18, 0x68, 0xfe, 0xac, 0x8d, 0xa3, 0xd2, 0x2a, 0x52, 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d, 0x7c, 0xd1, 0x41, 0x2f, 0x17, 0x1d, 0xf4, 0x6a, 0xd1, 0x41, 0x7f, 0x2d, + 0x3a, 0xe8, 0xc7, 0xab, 0xce, 0xc6, 0xab, 0xab, 0xce, 0xc6, 0xef, 0x57, 0x9d, 0x8d, 0x6f, 0xc3, + 0xff, 0xe8, 0xa4, 0x06, 0x47, 0x3f, 0xfb, 0x84, 0xcf, 0xc2, 0x64, 0x4a, 0x59, 0x16, 0xce, 0x1f, + 0x87, 0xdf, 0x57, 0x7f, 0xfb, 0x5a, 0xb4, 0x91, 0xa3, 0x11, 0x8f, 0xff, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0xe5, 0x33, 0x1a, 0x44, 0x12, 0x08, 0x00, 0x00, } func (this *Tunnel) Equal(that interface{}) bool { @@ -735,7 +735,7 @@ func (this *Packet) Equal(that interface{}) bool { return false } } - if !this.PacketContent.Equal(that1.PacketContent) { + if !this.RouteResult.Equal(that1.RouteResult) { return false } if len(this.BaseFee) != len(that1.BaseFee) { @@ -1073,9 +1073,9 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if m.PacketContent != nil { + if m.RouteResult != nil { { - size, err := m.PacketContent.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.RouteResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1317,8 +1317,8 @@ func (m *Packet) Size() (n int) { n += 1 + l + sovTunnel(uint64(l)) } } - if m.PacketContent != nil { - l = m.PacketContent.Size() + if m.RouteResult != nil { + l = m.RouteResult.Size() n += 1 + l + sovTunnel(uint64(l)) } if len(m.BaseFee) > 0 { @@ -2028,7 +2028,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketContent", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RouteResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2055,10 +2055,10 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.PacketContent == nil { - m.PacketContent = &types.Any{} + if m.RouteResult == nil { + m.RouteResult = &types.Any{} } - if err := m.PacketContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.RouteResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From 64be226651d915302b37abfa3ead23ca63c9f0f2 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 22 Nov 2024 12:04:10 +0700 Subject: [PATCH 267/272] change route result to packet receipt --- api/band/tunnel/v1beta1/route.pulsar.go | 204 +++++++++++----------- api/band/tunnel/v1beta1/tunnel.pulsar.go | 193 ++++++++++---------- proto/band/tunnel/v1beta1/route.proto | 8 +- proto/band/tunnel/v1beta1/tunnel.proto | 4 +- x/tunnel/keeper/grpc_query_test.go | 10 +- x/tunnel/keeper/keeper_packet.go | 10 +- x/tunnel/keeper/keeper_tss_packet.go | 4 +- x/tunnel/keeper/keeper_tss_packet_test.go | 4 +- x/tunnel/types/codec.go | 10 +- x/tunnel/types/errors.go | 2 +- x/tunnel/types/packet.go | 36 ++-- x/tunnel/types/packet_receipt.go | 8 + x/tunnel/types/packet_test.go | 16 +- x/tunnel/types/route.pb.go | 102 +++++------ x/tunnel/types/route_result.go | 8 - x/tunnel/types/tunnel.pb.go | 140 +++++++-------- 16 files changed, 379 insertions(+), 380 deletions(-) create mode 100644 x/tunnel/types/packet_receipt.go delete mode 100644 x/tunnel/types/route_result.go diff --git a/api/band/tunnel/v1beta1/route.pulsar.go b/api/band/tunnel/v1beta1/route.pulsar.go index 666ff39d7..8b52f732f 100644 --- a/api/band/tunnel/v1beta1/route.pulsar.go +++ b/api/band/tunnel/v1beta1/route.pulsar.go @@ -499,25 +499,25 @@ func (x *fastReflection_TSSRoute) ProtoMethods() *protoiface.Methods { } var ( - md_TSSRouteResult protoreflect.MessageDescriptor - fd_TSSRouteResult_signing_id protoreflect.FieldDescriptor + md_TSSPacketReceipt protoreflect.MessageDescriptor + fd_TSSPacketReceipt_signing_id protoreflect.FieldDescriptor ) func init() { file_band_tunnel_v1beta1_route_proto_init() - md_TSSRouteResult = File_band_tunnel_v1beta1_route_proto.Messages().ByName("TSSRouteResult") - fd_TSSRouteResult_signing_id = md_TSSRouteResult.Fields().ByName("signing_id") + md_TSSPacketReceipt = File_band_tunnel_v1beta1_route_proto.Messages().ByName("TSSPacketReceipt") + fd_TSSPacketReceipt_signing_id = md_TSSPacketReceipt.Fields().ByName("signing_id") } -var _ protoreflect.Message = (*fastReflection_TSSRouteResult)(nil) +var _ protoreflect.Message = (*fastReflection_TSSPacketReceipt)(nil) -type fastReflection_TSSRouteResult TSSRouteResult +type fastReflection_TSSPacketReceipt TSSPacketReceipt -func (x *TSSRouteResult) ProtoReflect() protoreflect.Message { - return (*fastReflection_TSSRouteResult)(x) +func (x *TSSPacketReceipt) ProtoReflect() protoreflect.Message { + return (*fastReflection_TSSPacketReceipt)(x) } -func (x *TSSRouteResult) slowProtoReflect() protoreflect.Message { +func (x *TSSPacketReceipt) slowProtoReflect() protoreflect.Message { mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -529,43 +529,43 @@ func (x *TSSRouteResult) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_TSSRouteResult_messageType fastReflection_TSSRouteResult_messageType -var _ protoreflect.MessageType = fastReflection_TSSRouteResult_messageType{} +var _fastReflection_TSSPacketReceipt_messageType fastReflection_TSSPacketReceipt_messageType +var _ protoreflect.MessageType = fastReflection_TSSPacketReceipt_messageType{} -type fastReflection_TSSRouteResult_messageType struct{} +type fastReflection_TSSPacketReceipt_messageType struct{} -func (x fastReflection_TSSRouteResult_messageType) Zero() protoreflect.Message { - return (*fastReflection_TSSRouteResult)(nil) +func (x fastReflection_TSSPacketReceipt_messageType) Zero() protoreflect.Message { + return (*fastReflection_TSSPacketReceipt)(nil) } -func (x fastReflection_TSSRouteResult_messageType) New() protoreflect.Message { - return new(fastReflection_TSSRouteResult) +func (x fastReflection_TSSPacketReceipt_messageType) New() protoreflect.Message { + return new(fastReflection_TSSPacketReceipt) } -func (x fastReflection_TSSRouteResult_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TSSRouteResult +func (x fastReflection_TSSPacketReceipt_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TSSPacketReceipt } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_TSSRouteResult) Descriptor() protoreflect.MessageDescriptor { - return md_TSSRouteResult +func (x *fastReflection_TSSPacketReceipt) Descriptor() protoreflect.MessageDescriptor { + return md_TSSPacketReceipt } // 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_TSSRouteResult) Type() protoreflect.MessageType { - return _fastReflection_TSSRouteResult_messageType +func (x *fastReflection_TSSPacketReceipt) Type() protoreflect.MessageType { + return _fastReflection_TSSPacketReceipt_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_TSSRouteResult) New() protoreflect.Message { - return new(fastReflection_TSSRouteResult) +func (x *fastReflection_TSSPacketReceipt) New() protoreflect.Message { + return new(fastReflection_TSSPacketReceipt) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_TSSRouteResult) Interface() protoreflect.ProtoMessage { - return (*TSSRouteResult)(x) +func (x *fastReflection_TSSPacketReceipt) Interface() protoreflect.ProtoMessage { + return (*TSSPacketReceipt)(x) } // Range iterates over every populated field in an undefined order, @@ -573,10 +573,10 @@ func (x *fastReflection_TSSRouteResult) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_TSSRouteResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_TSSPacketReceipt) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.SigningId != uint64(0) { value := protoreflect.ValueOfUint64(x.SigningId) - if !f(fd_TSSRouteResult_signing_id, value) { + if !f(fd_TSSPacketReceipt_signing_id, value) { return } } @@ -593,15 +593,15 @@ func (x *fastReflection_TSSRouteResult) Range(f func(protoreflect.FieldDescripto // 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_TSSRouteResult) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_TSSPacketReceipt) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRouteResult.signing_id": + case "band.tunnel.v1beta1.TSSPacketReceipt.signing_id": return x.SigningId != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketReceipt")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketReceipt does not contain field %s", fd.FullName())) } } @@ -611,15 +611,15 @@ func (x *fastReflection_TSSRouteResult) Has(fd protoreflect.FieldDescriptor) boo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSRouteResult) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_TSSPacketReceipt) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRouteResult.signing_id": + case "band.tunnel.v1beta1.TSSPacketReceipt.signing_id": x.SigningId = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketReceipt")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketReceipt does not contain field %s", fd.FullName())) } } @@ -629,16 +629,16 @@ func (x *fastReflection_TSSRouteResult) Clear(fd protoreflect.FieldDescriptor) { // 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_TSSRouteResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TSSPacketReceipt) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "band.tunnel.v1beta1.TSSRouteResult.signing_id": + case "band.tunnel.v1beta1.TSSPacketReceipt.signing_id": value := x.SigningId return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketReceipt")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketReceipt does not contain field %s", descriptor.FullName())) } } @@ -652,15 +652,15 @@ func (x *fastReflection_TSSRouteResult) Get(descriptor protoreflect.FieldDescrip // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSRouteResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_TSSPacketReceipt) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRouteResult.signing_id": + case "band.tunnel.v1beta1.TSSPacketReceipt.signing_id": x.SigningId = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketReceipt")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketReceipt does not contain field %s", fd.FullName())) } } @@ -674,40 +674,40 @@ func (x *fastReflection_TSSRouteResult) Set(fd protoreflect.FieldDescriptor, val // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSRouteResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TSSPacketReceipt) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRouteResult.signing_id": - panic(fmt.Errorf("field signing_id of message band.tunnel.v1beta1.TSSRouteResult is not mutable")) + case "band.tunnel.v1beta1.TSSPacketReceipt.signing_id": + panic(fmt.Errorf("field signing_id of message band.tunnel.v1beta1.TSSPacketReceipt is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketReceipt")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketReceipt 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_TSSRouteResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_TSSPacketReceipt) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "band.tunnel.v1beta1.TSSRouteResult.signing_id": + case "band.tunnel.v1beta1.TSSPacketReceipt.signing_id": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSRouteResult")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: band.tunnel.v1beta1.TSSPacketReceipt")) } - panic(fmt.Errorf("message band.tunnel.v1beta1.TSSRouteResult does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message band.tunnel.v1beta1.TSSPacketReceipt 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_TSSRouteResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_TSSPacketReceipt) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSRouteResult", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in band.tunnel.v1beta1.TSSPacketReceipt", d.FullName())) } panic("unreachable") } @@ -715,7 +715,7 @@ func (x *fastReflection_TSSRouteResult) WhichOneof(d protoreflect.OneofDescripto // 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_TSSRouteResult) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_TSSPacketReceipt) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -726,7 +726,7 @@ func (x *fastReflection_TSSRouteResult) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TSSRouteResult) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_TSSPacketReceipt) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -738,7 +738,7 @@ func (x *fastReflection_TSSRouteResult) SetUnknown(fields protoreflect.RawFields // 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_TSSRouteResult) IsValid() bool { +func (x *fastReflection_TSSPacketReceipt) IsValid() bool { return x != nil } @@ -748,9 +748,9 @@ func (x *fastReflection_TSSRouteResult) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_TSSRouteResult) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_TSSPacketReceipt) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TSSRouteResult) + x := input.Message.Interface().(*TSSPacketReceipt) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -775,7 +775,7 @@ func (x *fastReflection_TSSRouteResult) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TSSRouteResult) + x := input.Message.Interface().(*TSSPacketReceipt) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -810,7 +810,7 @@ func (x *fastReflection_TSSRouteResult) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TSSRouteResult) + x := input.Message.Interface().(*TSSPacketReceipt) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -842,10 +842,10 @@ func (x *fastReflection_TSSRouteResult) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRouteResult: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketReceipt: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSRouteResult: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TSSPacketReceipt: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -915,7 +915,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// TSSRoute is the type for a TSS route +// TSSRoute represents a route for TSS packets and implements the RouteI interface. type TSSRoute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -961,8 +961,8 @@ func (x *TSSRoute) GetDestinationContractAddress() string { return "" } -// TSSRouteResult is the type for a TSS route result -type TSSRouteResult struct { +// TSSPacketReceipt represents a receipt for a TSS packet and implements the PacketReceiptI interface. +type TSSPacketReceipt struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -971,8 +971,8 @@ type TSSRouteResult struct { SigningId uint64 `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3" json:"signing_id,omitempty"` } -func (x *TSSRouteResult) Reset() { - *x = TSSRouteResult{} +func (x *TSSPacketReceipt) Reset() { + *x = TSSPacketReceipt{} if protoimpl.UnsafeEnabled { mi := &file_band_tunnel_v1beta1_route_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -980,18 +980,18 @@ func (x *TSSRouteResult) Reset() { } } -func (x *TSSRouteResult) String() string { +func (x *TSSPacketReceipt) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TSSRouteResult) ProtoMessage() {} +func (*TSSPacketReceipt) ProtoMessage() {} -// Deprecated: Use TSSRouteResult.ProtoReflect.Descriptor instead. -func (*TSSRouteResult) Descriptor() ([]byte, []int) { +// Deprecated: Use TSSPacketReceipt.ProtoReflect.Descriptor instead. +func (*TSSPacketReceipt) Descriptor() ([]byte, []int) { return file_band_tunnel_v1beta1_route_proto_rawDescGZIP(), []int{1} } -func (x *TSSRouteResult) GetSigningId() uint64 { +func (x *TSSPacketReceipt) GetSigningId() uint64 { if x != nil { return x.SigningId } @@ -1017,31 +1017,31 @@ var file_band_tunnel_v1beta1_route_proto_rawDesc = []byte{ 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0x8e, 0x01, 0x0a, - 0x0e, 0x54, 0x53, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, 0x73, 0x73, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x44, - 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x3a, 0x10, 0xca, 0xb4, 0x2d, - 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x42, 0xdf, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, - 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, - 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, - 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x3a, 0x0a, 0xca, 0xb4, 0x2d, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x22, 0x92, 0x01, 0x0a, + 0x10, 0x54, 0x53, 0x53, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x4b, 0xe2, 0xde, 0x1f, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x44, 0xfa, 0xde, 0x1f, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x74, + 0x73, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x49, 0x44, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x3a, 0x12, 0xca, + 0xb4, 0x2d, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x49, 0x42, 0xdf, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, + 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, + 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, + 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, + 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1058,8 +1058,8 @@ func file_band_tunnel_v1beta1_route_proto_rawDescGZIP() []byte { var file_band_tunnel_v1beta1_route_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_band_tunnel_v1beta1_route_proto_goTypes = []interface{}{ - (*TSSRoute)(nil), // 0: band.tunnel.v1beta1.TSSRoute - (*TSSRouteResult)(nil), // 1: band.tunnel.v1beta1.TSSRouteResult + (*TSSRoute)(nil), // 0: band.tunnel.v1beta1.TSSRoute + (*TSSPacketReceipt)(nil), // 1: band.tunnel.v1beta1.TSSPacketReceipt } var file_band_tunnel_v1beta1_route_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -1088,7 +1088,7 @@ func file_band_tunnel_v1beta1_route_proto_init() { } } file_band_tunnel_v1beta1_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TSSRouteResult); i { + switch v := v.(*TSSPacketReceipt); i { case 0: return &v.state case 1: diff --git a/api/band/tunnel/v1beta1/tunnel.pulsar.go b/api/band/tunnel/v1beta1/tunnel.pulsar.go index 490bbd700..c3492d4cf 100644 --- a/api/band/tunnel/v1beta1/tunnel.pulsar.go +++ b/api/band/tunnel/v1beta1/tunnel.pulsar.go @@ -2389,14 +2389,14 @@ func (x *_Packet_6_list) IsValid() bool { } var ( - md_Packet protoreflect.MessageDescriptor - fd_Packet_tunnel_id protoreflect.FieldDescriptor - fd_Packet_sequence protoreflect.FieldDescriptor - fd_Packet_prices protoreflect.FieldDescriptor - fd_Packet_route_result protoreflect.FieldDescriptor - fd_Packet_base_fee protoreflect.FieldDescriptor - fd_Packet_route_fee protoreflect.FieldDescriptor - fd_Packet_created_at protoreflect.FieldDescriptor + md_Packet protoreflect.MessageDescriptor + fd_Packet_tunnel_id protoreflect.FieldDescriptor + fd_Packet_sequence protoreflect.FieldDescriptor + fd_Packet_prices protoreflect.FieldDescriptor + fd_Packet_receipt protoreflect.FieldDescriptor + fd_Packet_base_fee protoreflect.FieldDescriptor + fd_Packet_route_fee protoreflect.FieldDescriptor + fd_Packet_created_at protoreflect.FieldDescriptor ) func init() { @@ -2405,7 +2405,7 @@ func init() { fd_Packet_tunnel_id = md_Packet.Fields().ByName("tunnel_id") fd_Packet_sequence = md_Packet.Fields().ByName("sequence") fd_Packet_prices = md_Packet.Fields().ByName("prices") - fd_Packet_route_result = md_Packet.Fields().ByName("route_result") + fd_Packet_receipt = md_Packet.Fields().ByName("receipt") fd_Packet_base_fee = md_Packet.Fields().ByName("base_fee") fd_Packet_route_fee = md_Packet.Fields().ByName("route_fee") fd_Packet_created_at = md_Packet.Fields().ByName("created_at") @@ -2494,9 +2494,9 @@ func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.RouteResult != nil { - value := protoreflect.ValueOfMessage(x.RouteResult.ProtoReflect()) - if !f(fd_Packet_route_result, value) { + if x.Receipt != nil { + value := protoreflect.ValueOfMessage(x.Receipt.ProtoReflect()) + if !f(fd_Packet_receipt, value) { return } } @@ -2539,8 +2539,8 @@ func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { return x.Sequence != uint64(0) case "band.tunnel.v1beta1.Packet.prices": return len(x.Prices) != 0 - case "band.tunnel.v1beta1.Packet.route_result": - return x.RouteResult != nil + case "band.tunnel.v1beta1.Packet.receipt": + return x.Receipt != nil case "band.tunnel.v1beta1.Packet.base_fee": return len(x.BaseFee) != 0 case "band.tunnel.v1beta1.Packet.route_fee": @@ -2569,8 +2569,8 @@ func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { x.Sequence = uint64(0) case "band.tunnel.v1beta1.Packet.prices": x.Prices = nil - case "band.tunnel.v1beta1.Packet.route_result": - x.RouteResult = nil + case "band.tunnel.v1beta1.Packet.receipt": + x.Receipt = nil case "band.tunnel.v1beta1.Packet.base_fee": x.BaseFee = nil case "band.tunnel.v1beta1.Packet.route_fee": @@ -2605,8 +2605,8 @@ func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) pro } listValue := &_Packet_3_list{list: &x.Prices} return protoreflect.ValueOfList(listValue) - case "band.tunnel.v1beta1.Packet.route_result": - value := x.RouteResult + case "band.tunnel.v1beta1.Packet.receipt": + value := x.Receipt return protoreflect.ValueOfMessage(value.ProtoReflect()) case "band.tunnel.v1beta1.Packet.base_fee": if len(x.BaseFee) == 0 { @@ -2651,8 +2651,8 @@ func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value proto lv := value.List() clv := lv.(*_Packet_3_list) x.Prices = *clv.list - case "band.tunnel.v1beta1.Packet.route_result": - x.RouteResult = value.Message().Interface().(*anypb.Any) + case "band.tunnel.v1beta1.Packet.receipt": + x.Receipt = value.Message().Interface().(*anypb.Any) case "band.tunnel.v1beta1.Packet.base_fee": lv := value.List() clv := lv.(*_Packet_5_list) @@ -2689,11 +2689,11 @@ func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Packet_3_list{list: &x.Prices} return protoreflect.ValueOfList(value) - case "band.tunnel.v1beta1.Packet.route_result": - if x.RouteResult == nil { - x.RouteResult = new(anypb.Any) + case "band.tunnel.v1beta1.Packet.receipt": + if x.Receipt == nil { + x.Receipt = new(anypb.Any) } - return protoreflect.ValueOfMessage(x.RouteResult.ProtoReflect()) + return protoreflect.ValueOfMessage(x.Receipt.ProtoReflect()) case "band.tunnel.v1beta1.Packet.base_fee": if x.BaseFee == nil { x.BaseFee = []*v1beta1.Coin{} @@ -2732,7 +2732,7 @@ func (x *fastReflection_Packet) NewField(fd protoreflect.FieldDescriptor) protor case "band.tunnel.v1beta1.Packet.prices": list := []*v1beta11.Price{} return protoreflect.ValueOfList(&_Packet_3_list{list: &list}) - case "band.tunnel.v1beta1.Packet.route_result": + case "band.tunnel.v1beta1.Packet.receipt": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "band.tunnel.v1beta1.Packet.base_fee": @@ -2824,8 +2824,8 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.RouteResult != nil { - l = options.Size(x.RouteResult) + if x.Receipt != nil { + l = options.Size(x.Receipt) n += 1 + l + runtime.Sov(uint64(l)) } if len(x.BaseFee) > 0 { @@ -2909,8 +2909,8 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x2a } } - if x.RouteResult != nil { - encoded, err := options.Marshal(x.RouteResult) + if x.Receipt != nil { + encoded, err := options.Marshal(x.Receipt) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3072,7 +3072,7 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RouteResult", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3099,10 +3099,10 @@ func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.RouteResult == nil { - x.RouteResult = &anypb.Any{} + if x.Receipt == nil { + x.Receipt = &anypb.Any{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RouteResult); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Receipt); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -4594,8 +4594,8 @@ type Packet struct { Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // prices is the list of prices information from feeds module. Prices []*v1beta11.Price `protobuf:"bytes,3,rep,name=prices,proto3" json:"prices,omitempty"` - // route_result represents the outcome of the packet delivery, implementing the RouteResultI interface. - RouteResult *anypb.Any `protobuf:"bytes,4,opt,name=route_result,json=routeResult,proto3" json:"route_result,omitempty"` + // receipt represents the confirmation of the packet delivery to the destination via the specified route. + Receipt *anypb.Any `protobuf:"bytes,4,opt,name=receipt,proto3" json:"receipt,omitempty"` // base_fee is the base fee of the packet BaseFee []*v1beta1.Coin `protobuf:"bytes,5,rep,name=base_fee,json=baseFee,proto3" json:"base_fee,omitempty"` // route_fee is the route fee of the packet @@ -4645,9 +4645,9 @@ func (x *Packet) GetPrices() []*v1beta11.Price { return nil } -func (x *Packet) GetRouteResult() *anypb.Any { +func (x *Packet) GetReceipt() *anypb.Any { if x != nil { - return x.RouteResult + return x.Receipt } return nil } @@ -4854,7 +4854,7 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x46, - 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xc4, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x63, + 0x65, 0x65, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xbd, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, @@ -4863,68 +4863,67 @@ var file_band_tunnel_v1beta1_tunnel_proto_rawDesc = []byte{ 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x04, 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, - 0x10, 0xca, 0xb4, 0x2d, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x49, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x66, - 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, - 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x68, 0x0a, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x63, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x04, + 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, 0x12, 0xca, 0xb4, 0x2d, 0x0e, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x49, 0x52, 0x07, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x03, 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, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, - 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, - 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, - 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, - 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, - 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, - 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, - 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x62, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, - 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, - 0x10, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, - 0x73, 0x12, 0x42, 0x0a, 0x12, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, - 0xde, 0x1f, 0x10, 0x48, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x50, 0x53, 0x52, 0x10, 0x68, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xe0, 0x01, 0x0a, 0x17, - 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, - 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, - 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, - 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, - 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, - 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, + 0x68, 0x0a, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x03, + 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, 0x30, 0xc8, + 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, + 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0c, 0xe2, 0xde, 0x1f, 0x08, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, + 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 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, 0x09, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x68, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x03, 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, 0x35, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0xca, 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, + 0xe2, 0xde, 0x1f, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x44, 0x52, 0x08, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x12, 0x73, 0x6f, 0x66, 0x74, 0x5f, 0x64, + 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x53, 0x6f, 0x66, 0x74, 0x44, 0x65, 0x76, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x73, 0x6f, 0x66, 0x74, 0x44, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x12, 0x68, 0x61, + 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x70, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xe2, 0xde, 0x1f, 0x10, 0x48, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x50, 0x53, 0x52, 0x10, 0x68, 0x61, + 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x73, 0x3a, 0x04, + 0xe8, 0xa0, 0x1f, 0x01, 0x42, 0xe0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x6e, + 0x64, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0b, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x6e, 0x64, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x2f, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x54, 0x58, 0xaa, 0x02, 0x13, + 0x42, 0x61, 0x6e, 0x64, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x42, 0x61, 0x6e, 0x64, + 0x5c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x42, 0x61, + 0x6e, 0x64, 0x3a, 0x3a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa8, 0xe2, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4960,7 +4959,7 @@ var file_band_tunnel_v1beta1_tunnel_proto_depIdxs = []int32{ 9, // 4: band.tunnel.v1beta1.LatestPrices.prices:type_name -> band.feeds.v1beta1.Price 8, // 5: band.tunnel.v1beta1.TotalFees.total_packet_fee:type_name -> cosmos.base.v1beta1.Coin 9, // 6: band.tunnel.v1beta1.Packet.prices:type_name -> band.feeds.v1beta1.Price - 6, // 7: band.tunnel.v1beta1.Packet.route_result:type_name -> google.protobuf.Any + 6, // 7: band.tunnel.v1beta1.Packet.receipt:type_name -> google.protobuf.Any 8, // 8: band.tunnel.v1beta1.Packet.base_fee:type_name -> cosmos.base.v1beta1.Coin 8, // 9: band.tunnel.v1beta1.Packet.route_fee:type_name -> cosmos.base.v1beta1.Coin 8, // 10: band.tunnel.v1beta1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin diff --git a/proto/band/tunnel/v1beta1/route.proto b/proto/band/tunnel/v1beta1/route.proto index 38b4eff50..ea3bc0079 100644 --- a/proto/band/tunnel/v1beta1/route.proto +++ b/proto/band/tunnel/v1beta1/route.proto @@ -7,7 +7,7 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/bandprotocol/chain/v3/x/tunnel/types"; option (gogoproto.equal_all) = true; -// TSSRoute is the type for a TSS route +// TSSRoute represents a route for TSS packets and implements the RouteI interface. message TSSRoute { option (cosmos_proto.implements_interface) = "RouteI"; @@ -17,9 +17,9 @@ message TSSRoute { string destination_contract_address = 2; } -// TSSRouteResult is the type for a TSS route result -message TSSRouteResult { - option (cosmos_proto.implements_interface) = "RouteResultI"; +// TSSPacketReceipt represents a receipt for a TSS packet and implements the PacketReceiptI interface. +message TSSPacketReceipt { + option (cosmos_proto.implements_interface) = "PacketReceiptI"; // signing_id is the signing ID uint64 signing_id = 1 [ diff --git a/proto/band/tunnel/v1beta1/tunnel.proto b/proto/band/tunnel/v1beta1/tunnel.proto index bf80bdae8..f1b0cb5e7 100644 --- a/proto/band/tunnel/v1beta1/tunnel.proto +++ b/proto/band/tunnel/v1beta1/tunnel.proto @@ -73,8 +73,8 @@ message Packet { uint64 sequence = 2; // prices is the list of prices information from feeds module. repeated band.feeds.v1beta1.Price prices = 3 [(gogoproto.nullable) = false]; - // route_result represents the outcome of the packet delivery, implementing the RouteResultI interface. - google.protobuf.Any route_result = 4 [(cosmos_proto.accepts_interface) = "RouteResultI"]; + // receipt represents the confirmation of the packet delivery to the destination via the specified route. + google.protobuf.Any receipt = 4 [(cosmos_proto.accepts_interface) = "PacketReceiptI"]; // base_fee is the base fee of the packet repeated cosmos.base.v1beta1.Coin base_fee = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index 4cea57e78..e0316fd66 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -72,15 +72,15 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { TunnelID: 2, Sequence: 1, } - err = packet1.SetRouteResultValue(&types.TSSRouteResult{ + err = packet1.SetReceiptValue(&types.TSSPacketReceipt{ SigningID: 1, }) s.Require().NoError(err) - err = packet2.SetRouteResultValue(&types.TSSRouteResult{ + err = packet2.SetReceiptValue(&types.TSSPacketReceipt{ SigningID: 2, }) s.Require().NoError(err) - err = packet3.SetRouteResultValue(&types.TSSRouteResult{ + err = packet3.SetReceiptValue(&types.TSSPacketReceipt{ SigningID: 3, }) s.Require().NoError(err) @@ -119,7 +119,7 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { TunnelID: 1, Sequence: 1, } - err = packet1.SetRouteResultValue(&types.TSSRouteResult{ + err = packet1.SetReceiptValue(&types.TSSPacketReceipt{ SigningID: 1, }) s.Require().NoError(err) @@ -129,7 +129,7 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { TunnelID: 1, Sequence: 2, } - err = packet2.SetRouteResultValue(&types.TSSRouteResult{}) + err = packet2.SetReceiptValue(&types.TSSPacketReceipt{}) s.Require().NoError(err) k.SetPacket(ctx, packet2) diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index 485518432..e6999f806 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -213,10 +213,10 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { } // send packet to the destination route and get the route result - var result types.RouteResultI + var receipt types.PacketReceiptI switch r := tunnel.Route.GetCachedValue().(type) { case *types.TSSRoute: - result, err = k.SendTSSPacket(ctx, r, packet) + receipt, err = k.SendTSSPacket(ctx, r, packet) default: return types.ErrInvalidRoute.Wrapf("no route found for tunnel ID: %d", tunnel.ID) } @@ -225,11 +225,11 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { return err } - // set route result to the packet - if err := packet.SetRouteResultValue(result); err != nil { + // set the receipt to the packet + if err := packet.SetReceiptValue(receipt); err != nil { return sdkerrors.Wrapf( err, - "failed to set route result for tunnel %d, sequence %d", + "failed to set packet receipt for tunnel %d, sequence %d", packet.TunnelID, packet.Sequence, ) diff --git a/x/tunnel/keeper/keeper_tss_packet.go b/x/tunnel/keeper/keeper_tss_packet.go index e088c26c4..9942d1bc6 100644 --- a/x/tunnel/keeper/keeper_tss_packet.go +++ b/x/tunnel/keeper/keeper_tss_packet.go @@ -11,12 +11,12 @@ func (k Keeper) SendTSSPacket( ctx sdk.Context, route *types.TSSRoute, packet types.Packet, -) (types.RouteResultI, error) { +) (types.PacketReceiptI, error) { // TODO: Implement TSS packet handler logic // Sign TSS packet - return &types.TSSRouteResult{ + return &types.TSSPacketReceipt{ SigningID: 1, }, nil } diff --git a/x/tunnel/keeper/keeper_tss_packet_test.go b/x/tunnel/keeper/keeper_tss_packet_test.go index 706b921e3..f58956c67 100644 --- a/x/tunnel/keeper/keeper_tss_packet_test.go +++ b/x/tunnel/keeper/keeper_tss_packet_test.go @@ -29,7 +29,7 @@ func (s *KeeperTestSuite) TestSendTSSPacket() { content, err := k.SendTSSPacket(ctx, &route, packet) s.Require().NoError(err) - packetContent, ok := content.(*types.TSSRouteResult) + packetReceipt, ok := content.(*types.TSSPacketReceipt) s.Require().True(ok) - s.Require().Equal(bandtsstypes.SigningID(1), packetContent.SigningID) + s.Require().Equal(bandtsstypes.SigningID(1), packetReceipt.SigningID) } diff --git a/x/tunnel/types/codec.go b/x/tunnel/types/codec.go index 1725fd5aa..c3d8d84b8 100644 --- a/x/tunnel/types/codec.go +++ b/x/tunnel/types/codec.go @@ -29,8 +29,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterInterface((*RouteI)(nil), nil) cdc.RegisterConcrete(&TSSRoute{}, "tunnel/TSSRoute", nil) - cdc.RegisterInterface((*RouteResultI)(nil), nil) - cdc.RegisterConcrete(&TSSRouteResult{}, "tunnel/TSSRouteResult", nil) + cdc.RegisterInterface((*PacketReceiptI)(nil), nil) + cdc.RegisterConcrete(&TSSPacketReceipt{}, "tunnel/TSSPacketReceipt", nil) cdc.RegisterConcrete(Params{}, "tunnel/Params", nil) } @@ -56,9 +56,9 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { ) registry.RegisterInterface( - "tunnel.v1beta1.RouteResultI", - (*RouteResultI)(nil), - &TSSRouteResult{}, + "tunnel.v1beta1.PacketReceiptI", + (*PacketReceiptI)(nil), + &TSSPacketReceipt{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index d25f8c2f4..badbb1605 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -13,7 +13,7 @@ var ( ErrTunnelNotFound = errorsmod.Register(ModuleName, 6, "tunnel not found") ErrLatestPricesNotFound = errorsmod.Register(ModuleName, 7, "latest prices not found") ErrPacketNotFound = errorsmod.Register(ModuleName, 8, "packet not found") - ErrNoRouteResult = errorsmod.Register(ModuleName, 9, "no route result") + ErrNoPacketReceipt = errorsmod.Register(ModuleName, 9, "no packet receipt") ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 10, "invalid creator of the tunnel") ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index 69412a1d4..ee3bef8f7 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -18,39 +18,39 @@ func NewPacket( createdAt int64, ) Packet { return Packet{ - TunnelID: tunnelID, - Sequence: sequence, - Prices: prices, - RouteResult: nil, - BaseFee: baseFee, - RouteFee: routeFee, - CreatedAt: createdAt, + TunnelID: tunnelID, + Sequence: sequence, + Prices: prices, + Receipt: nil, + BaseFee: baseFee, + RouteFee: routeFee, + CreatedAt: createdAt, } } // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (p Packet) UnpackInterfaces(unpacker types.AnyUnpacker) error { - var routeResult RouteResultI - return unpacker.UnpackAny(p.RouteResult, &routeResult) + var receipt PacketReceiptI + return unpacker.UnpackAny(p.Receipt, &receipt) } -// SetRouteResultValue sets the route result of the packet. -func (p *Packet) SetRouteResultValue(routeResult RouteResultI) error { - any, err := types.NewAnyWithValue(routeResult) +// SetReceiptValue sets the packet's receipt. +func (p *Packet) SetReceiptValue(receipt PacketReceiptI) error { + any, err := types.NewAnyWithValue(receipt) if err != nil { return err } - p.RouteResult = any + p.Receipt = any return nil } -// GetRouteResultValue returns the route result of the packet. -func (p Packet) GetRouteResultValue() (RouteResultI, error) { - routeResult, ok := p.RouteResult.GetCachedValue().(RouteResultI) +// GetReceiptValue returns the packet's receipt. +func (p Packet) GetReceiptValue() (PacketReceiptI, error) { + receipt, ok := p.Receipt.GetCachedValue().(PacketReceiptI) if !ok { - return nil, ErrNoRouteResult.Wrapf("tunnelID: %d, sequence: %d", p.TunnelID, p.Sequence) + return nil, ErrNoPacketReceipt.Wrapf("tunnelID: %d, sequence: %d", p.TunnelID, p.Sequence) } - return routeResult, nil + return receipt, nil } diff --git a/x/tunnel/types/packet_receipt.go b/x/tunnel/types/packet_receipt.go new file mode 100644 index 000000000..5ab313a28 --- /dev/null +++ b/x/tunnel/types/packet_receipt.go @@ -0,0 +1,8 @@ +package types + +import "github.com/cosmos/gogoproto/proto" + +// PacketReceiptI defines an interface for confirming the delivery of a packet to its destination via the specified route. +type PacketReceiptI interface { + proto.Message +} diff --git a/x/tunnel/types/packet_test.go b/x/tunnel/types/packet_test.go index 79e3a46e5..842fb8a9c 100644 --- a/x/tunnel/types/packet_test.go +++ b/x/tunnel/types/packet_test.go @@ -10,24 +10,24 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func TestGetSetRouteResultValue(t *testing.T) { +func TestGetSetPacketReceipt(t *testing.T) { packet := types.NewPacket(1, 1, nil, nil, nil, 0) - routeResult := &types.TSSRouteResult{SigningID: 1} + routeResult := &types.TSSPacketReceipt{SigningID: 1} - err := packet.SetRouteResultValue(routeResult) + err := packet.SetReceiptValue(routeResult) require.NoError(t, err) - require.NotNil(t, packet.RouteResult) + require.NotNil(t, packet.Receipt) - result, err := packet.GetRouteResultValue() + result, err := packet.GetReceiptValue() require.NoError(t, err) require.Equal(t, routeResult, result) } -func TestRouteUnpackInterfaces(t *testing.T) { +func TestPacketUnpackInterfaces(t *testing.T) { packet := types.NewPacket(1, 1, nil, nil, nil, 0) - packetResult := &types.TSSRouteResult{SigningID: 1} + packetResult := &types.TSSPacketReceipt{SigningID: 1} - err := packet.SetRouteResultValue(packetResult) + err := packet.SetReceiptValue(packetResult) require.NoError(t, err) unpacker := codectypes.NewInterfaceRegistry() diff --git a/x/tunnel/types/route.pb.go b/x/tunnel/types/route.pb.go index ad9ffcda6..d9e9e683f 100644 --- a/x/tunnel/types/route.pb.go +++ b/x/tunnel/types/route.pb.go @@ -25,7 +25,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// TSSRoute is the type for a TSS route +// TSSRoute represents a route for TSS packets and implements the RouteI interface. type TSSRoute struct { // destination_chain_id is the destination chain ID DestinationChainID string `protobuf:"bytes,1,opt,name=destination_chain_id,json=destinationChainId,proto3" json:"destination_chain_id,omitempty"` @@ -80,24 +80,24 @@ func (m *TSSRoute) GetDestinationContractAddress() string { return "" } -// TSSRouteResult is the type for a TSS route result -type TSSRouteResult struct { +// TSSPacketReceipt represents a receipt for a TSS packet and implements the PacketReceiptI interface. +type TSSPacketReceipt struct { // signing_id is the signing ID SigningID github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID `protobuf:"varint,1,opt,name=signing_id,json=signingId,proto3,casttype=github.com/bandprotocol/chain/v3/x/bandtss/types.SigningID" json:"signing_id,omitempty"` } -func (m *TSSRouteResult) Reset() { *m = TSSRouteResult{} } -func (m *TSSRouteResult) String() string { return proto.CompactTextString(m) } -func (*TSSRouteResult) ProtoMessage() {} -func (*TSSRouteResult) Descriptor() ([]byte, []int) { +func (m *TSSPacketReceipt) Reset() { *m = TSSPacketReceipt{} } +func (m *TSSPacketReceipt) String() string { return proto.CompactTextString(m) } +func (*TSSPacketReceipt) ProtoMessage() {} +func (*TSSPacketReceipt) Descriptor() ([]byte, []int) { return fileDescriptor_543238289d94b7a6, []int{1} } -func (m *TSSRouteResult) XXX_Unmarshal(b []byte) error { +func (m *TSSPacketReceipt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TSSRouteResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TSSPacketReceipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TSSRouteResult.Marshal(b, m, deterministic) + return xxx_messageInfo_TSSPacketReceipt.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -107,19 +107,19 @@ func (m *TSSRouteResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *TSSRouteResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TSSRouteResult.Merge(m, src) +func (m *TSSPacketReceipt) XXX_Merge(src proto.Message) { + xxx_messageInfo_TSSPacketReceipt.Merge(m, src) } -func (m *TSSRouteResult) XXX_Size() int { +func (m *TSSPacketReceipt) XXX_Size() int { return m.Size() } -func (m *TSSRouteResult) XXX_DiscardUnknown() { - xxx_messageInfo_TSSRouteResult.DiscardUnknown(m) +func (m *TSSPacketReceipt) XXX_DiscardUnknown() { + xxx_messageInfo_TSSPacketReceipt.DiscardUnknown(m) } -var xxx_messageInfo_TSSRouteResult proto.InternalMessageInfo +var xxx_messageInfo_TSSPacketReceipt proto.InternalMessageInfo -func (m *TSSRouteResult) GetSigningID() github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID { +func (m *TSSPacketReceipt) GetSigningID() github_com_bandprotocol_chain_v3_x_bandtss_types.SigningID { if m != nil { return m.SigningID } @@ -128,35 +128,35 @@ func (m *TSSRouteResult) GetSigningID() github_com_bandprotocol_chain_v3_x_bandt func init() { proto.RegisterType((*TSSRoute)(nil), "band.tunnel.v1beta1.TSSRoute") - proto.RegisterType((*TSSRouteResult)(nil), "band.tunnel.v1beta1.TSSRouteResult") + proto.RegisterType((*TSSPacketReceipt)(nil), "band.tunnel.v1beta1.TSSPacketReceipt") } func init() { proto.RegisterFile("band/tunnel/v1beta1/route.proto", fileDescriptor_543238289d94b7a6) } var fileDescriptor_543238289d94b7a6 = []byte{ - // 344 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xb1, 0x4e, 0xf3, 0x30, - 0x14, 0x85, 0xeb, 0x5f, 0xbf, 0x2a, 0x6a, 0x21, 0x84, 0x42, 0x85, 0x4a, 0x85, 0x1c, 0xd4, 0x89, - 0xa5, 0xb1, 0xaa, 0x6e, 0x9d, 0xa0, 0x74, 0x20, 0x42, 0x2c, 0x29, 0x13, 0x4b, 0x94, 0xc4, 0x56, - 0x6a, 0xd4, 0xda, 0x55, 0xec, 0x54, 0xf0, 0x12, 0x88, 0x67, 0x60, 0xe2, 0x01, 0xfa, 0x10, 0xa8, - 0x53, 0x47, 0xa6, 0x0a, 0xa5, 0x6f, 0xc1, 0x84, 0x6c, 0xa7, 0x50, 0x98, 0xd8, 0xec, 0x73, 0xbf, - 0x7b, 0xee, 0xb9, 0x36, 0x74, 0xe3, 0x88, 0x13, 0xac, 0x72, 0xce, 0xe9, 0x18, 0xcf, 0x3a, 0x31, - 0x55, 0x51, 0x07, 0x67, 0x22, 0x57, 0xd4, 0x9b, 0x66, 0x42, 0x09, 0xe7, 0x40, 0x03, 0x9e, 0x05, - 0xbc, 0x12, 0x68, 0x1e, 0x25, 0x42, 0x4e, 0x84, 0x0c, 0x0d, 0x82, 0xed, 0xc5, 0xf2, 0xcd, 0x7a, - 0x2a, 0x52, 0x61, 0x75, 0x7d, 0xb2, 0x6a, 0xeb, 0x19, 0xc0, 0x9d, 0x9b, 0xe1, 0x30, 0xd0, 0xc6, - 0xce, 0x25, 0xac, 0x13, 0x2a, 0x15, 0xe3, 0x91, 0x62, 0x82, 0x87, 0xc9, 0x28, 0x62, 0x3c, 0x64, - 0xa4, 0x01, 0x4e, 0xc0, 0x69, 0xad, 0x7f, 0x58, 0xac, 0x5c, 0x67, 0xf0, 0x5d, 0xbf, 0xd0, 0x65, - 0x7f, 0x10, 0x38, 0xe4, 0xb7, 0x46, 0x9c, 0x33, 0x78, 0xfc, 0xc3, 0x49, 0x70, 0x95, 0x45, 0x89, - 0x0a, 0x23, 0x42, 0x32, 0x2a, 0x65, 0xe3, 0x9f, 0x76, 0x0c, 0x9a, 0xdb, 0x9d, 0x25, 0x72, 0x6e, - 0x89, 0x1e, 0x5c, 0xcc, 0xdb, 0x55, 0x13, 0xcb, 0x6f, 0x3d, 0x02, 0xb8, 0xb7, 0x09, 0x19, 0x50, - 0x99, 0x8f, 0x95, 0x73, 0x07, 0xa1, 0x64, 0x29, 0x67, 0x3c, 0xdd, 0x04, 0xfc, 0xdf, 0xbf, 0x2a, - 0x56, 0x6e, 0x6d, 0x68, 0x55, 0x7f, 0xf0, 0xb1, 0x72, 0x7b, 0x29, 0x53, 0xa3, 0x3c, 0xf6, 0x12, - 0x31, 0xc1, 0xfa, 0xb5, 0xcc, 0xca, 0x89, 0x18, 0x63, 0xb3, 0x19, 0x9e, 0x75, 0xf1, 0xbd, 0xd1, - 0x95, 0x94, 0x58, 0x3d, 0x4c, 0xa9, 0xf4, 0xbe, 0xba, 0x83, 0x5a, 0x69, 0xef, 0x93, 0xde, 0xfe, - 0x62, 0xde, 0xde, 0xdd, 0x1a, 0xee, 0xf7, 0xaf, 0x5f, 0x0a, 0x04, 0x5e, 0x0b, 0x04, 0x96, 0x05, - 0x02, 0xef, 0x05, 0x02, 0x4f, 0x6b, 0x54, 0x59, 0xae, 0x51, 0xe5, 0x6d, 0x8d, 0x2a, 0xb7, 0xf8, - 0x0f, 0x63, 0xcb, 0x8f, 0x35, 0x53, 0xe3, 0xaa, 0x21, 0xba, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x5b, 0xb7, 0xbb, 0xfc, 0xf4, 0x01, 0x00, 0x00, + // 351 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbf, 0x4e, 0xeb, 0x30, + 0x14, 0xc6, 0xeb, 0xab, 0xab, 0xea, 0xd6, 0xc3, 0x15, 0x0a, 0x15, 0x2a, 0x15, 0x4a, 0x50, 0x27, + 0x96, 0xc6, 0xaa, 0xba, 0x75, 0x82, 0xd2, 0x81, 0x08, 0x21, 0xa1, 0xa4, 0x13, 0x4b, 0xe4, 0xd8, + 0x56, 0x6a, 0x68, 0xed, 0x2a, 0x76, 0x2b, 0x78, 0x0b, 0xc4, 0x23, 0x30, 0xf1, 0x00, 0x7d, 0x08, + 0xd4, 0xa9, 0x23, 0x53, 0x85, 0xd2, 0xb7, 0x60, 0x42, 0xb1, 0xc3, 0x9f, 0x32, 0xb1, 0xd9, 0xdf, + 0xf9,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, 0xf1, 0x5e, 0x66, 0x69, 0x22, 0xc7, 0xc8, + 0xec, 0x86, 0xe6, 0x5d, 0x74, 0x6b, 0x74, 0xad, 0x14, 0xd2, 0x77, 0x53, 0xa6, 0xfc, 0xcf, 0xee, + 0xb0, 0x56, 0xda, 0x07, 0xb4, 0xe7, 0x2c, 0x17, 0xed, 0xff, 0x5b, 0xf1, 0x41, 0xff, 0xe2, 0x29, + 0x77, 0xc1, 0x73, 0xee, 0x82, 0x55, 0xee, 0x82, 0xd7, 0xdc, 0x05, 0xf7, 0x1b, 0xb7, 0xb2, 0xda, + 0xb8, 0x95, 0x97, 0x8d, 0x5b, 0xb9, 0x42, 0xbf, 0x08, 0x2e, 0x3f, 0xd7, 0xe4, 0x26, 0x55, 0x43, + 0x74, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x96, 0xeb, 0xca, 0x84, 0xf8, 0x01, 0x00, 0x00, } func (this *TSSRoute) Equal(that interface{}) bool { @@ -186,14 +186,14 @@ func (this *TSSRoute) Equal(that interface{}) bool { } return true } -func (this *TSSRouteResult) Equal(that interface{}) bool { +func (this *TSSPacketReceipt) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*TSSRouteResult) + that1, ok := that.(*TSSPacketReceipt) if !ok { - that2, ok := that.(TSSRouteResult) + that2, ok := that.(TSSPacketReceipt) if ok { that1 = &that2 } else { @@ -247,7 +247,7 @@ func (m *TSSRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TSSRouteResult) Marshal() (dAtA []byte, err error) { +func (m *TSSPacketReceipt) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -257,12 +257,12 @@ func (m *TSSRouteResult) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TSSRouteResult) MarshalTo(dAtA []byte) (int, error) { +func (m *TSSPacketReceipt) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TSSRouteResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TSSPacketReceipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -303,7 +303,7 @@ func (m *TSSRoute) Size() (n int) { return n } -func (m *TSSRouteResult) Size() (n int) { +func (m *TSSPacketReceipt) Size() (n int) { if m == nil { return 0 } @@ -435,7 +435,7 @@ func (m *TSSRoute) Unmarshal(dAtA []byte) error { } return nil } -func (m *TSSRouteResult) Unmarshal(dAtA []byte) error { +func (m *TSSPacketReceipt) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -458,10 +458,10 @@ func (m *TSSRouteResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TSSRouteResult: wiretype end group for non-group") + return fmt.Errorf("proto: TSSPacketReceipt: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TSSRouteResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TSSPacketReceipt: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/tunnel/types/route_result.go b/x/tunnel/types/route_result.go deleted file mode 100644 index a05c21512..000000000 --- a/x/tunnel/types/route_result.go +++ /dev/null @@ -1,8 +0,0 @@ -package types - -import "github.com/cosmos/gogoproto/proto" - -// RouteResultI defines the interface for route result types. -type RouteResultI interface { - proto.Message -} diff --git a/x/tunnel/types/tunnel.pb.go b/x/tunnel/types/tunnel.pb.go index 96bd529a4..1af0b3d9d 100644 --- a/x/tunnel/types/tunnel.pb.go +++ b/x/tunnel/types/tunnel.pb.go @@ -283,8 +283,8 @@ type Packet struct { Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` // prices is the list of prices information from feeds module. Prices []types1.Price `protobuf:"bytes,3,rep,name=prices,proto3" json:"prices"` - // route_result represents the outcome of the packet delivery, implementing the RouteResultI interface. - RouteResult *types.Any `protobuf:"bytes,4,opt,name=route_result,json=routeResult,proto3" json:"route_result,omitempty"` + // receipt represents the confirmation of the packet delivery to the destination via the specified route. + Receipt *types.Any `protobuf:"bytes,4,opt,name=receipt,proto3" json:"receipt,omitempty"` // base_fee is the base fee of the packet BaseFee github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,5,rep,name=base_fee,json=baseFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"base_fee"` // route_fee is the route fee of the packet @@ -347,9 +347,9 @@ func (m *Packet) GetPrices() []types1.Price { return nil } -func (m *Packet) GetRouteResult() *types.Any { +func (m *Packet) GetReceipt() *types.Any { if m != nil { - return m.RouteResult + return m.Receipt } return nil } @@ -515,63 +515,63 @@ func init() { func init() { proto.RegisterFile("band/tunnel/v1beta1/tunnel.proto", fileDescriptor_6bb6151451ba2f25) } var fileDescriptor_6bb6151451ba2f25 = []byte{ - // 889 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xd8, 0xee, 0x7a, 0x77, 0xe2, 0x16, 0x77, 0x88, 0xd0, 0x36, 0x15, 0xb6, 0x15, 0x38, - 0x18, 0xa4, 0xec, 0xd2, 0x54, 0x29, 0x12, 0xb7, 0x98, 0x10, 0x61, 0x09, 0xa4, 0x68, 0x53, 0x09, - 0x89, 0xcb, 0x6a, 0xbc, 0xfb, 0x6c, 0x8f, 0xea, 0xec, 0x2c, 0x3b, 0xb3, 0x16, 0xf9, 0x06, 0x1c, - 0xf9, 0x02, 0x48, 0x1c, 0x2b, 0x4e, 0x1c, 0xf2, 0x11, 0x7a, 0xa8, 0x72, 0xaa, 0x38, 0x71, 0x40, - 0x01, 0x39, 0x07, 0xf8, 0x18, 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, 0xd7, 0x3c, 0xb9, 0x30, - 0x97, 0x19, 0x7c, 0xfd, 0x7c, 0xd1, 0x41, 0x2f, 0x17, 0x1d, 0xf4, 0x6a, 0xd1, 0x41, 0x7f, 0x2d, - 0x3a, 0xe8, 0xc7, 0xab, 0xce, 0xc6, 0xab, 0xab, 0xce, 0xc6, 0xef, 0x57, 0x9d, 0x8d, 0x6f, 0xc3, - 0xff, 0xe8, 0xa4, 0x06, 0x47, 0x3f, 0xfb, 0x84, 0xcf, 0xc2, 0x64, 0x4a, 0x59, 0x16, 0xce, 0x1f, - 0x87, 0xdf, 0x57, 0x7f, 0xfb, 0x5a, 0xb4, 0x91, 0xa3, 0x11, 0x8f, 0xff, 0x0d, 0x00, 0x00, 0xff, - 0xff, 0xe5, 0x33, 0x1a, 0x44, 0x12, 0x08, 0x00, 0x00, + // 885 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x3f, 0x6f, 0x23, 0x45, + 0x14, 0xcf, 0xd8, 0xce, 0x7a, 0x77, 0x92, 0x0b, 0xb9, 0x21, 0x42, 0x7b, 0x39, 0x61, 0x5b, 0x81, + 0xc2, 0x20, 0x65, 0x97, 0xcb, 0x29, 0x87, 0x44, 0x97, 0x25, 0x44, 0x58, 0x02, 0x29, 0xda, 0x9c, + 0x84, 0x44, 0xb3, 0x1a, 0xef, 0x3e, 0xdb, 0xa3, 0x73, 0x76, 0x96, 0x9d, 0xb1, 0x45, 0xbe, 0x01, + 0x25, 0x5f, 0x00, 0x89, 0xf2, 0x44, 0x45, 0x91, 0x96, 0x8e, 0xe2, 0x94, 0xea, 0x44, 0x45, 0x81, + 0x02, 0x72, 0x0a, 0xf8, 0x18, 0x68, 0xfe, 0xac, 0x8d, 0xa3, 0xe3, 0x4e, 0x96, 0xd2, 0xd8, 0x7e, + 0x6f, 0x7e, 0xf3, 0x7e, 0x6f, 0x7e, 0xef, 0x8f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37, 0xad, 0xb5, 0xdf, 0x6f, 0x5a, 0x6b, 0x5f, 0x87, 0xff, 0xd1, 0x49, 0x4d, + 0x8c, 0x6e, 0xfa, 0x94, 0x8f, 0xc3, 0x74, 0x44, 0x59, 0x1e, 0x4e, 0x1f, 0x87, 0xdf, 0x56, 0xff, + 0xf7, 0x5a, 0xb4, 0xbe, 0xa3, 0x11, 0x8f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xb5, 0x8b, + 0x12, 0x0b, 0x08, 0x00, 0x00, } func (this *Tunnel) Equal(that interface{}) bool { @@ -735,7 +735,7 @@ func (this *Packet) Equal(that interface{}) bool { return false } } - if !this.RouteResult.Equal(that1.RouteResult) { + if !this.Receipt.Equal(that1.Receipt) { return false } if len(this.BaseFee) != len(that1.BaseFee) { @@ -1073,9 +1073,9 @@ func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if m.RouteResult != nil { + if m.Receipt != nil { { - size, err := m.RouteResult.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Receipt.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1317,8 +1317,8 @@ func (m *Packet) Size() (n int) { n += 1 + l + sovTunnel(uint64(l)) } } - if m.RouteResult != nil { - l = m.RouteResult.Size() + if m.Receipt != nil { + l = m.Receipt.Size() n += 1 + l + sovTunnel(uint64(l)) } if len(m.BaseFee) > 0 { @@ -2028,7 +2028,7 @@ func (m *Packet) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RouteResult", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2055,10 +2055,10 @@ func (m *Packet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.RouteResult == nil { - m.RouteResult = &types.Any{} + if m.Receipt == nil { + m.Receipt = &types.Any{} } - if err := m.RouteResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Receipt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From 4c13cd161ef5ba9053ca348b55ad7b8f46b08698 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 22 Nov 2024 16:08:19 +0700 Subject: [PATCH 268/272] clean up --- x/tunnel/abci.go | 7 +---- x/tunnel/keeper/genesis.go | 2 +- x/tunnel/keeper/grpc_query_test.go | 10 +++---- x/tunnel/keeper/helper.go | 25 +++++++++++++++++ x/tunnel/keeper/keeper_latest_prices.go | 9 ------- x/tunnel/keeper/keeper_packet.go | 36 +------------------------ x/tunnel/keeper/keeper_tunnel.go | 12 ++++----- x/tunnel/keeper/keeper_tunnel_test.go | 2 +- x/tunnel/types/packet.go | 4 +-- x/tunnel/types/packet_test.go | 4 +-- 10 files changed, 44 insertions(+), 67 deletions(-) diff --git a/x/tunnel/abci.go b/x/tunnel/abci.go index d13ecfa3a..51753b489 100644 --- a/x/tunnel/abci.go +++ b/x/tunnel/abci.go @@ -10,10 +10,5 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) error { // Produce packets for all tunnels that are active and have passed the interval time trigger // or deviated from the last price to destination route. // Error should not happen here since the tunnel is already validated. - err := k.ProduceActiveTunnelPackets(ctx) - if err != nil { - return err - } - - return nil + return k.ProduceActiveTunnelPackets(ctx) } diff --git a/x/tunnel/keeper/genesis.go b/x/tunnel/keeper/genesis.go index 90056fcea..c85d7df2a 100644 --- a/x/tunnel/keeper/genesis.go +++ b/x/tunnel/keeper/genesis.go @@ -29,7 +29,7 @@ func InitGenesis(ctx sdk.Context, k Keeper, data *types.GenesisState) { k.SetTunnel(ctx, t) k.SetLatestPrices(ctx, types.NewLatestPrices(t.ID, []feedstypes.Price{}, 0)) if t.IsActive { - k.ActiveTunnelID(ctx, t.ID) + k.SetActiveTunnelID(ctx, t.ID) } } diff --git a/x/tunnel/keeper/grpc_query_test.go b/x/tunnel/keeper/grpc_query_test.go index e0316fd66..ec1c48a94 100644 --- a/x/tunnel/keeper/grpc_query_test.go +++ b/x/tunnel/keeper/grpc_query_test.go @@ -72,15 +72,15 @@ func (s *KeeperTestSuite) TestGRPCQueryPackets() { TunnelID: 2, Sequence: 1, } - err = packet1.SetReceiptValue(&types.TSSPacketReceipt{ + err = packet1.SetReceipt(&types.TSSPacketReceipt{ SigningID: 1, }) s.Require().NoError(err) - err = packet2.SetReceiptValue(&types.TSSPacketReceipt{ + err = packet2.SetReceipt(&types.TSSPacketReceipt{ SigningID: 2, }) s.Require().NoError(err) - err = packet3.SetReceiptValue(&types.TSSPacketReceipt{ + err = packet3.SetReceipt(&types.TSSPacketReceipt{ SigningID: 3, }) s.Require().NoError(err) @@ -119,7 +119,7 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { TunnelID: 1, Sequence: 1, } - err = packet1.SetReceiptValue(&types.TSSPacketReceipt{ + err = packet1.SetReceipt(&types.TSSPacketReceipt{ SigningID: 1, }) s.Require().NoError(err) @@ -129,7 +129,7 @@ func (s *KeeperTestSuite) TestGRPCQueryPacket() { TunnelID: 1, Sequence: 2, } - err = packet2.SetReceiptValue(&types.TSSPacketReceipt{}) + err = packet2.SetReceipt(&types.TSSPacketReceipt{}) s.Require().NoError(err) k.SetPacket(ctx, packet2) diff --git a/x/tunnel/keeper/helper.go b/x/tunnel/keeper/helper.go index 199e96ca3..79e239939 100644 --- a/x/tunnel/keeper/helper.go +++ b/x/tunnel/keeper/helper.go @@ -1,12 +1,23 @@ package keeper import ( + "math" + sdkmath "cosmossdk.io/math" feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" ) +// CreatePricesMap creates a map of prices with signal ID as the key +func CreatePricesMap(prices []feedstypes.Price) map[string]feedstypes.Price { + pricesMap := make(map[string]feedstypes.Price, len(prices)) + for _, p := range prices { + pricesMap[p.SignalID] = p + } + return pricesMap +} + // GenerateNewPrices generates new prices based on the current prices and signal deviations. func GenerateNewPrices( signalDeviations []types.SignalDeviation, @@ -46,3 +57,17 @@ func GenerateNewPrices( return []feedstypes.Price{} } } + +// calculateDeviationBPS calculates the deviation between the old price and +// the new price in basis points, i.e., |(newPrice - oldPrice)| * 10000 / oldPrice +func calculateDeviationBPS(oldPrice, newPrice sdkmath.Int) sdkmath.Int { + if newPrice.Equal(oldPrice) { + return sdkmath.ZeroInt() + } + + if oldPrice.IsZero() { + return sdkmath.NewInt(math.MaxInt64) + } + + return newPrice.Sub(oldPrice).Abs().MulRaw(10000).Quo(oldPrice) +} diff --git a/x/tunnel/keeper/keeper_latest_prices.go b/x/tunnel/keeper/keeper_latest_prices.go index feb41e30b..88de54c75 100644 --- a/x/tunnel/keeper/keeper_latest_prices.go +++ b/x/tunnel/keeper/keeper_latest_prices.go @@ -26,15 +26,6 @@ func (k Keeper) GetLatestPrices(ctx sdk.Context, tunnelID uint64) (types.LatestP return latestPrices, nil } -// MustGetLatestPrices retrieves the latest prices by its tunnel ID. Panics if the prices does not exist. -func (k Keeper) MustGetLatestPrices(ctx sdk.Context, tunnelID uint64) types.LatestPrices { - latestPrices, err := k.GetLatestPrices(ctx, tunnelID) - if err != nil { - panic(err) - } - return latestPrices -} - // GetAllLatestPrices gets all the latest prices from the store func (k Keeper) GetAllLatestPrices(ctx sdk.Context) []types.LatestPrices { var allLatestPrices []types.LatestPrices diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index e6999f806..79c9f8c58 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -2,10 +2,8 @@ package keeper import ( "fmt" - "math" sdkerrors "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -46,15 +44,6 @@ func (k Keeper) GetPacket(ctx sdk.Context, tunnelID uint64, sequence uint64) (ty return packet, nil } -// MustGetPacket retrieves a packet by its tunnel ID and packet ID and panics if the packet does not exist -func (k Keeper) MustGetPacket(ctx sdk.Context, tunnelID uint64, sequence uint64) types.Packet { - packet, err := k.GetPacket(ctx, tunnelID, sequence) - if err != nil { - panic(err) - } - return packet -} - // ProduceActiveTunnelPackets generates packets and sends packets to the destination route for all active tunnels func (k Keeper) ProduceActiveTunnelPackets(ctx sdk.Context) error { // get active tunnel IDs @@ -226,7 +215,7 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { } // set the receipt to the packet - if err := packet.SetReceiptValue(receipt); err != nil { + if err := packet.SetReceipt(receipt); err != nil { return sdkerrors.Wrapf( err, "failed to set packet receipt for tunnel %d, sequence %d", @@ -239,26 +228,3 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { return nil } - -// calculateDeviationBPS calculates the deviation between the old price and -// the new price in basis points, i.e., |(newPrice - oldPrice)| * 10000 / oldPrice -func calculateDeviationBPS(oldPrice, newPrice sdkmath.Int) sdkmath.Int { - if newPrice.Equal(oldPrice) { - return sdkmath.ZeroInt() - } - - if oldPrice.IsZero() { - return sdkmath.NewInt(math.MaxInt64) - } - - return newPrice.Sub(oldPrice).Abs().MulRaw(10000).Quo(oldPrice) -} - -// CreatePricesMap creates a map of prices with signal ID as the key -func CreatePricesMap(prices []feedstypes.Price) map[string]feedstypes.Price { - pricesMap := make(map[string]feedstypes.Price, len(prices)) - for _, p := range prices { - pricesMap[p.SignalID] = p - } - return pricesMap -} diff --git a/x/tunnel/keeper/keeper_tunnel.go b/x/tunnel/keeper/keeper_tunnel.go index da5129797..7a3755746 100644 --- a/x/tunnel/keeper/keeper_tunnel.go +++ b/x/tunnel/keeper/keeper_tunnel.go @@ -166,13 +166,13 @@ func (k Keeper) GetTunnels(ctx sdk.Context) []types.Tunnel { return tunnels } -// ActiveTunnelID sets the active tunnel ID in the store -func (k Keeper) ActiveTunnelID(ctx sdk.Context, tunnelID uint64) { +// SetActiveTunnelID sets the active tunnel ID in the store +func (k Keeper) SetActiveTunnelID(ctx sdk.Context, tunnelID uint64) { ctx.KVStore(k.storeKey).Set(types.ActiveTunnelIDStoreKey(tunnelID), []byte{0x01}) } -// DeactivateTunnelID deactivates the tunnel ID in the store -func (k Keeper) DeactivateTunnelID(ctx sdk.Context, tunnelID uint64) { +// DeleteActiveTunnelID deletes the active tunnel ID from the store +func (k Keeper) DeleteActiveTunnelID(ctx sdk.Context, tunnelID uint64) { ctx.KVStore(k.storeKey).Delete(types.ActiveTunnelIDStoreKey(tunnelID)) } @@ -203,7 +203,7 @@ func (k Keeper) ActivateTunnel(ctx sdk.Context, tunnelID uint64) error { } // add the tunnel ID to the active tunnel IDs - k.ActiveTunnelID(ctx, tunnelID) + k.SetActiveTunnelID(ctx, tunnelID) // set the last interval timestamp to the current block time tunnel.IsActive = true @@ -226,7 +226,7 @@ func (k Keeper) DeactivateTunnel(ctx sdk.Context, tunnelID uint64) error { } // remove the tunnel ID from the active tunnel IDs - k.DeactivateTunnelID(ctx, tunnelID) + k.DeleteActiveTunnelID(ctx, tunnelID) // set the last interval timestamp to the current block time tunnel.IsActive = false diff --git a/x/tunnel/keeper/keeper_tunnel_test.go b/x/tunnel/keeper/keeper_tunnel_test.go index 7160d70c6..6a687f8e5 100644 --- a/x/tunnel/keeper/keeper_tunnel_test.go +++ b/x/tunnel/keeper/keeper_tunnel_test.go @@ -159,7 +159,7 @@ func (s *KeeperTestSuite) TestGetActiveTunnelIDs() { activeTunnelIDs := []uint64{1, 2, 3} for _, id := range activeTunnelIDs { - k.ActiveTunnelID(ctx, id) + k.SetActiveTunnelID(ctx, id) } retrievedIDs := k.GetActiveTunnelIDs(ctx) diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index ee3bef8f7..a99700e59 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -34,8 +34,8 @@ func (p Packet) UnpackInterfaces(unpacker types.AnyUnpacker) error { return unpacker.UnpackAny(p.Receipt, &receipt) } -// SetReceiptValue sets the packet's receipt. -func (p *Packet) SetReceiptValue(receipt PacketReceiptI) error { +// SetReceipt sets the packet's receipt. +func (p *Packet) SetReceipt(receipt PacketReceiptI) error { any, err := types.NewAnyWithValue(receipt) if err != nil { return err diff --git a/x/tunnel/types/packet_test.go b/x/tunnel/types/packet_test.go index 842fb8a9c..c765cf190 100644 --- a/x/tunnel/types/packet_test.go +++ b/x/tunnel/types/packet_test.go @@ -14,7 +14,7 @@ func TestGetSetPacketReceipt(t *testing.T) { packet := types.NewPacket(1, 1, nil, nil, nil, 0) routeResult := &types.TSSPacketReceipt{SigningID: 1} - err := packet.SetReceiptValue(routeResult) + err := packet.SetReceipt(routeResult) require.NoError(t, err) require.NotNil(t, packet.Receipt) @@ -27,7 +27,7 @@ func TestPacketUnpackInterfaces(t *testing.T) { packet := types.NewPacket(1, 1, nil, nil, nil, 0) packetResult := &types.TSSPacketReceipt{SigningID: 1} - err := packet.SetReceiptValue(packetResult) + err := packet.SetReceipt(packetResult) require.NoError(t, err) unpacker := codectypes.NewInterfaceRegistry() From b8d096a2b3ec44870df0e0f714be3626abde5aac Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 22 Nov 2024 17:01:43 +0700 Subject: [PATCH 269/272] add details --- x/tunnel/README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/x/tunnel/README.md b/x/tunnel/README.md index 0b83c87cb..66fe1429b 100644 --- a/x/tunnel/README.md +++ b/x/tunnel/README.md @@ -114,16 +114,20 @@ A Packet is the data unit produced and sent to the destination chain based on th ```go type Packet struct { - // tunnel_id is the tunnel ID - TunnelID uint64 - // sequence is representing the sequence of the tunnel packet. - Sequence uint64 - // signal_prices is the list of signal prices - Prices []feedstypes.Price - // packet_content is the content of the packet that implements PacketContentI - PacketContent *types1.Any - // created_at is the timestamp when the packet is created - CreatedAt int64 + // tunnel_id is the tunnel ID + TunnelID uint64 + // sequence is representing the sequence of the tunnel packet. + Sequence uint64 + // prices is the list of prices information from feeds module. + Prices []feedstypes.Price + // receipt represents the confirmation of the packet delivery to the destination via the specified route. + Receipt *codectypes.Any + // base_fee is the base fee of the packet + BaseFee sdk.Coins + // route_fee is the route fee of the packet + RouteFee sdk.Coins + // created_at is the timestamp when the packet is created + CreatedAt int64 } ``` From 3e3628a86367fa00f456d3da261f651b0f78b4cc Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 22 Nov 2024 17:48:04 +0700 Subject: [PATCH 270/272] fix review --- x/tunnel/client/cli/util.go | 2 +- x/tunnel/keeper/msg_server.go | 8 ++--- x/tunnel/types/genesis_test.go | 20 +++++------ x/tunnel/types/latest_prices.go | 15 -------- x/tunnel/types/latest_prices_test.go | 39 --------------------- x/tunnel/types/msgs_test.go | 2 +- x/tunnel/types/signal_deviation.go | 23 ++++++++----- x/tunnel/types/signal_deviation_test.go | 7 +++- x/tunnel/types/total_fees.go | 11 ++++++ x/tunnel/types/total_fees_test.go | 46 +++++++++++++++++++++++++ x/tunnel/types/tunnel.go | 18 +++------- x/tunnel/types/tunnel_test.go | 43 +++++++++++++++++++++++ 12 files changed, 141 insertions(+), 93 deletions(-) create mode 100644 x/tunnel/types/total_fees.go create mode 100644 x/tunnel/types/total_fees_test.go diff --git a/x/tunnel/client/cli/util.go b/x/tunnel/client/cli/util.go index c1a9e8d09..b2b35059e 100644 --- a/x/tunnel/client/cli/util.go +++ b/x/tunnel/client/cli/util.go @@ -13,7 +13,7 @@ type SignalDeviations struct { SignalDeviations []SignalDeviation `json:"signal_deviations"` } -// Note: SignalDeviation represents the signal information without soft deviation, which may be utilized in the future for deviation adjustments +// SignalDeviation represents the signal information without soft deviation, which may be utilized in the future for deviation adjustments type SignalDeviation struct { SignalID string `json:"signal_id"` DeviationBPS uint64 `json:"deviation_bps"` diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 9bdf286f4..49cc6a982 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -34,12 +34,12 @@ func (ms msgServer) CreateTunnel( params := ms.Keeper.GetParams(ctx) // validate signal infos and interval - if err := types.ValidateSignalDeviations(msg.SignalDeviations, params); err != nil { + if err := types.ValidateSignalDeviations(msg.SignalDeviations, params.MaxSignals, params.MaxDeviationBPS, params.MinDeviationBPS); err != nil { return nil, err } // validate interval - if err := types.ValidateInterval(msg.Interval, params); err != nil { + if err := types.ValidateInterval(msg.Interval, params.MaxInterval, params.MinInterval); err != nil { return nil, err } @@ -88,12 +88,12 @@ func (ms msgServer) UpdateAndResetTunnel( params := ms.Keeper.GetParams(ctx) // validate signal infos and interval - if err := types.ValidateSignalDeviations(msg.SignalDeviations, params); err != nil { + if err := types.ValidateSignalDeviations(msg.SignalDeviations, params.MaxSignals, params.MaxDeviationBPS, params.MinDeviationBPS); err != nil { return nil, err } // validate interval - if err := types.ValidateInterval(msg.Interval, params); err != nil { + if err := types.ValidateInterval(msg.Interval, params.MaxInterval, params.MinInterval); err != nil { return nil, err } diff --git a/x/tunnel/types/genesis_test.go b/x/tunnel/types/genesis_test.go index e5d192e33..0c4be3579 100644 --- a/x/tunnel/types/genesis_test.go +++ b/x/tunnel/types/genesis_test.go @@ -62,7 +62,7 @@ func TestValidateGenesis(t *testing.T) { { TunnelID: 3, Depositor: "addr1", - Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 100)), + Amount: sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), }, // Non-existent tunnel ID }, }, @@ -81,12 +81,12 @@ func TestValidateGenesis(t *testing.T) { { TunnelID: 1, Depositor: "addr1", - Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 100)), + Amount: sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), }, { TunnelID: 1, Depositor: "addr1", - Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 100)), + Amount: sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), }, // Duplicate deposit }, }, @@ -98,14 +98,14 @@ func TestValidateGenesis(t *testing.T) { Params: types.DefaultParams(), TunnelCount: 2, Tunnels: []types.Tunnel{ - {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 100))}, - {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 200))}, + {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("uband", 100))}, + {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("uband", 200))}, }, Deposits: []types.Deposit{ { TunnelID: 1, Depositor: "addr1", - Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 50)), + Amount: sdk.NewCoins(sdk.NewInt64Coin("uband", 50)), }, }, }, @@ -117,19 +117,19 @@ func TestValidateGenesis(t *testing.T) { Params: types.DefaultParams(), TunnelCount: 2, Tunnels: []types.Tunnel{ - {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 100))}, - {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("stake", 200))}, + {ID: 1, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("uband", 100))}, + {ID: 2, TotalDeposit: sdk.NewCoins(sdk.NewInt64Coin("uband", 200))}, }, Deposits: []types.Deposit{ { TunnelID: 1, Depositor: "addr1", - Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 100)), + Amount: sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), }, { TunnelID: 2, Depositor: "addr2", - Amount: sdk.NewCoins(sdk.NewInt64Coin("stake", 200)), + Amount: sdk.NewCoins(sdk.NewInt64Coin("uband", 200)), }, }, }, diff --git a/x/tunnel/types/latest_prices.go b/x/tunnel/types/latest_prices.go index a7205d507..7d688f3c4 100644 --- a/x/tunnel/types/latest_prices.go +++ b/x/tunnel/types/latest_prices.go @@ -1,8 +1,6 @@ package types import ( - fmt "fmt" - feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" ) @@ -19,19 +17,6 @@ func NewLatestPrices( } } -// Validate validates the latest prices. -func (l LatestPrices) Validate() error { - if l.TunnelID == 0 { - return fmt.Errorf("tunnel ID cannot be 0") - } - - if l.LastInterval < 0 { - return fmt.Errorf("last interval cannot be negative") - } - - return nil -} - // UpdatePrices updates prices in the latest prices. func (l *LatestPrices) UpdatePrices(newPrices []feedstypes.Price) { pricesIndex := make(map[string]int) diff --git a/x/tunnel/types/latest_prices_test.go b/x/tunnel/types/latest_prices_test.go index 3f3b8492d..9d63895d4 100644 --- a/x/tunnel/types/latest_prices_test.go +++ b/x/tunnel/types/latest_prices_test.go @@ -9,45 +9,6 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func TestLatestPrices_Validate(t *testing.T) { - examplePrices := []feedstypes.Price{ - feedstypes.NewPrice(feedstypes.PRICE_STATUS_AVAILABLE, "signal1", 100, 0), - } - - cases := map[string]struct { - latestPrices types.LatestPrices - expErr bool - expErrMsg string - }{ - "valid latest prices": { - latestPrices: types.NewLatestPrices(1, examplePrices, 10), - expErr: false, - }, - "invalid tunnel ID": { - latestPrices: types.NewLatestPrices(0, examplePrices, 10), - expErr: true, - expErrMsg: "tunnel ID cannot be 0", - }, - "negative last interval": { - latestPrices: types.NewLatestPrices(1, examplePrices, -1), - expErr: true, - expErrMsg: "last interval cannot be negative", - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - err := tc.latestPrices.Validate() - if tc.expErr { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expErrMsg) - } else { - require.NoError(t, err) - } - }) - } -} - func TestLatestPrices_UpdatePrices(t *testing.T) { initialPrices := []feedstypes.Price{ {Status: feedstypes.PRICE_STATUS_AVAILABLE, SignalID: "signal1", Price: 100}, diff --git a/x/tunnel/types/msgs_test.go b/x/tunnel/types/msgs_test.go index 80049f267..43d25017c 100644 --- a/x/tunnel/types/msgs_test.go +++ b/x/tunnel/types/msgs_test.go @@ -130,7 +130,7 @@ func TestMsgTriggerTunnel_ValidateBasic(t *testing.T) { func TestMsgWithdrawFromTunnel_ValidateBasic(t *testing.T) { // Valid withdrawer - amount := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) + amount := sdk.NewCoins(sdk.NewInt64Coin("uband", 100)) msg := types.NewMsgWithdrawFromTunnel(1, amount, validDepositor.String()) err := msg.ValidateBasic() require.NoError(t, err) diff --git a/x/tunnel/types/signal_deviation.go b/x/tunnel/types/signal_deviation.go index 48358d8ee..10e1e8220 100644 --- a/x/tunnel/types/signal_deviation.go +++ b/x/tunnel/types/signal_deviation.go @@ -14,22 +14,27 @@ func NewSignalDeviation( } // ValidateSignalDeviations validates the signal deviations with the given params. -func ValidateSignalDeviations(signalDeviations []SignalDeviation, params Params) error { +func ValidateSignalDeviations( + signalDeviations []SignalDeviation, + maxSignals uint64, + maxDeviationBPS uint64, + minDeviationBPS uint64, +) error { // validate max signals - if len(signalDeviations) > int(params.MaxSignals) { - return ErrMaxSignalsExceeded.Wrapf("max signals %d, got %d", params.MaxSignals, len(signalDeviations)) + if len(signalDeviations) > int(maxSignals) { + return ErrMaxSignalsExceeded.Wrapf("max signals %d, got %d", maxSignals, len(signalDeviations)) } // validate min and max deviation for _, signalDeviation := range signalDeviations { - if signalDeviation.HardDeviationBPS < params.MinDeviationBPS || - signalDeviation.SoftDeviationBPS < params.MinDeviationBPS || - signalDeviation.HardDeviationBPS > params.MaxDeviationBPS || - signalDeviation.SoftDeviationBPS > params.MaxDeviationBPS { + if signalDeviation.HardDeviationBPS < minDeviationBPS || + signalDeviation.SoftDeviationBPS < minDeviationBPS || + signalDeviation.HardDeviationBPS > maxDeviationBPS || + signalDeviation.SoftDeviationBPS > maxDeviationBPS { return ErrDeviationOutOfRange.Wrapf( "min %d, max %d, got %d, %d", - params.MinDeviationBPS, - params.MaxDeviationBPS, + minDeviationBPS, + maxDeviationBPS, signalDeviation.SoftDeviationBPS, signalDeviation.HardDeviationBPS, ) diff --git a/x/tunnel/types/signal_deviation_test.go b/x/tunnel/types/signal_deviation_test.go index 346170f07..30d168a7b 100644 --- a/x/tunnel/types/signal_deviation_test.go +++ b/x/tunnel/types/signal_deviation_test.go @@ -63,7 +63,12 @@ func TestValidateSignalDeviations(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - err := types.ValidateSignalDeviations(tc.signalDeviations, params) + err := types.ValidateSignalDeviations( + tc.signalDeviations, + params.MaxSignals, + params.MaxDeviationBPS, + params.MinDeviationBPS, + ) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.expErrMsg) diff --git a/x/tunnel/types/total_fees.go b/x/tunnel/types/total_fees.go new file mode 100644 index 000000000..0ff664f03 --- /dev/null +++ b/x/tunnel/types/total_fees.go @@ -0,0 +1,11 @@ +package types + +import "fmt" + +// Validate validates the total fees +func (tf TotalFees) Validate() error { + if !tf.TotalPacketFee.IsValid() { + return fmt.Errorf("invalid total packet fee: %s", tf.TotalPacketFee) + } + return nil +} diff --git a/x/tunnel/types/total_fees_test.go b/x/tunnel/types/total_fees_test.go new file mode 100644 index 000000000..39d553cf8 --- /dev/null +++ b/x/tunnel/types/total_fees_test.go @@ -0,0 +1,46 @@ +package types_test + +import ( + "testing" + + "cosmossdk.io/math" + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v3/x/tunnel/types" +) + +func TestTotalFees_Validate(t *testing.T) { + tests := []struct { + name string + totalFees types.TotalFees + expErr bool + }{ + { + name: "invalid total packet fee", + totalFees: types.TotalFees{ + TotalPacketFee: sdk.Coins{(sdk.Coin{Denom: "uband", Amount: math.NewInt(-100)})}, + }, + expErr: true, + }, + { + name: "all good", + totalFees: types.TotalFees{ + TotalPacketFee: sdk.NewCoins(sdk.NewInt64Coin("uband", 100)), + }, + expErr: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.totalFees.Validate() + if tt.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 79196c1cb..32b99041f 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -90,21 +90,13 @@ func (t Tunnel) GetSignalIDs() []string { return signalIDs } -// Validate validates the total fees -func (tf TotalFees) Validate() error { - if !tf.TotalPacketFee.IsValid() { - return fmt.Errorf("invalid total packet fee: %s", tf.TotalPacketFee) - } - return nil -} - -// ValidateInterval validates the interval. -func ValidateInterval(interval uint64, params Params) error { - if interval < params.MinInterval || interval > params.MaxInterval { +// ValidateInterval validates the interval of the tunnel. +func ValidateInterval(interval, maxInterval, minInterval uint64) error { + if interval < minInterval || interval > maxInterval { return ErrIntervalOutOfRange.Wrapf( "max %d, min %d, got %d", - params.MaxInterval, - params.MinInterval, + maxInterval, + minInterval, interval, ) } diff --git a/x/tunnel/types/tunnel_test.go b/x/tunnel/types/tunnel_test.go index 4a4c631be..e4d11cad6 100644 --- a/x/tunnel/types/tunnel_test.go +++ b/x/tunnel/types/tunnel_test.go @@ -38,3 +38,46 @@ func TestTunnel_GetSignalIDs(t *testing.T) { require.Contains(t, signalIDs, "signal1") require.Contains(t, signalIDs, "signal2") } + +func TestValidateInterval(t *testing.T) { + tests := []struct { + name string + interval uint64 + maxInterval uint64 + minInterval uint64 + expErr bool + }{ + { + name: "interval too low", + interval: 5, + maxInterval: 100, + minInterval: 10, + expErr: true, + }, + { + name: "interval too high", + interval: 150, + maxInterval: 100, + minInterval: 10, + expErr: true, + }, + { + name: "all good", + interval: 50, + maxInterval: 100, + minInterval: 10, + expErr: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := types.ValidateInterval(tt.interval, tt.maxInterval, tt.minInterval) + if tt.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} From 8f22dfaa4548d7324cf5f843c1c1cbd158b0f819 Mon Sep 17 00:00:00 2001 From: satawatnack Date: Fri, 22 Nov 2024 17:57:20 +0700 Subject: [PATCH 271/272] fix lint --- x/tunnel/types/total_fees_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/tunnel/types/total_fees_test.go b/x/tunnel/types/total_fees_test.go index 39d553cf8..4b90e34f6 100644 --- a/x/tunnel/types/total_fees_test.go +++ b/x/tunnel/types/total_fees_test.go @@ -3,9 +3,10 @@ package types_test import ( "testing" - "cosmossdk.io/math" "github.com/stretchr/testify/require" + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bandprotocol/chain/v3/x/tunnel/types" From 630a1ab92305a188f3d2409c24f15db9637b61dc Mon Sep 17 00:00:00 2001 From: satawatnack Date: Sun, 24 Nov 2024 12:47:40 +0700 Subject: [PATCH 272/272] align unpack any --- x/tunnel/keeper/keeper_packet.go | 17 ++++++++++++----- x/tunnel/keeper/keeper_tunnel.go | 7 +++---- x/tunnel/keeper/msg_server.go | 7 +++---- x/tunnel/types/errors.go | 30 ++++++++++++++++-------------- x/tunnel/types/msgs.go | 25 ++++++++++++------------- x/tunnel/types/packet.go | 16 +++++++++++++--- x/tunnel/types/packet_test.go | 9 ++++----- x/tunnel/types/tunnel.go | 11 +++++++++++ x/tunnel/types/tunnel_test.go | 11 +++++++---- 9 files changed, 81 insertions(+), 52 deletions(-) diff --git a/x/tunnel/keeper/keeper_packet.go b/x/tunnel/keeper/keeper_packet.go index 79c9f8c58..5ba24d0c4 100644 --- a/x/tunnel/keeper/keeper_packet.go +++ b/x/tunnel/keeper/keeper_packet.go @@ -166,12 +166,13 @@ func (k Keeper) CreatePacket( return types.Packet{}, sdkerrors.Wrapf(err, "failed to deduct base packet fee for tunnel %d", tunnel.ID) } - // get the route fee - route, ok := tunnel.Route.GetCachedValue().(types.RouteI) - if !ok { - return types.Packet{}, types.ErrInvalidRoute + // get the route + route, err := tunnel.GetRouteValue() + if err != nil { + return types.Packet{}, err } + // get the route fee routeFee, err := k.GetRouteFee(ctx, route) if err != nil { return types.Packet{}, err @@ -201,9 +202,15 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet types.Packet) error { return err } + // get the route + route, err := tunnel.GetRouteValue() + if err != nil { + return err + } + // send packet to the destination route and get the route result var receipt types.PacketReceiptI - switch r := tunnel.Route.GetCachedValue().(type) { + switch r := route.(type) { case *types.TSSRoute: receipt, err = k.SendTSSPacket(ctx, r, packet) default: diff --git a/x/tunnel/keeper/keeper_tunnel.go b/x/tunnel/keeper/keeper_tunnel.go index 7a3755746..c8330976a 100644 --- a/x/tunnel/keeper/keeper_tunnel.go +++ b/x/tunnel/keeper/keeper_tunnel.go @@ -266,11 +266,10 @@ func (k Keeper) HasEnoughFundToCreatePacket(ctx sdk.Context, tunnelID uint64) (b } // get the route fee from the tunnel - route, ok := tunnel.Route.GetCachedValue().(types.RouteI) - if !ok { - return false, types.ErrInvalidRoute + route, err := tunnel.GetRouteValue() + if err != nil { + return false, err } - routeFee, err := k.GetRouteFee(ctx, route) if err != nil { return false, err diff --git a/x/tunnel/keeper/msg_server.go b/x/tunnel/keeper/msg_server.go index 49cc6a982..d075668df 100644 --- a/x/tunnel/keeper/msg_server.go +++ b/x/tunnel/keeper/msg_server.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "errors" "fmt" sdkerrors "cosmossdk.io/errors" @@ -48,9 +47,9 @@ func (ms msgServer) CreateTunnel( return nil, err } - route, ok := msg.Route.GetCachedValue().(types.RouteI) - if !ok { - return nil, errors.New("cannot create tunnel, failed to convert proto Any to routeI") + route, err := msg.GetRouteValue() + if err != nil { + return nil, err } // add a new tunnel diff --git a/x/tunnel/types/errors.go b/x/tunnel/types/errors.go index badbb1605..fa8cb33f5 100644 --- a/x/tunnel/types/errors.go +++ b/x/tunnel/types/errors.go @@ -11,18 +11,20 @@ var ( ErrIntervalOutOfRange = errorsmod.Register(ModuleName, 4, "interval out of range") ErrDeviationOutOfRange = errorsmod.Register(ModuleName, 5, "deviation out of range") ErrTunnelNotFound = errorsmod.Register(ModuleName, 6, "tunnel not found") - ErrLatestPricesNotFound = errorsmod.Register(ModuleName, 7, "latest prices not found") - ErrPacketNotFound = errorsmod.Register(ModuleName, 8, "packet not found") - ErrNoPacketReceipt = errorsmod.Register(ModuleName, 9, "no packet receipt") - ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 10, "invalid creator of the tunnel") - ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 11, "account already exist") - ErrInvalidRoute = errorsmod.Register(ModuleName, 12, "invalid tunnel route") - ErrInactiveTunnel = errorsmod.Register(ModuleName, 13, "inactive tunnel") - ErrAlreadyActive = errorsmod.Register(ModuleName, 14, "already active") - ErrAlreadyInactive = errorsmod.Register(ModuleName, 15, "already inactive") - ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 16, "invalid deposit denom") - ErrDepositNotFound = errorsmod.Register(ModuleName, 17, "deposit not found") - ErrInsufficientDeposit = errorsmod.Register(ModuleName, 18, "insufficient deposit") - ErrInsufficientFund = errorsmod.Register(ModuleName, 19, "insufficient fund") - ErrDeviationNotFound = errorsmod.Register(ModuleName, 20, "deviation not found") + ErrNoRoute = errorsmod.Register(ModuleName, 7, "no route") + ErrNoReceipt = errorsmod.Register(ModuleName, 8, "no receipt") + ErrLatestPricesNotFound = errorsmod.Register(ModuleName, 9, "latest prices not found") + ErrPacketNotFound = errorsmod.Register(ModuleName, 10, "packet not found") + ErrNoPacketReceipt = errorsmod.Register(ModuleName, 11, "no packet receipt") + ErrInvalidTunnelCreator = errorsmod.Register(ModuleName, 12, "invalid creator of the tunnel") + ErrAccountAlreadyExist = errorsmod.Register(ModuleName, 13, "account already exist") + ErrInvalidRoute = errorsmod.Register(ModuleName, 14, "invalid tunnel route") + ErrInactiveTunnel = errorsmod.Register(ModuleName, 15, "inactive tunnel") + ErrAlreadyActive = errorsmod.Register(ModuleName, 16, "already active") + ErrAlreadyInactive = errorsmod.Register(ModuleName, 17, "already inactive") + ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 18, "invalid deposit denom") + ErrDepositNotFound = errorsmod.Register(ModuleName, 19, "deposit not found") + ErrInsufficientDeposit = errorsmod.Register(ModuleName, 20, "insufficient deposit") + ErrInsufficientFund = errorsmod.Register(ModuleName, 21, "insufficient fund") + ErrDeviationNotFound = errorsmod.Register(ModuleName, 22, "deviation not found") ) diff --git a/x/tunnel/types/msgs.go b/x/tunnel/types/msgs.go index 56a892172..d3d97913d 100644 --- a/x/tunnel/types/msgs.go +++ b/x/tunnel/types/msgs.go @@ -66,6 +66,15 @@ func NewMsgCreateTSSTunnel( return m, nil } +// GetRouteValue returns the route of the tunnel. +func (m MsgCreateTunnel) GetRouteValue() (RouteI, error) { + r, ok := m.Route.GetCachedValue().(RouteI) + if !ok { + return nil, ErrNoRoute.Wrap("failed to get route") + } + return r, nil +} + // ValidateBasic does a sanity check on the provided data func (m MsgCreateTunnel) ValidateBasic() error { // creator address must be valid @@ -83,9 +92,9 @@ func (m MsgCreateTunnel) ValidateBasic() error { } // route must be valid - r, ok := m.Route.GetCachedValue().(RouteI) - if !ok { - return sdkerrors.ErrPackAny.Wrapf("cannot unpack route") + r, err := m.GetRouteValue() + if err != nil { + return err } if err := r.ValidateBasic(); err != nil { return err @@ -110,16 +119,6 @@ func (m MsgCreateTunnel) UnpackInterfaces(unpacker types.AnyUnpacker) error { return unpacker.UnpackAny(m.Route, &route) } -// GetTunnelRoute returns the route of the tunnel. -func (m MsgCreateTunnel) GetTunnelRoute() RouteI { - route, ok := m.Route.GetCachedValue().(RouteI) - if !ok { - return nil - } - - return route -} - // NewMsgUpdateAndResetTunnel creates a new MsgUpdateAndResetTunnel instance. func NewMsgUpdateAndResetTunnel( tunnelID uint64, diff --git a/x/tunnel/types/packet.go b/x/tunnel/types/packet.go index a99700e59..55bf5c15d 100644 --- a/x/tunnel/types/packet.go +++ b/x/tunnel/types/packet.go @@ -1,8 +1,13 @@ package types import ( + "fmt" + + proto "github.com/cosmos/gogoproto/proto" + "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" feedstypes "github.com/bandprotocol/chain/v3/x/feeds/types" ) @@ -36,6 +41,11 @@ func (p Packet) UnpackInterfaces(unpacker types.AnyUnpacker) error { // SetReceipt sets the packet's receipt. func (p *Packet) SetReceipt(receipt PacketReceiptI) error { + msg, ok := receipt.(proto.Message) + if !ok { + return fmt.Errorf("can't proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(receipt) if err != nil { return err @@ -47,10 +57,10 @@ func (p *Packet) SetReceipt(receipt PacketReceiptI) error { // GetReceiptValue returns the packet's receipt. func (p Packet) GetReceiptValue() (PacketReceiptI, error) { - receipt, ok := p.Receipt.GetCachedValue().(PacketReceiptI) + r, ok := p.Receipt.GetCachedValue().(PacketReceiptI) if !ok { - return nil, ErrNoPacketReceipt.Wrapf("tunnelID: %d, sequence: %d", p.TunnelID, p.Sequence) + return nil, sdkerrors.ErrPackAny.Wrapf("cannot unpack route") } - return receipt, nil + return r, nil } diff --git a/x/tunnel/types/packet_test.go b/x/tunnel/types/packet_test.go index c765cf190..6dad984e3 100644 --- a/x/tunnel/types/packet_test.go +++ b/x/tunnel/types/packet_test.go @@ -12,15 +12,14 @@ import ( func TestGetSetPacketReceipt(t *testing.T) { packet := types.NewPacket(1, 1, nil, nil, nil, 0) - routeResult := &types.TSSPacketReceipt{SigningID: 1} + receipt := &types.TSSPacketReceipt{SigningID: 1} - err := packet.SetReceipt(routeResult) + err := packet.SetReceipt(receipt) require.NoError(t, err) - require.NotNil(t, packet.Receipt) - result, err := packet.GetReceiptValue() + receiptValue, err := packet.GetReceiptValue() require.NoError(t, err) - require.Equal(t, routeResult, result) + require.Equal(t, receipt, receiptValue) } func TestPacketUnpackInterfaces(t *testing.T) { diff --git a/x/tunnel/types/tunnel.go b/x/tunnel/types/tunnel.go index 32b99041f..10ba43ec2 100644 --- a/x/tunnel/types/tunnel.go +++ b/x/tunnel/types/tunnel.go @@ -63,6 +63,7 @@ func (t *Tunnel) SetRoute(route RouteI) error { if !ok { return fmt.Errorf("can't proto marshal %T", msg) } + any, err := types.NewAnyWithValue(msg) if err != nil { return err @@ -72,6 +73,16 @@ func (t *Tunnel) SetRoute(route RouteI) error { return nil } +// GetRouteValue returns the route value of the tunnel. +func (t Tunnel) GetRouteValue() (RouteI, error) { + r, ok := t.Route.GetCachedValue().(RouteI) + if !ok { + return nil, ErrNoRoute.Wrap("failed to get route") + } + + return r, nil +} + // GetSignalDeviationMap returns the signal deviation map of the tunnel. func (t Tunnel) GetSignalDeviationMap() map[string]SignalDeviation { signalDeviationMap := make(map[string]SignalDeviation, len(t.SignalDeviations)) diff --git a/x/tunnel/types/tunnel_test.go b/x/tunnel/types/tunnel_test.go index e4d11cad6..e009bd5ca 100644 --- a/x/tunnel/types/tunnel_test.go +++ b/x/tunnel/types/tunnel_test.go @@ -8,16 +8,19 @@ import ( "github.com/bandprotocol/chain/v3/x/tunnel/types" ) -func TestTunnel_SetRoute(t *testing.T) { +func TestGetSetRoute(t *testing.T) { tunnel := types.Tunnel{} route := &types.TSSRoute{DestinationChainID: "chain-1", DestinationContractAddress: "contract-1"} err := tunnel.SetRoute(route) require.NoError(t, err) - require.Equal(t, route, tunnel.Route.GetCachedValue()) + + routeValue, err := tunnel.GetRouteValue() + require.NoError(t, err) + require.Equal(t, route, routeValue) } -func TestTunnel_GetSignalDeviationMap(t *testing.T) { +func TestGetSignalDeviationMap(t *testing.T) { signalDeviations := []types.SignalDeviation{{SignalID: "signal1", SoftDeviationBPS: 100, HardDeviationBPS: 200}} tunnel := types.Tunnel{SignalDeviations: signalDeviations} @@ -26,7 +29,7 @@ func TestTunnel_GetSignalDeviationMap(t *testing.T) { require.Equal(t, signalDeviations[0], signalDeviationMap["signal1"]) } -func TestTunnel_GetSignalIDs(t *testing.T) { +func TestGetSignalIDs(t *testing.T) { signalDeviations := []types.SignalDeviation{ {SignalID: "signal1", SoftDeviationBPS: 100, HardDeviationBPS: 200}, {SignalID: "signal2", SoftDeviationBPS: 100, HardDeviationBPS: 200},