Documentation ¶
Index ¶
- Constants
- func Bench1(erigonURL, gethURL string, needCompare bool, fullTest bool, blockFrom uint64, ...)
- func Bench2(erigon_url string)
- func Bench3(erigon_url, geth_url string)
- func Bench4(erigon_url string)
- func Bench5(erigonURL string)
- func Bench6(erigon_url string)
- func Bench7(erigonURL, gethURL string)
- func Bench9(erigonURL, gethURL string, needCompare bool)
- func BenchDebugTraceCall(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchEthCall(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, ...)
- func BenchEthGetBalance(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64)
- func BenchEthGetBlockByNumber(erigonURL string)
- func BenchEthGetLogs(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchTraceBlock(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchTraceBlockByHash(erigonUrl, gethUrl string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchTraceCall(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchTraceCallMany(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchTraceFilter(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchTraceReplayTransaction(erigonUrl, gethUrl string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchTraceTransaction(erigonUrl, gethUrl string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- func BenchTxReceipt(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, ...)
- 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 EthGetTransactionCount
- type EthReceipt
- type EthSendRawTransaction
- type EthTransaction
- type EthTxPool
- type EthTxTrace
- type EthTxTraceResult
- type Log
- 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, recordFile string)
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 BenchDebugTraceCall(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string)
bench12 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 BenchEthCall ¶
func BenchEthCall(erigonURL, gethURL string, needCompare, latest bool, blockFrom, blockTo uint64, recordFile string, errorFile string)
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 BenchEthGetBalance ¶
func BenchEthGetBalance(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64)
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 BenchEthGetBlockByNumber ¶
func BenchEthGetBlockByNumber(erigonURL string)
BenchEthGetBlockByNumber generates lots of requests for eth_getBlockByNumber to attempt to reproduce issue where empty results are being returned
func BenchEthGetLogs ¶
func BenchEthGetLogs(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string)
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 BenchTraceBlock ¶
func BenchTraceBlock(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string)
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 BenchTraceBlockByHash ¶
func BenchTraceCall ¶
func BenchTraceCall(erigonURL, oeURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string)
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)
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)
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 BenchTraceTransaction ¶
func BenchTxReceipt ¶
func BenchTxReceipt(erigonURL, gethURL string, needCompare bool, blockFrom uint64, blockTo uint64, recordFile string, errorFile string)
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 EthGetTransactionCount ¶
type EthGetTransactionCount struct { CommonResponse Result hexutil.Uint64 `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 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_debugtracecall.go
- bench_ethcall.go
- bench_ethgetBalance.go
- bench_ethgetlogs.go
- bench_traceblock.go
- bench_tracecall.go
- bench_tracecallmany.go
- bench_tracefilter.go
- bench_tracereplaytransaction.go
- bench_tracetransaction.go
- bench_txreceipts.go
- replay.go
- request_generator.go
- type.go
- utils.go