Documentation
¶
Overview ¶
Package module wires x/voting-snapshot into the app's module manager.
MVP shape for v30: no proto-generated gRPC msg/query servers, no migrations. Delivery is via wasmbindings/query_plugin.go (which calls Keeper.VotingPowerAt / TotalVotingPowerAt directly). gRPC and REST surfaces are tracked for v30.x.
Index ¶
- Constants
- type AppModule
- func (AppModule) BeginBlock(_ context.Context) error
- func (AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(ctx context.Context) error
- func (am AppModule) ExportGenesis(ctx sdk.Context, _ codec.JSONCodec) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, raw json.RawMessage)
- func (AppModule) IsAppModule()
- func (AppModule) IsOnePerModuleType()
- func (am AppModule) RegisterServices(cfg module.Configurator)
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(_ codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
- func (AppModuleBasic) RegisterInterfaces(r cdctypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)
- func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, _ client.TxEncodingConfig, raw json.RawMessage) error
Constants ¶
View Source
const ConsensusVersion = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppModule ¶
type AppModule struct {
AppModuleBasic
// contains filtered or unexported fields
}
func NewAppModule ¶
func (AppModule) BeginBlock ¶
BeginBlock is a no-op — staking hooks mark delegators dirty during the block and the EndBlocker writes the snapshots.
func (AppModule) ConsensusVersion ¶
func (AppModule) EndBlock ¶
EndBlock does two things, in order:
- Drains the transient dirty-delegator set into persistent snapshots (keeper.EndBlocker). This is consensus-critical — a skipped drain leaves stale voting power in state — so its error propagates and fails the block (deterministically, on every node) rather than being swallowed.
- Prunes snapshots outside the retention window. Pruning is best-effort maintenance: on error we log and retry next interval instead of halting the chain over housekeeping.
func (AppModule) ExportGenesis ¶
func (AppModule) InitGenesis ¶
func (AppModule) IsAppModule ¶
func (AppModule) IsAppModule()
func (AppModule) IsOnePerModuleType ¶
func (AppModule) IsOnePerModuleType()
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
RegisterServices wires up the gRPC msg + query servers and any store-version migrations. Keep migrations empty for v30 — first release of the module.
type AppModuleBasic ¶
type AppModuleBasic struct{}
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(_ codec.JSONCodec) json.RawMessage
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
func (AppModuleBasic) RegisterInterfaces ¶
func (AppModuleBasic) RegisterInterfaces(r cdctypes.InterfaceRegistry)
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, _ client.TxEncodingConfig, raw json.RawMessage) error
Click to show internal directories.
Click to hide internal directories.