module

package
v30.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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

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 NewAppModule(k keeper.Keeper) AppModule

func (AppModule) BeginBlock

func (AppModule) BeginBlock(_ context.Context) error

BeginBlock is a no-op — staking hooks mark delegators dirty during the block and the EndBlocker writes the snapshots.

func (AppModule) ConsensusVersion

func (AppModule) ConsensusVersion() uint64

func (AppModule) EndBlock

func (am AppModule) EndBlock(ctx context.Context) error

EndBlock does two things, in order:

  1. 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.
  2. 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 (am AppModule) ExportGenesis(ctx sdk.Context, _ codec.JSONCodec) json.RawMessage

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, raw json.RawMessage)

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

Jump to

Keyboard shortcuts

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