Documentation
¶
Index ¶
- Constants
- func Bench1(erigonURL, gethURL string, needCompare bool, fullTest bool, blockFrom uint64, ...) error
- func Bench2(erigon_url string) error
- func Bench3(erigon_url, geth_url string) error
- func Bench4(erigon_url string) error
- func Bench5(erigonURL string) error
- func Bench6(erigon_url string) error
- func Bench7(erigonURL, gethURL string) error
- func Bench9(erigonURL, gethURL string, needCompare bool) error
- func BenchDebugTraceBlockByHash(erigonUrl, gethUrl string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchDebugTraceBlockByNumber(erigonUrl, gethUrl string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchDebugTraceCall(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchDebugTraceTransaction(erigonUrl, gethUrl string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchEthCall(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, ...) error
- func BenchEthCreateAccessList(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, ...) error
- func BenchEthGetBalance(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64) error
- func BenchEthGetBlockByHash(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, ...) error
- func BenchEthGetBlockByNumber(erigonURL string) error
- func BenchEthGetBlockByNumber2(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, ...) error
- func BenchEthGetLogs(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchEthGetTransactionByHash(erigonURL, gethURL string, needCompare bool, blockFrom, blockTo uint64, ...) error
- func BenchOtsGetBlockTransactions(erigonURL, gethURL string, needCompare, visitAllPages bool, latest bool, ...) error
- func BenchOverlayGetLogs(erigonURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchTraceBlock(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchTraceCall(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchTraceCallMany(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchTraceFilter(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchTraceReplayTransaction(erigonUrl, gethUrl string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func BenchTxReceipt(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...) error
- func CompareAccountRange(logger log.Logger, erigonURL, gethURL, tmpDataDir, gethDataDir string, ...)
- func Replay(erigonURL string, recordFile string) error
- type AccountResult
- type CallResult
- type CommonResponse
- type DebugAccountRange
- type DebugModifiedAccounts
- type DebugStorageRange
- type EthBalance
- type EthBlockByNumber
- type EthBlockByNumberResult
- type EthBlockNumber
- type EthError
- type EthGetLogs
- type EthGetProof
- type EthReceipt
- type EthSendRawTransaction
- type EthTransaction
- type EthTxPool
- type EthTxTrace
- type EthTxTraceResult
- type Log
- type OtsBlockTransactions
- type OtsBlockTransactionsResult
- type OtsFullBlock
- type OtsReceipt
- type OtsTransaction
- type ParityListStorageKeysResult
- type Receipt
- type RequestGenerator
- func (g *RequestGenerator) Erigon(method, body string, response interface{}) CallResult
- func (g *RequestGenerator) Erigon2(method, body string) CallResult
- func (g *RequestGenerator) Geth(method, body string, response interface{}) CallResult
- func (g *RequestGenerator) Geth2(method, body string) CallResult
- type StorageRangeResult
- type StorageResult
- type StructLog
- type TraceCall
- type TraceCallAction
- type TraceCallResult
- type TraceCallStateDiff
- type TraceCallStateDiffStorage
- type TraceCallTrace
- type TraceCallTraceResult
Constants ¶
const Erigon = "erigon"
const Geth = "geth"
Variables ¶
This section is empty.
Functions ¶
func Bench1 ¶
func Bench1(erigonURL, gethURL string, needCompare bool, fullTest bool, blockFrom uint64, blockTo uint64, recordFileName string) error
bench1 compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
use false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon
fullTest - if false - then call only methods which RPCDaemon currently supports
func BenchDebugTraceCall ¶
func BenchEthCall ¶
func BenchEthCall(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, recordFileName string, errorFileName string) error
BenchEthCall compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth or infura parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon recordFile stores all eth_call returned with success errorFile stores information when erigon and geth doesn't return same data
func BenchEthCreateAccessList ¶
func BenchEthCreateAccessList(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, recordFileName string, errorFileName string) error
BenchEthCreateAccessList compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth or infura parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon recordFile stores all eth_call returned with success errorFile stores information when erigon and geth doesn't return same data
func BenchEthGetBalance ¶
func BenchEthGetBalance(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64) error
BenchEthGetBalance compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
use false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon
func BenchEthGetBlockByHash ¶
func BenchEthGetBlockByHash(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, recordFileName string, errorFileName string) error
BenchEthGetBlockByHash compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth or infura parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon recordFileName stores all eth_call returned wite success errorFileName stores information when erigon and geth doesn't return same data
func BenchEthGetBlockByNumber ¶
BenchEthGetBlockByNumber generates lots of requests for eth_getBlockByNumber to attempt to reproduce issue where empty results are being returned
func BenchEthGetBlockByNumber2 ¶
func BenchEthGetBlockByNumber2(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, recordFileName string, errorFileName string) error
BenchEthGetBlockByNumber compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth or infura parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon recordFile stores all eth_call returned with success errorFile stores information when erigon and geth doesn't return same data
func BenchEthGetLogs ¶
func BenchEthGetLogs(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string) error
BenchEthGetLogs compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth or infura parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon recordFile stores all eth_getlogs returned with success errorFile stores information when erigon and geth doesn't return same data
func BenchEthGetTransactionByHash ¶
func BenchEthGetTransactionByHash(erigonURL, gethURL string, needCompare bool, blockFrom, blockTo uint64, recordFileName string, errorFileName string) error
BenchEthGetTransactionByHash compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth or infura parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon
recordFile stores all eth_GetTransactionByHash returned with success
errorFile stores information when erigon and geth doesn't return same data
func BenchOtsGetBlockTransactions ¶
func BenchOtsGetBlockTransactions(erigonURL, gethURL string, needCompare, visitAllPages bool, latest bool, blockFrom, blockTo uint64, recordFileName string, errorFileName string) error
BenchOtsGetBlockTransactions compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
use false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon
func BenchOverlayGetLogs ¶
func BenchOverlayGetLogs(erigonURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string) error
BenchOverlayGetLogs compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth or infura parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
false value - to generate vegeta files, it's faster but we can generate vegeta files for Geth and Erigon recordFile stores all eth_getlogs returned with success errorFile stores information when erigon and geth doesn't return same data
func BenchTraceBlock ¶
func BenchTraceBlock(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string) error
Compares response of Erigon with Geth but also can be used for comparing RPCDaemon with OpenEthereum parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
func BenchTraceCall ¶
func BenchTraceCall(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string) error
bench1 compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
func BenchTraceCallMany ¶
func BenchTraceCallMany(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string) error
BenchTraceCallMany compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
func BenchTraceFilter ¶
func BenchTraceFilter(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string) error
Compares response of Erigon with OpenEthereum but also can be used for comparing RPCDaemon with Geth parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
func BenchTxReceipt ¶
func BenchTxReceipt(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFileName string, errorFileName string) error
benchTxReceipt compares response of Erigon with Geth but also can be used for comparing RPCDaemon with Geth parameters: needCompare - if false - doesn't call Erigon and doesn't compare responses
func CompareAccountRange ¶
Types ¶
type AccountResult ¶
type AccountResult struct { Address libcommon.Address `json:"address"` AccountProof []string `json:"accountProof"` Balance *hexutil.Big `json:"balance"` CodeHash libcommon.Hash `json:"codeHash"` Nonce hexutil.Uint64 `json:"nonce"` StorageHash libcommon.Hash `json:"storageHash"` StorageProof []StorageResult `json:"storageProof"` }
AccountResult is the result struct for GetProof
type CallResult ¶
type CommonResponse ¶
type DebugAccountRange ¶
type DebugAccountRange struct { CommonResponse Result state.IteratorDump `json:"result"` }
type DebugModifiedAccounts ¶
type DebugModifiedAccounts struct { CommonResponse Result []libcommon.Address `json:"result"` }
func (*DebugModifiedAccounts) Print ¶
func (ma *DebugModifiedAccounts) Print()
type DebugStorageRange ¶
type DebugStorageRange struct { CommonResponse Result StorageRangeResult `json:"result"` }
type EthBalance ¶
type EthBalance struct { CommonResponse Balance hexutil.Big `json:"result"` }
type EthBlockByNumber ¶
type EthBlockByNumber struct { CommonResponse Result *EthBlockByNumberResult `json:"result"` }
type EthBlockByNumberResult ¶
type EthBlockNumber ¶
type EthBlockNumber struct { CommonResponse Number hexutil.Uint64 `json:"result"` }
type EthGetLogs ¶
type EthGetLogs struct { CommonResponse Result []Log `json:"result"` }
type EthGetProof ¶
type EthGetProof struct { CommonResponse Result AccountResult `json:"result"` }
type EthReceipt ¶
type EthReceipt struct { CommonResponse Result Receipt `json:"result"` }
type EthSendRawTransaction ¶
type EthSendRawTransaction struct { CommonResponse TxnHash libcommon.Hash `json:"result"` }
type EthTransaction ¶
type EthTransaction struct { From libcommon.Address `json:"from"` To *libcommon.Address `json:"to"` // Pointer because it might be missing Hash string `json:"hash"` Gas hexutil.Big `json:"gas"` GasPrice hexutil.Big `json:"gasPrice"` Input hexutility.Bytes `json:"input"` Value hexutil.Big `json:"value"` }
type EthTxPool ¶
type EthTxPool struct { CommonResponse Result interface{} `json:"result"` }
type EthTxTrace ¶
type EthTxTrace struct { CommonResponse Result EthTxTraceResult `json:"result"` }
type EthTxTraceResult ¶
type Log ¶
type Log struct { // Consensus fields: // address of the contract that generated the event Address libcommon.Address `json:"address" gencodec:"required"` // list of topics provided by the contract. Topics []libcommon.Hash `json:"topics" gencodec:"required"` // supplied by the contract, usually ABI-encoded Data hexutility.Bytes `json:"data" gencodec:"required"` // Derived fields. These fields are filled in by the node // but not secured by consensus. // block in which the transaction was included BlockNumber hexutil.Uint64 `json:"blockNumber"` // hash of the transaction TxHash libcommon.Hash `json:"transactionHash" gencodec:"required"` // index of the transaction in the block TxIndex hexutil.Uint `json:"transactionIndex" gencodec:"required"` // hash of the block in which the transaction was included BlockHash libcommon.Hash `json:"blockHash"` // index of the log in the receipt Index hexutil.Uint `json:"logIndex" gencodec:"required"` // The Removed field is true if this log was reverted due to a chain reorganisation. // You must pay attention to this field if you receive logs through a filter query. Removed bool `json:"removed"` }
Log represents a contract log event. These events are generated by the LOG opcode and stored/indexed by the node.
type OtsBlockTransactions ¶
type OtsBlockTransactions struct { CommonResponse Result *OtsBlockTransactionsResult `json:"result"` }
type OtsBlockTransactionsResult ¶
type OtsBlockTransactionsResult struct { FullBlock *OtsFullBlock `json:"fullblock"` Receipts []OtsReceipt `json:"receipts"` }
type OtsFullBlock ¶
type OtsFullBlock struct { Difficulty hexutil.Big `json:"difficulty"` ExtraData string `json:"extraData"` GasLimit hexutil.Big `json:"gasLimit"` GasUsed hexutil.Big `json:"gasUsed"` Hash libcommon.Hash `json:"hash"` Bloom string `json:"logsBloom" gencodec:"required"` Miner libcommon.Address `json:"miner"` MixHash string `json:"mixHash"` Nonce string `json:"nonce"` Number hexutil.Big `json:"number"` ParentHash string `json:"parentHash"` ReceiptsRoot string `json:"receiptsRoot"` Sha3Uncles string `json:"sha3Uncles"` Size hexutil.Big `json:"size"` StateRoot string `json:"stateRoot"` Timestamp string `json:"timestamp"` TransactionCount uint64 `json:"transactionCount"` Transactions []OtsTransaction `json:"transactions"` TxRoot libcommon.Hash `json:"transactionsRoot"` Uncles []string `json:"uncles"` }
type OtsReceipt ¶
type OtsReceipt struct { BlockHash libcommon.Hash `json:"blockHash"` BlockNumber hexutil.Uint64 `json:"blockNumber"` ContractAddress string `json:"contractAddress"` CumulativeGasUsed hexutil.Big `json:"cumulativeGasUsed"` EffectiveGasPrice hexutil.Big `json:"effectiveGasPrice"` From libcommon.Address `json:"from"` GasUsed hexutil.Big `json:"gasUsed"` To *libcommon.Address `json:"to"` // Pointer because it might be missing TransactionHash string `json:"hash"` TransactionIndex hexutil.Uint64 `json:"transactionIndex"` }
type OtsTransaction ¶
type OtsTransaction struct { BlockHash libcommon.Hash `json:"blockHash"` BlockNumber hexutil.Uint64 `json:"blockNumber"` From libcommon.Address `json:"from"` Gas hexutil.Big `json:"gas"` GasPrice hexutil.Big `json:"gasPrice"` Hash string `json:"hash"` Input hexutility.Bytes `json:"input"` To *libcommon.Address `json:"to"` // Pointer because it might be missing TransactionIndex hexutil.Uint64 `json:"transactionIndex"` Value hexutil.Big `json:"value"` Type hexutil.Big `json:"type"` // To check ChainId hexutil.Big `json:"chainId"` // To check }
type ParityListStorageKeysResult ¶
type ParityListStorageKeysResult struct { CommonResponse Result []hexutility.Bytes `json:"result"` }
type Receipt ¶
type Receipt struct { // Consensus fields PostState libcommon.Hash `json:"root"` Status hexutil.Uint64 `json:"status"` CumulativeGasUsed hexutil.Uint64 `json:"cumulativeGasUsed" gencodec:"required"` Bloom hexutility.Bytes `json:"logsBloom" gencodec:"required"` Logs []*Log `json:"logs" gencodec:"required"` // Implementation fields (don't reorder!) TxHash libcommon.Hash `json:"transactionHash" gencodec:"required"` ContractAddress *libcommon.Address `json:"contractAddress"` GasUsed hexutil.Uint64 `json:"gasUsed" gencodec:"required"` }
type RequestGenerator ¶
type RequestGenerator struct {
// contains filtered or unexported fields
}
func (*RequestGenerator) Erigon ¶
func (g *RequestGenerator) Erigon(method, body string, response interface{}) CallResult
func (*RequestGenerator) Erigon2 ¶
func (g *RequestGenerator) Erigon2(method, body string) CallResult
func (*RequestGenerator) Geth ¶
func (g *RequestGenerator) Geth(method, body string, response interface{}) CallResult
func (*RequestGenerator) Geth2 ¶
func (g *RequestGenerator) Geth2(method, body string) CallResult
type StorageRangeResult ¶
type StorageRangeResult struct { Storage storageMap `json:"storage"` NextKey *libcommon.Hash `json:"nextKey"` // nil if Storage includes the last key in the trie. }
StorageRangeResult is the result of a debug_storageRangeAt API call.
type StorageResult ¶
type TraceCall ¶
type TraceCall struct { CommonResponse Result TraceCallResult `json:"result"` }
type TraceCallAction ¶
type TraceCallAction struct { From libcommon.Address `json:"from"` To libcommon.Address `json:"to"` Address libcommon.Address `json:"address"` RefundAddress libcommon.Address `json:"refundAddress"` Gas hexutil.Big `json:"gas"` Value hexutil.Big `json:"value"` Balance hexutil.Big `json:"balance"` Init hexutility.Bytes `json:"init"` Input hexutility.Bytes `json:"input"` CallType string `json:"callType"` }
TraceCallAction is superset of all possible action types
type TraceCallResult ¶
type TraceCallResult struct { Output hexutility.Bytes `json:"output"` Trace []TraceCallTrace `json:"trace"` StateDiff map[libcommon.Address]TraceCallStateDiff `json:"stateDiff"` }
type TraceCallStateDiff ¶
type TraceCallStateDiff struct { Balance interface{} `json:"balance"` Nonce interface{} `json:"nonce"` Code interface{} `json:"code"` Storage map[libcommon.Hash]map[string]TraceCallStateDiffStorage `json:"storage"` }
type TraceCallTrace ¶
type TraceCallTrace struct { Type string `json:"type"` Action TraceCallAction `json:"action"` Result *TraceCallTraceResult `json:"result"` Subtraces int `json:"subtraces"` TraceAddress []int `json:"traceAddress"` Error string `json:"error"` }
type TraceCallTraceResult ¶
type TraceCallTraceResult struct { GasUsed hexutil.Big `json:"gasUsed"` Output hexutility.Bytes `json:"output"` Address libcommon.Address `json:"address"` Code hexutility.Bytes `json:"code"` }
Source Files
¶
- account_range_verify.go
- bench1.go
- bench2.go
- bench3.go
- bench4.go
- bench5.go
- bench6.go
- bench7.go
- bench9.go
- bench_blockbynumber.go
- bench_debugTrace.go
- bench_ethcall.go
- bench_ethcreateaccesslist.go
- bench_ethgetBalance.go
- bench_ethgetblockbyhash.go
- bench_ethgetblockbynumber.go
- bench_ethgetlogs.go
- bench_gettransactionbyhash.go
- bench_otsgetblockTransactions.go
- bench_overlaygetlogs.go
- bench_traceblock.go
- bench_tracecall.go
- bench_tracecallmany.go
- bench_tracefilter.go
- bench_tracereplaytransaction.go
- bench_txreceipts.go
- replay.go
- request_generator.go
- type.go
- utils.go