Documentation ¶
Index ¶
- Constants
- Variables
- func CreateHistoryStore(dataPath string, useLiteDB bool, maxLogResults int, logger log.Logger) (historyStore dbtypes.DB)
- func CreateRootStore(dataPath string, isArchiveMode bool) (*store.RootStore, *ads.ADS)
- type App
- 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) CrosschainInfo(start, end int64) []*ccrpctypes.CCrpcTransferInfo
- func (app *App) DeliverTx(req abcitypes.RequestDeliverTx) abcitypes.ResponseDeliverTx
- func (app *App) EndBlock(req abcitypes.RequestEndBlock) abcitypes.ResponseEndBlock
- func (app *App) GetBlockForSync(height int64) (blk []byte, err error)
- func (app *App) GetCCRPCForkBlock() int64
- func (app *App) GetCheckTxContext() *types.Context
- func (app *App) GetCurrEpoch() *stake.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) GetRunTxContext() *types.Context
- func (app *App) GetValidatorsInfo() ValidatorsInfo
- func (app *App) GetWordState() *evmtc.WorldState
- func (app *App) HistoryStore() dbtypes.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) LastBlockTxs() []*types.Transaction
- 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 = "zeniqsmartd" GitCommit = "" GitDate = "" GitTag = "v0.6.9" )
set via linker flags
Functions ¶
func CreateHistoryStore ¶
Types ¶
type App ¶
func NewApp ¶
func NewApp(config *param.ChainConfig, chainId *uint256.Int, genesisWatcherHeight int64, logger log.Logger, rpccl ccrpctypes.RpcClient) (app *App)
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) CrosschainInfo ¶ added in v0.6.8
func (app *App) CrosschainInfo(start, end int64) []*ccrpctypes.CCrpcTransferInfo
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) GetCCRPCForkBlock ¶
func (*App) GetCheckTxContext ¶
func (*App) GetCurrEpoch ¶
func (*App) GetHistoryOnlyContext ¶
func (*App) GetLastGasUsed ¶
func (*App) GetLatestBlockNum ¶
func (*App) GetRpcContext ¶
func (*App) GetRpcContextAtHeight ¶
func (*App) GetRunTxContext ¶
func (*App) GetValidatorsInfo ¶
func (app *App) GetValidatorsInfo() ValidatorsInfo
func (*App) GetWordState ¶
func (app *App) GetWordState() *evmtc.WorldState
func (*App) HistoryStore ¶
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 ¶
func (*App) LastBlockTxs ¶ added in v0.6.9
func (app *App) LastBlockTxs() []*types.Transaction
func (*App) ListSnapshots ¶
func (app *App) ListSnapshots(snapshots abcitypes.RequestListSnapshots) abcitypes.ResponseListSnapshots
func (*App) LoadBlockInfo ¶
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 ¶
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 ¶
type GenesisData ¶
type GenesisData struct { Validators []*Validator `json:"validators"` Alloc gethcore.GenesisAlloc `json:"alloc"` }
func (GenesisData) StakingValidators ¶
func (g GenesisData) StakingValidators() []*stake.Validator
type IApp ¶
type IApp interface { ChainID() *uint256.Int GetRunTxContext() *types.Context 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() *stake.Epoch GetLatestBlockNum() int64 SubscribeChainEvent(ch chan<- types.ChainEvent) event.Subscription SubscribeLogsEvent(ch chan<- []*gethtypes.Log) event.Subscription LoadBlockInfo() *types.BlockInfo GetValidatorsInfo() ValidatorsInfo IsArchiveMode() bool GetBlockForSync(height int64) (blk []byte, err error) GetCCRPCForkBlock() int64 CrosschainInfo(start, end int64) []*ccrpctypes.CCrpcTransferInfo LastBlockTxs() []*types.Transaction }
type PendingReward ¶
type SenderAndHeight ¶
The value entry of signature cache. The Height helps in evicting old entries.
type Validator ¶
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 ¶
func FromStakingValidators ¶
type ValidatorsInfo ¶
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 ¶
func NewValidatorsInfo(currValidators []*stake.Validator, stakingInfo stake.StakingInfo, minGasPrice, lastMinGasPrice uint64) ValidatorsInfo
Click to show internal directories.
Click to hide internal directories.