Documentation
¶
Index ¶
- Constants
- Variables
- func NewEthTxPool(app *EVMApp, conf *viper.Viper) *ethTxPool
- func OpenDatabase(datadir string, name string, cache int, handles int) (ethdb.Database, error)
- type BeginExecFunc
- type BlockChainEvm
- type EVMApp
- func (app *EVMApp) BeginExecute()
- func (app *EVMApp) CheckTx(bs []byte) error
- func (app *EVMApp) CompatibleWithAngine()
- func (app *EVMApp) GetAngineHooks() gtypes.Hooks
- func (app *EVMApp) GetTxPool() gtypes.TxPool
- func (app *EVMApp) Info() (resInfo gtypes.ResultInfo)
- func (app *EVMApp) OnCommit(height, round int64, block *gtypes.Block) (interface{}, error)
- func (app *EVMApp) OnExecute(height, round int64, block *gtypes.Block) (interface{}, error)
- func (app *EVMApp) OnNewRound(height, round int64, block *gtypes.Block) (interface{}, error)
- func (app *EVMApp) OnPrevote(height, round int64, block *gtypes.Block) (interface{}, error)
- func (app *EVMApp) Query(query []byte) (res gtypes.Result)
- func (app *EVMApp) SaveReceipts() ([]byte, error)
- func (app *EVMApp) SetCore(core gtypes.Core)
- func (app *EVMApp) Start() (err error)
- func (app *EVMApp) Stop()
- type EndExecFunc
- type ExecFunc
- type LastBlockInfo
Constants ¶
View Source
const ( AppName = "evm" DatabaseCache = 128 DatabaseHandles = 1024 MaxKey = 256 MaxValue = 4096 // With 2.2 GHz Intel Core i7, 16 GB 2400 MHz DDR4, 256GB SSD, we tested following contract, it takes about 24157 gas and 171.193µs. // function setVal(uint256 _val) public { // val = _val; // emit SetVal(_val,_val); // emit SetValByWho("a name which length is bigger than 32 bytes",msg.sender, _val); // } // So we estimate that running out of 100000000 gas may be taken at least 1s to 10s EVMGasLimit uint64 = 100000000 )
Variables ¶
Functions ¶
func NewEthTxPool ¶
Types ¶
type BeginExecFunc ¶
type BeginExecFunc func() (ExecFunc, EndExecFunc)
type BlockChainEvm ¶
type BlockChainEvm struct {
// contains filtered or unexported fields
}
reference ethereum BlockChain
func NewBlockChain ¶
func NewBlockChain(db ethdb.Database) *BlockChainEvm
type EVMApp ¶
type EVMApp struct {
gtypes.BaseApplication
AngineHooks gtypes.Hooks
Config *viper.Viper
Signer etypes.Signer
// contains filtered or unexported fields
}
func (*EVMApp) BeginExecute ¶
func (app *EVMApp) BeginExecute()
func (*EVMApp) CompatibleWithAngine ¶
func (app *EVMApp) CompatibleWithAngine()
func (*EVMApp) GetAngineHooks ¶
func (*EVMApp) Info ¶
func (app *EVMApp) Info() (resInfo gtypes.ResultInfo)
func (*EVMApp) OnCommit ¶
OnCommit run in a sync way, we don't need to lock stateDupMtx, but stateMtx is still needed
func (*EVMApp) OnNewRound ¶
func (*EVMApp) SaveReceipts ¶
type EndExecFunc ¶
type LastBlockInfo ¶
Click to show internal directories.
Click to hide internal directories.