Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error
- func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type MsgClient
- type MsgServer
- type MsgSignalVersion
- func (*MsgSignalVersion) Descriptor() ([]byte, []int)
- func (msg *MsgSignalVersion) GetSignBytes() []byte
- func (msg *MsgSignalVersion) GetSigners() []sdk.AccAddress
- func (m *MsgSignalVersion) GetValidatorAddress() string
- func (m *MsgSignalVersion) GetVersion() uint64
- func (m *MsgSignalVersion) Marshal() (dAtA []byte, err error)
- func (m *MsgSignalVersion) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSignalVersion) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSignalVersion) ProtoMessage()
- func (m *MsgSignalVersion) Reset()
- func (msg *MsgSignalVersion) Route() string
- func (m *MsgSignalVersion) Size() (n int)
- func (m *MsgSignalVersion) String() string
- func (msg *MsgSignalVersion) Type() string
- func (m *MsgSignalVersion) Unmarshal(dAtA []byte) error
- func (msg *MsgSignalVersion) ValidateBasic() error
- func (m *MsgSignalVersion) XXX_DiscardUnknown()
- func (m *MsgSignalVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSignalVersion) XXX_Merge(src proto.Message)
- func (m *MsgSignalVersion) XXX_Size() int
- func (m *MsgSignalVersion) XXX_Unmarshal(b []byte) error
- type MsgSignalVersionResponse
- func (*MsgSignalVersionResponse) Descriptor() ([]byte, []int)
- func (m *MsgSignalVersionResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSignalVersionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSignalVersionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSignalVersionResponse) ProtoMessage()
- func (m *MsgSignalVersionResponse) Reset()
- func (m *MsgSignalVersionResponse) Size() (n int)
- func (m *MsgSignalVersionResponse) String() string
- func (m *MsgSignalVersionResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSignalVersionResponse) XXX_DiscardUnknown()
- func (m *MsgSignalVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSignalVersionResponse) XXX_Merge(src proto.Message)
- func (m *MsgSignalVersionResponse) XXX_Size() int
- func (m *MsgSignalVersionResponse) XXX_Unmarshal(b []byte) error
- type MsgTryUpgrade
- func (*MsgTryUpgrade) Descriptor() ([]byte, []int)
- func (msg *MsgTryUpgrade) GetSignBytes() []byte
- func (m *MsgTryUpgrade) GetSigner() string
- func (msg *MsgTryUpgrade) GetSigners() []sdk.AccAddress
- func (m *MsgTryUpgrade) Marshal() (dAtA []byte, err error)
- func (m *MsgTryUpgrade) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgTryUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgTryUpgrade) ProtoMessage()
- func (m *MsgTryUpgrade) Reset()
- func (msg *MsgTryUpgrade) Route() string
- func (m *MsgTryUpgrade) Size() (n int)
- func (m *MsgTryUpgrade) String() string
- func (msg *MsgTryUpgrade) Type() string
- func (m *MsgTryUpgrade) Unmarshal(dAtA []byte) error
- func (msg *MsgTryUpgrade) ValidateBasic() error
- func (m *MsgTryUpgrade) XXX_DiscardUnknown()
- func (m *MsgTryUpgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgTryUpgrade) XXX_Merge(src proto.Message)
- func (m *MsgTryUpgrade) XXX_Size() int
- func (m *MsgTryUpgrade) XXX_Unmarshal(b []byte) error
- type MsgTryUpgradeResponse
- func (*MsgTryUpgradeResponse) Descriptor() ([]byte, []int)
- func (m *MsgTryUpgradeResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgTryUpgradeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgTryUpgradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgTryUpgradeResponse) ProtoMessage()
- func (m *MsgTryUpgradeResponse) Reset()
- func (m *MsgTryUpgradeResponse) Size() (n int)
- func (m *MsgTryUpgradeResponse) String() string
- func (m *MsgTryUpgradeResponse) Unmarshal(dAtA []byte) error
- func (m *MsgTryUpgradeResponse) XXX_DiscardUnknown()
- func (m *MsgTryUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgTryUpgradeResponse) XXX_Merge(src proto.Message)
- func (m *MsgTryUpgradeResponse) XXX_Size() int
- func (m *MsgTryUpgradeResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryGetUpgradeRequest
- func (*QueryGetUpgradeRequest) Descriptor() ([]byte, []int)
- func (m *QueryGetUpgradeRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryGetUpgradeRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetUpgradeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetUpgradeRequest) ProtoMessage()
- func (m *QueryGetUpgradeRequest) Reset()
- func (m *QueryGetUpgradeRequest) Size() (n int)
- func (m *QueryGetUpgradeRequest) String() string
- func (m *QueryGetUpgradeRequest) Unmarshal(dAtA []byte) error
- func (m *QueryGetUpgradeRequest) XXX_DiscardUnknown()
- func (m *QueryGetUpgradeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetUpgradeRequest) XXX_Merge(src proto.Message)
- func (m *QueryGetUpgradeRequest) XXX_Size() int
- func (m *QueryGetUpgradeRequest) XXX_Unmarshal(b []byte) error
- type QueryGetUpgradeResponse
- func (*QueryGetUpgradeResponse) Descriptor() ([]byte, []int)
- func (m *QueryGetUpgradeResponse) GetUpgrade() *Upgrade
- func (m *QueryGetUpgradeResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryGetUpgradeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetUpgradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetUpgradeResponse) ProtoMessage()
- func (m *QueryGetUpgradeResponse) Reset()
- func (m *QueryGetUpgradeResponse) Size() (n int)
- func (m *QueryGetUpgradeResponse) String() string
- func (m *QueryGetUpgradeResponse) Unmarshal(dAtA []byte) error
- func (m *QueryGetUpgradeResponse) XXX_DiscardUnknown()
- func (m *QueryGetUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetUpgradeResponse) XXX_Merge(src proto.Message)
- func (m *QueryGetUpgradeResponse) XXX_Size() int
- func (m *QueryGetUpgradeResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryVersionTallyRequest
- func (*QueryVersionTallyRequest) Descriptor() ([]byte, []int)
- func (m *QueryVersionTallyRequest) GetVersion() uint64
- func (m *QueryVersionTallyRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryVersionTallyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryVersionTallyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryVersionTallyRequest) ProtoMessage()
- func (m *QueryVersionTallyRequest) Reset()
- func (m *QueryVersionTallyRequest) Size() (n int)
- func (m *QueryVersionTallyRequest) String() string
- func (m *QueryVersionTallyRequest) Unmarshal(dAtA []byte) error
- func (m *QueryVersionTallyRequest) XXX_DiscardUnknown()
- func (m *QueryVersionTallyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryVersionTallyRequest) XXX_Merge(src proto.Message)
- func (m *QueryVersionTallyRequest) XXX_Size() int
- func (m *QueryVersionTallyRequest) XXX_Unmarshal(b []byte) error
- type QueryVersionTallyResponse
- func (*QueryVersionTallyResponse) Descriptor() ([]byte, []int)
- func (m *QueryVersionTallyResponse) GetThresholdPower() uint64
- func (m *QueryVersionTallyResponse) GetTotalVotingPower() uint64
- func (m *QueryVersionTallyResponse) GetVotingPower() uint64
- func (m *QueryVersionTallyResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryVersionTallyResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryVersionTallyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryVersionTallyResponse) ProtoMessage()
- func (m *QueryVersionTallyResponse) Reset()
- func (m *QueryVersionTallyResponse) Size() (n int)
- func (m *QueryVersionTallyResponse) String() string
- func (m *QueryVersionTallyResponse) Unmarshal(dAtA []byte) error
- func (m *QueryVersionTallyResponse) XXX_DiscardUnknown()
- func (m *QueryVersionTallyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryVersionTallyResponse) XXX_Merge(src proto.Message)
- func (m *QueryVersionTallyResponse) XXX_Size() int
- func (m *QueryVersionTallyResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- type Upgrade
- func (*Upgrade) Descriptor() ([]byte, []int)
- func (m *Upgrade) GetAppVersion() uint64
- func (m *Upgrade) GetUpgradeHeight() int64
- func (m *Upgrade) Marshal() (dAtA []byte, err error)
- func (m *Upgrade) MarshalTo(dAtA []byte) (int, error)
- func (m *Upgrade) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Upgrade) ProtoMessage()
- func (m *Upgrade) Reset()
- func (m *Upgrade) Size() (n int)
- func (m *Upgrade) String() string
- func (m *Upgrade) Unmarshal(dAtA []byte) error
- func (m *Upgrade) XXX_DiscardUnknown()
- func (m *Upgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Upgrade) XXX_Merge(src proto.Message)
- func (m *Upgrade) XXX_Size() int
- func (m *Upgrade) XXX_Unmarshal(b []byte) error
Constants ¶
const ( ModuleName = "signal" StoreKey = ModuleName QuerierRoute = ModuleName RouterKey = ModuleName URLMsgSignalVersion = "/celestia.signal.v1.Msg/SignalVersion" URLMsgTryUpgrade = "/celestia.signal.v1.Msg/TryUpgrade" )
Variables ¶
var ( ErrInvalidSignalVersion = errors.Register(ModuleName, 1, "invalid signal version because signal version can not be less than the current version") ErrInvalidUpgradeVersion = errors.Register(ModuleName, 3, "invalid upgrade version") ErrUpgradePending = errors.Register(ModuleName, 2, "upgrade is already pending") )
var ( // UpgradeKey is the key in the signal store used to persist a upgrade if one is // pending. UpgradeKey = []byte{0x00} // FirstSignalKey is used as a divider to separate the UpgradeKey from all // the keys associated with signals from validators. In practice, this key // isn't expected to be set or retrieved. FirstSignalKey = []byte{0x000} )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthUpgrade = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowUpgrade = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupUpgrade = fmt.Errorf("proto: unexpected end of group") )
var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the upgrade module types on the provided registry.
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the upgrade types on the provided LegacyAmino codec.
func RegisterMsgHandler ¶
RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandlerClient ¶
RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.
func RegisterMsgHandlerFromEndpoint ¶
func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMsgHandlerServer ¶
RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer 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 RegisterMsgHandlerFromEndpoint instead.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
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)
Types ¶
type MsgClient ¶
type MsgClient interface { // SignalVersion allows a validator to signal for a version. SignalVersion(ctx context.Context, in *MsgSignalVersion, opts ...grpc.CallOption) (*MsgSignalVersionResponse, error) // TryUpgrade tallies all the votes for all the versions to determine if a // quorum has been reached for a version. TryUpgrade(ctx context.Context, in *MsgTryUpgrade, opts ...grpc.CallOption) (*MsgTryUpgradeResponse, error) }
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.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶
type MsgServer interface { // SignalVersion allows a validator to signal for a version. SignalVersion(context.Context, *MsgSignalVersion) (*MsgSignalVersionResponse, error) // TryUpgrade tallies all the votes for all the versions to determine if a // quorum has been reached for a version. TryUpgrade(context.Context, *MsgTryUpgrade) (*MsgTryUpgradeResponse, error) }
MsgServer is the server API for Msg service.
type MsgSignalVersion ¶
type MsgSignalVersion struct { ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` }
MsgSignalVersion signals for an upgrade.
func NewMsgSignalVersion ¶
func NewMsgSignalVersion(valAddress sdk.ValAddress, version uint64) *MsgSignalVersion
func (*MsgSignalVersion) Descriptor ¶
func (*MsgSignalVersion) Descriptor() ([]byte, []int)
func (*MsgSignalVersion) GetSignBytes ¶
func (msg *MsgSignalVersion) GetSignBytes() []byte
GetSignBytes implements legacytx.LegacyMsg.
func (*MsgSignalVersion) GetSigners ¶
func (msg *MsgSignalVersion) GetSigners() []sdk.AccAddress
func (*MsgSignalVersion) GetValidatorAddress ¶
func (m *MsgSignalVersion) GetValidatorAddress() string
func (*MsgSignalVersion) GetVersion ¶
func (m *MsgSignalVersion) GetVersion() uint64
func (*MsgSignalVersion) Marshal ¶
func (m *MsgSignalVersion) Marshal() (dAtA []byte, err error)
func (*MsgSignalVersion) MarshalToSizedBuffer ¶
func (m *MsgSignalVersion) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSignalVersion) ProtoMessage ¶
func (*MsgSignalVersion) ProtoMessage()
func (*MsgSignalVersion) Reset ¶
func (m *MsgSignalVersion) Reset()
func (*MsgSignalVersion) Route ¶
func (msg *MsgSignalVersion) Route() string
Route implements legacytx.LegacyMsg.
func (*MsgSignalVersion) Size ¶
func (m *MsgSignalVersion) Size() (n int)
func (*MsgSignalVersion) String ¶
func (m *MsgSignalVersion) String() string
func (*MsgSignalVersion) Type ¶
func (msg *MsgSignalVersion) Type() string
Type implements legacytx.LegacyMsg.
func (*MsgSignalVersion) Unmarshal ¶
func (m *MsgSignalVersion) Unmarshal(dAtA []byte) error
func (*MsgSignalVersion) ValidateBasic ¶
func (msg *MsgSignalVersion) ValidateBasic() error
func (*MsgSignalVersion) XXX_DiscardUnknown ¶
func (m *MsgSignalVersion) XXX_DiscardUnknown()
func (*MsgSignalVersion) XXX_Marshal ¶
func (m *MsgSignalVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSignalVersion) XXX_Merge ¶
func (m *MsgSignalVersion) XXX_Merge(src proto.Message)
func (*MsgSignalVersion) XXX_Size ¶
func (m *MsgSignalVersion) XXX_Size() int
func (*MsgSignalVersion) XXX_Unmarshal ¶
func (m *MsgSignalVersion) XXX_Unmarshal(b []byte) error
type MsgSignalVersionResponse ¶
type MsgSignalVersionResponse struct { }
MsgSignalVersionResponse is the response type for the SignalVersion method.
func (*MsgSignalVersionResponse) Descriptor ¶
func (*MsgSignalVersionResponse) Descriptor() ([]byte, []int)
func (*MsgSignalVersionResponse) Marshal ¶
func (m *MsgSignalVersionResponse) Marshal() (dAtA []byte, err error)
func (*MsgSignalVersionResponse) MarshalTo ¶
func (m *MsgSignalVersionResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSignalVersionResponse) MarshalToSizedBuffer ¶
func (m *MsgSignalVersionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSignalVersionResponse) ProtoMessage ¶
func (*MsgSignalVersionResponse) ProtoMessage()
func (*MsgSignalVersionResponse) Reset ¶
func (m *MsgSignalVersionResponse) Reset()
func (*MsgSignalVersionResponse) Size ¶
func (m *MsgSignalVersionResponse) Size() (n int)
func (*MsgSignalVersionResponse) String ¶
func (m *MsgSignalVersionResponse) String() string
func (*MsgSignalVersionResponse) Unmarshal ¶
func (m *MsgSignalVersionResponse) Unmarshal(dAtA []byte) error
func (*MsgSignalVersionResponse) XXX_DiscardUnknown ¶
func (m *MsgSignalVersionResponse) XXX_DiscardUnknown()
func (*MsgSignalVersionResponse) XXX_Marshal ¶
func (m *MsgSignalVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSignalVersionResponse) XXX_Merge ¶
func (m *MsgSignalVersionResponse) XXX_Merge(src proto.Message)
func (*MsgSignalVersionResponse) XXX_Size ¶
func (m *MsgSignalVersionResponse) XXX_Size() int
func (*MsgSignalVersionResponse) XXX_Unmarshal ¶
func (m *MsgSignalVersionResponse) XXX_Unmarshal(b []byte) error
type MsgTryUpgrade ¶
type MsgTryUpgrade struct {
Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
}
MsgTryUpgrade tries to upgrade the chain.
func NewMsgTryUpgrade ¶
func NewMsgTryUpgrade(signer sdk.AccAddress) *MsgTryUpgrade
func (*MsgTryUpgrade) Descriptor ¶
func (*MsgTryUpgrade) Descriptor() ([]byte, []int)
func (*MsgTryUpgrade) GetSignBytes ¶
func (msg *MsgTryUpgrade) GetSignBytes() []byte
GetSignBytes implements legacytx.LegacyMsg.
func (*MsgTryUpgrade) GetSigner ¶
func (m *MsgTryUpgrade) GetSigner() string
func (*MsgTryUpgrade) GetSigners ¶
func (msg *MsgTryUpgrade) GetSigners() []sdk.AccAddress
func (*MsgTryUpgrade) Marshal ¶
func (m *MsgTryUpgrade) Marshal() (dAtA []byte, err error)
func (*MsgTryUpgrade) MarshalToSizedBuffer ¶
func (m *MsgTryUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgTryUpgrade) ProtoMessage ¶
func (*MsgTryUpgrade) ProtoMessage()
func (*MsgTryUpgrade) Reset ¶
func (m *MsgTryUpgrade) Reset()
func (*MsgTryUpgrade) Route ¶
func (msg *MsgTryUpgrade) Route() string
Route implements legacytx.LegacyMsg.
func (*MsgTryUpgrade) Size ¶
func (m *MsgTryUpgrade) Size() (n int)
func (*MsgTryUpgrade) String ¶
func (m *MsgTryUpgrade) String() string
func (*MsgTryUpgrade) Type ¶
func (msg *MsgTryUpgrade) Type() string
Type implements legacytx.LegacyMsg.
func (*MsgTryUpgrade) Unmarshal ¶
func (m *MsgTryUpgrade) Unmarshal(dAtA []byte) error
func (*MsgTryUpgrade) ValidateBasic ¶
func (msg *MsgTryUpgrade) ValidateBasic() error
func (*MsgTryUpgrade) XXX_DiscardUnknown ¶
func (m *MsgTryUpgrade) XXX_DiscardUnknown()
func (*MsgTryUpgrade) XXX_Marshal ¶
func (m *MsgTryUpgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgTryUpgrade) XXX_Merge ¶
func (m *MsgTryUpgrade) XXX_Merge(src proto.Message)
func (*MsgTryUpgrade) XXX_Size ¶
func (m *MsgTryUpgrade) XXX_Size() int
func (*MsgTryUpgrade) XXX_Unmarshal ¶
func (m *MsgTryUpgrade) XXX_Unmarshal(b []byte) error
type MsgTryUpgradeResponse ¶
type MsgTryUpgradeResponse struct { }
MsgTryUpgradeResponse is the response type for the TryUpgrade method.
func (*MsgTryUpgradeResponse) Descriptor ¶
func (*MsgTryUpgradeResponse) Descriptor() ([]byte, []int)
func (*MsgTryUpgradeResponse) Marshal ¶
func (m *MsgTryUpgradeResponse) Marshal() (dAtA []byte, err error)
func (*MsgTryUpgradeResponse) MarshalTo ¶
func (m *MsgTryUpgradeResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgTryUpgradeResponse) MarshalToSizedBuffer ¶
func (m *MsgTryUpgradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgTryUpgradeResponse) ProtoMessage ¶
func (*MsgTryUpgradeResponse) ProtoMessage()
func (*MsgTryUpgradeResponse) Reset ¶
func (m *MsgTryUpgradeResponse) Reset()
func (*MsgTryUpgradeResponse) Size ¶
func (m *MsgTryUpgradeResponse) Size() (n int)
func (*MsgTryUpgradeResponse) String ¶
func (m *MsgTryUpgradeResponse) String() string
func (*MsgTryUpgradeResponse) Unmarshal ¶
func (m *MsgTryUpgradeResponse) Unmarshal(dAtA []byte) error
func (*MsgTryUpgradeResponse) XXX_DiscardUnknown ¶
func (m *MsgTryUpgradeResponse) XXX_DiscardUnknown()
func (*MsgTryUpgradeResponse) XXX_Marshal ¶
func (m *MsgTryUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgTryUpgradeResponse) XXX_Merge ¶
func (m *MsgTryUpgradeResponse) XXX_Merge(src proto.Message)
func (*MsgTryUpgradeResponse) XXX_Size ¶
func (m *MsgTryUpgradeResponse) XXX_Size() int
func (*MsgTryUpgradeResponse) XXX_Unmarshal ¶
func (m *MsgTryUpgradeResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // VersionTally enables a client to query for the tally of voting power that // has signalled for a particular version. VersionTally(ctx context.Context, in *QueryVersionTallyRequest, opts ...grpc.CallOption) (*QueryVersionTallyResponse, error) // GetUpgrade enables a client to query for upgrade information if an upgrade is pending. // The response will be empty if no upgrade is pending. GetUpgrade(ctx context.Context, in *QueryGetUpgradeRequest, opts ...grpc.CallOption) (*QueryGetUpgradeResponse, 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 QueryGetUpgradeRequest ¶
type QueryGetUpgradeRequest struct { }
QueryGetUpgradeRequest is the request type for the GetUpgrade query.
func (*QueryGetUpgradeRequest) Descriptor ¶
func (*QueryGetUpgradeRequest) Descriptor() ([]byte, []int)
func (*QueryGetUpgradeRequest) Marshal ¶
func (m *QueryGetUpgradeRequest) Marshal() (dAtA []byte, err error)
func (*QueryGetUpgradeRequest) MarshalTo ¶
func (m *QueryGetUpgradeRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetUpgradeRequest) MarshalToSizedBuffer ¶
func (m *QueryGetUpgradeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetUpgradeRequest) ProtoMessage ¶
func (*QueryGetUpgradeRequest) ProtoMessage()
func (*QueryGetUpgradeRequest) Reset ¶
func (m *QueryGetUpgradeRequest) Reset()
func (*QueryGetUpgradeRequest) Size ¶
func (m *QueryGetUpgradeRequest) Size() (n int)
func (*QueryGetUpgradeRequest) String ¶
func (m *QueryGetUpgradeRequest) String() string
func (*QueryGetUpgradeRequest) Unmarshal ¶
func (m *QueryGetUpgradeRequest) Unmarshal(dAtA []byte) error
func (*QueryGetUpgradeRequest) XXX_DiscardUnknown ¶
func (m *QueryGetUpgradeRequest) XXX_DiscardUnknown()
func (*QueryGetUpgradeRequest) XXX_Marshal ¶
func (m *QueryGetUpgradeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetUpgradeRequest) XXX_Merge ¶
func (m *QueryGetUpgradeRequest) XXX_Merge(src proto.Message)
func (*QueryGetUpgradeRequest) XXX_Size ¶
func (m *QueryGetUpgradeRequest) XXX_Size() int
func (*QueryGetUpgradeRequest) XXX_Unmarshal ¶
func (m *QueryGetUpgradeRequest) XXX_Unmarshal(b []byte) error
type QueryGetUpgradeResponse ¶
type QueryGetUpgradeResponse struct {
Upgrade *Upgrade `protobuf:"bytes,1,opt,name=upgrade,proto3" json:"upgrade,omitempty"`
}
QueryGetUpgradeResponse is the response type for the GetUpgrade query.
func (*QueryGetUpgradeResponse) Descriptor ¶
func (*QueryGetUpgradeResponse) Descriptor() ([]byte, []int)
func (*QueryGetUpgradeResponse) GetUpgrade ¶
func (m *QueryGetUpgradeResponse) GetUpgrade() *Upgrade
func (*QueryGetUpgradeResponse) Marshal ¶
func (m *QueryGetUpgradeResponse) Marshal() (dAtA []byte, err error)
func (*QueryGetUpgradeResponse) MarshalTo ¶
func (m *QueryGetUpgradeResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetUpgradeResponse) MarshalToSizedBuffer ¶
func (m *QueryGetUpgradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetUpgradeResponse) ProtoMessage ¶
func (*QueryGetUpgradeResponse) ProtoMessage()
func (*QueryGetUpgradeResponse) Reset ¶
func (m *QueryGetUpgradeResponse) Reset()
func (*QueryGetUpgradeResponse) Size ¶
func (m *QueryGetUpgradeResponse) Size() (n int)
func (*QueryGetUpgradeResponse) String ¶
func (m *QueryGetUpgradeResponse) String() string
func (*QueryGetUpgradeResponse) Unmarshal ¶
func (m *QueryGetUpgradeResponse) Unmarshal(dAtA []byte) error
func (*QueryGetUpgradeResponse) XXX_DiscardUnknown ¶
func (m *QueryGetUpgradeResponse) XXX_DiscardUnknown()
func (*QueryGetUpgradeResponse) XXX_Marshal ¶
func (m *QueryGetUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetUpgradeResponse) XXX_Merge ¶
func (m *QueryGetUpgradeResponse) XXX_Merge(src proto.Message)
func (*QueryGetUpgradeResponse) XXX_Size ¶
func (m *QueryGetUpgradeResponse) XXX_Size() int
func (*QueryGetUpgradeResponse) XXX_Unmarshal ¶
func (m *QueryGetUpgradeResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // VersionTally enables a client to query for the tally of voting power that // has signalled for a particular version. VersionTally(context.Context, *QueryVersionTallyRequest) (*QueryVersionTallyResponse, error) // GetUpgrade enables a client to query for upgrade information if an upgrade is pending. // The response will be empty if no upgrade is pending. GetUpgrade(context.Context, *QueryGetUpgradeRequest) (*QueryGetUpgradeResponse, error) }
QueryServer is the server API for Query service.
type QueryVersionTallyRequest ¶
type QueryVersionTallyRequest struct {
Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
}
QueryVersionTallyRequest is the request type for the VersionTally query.
func (*QueryVersionTallyRequest) Descriptor ¶
func (*QueryVersionTallyRequest) Descriptor() ([]byte, []int)
func (*QueryVersionTallyRequest) GetVersion ¶
func (m *QueryVersionTallyRequest) GetVersion() uint64
func (*QueryVersionTallyRequest) Marshal ¶
func (m *QueryVersionTallyRequest) Marshal() (dAtA []byte, err error)
func (*QueryVersionTallyRequest) MarshalTo ¶
func (m *QueryVersionTallyRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryVersionTallyRequest) MarshalToSizedBuffer ¶
func (m *QueryVersionTallyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryVersionTallyRequest) ProtoMessage ¶
func (*QueryVersionTallyRequest) ProtoMessage()
func (*QueryVersionTallyRequest) Reset ¶
func (m *QueryVersionTallyRequest) Reset()
func (*QueryVersionTallyRequest) Size ¶
func (m *QueryVersionTallyRequest) Size() (n int)
func (*QueryVersionTallyRequest) String ¶
func (m *QueryVersionTallyRequest) String() string
func (*QueryVersionTallyRequest) Unmarshal ¶
func (m *QueryVersionTallyRequest) Unmarshal(dAtA []byte) error
func (*QueryVersionTallyRequest) XXX_DiscardUnknown ¶
func (m *QueryVersionTallyRequest) XXX_DiscardUnknown()
func (*QueryVersionTallyRequest) XXX_Marshal ¶
func (m *QueryVersionTallyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryVersionTallyRequest) XXX_Merge ¶
func (m *QueryVersionTallyRequest) XXX_Merge(src proto.Message)
func (*QueryVersionTallyRequest) XXX_Size ¶
func (m *QueryVersionTallyRequest) XXX_Size() int
func (*QueryVersionTallyRequest) XXX_Unmarshal ¶
func (m *QueryVersionTallyRequest) XXX_Unmarshal(b []byte) error
type QueryVersionTallyResponse ¶
type QueryVersionTallyResponse struct { VotingPower uint64 `protobuf:"varint,1,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` ThresholdPower uint64 `protobuf:"varint,2,opt,name=threshold_power,json=thresholdPower,proto3" json:"threshold_power,omitempty"` TotalVotingPower uint64 `protobuf:"varint,3,opt,name=total_voting_power,json=totalVotingPower,proto3" json:"total_voting_power,omitempty"` }
QueryVersionTallyResponse is the response type for the VersionTally query.
func (*QueryVersionTallyResponse) Descriptor ¶
func (*QueryVersionTallyResponse) Descriptor() ([]byte, []int)
func (*QueryVersionTallyResponse) GetThresholdPower ¶
func (m *QueryVersionTallyResponse) GetThresholdPower() uint64
func (*QueryVersionTallyResponse) GetTotalVotingPower ¶
func (m *QueryVersionTallyResponse) GetTotalVotingPower() uint64
func (*QueryVersionTallyResponse) GetVotingPower ¶
func (m *QueryVersionTallyResponse) GetVotingPower() uint64
func (*QueryVersionTallyResponse) Marshal ¶
func (m *QueryVersionTallyResponse) Marshal() (dAtA []byte, err error)
func (*QueryVersionTallyResponse) MarshalTo ¶
func (m *QueryVersionTallyResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryVersionTallyResponse) MarshalToSizedBuffer ¶
func (m *QueryVersionTallyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryVersionTallyResponse) ProtoMessage ¶
func (*QueryVersionTallyResponse) ProtoMessage()
func (*QueryVersionTallyResponse) Reset ¶
func (m *QueryVersionTallyResponse) Reset()
func (*QueryVersionTallyResponse) Size ¶
func (m *QueryVersionTallyResponse) Size() (n int)
func (*QueryVersionTallyResponse) String ¶
func (m *QueryVersionTallyResponse) String() string
func (*QueryVersionTallyResponse) Unmarshal ¶
func (m *QueryVersionTallyResponse) Unmarshal(dAtA []byte) error
func (*QueryVersionTallyResponse) XXX_DiscardUnknown ¶
func (m *QueryVersionTallyResponse) XXX_DiscardUnknown()
func (*QueryVersionTallyResponse) XXX_Marshal ¶
func (m *QueryVersionTallyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryVersionTallyResponse) XXX_Merge ¶
func (m *QueryVersionTallyResponse) XXX_Merge(src proto.Message)
func (*QueryVersionTallyResponse) XXX_Size ¶
func (m *QueryVersionTallyResponse) XXX_Size() int
func (*QueryVersionTallyResponse) XXX_Unmarshal ¶
func (m *QueryVersionTallyResponse) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) SignalVersion ¶
func (*UnimplementedMsgServer) SignalVersion(ctx context.Context, req *MsgSignalVersion) (*MsgSignalVersionResponse, error)
func (*UnimplementedMsgServer) TryUpgrade ¶
func (*UnimplementedMsgServer) TryUpgrade(ctx context.Context, req *MsgTryUpgrade) (*MsgTryUpgradeResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) GetUpgrade ¶
func (*UnimplementedQueryServer) GetUpgrade(ctx context.Context, req *QueryGetUpgradeRequest) (*QueryGetUpgradeResponse, error)
func (*UnimplementedQueryServer) VersionTally ¶
func (*UnimplementedQueryServer) VersionTally(ctx context.Context, req *QueryVersionTallyRequest) (*QueryVersionTallyResponse, error)
type Upgrade ¶
type Upgrade struct { // AppVersion is the app version that has received a quorum of validators to // signal for it. AppVersion uint64 `protobuf:"varint,1,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` // UpgradeHeight is the height at which the network should upgrade to the // AppVersion. UpgradeHeight int64 `protobuf:"varint,2,opt,name=upgrade_height,json=upgradeHeight,proto3" json:"upgrade_height,omitempty"` }
Upgrade is a type that represents a network upgrade.
func (*Upgrade) Descriptor ¶
func (*Upgrade) GetAppVersion ¶
func (*Upgrade) GetUpgradeHeight ¶
func (*Upgrade) MarshalToSizedBuffer ¶
func (*Upgrade) ProtoMessage ¶
func (*Upgrade) ProtoMessage()
func (*Upgrade) XXX_DiscardUnknown ¶
func (m *Upgrade) XXX_DiscardUnknown()