Documentation ¶
Index ¶
- Constants
- type BaseApp
- func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock)
- func (app *BaseApp) CheckTx(txBytes []byte) abci.ResponseCheckTx
- func (app *BaseApp) Commit() (res abci.ResponseCommit)
- func (app *BaseApp) DeliverTx(txBytes []byte) abci.ResponseDeliverTx
- func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock)
- func (app *BaseApp) Info(req abci.RequestInfo) abci.ResponseInfo
- func (app *BaseApp) InitState(module, key string, value interface{}) error
- type EthermintApplication
- func (app *EthermintApplication) BeginBlock(beginBlock abciTypes.RequestBeginBlock) abciTypes.ResponseBeginBlock
- func (app *EthermintApplication) CheckTx(tx *ethTypes.Transaction) abciTypes.ResponseCheckTx
- func (app *EthermintApplication) CollectTx(tx *types.Transaction)
- func (app *EthermintApplication) Commit() abciTypes.ResponseCommit
- func (app *EthermintApplication) DeliverTx(tx *ethTypes.Transaction) abciTypes.ResponseDeliverTx
- func (app *EthermintApplication) DeliverTxState() *state.StateDB
- func (app *EthermintApplication) EndBlock(endBlock abciTypes.RequestEndBlock) abciTypes.ResponseEndBlock
- func (app *EthermintApplication) GetUpdatedValidators() abciTypes.ResponseEndBlock
- func (app *EthermintApplication) Info(req abciTypes.RequestInfo) abciTypes.ResponseInfo
- func (app *EthermintApplication) InitChain(req abciTypes.RequestInitChain) abciTypes.ResponseInitChain
- func (app *EthermintApplication) Query(query abciTypes.RequestQuery) abciTypes.ResponseQuery
- func (app *EthermintApplication) Receiver() common.Address
- func (app *EthermintApplication) SetLogger(log tmLog.Logger)
- func (app *EthermintApplication) SetOption(req abciTypes.RequestSetOption) abciTypes.ResponseSetOption
- func (app *EthermintApplication) SetValidators(validators []abciTypes.Validator)
- type FromTo
- type StoreApp
- func (app *StoreApp) AddValChange(diffs []abci.Validator)
- func (app *StoreApp) Append() sm.SimpleDB
- func (app *StoreApp) Check() sm.SimpleDB
- func (app *StoreApp) Commit() (res abci.ResponseCommit)
- func (app *StoreApp) CommittedHeight() int64
- func (app *StoreApp) EndBlock(_ abci.RequestEndBlock) (res abci.ResponseEndBlock)
- func (app *StoreApp) GetChainID() string
- func (app *StoreApp) GetDbHash() []byte
- func (app *StoreApp) Hash() []byte
- func (app *StoreApp) Info(req abci.RequestInfo) abci.ResponseInfo
- func (app *StoreApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain)
- func (app *StoreApp) Logger() log.Logger
- func (app *StoreApp) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)
- func (app *StoreApp) SetOption(res abci.RequestSetOption) abci.ResponseSetOption
- func (app *StoreApp) WorkingHeight() int64
Constants ¶
const (
BLOCK_AWARD_STR = "10000000000000000000000"
)
const DefaultHistorySize = 10
DefaultHistorySize is how many blocks of history to store for ABCI queries
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseApp ¶
type BaseApp struct { *StoreApp EthApp *EthermintApplication AbsentValidators *stake.AbsentValidators ByzantineValidators []abci.Evidence PresentValidators stake.Validators // contains filtered or unexported fields }
BaseApp - The ABCI application
func NewBaseApp ¶
func NewBaseApp(store *StoreApp, ethApp *EthermintApplication, ethereum *eth.Ethereum) (*BaseApp, error)
NewBaseApp extends a StoreApp with a handler and a ticker, which it binds to the proper abci calls
func (*BaseApp) BeginBlock ¶
func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock)
BeginBlock - ABCI
func (*BaseApp) CheckTx ¶
func (app *BaseApp) CheckTx(txBytes []byte) abci.ResponseCheckTx
CheckTx - ABCI
func (*BaseApp) Commit ¶
func (app *BaseApp) Commit() (res abci.ResponseCommit)
func (*BaseApp) DeliverTx ¶
func (app *BaseApp) DeliverTx(txBytes []byte) abci.ResponseDeliverTx
DeliverTx - ABCI
func (*BaseApp) EndBlock ¶
func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock)
EndBlock - ABCI - triggers Tick actions
func (*BaseApp) Info ¶
func (app *BaseApp) Info(req abci.RequestInfo) abci.ResponseInfo
Info implements abci.Application. It returns the height and hash, as well as the abci name and version.
The height is the block that holds the transactions, not the apphash itself.
type EthermintApplication ¶
type EthermintApplication struct {
// contains filtered or unexported fields
}
EthermintApplication implements an ABCI application #stable - 0.4.0
func NewEthermintApplication ¶
func NewEthermintApplication(backend *api.Backend, client *rpc.Client, strategy *emtTypes.Strategy) (*EthermintApplication, error)
NewEthermintApplication creates a fully initialised instance of EthermintApplication #stable - 0.4.0
func (*EthermintApplication) BeginBlock ¶
func (app *EthermintApplication) BeginBlock(beginBlock abciTypes.RequestBeginBlock) abciTypes.ResponseBeginBlock
BeginBlock starts a new Ethereum block #stable - 0.4.0
func (*EthermintApplication) CheckTx ¶
func (app *EthermintApplication) CheckTx(tx *ethTypes.Transaction) abciTypes.ResponseCheckTx
CheckTx checks a transaction is valid but does not mutate the state #stable - 0.4.0
func (*EthermintApplication) CollectTx ¶
func (app *EthermintApplication) CollectTx(tx *types.Transaction)
CollectTx invokes CollectTx on the strategy #unstable
func (*EthermintApplication) Commit ¶
func (app *EthermintApplication) Commit() abciTypes.ResponseCommit
Commit commits the block and returns a hash of the current state #stable - 0.4.0
func (*EthermintApplication) DeliverTx ¶
func (app *EthermintApplication) DeliverTx(tx *ethTypes.Transaction) abciTypes.ResponseDeliverTx
DeliverTx executes a transaction against the latest state #stable - 0.4.0
func (*EthermintApplication) DeliverTxState ¶
func (app *EthermintApplication) DeliverTxState() *state.StateDB
func (*EthermintApplication) EndBlock ¶
func (app *EthermintApplication) EndBlock(endBlock abciTypes.RequestEndBlock) abciTypes.ResponseEndBlock
EndBlock accumulates rewards for the validators and updates them #stable - 0.4.0
func (*EthermintApplication) GetUpdatedValidators ¶
func (app *EthermintApplication) GetUpdatedValidators() abciTypes.ResponseEndBlock
GetUpdatedValidators returns an updated validator set from the strategy #unstable
func (*EthermintApplication) Info ¶
func (app *EthermintApplication) Info(req abciTypes.RequestInfo) abciTypes.ResponseInfo
func (*EthermintApplication) InitChain ¶
func (app *EthermintApplication) InitChain(req abciTypes.RequestInitChain) abciTypes.ResponseInitChain
InitChain initializes the validator set #stable - 0.4.0
func (*EthermintApplication) Query ¶
func (app *EthermintApplication) Query(query abciTypes.RequestQuery) abciTypes.ResponseQuery
Query queries the state of the EthermintApplication #stable - 0.4.0
func (*EthermintApplication) Receiver ¶
func (app *EthermintApplication) Receiver() common.Address
Receiver returns the receiving address based on the selected strategy #unstable
func (*EthermintApplication) SetLogger ¶
func (app *EthermintApplication) SetLogger(log tmLog.Logger)
SetLogger sets the logger for the ethermint application #unstable
func (*EthermintApplication) SetOption ¶
func (app *EthermintApplication) SetOption(req abciTypes.RequestSetOption) abciTypes.ResponseSetOption
SetOption sets a configuration option #stable - 0.4.0
func (*EthermintApplication) SetValidators ¶
func (app *EthermintApplication) SetValidators(validators []abciTypes.Validator)
SetValidators sets new validators on the strategy #unstable
type StoreApp ¶
type StoreApp struct { // Name is what is returned from info Name string TotalUsedGasFee *big.Int BlockEnd bool // contains filtered or unexported fields }
StoreApp contains a data store and all info needed to perform queries and handshakes.
It should be embeded in another struct for CheckTx, DeliverTx and initializing state from the genesis.
func NewStoreApp ¶
NewStoreApp creates a data store to handle queries
func (*StoreApp) AddValChange ¶
AddValChange is meant to be called by apps on DeliverTx results, this is added to the cache for the endblock changeset
func (*StoreApp) Commit ¶
func (app *StoreApp) Commit() (res abci.ResponseCommit)
Commit implements abci.Application
func (*StoreApp) CommittedHeight ¶
CommittedHeight gets the last block height committed to the db
func (*StoreApp) EndBlock ¶
func (app *StoreApp) EndBlock(_ abci.RequestEndBlock) (res abci.ResponseEndBlock)
EndBlock - ABCI Returns a list of all validator changes made in this block
func (*StoreApp) GetChainID ¶
GetChainID returns the currently stored chain
func (*StoreApp) Info ¶
func (app *StoreApp) Info(req abci.RequestInfo) abci.ResponseInfo
Info implements abci.Application. It returns the height and hash, as well as the abci name and version.
The height is the block that holds the transactions, not the apphash itself.
func (*StoreApp) InitChain ¶
func (app *StoreApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain)
InitChain - ABCI
func (*StoreApp) Query ¶
func (app *StoreApp) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)
Query - ABCI
func (*StoreApp) SetOption ¶
func (app *StoreApp) SetOption(res abci.RequestSetOption) abci.ResponseSetOption
SetOption - ABCI
func (*StoreApp) WorkingHeight ¶
WorkingHeight gets the current block we are writing