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) (from common.Address, nonce uint64, err error)
- func (app *EVMApp) CompatibleWithAngine()
- func (app *EVMApp) GetAddressFromTx(tx *etypes.Transaction) (from common.Address, err error)
- 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 KeyValueHistoryManager
- func (m *KeyValueHistoryManager) Close()
- func (m *KeyValueHistoryManager) Get(key []byte, index uint32) (history *types.ValueUpdateHistory, err error)
- func (m *KeyValueHistoryManager) GetKeyHistorySize(key []byte) (uint32, error)
- func (m *KeyValueHistoryManager) NewBatch() *kvBatch
- func (m *KeyValueHistoryManager) Query(key []byte, pageNo uint32, pageSize uint32) (histories []*types.ValueUpdateHistory, total uint32, err error)
- func (m *KeyValueHistoryManager) SaveKeyHistory(kvs types.KeyValueHistories) error
- 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 )
View Source
const ( PageNumLen = 4 PageSizeLen = 4 )
Variables ¶
View Source
var ( ReceiptsPrefix = []byte("receipts-") KvPrefix = []byte("kvstore-") EmptyTrieRoot = common.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") IsHomestead = true )
View Source
var ( KvHistoryPrefix = []byte("kvh_") KvSizePrefix = []byte("_size_") )
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) GetAddressFromTx ¶ added in v1.4.3
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 KeyValueHistoryManager ¶ added in v1.5.0
type KeyValueHistoryManager struct {
// contains filtered or unexported fields
}
func NewKeyValueHistoryManager ¶ added in v1.5.0
func NewKeyValueHistoryManager(db ethdb.Database) *KeyValueHistoryManager
func (*KeyValueHistoryManager) Close ¶ added in v1.5.0
func (m *KeyValueHistoryManager) Close()
func (*KeyValueHistoryManager) Get ¶ added in v1.5.0
func (m *KeyValueHistoryManager) Get(key []byte, index uint32) (history *types.ValueUpdateHistory, err error)
func (*KeyValueHistoryManager) GetKeyHistorySize ¶ added in v1.5.0
func (m *KeyValueHistoryManager) GetKeyHistorySize(key []byte) (uint32, error)
func (*KeyValueHistoryManager) NewBatch ¶ added in v1.5.0
func (m *KeyValueHistoryManager) NewBatch() *kvBatch
func (*KeyValueHistoryManager) Query ¶ added in v1.5.0
func (m *KeyValueHistoryManager) Query(key []byte, pageNo uint32, pageSize uint32) (histories []*types.ValueUpdateHistory, total uint32, err error)
func (*KeyValueHistoryManager) SaveKeyHistory ¶ added in v1.5.0
func (m *KeyValueHistoryManager) SaveKeyHistory(kvs types.KeyValueHistories) error
type LastBlockInfo ¶
Click to show internal directories.
Click to hide internal directories.