Documentation ¶
Index ¶
- Constants
- Variables
- func AddSystemAccBalance(ctx *types.Context, amount *uint256.Int) error
- func GetBlackHoleBalance(ctx *types.Context) *uint256.Int
- func GetSystemBalance(ctx *types.Context) *uint256.Int
- func LogsBloom(logs []types.Log) [256]byte
- func NewEbpTxExec(exeRoundCount, runnerNumber, parallelNum, defaultTxListCap int, ...) *txEngine
- func RunTxForRpc(currBlock *types.BlockInfo, estimateGas bool, runner *TxRunner) int64
- func StatusIsFailure(status int) bool
- func StatusToStr(status int) string
- func SubSenderAccBalance(ctx *types.Context, sender common.Address, amount *uint256.Int) error
- func SubSystemAccBalance(ctx *types.Context, amount *uint256.Int) error
- func TransferFromSenderAccToBlackHoleAcc(ctx *types.Context, sender common.Address, amount *uint256.Int) error
- type TxExecutor
- type TxRange
- type TxRunner
Constants ¶
View Source
const ( RpcRunnersIdStart int = 10000 RpcRunnersCount int = 256 SMALL_BUF_SIZE int = int(C.SMALL_BUF_SIZE) AdjustGasUsed = false )
Variables ¶
View Source
var (
MaxTxGasLimit uint64 = 1000_0000
)
View Source
var PredefinedSystemContractExecutor types.SystemContractExecutor = nil
View Source
var RpcRunnerLocks [RpcRunnersCount]spinLock
View Source
var RpcRunners [RpcRunnersCount]*TxRunner
Its usage is similar with Runners. Runners are for transactions in block. RpcRunners are for transactions in Web3 RPC: call and estimateGas.
View Source
var Runners []*TxRunner
This is a global variable. The parameter 'collector_handler' passed to zero_depth_call_wrap is an index to select one TxRunner from this global variable.
View Source
var T1, T2, T3, T4 uint64
Functions ¶
func AddSystemAccBalance ¶ added in v0.1.1
func GetBlackHoleBalance ¶ added in v0.1.1
func NewEbpTxExec ¶
func RunTxForRpc ¶
func StatusIsFailure ¶
func StatusToStr ¶
func SubSenderAccBalance ¶ added in v0.1.1
guarantee account exists externally
func SubSystemAccBalance ¶ added in v0.1.1
Types ¶
type TxExecutor ¶
type TxExecutor interface { //step 1: for deliverTx, collect block txs in engine.txList CollectTx(tx *gethtypes.Transaction) //step 2: for commit, check sig, insert regular txs standbyTxQ Prepare(reorderSeed int64, minGasPrice uint64) (touchedAddrs map[common.Address]int) //step 3: for postCommit, parallel execute tx in standbyTxQ Execute(currBlock *types.BlockInfo) //set context SetContext(ctx *types.Context) Context() *types.Context //collect infos, not thread safe CollectTxsCount() int CommittedTxs() []*types.Transaction GasUsedInfo() (gasUsed uint64, gasRefund, gasFee uint256.Int) StandbyQLen() int }
Click to show internal directories.
Click to hide internal directories.