Documentation ¶
Index ¶
- Constants
- Variables
- func AfterCommitBlock(keeper Keeper) error
- func BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock, keeper Keeper) error
- func CommitBlock(keeper Keeper) error
- func DefaultGenesisState() *types.GenesisState
- func EndBlock(ctx sdk.Context, req abci.RequestEndBlock, keeper Keeper) ([]abci.ValidatorUpdate, error)
- func ExportGenesis(ctx sdk.Context, k Keeper, swingStoreExportsHandler *SwingStoreExportsHandler, ...) *types.GenesisState
- func InitGenesis(ctx sdk.Context, k Keeper, swingStoreExportsHandler *SwingStoreExportsHandler, ...) bool
- func NewHandler(k Keeper) sdk.Handler
- func NewPortHandler(k Keeper) vm.PortHandler
- func NewSwingSetProposalHandler(k keeper.Keeper) govv1beta1.Handler
- func ValidateGenesis(data *types.GenesisState) error
- type ActionContext
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
- func (AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func (AppModule) Name() string
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg module.Configurator)
- func (am AppModule) Route() sdk.Route
- func (am *AppModule) SetSwingStoreExportDir(dir string)
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
- func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error
- type Egress
- type ExtensionSnapshotter
- type InboundQueueRecord
- type Keeper
- type MsgDeliverInbound
- type MsgProvision
- type Params
- type SwingStoreExportsHandler
- type SwingsetConfig
Constants ¶
const ( ModuleName = types.ModuleName RouterKey = types.RouterKey StoreKey = types.StoreKey )
const ( ConfigPrefix = "swingset" FlagSlogfile = ConfigPrefix + ".slogfile" FlagVatSnapshotArchiveDir = ConfigPrefix + ".vat-snapshot-archive-dir" FlagVatTranscriptArchiveDir = ConfigPrefix + ".vat-transcript-archive-dir" SnapshotRetentionOptionDebug = "debug" SnapshotRetentionOptionOperational = "operational" TranscriptRetentionOptionArchival = "archival" TranscriptRetentionOptionOperational = "operational" )
const DefaultConfigTemplate = `` /* 2003-byte string literal not displayed */
DefaultConfigTemplate defines a default TOML configuration section for the SwingSet VM. Values are pulled from a "Swingset" property, in accord with CustomAppConfig from ../../daemon/cmd/root.go. See https://github.com/cosmos/cosmos-sdk/issues/20097 for auto-synchronization ideas.
const (
SwingStoreUpdateExportData = "swingStoreUpdateExportData"
)
Variables ¶
var ( NewKeeper = keeper.NewKeeper NewQuerier = keeper.NewQuerier NewMsgDeliverInbound = types.NewMsgDeliverInbound NewMsgProvision = types.NewMsgProvision NewMailbox = types.NewMailbox RegisterCodec = types.RegisterCodec )
var DefaultSwingsetConfig = SwingsetConfig{
SlogFile: "",
MaxVatsOnline: 50,
VatSnapshotRetention: "operational",
VatTranscriptRetention: "default",
}
Functions ¶
func AfterCommitBlock ¶
func BeginBlock ¶
func CommitBlock ¶
func DefaultGenesisState ¶
func DefaultGenesisState() *types.GenesisState
func EndBlock ¶
func EndBlock(ctx sdk.Context, req abci.RequestEndBlock, keeper Keeper) ([]abci.ValidatorUpdate, error)
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper, swingStoreExportsHandler *SwingStoreExportsHandler, swingStoreExportDir string) *types.GenesisState
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, swingStoreExportsHandler *SwingStoreExportsHandler, swingStoreExportDir string, data *types.GenesisState) bool
InitGenesis initializes the (Cosmos-side) SwingSet state from the GenesisState. Returns whether the app should send a bootstrap action to the controller.
func NewHandler ¶
NewHandler returns a handler for "swingset" type messages.
func NewPortHandler ¶
func NewPortHandler(k Keeper) vm.PortHandler
NewPortHandler returns a port handler for a swingset Keeper.
func NewSwingSetProposalHandler ¶
func NewSwingSetProposalHandler(k keeper.Keeper) govv1beta1.Handler
NewSwingSetProposalHandler defines the SwingSet proposal handler
func ValidateGenesis ¶
func ValidateGenesis(data *types.GenesisState) error
Types ¶
type ActionContext ¶
type ActionContext = types.ActionContext
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
func NewAppModule ¶
func NewAppModule(k Keeper, swingStoreExportsHandler *SwingStoreExportsHandler, setBootstrapNeeded func(), ensureControllerInited func(sdk.Context), swingStoreExportDir string) AppModule
NewAppModule creates a new AppModule Object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
func (AppModule) ConsensusVersion ¶
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
func (AppModule) ExportGenesis ¶
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
func (AppModule) LegacyQuerierHandler ¶
func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
LegacyQuerierHandler returns the sdk.Querier for deployment module
func (AppModule) QuerierRoute ¶
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
func (*AppModule) SetSwingStoreExportDir ¶
For testing purposes
type AppModuleBasic ¶
type AppModuleBasic struct { }
app module Basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the deployment
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
Get the root query command of this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
Get the root tx command of this module
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
func (AppModuleBasic) RegisterInterfaces ¶
func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module's interface types
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error
Validation check of the Genesis
type ExtensionSnapshotter ¶
type ExtensionSnapshotter = keeper.ExtensionSnapshotter
type InboundQueueRecord ¶
type InboundQueueRecord = types.InboundQueueRecord
type MsgDeliverInbound ¶
type MsgDeliverInbound = types.MsgDeliverInbound
type MsgProvision ¶
type MsgProvision = types.MsgProvision
type SwingStoreExportsHandler ¶
type SwingStoreExportsHandler = keeper.SwingStoreExportsHandler
type SwingsetConfig ¶
type SwingsetConfig struct { // SlogFile is the path at which a SwingSet log "slog" file should be written. // If relative, it is interpreted against the application home directory SlogFile string `mapstructure:"slogfile" json:"slogfile,omitempty"` // MaxVatsOnline is the maximum number of vats that the SwingSet kernel will have online // at any given time. MaxVatsOnline int `mapstructure:"max-vats-online" json:"maxVatsOnline,omitempty"` // VatSnapshotRetention controls retention of vat snapshots, // and has values analogous to those of export `artifactMode` (cf. // ../../../../packages/swing-store/docs/data-export.md#optional--historical-data ). // * "debug": keep all snapshots // * "operational": keep only the last snapshot VatSnapshotRetention string `mapstructure:"vat-snapshot-retention" json:"vatSnapshotRetention,omitempty"` // VatTranscriptRetention controls retention of vat transcript spans, // and has values analogous to those of export `artifactMode` (cf. // ../../../../packages/swing-store/docs/data-export.md#optional--historical-data ). // * "archival": keep all transcript spans // * "operational": keep only necessary transcript spans (i.e., since the // last snapshot of their vat) // * "default": determined by `pruning` ("archival" if `pruning` is // "nothing", otherwise "operational") VatTranscriptRetention string `mapstructure:"vat-transcript-retention" json:"vatTranscriptRetention,omitempty"` // VatSnapshotArchiveDir controls archival of gzipped vat snapshots. VatSnapshotArchiveDir string `mapstructure:"vat-snapshot-archive-dir" json:"vatSnapshotArchiveDir,omitempty"` // VatTranscriptArchiveDir controls archival of historical (i.e., closed) vat // transcript spans to gzipped files. VatTranscriptArchiveDir string `mapstructure:"vat-transcript-archive-dir" json:"vatTranscriptArchiveDir,omitempty"` }
SwingsetConfig defines configuration for the SwingSet VM. "mapstructure" tag data is used to direct reads from app.toml; "json" tag data is used to populate init messages for the VM. This should be kept in sync with SwingsetConfigShape in ../../../../packages/cosmic-swingset/src/chain-main.js. TODO: Consider extensions from docs/env.md.
func SwingsetConfigFromViper ¶
func SwingsetConfigFromViper(resolvedConfig servertypes.AppOptions) (*SwingsetConfig, error)