Documentation ¶
Index ¶
- Constants
- Variables
- func AddressFromValidatorsKey(key []byte) []byte
- func GetChannelsFromSignalMapping(signalMapping acltypes.MessageCompletionSignalMapping) sdkacltypes.MessageAccessOpsChannelMapping
- func GetMaccPerms() map[string][]string
- func GetWasmEnabledProposals() []wasm.ProposalType
- func MakeEncodingConfig() params.EncodingConfig
- func NewDefaultGenesisState(cdc codec.JSONCodec) simapp.GenesisState
- func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
- type App
- func (app *App) AppCodec() codec.Codec
- func (app *App) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) (res abci.ResponseBeginBlock)
- func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *App) BlacklistedAccAddrs() map[string]bool
- func (app *App) BuildDependenciesAndRunTxs(ctx sdk.Context, txs [][]byte) ([]*abci.ExecTxResult, sdk.Context)
- func (app *App) CacheContext(ctx sdk.Context) (sdk.Context, sdk.CacheMultiStore)
- func (app *App) CheckTx(ctx context.Context, req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error)
- func (app *App) ClearOptimisticProcessingInfo()
- func (app *App) Commit(ctx context.Context) (res *abci.ResponseCommit, err error)
- func (app *App) DeliverTx(ctx sdk.Context, req abci.RequestDeliverTx) abci.ResponseDeliverTx
- func (app *App) DeliverTxWithResult(ctx sdk.Context, tx []byte) *abci.ExecTxResult
- func (app *App) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) (res abci.ResponseEndBlock)
- func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *App) FinalizeBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
- func (app App) GetBaseApp() *baseapp.BaseApp
- func (app *App) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *App) GetOptimisticProcessingInfo() *OptimisticProcessingInfo
- func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *App) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *App) InterfaceRegistry() types.InterfaceRegistry
- func (app *App) LegacyAmino() *codec.LegacyAmino
- func (app *App) LoadHeight(height int64) error
- func (app *App) LoadLatest(ctx context.Context, req *abci.RequestLoadLatest) (*abci.ResponseLoadLatest, error)
- func (app *App) MidBlock(ctx sdk.Context, height int64) []abci.Event
- func (app *App) MidBlocker(ctx sdk.Context, height int64) []abci.Event
- func (app *App) ModuleAccountAddrs() map[string]bool
- func (app *App) Name() string
- func (app *App) PartitionPrioritizedTxs(ctx sdk.Context, txs [][]byte) (prioritizedTxs, otherTxs [][]byte)
- func (app *App) PrepareProposalHandler(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
- func (app *App) ProcessBlock(ctx sdk.Context, txs [][]byte, req BlockProcessRequest, ...) ([]abci.Event, []*abci.ExecTxResult, abci.ResponseEndBlock, error)
- func (app *App) ProcessBlockConcurrent(ctx sdk.Context, txs [][]byte, ...) ([]*abci.ExecTxResult, bool)
- func (app *App) ProcessBlockSynchronous(ctx sdk.Context, txs [][]byte) []*abci.ExecTxResult
- func (app *App) ProcessProposalHandler(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
- func (app *App) ProcessTxConcurrent(ctx sdk.Context, txIndex int, txBytes []byte, wg *sync.WaitGroup, ...)
- func (app *App) ProcessTxs(ctx sdk.Context, txs [][]byte, dependencyDag *acltypes.Dag, ...) ([]*abci.ExecTxResult, sdk.Context)
- func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *App) RegisterTendermintService(clientCtx client.Context)
- func (app *App) RegisterTxService(clientCtx client.Context)
- func (app App) RegisterUpgradeHandlers()
- func (app *App) SetStoreUpgradeHandlers()
- func (app *App) SimulationManager() *module.SimulationManager
- type BlockProcessRequest
- type ChannelResult
- type GenesisState
- type OptimisticProcessingInfo
- type ProcessBlockConcurrentFunction
- type TestTx
- type TestWrapper
Constants ¶
const ( // Application name AppName = "fbchaind" OptimisticProcessingTimeoutInSeconds = 5 )
const TestContract = "TEST"
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( aclmodule.AppModuleBasic{}, auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic(getGovProposalHandlers()...), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, oraclemodule.AppModuleBasic{}, wasm.AppModuleBasic{}, dexmodule.AppModuleBasic{}, epochmodule.AppModuleBasic{}, tokenfactorymodule.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, ) // WasmProposalsEnabled enables all x/wasm proposals when it's value is "true" // and EnableSpecificWasmProposals is empty. Otherwise, all x/wasm proposals // are disabled. // Used as a flag to turn it on and off WasmProposalsEnabled = "true" // EnableSpecificWasmProposals, if set, must be comma-separated list of values // that are all a subset of "EnableAllProposals", which takes precedence over // WasmProposalsEnabled. // // See: https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 EnableSpecificWasmProposals = "" // EmptyWasmOpts defines a type alias for a list of wasm options. EmptyWasmOpts []wasm.Option // Boolean to only emit fbchaind version and git commit metric once per chain initialization EmittedFibChainVersionMetric = false // EmptyAclmOpts defines a type alias for a list of wasm options. EmptyACLOpts []aclkeeper.Option )
var DefaultConsensusParams = &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: -1, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, }
DefaultConsensusParams defines the default Tendermint consensus params used in EthermintApp testing.
Functions ¶
func AddressFromValidatorsKey ¶
AddressFromValidatorsKey creates the validator operator address from ValidatorsKey
func GetChannelsFromSignalMapping ¶
func GetChannelsFromSignalMapping(signalMapping acltypes.MessageCompletionSignalMapping) sdkacltypes.MessageAccessOpsChannelMapping
Returns a mapping of the accessOperation to the channels
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func GetWasmEnabledProposals ¶
func GetWasmEnabledProposals() []wasm.ProposalType
GetWasmEnabledProposals parses the WasmProposalsEnabled and EnableSpecificWasmProposals values to produce a list of enabled proposals to pass into the application.
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) simapp.GenesisState
NewDefaultGenesisState generates the default state for the application.
func NewTestGenesisState ¶
func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
NewTestGenesisState generate genesis state with single validator
Types ¶
type App ¶
type App struct { *baseapp.BaseApp // keepers AccessControlKeeper aclkeeper.Keeper AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper CrisisKeeper crisiskeeper.Keeper UpgradeKeeper upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper WasmKeeper wasm.Keeper OracleKeeper oraclekeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedWasmKeeper capabilitykeeper.ScopedKeeper DexKeeper dexmodulekeeper.Keeper EpochKeeper epochmodulekeeper.Keeper TokenFactoryKeeper tokenfactorykeeper.Keeper // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper CheckTxMemState *dexcache.MemState ProcessProposalMemState *dexcache.MemState MemState *dexcache.MemState // contains filtered or unexported fields }
App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.
func New ¶
func New( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, tmConfig *tmcfg.Config, encodingConfig appparams.EncodingConfig, enabledProposals []wasm.ProposalType, appOpts servertypes.AppOptions, wasmOpts []wasm.Option, aclOpts []aclkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *App
New returns a reference to an initialized blockchain app
func (*App) AppCodec ¶
AppCodec returns an 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 (*App) BeginBlock ¶
func (app *App) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) (res abci.ResponseBeginBlock)
func (*App) BeginBlocker ¶
func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*App) BlacklistedAccAddrs ¶
func (*App) BuildDependenciesAndRunTxs ¶
func (*App) CacheContext ¶
cacheContext returns a new context based off of the provided context with a branched multi-store.
func (*App) CheckTx ¶
func (app *App) CheckTx(ctx context.Context, req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error)
func (*App) ClearOptimisticProcessingInfo ¶
func (app *App) ClearOptimisticProcessingInfo()
func (*App) DeliverTx ¶
func (app *App) DeliverTx(ctx sdk.Context, req abci.RequestDeliverTx) abci.ResponseDeliverTx
func (*App) DeliverTxWithResult ¶
func (*App) EndBlock ¶
func (app *App) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) (res abci.ResponseEndBlock)
func (*App) EndBlocker ¶
func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*App) ExportAppStateAndValidators ¶
func (app *App) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*App) FinalizeBlocker ¶
func (app *App) FinalizeBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
func (App) GetBaseApp ¶
GetBaseApp returns the base app of the application
func (*App) GetKey ¶
func (app *App) GetKey(storeKey string) *sdk.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*App) GetMemKey ¶
func (app *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*App) GetOptimisticProcessingInfo ¶
func (app *App) GetOptimisticProcessingInfo() *OptimisticProcessingInfo
func (*App) GetSubspace ¶
func (app *App) 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 (*App) GetTKey ¶
func (app *App) GetTKey(storeKey string) *sdk.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*App) InitChainer ¶
func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*App) InterfaceRegistry ¶
func (app *App) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns an InterfaceRegistry
func (*App) LegacyAmino ¶
func (app *App) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns SimApp'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 (*App) LoadHeight ¶
LoadHeight loads a particular height
func (*App) LoadLatest ¶
func (app *App) LoadLatest(ctx context.Context, req *abci.RequestLoadLatest) (*abci.ResponseLoadLatest, error)
func (*App) MidBlocker ¶
MidBlocker application updates every mid block
func (*App) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*App) PartitionPrioritizedTxs ¶
func (*App) PrepareProposalHandler ¶
func (app *App) PrepareProposalHandler(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
func (*App) ProcessBlock ¶
func (app *App) ProcessBlock(ctx sdk.Context, txs [][]byte, req BlockProcessRequest, lastCommit abci.CommitInfo) ([]abci.Event, []*abci.ExecTxResult, abci.ResponseEndBlock, error)
func (*App) ProcessBlockConcurrent ¶
func (app *App) ProcessBlockConcurrent( ctx sdk.Context, txs [][]byte, completionSignalingMap map[int]acltypes.MessageCompletionSignalMapping, blockingSignalsMap map[int]acltypes.MessageCompletionSignalMapping, txMsgAccessOpMapping map[int]acltypes.MsgIndexToAccessOpMapping, ) ([]*abci.ExecTxResult, bool)
func (*App) ProcessBlockSynchronous ¶
func (*App) ProcessProposalHandler ¶
func (app *App) ProcessProposalHandler(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
func (*App) ProcessTxConcurrent ¶
func (app *App) ProcessTxConcurrent( ctx sdk.Context, txIndex int, txBytes []byte, wg *sync.WaitGroup, resultChan chan<- ChannelResult, txCompletionSignalingMap acltypes.MessageCompletionSignalMapping, txBlockingSignalsMap acltypes.MessageCompletionSignalMapping, txMsgAccessOpMapping acltypes.MsgIndexToAccessOpMapping, )
func (*App) ProcessTxs ¶
func (*App) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (App) RegisterUpgradeHandlers ¶
func (app App) RegisterUpgradeHandlers()
func (*App) SetStoreUpgradeHandlers ¶
func (app *App) SetStoreUpgradeHandlers()
Add (or remove) keepers when they are introduced / removed in different versions
func (*App) SimulationManager ¶
func (app *App) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type BlockProcessRequest ¶
type ChannelResult ¶
type ChannelResult struct {
// contains filtered or unexported fields
}
type GenesisState ¶
type GenesisState map[string]json.RawMessage
The genesis state of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.
type OptimisticProcessingInfo ¶
type OptimisticProcessingInfo struct { Height int64 Hash []byte Aborted bool Completion chan struct{} // result fields Events []abci.Event TxRes []*abci.ExecTxResult EndBlockResp abci.ResponseEndBlock }
type ProcessBlockConcurrentFunction ¶
type ProcessBlockConcurrentFunction func( ctx sdk.Context, txs [][]byte, completionSignalingMap map[int]acltypes.MessageCompletionSignalMapping, blockingSignalsMap map[int]acltypes.MessageCompletionSignalMapping, txMsgAccessOpMapping map[int]acltypes.MsgIndexToAccessOpMapping, ) ([]*abci.ExecTxResult, bool)
type TestTx ¶
type TestTx struct {
// contains filtered or unexported fields
}
func (TestTx) ValidateBasic ¶
type TestWrapper ¶
func NewTestWrapper ¶
func NewTestWrapper(t *testing.T, tm time.Time, valPub crptotypes.PubKey) *TestWrapper
func (*TestWrapper) BeginBlock ¶
func (s *TestWrapper) BeginBlock()
func (*TestWrapper) EndBlock ¶
func (s *TestWrapper) EndBlock()
func (*TestWrapper) FundAcc ¶
func (s *TestWrapper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package params defines the simulation parameters in the simapp.
|
Package params defines the simulation parameters in the simapp. |