Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func NewTransientKVStoreService(key *storetypes.TransientStoreKey) corestore.KVStoreService
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- 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 GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type HeightPower
- func (*HeightPower) Descriptor() ([]byte, []int)
- func (m *HeightPower) GetHeight() int64
- func (m *HeightPower) GetPower() string
- func (m *HeightPower) Marshal() (dAtA []byte, err error)
- func (m *HeightPower) MarshalTo(dAtA []byte) (int, error)
- func (m *HeightPower) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HeightPower) ProtoMessage()
- func (m *HeightPower) Reset()
- func (m *HeightPower) Size() (n int)
- func (m *HeightPower) String() string
- func (m *HeightPower) Unmarshal(dAtA []byte) error
- func (m *HeightPower) XXX_DiscardUnknown()
- func (m *HeightPower) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HeightPower) XXX_Merge(src proto.Message)
- func (m *HeightPower) XXX_Size() int
- func (m *HeightPower) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetLstAllowlist() []string
- func (m *Params) GetPruneInterval() uint64
- func (m *Params) GetRetentionWindowHeights() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryTotalVotingPowerAtRequest
- func (*QueryTotalVotingPowerAtRequest) Descriptor() ([]byte, []int)
- func (m *QueryTotalVotingPowerAtRequest) GetAtHeight() int64
- func (m *QueryTotalVotingPowerAtRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryTotalVotingPowerAtRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTotalVotingPowerAtRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTotalVotingPowerAtRequest) ProtoMessage()
- func (m *QueryTotalVotingPowerAtRequest) Reset()
- func (m *QueryTotalVotingPowerAtRequest) Size() (n int)
- func (m *QueryTotalVotingPowerAtRequest) String() string
- func (m *QueryTotalVotingPowerAtRequest) Unmarshal(dAtA []byte) error
- func (m *QueryTotalVotingPowerAtRequest) XXX_DiscardUnknown()
- func (m *QueryTotalVotingPowerAtRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTotalVotingPowerAtRequest) XXX_Merge(src proto.Message)
- func (m *QueryTotalVotingPowerAtRequest) XXX_Size() int
- func (m *QueryTotalVotingPowerAtRequest) XXX_Unmarshal(b []byte) error
- type QueryTotalVotingPowerAtResponse
- func (*QueryTotalVotingPowerAtResponse) Descriptor() ([]byte, []int)
- func (m *QueryTotalVotingPowerAtResponse) GetPower() string
- func (m *QueryTotalVotingPowerAtResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryTotalVotingPowerAtResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTotalVotingPowerAtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTotalVotingPowerAtResponse) ProtoMessage()
- func (m *QueryTotalVotingPowerAtResponse) Reset()
- func (m *QueryTotalVotingPowerAtResponse) Size() (n int)
- func (m *QueryTotalVotingPowerAtResponse) String() string
- func (m *QueryTotalVotingPowerAtResponse) Unmarshal(dAtA []byte) error
- func (m *QueryTotalVotingPowerAtResponse) XXX_DiscardUnknown()
- func (m *QueryTotalVotingPowerAtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTotalVotingPowerAtResponse) XXX_Merge(src proto.Message)
- func (m *QueryTotalVotingPowerAtResponse) XXX_Size() int
- func (m *QueryTotalVotingPowerAtResponse) XXX_Unmarshal(b []byte) error
- type QueryVotingPowerAtRequest
- func (*QueryVotingPowerAtRequest) Descriptor() ([]byte, []int)
- func (m *QueryVotingPowerAtRequest) GetAddress() string
- func (m *QueryVotingPowerAtRequest) GetAtHeight() int64
- func (m *QueryVotingPowerAtRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryVotingPowerAtRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryVotingPowerAtRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryVotingPowerAtRequest) ProtoMessage()
- func (m *QueryVotingPowerAtRequest) Reset()
- func (m *QueryVotingPowerAtRequest) Size() (n int)
- func (m *QueryVotingPowerAtRequest) String() string
- func (m *QueryVotingPowerAtRequest) Unmarshal(dAtA []byte) error
- func (m *QueryVotingPowerAtRequest) XXX_DiscardUnknown()
- func (m *QueryVotingPowerAtRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryVotingPowerAtRequest) XXX_Merge(src proto.Message)
- func (m *QueryVotingPowerAtRequest) XXX_Size() int
- func (m *QueryVotingPowerAtRequest) XXX_Unmarshal(b []byte) error
- type QueryVotingPowerAtResponse
- func (*QueryVotingPowerAtResponse) Descriptor() ([]byte, []int)
- func (m *QueryVotingPowerAtResponse) GetPower() string
- func (m *QueryVotingPowerAtResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryVotingPowerAtResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryVotingPowerAtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryVotingPowerAtResponse) ProtoMessage()
- func (m *QueryVotingPowerAtResponse) Reset()
- func (m *QueryVotingPowerAtResponse) Size() (n int)
- func (m *QueryVotingPowerAtResponse) String() string
- func (m *QueryVotingPowerAtResponse) Unmarshal(dAtA []byte) error
- func (m *QueryVotingPowerAtResponse) XXX_DiscardUnknown()
- func (m *QueryVotingPowerAtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryVotingPowerAtResponse) XXX_Merge(src proto.Message)
- func (m *QueryVotingPowerAtResponse) XXX_Size() int
- func (m *QueryVotingPowerAtResponse) XXX_Unmarshal(b []byte) error
- type QueryVotingPowerOverRangeRequest
- func (*QueryVotingPowerOverRangeRequest) Descriptor() ([]byte, []int)
- func (m *QueryVotingPowerOverRangeRequest) GetAddress() string
- func (m *QueryVotingPowerOverRangeRequest) GetFromHeight() int64
- func (m *QueryVotingPowerOverRangeRequest) GetToHeight() int64
- func (m *QueryVotingPowerOverRangeRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryVotingPowerOverRangeRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryVotingPowerOverRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryVotingPowerOverRangeRequest) ProtoMessage()
- func (m *QueryVotingPowerOverRangeRequest) Reset()
- func (m *QueryVotingPowerOverRangeRequest) Size() (n int)
- func (m *QueryVotingPowerOverRangeRequest) String() string
- func (m *QueryVotingPowerOverRangeRequest) Unmarshal(dAtA []byte) error
- func (m *QueryVotingPowerOverRangeRequest) XXX_DiscardUnknown()
- func (m *QueryVotingPowerOverRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryVotingPowerOverRangeRequest) XXX_Merge(src proto.Message)
- func (m *QueryVotingPowerOverRangeRequest) XXX_Size() int
- func (m *QueryVotingPowerOverRangeRequest) XXX_Unmarshal(b []byte) error
- type QueryVotingPowerOverRangeResponse
- func (*QueryVotingPowerOverRangeResponse) Descriptor() ([]byte, []int)
- func (m *QueryVotingPowerOverRangeResponse) GetRows() []HeightPower
- func (m *QueryVotingPowerOverRangeResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryVotingPowerOverRangeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryVotingPowerOverRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryVotingPowerOverRangeResponse) ProtoMessage()
- func (m *QueryVotingPowerOverRangeResponse) Reset()
- func (m *QueryVotingPowerOverRangeResponse) Size() (n int)
- func (m *QueryVotingPowerOverRangeResponse) String() string
- func (m *QueryVotingPowerOverRangeResponse) Unmarshal(dAtA []byte) error
- func (m *QueryVotingPowerOverRangeResponse) XXX_DiscardUnknown()
- func (m *QueryVotingPowerOverRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryVotingPowerOverRangeResponse) XXX_Merge(src proto.Message)
- func (m *QueryVotingPowerOverRangeResponse) XXX_Size() int
- func (m *QueryVotingPowerOverRangeResponse) XXX_Unmarshal(b []byte) error
- type StakingKeeper
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) TotalVotingPowerAt(ctx context.Context, req *QueryTotalVotingPowerAtRequest) (*QueryTotalVotingPowerAtResponse, error)
- func (*UnimplementedQueryServer) VotingPowerAt(ctx context.Context, req *QueryVotingPowerAtRequest) (*QueryVotingPowerAtResponse, error)
- func (*UnimplementedQueryServer) VotingPowerOverRange(ctx context.Context, req *QueryVotingPowerOverRangeRequest) (*QueryVotingPowerOverRangeResponse, error)
Constants ¶
const ( ModuleName = "votingsnapshot" StoreKey = ModuleName // TransientStoreKey backs the per-block dirty-delegator set. Staking // hooks mark delegators dirty here; the module EndBlocker drains the // set into persistent snapshots and the store auto-resets on commit. TransientStoreKey = "transient_votingsnapshot" )
const DefaultPruneInterval uint64 = 1
DefaultPruneInterval — once per block. Lets governance batch the prune sweep on busy chains by lifting this knob via params update. 0 and 1 are treated as equivalent at the keeper.
const DefaultRetentionWindowHeights uint64 = 0
DefaultRetentionWindowHeights — pruning is disabled by default at v30 launch. The on-chain history is small at activation and the safer failure mode (unbounded growth) is preferable to the alternative (a buggy or mis-tuned prune sweep silently dropping snapshots). A future governance proposal can flip this to, e.g., ~1 year at 2.5s blocks (12_614_400) once operators have observed the growth curve.
Variables ¶
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ParamsKey = collections.NewPrefix(0) VotingPowerKey = collections.NewPrefix(1) // (delegator, height) -> sdkmath.Int TotalPowerKey = collections.NewPrefix(2) // height -> sdkmath.Int )
persistent store prefixes
var ( TransientDirtyDelegatorsKey = collections.NewPrefix(0) // delegator -> () TransientTotalDirtyKey = collections.NewPrefix(1) // () -> bool )
transient store prefixes (separate store — no clash with the above)
var ( ErrDuplicateLSTEntry = errors.New("duplicate LST allowlist address") ErrParamOutOfRange = errors.New("parameter exceeds int64 range") )
static validation errors (err113-friendly; also matchable via errors.Is)
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
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 Msg_serviceDesc = _Msg_serviceDesc
var Query_serviceDesc = _Query_serviceDesc
Functions ¶
func NewTransientKVStoreService ¶
func NewTransientKVStoreService(key *storetypes.TransientStoreKey) corestore.KVStoreService
NewTransientKVStoreService adapts a *storetypes.TransientStoreKey into a corestore.KVStoreService so collections can be built over a transient store. The SDK's runtime package (v0.53) only offers runtime.NewTransientStoreService, which returns the narrower core/store.TransientStoreService interface that collections cannot consume — this adapter mirrors runtime's unexported kvStoreService but opens the store via a transient key. The backing store resets on every commit, which is exactly the lifetime the dirty-delegator set needs.
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module's sdk.Msg implementations with the InterfaceRegistry so they can be encoded/decoded across the SDK's tx pipeline.
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 GenesisState ¶
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
GenesisState is the x/voting-snapshot module's genesis-state structure.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the module's genesis-time state.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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) 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 HeightPower ¶
type HeightPower struct {
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
Power string `protobuf:"bytes,2,opt,name=power,proto3" json:"power,omitempty"`
}
func (*HeightPower) Descriptor ¶
func (*HeightPower) Descriptor() ([]byte, []int)
func (*HeightPower) GetHeight ¶
func (m *HeightPower) GetHeight() int64
func (*HeightPower) GetPower ¶
func (m *HeightPower) GetPower() string
func (*HeightPower) Marshal ¶
func (m *HeightPower) Marshal() (dAtA []byte, err error)
func (*HeightPower) MarshalToSizedBuffer ¶
func (m *HeightPower) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HeightPower) ProtoMessage ¶
func (*HeightPower) ProtoMessage()
func (*HeightPower) Reset ¶
func (m *HeightPower) Reset()
func (*HeightPower) Size ¶
func (m *HeightPower) Size() (n int)
func (*HeightPower) String ¶
func (m *HeightPower) String() string
func (*HeightPower) Unmarshal ¶
func (m *HeightPower) Unmarshal(dAtA []byte) error
func (*HeightPower) XXX_DiscardUnknown ¶
func (m *HeightPower) XXX_DiscardUnknown()
func (*HeightPower) XXX_Marshal ¶
func (m *HeightPower) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HeightPower) XXX_Merge ¶
func (m *HeightPower) XXX_Merge(src proto.Message)
func (*HeightPower) XXX_Size ¶
func (m *HeightPower) XXX_Size() int
func (*HeightPower) XXX_Unmarshal ¶
func (m *HeightPower) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface {
// UpdateParams updates the module parameters. Authority-only —
// the gov module address.
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 {
// UpdateParams updates the module parameters. Authority-only —
// the gov module address.
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}
MsgServer is the server API for Msg service.
type MsgUpdateParams ¶
type MsgUpdateParams struct {
// authority is the address that controls the module (defaults to the
// governance module account).
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
// params is the full new parameter set.
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}
MsgUpdateParams sets new module parameters. Sent by the governance module after a passing proposal.
func (*MsgUpdateParams) Descriptor ¶
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶
func (m *MsgUpdateParams) GetParams() Params
func (*MsgUpdateParams) Marshal ¶
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶
type MsgUpdateParamsResponse struct {
}
func (*MsgUpdateParamsResponse) Descriptor ¶
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct {
LstAllowlist []string `protobuf:"bytes,1,rep,name=lst_allowlist,json=lstAllowlist,proto3" json:"lst_allowlist,omitempty"`
RetentionWindowHeights uint64 `` /* 130-byte string literal not displayed */
PruneInterval uint64 `protobuf:"varint,3,opt,name=prune_interval,json=pruneInterval,proto3" json:"prune_interval,omitempty"`
}
Params is the governance-controlled config for x/voting-snapshot.
LSTAllowlist: bech32 addresses of LST contracts whose delegations must NOT count toward voting power. Empty at v30 launch.
RetentionWindowHeights: snapshots older than this many blocks are pruned by the EndBlocker. Zero disables pruning. Default is 0 at v30 launch — pruning is an opt-in operation governance can turn on once the on-chain history outgrows what the chain wants to keep.
PruneInterval: only run the prune sweep when block_height % prune_interval == 0. Lets governance batch the sweep to amortize its iteration cost on busy chains. Zero/one both mean "every block".
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns the module's default parameter set.
LST allowlist is empty at v30 launch (no live LST contracts on Juno per memory/juno-voting-design.md). Default-deny: an unknown LST counts as voting power until governance lists it.
func (*Params) Descriptor ¶
func (*Params) GetLstAllowlist ¶
func (*Params) GetPruneInterval ¶
func (*Params) GetRetentionWindowHeights ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (Params) Validate ¶
Validate stateless-checks a Params value. Called from MsgUpdateParams handling and genesis validation so malformed params can never be committed:
- every LST allowlist entry must be a valid bech32 account address (a bad entry would make computeTotalPower / IsLST comparisons silently miss the intended contract);
- allowlist entries must be unique (duplicates would double-subtract the LST's stake from TotalPower);
- RetentionWindowHeights and PruneInterval must fit in an int64, as the prune path casts them to block-height arithmetic.
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface {
// Params returns the current x/voting-snapshot module parameters.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// VotingPowerAt returns the bonded voting power of `address` at
// `at_height`, excluding LST-held delegations. Resolves to the
// most recent snapshot at-or-before the requested height. Returns
// zero (with no error) if no snapshot exists.
VotingPowerAt(ctx context.Context, in *QueryVotingPowerAtRequest, opts ...grpc.CallOption) (*QueryVotingPowerAtResponse, error)
// TotalVotingPowerAt returns the chain-wide bonded supply at
// `at_height`. Same at-or-before semantics as VotingPowerAt.
TotalVotingPowerAt(ctx context.Context, in *QueryTotalVotingPowerAtRequest, opts ...grpc.CallOption) (*QueryTotalVotingPowerAtResponse, error)
// VotingPowerOverRange returns every recorded snapshot for `address`
// in [from_height, to_height]. Useful for time-decay schemes.
VotingPowerOverRange(ctx context.Context, in *QueryVotingPowerOverRangeRequest, opts ...grpc.CallOption) (*QueryVotingPowerOverRangeResponse, 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 QueryParamsRequest ¶
type QueryParamsRequest struct {
}
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface {
// Params returns the current x/voting-snapshot module parameters.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// VotingPowerAt returns the bonded voting power of `address` at
// `at_height`, excluding LST-held delegations. Resolves to the
// most recent snapshot at-or-before the requested height. Returns
// zero (with no error) if no snapshot exists.
VotingPowerAt(context.Context, *QueryVotingPowerAtRequest) (*QueryVotingPowerAtResponse, error)
// TotalVotingPowerAt returns the chain-wide bonded supply at
// `at_height`. Same at-or-before semantics as VotingPowerAt.
TotalVotingPowerAt(context.Context, *QueryTotalVotingPowerAtRequest) (*QueryTotalVotingPowerAtResponse, error)
// VotingPowerOverRange returns every recorded snapshot for `address`
// in [from_height, to_height]. Useful for time-decay schemes.
VotingPowerOverRange(context.Context, *QueryVotingPowerOverRangeRequest) (*QueryVotingPowerOverRangeResponse, error)
}
QueryServer is the server API for Query service.
type QueryTotalVotingPowerAtRequest ¶
type QueryTotalVotingPowerAtRequest struct {
AtHeight int64 `protobuf:"varint,1,opt,name=at_height,json=atHeight,proto3" json:"at_height,omitempty"`
}
func (*QueryTotalVotingPowerAtRequest) Descriptor ¶
func (*QueryTotalVotingPowerAtRequest) Descriptor() ([]byte, []int)
func (*QueryTotalVotingPowerAtRequest) GetAtHeight ¶
func (m *QueryTotalVotingPowerAtRequest) GetAtHeight() int64
func (*QueryTotalVotingPowerAtRequest) Marshal ¶
func (m *QueryTotalVotingPowerAtRequest) Marshal() (dAtA []byte, err error)
func (*QueryTotalVotingPowerAtRequest) MarshalTo ¶
func (m *QueryTotalVotingPowerAtRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryTotalVotingPowerAtRequest) MarshalToSizedBuffer ¶
func (m *QueryTotalVotingPowerAtRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTotalVotingPowerAtRequest) ProtoMessage ¶
func (*QueryTotalVotingPowerAtRequest) ProtoMessage()
func (*QueryTotalVotingPowerAtRequest) Reset ¶
func (m *QueryTotalVotingPowerAtRequest) Reset()
func (*QueryTotalVotingPowerAtRequest) Size ¶
func (m *QueryTotalVotingPowerAtRequest) Size() (n int)
func (*QueryTotalVotingPowerAtRequest) String ¶
func (m *QueryTotalVotingPowerAtRequest) String() string
func (*QueryTotalVotingPowerAtRequest) Unmarshal ¶
func (m *QueryTotalVotingPowerAtRequest) Unmarshal(dAtA []byte) error
func (*QueryTotalVotingPowerAtRequest) XXX_DiscardUnknown ¶
func (m *QueryTotalVotingPowerAtRequest) XXX_DiscardUnknown()
func (*QueryTotalVotingPowerAtRequest) XXX_Marshal ¶
func (m *QueryTotalVotingPowerAtRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTotalVotingPowerAtRequest) XXX_Merge ¶
func (m *QueryTotalVotingPowerAtRequest) XXX_Merge(src proto.Message)
func (*QueryTotalVotingPowerAtRequest) XXX_Size ¶
func (m *QueryTotalVotingPowerAtRequest) XXX_Size() int
func (*QueryTotalVotingPowerAtRequest) XXX_Unmarshal ¶
func (m *QueryTotalVotingPowerAtRequest) XXX_Unmarshal(b []byte) error
type QueryTotalVotingPowerAtResponse ¶
type QueryTotalVotingPowerAtResponse struct {
Power string `protobuf:"bytes,1,opt,name=power,proto3" json:"power,omitempty"`
}
func (*QueryTotalVotingPowerAtResponse) Descriptor ¶
func (*QueryTotalVotingPowerAtResponse) Descriptor() ([]byte, []int)
func (*QueryTotalVotingPowerAtResponse) GetPower ¶
func (m *QueryTotalVotingPowerAtResponse) GetPower() string
func (*QueryTotalVotingPowerAtResponse) Marshal ¶
func (m *QueryTotalVotingPowerAtResponse) Marshal() (dAtA []byte, err error)
func (*QueryTotalVotingPowerAtResponse) MarshalTo ¶
func (m *QueryTotalVotingPowerAtResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryTotalVotingPowerAtResponse) MarshalToSizedBuffer ¶
func (m *QueryTotalVotingPowerAtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTotalVotingPowerAtResponse) ProtoMessage ¶
func (*QueryTotalVotingPowerAtResponse) ProtoMessage()
func (*QueryTotalVotingPowerAtResponse) Reset ¶
func (m *QueryTotalVotingPowerAtResponse) Reset()
func (*QueryTotalVotingPowerAtResponse) Size ¶
func (m *QueryTotalVotingPowerAtResponse) Size() (n int)
func (*QueryTotalVotingPowerAtResponse) String ¶
func (m *QueryTotalVotingPowerAtResponse) String() string
func (*QueryTotalVotingPowerAtResponse) Unmarshal ¶
func (m *QueryTotalVotingPowerAtResponse) Unmarshal(dAtA []byte) error
func (*QueryTotalVotingPowerAtResponse) XXX_DiscardUnknown ¶
func (m *QueryTotalVotingPowerAtResponse) XXX_DiscardUnknown()
func (*QueryTotalVotingPowerAtResponse) XXX_Marshal ¶
func (m *QueryTotalVotingPowerAtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTotalVotingPowerAtResponse) XXX_Merge ¶
func (m *QueryTotalVotingPowerAtResponse) XXX_Merge(src proto.Message)
func (*QueryTotalVotingPowerAtResponse) XXX_Size ¶
func (m *QueryTotalVotingPowerAtResponse) XXX_Size() int
func (*QueryTotalVotingPowerAtResponse) XXX_Unmarshal ¶
func (m *QueryTotalVotingPowerAtResponse) XXX_Unmarshal(b []byte) error
type QueryVotingPowerAtRequest ¶
type QueryVotingPowerAtRequest struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
// at_height is the chain height to look up power for. Named
// distinctly from `height` so it doesn't collide with cosmos-sdk's
// standard query --height flag in autocli output.
AtHeight int64 `protobuf:"varint,2,opt,name=at_height,json=atHeight,proto3" json:"at_height,omitempty"`
}
func (*QueryVotingPowerAtRequest) Descriptor ¶
func (*QueryVotingPowerAtRequest) Descriptor() ([]byte, []int)
func (*QueryVotingPowerAtRequest) GetAddress ¶
func (m *QueryVotingPowerAtRequest) GetAddress() string
func (*QueryVotingPowerAtRequest) GetAtHeight ¶
func (m *QueryVotingPowerAtRequest) GetAtHeight() int64
func (*QueryVotingPowerAtRequest) Marshal ¶
func (m *QueryVotingPowerAtRequest) Marshal() (dAtA []byte, err error)
func (*QueryVotingPowerAtRequest) MarshalTo ¶
func (m *QueryVotingPowerAtRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryVotingPowerAtRequest) MarshalToSizedBuffer ¶
func (m *QueryVotingPowerAtRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryVotingPowerAtRequest) ProtoMessage ¶
func (*QueryVotingPowerAtRequest) ProtoMessage()
func (*QueryVotingPowerAtRequest) Reset ¶
func (m *QueryVotingPowerAtRequest) Reset()
func (*QueryVotingPowerAtRequest) Size ¶
func (m *QueryVotingPowerAtRequest) Size() (n int)
func (*QueryVotingPowerAtRequest) String ¶
func (m *QueryVotingPowerAtRequest) String() string
func (*QueryVotingPowerAtRequest) Unmarshal ¶
func (m *QueryVotingPowerAtRequest) Unmarshal(dAtA []byte) error
func (*QueryVotingPowerAtRequest) XXX_DiscardUnknown ¶
func (m *QueryVotingPowerAtRequest) XXX_DiscardUnknown()
func (*QueryVotingPowerAtRequest) XXX_Marshal ¶
func (m *QueryVotingPowerAtRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryVotingPowerAtRequest) XXX_Merge ¶
func (m *QueryVotingPowerAtRequest) XXX_Merge(src proto.Message)
func (*QueryVotingPowerAtRequest) XXX_Size ¶
func (m *QueryVotingPowerAtRequest) XXX_Size() int
func (*QueryVotingPowerAtRequest) XXX_Unmarshal ¶
func (m *QueryVotingPowerAtRequest) XXX_Unmarshal(b []byte) error
type QueryVotingPowerAtResponse ¶
type QueryVotingPowerAtResponse struct {
// power is the bonded stake amount as a base-10 string (uint).
Power string `protobuf:"bytes,1,opt,name=power,proto3" json:"power,omitempty"`
}
func (*QueryVotingPowerAtResponse) Descriptor ¶
func (*QueryVotingPowerAtResponse) Descriptor() ([]byte, []int)
func (*QueryVotingPowerAtResponse) GetPower ¶
func (m *QueryVotingPowerAtResponse) GetPower() string
func (*QueryVotingPowerAtResponse) Marshal ¶
func (m *QueryVotingPowerAtResponse) Marshal() (dAtA []byte, err error)
func (*QueryVotingPowerAtResponse) MarshalTo ¶
func (m *QueryVotingPowerAtResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryVotingPowerAtResponse) MarshalToSizedBuffer ¶
func (m *QueryVotingPowerAtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryVotingPowerAtResponse) ProtoMessage ¶
func (*QueryVotingPowerAtResponse) ProtoMessage()
func (*QueryVotingPowerAtResponse) Reset ¶
func (m *QueryVotingPowerAtResponse) Reset()
func (*QueryVotingPowerAtResponse) Size ¶
func (m *QueryVotingPowerAtResponse) Size() (n int)
func (*QueryVotingPowerAtResponse) String ¶
func (m *QueryVotingPowerAtResponse) String() string
func (*QueryVotingPowerAtResponse) Unmarshal ¶
func (m *QueryVotingPowerAtResponse) Unmarshal(dAtA []byte) error
func (*QueryVotingPowerAtResponse) XXX_DiscardUnknown ¶
func (m *QueryVotingPowerAtResponse) XXX_DiscardUnknown()
func (*QueryVotingPowerAtResponse) XXX_Marshal ¶
func (m *QueryVotingPowerAtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryVotingPowerAtResponse) XXX_Merge ¶
func (m *QueryVotingPowerAtResponse) XXX_Merge(src proto.Message)
func (*QueryVotingPowerAtResponse) XXX_Size ¶
func (m *QueryVotingPowerAtResponse) XXX_Size() int
func (*QueryVotingPowerAtResponse) XXX_Unmarshal ¶
func (m *QueryVotingPowerAtResponse) XXX_Unmarshal(b []byte) error
type QueryVotingPowerOverRangeRequest ¶
type QueryVotingPowerOverRangeRequest struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
FromHeight int64 `protobuf:"varint,2,opt,name=from_height,json=fromHeight,proto3" json:"from_height,omitempty"`
ToHeight int64 `protobuf:"varint,3,opt,name=to_height,json=toHeight,proto3" json:"to_height,omitempty"`
}
func (*QueryVotingPowerOverRangeRequest) Descriptor ¶
func (*QueryVotingPowerOverRangeRequest) Descriptor() ([]byte, []int)
func (*QueryVotingPowerOverRangeRequest) GetAddress ¶
func (m *QueryVotingPowerOverRangeRequest) GetAddress() string
func (*QueryVotingPowerOverRangeRequest) GetFromHeight ¶
func (m *QueryVotingPowerOverRangeRequest) GetFromHeight() int64
func (*QueryVotingPowerOverRangeRequest) GetToHeight ¶
func (m *QueryVotingPowerOverRangeRequest) GetToHeight() int64
func (*QueryVotingPowerOverRangeRequest) Marshal ¶
func (m *QueryVotingPowerOverRangeRequest) Marshal() (dAtA []byte, err error)
func (*QueryVotingPowerOverRangeRequest) MarshalTo ¶
func (m *QueryVotingPowerOverRangeRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryVotingPowerOverRangeRequest) MarshalToSizedBuffer ¶
func (m *QueryVotingPowerOverRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryVotingPowerOverRangeRequest) ProtoMessage ¶
func (*QueryVotingPowerOverRangeRequest) ProtoMessage()
func (*QueryVotingPowerOverRangeRequest) Reset ¶
func (m *QueryVotingPowerOverRangeRequest) Reset()
func (*QueryVotingPowerOverRangeRequest) Size ¶
func (m *QueryVotingPowerOverRangeRequest) Size() (n int)
func (*QueryVotingPowerOverRangeRequest) String ¶
func (m *QueryVotingPowerOverRangeRequest) String() string
func (*QueryVotingPowerOverRangeRequest) Unmarshal ¶
func (m *QueryVotingPowerOverRangeRequest) Unmarshal(dAtA []byte) error
func (*QueryVotingPowerOverRangeRequest) XXX_DiscardUnknown ¶
func (m *QueryVotingPowerOverRangeRequest) XXX_DiscardUnknown()
func (*QueryVotingPowerOverRangeRequest) XXX_Marshal ¶
func (m *QueryVotingPowerOverRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryVotingPowerOverRangeRequest) XXX_Merge ¶
func (m *QueryVotingPowerOverRangeRequest) XXX_Merge(src proto.Message)
func (*QueryVotingPowerOverRangeRequest) XXX_Size ¶
func (m *QueryVotingPowerOverRangeRequest) XXX_Size() int
func (*QueryVotingPowerOverRangeRequest) XXX_Unmarshal ¶
func (m *QueryVotingPowerOverRangeRequest) XXX_Unmarshal(b []byte) error
type QueryVotingPowerOverRangeResponse ¶
type QueryVotingPowerOverRangeResponse struct {
Rows []HeightPower `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows"`
}
func (*QueryVotingPowerOverRangeResponse) Descriptor ¶
func (*QueryVotingPowerOverRangeResponse) Descriptor() ([]byte, []int)
func (*QueryVotingPowerOverRangeResponse) GetRows ¶
func (m *QueryVotingPowerOverRangeResponse) GetRows() []HeightPower
func (*QueryVotingPowerOverRangeResponse) Marshal ¶
func (m *QueryVotingPowerOverRangeResponse) Marshal() (dAtA []byte, err error)
func (*QueryVotingPowerOverRangeResponse) MarshalTo ¶
func (m *QueryVotingPowerOverRangeResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryVotingPowerOverRangeResponse) MarshalToSizedBuffer ¶
func (m *QueryVotingPowerOverRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryVotingPowerOverRangeResponse) ProtoMessage ¶
func (*QueryVotingPowerOverRangeResponse) ProtoMessage()
func (*QueryVotingPowerOverRangeResponse) Reset ¶
func (m *QueryVotingPowerOverRangeResponse) Reset()
func (*QueryVotingPowerOverRangeResponse) Size ¶
func (m *QueryVotingPowerOverRangeResponse) Size() (n int)
func (*QueryVotingPowerOverRangeResponse) String ¶
func (m *QueryVotingPowerOverRangeResponse) String() string
func (*QueryVotingPowerOverRangeResponse) Unmarshal ¶
func (m *QueryVotingPowerOverRangeResponse) Unmarshal(dAtA []byte) error
func (*QueryVotingPowerOverRangeResponse) XXX_DiscardUnknown ¶
func (m *QueryVotingPowerOverRangeResponse) XXX_DiscardUnknown()
func (*QueryVotingPowerOverRangeResponse) XXX_Marshal ¶
func (m *QueryVotingPowerOverRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryVotingPowerOverRangeResponse) XXX_Merge ¶
func (m *QueryVotingPowerOverRangeResponse) XXX_Merge(src proto.Message)
func (*QueryVotingPowerOverRangeResponse) XXX_Size ¶
func (m *QueryVotingPowerOverRangeResponse) XXX_Size() int
func (*QueryVotingPowerOverRangeResponse) XXX_Unmarshal ¶
func (m *QueryVotingPowerOverRangeResponse) XXX_Unmarshal(b []byte) error
type StakingKeeper ¶
type StakingKeeper interface {
TotalBondedTokens(ctx context.Context) (math.Int, error)
IterateAllDelegations(ctx context.Context, fn func(stakingtypes.Delegation) bool) error
GetValidatorDelegations(ctx context.Context, valAddr sdk.ValAddress) ([]stakingtypes.Delegation, error)
IterateDelegatorDelegations(ctx context.Context, delegator sdk.AccAddress, cb func(delegation stakingtypes.Delegation) (stop bool)) error
GetValidator(ctx context.Context, addr sdk.ValAddress) (stakingtypes.Validator, error)
}
StakingKeeper is the subset of the SDK staking keeper that x/voting-snapshot reads to compute and backfill power snapshots.
Note: we deliberately do NOT use staking's GetDelegatorBonded — it sums delegations to validators in every bond status, while TotalBondedTokens only counts the bonded pool. The keeper computes bonded-validator-only power itself via IterateDelegatorDelegations + GetValidator so the numerator and denominator share the same basis.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct {
}
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct {
}
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) TotalVotingPowerAt ¶
func (*UnimplementedQueryServer) TotalVotingPowerAt(ctx context.Context, req *QueryTotalVotingPowerAtRequest) (*QueryTotalVotingPowerAtResponse, error)
func (*UnimplementedQueryServer) VotingPowerAt ¶
func (*UnimplementedQueryServer) VotingPowerAt(ctx context.Context, req *QueryVotingPowerAtRequest) (*QueryVotingPowerAtResponse, error)
func (*UnimplementedQueryServer) VotingPowerOverRange ¶
func (*UnimplementedQueryServer) VotingPowerOverRange(ctx context.Context, req *QueryVotingPowerOverRangeRequest) (*QueryVotingPowerOverRangeResponse, error)