types

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 38 Imported by: 29

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the CCV provider module name
	ModuleName = "provider"

	// PortID is the default port id that transfer module binds to
	PortID = "provider"

	// StoreKey is the store key string for IBC transfer
	StoreKey = ModuleName

	// RouterKey is the message route for IBC transfer
	RouterKey = ModuleName

	// QuerierRoute is the querier route for IBC transfer
	QuerierRoute = ModuleName
)
View Source
const (

	// PortKey defines the key to store the port ID in store
	PortByteKey byte = iota

	// MaturedUnbondingOpsByteKey is the byte key that stores the list of all unbonding operations ids
	// that have matured from a consumer chain perspective,
	// i.e., no longer waiting on the unbonding period to elapse on any consumer chain
	MaturedUnbondingOpsByteKey

	// ValidatorSetUpdateIdByteKey is the byte key that stores the current validator set update id
	ValidatorSetUpdateIdByteKey

	// ChainToChannelBytePrefix is the byte prefix for storing mapping
	// from chainID to the channel ID that is used to send over validator set changes.
	ChainToChannelBytePrefix

	// ChannelToChainBytePrefix is the byte prefix for storing mapping
	// from the CCV channel ID to the consumer chain ID.
	ChannelToChainBytePrefix

	// ChainToClientBytePrefix is the byte prefix for storing the consumer chainID for a given consumer clientid.
	ChainToClientBytePrefix

	// PendingCreateProposalBytePrefix is the byte prefix for storing the pending identified consumer chain client before the spawn time occurs.
	// The key includes the BigEndian timestamp to allow for efficient chronological iteration
	PendingCreateProposalBytePrefix

	// PendingStopProposalBytePrefix is the byte prefix for storing the pending identified consumer chain before the stop time occurs.
	// The key includes the BigEndian timestamp to allow for efficient chronological iteration
	PendingStopProposalBytePrefix

	// UnbondingOpBytePrefix is the byte prefix that stores a record of all the ids of consumer chains that
	// need to unbond before a given delegation can unbond on this chain.
	UnbondingOpBytePrefix

	// UnbondingOpIndexBytePrefix is byte prefix of the index for looking up which unbonding
	// delegation entries are waiting for a given consumer chain to unbond
	UnbondingOpIndexBytePrefix

	// ValsetUpdateBlockHeightBytePrefix is the byte prefix that will store the mapping from valset update ID to block height
	ValsetUpdateBlockHeightBytePrefix

	// ConsumerGenesisBytePrefix stores consumer genesis state material (consensus state and client state) indexed by consumer chain id
	ConsumerGenesisBytePrefix

	// SlashAcksBytePrefix is the byte prefix that will store consensus address of consumer chain validators successfully slashed on the provider chain
	SlashAcksBytePrefix

	// InitChainHeightBytePrefix is the byte prefix that will store the mapping from a chain id to the corresponding block height on the provider
	// this consumer chain was initialized
	InitChainHeightBytePrefix

	// PendingVSCsBytePrefix is the byte prefix that will store pending ValidatorSetChangePacket data
	PendingVSCsBytePrefix

	// LockUnbondingOnTimeoutBytePrefix is the byte prefix that will store the consumer chain id which unbonding operations are locked on CCV channel timeout
	LockUnbondingOnTimeoutBytePrefix
)

Iota generated keys/byte prefixes (as a byte), supports 256 possible values

View Source
const (
	ProposalTypeCreateConsumerChain = "CreateConsumerChain"
	ProposalTypeStopConsumerChain   = "StopConsumerChain"
)

Variables

View Source
var (

	// ModuleCdc references the global x/ibc-transfer 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/ibc transfer 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)
)
View Source
var (
	ErrInvalidCreateProposal    = sdkerrors.Register(ModuleName, 1, "invalid create consumer chain proposal")
	ErrInvalidStopProposal      = sdkerrors.Register(ModuleName, 2, "invalid stop consumer chain proposal")
	ErrUnknownConsumerChainId   = sdkerrors.Register(ModuleName, 3, "no consumer chain with this chain id")
	ErrUnknownConsumerChannelId = sdkerrors.Register(ModuleName, 4, "no consumer chain with this channel id")
)

Provider sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthProvider        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProvider          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProvider = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyTemplateClient = []byte("TemplateClient")
)

Functions

func AppendMany

func AppendMany(byteses ...[]byte) (out []byte)

AppendMany appends a variable number of byte slices together

func ChainToChannelKey

func ChainToChannelKey(chainID string) []byte

ChainToChannelKey returns the key under which the CCV channel ID will be stored for the given consumer chain.

func ChainToClientKey

func ChainToClientKey(chainID string) []byte

ChainToClientKey returns the key under which the clientID for the given chainID is stored.

func ChannelToChainKey

func ChannelToChainKey(channelID string) []byte

ChannelToChainKey returns the key under which the consumer chain ID will be stored for the given channelID.

func ConsumerGenesisKey

func ConsumerGenesisKey(chainID string) []byte

ConsumerGenesisKey returns the key corresponding to consumer genesis state material (consensus state and client state) indexed by consumer chain id

func HashString

func HashString(x string) []byte

HashString outputs a fixed length 32 byte hash for any string

func InitChainHeightKey

func InitChainHeightKey(chainID string) []byte

InitChainHeightKey returns the key under which the block height for a given chain ID is stored

func LockUnbondingOnTimeoutKey

func LockUnbondingOnTimeoutKey(chainID string) []byte

LockUnbondingOnTimeoutKey returns the key that will store the consumer chain id which unbonding operations are locked on CCV channel timeout

func MaturedUnbondingOpsKey

func MaturedUnbondingOpsKey() []byte

MaturedUnbondingOpsKey returns the key for storing the list of matured unbonding operations.

func MustUnmarshalUnbondingOp

func MustUnmarshalUnbondingOp(cdc codec.BinaryCodec, value []byte) ccv.UnbondingOp

func NewCreateConsumerChainProposal

func NewCreateConsumerChainProposal(title, description, chainID string, initialHeight clienttypes.Height, genesisHash, binaryHash []byte, spawnTime time.Time) (govtypes.Content, error)

NewCreateConsumerChainProposal creates a new create consumerchain proposal.

func NewStopConsumerChainProposal

func NewStopConsumerChainProposal(title, description, chainID string, stopTime time.Time) (govtypes.Content, error)

NewStopConsumerChainProposal creates a new stop consumer chain proposal.

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable type declaration for parameters

func ParsePendingCreateProposalKey

func ParsePendingCreateProposalKey(bz []byte) (time.Time, string, error)

ParsePendingCreateProposalKey returns the time and chain ID for a pending client key or an error if unparseable

func ParsePendingStopProposalKey

func ParsePendingStopProposalKey(bz []byte) (time.Time, string, error)

ParsePendingStopProposalKey returns the time and chain ID for a pending consumer chain stop proposal key or an error if unparseable

func ParseUnbondingOpIndexKey

func ParseUnbondingOpIndexKey(key []byte) (vscID []byte, err error)

ParseUnbondingOpIndexKey parses an unbonding op index key for VSC ID

func PendingCreateProposalKey

func PendingCreateProposalKey(timestamp time.Time, chainID string) []byte

PendingCreateProposalKey returns the key under which a pending identified client is stored

func PendingStopProposalKey

func PendingStopProposalKey(timestamp time.Time, chainID string) []byte

PendingStopProposalKey returns the key under which pending consumer chain stop proposals are stored

func PendingVSCsKey

func PendingVSCsKey(chainID string) []byte

PendingVSCsKey returns the key under which pending ValidatorSetChangePacket data is stored for a given chain ID

func PortKey

func PortKey() []byte

PortKey returns the key to the port ID in the store

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the ibc transfer module interfaces to protobuf Any.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/ibc transfer interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

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 RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

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 RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func SlashAcksKey

func SlashAcksKey(chainID string) []byte

SlashAcksKey returns the key under which slashing acks are stored for a given chain ID

func UnbondingOpIndexKey

func UnbondingOpIndexKey(chainID string, valsetUpdateID uint64) []byte

UnbondingOpIndexKey returns an unbonding op index key Note: chainId is hashed to a fixed length sequence of bytes here to prevent injection attack between chainIDs.

func UnbondingOpKey

func UnbondingOpKey(id uint64) []byte

UnbondingOpKey returns the key that stores a record of all the ids of consumer chains that need to unbond before a given delegation can unbond on this chain

func UnmarshalUnbondingOp

func UnmarshalUnbondingOp(cdc codec.BinaryCodec, value []byte) (unbondingOp ccv.UnbondingOp, err error)

func ValidatorSetUpdateIdKey

func ValidatorSetUpdateIdKey() []byte

ValidatorSetUpdateIdKey is the key that stores the current validator set update id

func ValsetUpdateBlockHeightKey

func ValsetUpdateBlockHeightKey(valsetUpdateId uint64) []byte

ValsetUpdateBlockHeightKey returns the key that storing the mapping from valset update ID to block height

Types

type ConsumerState

type ConsumerState struct {
	ChainId   string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
}

ConsumerState defines the state that the provider chain stores for each consumer chain

func (*ConsumerState) Descriptor

func (*ConsumerState) Descriptor() ([]byte, []int)

func (*ConsumerState) GetChainId

func (m *ConsumerState) GetChainId() string

func (*ConsumerState) GetChannelId

func (m *ConsumerState) GetChannelId() string

func (*ConsumerState) Marshal

func (m *ConsumerState) Marshal() (dAtA []byte, err error)

func (*ConsumerState) MarshalTo

func (m *ConsumerState) MarshalTo(dAtA []byte) (int, error)

func (*ConsumerState) MarshalToSizedBuffer

func (m *ConsumerState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConsumerState) ProtoMessage

func (*ConsumerState) ProtoMessage()

func (*ConsumerState) Reset

func (m *ConsumerState) Reset()

func (*ConsumerState) Size

func (m *ConsumerState) Size() (n int)

func (*ConsumerState) String

func (m *ConsumerState) String() string

func (*ConsumerState) Unmarshal

func (m *ConsumerState) Unmarshal(dAtA []byte) error

func (ConsumerState) Validate

func (cs ConsumerState) Validate() error

func (*ConsumerState) XXX_DiscardUnknown

func (m *ConsumerState) XXX_DiscardUnknown()

func (*ConsumerState) XXX_Marshal

func (m *ConsumerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConsumerState) XXX_Merge

func (m *ConsumerState) XXX_Merge(src proto.Message)

func (*ConsumerState) XXX_Size

func (m *ConsumerState) XXX_Size() int

func (*ConsumerState) XXX_Unmarshal

func (m *ConsumerState) XXX_Unmarshal(b []byte) error

type CreateConsumerChainProposal

type CreateConsumerChainProposal struct {
	// the title of the proposal
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// the description of the proposal
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// the proposed chain-id of the new consumer chain, must be different from all other consumer chain ids of the executing
	// provider chain.
	ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// the proposed initial height of new consumer chain.
	// For a completely new chain, this will be {0,1}. However, it may be different if this is a chain that is converting to a consumer chain.
	InitialHeight types.Height `protobuf:"bytes,4,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height"`
	// genesis hash with no staking information included.
	GenesisHash []byte `protobuf:"bytes,5,opt,name=genesis_hash,json=genesisHash,proto3" json:"genesis_hash,omitempty"`
	// binary hash is the hash of the binary that should be used by validators on chain initialization.
	BinaryHash []byte `protobuf:"bytes,6,opt,name=binary_hash,json=binaryHash,proto3" json:"binary_hash,omitempty"`
	// spawn time is the time on the provider chain at which the consumer chain genesis is finalized and all validators
	// will be responsible for starting their consumer chain validator node.
	SpawnTime time.Time `protobuf:"bytes,7,opt,name=spawn_time,json=spawnTime,proto3,stdtime" json:"spawn_time"`
	// Indicates whether the outstanding unbonding operations should be released
	// in case of a channel time-outs. When set to true, a governance proposal
	// on the provider chain would be necessary to release the locked funds.
	LockUnbondingOnTimeout bool `` /* 132-byte string literal not displayed */
}

CreateConsumerChainProposal is a governance proposal on the provider chain to spawn a new consumer chain. If it passes, then all validators on the provider chain are expected to validate the consumer chain at spawn time or get slashed. It is recommended that spawn time occurs after the proposal end time.

func (*CreateConsumerChainProposal) Descriptor

func (*CreateConsumerChainProposal) Descriptor() ([]byte, []int)

func (*CreateConsumerChainProposal) GetDescription

func (cccp *CreateConsumerChainProposal) GetDescription() string

GetDescription returns the description of a create consumerchain proposal.

func (*CreateConsumerChainProposal) GetTitle

func (cccp *CreateConsumerChainProposal) GetTitle() string

GetTitle returns the title of a create consumerchain proposal.

func (*CreateConsumerChainProposal) Marshal

func (m *CreateConsumerChainProposal) Marshal() (dAtA []byte, err error)

func (*CreateConsumerChainProposal) MarshalTo

func (m *CreateConsumerChainProposal) MarshalTo(dAtA []byte) (int, error)

func (*CreateConsumerChainProposal) MarshalToSizedBuffer

func (m *CreateConsumerChainProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CreateConsumerChainProposal) ProposalRoute

func (cccp *CreateConsumerChainProposal) ProposalRoute() string

ProposalRoute returns the routing key of a create consumerchain proposal.

func (*CreateConsumerChainProposal) ProposalType

func (cccp *CreateConsumerChainProposal) ProposalType() string

ProposalType returns the type of a create consumerchain proposal.

func (*CreateConsumerChainProposal) ProtoMessage

func (*CreateConsumerChainProposal) ProtoMessage()

func (*CreateConsumerChainProposal) Reset

func (m *CreateConsumerChainProposal) Reset()

func (*CreateConsumerChainProposal) Size

func (m *CreateConsumerChainProposal) Size() (n int)

func (*CreateConsumerChainProposal) String

func (cccp *CreateConsumerChainProposal) String() string

String returns the string representation of the CreateConsumerChainProposal.

func (*CreateConsumerChainProposal) Unmarshal

func (m *CreateConsumerChainProposal) Unmarshal(dAtA []byte) error

func (*CreateConsumerChainProposal) ValidateBasic

func (cccp *CreateConsumerChainProposal) ValidateBasic() error

ValidateBasic runs basic stateless validity checks

func (*CreateConsumerChainProposal) XXX_DiscardUnknown

func (m *CreateConsumerChainProposal) XXX_DiscardUnknown()

func (*CreateConsumerChainProposal) XXX_Marshal

func (m *CreateConsumerChainProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateConsumerChainProposal) XXX_Merge

func (m *CreateConsumerChainProposal) XXX_Merge(src proto.Message)

func (*CreateConsumerChainProposal) XXX_Size

func (m *CreateConsumerChainProposal) XXX_Size() int

func (*CreateConsumerChainProposal) XXX_Unmarshal

func (m *CreateConsumerChainProposal) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	ConsumerStates []ConsumerState `protobuf:"bytes,1,rep,name=consumer_states,json=consumerStates,proto3" json:"consumer_states" yaml:"consumer_states"`
	Params         Params          `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

GenesisState defines the CCV provider chain genesis state

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

func NewGenesisState

func NewGenesisState(consumerStates []ConsumerState, params Params) *GenesisState

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetConsumerStates

func (m *GenesisState) GetConsumerStates() []ConsumerState

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type HandshakeMetadata

type HandshakeMetadata struct {
	ProviderFeePoolAddr string `protobuf:"bytes,1,opt,name=provider_fee_pool_addr,json=providerFeePoolAddr,proto3" json:"provider_fee_pool_addr,omitempty"`
	Version             string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
}

func (*HandshakeMetadata) Descriptor

func (*HandshakeMetadata) Descriptor() ([]byte, []int)

func (*HandshakeMetadata) GetProviderFeePoolAddr

func (m *HandshakeMetadata) GetProviderFeePoolAddr() string

func (*HandshakeMetadata) GetVersion

func (m *HandshakeMetadata) GetVersion() string

func (*HandshakeMetadata) Marshal

func (m *HandshakeMetadata) Marshal() (dAtA []byte, err error)

func (*HandshakeMetadata) MarshalTo

func (m *HandshakeMetadata) MarshalTo(dAtA []byte) (int, error)

func (*HandshakeMetadata) MarshalToSizedBuffer

func (m *HandshakeMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HandshakeMetadata) ProtoMessage

func (*HandshakeMetadata) ProtoMessage()

func (*HandshakeMetadata) Reset

func (m *HandshakeMetadata) Reset()

func (*HandshakeMetadata) Size

func (m *HandshakeMetadata) Size() (n int)

func (*HandshakeMetadata) String

func (m *HandshakeMetadata) String() string

func (*HandshakeMetadata) Unmarshal

func (m *HandshakeMetadata) Unmarshal(dAtA []byte) error

func (*HandshakeMetadata) XXX_DiscardUnknown

func (m *HandshakeMetadata) XXX_DiscardUnknown()

func (*HandshakeMetadata) XXX_Marshal

func (m *HandshakeMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HandshakeMetadata) XXX_Merge

func (m *HandshakeMetadata) XXX_Merge(src proto.Message)

func (*HandshakeMetadata) XXX_Size

func (m *HandshakeMetadata) XXX_Size() int

func (*HandshakeMetadata) XXX_Unmarshal

func (m *HandshakeMetadata) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	TemplateClient *types1.ClientState `protobuf:"bytes,1,opt,name=template_client,json=templateClient,proto3" json:"template_client,omitempty"`
}

Params defines the parameters for CCV Provider module

func DefaultParams

func DefaultParams() Params

DefaultParams is the default params for the provider module

func NewParams

func NewParams(cs *ibctmtypes.ClientState) Params

NewParams creates new provider parameters with provided arguments

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) GetTemplateClient

func (m *Params) GetTemplateClient() *types1.ClientState

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

Validate all ccv-provider module parameters

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// ConsumerGenesis queries the genesis state needed to start a consumer chain whose proposal
	// has been accepted
	ConsumerGenesis(ctx context.Context, in *QueryConsumerGenesisRequest, opts ...grpc.CallOption) (*QueryConsumerGenesisResponse, error)
}

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.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryConsumerGenesisRequest

type QueryConsumerGenesisRequest struct {
	ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
}

func (*QueryConsumerGenesisRequest) Descriptor

func (*QueryConsumerGenesisRequest) Descriptor() ([]byte, []int)

func (*QueryConsumerGenesisRequest) GetChainId

func (m *QueryConsumerGenesisRequest) GetChainId() string

func (*QueryConsumerGenesisRequest) Marshal

func (m *QueryConsumerGenesisRequest) Marshal() (dAtA []byte, err error)

func (*QueryConsumerGenesisRequest) MarshalTo

func (m *QueryConsumerGenesisRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryConsumerGenesisRequest) MarshalToSizedBuffer

func (m *QueryConsumerGenesisRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryConsumerGenesisRequest) ProtoMessage

func (*QueryConsumerGenesisRequest) ProtoMessage()

func (*QueryConsumerGenesisRequest) Reset

func (m *QueryConsumerGenesisRequest) Reset()

func (*QueryConsumerGenesisRequest) Size

func (m *QueryConsumerGenesisRequest) Size() (n int)

func (*QueryConsumerGenesisRequest) String

func (m *QueryConsumerGenesisRequest) String() string

func (*QueryConsumerGenesisRequest) Unmarshal

func (m *QueryConsumerGenesisRequest) Unmarshal(dAtA []byte) error

func (*QueryConsumerGenesisRequest) XXX_DiscardUnknown

func (m *QueryConsumerGenesisRequest) XXX_DiscardUnknown()

func (*QueryConsumerGenesisRequest) XXX_Marshal

func (m *QueryConsumerGenesisRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryConsumerGenesisRequest) XXX_Merge

func (m *QueryConsumerGenesisRequest) XXX_Merge(src proto.Message)

func (*QueryConsumerGenesisRequest) XXX_Size

func (m *QueryConsumerGenesisRequest) XXX_Size() int

func (*QueryConsumerGenesisRequest) XXX_Unmarshal

func (m *QueryConsumerGenesisRequest) XXX_Unmarshal(b []byte) error

type QueryConsumerGenesisResponse

type QueryConsumerGenesisResponse struct {
	GenesisState types.GenesisState `protobuf:"bytes,1,opt,name=genesis_state,json=genesisState,proto3" json:"genesis_state"`
}

func (*QueryConsumerGenesisResponse) Descriptor

func (*QueryConsumerGenesisResponse) Descriptor() ([]byte, []int)

func (*QueryConsumerGenesisResponse) GetGenesisState

func (m *QueryConsumerGenesisResponse) GetGenesisState() types.GenesisState

func (*QueryConsumerGenesisResponse) Marshal

func (m *QueryConsumerGenesisResponse) Marshal() (dAtA []byte, err error)

func (*QueryConsumerGenesisResponse) MarshalTo

func (m *QueryConsumerGenesisResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryConsumerGenesisResponse) MarshalToSizedBuffer

func (m *QueryConsumerGenesisResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryConsumerGenesisResponse) ProtoMessage

func (*QueryConsumerGenesisResponse) ProtoMessage()

func (*QueryConsumerGenesisResponse) Reset

func (m *QueryConsumerGenesisResponse) Reset()

func (*QueryConsumerGenesisResponse) Size

func (m *QueryConsumerGenesisResponse) Size() (n int)

func (*QueryConsumerGenesisResponse) String

func (*QueryConsumerGenesisResponse) Unmarshal

func (m *QueryConsumerGenesisResponse) Unmarshal(dAtA []byte) error

func (*QueryConsumerGenesisResponse) XXX_DiscardUnknown

func (m *QueryConsumerGenesisResponse) XXX_DiscardUnknown()

func (*QueryConsumerGenesisResponse) XXX_Marshal

func (m *QueryConsumerGenesisResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryConsumerGenesisResponse) XXX_Merge

func (m *QueryConsumerGenesisResponse) XXX_Merge(src proto.Message)

func (*QueryConsumerGenesisResponse) XXX_Size

func (m *QueryConsumerGenesisResponse) XXX_Size() int

func (*QueryConsumerGenesisResponse) XXX_Unmarshal

func (m *QueryConsumerGenesisResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// ConsumerGenesis queries the genesis state needed to start a consumer chain whose proposal
	// has been accepted
	ConsumerGenesis(context.Context, *QueryConsumerGenesisRequest) (*QueryConsumerGenesisResponse, error)
}

QueryServer is the server API for Query service.

type Status

type Status int

type StopConsumerChainProposal

type StopConsumerChainProposal struct {
	// the title of the proposal
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// the description of the proposal
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// the chain-id of the consumer chain to be stopped
	ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// the time on the provider chain at which all validators are responsible to stop their consumer chain validator node
	StopTime time.Time `protobuf:"bytes,4,opt,name=stop_time,json=stopTime,proto3,stdtime" json:"stop_time"`
}

StopConsumerProposal is a governance proposal on the provider chain to stop a consumer chain. If it passes, all the consumer chain's state is removed from the provider chain. The outstanding unbonding operation funds are released if the LockUnbondingOnTimeout parameter is set to false for the consumer chain ID.

func (*StopConsumerChainProposal) Descriptor

func (*StopConsumerChainProposal) Descriptor() ([]byte, []int)

func (*StopConsumerChainProposal) GetChainId

func (m *StopConsumerChainProposal) GetChainId() string

func (*StopConsumerChainProposal) GetDescription

func (m *StopConsumerChainProposal) GetDescription() string

func (*StopConsumerChainProposal) GetStopTime

func (m *StopConsumerChainProposal) GetStopTime() time.Time

func (*StopConsumerChainProposal) GetTitle

func (m *StopConsumerChainProposal) GetTitle() string

func (*StopConsumerChainProposal) Marshal

func (m *StopConsumerChainProposal) Marshal() (dAtA []byte, err error)

func (*StopConsumerChainProposal) MarshalTo

func (m *StopConsumerChainProposal) MarshalTo(dAtA []byte) (int, error)

func (*StopConsumerChainProposal) MarshalToSizedBuffer

func (m *StopConsumerChainProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StopConsumerChainProposal) ProposalRoute

func (sccp *StopConsumerChainProposal) ProposalRoute() string

ProposalRoute returns the routing key of a stop consumer chain proposal.

func (*StopConsumerChainProposal) ProposalType

func (sccp *StopConsumerChainProposal) ProposalType() string

ProposalType returns the type of a stop consumer chain proposal.

func (*StopConsumerChainProposal) ProtoMessage

func (*StopConsumerChainProposal) ProtoMessage()

func (*StopConsumerChainProposal) Reset

func (m *StopConsumerChainProposal) Reset()

func (*StopConsumerChainProposal) Size

func (m *StopConsumerChainProposal) Size() (n int)

func (*StopConsumerChainProposal) String

func (m *StopConsumerChainProposal) String() string

func (*StopConsumerChainProposal) Unmarshal

func (m *StopConsumerChainProposal) Unmarshal(dAtA []byte) error

func (*StopConsumerChainProposal) ValidateBasic

func (sccp *StopConsumerChainProposal) ValidateBasic() error

ValidateBasic runs basic stateless validity checks

func (*StopConsumerChainProposal) XXX_DiscardUnknown

func (m *StopConsumerChainProposal) XXX_DiscardUnknown()

func (*StopConsumerChainProposal) XXX_Marshal

func (m *StopConsumerChainProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StopConsumerChainProposal) XXX_Merge

func (m *StopConsumerChainProposal) XXX_Merge(src proto.Message)

func (*StopConsumerChainProposal) XXX_Size

func (m *StopConsumerChainProposal) XXX_Size() int

func (*StopConsumerChainProposal) XXX_Unmarshal

func (m *StopConsumerChainProposal) XXX_Unmarshal(b []byte) error

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ConsumerGenesis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL