Documentation ¶
Index ¶
- Constants
- Variables
- func CreateHistoryStore(dataPath string, useLiteDB bool, maxLogResults int, logger log.Logger) (historyStore modbtypes.DB)
- func CreateRootStore(dataPath string, isArchiveMode bool) (*store.RootStore, *moeingads.MoeingADS)
- type App
- func (app *App) AddBlockFotTest(mdbBlock *modbtypes.Block)
- func (app *App) AddEpochForTest(e *stakingtypes.Epoch)
- func (app *App) ApplySnapshotChunk(chunk abcitypes.RequestApplySnapshotChunk) abcitypes.ResponseApplySnapshotChunk
- func (app *App) BeginBlock(req abcitypes.RequestBeginBlock) abcitypes.ResponseBeginBlock
- func (app *App) BlockNum() int64
- func (app *App) ChainID() *uint256.Int
- func (app *App) CheckTx(req abcitypes.RequestCheckTx) abcitypes.ResponseCheckTx
- func (app *App) CloseTrunk()
- func (app *App) CloseTxEngineContext()
- func (app *App) Commit() abcitypes.ResponseCommit
- func (app *App) DeliverTx(req abcitypes.RequestDeliverTx) abcitypes.ResponseDeliverTx
- func (app *App) EndBlock(req abcitypes.RequestEndBlock) abcitypes.ResponseEndBlock
- func (app *App) GetAppEpochList() []*stakingtypes.Epoch
- func (app *App) GetBlockForSync(height int64) (blk []byte, err error)
- func (app *App) GetCheckTxContext() *types.Context
- func (app *App) GetCurrEpoch() *stakingtypes.Epoch
- func (app *App) GetHistoryOnlyContext() *types.Context
- func (app *App) GetLastGasUsed() uint64
- func (app *App) GetLatestBlockNum() int64
- func (app *App) GetRpcContext() *types.Context
- func (app *App) GetRpcContextAtHeight(height int64) *types.Context
- func (app *App) GetRpcMaxLogResults() int
- func (app *App) GetRunTxContext() *types.Context
- func (app *App) GetValidatorsInfo(height int64) ValidatorsInfo
- func (app *App) GetWatcherEpochList() []*stakingtypes.Epoch
- func (app *App) GetWordState() *moevmtc.WorldState
- func (app *App) HistoryStore() modbtypes.DB
- func (app *App) Info(req abcitypes.RequestInfo) abcitypes.ResponseInfo
- func (app *App) InitChain(req abcitypes.RequestInitChain) abcitypes.ResponseInitChain
- func (app *App) IsArchiveMode() bool
- func (app *App) ListSnapshots(snapshots abcitypes.RequestListSnapshots) abcitypes.ResponseListSnapshots
- func (app *App) LoadBlockInfo() *types.BlockInfo
- func (app *App) LoadSnapshotChunk(chunk abcitypes.RequestLoadSnapshotChunk) abcitypes.ResponseLoadSnapshotChunk
- func (app *App) Logger() log.Logger
- func (app *App) OfferSnapshot(snapshot abcitypes.RequestOfferSnapshot) abcitypes.ResponseOfferSnapshot
- func (app *App) Query(req abcitypes.RequestQuery) abcitypes.ResponseQuery
- func (app *App) RunTxForRpc(gethTx *gethtypes.Transaction, sender gethcmn.Address, estimateGas bool, ...) (*ebp.TxRunner, int64)
- func (app *App) RunTxForSbchRpc(gethTx *gethtypes.Transaction, sender gethcmn.Address, height int64) (*ebp.TxRunner, int64)
- func (app *App) SetOption(option abcitypes.RequestSetOption) abcitypes.ResponseSetOption
- func (app *App) Stop()
- func (app *App) SubscribeChainEvent(ch chan<- types.ChainEvent) event.Subscription
- func (app *App) SubscribeLogsEvent(ch chan<- []*gethtypes.Log) event.Subscription
- func (app *App) SumAllBalance() *uint256.Int
- func (app *App) WaitLock()
- type GenesisData
- type IApp
- type PendingReward
- type SenderAndHeight
- type Validator
- type ValidatorsInfo
Constants ¶
View Source
const ( CannotDecodeTx uint32 = 101 CannotRecoverSender uint32 = 102 SenderNotFound uint32 = 103 AccountNonceMismatch uint32 = 104 CannotPayGasFee uint32 = 105 GasLimitInvalid uint32 = 106 InvalidMinGasPrice uint32 = 107 HasPendingTx uint32 = 108 MempoolBusy uint32 = 109 GasLimitTooSmall uint32 = 110 )
Variables ¶
View Source
var ( ClientID = "smartbchd" GitCommit = "" GitDate = "" GitTag = "v0.6.0" )
set via linker flags
Functions ¶
func CreateHistoryStore ¶ added in v0.4.5
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) AddBlockFotTest ¶ added in v0.1.2
func (*App) AddEpochForTest ¶ added in v0.3.0
func (app *App) AddEpochForTest(e *stakingtypes.Epoch)
func (*App) ApplySnapshotChunk ¶
func (app *App) ApplySnapshotChunk(chunk abcitypes.RequestApplySnapshotChunk) abcitypes.ResponseApplySnapshotChunk
func (*App) BeginBlock ¶
func (app *App) BeginBlock(req abcitypes.RequestBeginBlock) abcitypes.ResponseBeginBlock
func (*App) CheckTx ¶
func (app *App) CheckTx(req abcitypes.RequestCheckTx) abcitypes.ResponseCheckTx
func (*App) CloseTrunk ¶
func (app *App) CloseTrunk()
func (*App) CloseTxEngineContext ¶
func (app *App) CloseTxEngineContext()
func (*App) Commit ¶
func (app *App) Commit() abcitypes.ResponseCommit
func (*App) DeliverTx ¶
func (app *App) DeliverTx(req abcitypes.RequestDeliverTx) abcitypes.ResponseDeliverTx
func (*App) EndBlock ¶
func (app *App) EndBlock(req abcitypes.RequestEndBlock) abcitypes.ResponseEndBlock
func (*App) GetAppEpochList ¶ added in v0.4.5
func (app *App) GetAppEpochList() []*stakingtypes.Epoch
func (*App) GetBlockForSync ¶ added in v0.4.3
func (*App) GetCheckTxContext ¶ added in v0.1.2
func (*App) GetCurrEpoch ¶ added in v0.3.6
func (app *App) GetCurrEpoch() *stakingtypes.Epoch
func (*App) GetHistoryOnlyContext ¶ added in v0.1.2
func (*App) GetLastGasUsed ¶ added in v0.1.6
func (*App) GetLatestBlockNum ¶
func (*App) GetRpcContext ¶ added in v0.1.2
func (*App) GetRpcContextAtHeight ¶ added in v0.4.0
func (*App) GetRpcMaxLogResults ¶ added in v0.4.6
func (*App) GetRunTxContext ¶ added in v0.1.2
func (*App) GetValidatorsInfo ¶ added in v0.2.0
func (app *App) GetValidatorsInfo(height int64) ValidatorsInfo
func (*App) GetWatcherEpochList ¶ added in v0.4.5
func (app *App) GetWatcherEpochList() []*stakingtypes.Epoch
func (*App) GetWordState ¶ added in v0.3.0
func (app *App) GetWordState() *moevmtc.WorldState
func (*App) HistoryStore ¶ added in v0.1.2
func (*App) Info ¶
func (app *App) Info(req abcitypes.RequestInfo) abcitypes.ResponseInfo
func (*App) InitChain ¶
func (app *App) InitChain(req abcitypes.RequestInitChain) abcitypes.ResponseInitChain
func (*App) IsArchiveMode ¶ added in v0.4.0
func (*App) ListSnapshots ¶
func (app *App) ListSnapshots(snapshots abcitypes.RequestListSnapshots) abcitypes.ResponseListSnapshots
func (*App) LoadBlockInfo ¶ added in v0.4.3
func (*App) LoadSnapshotChunk ¶
func (app *App) LoadSnapshotChunk(chunk abcitypes.RequestLoadSnapshotChunk) abcitypes.ResponseLoadSnapshotChunk
func (*App) OfferSnapshot ¶
func (app *App) OfferSnapshot(snapshot abcitypes.RequestOfferSnapshot) abcitypes.ResponseOfferSnapshot
func (*App) Query ¶
func (app *App) Query(req abcitypes.RequestQuery) abcitypes.ResponseQuery
func (*App) RunTxForRpc ¶
func (*App) RunTxForSbchRpc ¶ added in v0.4.3
func (app *App) RunTxForSbchRpc(gethTx *gethtypes.Transaction, sender gethcmn.Address, height int64) (*ebp.TxRunner, int64)
RunTxForSbchRpc is like RunTxForRpc, with two differences: 1. estimateGas is always false 2. run under context of block#height-1
func (*App) SetOption ¶
func (app *App) SetOption(option abcitypes.RequestSetOption) abcitypes.ResponseSetOption
func (*App) SubscribeChainEvent ¶
func (app *App) SubscribeChainEvent(ch chan<- types.ChainEvent) event.Subscription
SubscribeChainEvent registers a subscription of ChainEvent.
func (*App) SubscribeLogsEvent ¶
func (app *App) SubscribeLogsEvent(ch chan<- []*gethtypes.Log) event.Subscription
SubscribeLogsEvent registers a subscription of []*types.Log.
func (*App) SumAllBalance ¶ added in v0.3.0
type GenesisData ¶
type GenesisData struct { Validators []*Validator `json:"validators"` Alloc gethcore.GenesisAlloc `json:"alloc"` }
func (GenesisData) StakingValidators ¶ added in v0.4.5
func (g GenesisData) StakingValidators() []*stakingtypes.Validator
type IApp ¶ added in v0.4.4
type IApp interface { ChainID() *uint256.Int GetRpcContext() *types.Context GetRpcContextAtHeight(height int64) *types.Context GetHistoryOnlyContext() *types.Context RunTxForRpc(gethTx *gethtypes.Transaction, sender gethcmn.Address, estimateGas bool, height int64) (*ebp.TxRunner, int64) RunTxForSbchRpc(gethTx *gethtypes.Transaction, sender gethcmn.Address, height int64) (*ebp.TxRunner, int64) GetCurrEpoch() *stakingtypes.Epoch GetWatcherEpochList() []*stakingtypes.Epoch GetAppEpochList() []*stakingtypes.Epoch GetLatestBlockNum() int64 SubscribeChainEvent(ch chan<- types.ChainEvent) event.Subscription SubscribeLogsEvent(ch chan<- []*gethtypes.Log) event.Subscription LoadBlockInfo() *types.BlockInfo GetValidatorsInfo(height int64) ValidatorsInfo IsArchiveMode() bool GetBlockForSync(height int64) (blk []byte, err error) GetRpcMaxLogResults() int }
type PendingReward ¶ added in v0.2.0
type SenderAndHeight ¶ added in v0.1.6
The value entry of signature cache. The Height helps in evicting old entries.
type Validator ¶ added in v0.2.0
type Validator struct { Address gethcmn.Address `json:"address"` Pubkey gethcmn.Hash `json:"pubkey"` RewardTo gethcmn.Address `json:"reward_to"` VotingPower int64 `json:"voting_power"` Introduction string `json:"introduction"` StakedCoins gethcmn.Hash `json:"staked_coins"` IsRetiring bool `json:"is_retiring"` MinerAddress crypto.Address `json:"miner_address"` }
func FromStakingValidator ¶ added in v0.2.0
func FromStakingValidator(v *stakingtypes.Validator) *Validator
func FromStakingValidators ¶ added in v0.2.0
func FromStakingValidators(vs []*stakingtypes.Validator) []*Validator
type ValidatorsInfo ¶ added in v0.2.0
type ValidatorsInfo struct { // StakingInfo GenesisMainnetBlockHeight int64 `json:"genesisMainnetBlockHeight"` CurrEpochNum int64 `json:"currEpochNum"` Validators []*Validator `json:"validators"` ValidatorsUpdate []*Validator `json:"validatorsUpdate"` PendingRewards []*PendingReward `json:"pendingRewards"` // MinGasPrice MinGasPrice uint64 `json:"minGasPrice"` LastMinGasPrice uint64 `json:"lastMinGasPrice"` // App CurrValidators []*Validator `json:"currValidators"` }
func NewValidatorsInfo ¶ added in v0.4.5
func NewValidatorsInfo(currValidators []*stakingtypes.Validator, stakingInfo stakingtypes.StakingInfo, minGasPrice, lastMinGasPrice uint64) ValidatorsInfo
Click to show internal directories.
Click to hide internal directories.