Documentation
¶
Index ¶
- Constants
- Variables
- func CustomizeDefaultGenesis(cdc codec.JSONCodec, genesis upticktypes.GenesisState)
- func NoOpMempoolOption() func(*baseapp.BaseApp)
- func PrepareDefaultGenesisDenom(denom string)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SigVerificationGasConsumer(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
- type ExportDiagnostic
- type ExportDiagnosticsNotice
- type ExportDiagnosticsReport
- type ExportDiagnosticsStatus
- type Uptick
- func (app *Uptick) AppCodec() codec.Codec
- func (app *Uptick) AutoCliOpts() autocli.AppOptions
- func (app *Uptick) BasicManager() module.BasicManager
- func (app *Uptick) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *Uptick) BlockedAddrs() map[string]bool
- func (app *Uptick) BlockedModuleAccountAddrs() map[string]bool
- func (app *Uptick) DefaultGenesis() upticktypes.GenesisState
- func (app *Uptick) EncodingConfig() uptickparams.EncodingConfig
- func (app *Uptick) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *Uptick) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *Uptick) GetBaseApp() *baseapp.BaseApp
- func (app *Uptick) GetIBCKeeper() *ibckeeper.Keeper
- func (app *Uptick) GetMempool() sdkmempool.ExtMempool
- func (app *Uptick) GetScopedIBCKeeper() interface{}
- func (app *Uptick) GetStakingKeeper() stakingkeeper.Keeper
- func (app *Uptick) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Uptick) GetTxConfig() client.TxConfig
- func (app *Uptick) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *Uptick) InterfaceRegistry() types.InterfaceRegistry
- func (app *Uptick) LegacyAmino() *codec.LegacyAmino
- func (app *Uptick) LoadHeight(height int64) error
- func (app *Uptick) ModuleAccountAddrs() map[string]bool
- func (app *Uptick) Name() string
- func (app *Uptick) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *Uptick) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Uptick) RegisterNodeService(clientCtx client.Context, c config.Config)
- func (app *Uptick) RegisterPendingTxListener(listener func(common.Hash))
- func (app *Uptick) RegisterTendermintService(clientCtx client.Context)
- func (app *Uptick) RegisterTxService(clientCtx client.Context)
- func (app *Uptick) RegisterUpgradePlans()
- func (app *Uptick) SetClientCtx(clientCtx client.Context)
- func (app *Uptick) SimulationManager() *module.SimulationManager
Constants ¶
const ( // Name defines the application binary name Name = "uptickd" // ProposalsEnabled If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals. // If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals. ProposalsEnabled = "true" // EnableSpecificProposals If set to non-empty string it must be comma-separated list of values that are all a subset // of "EnableAllProposals" (takes precedence over ProposalsEnabled) // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 EnableSpecificProposals = "" )
const ExportDiagnosticsDegradedExitCode = 3
ExportDiagnosticsDegradedExitCode is the process exit code `uptickd export` terminates with when the genesis was exported successfully but the diagnostics sidecar could not be committed -- i.e. a degraded export whose degradation is only recorded in a log stream. It is deliberately distinct from 0 (fully accounted export) and from 1 (the export itself failed), so a pipeline can gate on it. The export output itself is always complete: see the "Never fail the export over the sidecar" invariant in app/export.go.
const ExportDiagnosticsFileName = "export-issues.json"
ExportDiagnosticsFileName is the diagnostics sidecar written into the node home directory when a genesis export had to degrade.
AppModule.ExportGenesis has no error channel, so a module cannot hand a structured report back to the CLI; persisting it next to the exported genesis is what keeps a degraded export auditable after the process exits (the same information also goes to the node log, but a log stream is not durable).
CONSUMER CONTRACT -- READ THIS BEFORE ADDING A GATE -------------------------------------------------- This sidecar is for an OPERATOR to read after a real `uptickd export`; it is deliberately NOT a CI gate input. Nothing under scripts/, .github/ or the Makefile reads it and it is not committed -- it lives in the node home of the machine that ran the export, so a non-empty report blocks no pipeline. Its value is making a degraded export *visible* to the operator instead of leaving the degradation in a log stream that scrolls away. A future gate must first define where the file comes from in CI (it never exists in a fresh checkout), or it would always pass.
const ExportDiagnosticsStatusDegraded = "degraded"
ExportDiagnosticsStatusDegraded is the status carried by every committed sidecar. A clean export removes the file instead of writing a report, so the only possible status of a file that exists is "degraded" -- and, combined with export_id/finished_at below, that is enough for an operator to tell whether the file on disk describes the export they are looking at.
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string )
Functions ¶
func CustomizeDefaultGenesis ¶ added in v0.4.0
func CustomizeDefaultGenesis(cdc codec.JSONCodec, genesis upticktypes.GenesisState)
CustomizeDefaultGenesis overlays Uptick-specific defaults onto a BasicManager genesis map. cosmos/evm defaults EvmDenom to "aatom"; Uptick uses "auptick" and must also inject matching bank denom metadata.
func NoOpMempoolOption ¶ added in v0.3.0
NoOpMempoolOption returns a function that sets up a no-op mempool for the given BaseApp.
The function takes a pointer to a BaseApp as a parameter and returns nothing.
func PrepareDefaultGenesisDenom ¶ added in v0.5.0
func PrepareDefaultGenesisDenom(denom string)
PrepareDefaultGenesisDenom overrides sdk.DefaultBondDenom, which several module defaults are derived from while DefaultGenesis runs -- mint's Params.MintDenom and crisis' ConstantFee among them. The SDK zero value is "stake", so any genesis built without this call ends up with staking on the chain denom while mint keeps issuing a phantom "stake" nobody holds and MsgVerifyInvariant cannot be funded.
It MUST be called before the BasicManager's DefaultGenesis is materialized; setting the denom afterwards has no effect on the defaults already built. Both genesis entry points (init and testnet init-files) go through here so they cannot drift apart.
An empty denom is ignored, so callers may pass an optional flag value straight through without clobbering the package-level default.
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func SigVerificationGasConsumer ¶
func SigVerificationGasConsumer( meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params, ) error
SigVerificationGasConsumer is the Uptick implementation of SignatureVerificationGasConsumer. It consumes gas for signature verification based upon the public key type. The cost is fetched from the given params and is matched by the concrete type. The types of keys supported are:
- ethsecp256k1 (Ethereum keys)
- ed25519 (Validators)
- multisig (Cosmos SDK multisigs)
Types ¶
type ExportDiagnostic ¶ added in v0.5.0
type ExportDiagnostic struct {
// Module that degraded, e.g. "erc721".
Module string `json:"module"`
// Kind classifies the damage, e.g. "token_pair_corrupt".
Kind string `json:"kind"`
// Key is the store key or class id the problem belongs to.
Key string `json:"key"`
// Detail is the human-readable explanation.
Detail string `json:"detail"`
}
ExportDiagnostic is one record that a genesis export could not represent faithfully.
type ExportDiagnosticsNotice ¶ added in v0.5.0
type ExportDiagnosticsNotice struct {
// Event is one of the exportDiagnosticsEvent* constants.
Event string `json:"event"`
// ExportID identifies the export run this notice is about.
ExportID string `json:"export_id"`
// Height is the height the exported genesis starts at.
Height int64 `json:"height"`
// Status is "degraded" for a degraded export, "clean" for the stale-report
// case.
Status string `json:"status"`
// Issues is the number of degradations that could not be recorded.
Issues int `json:"issues,omitempty"`
// Path is the report location the notice is about.
Path string `json:"path"`
// Error is why the report could not be committed.
Error string `json:"error"`
// StaleReportRemovalError is set when, on top of the failure above, the
// report left by an earlier export could not be removed either.
StaleReportRemovalError string `json:"stale_report_removal_error,omitempty"`
}
ExportDiagnosticsNotice is the single-line JSON document written to stderr when a degraded export could not durably record its degradations, or when a stale report could not be cleared. One line, stable keys: it is meant to be consumed by a wrapper script (`uptickd export ... 2> >(grep ...)`), while the human-readable rendering is printed by the CLI.
type ExportDiagnosticsReport ¶ added in v0.5.0
type ExportDiagnosticsReport struct {
// ExportID uniquely identifies the export run that wrote this report.
ExportID string `json:"export_id"`
// Status is always ExportDiagnosticsStatusDegraded for a committed report.
Status string `json:"status"`
// FinishedAt is when the report was committed (RFC 3339, UTC).
FinishedAt string `json:"finished_at"`
// Height is the height the exported genesis starts at.
Height int64 `json:"height"`
// Total is the number of degradation records in Issues.
Total int `json:"total"`
// Issues lists the records that could not be represented faithfully.
Issues []ExportDiagnostic `json:"issues"`
}
ExportDiagnosticsReport is the document written to <home>/export-issues.json. It is written only when at least one degradation happened; a clean export removes a stale report instead, so the presence of the file always means "the most recent export was degraded".
ExportID / Status / FinishedAt exist so a report can never be mistaken for the current export's: they identify WHICH export the file describes. This matters because the file is only best-effort (a degraded export must never be failed by a read-only home), so in principle an older report can survive a newer, degraded export. The failure path quarantines such a file, and these fields make any survivor self-describing for an operator or a script that compares them against the export_id printed on stderr / the process log.
type ExportDiagnosticsStatus ¶ added in v0.5.0
type ExportDiagnosticsStatus struct {
// ExportID identifies the export run.
ExportID string
// Height is the height the exported genesis starts at.
Height int64
// Issues is the number of degradations the export produced.
Issues int
// Degraded is true when the genesis does not faithfully represent the chain
// state.
Degraded bool
// ReportPath is where the report was (or would have been) written.
ReportPath string
// ReportWritten is true when the sidecar was durably committed.
ReportWritten bool
// WriteErr is why the sidecar was not committed, if it was not.
WriteErr error
// StaleCleanupErr is why a report left by an earlier export could not be
// removed (either after a clean export, or after this export failed to
// commit its own report).
StaleCleanupErr error
}
ExportDiagnosticsStatus is the verdict of the diagnostics commit step of one export. It is what the CLI (cmd/uptickd) renders and what a test can assert on without a file system.
func LastExportDiagnosticsStatus ¶ added in v0.5.0
func LastExportDiagnosticsStatus() ExportDiagnosticsStatus
LastExportDiagnosticsStatus returns the diagnostics verdict of the most recent ExportAppStateAndValidators call in this process.
func (ExportDiagnosticsStatus) CLIExitCode ¶ added in v0.5.0
func (s ExportDiagnosticsStatus) CLIExitCode() int
CLIExitCode is the process exit code `uptickd export` must finish with. Only LostDiagnostics is fatal-for-pipelines: a degraded export whose report WAS written is fully accounted for, and a stale report on a clean export is noise an operator must read but that does not make the genesis wrong.
func (ExportDiagnosticsStatus) CLIMessage ¶ added in v0.5.0
func (s ExportDiagnosticsStatus) CLIMessage() string
CLIMessage is the single operator-facing line for the export CLI. It is empty when the export needs no remark at all.
func (ExportDiagnosticsStatus) LostDiagnostics ¶ added in v0.5.0
func (s ExportDiagnosticsStatus) LostDiagnostics() bool
LostDiagnostics reports whether the export degraded but no durable record of that degradation exists. This is the case the CLI turns into ExportDiagnosticsDegradedExitCode.
func (ExportDiagnosticsStatus) NeedsAttention ¶ added in v0.5.0
func (s ExportDiagnosticsStatus) NeedsAttention() bool
NeedsAttention reports whether anything about the diagnostics state must be surfaced to the operator.
type Uptick ¶
type Uptick struct {
*baseapp.BaseApp
keepers.AppKeepers
// contains filtered or unexported fields
}
Uptick implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func NewUptick ¶
func NewUptick( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *Uptick
NewUptick returns a reference to a new initialized Uptick application.
func (*Uptick) AppCodec ¶
AppCodec returns Uptick's app codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*Uptick) AutoCliOpts ¶ added in v0.3.0
func (app *Uptick) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*Uptick) BasicManager ¶ added in v0.3.0
func (app *Uptick) BasicManager() module.BasicManager
BasicManager return the basic manager
func (*Uptick) BeginBlocker ¶
BeginBlocker application updates every begin block
func (*Uptick) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*Uptick) BlockedModuleAccountAddrs ¶ added in v0.2.16
BlockedModuleAccountAddrs returns all the app's blocked module account addresses.
func (*Uptick) DefaultGenesis ¶ added in v0.3.0
func (app *Uptick) DefaultGenesis() upticktypes.GenesisState
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*Uptick) EncodingConfig ¶ added in v0.3.0
func (app *Uptick) EncodingConfig() uptickparams.EncodingConfig
EncodingConfig returns Uptick's EncodingConfig
func (*Uptick) EndBlocker ¶
EndBlocker application updates every end block
func (*Uptick) ExportAppStateAndValidators ¶
func (app *Uptick) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*Uptick) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*Uptick) GetIBCKeeper ¶
GetIBCKeeper implements the TestingApp interface.
func (*Uptick) GetMempool ¶ added in v0.4.0
func (app *Uptick) GetMempool() sdkmempool.ExtMempool
GetMempool returns the app's mempool. Required by cosmos/evm server.Application interface.
func (*Uptick) GetScopedIBCKeeper ¶
func (app *Uptick) GetScopedIBCKeeper() interface{}
GetScopedIBCKeeper implements the TestingApp interface.
func (*Uptick) GetStakingKeeper ¶
func (app *Uptick) GetStakingKeeper() stakingkeeper.Keeper
GetStakingKeeper implements the TestingApp interface.
func (*Uptick) GetSubspace ¶
func (app *Uptick) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
NOTE: This is solely to be used for testing purposes.
func (*Uptick) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*Uptick) InitChainer ¶
func (app *Uptick) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*Uptick) InterfaceRegistry ¶
func (app *Uptick) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Uptick's InterfaceRegistry
func (*Uptick) LegacyAmino ¶
func (app *Uptick) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Uptick's amino codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*Uptick) LoadHeight ¶
LoadHeight loads state at a particular height
func (*Uptick) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*Uptick) PreBlocker ¶ added in v0.3.0
func (app *Uptick) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block
func (*Uptick) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Uptick) RegisterNodeService ¶ added in v0.2.16
RegisterNodeService registers the node gRPC service on the provided
func (*Uptick) RegisterPendingTxListener ¶ added in v0.4.0
RegisterPendingTxListener registers a pending tx listener. Required by cosmos/evm server.Application interface.
func (*Uptick) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*Uptick) RegisterTxService ¶
func (*Uptick) RegisterUpgradePlans ¶ added in v0.3.0
func (app *Uptick) RegisterUpgradePlans()
RegisterUpgradePlans register a handler of upgrade plan
func (*Uptick) SetClientCtx ¶ added in v0.4.0
SetClientCtx sets the client context on the app. Required by cosmos/evm server.Application interface.
func (*Uptick) SimulationManager ¶
func (app *Uptick) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
|
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx). |
|
v050
Package v050 implements the v0.5.0 upgrade plan: the single governance plan a v0.3.3 chain follows to reach the v0.4.x state.
|
Package v050 implements the v0.5.0 upgrade plan: the single governance plan a v0.3.3 chain follows to reach the v0.4.x state. |
|
v051
Package v051 implements the v0.5.1 upgrade plan.
|
Package v051 implements the v0.5.1 upgrade plan. |